@getworkbench/core 0.3.1 → 0.3.2
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/ui/assets/index.css +1 -0
- package/dist/ui/assets/index.js +454 -0
- package/dist/ui/index.html +32 -0
- package/package.json +2 -2
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
var h$=e=>{throw TypeError(e)};var bS=(e,t,n)=>t.has(e)||h$("Cannot "+n);var te=(e,t,n)=>(bS(e,t,"read from private field"),n?n.call(e):t.get(e)),De=(e,t,n)=>t.has(e)?h$("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ee=(e,t,n,r)=>(bS(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ke=(e,t,n)=>(bS(e,t,"access private method"),n);var jv=(e,t,n,r)=>({set _(i){Ee(e,t,i,n)},get _(){return te(e,t,r)}});function _ie(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Nv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xS={exports:{}},jh={};/**
|
|
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 p$;function Eie(){if(p$)return jh;p$=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:a}}return jh.Fragment=t,jh.jsx=n,jh.jsxs=n,jh}var m$;function Aie(){return m$||(m$=1,xS.exports=Eie()),xS.exports}var b=Aie(),wS={exports:{}},ze={};/**
|
|
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 g$;function Cie(){if(g$)return ze;g$=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),m=Symbol.iterator;function g(U){return U===null||typeof U!="object"?null:(U=m&&U[m]||U["@@iterator"],typeof U=="function"?U:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,y={};function S(U,F,X){this.props=U,this.context=F,this.refs=y,this.updater=X||x}S.prototype.isReactComponent={},S.prototype.setState=function(U,F){if(typeof U!="object"&&typeof U!="function"&&U!=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,U,F,"setState")},S.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function E(){}E.prototype=S.prototype;function _(U,F,X){this.props=U,this.context=F,this.refs=y,this.updater=X||x}var A=_.prototype=new E;A.constructor=_,w(A,S.prototype),A.isPureReactComponent=!0;var C=Array.isArray;function O(){}var P={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function R(U,F,X){var K=X.ref;return{$$typeof:e,type:U,key:F,ref:K!==void 0?K:null,props:X}}function $(U,F){return R(U.type,F,U.props)}function I(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function k(U){var F={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(X){return F[X]})}var V=/\/+/g;function D(U,F){return typeof U=="object"&&U!==null&&U.key!=null?k(""+U.key):F.toString(36)}function q(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(O,O):(U.status="pending",U.then(function(F){U.status==="pending"&&(U.status="fulfilled",U.value=F)},function(F){U.status==="pending"&&(U.status="rejected",U.reason=F)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function L(U,F,X,K,G){var Q=typeof U;(Q==="undefined"||Q==="boolean")&&(U=null);var J=!1;if(U===null)J=!0;else switch(Q){case"bigint":case"string":case"number":J=!0;break;case"object":switch(U.$$typeof){case e:case t:J=!0;break;case d:return J=U._init,L(J(U._payload),F,X,K,G)}}if(J)return G=G(U),J=K===""?"."+D(U,0):K,C(G)?(X="",J!=null&&(X=J.replace(V,"$&/")+"/"),L(G,F,X,"",function(fe){return fe})):G!=null&&(I(G)&&(G=$(G,X+(G.key==null||U&&U.key===G.key?"":(""+G.key).replace(V,"$&/")+"/")+J)),F.push(G)),1;J=0;var re=K===""?".":K+":";if(C(U))for(var ne=0;ne<U.length;ne++)K=U[ne],Q=re+D(K,ne),J+=L(K,F,X,Q,G);else if(ne=g(U),typeof ne=="function")for(U=ne.call(U),ne=0;!(K=U.next()).done;)K=K.value,Q=re+D(K,ne++),J+=L(K,F,X,Q,G);else if(Q==="object"){if(typeof U.then=="function")return L(q(U),F,X,K,G);throw F=String(U),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return J}function z(U,F,X){if(U==null)return U;var K=[],G=0;return L(U,K,"","",function(Q){return F.call(X,Q,G++)}),K}function H(U){if(U._status===-1){var F=U._result;F=F(),F.then(function(X){(U._status===0||U._status===-1)&&(U._status=1,U._result=X)},function(X){(U._status===0||U._status===-1)&&(U._status=2,U._result=X)}),U._status===-1&&(U._status=0,U._result=F)}if(U._status===1)return U._result.default;throw U._result}var Y=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},Z={map:z,forEach:function(U,F,X){z(U,function(){F.apply(this,arguments)},X)},count:function(U){var F=0;return z(U,function(){F++}),F},toArray:function(U){return z(U,function(F){return F})||[]},only:function(U){if(!I(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return ze.Activity=h,ze.Children=Z,ze.Component=S,ze.Fragment=n,ze.Profiler=i,ze.PureComponent=_,ze.StrictMode=r,ze.Suspense=u,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ze.__COMPILER_RUNTIME={__proto__:null,c:function(U){return P.H.useMemoCache(U)}},ze.cache=function(U){return function(){return U.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(U,F,X){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var K=w({},U.props),G=U.key;if(F!=null)for(Q in F.key!==void 0&&(G=""+F.key),F)!M.call(F,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&F.ref===void 0||(K[Q]=F[Q]);var Q=arguments.length-2;if(Q===1)K.children=X;else if(1<Q){for(var J=Array(Q),re=0;re<Q;re++)J[re]=arguments[re+2];K.children=J}return R(U.type,G,K)},ze.createContext=function(U){return U={$$typeof:o,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:a,_context:U},U},ze.createElement=function(U,F,X){var K,G={},Q=null;if(F!=null)for(K in F.key!==void 0&&(Q=""+F.key),F)M.call(F,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(G[K]=F[K]);var J=arguments.length-2;if(J===1)G.children=X;else if(1<J){for(var re=Array(J),ne=0;ne<J;ne++)re[ne]=arguments[ne+2];G.children=re}if(U&&U.defaultProps)for(K in J=U.defaultProps,J)G[K]===void 0&&(G[K]=J[K]);return R(U,Q,G)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(U){return{$$typeof:l,render:U}},ze.isValidElement=I,ze.lazy=function(U){return{$$typeof:d,_payload:{_status:-1,_result:U},_init:H}},ze.memo=function(U,F){return{$$typeof:f,type:U,compare:F===void 0?null:F}},ze.startTransition=function(U){var F=P.T,X={};P.T=X;try{var K=U(),G=P.S;G!==null&&G(X,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(O,Y)}catch(Q){Y(Q)}finally{F!==null&&X.types!==null&&(F.types=X.types),P.T=F}},ze.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ze.use=function(U){return P.H.use(U)},ze.useActionState=function(U,F,X){return P.H.useActionState(U,F,X)},ze.useCallback=function(U,F){return P.H.useCallback(U,F)},ze.useContext=function(U){return P.H.useContext(U)},ze.useDebugValue=function(){},ze.useDeferredValue=function(U,F){return P.H.useDeferredValue(U,F)},ze.useEffect=function(U,F){return P.H.useEffect(U,F)},ze.useEffectEvent=function(U){return P.H.useEffectEvent(U)},ze.useId=function(){return P.H.useId()},ze.useImperativeHandle=function(U,F,X){return P.H.useImperativeHandle(U,F,X)},ze.useInsertionEffect=function(U,F){return P.H.useInsertionEffect(U,F)},ze.useLayoutEffect=function(U,F){return P.H.useLayoutEffect(U,F)},ze.useMemo=function(U,F){return P.H.useMemo(U,F)},ze.useOptimistic=function(U,F){return P.H.useOptimistic(U,F)},ze.useReducer=function(U,F,X){return P.H.useReducer(U,F,X)},ze.useRef=function(U){return P.H.useRef(U)},ze.useState=function(U){return P.H.useState(U)},ze.useSyncExternalStore=function(U,F,X){return P.H.useSyncExternalStore(U,F,X)},ze.useTransition=function(){return P.H.useTransition()},ze.version="19.2.6",ze}var v$;function jm(){return v$||(v$=1,wS.exports=Cie()),wS.exports}var j=jm();const ie=yt(j),PM=_ie({__proto__:null,default:ie},[j]);var SS={exports:{}},Nh={},_S={exports:{}},ES={};/**
|
|
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 y$;function Tie(){return y$||(y$=1,(function(e){function t(L,z){var H=L.length;L.push(z);e:for(;0<H;){var Y=H-1>>>1,Z=L[Y];if(0<i(Z,z))L[Y]=z,L[H]=Z,H=Y;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var z=L[0],H=L.pop();if(H!==z){L[0]=H;e:for(var Y=0,Z=L.length,U=Z>>>1;Y<U;){var F=2*(Y+1)-1,X=L[F],K=F+1,G=L[K];if(0>i(X,H))K<Z&&0>i(G,X)?(L[Y]=G,L[K]=H,Y=K):(L[Y]=X,L[F]=H,Y=F);else if(K<Z&&0>i(G,H))L[Y]=G,L[K]=H,Y=K;else break e}}return z}function i(L,z){var H=L.sortIndex-z.sortIndex;return H!==0?H:L.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],f=[],d=1,h=null,m=3,g=!1,x=!1,w=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function A(L){for(var z=n(f);z!==null;){if(z.callback===null)r(f);else if(z.startTime<=L)r(f),z.sortIndex=z.expirationTime,t(u,z);else break;z=n(f)}}function C(L){if(w=!1,A(L),!x)if(n(u)!==null)x=!0,O||(O=!0,k());else{var z=n(f);z!==null&&q(C,z.startTime-L)}}var O=!1,P=-1,M=5,R=-1;function $(){return y?!0:!(e.unstable_now()-R<M)}function I(){if(y=!1,O){var L=e.unstable_now();R=L;var z=!0;try{e:{x=!1,w&&(w=!1,E(P),P=-1),g=!0;var H=m;try{t:{for(A(L),h=n(u);h!==null&&!(h.expirationTime>L&&$());){var Y=h.callback;if(typeof Y=="function"){h.callback=null,m=h.priorityLevel;var Z=Y(h.expirationTime<=L);if(L=e.unstable_now(),typeof Z=="function"){h.callback=Z,A(L),z=!0;break t}h===n(u)&&r(u),A(L)}else r(u);h=n(u)}if(h!==null)z=!0;else{var U=n(f);U!==null&&q(C,U.startTime-L),z=!1}}break e}finally{h=null,m=H,g=!1}z=void 0}}finally{z?k():O=!1}}}var k;if(typeof _=="function")k=function(){_(I)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,D=V.port2;V.port1.onmessage=I,k=function(){D.postMessage(null)}}else k=function(){S(I,0)};function q(L,z){P=S(function(){L(e.unstable_now())},z)}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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(L){switch(m){case 1:case 2:case 3:var z=3;break;default:z=m}var H=m;m=z;try{return L()}finally{m=H}},e.unstable_requestPaint=function(){y=!0},e.unstable_runWithPriority=function(L,z){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var H=m;m=L;try{return z()}finally{m=H}},e.unstable_scheduleCallback=function(L,z,H){var Y=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?Y+H:Y):H=Y,L){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=H+Z,L={id:d++,callback:z,priorityLevel:L,startTime:H,expirationTime:Z,sortIndex:-1},H>Y?(L.sortIndex=H,t(f,L),n(u)===null&&L===n(f)&&(w?(E(P),P=-1):w=!0,q(C,H-Y))):(L.sortIndex=Z,t(u,L),x||g||(x=!0,O||(O=!0,k()))),L},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(L){var z=m;return function(){var H=m;m=z;try{return L.apply(this,arguments)}finally{m=H}}}})(ES)),ES}var b$;function Oie(){return b$||(b$=1,_S.exports=Tie()),_S.exports}var AS={exports:{}},Hn={};/**
|
|
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 x$;function jie(){if(x$)return Hn;x$=1;var e=jm();function t(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)f+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(u,f,d){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:u,containerInfo:f,implementation:d}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Hn.createPortal=function(u,f){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(u,f,null,d)},Hn.flushSync=function(u){var f=o.T,d=r.p;try{if(o.T=null,r.p=2,u)return u()}finally{o.T=f,r.p=d,r.d.f()}},Hn.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(u,f))},Hn.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Hn.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var d=f.as,h=l(d,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,g=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;d==="style"?r.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:m,fetchPriority:g}):d==="script"&&r.d.X(u,{crossOrigin:h,integrity:m,fetchPriority:g,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Hn.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var d=l(f.as,f.crossOrigin);r.d.M(u,{crossOrigin:d,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(u)},Hn.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var d=f.as,h=l(d,f.crossOrigin);r.d.L(u,d,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Hn.preloadModule=function(u,f){if(typeof u=="string")if(f){var d=l(f.as,f.crossOrigin);r.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:d,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(u)},Hn.requestFormReset=function(u){r.d.r(u)},Hn.unstable_batchedUpdates=function(u,f){return u(f)},Hn.useFormState=function(u,f,d){return o.H.useFormState(u,f,d)},Hn.useFormStatus=function(){return o.H.useHostTransitionStatus()},Hn.version="19.2.6",Hn}var w$;function C9(){if(w$)return AS.exports;w$=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(),AS.exports=jie(),AS.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 S$;function Nie(){if(S$)return Nh;S$=1;var e=Oie(),t=jm(),n=C9();function r(s){var c="https://react.dev/errors/"+s;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)c+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function a(s){var c=s,p=s;if(s.alternate)for(;c.return;)c=c.return;else{s=c;do c=s,(c.flags&4098)!==0&&(p=c.return),s=c.return;while(s)}return c.tag===3?p:null}function o(s){if(s.tag===13){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function l(s){if(s.tag===31){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function u(s){if(a(s)!==s)throw Error(r(188))}function f(s){var c=s.alternate;if(!c){if(c=a(s),c===null)throw Error(r(188));return c!==s?null:s}for(var p=s,v=c;;){var T=p.return;if(T===null)break;var N=T.alternate;if(N===null){if(v=T.return,v!==null){p=v;continue}break}if(T.child===N.child){for(N=T.child;N;){if(N===p)return u(T),s;if(N===v)return u(T),c;N=N.sibling}throw Error(r(188))}if(p.return!==v.return)p=T,v=N;else{for(var B=!1,W=T.child;W;){if(W===p){B=!0,p=T,v=N;break}if(W===v){B=!0,v=T,p=N;break}W=W.sibling}if(!B){for(W=N.child;W;){if(W===p){B=!0,p=N,v=T;break}if(W===v){B=!0,v=N,p=T;break}W=W.sibling}if(!B)throw Error(r(189))}}if(p.alternate!==v)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?s:c}function d(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s;for(s=s.child;s!==null;){if(c=d(s),c!==null)return c;s=s.sibling}return null}var h=Object.assign,m=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),_=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function k(s){return s===null||typeof s!="object"?null:(s=I&&s[I]||s["@@iterator"],typeof s=="function"?s:null)}var V=Symbol.for("react.client.reference");function D(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===V?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case w:return"Fragment";case S:return"Profiler";case y:return"StrictMode";case C:return"Suspense";case O:return"SuspenseList";case R:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case x:return"Portal";case _:return s.displayName||"Context";case E:return(s._context.displayName||"Context")+".Consumer";case A:var c=s.render;return s=s.displayName,s||(s=c.displayName||c.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case P:return c=s.displayName||null,c!==null?c:D(s.type)||"Memo";case M:c=s._payload,s=s._init;try{return D(s(c))}catch{}}return null}var q=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},Y=[],Z=-1;function U(s){return{current:s}}function F(s){0>Z||(s.current=Y[Z],Y[Z]=null,Z--)}function X(s,c){Z++,Y[Z]=s.current,s.current=c}var K=U(null),G=U(null),Q=U(null),J=U(null);function re(s,c){switch(X(Q,c),X(G,s),X(K,null),c.nodeType){case 9:case 11:s=(s=c.documentElement)&&(s=s.namespaceURI)?IL(s):0;break;default:if(s=c.tagName,c=c.namespaceURI)c=IL(c),s=LL(c,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}F(K),X(K,s)}function ne(){F(K),F(G),F(Q)}function fe(s){s.memoizedState!==null&&X(J,s);var c=K.current,p=LL(c,s.type);c!==p&&(X(G,s),X(K,p))}function he(s){G.current===s&&(F(K),F(G)),J.current===s&&(F(J),Ah._currentValue=H)}var oe,ye;function be(s){if(oe===void 0)try{throw Error()}catch(p){var c=p.stack.trim().match(/\n( *(at )?)/);oe=c&&c[1]||"",ye=-1<p.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+oe+s+ye}var xe=!1;function Ae(s,c){if(!s||xe)return"";xe=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(c){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(de){var ce=de}Reflect.construct(s,[],ve)}else{try{ve.call()}catch(de){ce=de}s.call(ve.prototype)}}else{try{throw Error()}catch(de){ce=de}(ve=s())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(de){if(de&&ce&&typeof de.stack=="string")return[de.stack,ce.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var T=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");T&&T.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var N=v.DetermineComponentFrameRoot(),B=N[0],W=N[1];if(B&&W){var ee=B.split(`
|
|
44
|
+
`),ue=W.split(`
|
|
45
|
+
`);for(T=v=0;v<ee.length&&!ee[v].includes("DetermineComponentFrameRoot");)v++;for(;T<ue.length&&!ue[T].includes("DetermineComponentFrameRoot");)T++;if(v===ee.length||T===ue.length)for(v=ee.length-1,T=ue.length-1;1<=v&&0<=T&&ee[v]!==ue[T];)T--;for(;1<=v&&0<=T;v--,T--)if(ee[v]!==ue[T]){if(v!==1||T!==1)do if(v--,T--,0>T||ee[v]!==ue[T]){var pe=`
|
|
46
|
+
`+ee[v].replace(" at new "," at ");return s.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",s.displayName)),pe}while(1<=v&&0<=T);break}}}finally{xe=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?be(p):""}function _e(s,c){switch(s.tag){case 26:case 27:case 5:return be(s.type);case 16:return be("Lazy");case 13:return s.child!==c&&c!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return Ae(s.type,!1);case 11:return Ae(s.type.render,!1);case 1:return Ae(s.type,!0);case 31:return be("Activity");default:return""}}function tt(s){try{var c="",p=null;do c+=_e(s,p),p=s,s=s.return;while(s);return c}catch(v){return`
|
|
47
|
+
Error generating stack: `+v.message+`
|
|
48
|
+
`+v.stack}}var nt=Object.prototype.hasOwnProperty,Lt=e.unstable_scheduleCallback,Ut=e.unstable_cancelCallback,Pt=e.unstable_shouldYield,Et=e.unstable_requestPaint,At=e.unstable_now,Ge=e.unstable_getCurrentPriorityLevel,$t=e.unstable_ImmediatePriority,bn=e.unstable_UserBlockingPriority,Vn=e.unstable_NormalPriority,qu=e.unstable_LowPriority,wa=e.unstable_IdlePriority,Dd=e.log,zu=e.unstable_setDisableYieldValue,Fn=null,Qt=null;function Gi(s){if(typeof Dd=="function"&&zu(s),Qt&&typeof Qt.setStrictMode=="function")try{Qt.setStrictMode(Fn,s)}catch{}}var Zn=Math.clz32?Math.clz32:sw,aw=Math.log,ow=Math.LN2;function sw(s){return s>>>=0,s===0?32:31-(aw(s)/ow|0)|0}var Vu=256,Fu=262144,Uu=4194304;function Sa(s){var c=s&42;if(c!==0)return c;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Hu(s,c,p){var v=s.pendingLanes;if(v===0)return 0;var T=0,N=s.suspendedLanes,B=s.pingedLanes;s=s.warmLanes;var W=v&134217727;return W!==0?(v=W&~N,v!==0?T=Sa(v):(B&=W,B!==0?T=Sa(B):p||(p=W&~s,p!==0&&(T=Sa(p))))):(W=v&~N,W!==0?T=Sa(W):B!==0?T=Sa(B):p||(p=v&~s,p!==0&&(T=Sa(p)))),T===0?0:c!==0&&c!==T&&(c&N)===0&&(N=T&-T,p=c&-c,N>=p||N===32&&(p&4194048)!==0)?c:T}function ll(s,c){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&c)===0}function lw(s,c){switch(s){case 1:case 2:case 4:case 8:case 64:return c+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 c+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 og(){var s=Uu;return Uu<<=1,(Uu&62914560)===0&&(Uu=4194304),s}function Id(s){for(var c=[],p=0;31>p;p++)c.push(s);return c}function ul(s,c){s.pendingLanes|=c,c!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function uw(s,c,p,v,T,N){var B=s.pendingLanes;s.pendingLanes=p,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=p,s.entangledLanes&=p,s.errorRecoveryDisabledLanes&=p,s.shellSuspendCounter=0;var W=s.entanglements,ee=s.expirationTimes,ue=s.hiddenUpdates;for(p=B&~p;0<p;){var pe=31-Zn(p),ve=1<<pe;W[pe]=0,ee[pe]=-1;var ce=ue[pe];if(ce!==null)for(ue[pe]=null,pe=0;pe<ce.length;pe++){var de=ce[pe];de!==null&&(de.lane&=-536870913)}p&=~ve}v!==0&&sg(s,v,0),N!==0&&T===0&&s.tag!==0&&(s.suspendedLanes|=N&~(B&~c))}function sg(s,c,p){s.pendingLanes|=c,s.suspendedLanes&=~c;var v=31-Zn(c);s.entangledLanes|=c,s.entanglements[v]=s.entanglements[v]|1073741824|p&261930}function lg(s,c){var p=s.entangledLanes|=c;for(s=s.entanglements;p;){var v=31-Zn(p),T=1<<v;T&c|s[v]&c&&(s[v]|=c),p&=~T}}function ug(s,c){var p=c&-c;return p=(p&42)!==0?1:Ld(p),(p&(s.suspendedLanes|c))!==0?0:p}function Ld(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=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:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function $d(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function cg(){var s=z.p;return s!==0?s:(s=window.event,s===void 0?32:o$(s.type))}function fg(s,c){var p=z.p;try{return z.p=s,c()}finally{z.p=p}}var Wi=Math.random().toString(36).slice(2),xn="__reactFiber$"+Wi,Un="__reactProps$"+Wi,_a="__reactContainer$"+Wi,Gu="__reactEvents$"+Wi,dg="__reactListeners$"+Wi,cw="__reactHandles$"+Wi,hg="__reactResources$"+Wi,cl="__reactMarker$"+Wi;function Bd(s){delete s[xn],delete s[Un],delete s[Gu],delete s[dg],delete s[cw]}function Co(s){var c=s[xn];if(c)return c;for(var p=s.parentNode;p;){if(c=p[_a]||p[xn]){if(p=c.alternate,c.child!==null||p!==null&&p.child!==null)for(s=UL(s);s!==null;){if(p=s[xn])return p;s=UL(s)}return c}s=p,p=s.parentNode}return null}function To(s){if(s=s[xn]||s[_a]){var c=s.tag;if(c===5||c===6||c===13||c===31||c===26||c===27||c===3)return s}return null}function Oo(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s.stateNode;throw Error(r(33))}function jo(s){var c=s[hg];return c||(c=s[hg]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function un(s){s[cl]=!0}var pg=new Set,mg={};function Ea(s,c){No(s,c),No(s+"Capture",c)}function No(s,c){for(mg[s]=c,s=0;s<c.length;s++)pg.add(c[s])}var fw=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]*$"),qd={},gg={};function dw(s){return nt.call(gg,s)?!0:nt.call(qd,s)?!1:fw.test(s)?gg[s]=!0:(qd[s]=!0,!1)}function Wu(s,c,p){if(dw(c))if(p===null)s.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":s.removeAttribute(c);return;case"boolean":var v=c.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){s.removeAttribute(c);return}}s.setAttribute(c,""+p)}}function Ku(s,c,p){if(p===null)s.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(c);return}s.setAttribute(c,""+p)}}function yi(s,c,p,v){if(v===null)s.removeAttribute(p);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(p);return}s.setAttributeNS(c,p,""+v)}}function ur(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function vg(s){var c=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function hw(s,c,p){var v=Object.getOwnPropertyDescriptor(s.constructor.prototype,c);if(!s.hasOwnProperty(c)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var T=v.get,N=v.set;return Object.defineProperty(s,c,{configurable:!0,get:function(){return T.call(this)},set:function(B){p=""+B,N.call(this,B)}}),Object.defineProperty(s,c,{enumerable:v.enumerable}),{getValue:function(){return p},setValue:function(B){p=""+B},stopTracking:function(){s._valueTracker=null,delete s[c]}}}}function Po(s){if(!s._valueTracker){var c=vg(s)?"checked":"value";s._valueTracker=hw(s,c,""+s[c])}}function yg(s){if(!s)return!1;var c=s._valueTracker;if(!c)return!0;var p=c.getValue(),v="";return s&&(v=vg(s)?s.checked?"true":"false":s.value),s=v,s!==p?(c.setValue(s),!0):!1}function fl(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var pw=/[\n"\\]/g;function cr(s){return s.replace(pw,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function dl(s,c,p,v,T,N,B,W){s.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?s.type=B:s.removeAttribute("type"),c!=null?B==="number"?(c===0&&s.value===""||s.value!=c)&&(s.value=""+ur(c)):s.value!==""+ur(c)&&(s.value=""+ur(c)):B!=="submit"&&B!=="reset"||s.removeAttribute("value"),c!=null?zd(s,B,ur(c)):p!=null?zd(s,B,ur(p)):v!=null&&s.removeAttribute("value"),T==null&&N!=null&&(s.defaultChecked=!!N),T!=null&&(s.checked=T&&typeof T!="function"&&typeof T!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?s.name=""+ur(W):s.removeAttribute("name")}function bg(s,c,p,v,T,N,B,W){if(N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(s.type=N),c!=null||p!=null){if(!(N!=="submit"&&N!=="reset"||c!=null)){Po(s);return}p=p!=null?""+ur(p):"",c=c!=null?""+ur(c):p,W||c===s.value||(s.value=c),s.defaultValue=c}v=v??T,v=typeof v!="function"&&typeof v!="symbol"&&!!v,s.checked=W?s.checked:!!v,s.defaultChecked=!!v,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(s.name=B),Po(s)}function zd(s,c,p){c==="number"&&fl(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function Aa(s,c,p,v){if(s=s.options,c){c={};for(var T=0;T<p.length;T++)c["$"+p[T]]=!0;for(p=0;p<s.length;p++)T=c.hasOwnProperty("$"+s[p].value),s[p].selected!==T&&(s[p].selected=T),T&&v&&(s[p].defaultSelected=!0)}else{for(p=""+ur(p),c=null,T=0;T<s.length;T++){if(s[T].value===p){s[T].selected=!0,v&&(s[T].defaultSelected=!0);return}c!==null||s[T].disabled||(c=s[T])}c!==null&&(c.selected=!0)}}function Pk(s,c,p){if(c!=null&&(c=""+ur(c),c!==s.value&&(s.value=c),p==null)){s.defaultValue!==c&&(s.defaultValue=c);return}s.defaultValue=p!=null?""+ur(p):""}function Mk(s,c,p,v){if(c==null){if(v!=null){if(p!=null)throw Error(r(92));if(q(v)){if(1<v.length)throw Error(r(93));v=v[0]}p=v}p==null&&(p=""),c=p}p=ur(c),s.defaultValue=p,v=s.textContent,v===p&&v!==""&&v!==null&&(s.value=v),Po(s)}function Yu(s,c){if(c){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=c;return}}s.textContent=c}var yne=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 Rk(s,c,p){var v=c.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?v?s.setProperty(c,""):c==="float"?s.cssFloat="":s[c]="":v?s.setProperty(c,p):typeof p!="number"||p===0||yne.has(c)?c==="float"?s.cssFloat=p:s[c]=(""+p).trim():s[c]=p+"px"}function kk(s,c,p){if(c!=null&&typeof c!="object")throw Error(r(62));if(s=s.style,p!=null){for(var v in p)!p.hasOwnProperty(v)||c!=null&&c.hasOwnProperty(v)||(v.indexOf("--")===0?s.setProperty(v,""):v==="float"?s.cssFloat="":s[v]="");for(var T in c)v=c[T],c.hasOwnProperty(T)&&p[T]!==v&&Rk(s,T,v)}else for(var N in c)c.hasOwnProperty(N)&&Rk(s,N,c[N])}function mw(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bne=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"]]),xne=/^[\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 xg(s){return xne.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Ca(){}var gw=null;function vw(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Xu=null,Zu=null;function Dk(s){var c=To(s);if(c&&(s=c.stateNode)){var p=s[Un]||null;e:switch(s=c.stateNode,c.type){case"input":if(dl(s,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),c=p.name,p.type==="radio"&&c!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+cr(""+c)+'"][type="radio"]'),c=0;c<p.length;c++){var v=p[c];if(v!==s&&v.form===s.form){var T=v[Un]||null;if(!T)throw Error(r(90));dl(v,T.value,T.defaultValue,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name)}}for(c=0;c<p.length;c++)v=p[c],v.form===s.form&&yg(v)}break e;case"textarea":Pk(s,p.value,p.defaultValue);break e;case"select":c=p.value,c!=null&&Aa(s,!!p.multiple,c,!1)}}}var yw=!1;function Ik(s,c,p){if(yw)return s(c,p);yw=!0;try{var v=s(c);return v}finally{if(yw=!1,(Xu!==null||Zu!==null)&&(sv(),Xu&&(c=Xu,s=Zu,Zu=Xu=null,Dk(c),s)))for(c=0;c<s.length;c++)Dk(s[c])}}function Vd(s,c){var p=s.stateNode;if(p===null)return null;var v=p[Un]||null;if(v===null)return null;p=v[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(s=s.type,v=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!v;break e;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(r(231,c,typeof p));return p}var Ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bw=!1;if(Ta)try{var Fd={};Object.defineProperty(Fd,"passive",{get:function(){bw=!0}}),window.addEventListener("test",Fd,Fd),window.removeEventListener("test",Fd,Fd)}catch{bw=!1}var Mo=null,xw=null,wg=null;function Lk(){if(wg)return wg;var s,c=xw,p=c.length,v,T="value"in Mo?Mo.value:Mo.textContent,N=T.length;for(s=0;s<p&&c[s]===T[s];s++);var B=p-s;for(v=1;v<=B&&c[p-v]===T[N-v];v++);return wg=T.slice(s,1<v?1-v:void 0)}function Sg(s){var c=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&c===13&&(s=13)):s=c,s===10&&(s=13),32<=s||s===13?s:0}function _g(){return!0}function $k(){return!1}function fr(s){function c(p,v,T,N,B){this._reactName=p,this._targetInst=T,this.type=v,this.nativeEvent=N,this.target=B,this.currentTarget=null;for(var W in s)s.hasOwnProperty(W)&&(p=s[W],this[W]=p?p(N):N[W]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?_g:$k,this.isPropagationStopped=$k,this}return h(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=_g)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=_g)},persist:function(){},isPersistent:_g}),c}var hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Eg=fr(hl),Ud=h({},hl,{view:0,detail:0}),wne=fr(Ud),ww,Sw,Hd,Ag=h({},Ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ew,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Hd&&(Hd&&s.type==="mousemove"?(ww=s.screenX-Hd.screenX,Sw=s.screenY-Hd.screenY):Sw=ww=0,Hd=s),ww)},movementY:function(s){return"movementY"in s?s.movementY:Sw}}),Bk=fr(Ag),Sne=h({},Ag,{dataTransfer:0}),_ne=fr(Sne),Ene=h({},Ud,{relatedTarget:0}),_w=fr(Ene),Ane=h({},hl,{animationName:0,elapsedTime:0,pseudoElement:0}),Cne=fr(Ane),Tne=h({},hl,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),One=fr(Tne),jne=h({},hl,{data:0}),qk=fr(jne),Nne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pne={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"},Mne={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rne(s){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(s):(s=Mne[s])?!!c[s]:!1}function Ew(){return Rne}var kne=h({},Ud,{key:function(s){if(s.key){var c=Nne[s.key]||s.key;if(c!=="Unidentified")return c}return s.type==="keypress"?(s=Sg(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Pne[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ew,charCode:function(s){return s.type==="keypress"?Sg(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Sg(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Dne=fr(kne),Ine=h({},Ag,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zk=fr(Ine),Lne=h({},Ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ew}),$ne=fr(Lne),Bne=h({},hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),qne=fr(Bne),zne=h({},Ag,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Vne=fr(zne),Fne=h({},hl,{newState:0,oldState:0}),Une=fr(Fne),Hne=[9,13,27,32],Aw=Ta&&"CompositionEvent"in window,Gd=null;Ta&&"documentMode"in document&&(Gd=document.documentMode);var Gne=Ta&&"TextEvent"in window&&!Gd,Vk=Ta&&(!Aw||Gd&&8<Gd&&11>=Gd),Fk=" ",Uk=!1;function Hk(s,c){switch(s){case"keyup":return Hne.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gk(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Qu=!1;function Wne(s,c){switch(s){case"compositionend":return Gk(c);case"keypress":return c.which!==32?null:(Uk=!0,Fk);case"textInput":return s=c.data,s===Fk&&Uk?null:s;default:return null}}function Kne(s,c){if(Qu)return s==="compositionend"||!Aw&&Hk(s,c)?(s=Lk(),wg=xw=Mo=null,Qu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return Vk&&c.locale!=="ko"?null:c.data;default:return null}}var Yne={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 Wk(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c==="input"?!!Yne[s.type]:c==="textarea"}function Kk(s,c,p,v){Xu?Zu?Zu.push(v):Zu=[v]:Xu=v,c=pv(c,"onChange"),0<c.length&&(p=new Eg("onChange","change",null,p,v),s.push({event:p,listeners:c}))}var Wd=null,Kd=null;function Xne(s){NL(s,0)}function Cg(s){var c=Oo(s);if(yg(c))return s}function Yk(s,c){if(s==="change")return c}var Xk=!1;if(Ta){var Cw;if(Ta){var Tw="oninput"in document;if(!Tw){var Zk=document.createElement("div");Zk.setAttribute("oninput","return;"),Tw=typeof Zk.oninput=="function"}Cw=Tw}else Cw=!1;Xk=Cw&&(!document.documentMode||9<document.documentMode)}function Qk(){Wd&&(Wd.detachEvent("onpropertychange",Jk),Kd=Wd=null)}function Jk(s){if(s.propertyName==="value"&&Cg(Kd)){var c=[];Kk(c,Kd,s,vw(s)),Ik(Xne,c)}}function Zne(s,c,p){s==="focusin"?(Qk(),Wd=c,Kd=p,Wd.attachEvent("onpropertychange",Jk)):s==="focusout"&&Qk()}function Qne(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Cg(Kd)}function Jne(s,c){if(s==="click")return Cg(c)}function ere(s,c){if(s==="input"||s==="change")return Cg(c)}function tre(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var Cr=typeof Object.is=="function"?Object.is:tre;function Yd(s,c){if(Cr(s,c))return!0;if(typeof s!="object"||s===null||typeof c!="object"||c===null)return!1;var p=Object.keys(s),v=Object.keys(c);if(p.length!==v.length)return!1;for(v=0;v<p.length;v++){var T=p[v];if(!nt.call(c,T)||!Cr(s[T],c[T]))return!1}return!0}function eD(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function tD(s,c){var p=eD(s);s=0;for(var v;p;){if(p.nodeType===3){if(v=s+p.textContent.length,s<=c&&v>=c)return{node:p,offset:c-s};s=v}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=eD(p)}}function nD(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?nD(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function rD(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var c=fl(s.document);c instanceof s.HTMLIFrameElement;){try{var p=typeof c.contentWindow.location.href=="string"}catch{p=!1}if(p)s=c.contentWindow;else break;c=fl(s.document)}return c}function Ow(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c&&(c==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||c==="textarea"||s.contentEditable==="true")}var nre=Ta&&"documentMode"in document&&11>=document.documentMode,Ju=null,jw=null,Xd=null,Nw=!1;function iD(s,c,p){var v=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Nw||Ju==null||Ju!==fl(v)||(v=Ju,"selectionStart"in v&&Ow(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),Xd&&Yd(Xd,v)||(Xd=v,v=pv(jw,"onSelect"),0<v.length&&(c=new Eg("onSelect","select",null,c,p),s.push({event:c,listeners:v}),c.target=Ju)))}function pl(s,c){var p={};return p[s.toLowerCase()]=c.toLowerCase(),p["Webkit"+s]="webkit"+c,p["Moz"+s]="moz"+c,p}var ec={animationend:pl("Animation","AnimationEnd"),animationiteration:pl("Animation","AnimationIteration"),animationstart:pl("Animation","AnimationStart"),transitionrun:pl("Transition","TransitionRun"),transitionstart:pl("Transition","TransitionStart"),transitioncancel:pl("Transition","TransitionCancel"),transitionend:pl("Transition","TransitionEnd")},Pw={},aD={};Ta&&(aD=document.createElement("div").style,"AnimationEvent"in window||(delete ec.animationend.animation,delete ec.animationiteration.animation,delete ec.animationstart.animation),"TransitionEvent"in window||delete ec.transitionend.transition);function ml(s){if(Pw[s])return Pw[s];if(!ec[s])return s;var c=ec[s],p;for(p in c)if(c.hasOwnProperty(p)&&p in aD)return Pw[s]=c[p];return s}var oD=ml("animationend"),sD=ml("animationiteration"),lD=ml("animationstart"),rre=ml("transitionrun"),ire=ml("transitionstart"),are=ml("transitioncancel"),uD=ml("transitionend"),cD=new Map,Mw="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(" ");Mw.push("scrollEnd");function bi(s,c){cD.set(s,c),Ea(c,[s])}var Tg=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Gr=[],tc=0,Rw=0;function Og(){for(var s=tc,c=Rw=tc=0;c<s;){var p=Gr[c];Gr[c++]=null;var v=Gr[c];Gr[c++]=null;var T=Gr[c];Gr[c++]=null;var N=Gr[c];if(Gr[c++]=null,v!==null&&T!==null){var B=v.pending;B===null?T.next=T:(T.next=B.next,B.next=T),v.pending=T}N!==0&&fD(p,T,N)}}function jg(s,c,p,v){Gr[tc++]=s,Gr[tc++]=c,Gr[tc++]=p,Gr[tc++]=v,Rw|=v,s.lanes|=v,s=s.alternate,s!==null&&(s.lanes|=v)}function kw(s,c,p,v){return jg(s,c,p,v),Ng(s)}function gl(s,c){return jg(s,null,null,c),Ng(s)}function fD(s,c,p){s.lanes|=p;var v=s.alternate;v!==null&&(v.lanes|=p);for(var T=!1,N=s.return;N!==null;)N.childLanes|=p,v=N.alternate,v!==null&&(v.childLanes|=p),N.tag===22&&(s=N.stateNode,s===null||s._visibility&1||(T=!0)),s=N,N=N.return;return s.tag===3?(N=s.stateNode,T&&c!==null&&(T=31-Zn(p),s=N.hiddenUpdates,v=s[T],v===null?s[T]=[c]:v.push(c),c.lane=p|536870912),N):null}function Ng(s){if(50<yh)throw yh=0,F1=null,Error(r(185));for(var c=s.return;c!==null;)s=c,c=s.return;return s.tag===3?s.stateNode:null}var nc={};function ore(s,c,p,v){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tr(s,c,p,v){return new ore(s,c,p,v)}function Dw(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Oa(s,c){var p=s.alternate;return p===null?(p=Tr(s.tag,c,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=c,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&65011712,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,c=s.dependencies,p.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p.refCleanup=s.refCleanup,p}function dD(s,c){s.flags&=65011714;var p=s.alternate;return p===null?(s.childLanes=0,s.lanes=c,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=p.childLanes,s.lanes=p.lanes,s.child=p.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=p.memoizedProps,s.memoizedState=p.memoizedState,s.updateQueue=p.updateQueue,s.type=p.type,c=p.dependencies,s.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),s}function Pg(s,c,p,v,T,N){var B=0;if(v=s,typeof s=="function")Dw(s)&&(B=1);else if(typeof s=="string")B=fie(s,p,K.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case R:return s=Tr(31,p,c,T),s.elementType=R,s.lanes=N,s;case w:return vl(p.children,T,N,c);case y:B=8,T|=24;break;case S:return s=Tr(12,p,c,T|2),s.elementType=S,s.lanes=N,s;case C:return s=Tr(13,p,c,T),s.elementType=C,s.lanes=N,s;case O:return s=Tr(19,p,c,T),s.elementType=O,s.lanes=N,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case _:B=10;break e;case E:B=9;break e;case A:B=11;break e;case P:B=14;break e;case M:B=16,v=null;break e}B=29,p=Error(r(130,s===null?"null":typeof s,"")),v=null}return c=Tr(B,p,c,T),c.elementType=s,c.type=v,c.lanes=N,c}function vl(s,c,p,v){return s=Tr(7,s,v,c),s.lanes=p,s}function Iw(s,c,p){return s=Tr(6,s,null,c),s.lanes=p,s}function hD(s){var c=Tr(18,null,null,0);return c.stateNode=s,c}function Lw(s,c,p){return c=Tr(4,s.children!==null?s.children:[],s.key,c),c.lanes=p,c.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},c}var pD=new WeakMap;function Wr(s,c){if(typeof s=="object"&&s!==null){var p=pD.get(s);return p!==void 0?p:(c={value:s,source:c,stack:tt(c)},pD.set(s,c),c)}return{value:s,source:c,stack:tt(c)}}var rc=[],ic=0,Mg=null,Zd=0,Kr=[],Yr=0,Ro=null,Ki=1,Yi="";function ja(s,c){rc[ic++]=Zd,rc[ic++]=Mg,Mg=s,Zd=c}function mD(s,c,p){Kr[Yr++]=Ki,Kr[Yr++]=Yi,Kr[Yr++]=Ro,Ro=s;var v=Ki;s=Yi;var T=32-Zn(v)-1;v&=~(1<<T),p+=1;var N=32-Zn(c)+T;if(30<N){var B=T-T%5;N=(v&(1<<B)-1).toString(32),v>>=B,T-=B,Ki=1<<32-Zn(c)+T|p<<T|v,Yi=N+s}else Ki=1<<N|p<<T|v,Yi=s}function $w(s){s.return!==null&&(ja(s,1),mD(s,1,0))}function Bw(s){for(;s===Mg;)Mg=rc[--ic],rc[ic]=null,Zd=rc[--ic],rc[ic]=null;for(;s===Ro;)Ro=Kr[--Yr],Kr[Yr]=null,Yi=Kr[--Yr],Kr[Yr]=null,Ki=Kr[--Yr],Kr[Yr]=null}function gD(s,c){Kr[Yr++]=Ki,Kr[Yr++]=Yi,Kr[Yr++]=Ro,Ki=c.id,Yi=c.overflow,Ro=s}var Rn=null,qt=null,st=!1,ko=null,Xr=!1,qw=Error(r(519));function Do(s){var c=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qd(Wr(c,s)),qw}function vD(s){var c=s.stateNode,p=s.type,v=s.memoizedProps;switch(c[xn]=s,c[Un]=v,p){case"dialog":Je("cancel",c),Je("close",c);break;case"iframe":case"object":case"embed":Je("load",c);break;case"video":case"audio":for(p=0;p<xh.length;p++)Je(xh[p],c);break;case"source":Je("error",c);break;case"img":case"image":case"link":Je("error",c),Je("load",c);break;case"details":Je("toggle",c);break;case"input":Je("invalid",c),bg(c,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":Je("invalid",c);break;case"textarea":Je("invalid",c),Mk(c,v.value,v.defaultValue,v.children)}p=v.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||c.textContent===""+p||v.suppressHydrationWarning===!0||kL(c.textContent,p)?(v.popover!=null&&(Je("beforetoggle",c),Je("toggle",c)),v.onScroll!=null&&Je("scroll",c),v.onScrollEnd!=null&&Je("scrollend",c),v.onClick!=null&&(c.onclick=Ca),c=!0):c=!1,c||Do(s,!0)}function yD(s){for(Rn=s.return;Rn;)switch(Rn.tag){case 5:case 31:case 13:Xr=!1;return;case 27:case 3:Xr=!0;return;default:Rn=Rn.return}}function ac(s){if(s!==Rn)return!1;if(!st)return yD(s),st=!0,!1;var c=s.tag,p;if((p=c!==3&&c!==27)&&((p=c===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||iS(s.type,s.memoizedProps)),p=!p),p&&qt&&Do(s),yD(s),c===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));qt=FL(s)}else if(c===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));qt=FL(s)}else c===27?(c=qt,Yo(s.type)?(s=uS,uS=null,qt=s):qt=c):qt=Rn?Qr(s.stateNode.nextSibling):null;return!0}function yl(){qt=Rn=null,st=!1}function zw(){var s=ko;return s!==null&&(mr===null?mr=s:mr.push.apply(mr,s),ko=null),s}function Qd(s){ko===null?ko=[s]:ko.push(s)}var Vw=U(null),bl=null,Na=null;function Io(s,c,p){X(Vw,c._currentValue),c._currentValue=p}function Pa(s){s._currentValue=Vw.current,F(Vw)}function Fw(s,c,p){for(;s!==null;){var v=s.alternate;if((s.childLanes&c)!==c?(s.childLanes|=c,v!==null&&(v.childLanes|=c)):v!==null&&(v.childLanes&c)!==c&&(v.childLanes|=c),s===p)break;s=s.return}}function Uw(s,c,p,v){var T=s.child;for(T!==null&&(T.return=s);T!==null;){var N=T.dependencies;if(N!==null){var B=T.child;N=N.firstContext;e:for(;N!==null;){var W=N;N=T;for(var ee=0;ee<c.length;ee++)if(W.context===c[ee]){N.lanes|=p,W=N.alternate,W!==null&&(W.lanes|=p),Fw(N.return,p,s),v||(B=null);break e}N=W.next}}else if(T.tag===18){if(B=T.return,B===null)throw Error(r(341));B.lanes|=p,N=B.alternate,N!==null&&(N.lanes|=p),Fw(B,p,s),B=null}else B=T.child;if(B!==null)B.return=T;else for(B=T;B!==null;){if(B===s){B=null;break}if(T=B.sibling,T!==null){T.return=B.return,B=T;break}B=B.return}T=B}}function oc(s,c,p,v){s=null;for(var T=c,N=!1;T!==null;){if(!N){if((T.flags&524288)!==0)N=!0;else if((T.flags&262144)!==0)break}if(T.tag===10){var B=T.alternate;if(B===null)throw Error(r(387));if(B=B.memoizedProps,B!==null){var W=T.type;Cr(T.pendingProps.value,B.value)||(s!==null?s.push(W):s=[W])}}else if(T===J.current){if(B=T.alternate,B===null)throw Error(r(387));B.memoizedState.memoizedState!==T.memoizedState.memoizedState&&(s!==null?s.push(Ah):s=[Ah])}T=T.return}s!==null&&Uw(c,s,p,v),c.flags|=262144}function Rg(s){for(s=s.firstContext;s!==null;){if(!Cr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function xl(s){bl=s,Na=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function kn(s){return bD(bl,s)}function kg(s,c){return bl===null&&xl(s),bD(s,c)}function bD(s,c){var p=c._currentValue;if(c={context:c,memoizedValue:p,next:null},Na===null){if(s===null)throw Error(r(308));Na=c,s.dependencies={lanes:0,firstContext:c},s.flags|=524288}else Na=Na.next=c;return p}var sre=typeof AbortController<"u"?AbortController:function(){var s=[],c=this.signal={aborted:!1,addEventListener:function(p,v){s.push(v)}};this.abort=function(){c.aborted=!0,s.forEach(function(p){return p()})}},lre=e.unstable_scheduleCallback,ure=e.unstable_NormalPriority,cn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hw(){return{controller:new sre,data:new Map,refCount:0}}function Jd(s){s.refCount--,s.refCount===0&&lre(ure,function(){s.controller.abort()})}var eh=null,Gw=0,sc=0,lc=null;function cre(s,c){if(eh===null){var p=eh=[];Gw=0,sc=Y1(),lc={status:"pending",value:void 0,then:function(v){p.push(v)}}}return Gw++,c.then(xD,xD),c}function xD(){if(--Gw===0&&eh!==null){lc!==null&&(lc.status="fulfilled");var s=eh;eh=null,sc=0,lc=null;for(var c=0;c<s.length;c++)(0,s[c])()}}function fre(s,c){var p=[],v={status:"pending",value:null,reason:null,then:function(T){p.push(T)}};return s.then(function(){v.status="fulfilled",v.value=c;for(var T=0;T<p.length;T++)(0,p[T])(c)},function(T){for(v.status="rejected",v.reason=T,T=0;T<p.length;T++)(0,p[T])(void 0)}),v}var wD=L.S;L.S=function(s,c){iL=At(),typeof c=="object"&&c!==null&&typeof c.then=="function"&&cre(s,c),wD!==null&&wD(s,c)};var wl=U(null);function Ww(){var s=wl.current;return s!==null?s:Mt.pooledCache}function Dg(s,c){c===null?X(wl,wl.current):X(wl,c.pool)}function SD(){var s=Ww();return s===null?null:{parent:cn._currentValue,pool:s}}var uc=Error(r(460)),Kw=Error(r(474)),Ig=Error(r(542)),Lg={then:function(){}};function _D(s){return s=s.status,s==="fulfilled"||s==="rejected"}function ED(s,c,p){switch(p=s[p],p===void 0?s.push(c):p!==c&&(c.then(Ca,Ca),c=p),c.status){case"fulfilled":return c.value;case"rejected":throw s=c.reason,CD(s),s;default:if(typeof c.status=="string")c.then(Ca,Ca);else{if(s=Mt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=c,s.status="pending",s.then(function(v){if(c.status==="pending"){var T=c;T.status="fulfilled",T.value=v}},function(v){if(c.status==="pending"){var T=c;T.status="rejected",T.reason=v}})}switch(c.status){case"fulfilled":return c.value;case"rejected":throw s=c.reason,CD(s),s}throw _l=c,uc}}function Sl(s){try{var c=s._init;return c(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(_l=p,uc):p}}var _l=null;function AD(){if(_l===null)throw Error(r(459));var s=_l;return _l=null,s}function CD(s){if(s===uc||s===Ig)throw Error(r(483))}var cc=null,th=0;function $g(s){var c=th;return th+=1,cc===null&&(cc=[]),ED(cc,s,c)}function nh(s,c){c=c.props.ref,s.ref=c!==void 0?c:null}function Bg(s,c){throw c.$$typeof===m?Error(r(525)):(s=Object.prototype.toString.call(c),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":s)))}function TD(s){function c(se,ae){if(s){var le=se.deletions;le===null?(se.deletions=[ae],se.flags|=16):le.push(ae)}}function p(se,ae){if(!s)return null;for(;ae!==null;)c(se,ae),ae=ae.sibling;return null}function v(se){for(var ae=new Map;se!==null;)se.key!==null?ae.set(se.key,se):ae.set(se.index,se),se=se.sibling;return ae}function T(se,ae){return se=Oa(se,ae),se.index=0,se.sibling=null,se}function N(se,ae,le){return se.index=le,s?(le=se.alternate,le!==null?(le=le.index,le<ae?(se.flags|=67108866,ae):le):(se.flags|=67108866,ae)):(se.flags|=1048576,ae)}function B(se){return s&&se.alternate===null&&(se.flags|=67108866),se}function W(se,ae,le,ge){return ae===null||ae.tag!==6?(ae=Iw(le,se.mode,ge),ae.return=se,ae):(ae=T(ae,le),ae.return=se,ae)}function ee(se,ae,le,ge){var Le=le.type;return Le===w?pe(se,ae,le.props.children,ge,le.key):ae!==null&&(ae.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===M&&Sl(Le)===ae.type)?(ae=T(ae,le.props),nh(ae,le),ae.return=se,ae):(ae=Pg(le.type,le.key,le.props,null,se.mode,ge),nh(ae,le),ae.return=se,ae)}function ue(se,ae,le,ge){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==le.containerInfo||ae.stateNode.implementation!==le.implementation?(ae=Lw(le,se.mode,ge),ae.return=se,ae):(ae=T(ae,le.children||[]),ae.return=se,ae)}function pe(se,ae,le,ge,Le){return ae===null||ae.tag!==7?(ae=vl(le,se.mode,ge,Le),ae.return=se,ae):(ae=T(ae,le),ae.return=se,ae)}function ve(se,ae,le){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=Iw(""+ae,se.mode,le),ae.return=se,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case g:return le=Pg(ae.type,ae.key,ae.props,null,se.mode,le),nh(le,ae),le.return=se,le;case x:return ae=Lw(ae,se.mode,le),ae.return=se,ae;case M:return ae=Sl(ae),ve(se,ae,le)}if(q(ae)||k(ae))return ae=vl(ae,se.mode,le,null),ae.return=se,ae;if(typeof ae.then=="function")return ve(se,$g(ae),le);if(ae.$$typeof===_)return ve(se,kg(se,ae),le);Bg(se,ae)}return null}function ce(se,ae,le,ge){var Le=ae!==null?ae.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Le!==null?null:W(se,ae,""+le,ge);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case g:return le.key===Le?ee(se,ae,le,ge):null;case x:return le.key===Le?ue(se,ae,le,ge):null;case M:return le=Sl(le),ce(se,ae,le,ge)}if(q(le)||k(le))return Le!==null?null:pe(se,ae,le,ge,null);if(typeof le.then=="function")return ce(se,ae,$g(le),ge);if(le.$$typeof===_)return ce(se,ae,kg(se,le),ge);Bg(se,le)}return null}function de(se,ae,le,ge,Le){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return se=se.get(le)||null,W(ae,se,""+ge,Le);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case g:return se=se.get(ge.key===null?le:ge.key)||null,ee(ae,se,ge,Le);case x:return se=se.get(ge.key===null?le:ge.key)||null,ue(ae,se,ge,Le);case M:return ge=Sl(ge),de(se,ae,le,ge,Le)}if(q(ge)||k(ge))return se=se.get(le)||null,pe(ae,se,ge,Le,null);if(typeof ge.then=="function")return de(se,ae,le,$g(ge),Le);if(ge.$$typeof===_)return de(se,ae,le,kg(ae,ge),Le);Bg(ae,ge)}return null}function je(se,ae,le,ge){for(var Le=null,ht=null,Me=ae,We=ae=0,it=null;Me!==null&&We<le.length;We++){Me.index>We?(it=Me,Me=null):it=Me.sibling;var pt=ce(se,Me,le[We],ge);if(pt===null){Me===null&&(Me=it);break}s&&Me&&pt.alternate===null&&c(se,Me),ae=N(pt,ae,We),ht===null?Le=pt:ht.sibling=pt,ht=pt,Me=it}if(We===le.length)return p(se,Me),st&&ja(se,We),Le;if(Me===null){for(;We<le.length;We++)Me=ve(se,le[We],ge),Me!==null&&(ae=N(Me,ae,We),ht===null?Le=Me:ht.sibling=Me,ht=Me);return st&&ja(se,We),Le}for(Me=v(Me);We<le.length;We++)it=de(Me,se,We,le[We],ge),it!==null&&(s&&it.alternate!==null&&Me.delete(it.key===null?We:it.key),ae=N(it,ae,We),ht===null?Le=it:ht.sibling=it,ht=it);return s&&Me.forEach(function(es){return c(se,es)}),st&&ja(se,We),Le}function $e(se,ae,le,ge){if(le==null)throw Error(r(151));for(var Le=null,ht=null,Me=ae,We=ae=0,it=null,pt=le.next();Me!==null&&!pt.done;We++,pt=le.next()){Me.index>We?(it=Me,Me=null):it=Me.sibling;var es=ce(se,Me,pt.value,ge);if(es===null){Me===null&&(Me=it);break}s&&Me&&es.alternate===null&&c(se,Me),ae=N(es,ae,We),ht===null?Le=es:ht.sibling=es,ht=es,Me=it}if(pt.done)return p(se,Me),st&&ja(se,We),Le;if(Me===null){for(;!pt.done;We++,pt=le.next())pt=ve(se,pt.value,ge),pt!==null&&(ae=N(pt,ae,We),ht===null?Le=pt:ht.sibling=pt,ht=pt);return st&&ja(se,We),Le}for(Me=v(Me);!pt.done;We++,pt=le.next())pt=de(Me,se,We,pt.value,ge),pt!==null&&(s&&pt.alternate!==null&&Me.delete(pt.key===null?We:pt.key),ae=N(pt,ae,We),ht===null?Le=pt:ht.sibling=pt,ht=pt);return s&&Me.forEach(function(Sie){return c(se,Sie)}),st&&ja(se,We),Le}function Ot(se,ae,le,ge){if(typeof le=="object"&&le!==null&&le.type===w&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case g:e:{for(var Le=le.key;ae!==null;){if(ae.key===Le){if(Le=le.type,Le===w){if(ae.tag===7){p(se,ae.sibling),ge=T(ae,le.props.children),ge.return=se,se=ge;break e}}else if(ae.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===M&&Sl(Le)===ae.type){p(se,ae.sibling),ge=T(ae,le.props),nh(ge,le),ge.return=se,se=ge;break e}p(se,ae);break}else c(se,ae);ae=ae.sibling}le.type===w?(ge=vl(le.props.children,se.mode,ge,le.key),ge.return=se,se=ge):(ge=Pg(le.type,le.key,le.props,null,se.mode,ge),nh(ge,le),ge.return=se,se=ge)}return B(se);case x:e:{for(Le=le.key;ae!==null;){if(ae.key===Le)if(ae.tag===4&&ae.stateNode.containerInfo===le.containerInfo&&ae.stateNode.implementation===le.implementation){p(se,ae.sibling),ge=T(ae,le.children||[]),ge.return=se,se=ge;break e}else{p(se,ae);break}else c(se,ae);ae=ae.sibling}ge=Lw(le,se.mode,ge),ge.return=se,se=ge}return B(se);case M:return le=Sl(le),Ot(se,ae,le,ge)}if(q(le))return je(se,ae,le,ge);if(k(le)){if(Le=k(le),typeof Le!="function")throw Error(r(150));return le=Le.call(le),$e(se,ae,le,ge)}if(typeof le.then=="function")return Ot(se,ae,$g(le),ge);if(le.$$typeof===_)return Ot(se,ae,kg(se,le),ge);Bg(se,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,ae!==null&&ae.tag===6?(p(se,ae.sibling),ge=T(ae,le),ge.return=se,se=ge):(p(se,ae),ge=Iw(le,se.mode,ge),ge.return=se,se=ge),B(se)):p(se,ae)}return function(se,ae,le,ge){try{th=0;var Le=Ot(se,ae,le,ge);return cc=null,Le}catch(Me){if(Me===uc||Me===Ig)throw Me;var ht=Tr(29,Me,null,se.mode);return ht.lanes=ge,ht.return=se,ht}finally{}}}var El=TD(!0),OD=TD(!1),Lo=!1;function Yw(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xw(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function $o(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Bo(s,c,p){var v=s.updateQueue;if(v===null)return null;if(v=v.shared,(vt&2)!==0){var T=v.pending;return T===null?c.next=c:(c.next=T.next,T.next=c),v.pending=c,c=Ng(s),fD(s,null,p),c}return jg(s,v,c,p),Ng(s)}function rh(s,c,p){if(c=c.updateQueue,c!==null&&(c=c.shared,(p&4194048)!==0)){var v=c.lanes;v&=s.pendingLanes,p|=v,c.lanes=p,lg(s,p)}}function Zw(s,c){var p=s.updateQueue,v=s.alternate;if(v!==null&&(v=v.updateQueue,p===v)){var T=null,N=null;if(p=p.firstBaseUpdate,p!==null){do{var B={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};N===null?T=N=B:N=N.next=B,p=p.next}while(p!==null);N===null?T=N=c:N=N.next=c}else T=N=c;p={baseState:v.baseState,firstBaseUpdate:T,lastBaseUpdate:N,shared:v.shared,callbacks:v.callbacks},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=c:s.next=c,p.lastBaseUpdate=c}var Qw=!1;function ih(){if(Qw){var s=lc;if(s!==null)throw s}}function ah(s,c,p,v){Qw=!1;var T=s.updateQueue;Lo=!1;var N=T.firstBaseUpdate,B=T.lastBaseUpdate,W=T.shared.pending;if(W!==null){T.shared.pending=null;var ee=W,ue=ee.next;ee.next=null,B===null?N=ue:B.next=ue,B=ee;var pe=s.alternate;pe!==null&&(pe=pe.updateQueue,W=pe.lastBaseUpdate,W!==B&&(W===null?pe.firstBaseUpdate=ue:W.next=ue,pe.lastBaseUpdate=ee))}if(N!==null){var ve=T.baseState;B=0,pe=ue=ee=null,W=N;do{var ce=W.lane&-536870913,de=ce!==W.lane;if(de?(rt&ce)===ce:(v&ce)===ce){ce!==0&&ce===sc&&(Qw=!0),pe!==null&&(pe=pe.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});e:{var je=s,$e=W;ce=c;var Ot=p;switch($e.tag){case 1:if(je=$e.payload,typeof je=="function"){ve=je.call(Ot,ve,ce);break e}ve=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=$e.payload,ce=typeof je=="function"?je.call(Ot,ve,ce):je,ce==null)break e;ve=h({},ve,ce);break e;case 2:Lo=!0}}ce=W.callback,ce!==null&&(s.flags|=64,de&&(s.flags|=8192),de=T.callbacks,de===null?T.callbacks=[ce]:de.push(ce))}else de={lane:ce,tag:W.tag,payload:W.payload,callback:W.callback,next:null},pe===null?(ue=pe=de,ee=ve):pe=pe.next=de,B|=ce;if(W=W.next,W===null){if(W=T.shared.pending,W===null)break;de=W,W=de.next,de.next=null,T.lastBaseUpdate=de,T.shared.pending=null}}while(!0);pe===null&&(ee=ve),T.baseState=ee,T.firstBaseUpdate=ue,T.lastBaseUpdate=pe,N===null&&(T.shared.lanes=0),Uo|=B,s.lanes=B,s.memoizedState=ve}}function jD(s,c){if(typeof s!="function")throw Error(r(191,s));s.call(c)}function ND(s,c){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)jD(p[s],c)}var fc=U(null),qg=U(0);function PD(s,c){s=qa,X(qg,s),X(fc,c),qa=s|c.baseLanes}function Jw(){X(qg,qa),X(fc,fc.current)}function e1(){qa=qg.current,F(fc),F(qg)}var Or=U(null),Zr=null;function qo(s){var c=s.alternate;X(sn,sn.current&1),X(Or,s),Zr===null&&(c===null||fc.current!==null||c.memoizedState!==null)&&(Zr=s)}function t1(s){X(sn,sn.current),X(Or,s),Zr===null&&(Zr=s)}function MD(s){s.tag===22?(X(sn,sn.current),X(Or,s),Zr===null&&(Zr=s)):zo()}function zo(){X(sn,sn.current),X(Or,Or.current)}function jr(s){F(Or),Zr===s&&(Zr=null),F(sn)}var sn=U(0);function zg(s){for(var c=s;c!==null;){if(c.tag===13){var p=c.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||sS(p)||lS(p)))return c}else if(c.tag===19&&(c.memoizedProps.revealOrder==="forwards"||c.memoizedProps.revealOrder==="backwards"||c.memoizedProps.revealOrder==="unstable_legacy-backwards"||c.memoizedProps.revealOrder==="together")){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Ma=0,Ue=null,Ct=null,fn=null,Vg=!1,dc=!1,Al=!1,Fg=0,oh=0,hc=null,dre=0;function en(){throw Error(r(321))}function n1(s,c){if(c===null)return!1;for(var p=0;p<c.length&&p<s.length;p++)if(!Cr(s[p],c[p]))return!1;return!0}function r1(s,c,p,v,T,N){return Ma=N,Ue=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,L.H=s===null||s.memoizedState===null?mI:y1,Al=!1,N=p(v,T),Al=!1,dc&&(N=kD(c,p,v,T)),RD(s),N}function RD(s){L.H=uh;var c=Ct!==null&&Ct.next!==null;if(Ma=0,fn=Ct=Ue=null,Vg=!1,oh=0,hc=null,c)throw Error(r(300));s===null||dn||(s=s.dependencies,s!==null&&Rg(s)&&(dn=!0))}function kD(s,c,p,v){Ue=s;var T=0;do{if(dc&&(hc=null),oh=0,dc=!1,25<=T)throw Error(r(301));if(T+=1,fn=Ct=null,s.updateQueue!=null){var N=s.updateQueue;N.lastEffect=null,N.events=null,N.stores=null,N.memoCache!=null&&(N.memoCache.index=0)}L.H=gI,N=c(p,v)}while(dc);return N}function hre(){var s=L.H,c=s.useState()[0];return c=typeof c.then=="function"?sh(c):c,s=s.useState()[0],(Ct!==null?Ct.memoizedState:null)!==s&&(Ue.flags|=1024),c}function i1(){var s=Fg!==0;return Fg=0,s}function a1(s,c,p){c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~p}function o1(s){if(Vg){for(s=s.memoizedState;s!==null;){var c=s.queue;c!==null&&(c.pending=null),s=s.next}Vg=!1}Ma=0,fn=Ct=Ue=null,dc=!1,oh=Fg=0,hc=null}function Qn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fn===null?Ue.memoizedState=fn=s:fn=fn.next=s,fn}function ln(){if(Ct===null){var s=Ue.alternate;s=s!==null?s.memoizedState:null}else s=Ct.next;var c=fn===null?Ue.memoizedState:fn.next;if(c!==null)fn=c,Ct=s;else{if(s===null)throw Ue.alternate===null?Error(r(467)):Error(r(310));Ct=s,s={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},fn===null?Ue.memoizedState=fn=s:fn=fn.next=s}return fn}function Ug(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sh(s){var c=oh;return oh+=1,hc===null&&(hc=[]),s=ED(hc,s,c),c=Ue,(fn===null?c.memoizedState:fn.next)===null&&(c=c.alternate,L.H=c===null||c.memoizedState===null?mI:y1),s}function Hg(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return sh(s);if(s.$$typeof===_)return kn(s)}throw Error(r(438,String(s)))}function s1(s){var c=null,p=Ue.updateQueue;if(p!==null&&(c=p.memoCache),c==null){var v=Ue.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(c={data:v.data.map(function(T){return T.slice()}),index:0})))}if(c==null&&(c={data:[],index:0}),p===null&&(p=Ug(),Ue.updateQueue=p),p.memoCache=c,p=c.data[c.index],p===void 0)for(p=c.data[c.index]=Array(s),v=0;v<s;v++)p[v]=$;return c.index++,p}function Ra(s,c){return typeof c=="function"?c(s):c}function Gg(s){var c=ln();return l1(c,Ct,s)}function l1(s,c,p){var v=s.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=p;var T=s.baseQueue,N=v.pending;if(N!==null){if(T!==null){var B=T.next;T.next=N.next,N.next=B}c.baseQueue=T=N,v.pending=null}if(N=s.baseState,T===null)s.memoizedState=N;else{c=T.next;var W=B=null,ee=null,ue=c,pe=!1;do{var ve=ue.lane&-536870913;if(ve!==ue.lane?(rt&ve)===ve:(Ma&ve)===ve){var ce=ue.revertLane;if(ce===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),ve===sc&&(pe=!0);else if((Ma&ce)===ce){ue=ue.next,ce===sc&&(pe=!0);continue}else ve={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},ee===null?(W=ee=ve,B=N):ee=ee.next=ve,Ue.lanes|=ce,Uo|=ce;ve=ue.action,Al&&p(N,ve),N=ue.hasEagerState?ue.eagerState:p(N,ve)}else ce={lane:ve,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},ee===null?(W=ee=ce,B=N):ee=ee.next=ce,Ue.lanes|=ve,Uo|=ve;ue=ue.next}while(ue!==null&&ue!==c);if(ee===null?B=N:ee.next=W,!Cr(N,s.memoizedState)&&(dn=!0,pe&&(p=lc,p!==null)))throw p;s.memoizedState=N,s.baseState=B,s.baseQueue=ee,v.lastRenderedState=N}return T===null&&(v.lanes=0),[s.memoizedState,v.dispatch]}function u1(s){var c=ln(),p=c.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=s;var v=p.dispatch,T=p.pending,N=c.memoizedState;if(T!==null){p.pending=null;var B=T=T.next;do N=s(N,B.action),B=B.next;while(B!==T);Cr(N,c.memoizedState)||(dn=!0),c.memoizedState=N,c.baseQueue===null&&(c.baseState=N),p.lastRenderedState=N}return[N,v]}function DD(s,c,p){var v=Ue,T=ln(),N=st;if(N){if(p===void 0)throw Error(r(407));p=p()}else p=c();var B=!Cr((Ct||T).memoizedState,p);if(B&&(T.memoizedState=p,dn=!0),T=T.queue,d1($D.bind(null,v,T,s),[s]),T.getSnapshot!==c||B||fn!==null&&fn.memoizedState.tag&1){if(v.flags|=2048,pc(9,{destroy:void 0},LD.bind(null,v,T,p,c),null),Mt===null)throw Error(r(349));N||(Ma&127)!==0||ID(v,c,p)}return p}function ID(s,c,p){s.flags|=16384,s={getSnapshot:c,value:p},c=Ue.updateQueue,c===null?(c=Ug(),Ue.updateQueue=c,c.stores=[s]):(p=c.stores,p===null?c.stores=[s]:p.push(s))}function LD(s,c,p,v){c.value=p,c.getSnapshot=v,BD(c)&&qD(s)}function $D(s,c,p){return p(function(){BD(c)&&qD(s)})}function BD(s){var c=s.getSnapshot;s=s.value;try{var p=c();return!Cr(s,p)}catch{return!0}}function qD(s){var c=gl(s,2);c!==null&&gr(c,s,2)}function c1(s){var c=Qn();if(typeof s=="function"){var p=s;if(s=p(),Al){Gi(!0);try{p()}finally{Gi(!1)}}}return c.memoizedState=c.baseState=s,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:s},c}function zD(s,c,p,v){return s.baseState=p,l1(s,Ct,typeof v=="function"?v:Ra)}function pre(s,c,p,v,T){if(Yg(s))throw Error(r(485));if(s=c.action,s!==null){var N={payload:T,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){N.listeners.push(B)}};L.T!==null?p(!0):N.isTransition=!1,v(N),p=c.pending,p===null?(N.next=c.pending=N,VD(c,N)):(N.next=p.next,c.pending=p.next=N)}}function VD(s,c){var p=c.action,v=c.payload,T=s.state;if(c.isTransition){var N=L.T,B={};L.T=B;try{var W=p(T,v),ee=L.S;ee!==null&&ee(B,W),FD(s,c,W)}catch(ue){f1(s,c,ue)}finally{N!==null&&B.types!==null&&(N.types=B.types),L.T=N}}else try{N=p(T,v),FD(s,c,N)}catch(ue){f1(s,c,ue)}}function FD(s,c,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(v){UD(s,c,v)},function(v){return f1(s,c,v)}):UD(s,c,p)}function UD(s,c,p){c.status="fulfilled",c.value=p,HD(c),s.state=p,c=s.pending,c!==null&&(p=c.next,p===c?s.pending=null:(p=p.next,c.next=p,VD(s,p)))}function f1(s,c,p){var v=s.pending;if(s.pending=null,v!==null){v=v.next;do c.status="rejected",c.reason=p,HD(c),c=c.next;while(c!==v)}s.action=null}function HD(s){s=s.listeners;for(var c=0;c<s.length;c++)(0,s[c])()}function GD(s,c){return c}function WD(s,c){if(st){var p=Mt.formState;if(p!==null){e:{var v=Ue;if(st){if(qt){t:{for(var T=qt,N=Xr;T.nodeType!==8;){if(!N){T=null;break t}if(T=Qr(T.nextSibling),T===null){T=null;break t}}N=T.data,T=N==="F!"||N==="F"?T:null}if(T){qt=Qr(T.nextSibling),v=T.data==="F!";break e}}Do(v)}v=!1}v&&(c=p[0])}}return p=Qn(),p.memoizedState=p.baseState=c,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:GD,lastRenderedState:c},p.queue=v,p=dI.bind(null,Ue,v),v.dispatch=p,v=c1(!1),N=v1.bind(null,Ue,!1,v.queue),v=Qn(),T={state:c,dispatch:null,action:s,pending:null},v.queue=T,p=pre.bind(null,Ue,T,N,p),T.dispatch=p,v.memoizedState=s,[c,p,!1]}function KD(s){var c=ln();return YD(c,Ct,s)}function YD(s,c,p){if(c=l1(s,c,GD)[0],s=Gg(Ra)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var v=sh(c)}catch(B){throw B===uc?Ig:B}else v=c;c=ln();var T=c.queue,N=T.dispatch;return p!==c.memoizedState&&(Ue.flags|=2048,pc(9,{destroy:void 0},mre.bind(null,T,p),null)),[v,N,s]}function mre(s,c){s.action=c}function XD(s){var c=ln(),p=Ct;if(p!==null)return YD(c,p,s);ln(),c=c.memoizedState,p=ln();var v=p.queue.dispatch;return p.memoizedState=s,[c,v,!1]}function pc(s,c,p,v){return s={tag:s,create:p,deps:v,inst:c,next:null},c=Ue.updateQueue,c===null&&(c=Ug(),Ue.updateQueue=c),p=c.lastEffect,p===null?c.lastEffect=s.next=s:(v=p.next,p.next=s,s.next=v,c.lastEffect=s),s}function ZD(){return ln().memoizedState}function Wg(s,c,p,v){var T=Qn();Ue.flags|=s,T.memoizedState=pc(1|c,{destroy:void 0},p,v===void 0?null:v)}function Kg(s,c,p,v){var T=ln();v=v===void 0?null:v;var N=T.memoizedState.inst;Ct!==null&&v!==null&&n1(v,Ct.memoizedState.deps)?T.memoizedState=pc(c,N,p,v):(Ue.flags|=s,T.memoizedState=pc(1|c,N,p,v))}function QD(s,c){Wg(8390656,8,s,c)}function d1(s,c){Kg(2048,8,s,c)}function gre(s){Ue.flags|=4;var c=Ue.updateQueue;if(c===null)c=Ug(),Ue.updateQueue=c,c.events=[s];else{var p=c.events;p===null?c.events=[s]:p.push(s)}}function JD(s){var c=ln().memoizedState;return gre({ref:c,nextImpl:s}),function(){if((vt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}function eI(s,c){return Kg(4,2,s,c)}function tI(s,c){return Kg(4,4,s,c)}function nI(s,c){if(typeof c=="function"){s=s();var p=c(s);return function(){typeof p=="function"?p():c(null)}}if(c!=null)return s=s(),c.current=s,function(){c.current=null}}function rI(s,c,p){p=p!=null?p.concat([s]):null,Kg(4,4,nI.bind(null,c,s),p)}function h1(){}function iI(s,c){var p=ln();c=c===void 0?null:c;var v=p.memoizedState;return c!==null&&n1(c,v[1])?v[0]:(p.memoizedState=[s,c],s)}function aI(s,c){var p=ln();c=c===void 0?null:c;var v=p.memoizedState;if(c!==null&&n1(c,v[1]))return v[0];if(v=s(),Al){Gi(!0);try{s()}finally{Gi(!1)}}return p.memoizedState=[v,c],v}function p1(s,c,p){return p===void 0||(Ma&1073741824)!==0&&(rt&261930)===0?s.memoizedState=c:(s.memoizedState=p,s=oL(),Ue.lanes|=s,Uo|=s,p)}function oI(s,c,p,v){return Cr(p,c)?p:fc.current!==null?(s=p1(s,p,v),Cr(s,c)||(dn=!0),s):(Ma&42)===0||(Ma&1073741824)!==0&&(rt&261930)===0?(dn=!0,s.memoizedState=p):(s=oL(),Ue.lanes|=s,Uo|=s,c)}function sI(s,c,p,v,T){var N=z.p;z.p=N!==0&&8>N?N:8;var B=L.T,W={};L.T=W,v1(s,!1,c,p);try{var ee=T(),ue=L.S;if(ue!==null&&ue(W,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var pe=fre(ee,v);lh(s,c,pe,Mr(s))}else lh(s,c,v,Mr(s))}catch(ve){lh(s,c,{then:function(){},status:"rejected",reason:ve},Mr())}finally{z.p=N,B!==null&&W.types!==null&&(B.types=W.types),L.T=B}}function vre(){}function m1(s,c,p,v){if(s.tag!==5)throw Error(r(476));var T=lI(s).queue;sI(s,T,c,H,p===null?vre:function(){return uI(s),p(v)})}function lI(s){var c=s.memoizedState;if(c!==null)return c;c={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:H},next:null};var p={};return c.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:p},next:null},s.memoizedState=c,s=s.alternate,s!==null&&(s.memoizedState=c),c}function uI(s){var c=lI(s);c.next===null&&(c=s.alternate.memoizedState),lh(s,c.next.queue,{},Mr())}function g1(){return kn(Ah)}function cI(){return ln().memoizedState}function fI(){return ln().memoizedState}function yre(s){for(var c=s.return;c!==null;){switch(c.tag){case 24:case 3:var p=Mr();s=$o(p);var v=Bo(c,s,p);v!==null&&(gr(v,c,p),rh(v,c,p)),c={cache:Hw()},s.payload=c;return}c=c.return}}function bre(s,c,p){var v=Mr();p={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Yg(s)?hI(c,p):(p=kw(s,c,p,v),p!==null&&(gr(p,s,v),pI(p,c,v)))}function dI(s,c,p){var v=Mr();lh(s,c,p,v)}function lh(s,c,p,v){var T={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Yg(s))hI(c,T);else{var N=s.alternate;if(s.lanes===0&&(N===null||N.lanes===0)&&(N=c.lastRenderedReducer,N!==null))try{var B=c.lastRenderedState,W=N(B,p);if(T.hasEagerState=!0,T.eagerState=W,Cr(W,B))return jg(s,c,T,0),Mt===null&&Og(),!1}catch{}finally{}if(p=kw(s,c,T,v),p!==null)return gr(p,s,v),pI(p,c,v),!0}return!1}function v1(s,c,p,v){if(v={lane:2,revertLane:Y1(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},Yg(s)){if(c)throw Error(r(479))}else c=kw(s,p,v,2),c!==null&&gr(c,s,2)}function Yg(s){var c=s.alternate;return s===Ue||c!==null&&c===Ue}function hI(s,c){dc=Vg=!0;var p=s.pending;p===null?c.next=c:(c.next=p.next,p.next=c),s.pending=c}function pI(s,c,p){if((p&4194048)!==0){var v=c.lanes;v&=s.pendingLanes,p|=v,c.lanes=p,lg(s,p)}}var uh={readContext:kn,use:Hg,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useLayoutEffect:en,useInsertionEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useSyncExternalStore:en,useId:en,useHostTransitionStatus:en,useFormState:en,useActionState:en,useOptimistic:en,useMemoCache:en,useCacheRefresh:en};uh.useEffectEvent=en;var mI={readContext:kn,use:Hg,useCallback:function(s,c){return Qn().memoizedState=[s,c===void 0?null:c],s},useContext:kn,useEffect:QD,useImperativeHandle:function(s,c,p){p=p!=null?p.concat([s]):null,Wg(4194308,4,nI.bind(null,c,s),p)},useLayoutEffect:function(s,c){return Wg(4194308,4,s,c)},useInsertionEffect:function(s,c){Wg(4,2,s,c)},useMemo:function(s,c){var p=Qn();c=c===void 0?null:c;var v=s();if(Al){Gi(!0);try{s()}finally{Gi(!1)}}return p.memoizedState=[v,c],v},useReducer:function(s,c,p){var v=Qn();if(p!==void 0){var T=p(c);if(Al){Gi(!0);try{p(c)}finally{Gi(!1)}}}else T=c;return v.memoizedState=v.baseState=T,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:T},v.queue=s,s=s.dispatch=bre.bind(null,Ue,s),[v.memoizedState,s]},useRef:function(s){var c=Qn();return s={current:s},c.memoizedState=s},useState:function(s){s=c1(s);var c=s.queue,p=dI.bind(null,Ue,c);return c.dispatch=p,[s.memoizedState,p]},useDebugValue:h1,useDeferredValue:function(s,c){var p=Qn();return p1(p,s,c)},useTransition:function(){var s=c1(!1);return s=sI.bind(null,Ue,s.queue,!0,!1),Qn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,c,p){var v=Ue,T=Qn();if(st){if(p===void 0)throw Error(r(407));p=p()}else{if(p=c(),Mt===null)throw Error(r(349));(rt&127)!==0||ID(v,c,p)}T.memoizedState=p;var N={value:p,getSnapshot:c};return T.queue=N,QD($D.bind(null,v,N,s),[s]),v.flags|=2048,pc(9,{destroy:void 0},LD.bind(null,v,N,p,c),null),p},useId:function(){var s=Qn(),c=Mt.identifierPrefix;if(st){var p=Yi,v=Ki;p=(v&~(1<<32-Zn(v)-1)).toString(32)+p,c="_"+c+"R_"+p,p=Fg++,0<p&&(c+="H"+p.toString(32)),c+="_"}else p=dre++,c="_"+c+"r_"+p.toString(32)+"_";return s.memoizedState=c},useHostTransitionStatus:g1,useFormState:WD,useActionState:WD,useOptimistic:function(s){var c=Qn();c.memoizedState=c.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=p,c=v1.bind(null,Ue,!0,p),p.dispatch=c,[s,c]},useMemoCache:s1,useCacheRefresh:function(){return Qn().memoizedState=yre.bind(null,Ue)},useEffectEvent:function(s){var c=Qn(),p={impl:s};return c.memoizedState=p,function(){if((vt&2)!==0)throw Error(r(440));return p.impl.apply(void 0,arguments)}}},y1={readContext:kn,use:Hg,useCallback:iI,useContext:kn,useEffect:d1,useImperativeHandle:rI,useInsertionEffect:eI,useLayoutEffect:tI,useMemo:aI,useReducer:Gg,useRef:ZD,useState:function(){return Gg(Ra)},useDebugValue:h1,useDeferredValue:function(s,c){var p=ln();return oI(p,Ct.memoizedState,s,c)},useTransition:function(){var s=Gg(Ra)[0],c=ln().memoizedState;return[typeof s=="boolean"?s:sh(s),c]},useSyncExternalStore:DD,useId:cI,useHostTransitionStatus:g1,useFormState:KD,useActionState:KD,useOptimistic:function(s,c){var p=ln();return zD(p,Ct,s,c)},useMemoCache:s1,useCacheRefresh:fI};y1.useEffectEvent=JD;var gI={readContext:kn,use:Hg,useCallback:iI,useContext:kn,useEffect:d1,useImperativeHandle:rI,useInsertionEffect:eI,useLayoutEffect:tI,useMemo:aI,useReducer:u1,useRef:ZD,useState:function(){return u1(Ra)},useDebugValue:h1,useDeferredValue:function(s,c){var p=ln();return Ct===null?p1(p,s,c):oI(p,Ct.memoizedState,s,c)},useTransition:function(){var s=u1(Ra)[0],c=ln().memoizedState;return[typeof s=="boolean"?s:sh(s),c]},useSyncExternalStore:DD,useId:cI,useHostTransitionStatus:g1,useFormState:XD,useActionState:XD,useOptimistic:function(s,c){var p=ln();return Ct!==null?zD(p,Ct,s,c):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:s1,useCacheRefresh:fI};gI.useEffectEvent=JD;function b1(s,c,p,v){c=s.memoizedState,p=p(v,c),p=p==null?c:h({},c,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var x1={enqueueSetState:function(s,c,p){s=s._reactInternals;var v=Mr(),T=$o(v);T.payload=c,p!=null&&(T.callback=p),c=Bo(s,T,v),c!==null&&(gr(c,s,v),rh(c,s,v))},enqueueReplaceState:function(s,c,p){s=s._reactInternals;var v=Mr(),T=$o(v);T.tag=1,T.payload=c,p!=null&&(T.callback=p),c=Bo(s,T,v),c!==null&&(gr(c,s,v),rh(c,s,v))},enqueueForceUpdate:function(s,c){s=s._reactInternals;var p=Mr(),v=$o(p);v.tag=2,c!=null&&(v.callback=c),c=Bo(s,v,p),c!==null&&(gr(c,s,p),rh(c,s,p))}};function vI(s,c,p,v,T,N,B){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(v,N,B):c.prototype&&c.prototype.isPureReactComponent?!Yd(p,v)||!Yd(T,N):!0}function yI(s,c,p,v){s=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(p,v),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(p,v),c.state!==s&&x1.enqueueReplaceState(c,c.state,null)}function Cl(s,c){var p=c;if("ref"in c){p={};for(var v in c)v!=="ref"&&(p[v]=c[v])}if(s=s.defaultProps){p===c&&(p=h({},p));for(var T in s)p[T]===void 0&&(p[T]=s[T])}return p}function bI(s){Tg(s)}function xI(s){console.error(s)}function wI(s){Tg(s)}function Xg(s,c){try{var p=s.onUncaughtError;p(c.value,{componentStack:c.stack})}catch(v){setTimeout(function(){throw v})}}function SI(s,c,p){try{var v=s.onCaughtError;v(p.value,{componentStack:p.stack,errorBoundary:c.tag===1?c.stateNode:null})}catch(T){setTimeout(function(){throw T})}}function w1(s,c,p){return p=$o(p),p.tag=3,p.payload={element:null},p.callback=function(){Xg(s,c)},p}function _I(s){return s=$o(s),s.tag=3,s}function EI(s,c,p,v){var T=p.type.getDerivedStateFromError;if(typeof T=="function"){var N=v.value;s.payload=function(){return T(N)},s.callback=function(){SI(c,p,v)}}var B=p.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(s.callback=function(){SI(c,p,v),typeof T!="function"&&(Ho===null?Ho=new Set([this]):Ho.add(this));var W=v.stack;this.componentDidCatch(v.value,{componentStack:W!==null?W:""})})}function xre(s,c,p,v,T){if(p.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(c=p.alternate,c!==null&&oc(c,p,T,!0),p=Or.current,p!==null){switch(p.tag){case 31:case 13:return Zr===null?lv():p.alternate===null&&tn===0&&(tn=3),p.flags&=-257,p.flags|=65536,p.lanes=T,v===Lg?p.flags|=16384:(c=p.updateQueue,c===null?p.updateQueue=new Set([v]):c.add(v),G1(s,v,T)),!1;case 22:return p.flags|=65536,v===Lg?p.flags|=16384:(c=p.updateQueue,c===null?(c={transitions:null,markerInstances:null,retryQueue:new Set([v])},p.updateQueue=c):(p=c.retryQueue,p===null?c.retryQueue=new Set([v]):p.add(v)),G1(s,v,T)),!1}throw Error(r(435,p.tag))}return G1(s,v,T),lv(),!1}if(st)return c=Or.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=T,v!==qw&&(s=Error(r(422),{cause:v}),Qd(Wr(s,p)))):(v!==qw&&(c=Error(r(423),{cause:v}),Qd(Wr(c,p))),s=s.current.alternate,s.flags|=65536,T&=-T,s.lanes|=T,v=Wr(v,p),T=w1(s.stateNode,v,T),Zw(s,T),tn!==4&&(tn=2)),!1;var N=Error(r(520),{cause:v});if(N=Wr(N,p),vh===null?vh=[N]:vh.push(N),tn!==4&&(tn=2),c===null)return!0;v=Wr(v,p),p=c;do{switch(p.tag){case 3:return p.flags|=65536,s=T&-T,p.lanes|=s,s=w1(p.stateNode,v,s),Zw(p,s),!1;case 1:if(c=p.type,N=p.stateNode,(p.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Ho===null||!Ho.has(N))))return p.flags|=65536,T&=-T,p.lanes|=T,T=_I(T),EI(T,s,p,v),Zw(p,T),!1}p=p.return}while(p!==null);return!1}var S1=Error(r(461)),dn=!1;function Dn(s,c,p,v){c.child=s===null?OD(c,null,p,v):El(c,s.child,p,v)}function AI(s,c,p,v,T){p=p.render;var N=c.ref;if("ref"in v){var B={};for(var W in v)W!=="ref"&&(B[W]=v[W])}else B=v;return xl(c),v=r1(s,c,p,B,N,T),W=i1(),s!==null&&!dn?(a1(s,c,T),ka(s,c,T)):(st&&W&&$w(c),c.flags|=1,Dn(s,c,v,T),c.child)}function CI(s,c,p,v,T){if(s===null){var N=p.type;return typeof N=="function"&&!Dw(N)&&N.defaultProps===void 0&&p.compare===null?(c.tag=15,c.type=N,TI(s,c,N,v,T)):(s=Pg(p.type,null,v,c,c.mode,T),s.ref=c.ref,s.return=c,c.child=s)}if(N=s.child,!N1(s,T)){var B=N.memoizedProps;if(p=p.compare,p=p!==null?p:Yd,p(B,v)&&s.ref===c.ref)return ka(s,c,T)}return c.flags|=1,s=Oa(N,v),s.ref=c.ref,s.return=c,c.child=s}function TI(s,c,p,v,T){if(s!==null){var N=s.memoizedProps;if(Yd(N,v)&&s.ref===c.ref)if(dn=!1,c.pendingProps=v=N,N1(s,T))(s.flags&131072)!==0&&(dn=!0);else return c.lanes=s.lanes,ka(s,c,T)}return _1(s,c,p,v,T)}function OI(s,c,p,v){var T=v.children,N=s!==null?s.memoizedState:null;if(s===null&&c.stateNode===null&&(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((c.flags&128)!==0){if(N=N!==null?N.baseLanes|p:p,s!==null){for(v=c.child=s.child,T=0;v!==null;)T=T|v.lanes|v.childLanes,v=v.sibling;v=T&~N}else v=0,c.child=null;return jI(s,c,N,p,v)}if((p&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},s!==null&&Dg(c,N!==null?N.cachePool:null),N!==null?PD(c,N):Jw(),MD(c);else return v=c.lanes=536870912,jI(s,c,N!==null?N.baseLanes|p:p,p,v)}else N!==null?(Dg(c,N.cachePool),PD(c,N),zo(),c.memoizedState=null):(s!==null&&Dg(c,null),Jw(),zo());return Dn(s,c,T,p),c.child}function ch(s,c){return s!==null&&s.tag===22||c.stateNode!==null||(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.sibling}function jI(s,c,p,v,T){var N=Ww();return N=N===null?null:{parent:cn._currentValue,pool:N},c.memoizedState={baseLanes:p,cachePool:N},s!==null&&Dg(c,null),Jw(),MD(c),s!==null&&oc(s,c,v,!0),c.childLanes=T,null}function Zg(s,c){return c=Jg({mode:c.mode,children:c.children},s.mode),c.ref=s.ref,s.child=c,c.return=s,c}function NI(s,c,p){return El(c,s.child,null,p),s=Zg(c,c.pendingProps),s.flags|=2,jr(c),c.memoizedState=null,s}function wre(s,c,p){var v=c.pendingProps,T=(c.flags&128)!==0;if(c.flags&=-129,s===null){if(st){if(v.mode==="hidden")return s=Zg(c,v),c.lanes=536870912,ch(null,s);if(t1(c),(s=qt)?(s=VL(s,Xr),s=s!==null&&s.data==="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:Ro!==null?{id:Ki,overflow:Yi}:null,retryLane:536870912,hydrationErrors:null},p=hD(s),p.return=c,c.child=p,Rn=c,qt=null)):s=null,s===null)throw Do(c);return c.lanes=536870912,null}return Zg(c,v)}var N=s.memoizedState;if(N!==null){var B=N.dehydrated;if(t1(c),T)if(c.flags&256)c.flags&=-257,c=NI(s,c,p);else if(c.memoizedState!==null)c.child=s.child,c.flags|=128,c=null;else throw Error(r(558));else if(dn||oc(s,c,p,!1),T=(p&s.childLanes)!==0,dn||T){if(v=Mt,v!==null&&(B=ug(v,p),B!==0&&B!==N.retryLane))throw N.retryLane=B,gl(s,B),gr(v,s,B),S1;lv(),c=NI(s,c,p)}else s=N.treeContext,qt=Qr(B.nextSibling),Rn=c,st=!0,ko=null,Xr=!1,s!==null&&gD(c,s),c=Zg(c,v),c.flags|=4096;return c}return s=Oa(s.child,{mode:v.mode,children:v.children}),s.ref=c.ref,c.child=s,s.return=c,s}function Qg(s,c){var p=c.ref;if(p===null)s!==null&&s.ref!==null&&(c.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(s===null||s.ref!==p)&&(c.flags|=4194816)}}function _1(s,c,p,v,T){return xl(c),p=r1(s,c,p,v,void 0,T),v=i1(),s!==null&&!dn?(a1(s,c,T),ka(s,c,T)):(st&&v&&$w(c),c.flags|=1,Dn(s,c,p,T),c.child)}function PI(s,c,p,v,T,N){return xl(c),c.updateQueue=null,p=kD(c,v,p,T),RD(s),v=i1(),s!==null&&!dn?(a1(s,c,N),ka(s,c,N)):(st&&v&&$w(c),c.flags|=1,Dn(s,c,p,N),c.child)}function MI(s,c,p,v,T){if(xl(c),c.stateNode===null){var N=nc,B=p.contextType;typeof B=="object"&&B!==null&&(N=kn(B)),N=new p(v,N),c.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,N.updater=x1,c.stateNode=N,N._reactInternals=c,N=c.stateNode,N.props=v,N.state=c.memoizedState,N.refs={},Yw(c),B=p.contextType,N.context=typeof B=="object"&&B!==null?kn(B):nc,N.state=c.memoizedState,B=p.getDerivedStateFromProps,typeof B=="function"&&(b1(c,p,B,v),N.state=c.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(B=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),B!==N.state&&x1.enqueueReplaceState(N,N.state,null),ah(c,v,N,T),ih(),N.state=c.memoizedState),typeof N.componentDidMount=="function"&&(c.flags|=4194308),v=!0}else if(s===null){N=c.stateNode;var W=c.memoizedProps,ee=Cl(p,W);N.props=ee;var ue=N.context,pe=p.contextType;B=nc,typeof pe=="object"&&pe!==null&&(B=kn(pe));var ve=p.getDerivedStateFromProps;pe=typeof ve=="function"||typeof N.getSnapshotBeforeUpdate=="function",W=c.pendingProps!==W,pe||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(W||ue!==B)&&yI(c,N,v,B),Lo=!1;var ce=c.memoizedState;N.state=ce,ah(c,v,N,T),ih(),ue=c.memoizedState,W||ce!==ue||Lo?(typeof ve=="function"&&(b1(c,p,ve,v),ue=c.memoizedState),(ee=Lo||vI(c,p,ee,v,ce,ue,B))?(pe||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(c.flags|=4194308)):(typeof N.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=v,c.memoizedState=ue),N.props=v,N.state=ue,N.context=B,v=ee):(typeof N.componentDidMount=="function"&&(c.flags|=4194308),v=!1)}else{N=c.stateNode,Xw(s,c),B=c.memoizedProps,pe=Cl(p,B),N.props=pe,ve=c.pendingProps,ce=N.context,ue=p.contextType,ee=nc,typeof ue=="object"&&ue!==null&&(ee=kn(ue)),W=p.getDerivedStateFromProps,(ue=typeof W=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(B!==ve||ce!==ee)&&yI(c,N,v,ee),Lo=!1,ce=c.memoizedState,N.state=ce,ah(c,v,N,T),ih();var de=c.memoizedState;B!==ve||ce!==de||Lo||s!==null&&s.dependencies!==null&&Rg(s.dependencies)?(typeof W=="function"&&(b1(c,p,W,v),de=c.memoizedState),(pe=Lo||vI(c,p,pe,v,ce,de,ee)||s!==null&&s.dependencies!==null&&Rg(s.dependencies))?(ue||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(v,de,ee),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(v,de,ee)),typeof N.componentDidUpdate=="function"&&(c.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof N.componentDidUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=1024),c.memoizedProps=v,c.memoizedState=de),N.props=v,N.state=de,N.context=ee,v=pe):(typeof N.componentDidUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=1024),v=!1)}return N=v,Qg(s,c),v=(c.flags&128)!==0,N||v?(N=c.stateNode,p=v&&typeof p.getDerivedStateFromError!="function"?null:N.render(),c.flags|=1,s!==null&&v?(c.child=El(c,s.child,null,T),c.child=El(c,null,p,T)):Dn(s,c,p,T),c.memoizedState=N.state,s=c.child):s=ka(s,c,T),s}function RI(s,c,p,v){return yl(),c.flags|=256,Dn(s,c,p,v),c.child}var E1={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function A1(s){return{baseLanes:s,cachePool:SD()}}function C1(s,c,p){return s=s!==null?s.childLanes&~p:0,c&&(s|=Pr),s}function kI(s,c,p){var v=c.pendingProps,T=!1,N=(c.flags&128)!==0,B;if((B=N)||(B=s!==null&&s.memoizedState===null?!1:(sn.current&2)!==0),B&&(T=!0,c.flags&=-129),B=(c.flags&32)!==0,c.flags&=-33,s===null){if(st){if(T?qo(c):zo(),(s=qt)?(s=VL(s,Xr),s=s!==null&&s.data!=="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:Ro!==null?{id:Ki,overflow:Yi}:null,retryLane:536870912,hydrationErrors:null},p=hD(s),p.return=c,c.child=p,Rn=c,qt=null)):s=null,s===null)throw Do(c);return lS(s)?c.lanes=32:c.lanes=536870912,null}var W=v.children;return v=v.fallback,T?(zo(),T=c.mode,W=Jg({mode:"hidden",children:W},T),v=vl(v,T,p,null),W.return=c,v.return=c,W.sibling=v,c.child=W,v=c.child,v.memoizedState=A1(p),v.childLanes=C1(s,B,p),c.memoizedState=E1,ch(null,v)):(qo(c),T1(c,W))}var ee=s.memoizedState;if(ee!==null&&(W=ee.dehydrated,W!==null)){if(N)c.flags&256?(qo(c),c.flags&=-257,c=O1(s,c,p)):c.memoizedState!==null?(zo(),c.child=s.child,c.flags|=128,c=null):(zo(),W=v.fallback,T=c.mode,v=Jg({mode:"visible",children:v.children},T),W=vl(W,T,p,null),W.flags|=2,v.return=c,W.return=c,v.sibling=W,c.child=v,El(c,s.child,null,p),v=c.child,v.memoizedState=A1(p),v.childLanes=C1(s,B,p),c.memoizedState=E1,c=ch(null,v));else if(qo(c),lS(W)){if(B=W.nextSibling&&W.nextSibling.dataset,B)var ue=B.dgst;B=ue,v=Error(r(419)),v.stack="",v.digest=B,Qd({value:v,source:null,stack:null}),c=O1(s,c,p)}else if(dn||oc(s,c,p,!1),B=(p&s.childLanes)!==0,dn||B){if(B=Mt,B!==null&&(v=ug(B,p),v!==0&&v!==ee.retryLane))throw ee.retryLane=v,gl(s,v),gr(B,s,v),S1;sS(W)||lv(),c=O1(s,c,p)}else sS(W)?(c.flags|=192,c.child=s.child,c=null):(s=ee.treeContext,qt=Qr(W.nextSibling),Rn=c,st=!0,ko=null,Xr=!1,s!==null&&gD(c,s),c=T1(c,v.children),c.flags|=4096);return c}return T?(zo(),W=v.fallback,T=c.mode,ee=s.child,ue=ee.sibling,v=Oa(ee,{mode:"hidden",children:v.children}),v.subtreeFlags=ee.subtreeFlags&65011712,ue!==null?W=Oa(ue,W):(W=vl(W,T,p,null),W.flags|=2),W.return=c,v.return=c,v.sibling=W,c.child=v,ch(null,v),v=c.child,W=s.child.memoizedState,W===null?W=A1(p):(T=W.cachePool,T!==null?(ee=cn._currentValue,T=T.parent!==ee?{parent:ee,pool:ee}:T):T=SD(),W={baseLanes:W.baseLanes|p,cachePool:T}),v.memoizedState=W,v.childLanes=C1(s,B,p),c.memoizedState=E1,ch(s.child,v)):(qo(c),p=s.child,s=p.sibling,p=Oa(p,{mode:"visible",children:v.children}),p.return=c,p.sibling=null,s!==null&&(B=c.deletions,B===null?(c.deletions=[s],c.flags|=16):B.push(s)),c.child=p,c.memoizedState=null,p)}function T1(s,c){return c=Jg({mode:"visible",children:c},s.mode),c.return=s,s.child=c}function Jg(s,c){return s=Tr(22,s,null,c),s.lanes=0,s}function O1(s,c,p){return El(c,s.child,null,p),s=T1(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function DI(s,c,p){s.lanes|=c;var v=s.alternate;v!==null&&(v.lanes|=c),Fw(s.return,c,p)}function j1(s,c,p,v,T,N){var B=s.memoizedState;B===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:v,tail:p,tailMode:T,treeForkCount:N}:(B.isBackwards=c,B.rendering=null,B.renderingStartTime=0,B.last=v,B.tail=p,B.tailMode=T,B.treeForkCount=N)}function II(s,c,p){var v=c.pendingProps,T=v.revealOrder,N=v.tail;v=v.children;var B=sn.current,W=(B&2)!==0;if(W?(B=B&1|2,c.flags|=128):B&=1,X(sn,B),Dn(s,c,v,p),v=st?Zd:0,!W&&s!==null&&(s.flags&128)!==0)e:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&DI(s,p,c);else if(s.tag===19)DI(s,p,c);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===c)break e;for(;s.sibling===null;){if(s.return===null||s.return===c)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(T){case"forwards":for(p=c.child,T=null;p!==null;)s=p.alternate,s!==null&&zg(s)===null&&(T=p),p=p.sibling;p=T,p===null?(T=c.child,c.child=null):(T=p.sibling,p.sibling=null),j1(c,!1,T,p,N,v);break;case"backwards":case"unstable_legacy-backwards":for(p=null,T=c.child,c.child=null;T!==null;){if(s=T.alternate,s!==null&&zg(s)===null){c.child=T;break}s=T.sibling,T.sibling=p,p=T,T=s}j1(c,!0,p,null,N,v);break;case"together":j1(c,!1,null,null,void 0,v);break;default:c.memoizedState=null}return c.child}function ka(s,c,p){if(s!==null&&(c.dependencies=s.dependencies),Uo|=c.lanes,(p&c.childLanes)===0)if(s!==null){if(oc(s,c,p,!1),(p&c.childLanes)===0)return null}else return null;if(s!==null&&c.child!==s.child)throw Error(r(153));if(c.child!==null){for(s=c.child,p=Oa(s,s.pendingProps),c.child=p,p.return=c;s.sibling!==null;)s=s.sibling,p=p.sibling=Oa(s,s.pendingProps),p.return=c;p.sibling=null}return c.child}function N1(s,c){return(s.lanes&c)!==0?!0:(s=s.dependencies,!!(s!==null&&Rg(s)))}function Sre(s,c,p){switch(c.tag){case 3:re(c,c.stateNode.containerInfo),Io(c,cn,s.memoizedState.cache),yl();break;case 27:case 5:fe(c);break;case 4:re(c,c.stateNode.containerInfo);break;case 10:Io(c,c.type,c.memoizedProps.value);break;case 31:if(c.memoizedState!==null)return c.flags|=128,t1(c),null;break;case 13:var v=c.memoizedState;if(v!==null)return v.dehydrated!==null?(qo(c),c.flags|=128,null):(p&c.child.childLanes)!==0?kI(s,c,p):(qo(c),s=ka(s,c,p),s!==null?s.sibling:null);qo(c);break;case 19:var T=(s.flags&128)!==0;if(v=(p&c.childLanes)!==0,v||(oc(s,c,p,!1),v=(p&c.childLanes)!==0),T){if(v)return II(s,c,p);c.flags|=128}if(T=c.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),X(sn,sn.current),v)break;return null;case 22:return c.lanes=0,OI(s,c,p,c.pendingProps);case 24:Io(c,cn,s.memoizedState.cache)}return ka(s,c,p)}function LI(s,c,p){if(s!==null)if(s.memoizedProps!==c.pendingProps)dn=!0;else{if(!N1(s,p)&&(c.flags&128)===0)return dn=!1,Sre(s,c,p);dn=(s.flags&131072)!==0}else dn=!1,st&&(c.flags&1048576)!==0&&mD(c,Zd,c.index);switch(c.lanes=0,c.tag){case 16:e:{var v=c.pendingProps;if(s=Sl(c.elementType),c.type=s,typeof s=="function")Dw(s)?(v=Cl(s,v),c.tag=1,c=MI(null,c,s,v,p)):(c.tag=0,c=_1(null,c,s,v,p));else{if(s!=null){var T=s.$$typeof;if(T===A){c.tag=11,c=AI(null,c,s,v,p);break e}else if(T===P){c.tag=14,c=CI(null,c,s,v,p);break e}}throw c=D(s)||s,Error(r(306,c,""))}}return c;case 0:return _1(s,c,c.type,c.pendingProps,p);case 1:return v=c.type,T=Cl(v,c.pendingProps),MI(s,c,v,T,p);case 3:e:{if(re(c,c.stateNode.containerInfo),s===null)throw Error(r(387));v=c.pendingProps;var N=c.memoizedState;T=N.element,Xw(s,c),ah(c,v,null,p);var B=c.memoizedState;if(v=B.cache,Io(c,cn,v),v!==N.cache&&Uw(c,[cn],p,!0),ih(),v=B.element,N.isDehydrated)if(N={element:v,isDehydrated:!1,cache:B.cache},c.updateQueue.baseState=N,c.memoizedState=N,c.flags&256){c=RI(s,c,v,p);break e}else if(v!==T){T=Wr(Error(r(424)),c),Qd(T),c=RI(s,c,v,p);break e}else{switch(s=c.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(qt=Qr(s.firstChild),Rn=c,st=!0,ko=null,Xr=!0,p=OD(c,null,v,p),c.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(yl(),v===T){c=ka(s,c,p);break e}Dn(s,c,v,p)}c=c.child}return c;case 26:return Qg(s,c),s===null?(p=KL(c.type,null,c.pendingProps,null))?c.memoizedState=p:st||(p=c.type,s=c.pendingProps,v=mv(Q.current).createElement(p),v[xn]=c,v[Un]=s,In(v,p,s),un(v),c.stateNode=v):c.memoizedState=KL(c.type,s.memoizedProps,c.pendingProps,s.memoizedState),null;case 27:return fe(c),s===null&&st&&(v=c.stateNode=HL(c.type,c.pendingProps,Q.current),Rn=c,Xr=!0,T=qt,Yo(c.type)?(uS=T,qt=Qr(v.firstChild)):qt=T),Dn(s,c,c.pendingProps.children,p),Qg(s,c),s===null&&(c.flags|=4194304),c.child;case 5:return s===null&&st&&((T=v=qt)&&(v=Qre(v,c.type,c.pendingProps,Xr),v!==null?(c.stateNode=v,Rn=c,qt=Qr(v.firstChild),Xr=!1,T=!0):T=!1),T||Do(c)),fe(c),T=c.type,N=c.pendingProps,B=s!==null?s.memoizedProps:null,v=N.children,iS(T,N)?v=null:B!==null&&iS(T,B)&&(c.flags|=32),c.memoizedState!==null&&(T=r1(s,c,hre,null,null,p),Ah._currentValue=T),Qg(s,c),Dn(s,c,v,p),c.child;case 6:return s===null&&st&&((s=p=qt)&&(p=Jre(p,c.pendingProps,Xr),p!==null?(c.stateNode=p,Rn=c,qt=null,s=!0):s=!1),s||Do(c)),null;case 13:return kI(s,c,p);case 4:return re(c,c.stateNode.containerInfo),v=c.pendingProps,s===null?c.child=El(c,null,v,p):Dn(s,c,v,p),c.child;case 11:return AI(s,c,c.type,c.pendingProps,p);case 7:return Dn(s,c,c.pendingProps,p),c.child;case 8:return Dn(s,c,c.pendingProps.children,p),c.child;case 12:return Dn(s,c,c.pendingProps.children,p),c.child;case 10:return v=c.pendingProps,Io(c,c.type,v.value),Dn(s,c,v.children,p),c.child;case 9:return T=c.type._context,v=c.pendingProps.children,xl(c),T=kn(T),v=v(T),c.flags|=1,Dn(s,c,v,p),c.child;case 14:return CI(s,c,c.type,c.pendingProps,p);case 15:return TI(s,c,c.type,c.pendingProps,p);case 19:return II(s,c,p);case 31:return wre(s,c,p);case 22:return OI(s,c,p,c.pendingProps);case 24:return xl(c),v=kn(cn),s===null?(T=Ww(),T===null&&(T=Mt,N=Hw(),T.pooledCache=N,N.refCount++,N!==null&&(T.pooledCacheLanes|=p),T=N),c.memoizedState={parent:v,cache:T},Yw(c),Io(c,cn,T)):((s.lanes&p)!==0&&(Xw(s,c),ah(c,null,null,p),ih()),T=s.memoizedState,N=c.memoizedState,T.parent!==v?(T={parent:v,cache:v},c.memoizedState=T,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=T),Io(c,cn,v)):(v=N.cache,Io(c,cn,v),v!==T.cache&&Uw(c,[cn],p,!0))),Dn(s,c,c.pendingProps.children,p),c.child;case 29:throw c.pendingProps}throw Error(r(156,c.tag))}function Da(s){s.flags|=4}function P1(s,c,p,v,T){if((c=(s.mode&32)!==0)&&(c=!1),c){if(s.flags|=16777216,(T&335544128)===T)if(s.stateNode.complete)s.flags|=8192;else if(cL())s.flags|=8192;else throw _l=Lg,Kw}else s.flags&=-16777217}function $I(s,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!JL(c))if(cL())s.flags|=8192;else throw _l=Lg,Kw}function ev(s,c){c!==null&&(s.flags|=4),s.flags&16384&&(c=s.tag!==22?og():536870912,s.lanes|=c,yc|=c)}function fh(s,c){if(!st)switch(s.tailMode){case"hidden":c=s.tail;for(var p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var v=null;p!==null;)p.alternate!==null&&(v=p),p=p.sibling;v===null?c||s.tail===null?s.tail=null:s.tail.sibling=null:v.sibling=null}}function zt(s){var c=s.alternate!==null&&s.alternate.child===s.child,p=0,v=0;if(c)for(var T=s.child;T!==null;)p|=T.lanes|T.childLanes,v|=T.subtreeFlags&65011712,v|=T.flags&65011712,T.return=s,T=T.sibling;else for(T=s.child;T!==null;)p|=T.lanes|T.childLanes,v|=T.subtreeFlags,v|=T.flags,T.return=s,T=T.sibling;return s.subtreeFlags|=v,s.childLanes=p,c}function _re(s,c,p){var v=c.pendingProps;switch(Bw(c),c.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(c),null;case 1:return zt(c),null;case 3:return p=c.stateNode,v=null,s!==null&&(v=s.memoizedState.cache),c.memoizedState.cache!==v&&(c.flags|=2048),Pa(cn),ne(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(ac(c)?Da(c):s===null||s.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,zw())),zt(c),null;case 26:var T=c.type,N=c.memoizedState;return s===null?(Da(c),N!==null?(zt(c),$I(c,N)):(zt(c),P1(c,T,null,v,p))):N?N!==s.memoizedState?(Da(c),zt(c),$I(c,N)):(zt(c),c.flags&=-16777217):(s=s.memoizedProps,s!==v&&Da(c),zt(c),P1(c,T,s,v,p)),null;case 27:if(he(c),p=Q.current,T=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&Da(c);else{if(!v){if(c.stateNode===null)throw Error(r(166));return zt(c),null}s=K.current,ac(c)?vD(c):(s=HL(T,v,p),c.stateNode=s,Da(c))}return zt(c),null;case 5:if(he(c),T=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&Da(c);else{if(!v){if(c.stateNode===null)throw Error(r(166));return zt(c),null}if(N=K.current,ac(c))vD(c);else{var B=mv(Q.current);switch(N){case 1:N=B.createElementNS("http://www.w3.org/2000/svg",T);break;case 2:N=B.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;default:switch(T){case"svg":N=B.createElementNS("http://www.w3.org/2000/svg",T);break;case"math":N=B.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;case"script":N=B.createElement("div"),N.innerHTML="<script><\/script>",N=N.removeChild(N.firstChild);break;case"select":N=typeof v.is=="string"?B.createElement("select",{is:v.is}):B.createElement("select"),v.multiple?N.multiple=!0:v.size&&(N.size=v.size);break;default:N=typeof v.is=="string"?B.createElement(T,{is:v.is}):B.createElement(T)}}N[xn]=c,N[Un]=v;e:for(B=c.child;B!==null;){if(B.tag===5||B.tag===6)N.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===c)break e;for(;B.sibling===null;){if(B.return===null||B.return===c)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}c.stateNode=N;e:switch(In(N,T,v),T){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&Da(c)}}return zt(c),P1(c,c.type,s===null?null:s.memoizedProps,c.pendingProps,p),null;case 6:if(s&&c.stateNode!=null)s.memoizedProps!==v&&Da(c);else{if(typeof v!="string"&&c.stateNode===null)throw Error(r(166));if(s=Q.current,ac(c)){if(s=c.stateNode,p=c.memoizedProps,v=null,T=Rn,T!==null)switch(T.tag){case 27:case 5:v=T.memoizedProps}s[xn]=c,s=!!(s.nodeValue===p||v!==null&&v.suppressHydrationWarning===!0||kL(s.nodeValue,p)),s||Do(c,!0)}else s=mv(s).createTextNode(v),s[xn]=c,c.stateNode=s}return zt(c),null;case 31:if(p=c.memoizedState,s===null||s.memoizedState!==null){if(v=ac(c),p!==null){if(s===null){if(!v)throw Error(r(318));if(s=c.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[xn]=c}else yl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;zt(c),s=!1}else p=zw(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),s=!0;if(!s)return c.flags&256?(jr(c),c):(jr(c),null);if((c.flags&128)!==0)throw Error(r(558))}return zt(c),null;case 13:if(v=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(T=ac(c),v!==null&&v.dehydrated!==null){if(s===null){if(!T)throw Error(r(318));if(T=c.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(r(317));T[xn]=c}else yl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;zt(c),T=!1}else T=zw(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=T),T=!0;if(!T)return c.flags&256?(jr(c),c):(jr(c),null)}return jr(c),(c.flags&128)!==0?(c.lanes=p,c):(p=v!==null,s=s!==null&&s.memoizedState!==null,p&&(v=c.child,T=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(T=v.alternate.memoizedState.cachePool.pool),N=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(N=v.memoizedState.cachePool.pool),N!==T&&(v.flags|=2048)),p!==s&&p&&(c.child.flags|=8192),ev(c,c.updateQueue),zt(c),null);case 4:return ne(),s===null&&J1(c.stateNode.containerInfo),zt(c),null;case 10:return Pa(c.type),zt(c),null;case 19:if(F(sn),v=c.memoizedState,v===null)return zt(c),null;if(T=(c.flags&128)!==0,N=v.rendering,N===null)if(T)fh(v,!1);else{if(tn!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(N=zg(s),N!==null){for(c.flags|=128,fh(v,!1),s=N.updateQueue,c.updateQueue=s,ev(c,s),c.subtreeFlags=0,s=p,p=c.child;p!==null;)dD(p,s),p=p.sibling;return X(sn,sn.current&1|2),st&&ja(c,v.treeForkCount),c.child}s=s.sibling}v.tail!==null&&At()>av&&(c.flags|=128,T=!0,fh(v,!1),c.lanes=4194304)}else{if(!T)if(s=zg(N),s!==null){if(c.flags|=128,T=!0,s=s.updateQueue,c.updateQueue=s,ev(c,s),fh(v,!0),v.tail===null&&v.tailMode==="hidden"&&!N.alternate&&!st)return zt(c),null}else 2*At()-v.renderingStartTime>av&&p!==536870912&&(c.flags|=128,T=!0,fh(v,!1),c.lanes=4194304);v.isBackwards?(N.sibling=c.child,c.child=N):(s=v.last,s!==null?s.sibling=N:c.child=N,v.last=N)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=At(),s.sibling=null,p=sn.current,X(sn,T?p&1|2:p&1),st&&ja(c,v.treeForkCount),s):(zt(c),null);case 22:case 23:return jr(c),e1(),v=c.memoizedState!==null,s!==null?s.memoizedState!==null!==v&&(c.flags|=8192):v&&(c.flags|=8192),v?(p&536870912)!==0&&(c.flags&128)===0&&(zt(c),c.subtreeFlags&6&&(c.flags|=8192)):zt(c),p=c.updateQueue,p!==null&&ev(c,p.retryQueue),p=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==p&&(c.flags|=2048),s!==null&&F(wl),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),c.memoizedState.cache!==p&&(c.flags|=2048),Pa(cn),zt(c),null;case 25:return null;case 30:return null}throw Error(r(156,c.tag))}function Ere(s,c){switch(Bw(c),c.tag){case 1:return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return Pa(cn),ne(),s=c.flags,(s&65536)!==0&&(s&128)===0?(c.flags=s&-65537|128,c):null;case 26:case 27:case 5:return he(c),null;case 31:if(c.memoizedState!==null){if(jr(c),c.alternate===null)throw Error(r(340));yl()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 13:if(jr(c),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(r(340));yl()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return F(sn),null;case 4:return ne(),null;case 10:return Pa(c.type),null;case 22:case 23:return jr(c),e1(),s!==null&&F(wl),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 24:return Pa(cn),null;case 25:return null;default:return null}}function BI(s,c){switch(Bw(c),c.tag){case 3:Pa(cn),ne();break;case 26:case 27:case 5:he(c);break;case 4:ne();break;case 31:c.memoizedState!==null&&jr(c);break;case 13:jr(c);break;case 19:F(sn);break;case 10:Pa(c.type);break;case 22:case 23:jr(c),e1(),s!==null&&F(wl);break;case 24:Pa(cn)}}function dh(s,c){try{var p=c.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var T=v.next;p=T;do{if((p.tag&s)===s){v=void 0;var N=p.create,B=p.inst;v=N(),B.destroy=v}p=p.next}while(p!==T)}}catch(W){_t(c,c.return,W)}}function Vo(s,c,p){try{var v=c.updateQueue,T=v!==null?v.lastEffect:null;if(T!==null){var N=T.next;v=N;do{if((v.tag&s)===s){var B=v.inst,W=B.destroy;if(W!==void 0){B.destroy=void 0,T=c;var ee=p,ue=W;try{ue()}catch(pe){_t(T,ee,pe)}}}v=v.next}while(v!==N)}}catch(pe){_t(c,c.return,pe)}}function qI(s){var c=s.updateQueue;if(c!==null){var p=s.stateNode;try{ND(c,p)}catch(v){_t(s,s.return,v)}}}function zI(s,c,p){p.props=Cl(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(v){_t(s,c,v)}}function hh(s,c){try{var p=s.ref;if(p!==null){switch(s.tag){case 26:case 27:case 5:var v=s.stateNode;break;case 30:v=s.stateNode;break;default:v=s.stateNode}typeof p=="function"?s.refCleanup=p(v):p.current=v}}catch(T){_t(s,c,T)}}function Xi(s,c){var p=s.ref,v=s.refCleanup;if(p!==null)if(typeof v=="function")try{v()}catch(T){_t(s,c,T)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(T){_t(s,c,T)}else p.current=null}function VI(s){var c=s.type,p=s.memoizedProps,v=s.stateNode;try{e:switch(c){case"button":case"input":case"select":case"textarea":p.autoFocus&&v.focus();break e;case"img":p.src?v.src=p.src:p.srcSet&&(v.srcset=p.srcSet)}}catch(T){_t(s,s.return,T)}}function M1(s,c,p){try{var v=s.stateNode;Gre(v,s.type,p,c),v[Un]=c}catch(T){_t(s,s.return,T)}}function FI(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Yo(s.type)||s.tag===4}function R1(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||FI(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Yo(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function k1(s,c,p){var v=s.tag;if(v===5||v===6)s=s.stateNode,c?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(s,c):(c=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,c.appendChild(s),p=p._reactRootContainer,p!=null||c.onclick!==null||(c.onclick=Ca));else if(v!==4&&(v===27&&Yo(s.type)&&(p=s.stateNode,c=null),s=s.child,s!==null))for(k1(s,c,p),s=s.sibling;s!==null;)k1(s,c,p),s=s.sibling}function tv(s,c,p){var v=s.tag;if(v===5||v===6)s=s.stateNode,c?p.insertBefore(s,c):p.appendChild(s);else if(v!==4&&(v===27&&Yo(s.type)&&(p=s.stateNode),s=s.child,s!==null))for(tv(s,c,p),s=s.sibling;s!==null;)tv(s,c,p),s=s.sibling}function UI(s){var c=s.stateNode,p=s.memoizedProps;try{for(var v=s.type,T=c.attributes;T.length;)c.removeAttributeNode(T[0]);In(c,v,p),c[xn]=s,c[Un]=p}catch(N){_t(s,s.return,N)}}var Ia=!1,hn=!1,D1=!1,HI=typeof WeakSet=="function"?WeakSet:Set,On=null;function Are(s,c){if(s=s.containerInfo,nS=Sv,s=rD(s),Ow(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else e:{p=(p=s.ownerDocument)&&p.defaultView||window;var v=p.getSelection&&p.getSelection();if(v&&v.rangeCount!==0){p=v.anchorNode;var T=v.anchorOffset,N=v.focusNode;v=v.focusOffset;try{p.nodeType,N.nodeType}catch{p=null;break e}var B=0,W=-1,ee=-1,ue=0,pe=0,ve=s,ce=null;t:for(;;){for(var de;ve!==p||T!==0&&ve.nodeType!==3||(W=B+T),ve!==N||v!==0&&ve.nodeType!==3||(ee=B+v),ve.nodeType===3&&(B+=ve.nodeValue.length),(de=ve.firstChild)!==null;)ce=ve,ve=de;for(;;){if(ve===s)break t;if(ce===p&&++ue===T&&(W=B),ce===N&&++pe===v&&(ee=B),(de=ve.nextSibling)!==null)break;ve=ce,ce=ve.parentNode}ve=de}p=W===-1||ee===-1?null:{start:W,end:ee}}else p=null}p=p||{start:0,end:0}}else p=null;for(rS={focusedElem:s,selectionRange:p},Sv=!1,On=c;On!==null;)if(c=On,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,On=s;else for(;On!==null;){switch(c=On,N=c.alternate,s=c.flags,c.tag){case 0:if((s&4)!==0&&(s=c.updateQueue,s=s!==null?s.events:null,s!==null))for(p=0;p<s.length;p++)T=s[p],T.ref.impl=T.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&N!==null){s=void 0,p=c,T=N.memoizedProps,N=N.memoizedState,v=p.stateNode;try{var je=Cl(p.type,T);s=v.getSnapshotBeforeUpdate(je,N),v.__reactInternalSnapshotBeforeUpdate=s}catch($e){_t(p,p.return,$e)}}break;case 3:if((s&1024)!==0){if(s=c.stateNode.containerInfo,p=s.nodeType,p===9)oS(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":oS(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=c.sibling,s!==null){s.return=c.return,On=s;break}On=c.return}}function GI(s,c,p){var v=p.flags;switch(p.tag){case 0:case 11:case 15:$a(s,p),v&4&&dh(5,p);break;case 1:if($a(s,p),v&4)if(s=p.stateNode,c===null)try{s.componentDidMount()}catch(B){_t(p,p.return,B)}else{var T=Cl(p.type,c.memoizedProps);c=c.memoizedState;try{s.componentDidUpdate(T,c,s.__reactInternalSnapshotBeforeUpdate)}catch(B){_t(p,p.return,B)}}v&64&&qI(p),v&512&&hh(p,p.return);break;case 3:if($a(s,p),v&64&&(s=p.updateQueue,s!==null)){if(c=null,p.child!==null)switch(p.child.tag){case 27:case 5:c=p.child.stateNode;break;case 1:c=p.child.stateNode}try{ND(s,c)}catch(B){_t(p,p.return,B)}}break;case 27:c===null&&v&4&&UI(p);case 26:case 5:$a(s,p),c===null&&v&4&&VI(p),v&512&&hh(p,p.return);break;case 12:$a(s,p);break;case 31:$a(s,p),v&4&&YI(s,p);break;case 13:$a(s,p),v&4&&XI(s,p),v&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=kre.bind(null,p),eie(s,p))));break;case 22:if(v=p.memoizedState!==null||Ia,!v){c=c!==null&&c.memoizedState!==null||hn,T=Ia;var N=hn;Ia=v,(hn=c)&&!N?Ba(s,p,(p.subtreeFlags&8772)!==0):$a(s,p),Ia=T,hn=N}break;case 30:break;default:$a(s,p)}}function WI(s){var c=s.alternate;c!==null&&(s.alternate=null,WI(c)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(c=s.stateNode,c!==null&&Bd(c)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Ht=null,dr=!1;function La(s,c,p){for(p=p.child;p!==null;)KI(s,c,p),p=p.sibling}function KI(s,c,p){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Fn,p)}catch{}switch(p.tag){case 26:hn||Xi(p,c),La(s,c,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:hn||Xi(p,c);var v=Ht,T=dr;Yo(p.type)&&(Ht=p.stateNode,dr=!1),La(s,c,p),Sh(p.stateNode),Ht=v,dr=T;break;case 5:hn||Xi(p,c);case 6:if(v=Ht,T=dr,Ht=null,La(s,c,p),Ht=v,dr=T,Ht!==null)if(dr)try{(Ht.nodeType===9?Ht.body:Ht.nodeName==="HTML"?Ht.ownerDocument.body:Ht).removeChild(p.stateNode)}catch(N){_t(p,c,N)}else try{Ht.removeChild(p.stateNode)}catch(N){_t(p,c,N)}break;case 18:Ht!==null&&(dr?(s=Ht,qL(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),Cc(s)):qL(Ht,p.stateNode));break;case 4:v=Ht,T=dr,Ht=p.stateNode.containerInfo,dr=!0,La(s,c,p),Ht=v,dr=T;break;case 0:case 11:case 14:case 15:Vo(2,p,c),hn||Vo(4,p,c),La(s,c,p);break;case 1:hn||(Xi(p,c),v=p.stateNode,typeof v.componentWillUnmount=="function"&&zI(p,c,v)),La(s,c,p);break;case 21:La(s,c,p);break;case 22:hn=(v=hn)||p.memoizedState!==null,La(s,c,p),hn=v;break;default:La(s,c,p)}}function YI(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Cc(s)}catch(p){_t(c,c.return,p)}}}function XI(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Cc(s)}catch(p){_t(c,c.return,p)}}function Cre(s){switch(s.tag){case 31:case 13:case 19:var c=s.stateNode;return c===null&&(c=s.stateNode=new HI),c;case 22:return s=s.stateNode,c=s._retryCache,c===null&&(c=s._retryCache=new HI),c;default:throw Error(r(435,s.tag))}}function nv(s,c){var p=Cre(s);c.forEach(function(v){if(!p.has(v)){p.add(v);var T=Dre.bind(null,s,v);v.then(T,T)}})}function hr(s,c){var p=c.deletions;if(p!==null)for(var v=0;v<p.length;v++){var T=p[v],N=s,B=c,W=B;e:for(;W!==null;){switch(W.tag){case 27:if(Yo(W.type)){Ht=W.stateNode,dr=!1;break e}break;case 5:Ht=W.stateNode,dr=!1;break e;case 3:case 4:Ht=W.stateNode.containerInfo,dr=!0;break e}W=W.return}if(Ht===null)throw Error(r(160));KI(N,B,T),Ht=null,dr=!1,N=T.alternate,N!==null&&(N.return=null),T.return=null}if(c.subtreeFlags&13886)for(c=c.child;c!==null;)ZI(c,s),c=c.sibling}var xi=null;function ZI(s,c){var p=s.alternate,v=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:hr(c,s),pr(s),v&4&&(Vo(3,s,s.return),dh(3,s),Vo(5,s,s.return));break;case 1:hr(c,s),pr(s),v&512&&(hn||p===null||Xi(p,p.return)),v&64&&Ia&&(s=s.updateQueue,s!==null&&(v=s.callbacks,v!==null&&(p=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=p===null?v:p.concat(v))));break;case 26:var T=xi;if(hr(c,s),pr(s),v&512&&(hn||p===null||Xi(p,p.return)),v&4){var N=p!==null?p.memoizedState:null;if(v=s.memoizedState,p===null)if(v===null)if(s.stateNode===null){e:{v=s.type,p=s.memoizedProps,T=T.ownerDocument||T;t:switch(v){case"title":N=T.getElementsByTagName("title")[0],(!N||N[cl]||N[xn]||N.namespaceURI==="http://www.w3.org/2000/svg"||N.hasAttribute("itemprop"))&&(N=T.createElement(v),T.head.insertBefore(N,T.querySelector("head > title"))),In(N,v,p),N[xn]=s,un(N),v=N;break e;case"link":var B=ZL("link","href",T).get(v+(p.href||""));if(B){for(var W=0;W<B.length;W++)if(N=B[W],N.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&N.getAttribute("rel")===(p.rel==null?null:p.rel)&&N.getAttribute("title")===(p.title==null?null:p.title)&&N.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){B.splice(W,1);break t}}N=T.createElement(v),In(N,v,p),T.head.appendChild(N);break;case"meta":if(B=ZL("meta","content",T).get(v+(p.content||""))){for(W=0;W<B.length;W++)if(N=B[W],N.getAttribute("content")===(p.content==null?null:""+p.content)&&N.getAttribute("name")===(p.name==null?null:p.name)&&N.getAttribute("property")===(p.property==null?null:p.property)&&N.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&N.getAttribute("charset")===(p.charSet==null?null:p.charSet)){B.splice(W,1);break t}}N=T.createElement(v),In(N,v,p),T.head.appendChild(N);break;default:throw Error(r(468,v))}N[xn]=s,un(N),v=N}s.stateNode=v}else QL(T,s.type,s.stateNode);else s.stateNode=XL(T,v,s.memoizedProps);else N!==v?(N===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):N.count--,v===null?QL(T,s.type,s.stateNode):XL(T,v,s.memoizedProps)):v===null&&s.stateNode!==null&&M1(s,s.memoizedProps,p.memoizedProps)}break;case 27:hr(c,s),pr(s),v&512&&(hn||p===null||Xi(p,p.return)),p!==null&&v&4&&M1(s,s.memoizedProps,p.memoizedProps);break;case 5:if(hr(c,s),pr(s),v&512&&(hn||p===null||Xi(p,p.return)),s.flags&32){T=s.stateNode;try{Yu(T,"")}catch(je){_t(s,s.return,je)}}v&4&&s.stateNode!=null&&(T=s.memoizedProps,M1(s,T,p!==null?p.memoizedProps:T)),v&1024&&(D1=!0);break;case 6:if(hr(c,s),pr(s),v&4){if(s.stateNode===null)throw Error(r(162));v=s.memoizedProps,p=s.stateNode;try{p.nodeValue=v}catch(je){_t(s,s.return,je)}}break;case 3:if(yv=null,T=xi,xi=gv(c.containerInfo),hr(c,s),xi=T,pr(s),v&4&&p!==null&&p.memoizedState.isDehydrated)try{Cc(c.containerInfo)}catch(je){_t(s,s.return,je)}D1&&(D1=!1,QI(s));break;case 4:v=xi,xi=gv(s.stateNode.containerInfo),hr(c,s),pr(s),xi=v;break;case 12:hr(c,s),pr(s);break;case 31:hr(c,s),pr(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,nv(s,v)));break;case 13:hr(c,s),pr(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(iv=At()),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,nv(s,v)));break;case 22:T=s.memoizedState!==null;var ee=p!==null&&p.memoizedState!==null,ue=Ia,pe=hn;if(Ia=ue||T,hn=pe||ee,hr(c,s),hn=pe,Ia=ue,pr(s),v&8192)e:for(c=s.stateNode,c._visibility=T?c._visibility&-2:c._visibility|1,T&&(p===null||ee||Ia||hn||Tl(s)),p=null,c=s;;){if(c.tag===5||c.tag===26){if(p===null){ee=p=c;try{if(N=ee.stateNode,T)B=N.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{W=ee.stateNode;var ve=ee.memoizedProps.style,ce=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;W.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(je){_t(ee,ee.return,je)}}}else if(c.tag===6){if(p===null){ee=c;try{ee.stateNode.nodeValue=T?"":ee.memoizedProps}catch(je){_t(ee,ee.return,je)}}}else if(c.tag===18){if(p===null){ee=c;try{var de=ee.stateNode;T?zL(de,!0):zL(ee.stateNode,!1)}catch(je){_t(ee,ee.return,je)}}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===s)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break e;for(;c.sibling===null;){if(c.return===null||c.return===s)break e;p===c&&(p=null),c=c.return}p===c&&(p=null),c.sibling.return=c.return,c=c.sibling}v&4&&(v=s.updateQueue,v!==null&&(p=v.retryQueue,p!==null&&(v.retryQueue=null,nv(s,p))));break;case 19:hr(c,s),pr(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,nv(s,v)));break;case 30:break;case 21:break;default:hr(c,s),pr(s)}}function pr(s){var c=s.flags;if(c&2){try{for(var p,v=s.return;v!==null;){if(FI(v)){p=v;break}v=v.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var T=p.stateNode,N=R1(s);tv(s,N,T);break;case 5:var B=p.stateNode;p.flags&32&&(Yu(B,""),p.flags&=-33);var W=R1(s);tv(s,W,B);break;case 3:case 4:var ee=p.stateNode.containerInfo,ue=R1(s);k1(s,ue,ee);break;default:throw Error(r(161))}}catch(pe){_t(s,s.return,pe)}s.flags&=-3}c&4096&&(s.flags&=-4097)}function QI(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var c=s;QI(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),s=s.sibling}}function $a(s,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)GI(s,c.alternate,c),c=c.sibling}function Tl(s){for(s=s.child;s!==null;){var c=s;switch(c.tag){case 0:case 11:case 14:case 15:Vo(4,c,c.return),Tl(c);break;case 1:Xi(c,c.return);var p=c.stateNode;typeof p.componentWillUnmount=="function"&&zI(c,c.return,p),Tl(c);break;case 27:Sh(c.stateNode);case 26:case 5:Xi(c,c.return),Tl(c);break;case 22:c.memoizedState===null&&Tl(c);break;case 30:Tl(c);break;default:Tl(c)}s=s.sibling}}function Ba(s,c,p){for(p=p&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var v=c.alternate,T=s,N=c,B=N.flags;switch(N.tag){case 0:case 11:case 15:Ba(T,N,p),dh(4,N);break;case 1:if(Ba(T,N,p),v=N,T=v.stateNode,typeof T.componentDidMount=="function")try{T.componentDidMount()}catch(ue){_t(v,v.return,ue)}if(v=N,T=v.updateQueue,T!==null){var W=v.stateNode;try{var ee=T.shared.hiddenCallbacks;if(ee!==null)for(T.shared.hiddenCallbacks=null,T=0;T<ee.length;T++)jD(ee[T],W)}catch(ue){_t(v,v.return,ue)}}p&&B&64&&qI(N),hh(N,N.return);break;case 27:UI(N);case 26:case 5:Ba(T,N,p),p&&v===null&&B&4&&VI(N),hh(N,N.return);break;case 12:Ba(T,N,p);break;case 31:Ba(T,N,p),p&&B&4&&YI(T,N);break;case 13:Ba(T,N,p),p&&B&4&&XI(T,N);break;case 22:N.memoizedState===null&&Ba(T,N,p),hh(N,N.return);break;case 30:break;default:Ba(T,N,p)}c=c.sibling}}function I1(s,c){var p=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),s=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(s=c.memoizedState.cachePool.pool),s!==p&&(s!=null&&s.refCount++,p!=null&&Jd(p))}function L1(s,c){s=null,c.alternate!==null&&(s=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==s&&(c.refCount++,s!=null&&Jd(s))}function wi(s,c,p,v){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)JI(s,c,p,v),c=c.sibling}function JI(s,c,p,v){var T=c.flags;switch(c.tag){case 0:case 11:case 15:wi(s,c,p,v),T&2048&&dh(9,c);break;case 1:wi(s,c,p,v);break;case 3:wi(s,c,p,v),T&2048&&(s=null,c.alternate!==null&&(s=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==s&&(c.refCount++,s!=null&&Jd(s)));break;case 12:if(T&2048){wi(s,c,p,v),s=c.stateNode;try{var N=c.memoizedProps,B=N.id,W=N.onPostCommit;typeof W=="function"&&W(B,c.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(ee){_t(c,c.return,ee)}}else wi(s,c,p,v);break;case 31:wi(s,c,p,v);break;case 13:wi(s,c,p,v);break;case 23:break;case 22:N=c.stateNode,B=c.alternate,c.memoizedState!==null?N._visibility&2?wi(s,c,p,v):ph(s,c):N._visibility&2?wi(s,c,p,v):(N._visibility|=2,mc(s,c,p,v,(c.subtreeFlags&10256)!==0||!1)),T&2048&&I1(B,c);break;case 24:wi(s,c,p,v),T&2048&&L1(c.alternate,c);break;default:wi(s,c,p,v)}}function mc(s,c,p,v,T){for(T=T&&((c.subtreeFlags&10256)!==0||!1),c=c.child;c!==null;){var N=s,B=c,W=p,ee=v,ue=B.flags;switch(B.tag){case 0:case 11:case 15:mc(N,B,W,ee,T),dh(8,B);break;case 23:break;case 22:var pe=B.stateNode;B.memoizedState!==null?pe._visibility&2?mc(N,B,W,ee,T):ph(N,B):(pe._visibility|=2,mc(N,B,W,ee,T)),T&&ue&2048&&I1(B.alternate,B);break;case 24:mc(N,B,W,ee,T),T&&ue&2048&&L1(B.alternate,B);break;default:mc(N,B,W,ee,T)}c=c.sibling}}function ph(s,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var p=s,v=c,T=v.flags;switch(v.tag){case 22:ph(p,v),T&2048&&I1(v.alternate,v);break;case 24:ph(p,v),T&2048&&L1(v.alternate,v);break;default:ph(p,v)}c=c.sibling}}var mh=8192;function gc(s,c,p){if(s.subtreeFlags&mh)for(s=s.child;s!==null;)eL(s,c,p),s=s.sibling}function eL(s,c,p){switch(s.tag){case 26:gc(s,c,p),s.flags&mh&&s.memoizedState!==null&&die(p,xi,s.memoizedState,s.memoizedProps);break;case 5:gc(s,c,p);break;case 3:case 4:var v=xi;xi=gv(s.stateNode.containerInfo),gc(s,c,p),xi=v;break;case 22:s.memoizedState===null&&(v=s.alternate,v!==null&&v.memoizedState!==null?(v=mh,mh=16777216,gc(s,c,p),mh=v):gc(s,c,p));break;default:gc(s,c,p)}}function tL(s){var c=s.alternate;if(c!==null&&(s=c.child,s!==null)){c.child=null;do c=s.sibling,s.sibling=null,s=c;while(s!==null)}}function gh(s){var c=s.deletions;if((s.flags&16)!==0){if(c!==null)for(var p=0;p<c.length;p++){var v=c[p];On=v,rL(v,s)}tL(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)nL(s),s=s.sibling}function nL(s){switch(s.tag){case 0:case 11:case 15:gh(s),s.flags&2048&&Vo(9,s,s.return);break;case 3:gh(s);break;case 12:gh(s);break;case 22:var c=s.stateNode;s.memoizedState!==null&&c._visibility&2&&(s.return===null||s.return.tag!==13)?(c._visibility&=-3,rv(s)):gh(s);break;default:gh(s)}}function rv(s){var c=s.deletions;if((s.flags&16)!==0){if(c!==null)for(var p=0;p<c.length;p++){var v=c[p];On=v,rL(v,s)}tL(s)}for(s=s.child;s!==null;){switch(c=s,c.tag){case 0:case 11:case 15:Vo(8,c,c.return),rv(c);break;case 22:p=c.stateNode,p._visibility&2&&(p._visibility&=-3,rv(c));break;default:rv(c)}s=s.sibling}}function rL(s,c){for(;On!==null;){var p=On;switch(p.tag){case 0:case 11:case 15:Vo(8,p,c);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var v=p.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:Jd(p.memoizedState.cache)}if(v=p.child,v!==null)v.return=p,On=v;else e:for(p=s;On!==null;){v=On;var T=v.sibling,N=v.return;if(WI(v),v===p){On=null;break e}if(T!==null){T.return=N,On=T;break e}On=N}}}var Tre={getCacheForType:function(s){var c=kn(cn),p=c.data.get(s);return p===void 0&&(p=s(),c.data.set(s,p)),p},cacheSignal:function(){return kn(cn).controller.signal}},Ore=typeof WeakMap=="function"?WeakMap:Map,vt=0,Mt=null,Qe=null,rt=0,St=0,Nr=null,Fo=!1,vc=!1,$1=!1,qa=0,tn=0,Uo=0,Ol=0,B1=0,Pr=0,yc=0,vh=null,mr=null,q1=!1,iv=0,iL=0,av=1/0,ov=null,Ho=null,wn=0,Go=null,bc=null,za=0,z1=0,V1=null,aL=null,yh=0,F1=null;function Mr(){return(vt&2)!==0&&rt!==0?rt&-rt:L.T!==null?Y1():cg()}function oL(){if(Pr===0)if((rt&536870912)===0||st){var s=Fu;Fu<<=1,(Fu&3932160)===0&&(Fu=262144),Pr=s}else Pr=536870912;return s=Or.current,s!==null&&(s.flags|=32),Pr}function gr(s,c,p){(s===Mt&&(St===2||St===9)||s.cancelPendingCommit!==null)&&(xc(s,0),Wo(s,rt,Pr,!1)),ul(s,p),((vt&2)===0||s!==Mt)&&(s===Mt&&((vt&2)===0&&(Ol|=p),tn===4&&Wo(s,rt,Pr,!1)),Zi(s))}function sL(s,c,p){if((vt&6)!==0)throw Error(r(327));var v=!p&&(c&127)===0&&(c&s.expiredLanes)===0||ll(s,c),T=v?Pre(s,c):H1(s,c,!0),N=v;do{if(T===0){vc&&!v&&Wo(s,c,0,!1);break}else{if(p=s.current.alternate,N&&!jre(p)){T=H1(s,c,!1),N=!1;continue}if(T===2){if(N=c,s.errorRecoveryDisabledLanes&N)var B=0;else B=s.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){c=B;e:{var W=s;T=vh;var ee=W.current.memoizedState.isDehydrated;if(ee&&(xc(W,B).flags|=256),B=H1(W,B,!1),B!==2){if($1&&!ee){W.errorRecoveryDisabledLanes|=N,Ol|=N,T=4;break e}N=mr,mr=T,N!==null&&(mr===null?mr=N:mr.push.apply(mr,N))}T=B}if(N=!1,T!==2)continue}}if(T===1){xc(s,0),Wo(s,c,0,!0);break}e:{switch(v=s,N=T,N){case 0:case 1:throw Error(r(345));case 4:if((c&4194048)!==c)break;case 6:Wo(v,c,Pr,!Fo);break e;case 2:mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((c&62914560)===c&&(T=iv+300-At(),10<T)){if(Wo(v,c,Pr,!Fo),Hu(v,0,!0)!==0)break e;za=c,v.timeoutHandle=$L(lL.bind(null,v,p,mr,ov,q1,c,Pr,Ol,yc,Fo,N,"Throttled",-0,0),T);break e}lL(v,p,mr,ov,q1,c,Pr,Ol,yc,Fo,N,null,-0,0)}}break}while(!0);Zi(s)}function lL(s,c,p,v,T,N,B,W,ee,ue,pe,ve,ce,de){if(s.timeoutHandle=-1,ve=c.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ca},eL(c,N,ve);var je=(N&62914560)===N?iv-At():(N&4194048)===N?iL-At():0;if(je=hie(ve,je),je!==null){za=N,s.cancelPendingCommit=je(gL.bind(null,s,c,N,p,v,T,B,W,ee,pe,ve,null,ce,de)),Wo(s,N,B,!ue);return}}gL(s,c,N,p,v,T,B,W,ee)}function jre(s){for(var c=s;;){var p=c.tag;if((p===0||p===11||p===15)&&c.flags&16384&&(p=c.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var v=0;v<p.length;v++){var T=p[v],N=T.getSnapshot;T=T.value;try{if(!Cr(N(),T))return!1}catch{return!1}}if(p=c.child,c.subtreeFlags&16384&&p!==null)p.return=c,c=p;else{if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Wo(s,c,p,v){c&=~B1,c&=~Ol,s.suspendedLanes|=c,s.pingedLanes&=~c,v&&(s.warmLanes|=c),v=s.expirationTimes;for(var T=c;0<T;){var N=31-Zn(T),B=1<<N;v[N]=-1,T&=~B}p!==0&&sg(s,p,c)}function sv(){return(vt&6)===0?(bh(0),!1):!0}function U1(){if(Qe!==null){if(St===0)var s=Qe.return;else s=Qe,Na=bl=null,o1(s),cc=null,th=0,s=Qe;for(;s!==null;)BI(s.alternate,s),s=s.return;Qe=null}}function xc(s,c){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,Yre(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),za=0,U1(),Mt=s,Qe=p=Oa(s.current,null),rt=c,St=0,Nr=null,Fo=!1,vc=ll(s,c),$1=!1,yc=Pr=B1=Ol=Uo=tn=0,mr=vh=null,q1=!1,(c&8)!==0&&(c|=c&32);var v=s.entangledLanes;if(v!==0)for(s=s.entanglements,v&=c;0<v;){var T=31-Zn(v),N=1<<T;c|=s[T],v&=~N}return qa=c,Og(),p}function uL(s,c){Ue=null,L.H=uh,c===uc||c===Ig?(c=AD(),St=3):c===Kw?(c=AD(),St=4):St=c===S1?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,Nr=c,Qe===null&&(tn=1,Xg(s,Wr(c,s.current)))}function cL(){var s=Or.current;return s===null?!0:(rt&4194048)===rt?Zr===null:(rt&62914560)===rt||(rt&536870912)!==0?s===Zr:!1}function fL(){var s=L.H;return L.H=uh,s===null?uh:s}function dL(){var s=L.A;return L.A=Tre,s}function lv(){tn=4,Fo||(rt&4194048)!==rt&&Or.current!==null||(vc=!0),(Uo&134217727)===0&&(Ol&134217727)===0||Mt===null||Wo(Mt,rt,Pr,!1)}function H1(s,c,p){var v=vt;vt|=2;var T=fL(),N=dL();(Mt!==s||rt!==c)&&(ov=null,xc(s,c)),c=!1;var B=tn;e:do try{if(St!==0&&Qe!==null){var W=Qe,ee=Nr;switch(St){case 8:U1(),B=6;break e;case 3:case 2:case 9:case 6:Or.current===null&&(c=!0);var ue=St;if(St=0,Nr=null,wc(s,W,ee,ue),p&&vc){B=0;break e}break;default:ue=St,St=0,Nr=null,wc(s,W,ee,ue)}}Nre(),B=tn;break}catch(pe){uL(s,pe)}while(!0);return c&&s.shellSuspendCounter++,Na=bl=null,vt=v,L.H=T,L.A=N,Qe===null&&(Mt=null,rt=0,Og()),B}function Nre(){for(;Qe!==null;)hL(Qe)}function Pre(s,c){var p=vt;vt|=2;var v=fL(),T=dL();Mt!==s||rt!==c?(ov=null,av=At()+500,xc(s,c)):vc=ll(s,c);e:do try{if(St!==0&&Qe!==null){c=Qe;var N=Nr;t:switch(St){case 1:St=0,Nr=null,wc(s,c,N,1);break;case 2:case 9:if(_D(N)){St=0,Nr=null,pL(c);break}c=function(){St!==2&&St!==9||Mt!==s||(St=7),Zi(s)},N.then(c,c);break e;case 3:St=7;break e;case 4:St=5;break e;case 7:_D(N)?(St=0,Nr=null,pL(c)):(St=0,Nr=null,wc(s,c,N,7));break;case 5:var B=null;switch(Qe.tag){case 26:B=Qe.memoizedState;case 5:case 27:var W=Qe;if(B?JL(B):W.stateNode.complete){St=0,Nr=null;var ee=W.sibling;if(ee!==null)Qe=ee;else{var ue=W.return;ue!==null?(Qe=ue,uv(ue)):Qe=null}break t}}St=0,Nr=null,wc(s,c,N,5);break;case 6:St=0,Nr=null,wc(s,c,N,6);break;case 8:U1(),tn=6;break e;default:throw Error(r(462))}}Mre();break}catch(pe){uL(s,pe)}while(!0);return Na=bl=null,L.H=v,L.A=T,vt=p,Qe!==null?0:(Mt=null,rt=0,Og(),tn)}function Mre(){for(;Qe!==null&&!Pt();)hL(Qe)}function hL(s){var c=LI(s.alternate,s,qa);s.memoizedProps=s.pendingProps,c===null?uv(s):Qe=c}function pL(s){var c=s,p=c.alternate;switch(c.tag){case 15:case 0:c=PI(p,c,c.pendingProps,c.type,void 0,rt);break;case 11:c=PI(p,c,c.pendingProps,c.type.render,c.ref,rt);break;case 5:o1(c);default:BI(p,c),c=Qe=dD(c,qa),c=LI(p,c,qa)}s.memoizedProps=s.pendingProps,c===null?uv(s):Qe=c}function wc(s,c,p,v){Na=bl=null,o1(c),cc=null,th=0;var T=c.return;try{if(xre(s,T,c,p,rt)){tn=1,Xg(s,Wr(p,s.current)),Qe=null;return}}catch(N){if(T!==null)throw Qe=T,N;tn=1,Xg(s,Wr(p,s.current)),Qe=null;return}c.flags&32768?(st||v===1?s=!0:vc||(rt&536870912)!==0?s=!1:(Fo=s=!0,(v===2||v===9||v===3||v===6)&&(v=Or.current,v!==null&&v.tag===13&&(v.flags|=16384))),mL(c,s)):uv(c)}function uv(s){var c=s;do{if((c.flags&32768)!==0){mL(c,Fo);return}s=c.return;var p=_re(c.alternate,c,qa);if(p!==null){Qe=p;return}if(c=c.sibling,c!==null){Qe=c;return}Qe=c=s}while(c!==null);tn===0&&(tn=5)}function mL(s,c){do{var p=Ere(s.alternate,s);if(p!==null){p.flags&=32767,Qe=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!c&&(s=s.sibling,s!==null)){Qe=s;return}Qe=s=p}while(s!==null);tn=6,Qe=null}function gL(s,c,p,v,T,N,B,W,ee){s.cancelPendingCommit=null;do cv();while(wn!==0);if((vt&6)!==0)throw Error(r(327));if(c!==null){if(c===s.current)throw Error(r(177));if(N=c.lanes|c.childLanes,N|=Rw,uw(s,p,N,B,W,ee),s===Mt&&(Qe=Mt=null,rt=0),bc=c,Go=s,za=p,z1=N,V1=T,aL=v,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,Ire(Vn,function(){return wL(),null})):(s.callbackNode=null,s.callbackPriority=0),v=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||v){v=L.T,L.T=null,T=z.p,z.p=2,B=vt,vt|=4;try{Are(s,c,p)}finally{vt=B,z.p=T,L.T=v}}wn=1,vL(),yL(),bL()}}function vL(){if(wn===1){wn=0;var s=Go,c=bc,p=(c.flags&13878)!==0;if((c.subtreeFlags&13878)!==0||p){p=L.T,L.T=null;var v=z.p;z.p=2;var T=vt;vt|=4;try{ZI(c,s);var N=rS,B=rD(s.containerInfo),W=N.focusedElem,ee=N.selectionRange;if(B!==W&&W&&W.ownerDocument&&nD(W.ownerDocument.documentElement,W)){if(ee!==null&&Ow(W)){var ue=ee.start,pe=ee.end;if(pe===void 0&&(pe=ue),"selectionStart"in W)W.selectionStart=ue,W.selectionEnd=Math.min(pe,W.value.length);else{var ve=W.ownerDocument||document,ce=ve&&ve.defaultView||window;if(ce.getSelection){var de=ce.getSelection(),je=W.textContent.length,$e=Math.min(ee.start,je),Ot=ee.end===void 0?$e:Math.min(ee.end,je);!de.extend&&$e>Ot&&(B=Ot,Ot=$e,$e=B);var se=tD(W,$e),ae=tD(W,Ot);if(se&&ae&&(de.rangeCount!==1||de.anchorNode!==se.node||de.anchorOffset!==se.offset||de.focusNode!==ae.node||de.focusOffset!==ae.offset)){var le=ve.createRange();le.setStart(se.node,se.offset),de.removeAllRanges(),$e>Ot?(de.addRange(le),de.extend(ae.node,ae.offset)):(le.setEnd(ae.node,ae.offset),de.addRange(le))}}}}for(ve=[],de=W;de=de.parentNode;)de.nodeType===1&&ve.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof W.focus=="function"&&W.focus(),W=0;W<ve.length;W++){var ge=ve[W];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}Sv=!!nS,rS=nS=null}finally{vt=T,z.p=v,L.T=p}}s.current=c,wn=2}}function yL(){if(wn===2){wn=0;var s=Go,c=bc,p=(c.flags&8772)!==0;if((c.subtreeFlags&8772)!==0||p){p=L.T,L.T=null;var v=z.p;z.p=2;var T=vt;vt|=4;try{GI(s,c.alternate,c)}finally{vt=T,z.p=v,L.T=p}}wn=3}}function bL(){if(wn===4||wn===3){wn=0,Et();var s=Go,c=bc,p=za,v=aL;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?wn=5:(wn=0,bc=Go=null,xL(s,s.pendingLanes));var T=s.pendingLanes;if(T===0&&(Ho=null),$d(p),c=c.stateNode,Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Fn,c,void 0,(c.current.flags&128)===128)}catch{}if(v!==null){c=L.T,T=z.p,z.p=2,L.T=null;try{for(var N=s.onRecoverableError,B=0;B<v.length;B++){var W=v[B];N(W.value,{componentStack:W.stack})}}finally{L.T=c,z.p=T}}(za&3)!==0&&cv(),Zi(s),T=s.pendingLanes,(p&261930)!==0&&(T&42)!==0?s===F1?yh++:(yh=0,F1=s):yh=0,bh(0)}}function xL(s,c){(s.pooledCacheLanes&=c)===0&&(c=s.pooledCache,c!=null&&(s.pooledCache=null,Jd(c)))}function cv(){return vL(),yL(),bL(),wL()}function wL(){if(wn!==5)return!1;var s=Go,c=z1;z1=0;var p=$d(za),v=L.T,T=z.p;try{z.p=32>p?32:p,L.T=null,p=V1,V1=null;var N=Go,B=za;if(wn=0,bc=Go=null,za=0,(vt&6)!==0)throw Error(r(331));var W=vt;if(vt|=4,nL(N.current),JI(N,N.current,B,p),vt=W,bh(0,!1),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Fn,N)}catch{}return!0}finally{z.p=T,L.T=v,xL(s,c)}}function SL(s,c,p){c=Wr(p,c),c=w1(s.stateNode,c,2),s=Bo(s,c,2),s!==null&&(ul(s,2),Zi(s))}function _t(s,c,p){if(s.tag===3)SL(s,s,p);else for(;c!==null;){if(c.tag===3){SL(c,s,p);break}else if(c.tag===1){var v=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Ho===null||!Ho.has(v))){s=Wr(p,s),p=_I(2),v=Bo(c,p,2),v!==null&&(EI(p,v,c,s),ul(v,2),Zi(v));break}}c=c.return}}function G1(s,c,p){var v=s.pingCache;if(v===null){v=s.pingCache=new Ore;var T=new Set;v.set(c,T)}else T=v.get(c),T===void 0&&(T=new Set,v.set(c,T));T.has(p)||($1=!0,T.add(p),s=Rre.bind(null,s,c,p),c.then(s,s))}function Rre(s,c,p){var v=s.pingCache;v!==null&&v.delete(c),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,Mt===s&&(rt&p)===p&&(tn===4||tn===3&&(rt&62914560)===rt&&300>At()-iv?(vt&2)===0&&xc(s,0):B1|=p,yc===rt&&(yc=0)),Zi(s)}function _L(s,c){c===0&&(c=og()),s=gl(s,c),s!==null&&(ul(s,c),Zi(s))}function kre(s){var c=s.memoizedState,p=0;c!==null&&(p=c.retryLane),_L(s,p)}function Dre(s,c){var p=0;switch(s.tag){case 31:case 13:var v=s.stateNode,T=s.memoizedState;T!==null&&(p=T.retryLane);break;case 19:v=s.stateNode;break;case 22:v=s.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(c),_L(s,p)}function Ire(s,c){return Lt(s,c)}var fv=null,Sc=null,W1=!1,dv=!1,K1=!1,Ko=0;function Zi(s){s!==Sc&&s.next===null&&(Sc===null?fv=Sc=s:Sc=Sc.next=s),dv=!0,W1||(W1=!0,$re())}function bh(s,c){if(!K1&&dv){K1=!0;do for(var p=!1,v=fv;v!==null;){if(s!==0){var T=v.pendingLanes;if(T===0)var N=0;else{var B=v.suspendedLanes,W=v.pingedLanes;N=(1<<31-Zn(42|s)+1)-1,N&=T&~(B&~W),N=N&201326741?N&201326741|1:N?N|2:0}N!==0&&(p=!0,TL(v,N))}else N=rt,N=Hu(v,v===Mt?N:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(N&3)===0||ll(v,N)||(p=!0,TL(v,N));v=v.next}while(p);K1=!1}}function Lre(){EL()}function EL(){dv=W1=!1;var s=0;Ko!==0&&Kre()&&(s=Ko);for(var c=At(),p=null,v=fv;v!==null;){var T=v.next,N=AL(v,c);N===0?(v.next=null,p===null?fv=T:p.next=T,T===null&&(Sc=p)):(p=v,(s!==0||(N&3)!==0)&&(dv=!0)),v=T}wn!==0&&wn!==5||bh(s),Ko!==0&&(Ko=0)}function AL(s,c){for(var p=s.suspendedLanes,v=s.pingedLanes,T=s.expirationTimes,N=s.pendingLanes&-62914561;0<N;){var B=31-Zn(N),W=1<<B,ee=T[B];ee===-1?((W&p)===0||(W&v)!==0)&&(T[B]=lw(W,c)):ee<=c&&(s.expiredLanes|=W),N&=~W}if(c=Mt,p=rt,p=Hu(s,s===c?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v=s.callbackNode,p===0||s===c&&(St===2||St===9)||s.cancelPendingCommit!==null)return v!==null&&v!==null&&Ut(v),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||ll(s,p)){if(c=p&-p,c===s.callbackPriority)return c;switch(v!==null&&Ut(v),$d(p)){case 2:case 8:p=bn;break;case 32:p=Vn;break;case 268435456:p=wa;break;default:p=Vn}return v=CL.bind(null,s),p=Lt(p,v),s.callbackPriority=c,s.callbackNode=p,c}return v!==null&&v!==null&&Ut(v),s.callbackPriority=2,s.callbackNode=null,2}function CL(s,c){if(wn!==0&&wn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(cv()&&s.callbackNode!==p)return null;var v=rt;return v=Hu(s,s===Mt?v:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v===0?null:(sL(s,v,c),AL(s,At()),s.callbackNode!=null&&s.callbackNode===p?CL.bind(null,s):null)}function TL(s,c){if(cv())return null;sL(s,c,!0)}function $re(){Xre(function(){(vt&6)!==0?Lt($t,Lre):EL()})}function Y1(){if(Ko===0){var s=sc;s===0&&(s=Vu,Vu<<=1,(Vu&261888)===0&&(Vu=256)),Ko=s}return Ko}function OL(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:xg(""+s)}function jL(s,c){var p=c.ownerDocument.createElement("input");return p.name=c.name,p.value=c.value,s.id&&p.setAttribute("form",s.id),c.parentNode.insertBefore(p,c),s=new FormData(s),p.parentNode.removeChild(p),s}function Bre(s,c,p,v,T){if(c==="submit"&&p&&p.stateNode===T){var N=OL((T[Un]||null).action),B=v.submitter;B&&(c=(c=B[Un]||null)?OL(c.formAction):B.getAttribute("formAction"),c!==null&&(N=c,B=null));var W=new Eg("action","action",null,v,T);s.push({event:W,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(Ko!==0){var ee=B?jL(T,B):new FormData(T);m1(p,{pending:!0,data:ee,method:T.method,action:N},null,ee)}}else typeof N=="function"&&(W.preventDefault(),ee=B?jL(T,B):new FormData(T),m1(p,{pending:!0,data:ee,method:T.method,action:N},N,ee))},currentTarget:T}]})}}for(var X1=0;X1<Mw.length;X1++){var Z1=Mw[X1],qre=Z1.toLowerCase(),zre=Z1[0].toUpperCase()+Z1.slice(1);bi(qre,"on"+zre)}bi(oD,"onAnimationEnd"),bi(sD,"onAnimationIteration"),bi(lD,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi(rre,"onTransitionRun"),bi(ire,"onTransitionStart"),bi(are,"onTransitionCancel"),bi(uD,"onTransitionEnd"),No("onMouseEnter",["mouseout","mouseover"]),No("onMouseLeave",["mouseout","mouseover"]),No("onPointerEnter",["pointerout","pointerover"]),No("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xh="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(" "),Vre=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xh));function NL(s,c){c=(c&4)!==0;for(var p=0;p<s.length;p++){var v=s[p],T=v.event;v=v.listeners;e:{var N=void 0;if(c)for(var B=v.length-1;0<=B;B--){var W=v[B],ee=W.instance,ue=W.currentTarget;if(W=W.listener,ee!==N&&T.isPropagationStopped())break e;N=W,T.currentTarget=ue;try{N(T)}catch(pe){Tg(pe)}T.currentTarget=null,N=ee}else for(B=0;B<v.length;B++){if(W=v[B],ee=W.instance,ue=W.currentTarget,W=W.listener,ee!==N&&T.isPropagationStopped())break e;N=W,T.currentTarget=ue;try{N(T)}catch(pe){Tg(pe)}T.currentTarget=null,N=ee}}}}function Je(s,c){var p=c[Gu];p===void 0&&(p=c[Gu]=new Set);var v=s+"__bubble";p.has(v)||(PL(c,s,2,!1),p.add(v))}function Q1(s,c,p){var v=0;c&&(v|=4),PL(p,s,v,c)}var hv="_reactListening"+Math.random().toString(36).slice(2);function J1(s){if(!s[hv]){s[hv]=!0,pg.forEach(function(p){p!=="selectionchange"&&(Vre.has(p)||Q1(p,!1,s),Q1(p,!0,s))});var c=s.nodeType===9?s:s.ownerDocument;c===null||c[hv]||(c[hv]=!0,Q1("selectionchange",!1,c))}}function PL(s,c,p,v){switch(o$(c)){case 2:var T=gie;break;case 8:T=vie;break;default:T=pS}p=T.bind(null,c,p,s),T=void 0,!bw||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(T=!0),v?T!==void 0?s.addEventListener(c,p,{capture:!0,passive:T}):s.addEventListener(c,p,!0):T!==void 0?s.addEventListener(c,p,{passive:T}):s.addEventListener(c,p,!1)}function eS(s,c,p,v,T){var N=v;if((c&1)===0&&(c&2)===0&&v!==null)e:for(;;){if(v===null)return;var B=v.tag;if(B===3||B===4){var W=v.stateNode.containerInfo;if(W===T)break;if(B===4)for(B=v.return;B!==null;){var ee=B.tag;if((ee===3||ee===4)&&B.stateNode.containerInfo===T)return;B=B.return}for(;W!==null;){if(B=Co(W),B===null)return;if(ee=B.tag,ee===5||ee===6||ee===26||ee===27){v=N=B;continue e}W=W.parentNode}}v=v.return}Ik(function(){var ue=N,pe=vw(p),ve=[];e:{var ce=cD.get(s);if(ce!==void 0){var de=Eg,je=s;switch(s){case"keypress":if(Sg(p)===0)break e;case"keydown":case"keyup":de=Dne;break;case"focusin":je="focus",de=_w;break;case"focusout":je="blur",de=_w;break;case"beforeblur":case"afterblur":de=_w;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=Bk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=_ne;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=$ne;break;case oD:case sD:case lD:de=Cne;break;case uD:de=qne;break;case"scroll":case"scrollend":de=wne;break;case"wheel":de=Vne;break;case"copy":case"cut":case"paste":de=One;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=zk;break;case"toggle":case"beforetoggle":de=Une}var $e=(c&4)!==0,Ot=!$e&&(s==="scroll"||s==="scrollend"),se=$e?ce!==null?ce+"Capture":null:ce;$e=[];for(var ae=ue,le;ae!==null;){var ge=ae;if(le=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||le===null||se===null||(ge=Vd(ae,se),ge!=null&&$e.push(wh(ae,ge,le))),Ot)break;ae=ae.return}0<$e.length&&(ce=new de(ce,je,null,p,pe),ve.push({event:ce,listeners:$e}))}}if((c&7)===0){e:{if(ce=s==="mouseover"||s==="pointerover",de=s==="mouseout"||s==="pointerout",ce&&p!==gw&&(je=p.relatedTarget||p.fromElement)&&(Co(je)||je[_a]))break e;if((de||ce)&&(ce=pe.window===pe?pe:(ce=pe.ownerDocument)?ce.defaultView||ce.parentWindow:window,de?(je=p.relatedTarget||p.toElement,de=ue,je=je?Co(je):null,je!==null&&(Ot=a(je),$e=je.tag,je!==Ot||$e!==5&&$e!==27&&$e!==6)&&(je=null)):(de=null,je=ue),de!==je)){if($e=Bk,ge="onMouseLeave",se="onMouseEnter",ae="mouse",(s==="pointerout"||s==="pointerover")&&($e=zk,ge="onPointerLeave",se="onPointerEnter",ae="pointer"),Ot=de==null?ce:Oo(de),le=je==null?ce:Oo(je),ce=new $e(ge,ae+"leave",de,p,pe),ce.target=Ot,ce.relatedTarget=le,ge=null,Co(pe)===ue&&($e=new $e(se,ae+"enter",je,p,pe),$e.target=le,$e.relatedTarget=Ot,ge=$e),Ot=ge,de&&je)t:{for($e=Fre,se=de,ae=je,le=0,ge=se;ge;ge=$e(ge))le++;ge=0;for(var Le=ae;Le;Le=$e(Le))ge++;for(;0<le-ge;)se=$e(se),le--;for(;0<ge-le;)ae=$e(ae),ge--;for(;le--;){if(se===ae||ae!==null&&se===ae.alternate){$e=se;break t}se=$e(se),ae=$e(ae)}$e=null}else $e=null;de!==null&&ML(ve,ce,de,$e,!1),je!==null&&Ot!==null&&ML(ve,Ot,je,$e,!0)}}e:{if(ce=ue?Oo(ue):window,de=ce.nodeName&&ce.nodeName.toLowerCase(),de==="select"||de==="input"&&ce.type==="file")var ht=Yk;else if(Wk(ce))if(Xk)ht=ere;else{ht=Qne;var Me=Zne}else de=ce.nodeName,!de||de.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?ue&&mw(ue.elementType)&&(ht=Yk):ht=Jne;if(ht&&(ht=ht(s,ue))){Kk(ve,ht,p,pe);break e}Me&&Me(s,ce,ue),s==="focusout"&&ue&&ce.type==="number"&&ue.memoizedProps.value!=null&&zd(ce,"number",ce.value)}switch(Me=ue?Oo(ue):window,s){case"focusin":(Wk(Me)||Me.contentEditable==="true")&&(Ju=Me,jw=ue,Xd=null);break;case"focusout":Xd=jw=Ju=null;break;case"mousedown":Nw=!0;break;case"contextmenu":case"mouseup":case"dragend":Nw=!1,iD(ve,p,pe);break;case"selectionchange":if(nre)break;case"keydown":case"keyup":iD(ve,p,pe)}var We;if(Aw)e:{switch(s){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else Qu?Hk(s,p)&&(it="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(it="onCompositionStart");it&&(Vk&&p.locale!=="ko"&&(Qu||it!=="onCompositionStart"?it==="onCompositionEnd"&&Qu&&(We=Lk()):(Mo=pe,xw="value"in Mo?Mo.value:Mo.textContent,Qu=!0)),Me=pv(ue,it),0<Me.length&&(it=new qk(it,s,null,p,pe),ve.push({event:it,listeners:Me}),We?it.data=We:(We=Gk(p),We!==null&&(it.data=We)))),(We=Gne?Wne(s,p):Kne(s,p))&&(it=pv(ue,"onBeforeInput"),0<it.length&&(Me=new qk("onBeforeInput","beforeinput",null,p,pe),ve.push({event:Me,listeners:it}),Me.data=We)),Bre(ve,s,ue,p,pe)}NL(ve,c)})}function wh(s,c,p){return{instance:s,listener:c,currentTarget:p}}function pv(s,c){for(var p=c+"Capture",v=[];s!==null;){var T=s,N=T.stateNode;if(T=T.tag,T!==5&&T!==26&&T!==27||N===null||(T=Vd(s,p),T!=null&&v.unshift(wh(s,T,N)),T=Vd(s,c),T!=null&&v.push(wh(s,T,N))),s.tag===3)return v;s=s.return}return[]}function Fre(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function ML(s,c,p,v,T){for(var N=c._reactName,B=[];p!==null&&p!==v;){var W=p,ee=W.alternate,ue=W.stateNode;if(W=W.tag,ee!==null&&ee===v)break;W!==5&&W!==26&&W!==27||ue===null||(ee=ue,T?(ue=Vd(p,N),ue!=null&&B.unshift(wh(p,ue,ee))):T||(ue=Vd(p,N),ue!=null&&B.push(wh(p,ue,ee)))),p=p.return}B.length!==0&&s.push({event:c,listeners:B})}var Ure=/\r\n?/g,Hre=/\u0000|\uFFFD/g;function RL(s){return(typeof s=="string"?s:""+s).replace(Ure,`
|
|
49
|
+
`).replace(Hre,"")}function kL(s,c){return c=RL(c),RL(s)===c}function Tt(s,c,p,v,T,N){switch(p){case"children":typeof v=="string"?c==="body"||c==="textarea"&&v===""||Yu(s,v):(typeof v=="number"||typeof v=="bigint")&&c!=="body"&&Yu(s,""+v);break;case"className":Ku(s,"class",v);break;case"tabIndex":Ku(s,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":Ku(s,p,v);break;case"style":kk(s,v,N);break;case"data":if(c!=="object"){Ku(s,"data",v);break}case"src":case"href":if(v===""&&(c!=="a"||p!=="href")){s.removeAttribute(p);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){s.removeAttribute(p);break}v=xg(""+v),s.setAttribute(p,v);break;case"action":case"formAction":if(typeof v=="function"){s.setAttribute(p,"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 N=="function"&&(p==="formAction"?(c!=="input"&&Tt(s,c,"name",T.name,T,null),Tt(s,c,"formEncType",T.formEncType,T,null),Tt(s,c,"formMethod",T.formMethod,T,null),Tt(s,c,"formTarget",T.formTarget,T,null)):(Tt(s,c,"encType",T.encType,T,null),Tt(s,c,"method",T.method,T,null),Tt(s,c,"target",T.target,T,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){s.removeAttribute(p);break}v=xg(""+v),s.setAttribute(p,v);break;case"onClick":v!=null&&(s.onclick=Ca);break;case"onScroll":v!=null&&Je("scroll",s);break;case"onScrollEnd":v!=null&&Je("scrollend",s);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(p=v.__html,p!=null){if(T.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"multiple":s.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":s.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){s.removeAttribute("xlink:href");break}p=xg(""+v),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(p,""+v):s.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":v&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(p,""):s.removeAttribute(p);break;case"capture":case"download":v===!0?s.setAttribute(p,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(p,v):s.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?s.setAttribute(p,v):s.removeAttribute(p);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?s.removeAttribute(p):s.setAttribute(p,v);break;case"popover":Je("beforetoggle",s),Je("toggle",s),Wu(s,"popover",v);break;case"xlinkActuate":yi(s,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":yi(s,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":yi(s,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":yi(s,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":yi(s,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":yi(s,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":yi(s,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":yi(s,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":yi(s,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":Wu(s,"is",v);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=bne.get(p)||p,Wu(s,p,v))}}function tS(s,c,p,v,T,N){switch(p){case"style":kk(s,v,N);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(p=v.__html,p!=null){if(T.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"children":typeof v=="string"?Yu(s,v):(typeof v=="number"||typeof v=="bigint")&&Yu(s,""+v);break;case"onScroll":v!=null&&Je("scroll",s);break;case"onScrollEnd":v!=null&&Je("scrollend",s);break;case"onClick":v!=null&&(s.onclick=Ca);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!mg.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(T=p.endsWith("Capture"),c=p.slice(2,T?p.length-7:void 0),N=s[Un]||null,N=N!=null?N[p]:null,typeof N=="function"&&s.removeEventListener(c,N,T),typeof v=="function")){typeof N!="function"&&N!==null&&(p in s?s[p]=null:s.hasAttribute(p)&&s.removeAttribute(p)),s.addEventListener(c,v,T);break e}p in s?s[p]=v:v===!0?s.setAttribute(p,""):Wu(s,p,v)}}}function In(s,c,p){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Je("error",s),Je("load",s);var v=!1,T=!1,N;for(N in p)if(p.hasOwnProperty(N)){var B=p[N];if(B!=null)switch(N){case"src":v=!0;break;case"srcSet":T=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:Tt(s,c,N,B,p,null)}}T&&Tt(s,c,"srcSet",p.srcSet,p,null),v&&Tt(s,c,"src",p.src,p,null);return;case"input":Je("invalid",s);var W=N=B=T=null,ee=null,ue=null;for(v in p)if(p.hasOwnProperty(v)){var pe=p[v];if(pe!=null)switch(v){case"name":T=pe;break;case"type":B=pe;break;case"checked":ee=pe;break;case"defaultChecked":ue=pe;break;case"value":N=pe;break;case"defaultValue":W=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,c));break;default:Tt(s,c,v,pe,p,null)}}bg(s,N,W,ee,ue,B,T,!1);return;case"select":Je("invalid",s),v=B=N=null;for(T in p)if(p.hasOwnProperty(T)&&(W=p[T],W!=null))switch(T){case"value":N=W;break;case"defaultValue":B=W;break;case"multiple":v=W;default:Tt(s,c,T,W,p,null)}c=N,p=B,s.multiple=!!v,c!=null?Aa(s,!!v,c,!1):p!=null&&Aa(s,!!v,p,!0);return;case"textarea":Je("invalid",s),N=T=v=null;for(B in p)if(p.hasOwnProperty(B)&&(W=p[B],W!=null))switch(B){case"value":v=W;break;case"defaultValue":T=W;break;case"children":N=W;break;case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(91));break;default:Tt(s,c,B,W,p,null)}Mk(s,v,T,N);return;case"option":for(ee in p)if(p.hasOwnProperty(ee)&&(v=p[ee],v!=null))switch(ee){case"selected":s.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:Tt(s,c,ee,v,p,null)}return;case"dialog":Je("beforetoggle",s),Je("toggle",s),Je("cancel",s),Je("close",s);break;case"iframe":case"object":Je("load",s);break;case"video":case"audio":for(v=0;v<xh.length;v++)Je(xh[v],s);break;case"image":Je("error",s),Je("load",s);break;case"details":Je("toggle",s);break;case"embed":case"source":case"link":Je("error",s),Je("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in p)if(p.hasOwnProperty(ue)&&(v=p[ue],v!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:Tt(s,c,ue,v,p,null)}return;default:if(mw(c)){for(pe in p)p.hasOwnProperty(pe)&&(v=p[pe],v!==void 0&&tS(s,c,pe,v,p,void 0));return}}for(W in p)p.hasOwnProperty(W)&&(v=p[W],v!=null&&Tt(s,c,W,v,p,null))}function Gre(s,c,p,v){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var T=null,N=null,B=null,W=null,ee=null,ue=null,pe=null;for(de in p){var ve=p[de];if(p.hasOwnProperty(de)&&ve!=null)switch(de){case"checked":break;case"value":break;case"defaultValue":ee=ve;default:v.hasOwnProperty(de)||Tt(s,c,de,null,v,ve)}}for(var ce in v){var de=v[ce];if(ve=p[ce],v.hasOwnProperty(ce)&&(de!=null||ve!=null))switch(ce){case"type":N=de;break;case"name":T=de;break;case"checked":ue=de;break;case"defaultChecked":pe=de;break;case"value":B=de;break;case"defaultValue":W=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,c));break;default:de!==ve&&Tt(s,c,ce,de,v,ve)}}dl(s,B,W,ee,ue,pe,N,T);return;case"select":de=B=W=ce=null;for(N in p)if(ee=p[N],p.hasOwnProperty(N)&&ee!=null)switch(N){case"value":break;case"multiple":de=ee;default:v.hasOwnProperty(N)||Tt(s,c,N,null,v,ee)}for(T in v)if(N=v[T],ee=p[T],v.hasOwnProperty(T)&&(N!=null||ee!=null))switch(T){case"value":ce=N;break;case"defaultValue":W=N;break;case"multiple":B=N;default:N!==ee&&Tt(s,c,T,N,v,ee)}c=W,p=B,v=de,ce!=null?Aa(s,!!p,ce,!1):!!v!=!!p&&(c!=null?Aa(s,!!p,c,!0):Aa(s,!!p,p?[]:"",!1));return;case"textarea":de=ce=null;for(W in p)if(T=p[W],p.hasOwnProperty(W)&&T!=null&&!v.hasOwnProperty(W))switch(W){case"value":break;case"children":break;default:Tt(s,c,W,null,v,T)}for(B in v)if(T=v[B],N=p[B],v.hasOwnProperty(B)&&(T!=null||N!=null))switch(B){case"value":ce=T;break;case"defaultValue":de=T;break;case"children":break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:T!==N&&Tt(s,c,B,T,v,N)}Pk(s,ce,de);return;case"option":for(var je in p)if(ce=p[je],p.hasOwnProperty(je)&&ce!=null&&!v.hasOwnProperty(je))switch(je){case"selected":s.selected=!1;break;default:Tt(s,c,je,null,v,ce)}for(ee in v)if(ce=v[ee],de=p[ee],v.hasOwnProperty(ee)&&ce!==de&&(ce!=null||de!=null))switch(ee){case"selected":s.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:Tt(s,c,ee,ce,v,de)}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 $e in p)ce=p[$e],p.hasOwnProperty($e)&&ce!=null&&!v.hasOwnProperty($e)&&Tt(s,c,$e,null,v,ce);for(ue in v)if(ce=v[ue],de=p[ue],v.hasOwnProperty(ue)&&ce!==de&&(ce!=null||de!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,c));break;default:Tt(s,c,ue,ce,v,de)}return;default:if(mw(c)){for(var Ot in p)ce=p[Ot],p.hasOwnProperty(Ot)&&ce!==void 0&&!v.hasOwnProperty(Ot)&&tS(s,c,Ot,void 0,v,ce);for(pe in v)ce=v[pe],de=p[pe],!v.hasOwnProperty(pe)||ce===de||ce===void 0&&de===void 0||tS(s,c,pe,ce,v,de);return}}for(var se in p)ce=p[se],p.hasOwnProperty(se)&&ce!=null&&!v.hasOwnProperty(se)&&Tt(s,c,se,null,v,ce);for(ve in v)ce=v[ve],de=p[ve],!v.hasOwnProperty(ve)||ce===de||ce==null&&de==null||Tt(s,c,ve,ce,v,de)}function DL(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Wre(){if(typeof performance.getEntriesByType=="function"){for(var s=0,c=0,p=performance.getEntriesByType("resource"),v=0;v<p.length;v++){var T=p[v],N=T.transferSize,B=T.initiatorType,W=T.duration;if(N&&W&&DL(B)){for(B=0,W=T.responseEnd,v+=1;v<p.length;v++){var ee=p[v],ue=ee.startTime;if(ue>W)break;var pe=ee.transferSize,ve=ee.initiatorType;pe&&DL(ve)&&(ee=ee.responseEnd,B+=pe*(ee<W?1:(W-ue)/(ee-ue)))}if(--v,c+=8*(N+B)/(T.duration/1e3),s++,10<s)break}}if(0<s)return c/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var nS=null,rS=null;function mv(s){return s.nodeType===9?s:s.ownerDocument}function IL(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function LL(s,c){if(s===0)switch(c){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&c==="foreignObject"?0:s}function iS(s,c){return s==="textarea"||s==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.children=="bigint"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var aS=null;function Kre(){var s=window.event;return s&&s.type==="popstate"?s===aS?!1:(aS=s,!0):(aS=null,!1)}var $L=typeof setTimeout=="function"?setTimeout:void 0,Yre=typeof clearTimeout=="function"?clearTimeout:void 0,BL=typeof Promise=="function"?Promise:void 0,Xre=typeof queueMicrotask=="function"?queueMicrotask:typeof BL<"u"?function(s){return BL.resolve(null).then(s).catch(Zre)}:$L;function Zre(s){setTimeout(function(){throw s})}function Yo(s){return s==="head"}function qL(s,c){var p=c,v=0;do{var T=p.nextSibling;if(s.removeChild(p),T&&T.nodeType===8)if(p=T.data,p==="/$"||p==="/&"){if(v===0){s.removeChild(T),Cc(c);return}v--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")v++;else if(p==="html")Sh(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,Sh(p);for(var N=p.firstChild;N;){var B=N.nextSibling,W=N.nodeName;N[cl]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&N.rel.toLowerCase()==="stylesheet"||p.removeChild(N),N=B}}else p==="body"&&Sh(s.ownerDocument.body);p=T}while(p);Cc(c)}function zL(s,c){var p=s;s=0;do{var v=p.nextSibling;if(p.nodeType===1?c?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(c?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),v&&v.nodeType===8)if(p=v.data,p==="/$"){if(s===0)break;s--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||s++;p=v}while(p)}function oS(s){var c=s.firstChild;for(c&&c.nodeType===10&&(c=c.nextSibling);c;){var p=c;switch(c=c.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":oS(p),Bd(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function Qre(s,c,p,v){for(;s.nodeType===1;){var T=p;if(s.nodeName.toLowerCase()!==c.toLowerCase()){if(!v&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(v){if(!s[cl])switch(c){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(N=s.getAttribute("rel"),N==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(N!==T.rel||s.getAttribute("href")!==(T.href==null||T.href===""?null:T.href)||s.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin)||s.getAttribute("title")!==(T.title==null?null:T.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(N=s.getAttribute("src"),(N!==(T.src==null?null:T.src)||s.getAttribute("type")!==(T.type==null?null:T.type)||s.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin))&&N&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(c==="input"&&s.type==="hidden"){var N=T.name==null?null:""+T.name;if(T.type==="hidden"&&s.getAttribute("name")===N)return s}else return s;if(s=Qr(s.nextSibling),s===null)break}return null}function Jre(s,c,p){if(c==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!p||(s=Qr(s.nextSibling),s===null))return null;return s}function VL(s,c){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!c||(s=Qr(s.nextSibling),s===null))return null;return s}function sS(s){return s.data==="$?"||s.data==="$~"}function lS(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function eie(s,c){var p=s.ownerDocument;if(s.data==="$~")s._reactRetry=c;else if(s.data!=="$?"||p.readyState!=="loading")c();else{var v=function(){c(),p.removeEventListener("DOMContentLoaded",v)};p.addEventListener("DOMContentLoaded",v),s._reactRetry=v}}function Qr(s){for(;s!=null;s=s.nextSibling){var c=s.nodeType;if(c===1||c===3)break;if(c===8){if(c=s.data,c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"||c==="F!"||c==="F")break;if(c==="/$"||c==="/&")return null}}return s}var uS=null;function FL(s){s=s.nextSibling;for(var c=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"||p==="/&"){if(c===0)return Qr(s.nextSibling);c--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||c++}s=s.nextSibling}return null}function UL(s){s=s.previousSibling;for(var c=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(c===0)return s;c--}else p!=="/$"&&p!=="/&"||c++}s=s.previousSibling}return null}function HL(s,c,p){switch(c=mv(p),s){case"html":if(s=c.documentElement,!s)throw Error(r(452));return s;case"head":if(s=c.head,!s)throw Error(r(453));return s;case"body":if(s=c.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function Sh(s){for(var c=s.attributes;c.length;)s.removeAttributeNode(c[0]);Bd(s)}var Jr=new Map,GL=new Set;function gv(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Va=z.d;z.d={f:tie,r:nie,D:rie,C:iie,L:aie,m:oie,X:lie,S:sie,M:uie};function tie(){var s=Va.f(),c=sv();return s||c}function nie(s){var c=To(s);c!==null&&c.tag===5&&c.type==="form"?uI(c):Va.r(s)}var _c=typeof document>"u"?null:document;function WL(s,c,p){var v=_c;if(v&&typeof c=="string"&&c){var T=cr(c);T='link[rel="'+s+'"][href="'+T+'"]',typeof p=="string"&&(T+='[crossorigin="'+p+'"]'),GL.has(T)||(GL.add(T),s={rel:s,crossOrigin:p,href:c},v.querySelector(T)===null&&(c=v.createElement("link"),In(c,"link",s),un(c),v.head.appendChild(c)))}}function rie(s){Va.D(s),WL("dns-prefetch",s,null)}function iie(s,c){Va.C(s,c),WL("preconnect",s,c)}function aie(s,c,p){Va.L(s,c,p);var v=_c;if(v&&s&&c){var T='link[rel="preload"][as="'+cr(c)+'"]';c==="image"&&p&&p.imageSrcSet?(T+='[imagesrcset="'+cr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(T+='[imagesizes="'+cr(p.imageSizes)+'"]')):T+='[href="'+cr(s)+'"]';var N=T;switch(c){case"style":N=Ec(s);break;case"script":N=Ac(s)}Jr.has(N)||(s=h({rel:"preload",href:c==="image"&&p&&p.imageSrcSet?void 0:s,as:c},p),Jr.set(N,s),v.querySelector(T)!==null||c==="style"&&v.querySelector(_h(N))||c==="script"&&v.querySelector(Eh(N))||(c=v.createElement("link"),In(c,"link",s),un(c),v.head.appendChild(c)))}}function oie(s,c){Va.m(s,c);var p=_c;if(p&&s){var v=c&&typeof c.as=="string"?c.as:"script",T='link[rel="modulepreload"][as="'+cr(v)+'"][href="'+cr(s)+'"]',N=T;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":N=Ac(s)}if(!Jr.has(N)&&(s=h({rel:"modulepreload",href:s},c),Jr.set(N,s),p.querySelector(T)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(Eh(N)))return}v=p.createElement("link"),In(v,"link",s),un(v),p.head.appendChild(v)}}}function sie(s,c,p){Va.S(s,c,p);var v=_c;if(v&&s){var T=jo(v).hoistableStyles,N=Ec(s);c=c||"default";var B=T.get(N);if(!B){var W={loading:0,preload:null};if(B=v.querySelector(_h(N)))W.loading=5;else{s=h({rel:"stylesheet",href:s,"data-precedence":c},p),(p=Jr.get(N))&&cS(s,p);var ee=B=v.createElement("link");un(ee),In(ee,"link",s),ee._p=new Promise(function(ue,pe){ee.onload=ue,ee.onerror=pe}),ee.addEventListener("load",function(){W.loading|=1}),ee.addEventListener("error",function(){W.loading|=2}),W.loading|=4,vv(B,c,v)}B={type:"stylesheet",instance:B,count:1,state:W},T.set(N,B)}}}function lie(s,c){Va.X(s,c);var p=_c;if(p&&s){var v=jo(p).hoistableScripts,T=Ac(s),N=v.get(T);N||(N=p.querySelector(Eh(T)),N||(s=h({src:s,async:!0},c),(c=Jr.get(T))&&fS(s,c),N=p.createElement("script"),un(N),In(N,"link",s),p.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},v.set(T,N))}}function uie(s,c){Va.M(s,c);var p=_c;if(p&&s){var v=jo(p).hoistableScripts,T=Ac(s),N=v.get(T);N||(N=p.querySelector(Eh(T)),N||(s=h({src:s,async:!0,type:"module"},c),(c=Jr.get(T))&&fS(s,c),N=p.createElement("script"),un(N),In(N,"link",s),p.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},v.set(T,N))}}function KL(s,c,p,v){var T=(T=Q.current)?gv(T):null;if(!T)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(c=Ec(p.href),p=jo(T).hoistableStyles,v=p.get(c),v||(v={type:"style",instance:null,count:0,state:null},p.set(c,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){s=Ec(p.href);var N=jo(T).hoistableStyles,B=N.get(s);if(B||(T=T.ownerDocument||T,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},N.set(s,B),(N=T.querySelector(_h(s)))&&!N._p&&(B.instance=N,B.state.loading=5),Jr.has(s)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Jr.set(s,p),N||cie(T,s,p,B.state))),c&&v===null)throw Error(r(528,""));return B}if(c&&v!==null)throw Error(r(529,""));return null;case"script":return c=p.async,p=p.src,typeof p=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=Ac(p),p=jo(T).hoistableScripts,v=p.get(c),v||(v={type:"script",instance:null,count:0,state:null},p.set(c,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Ec(s){return'href="'+cr(s)+'"'}function _h(s){return'link[rel="stylesheet"]['+s+"]"}function YL(s){return h({},s,{"data-precedence":s.precedence,precedence:null})}function cie(s,c,p,v){s.querySelector('link[rel="preload"][as="style"]['+c+"]")?v.loading=1:(c=s.createElement("link"),v.preload=c,c.addEventListener("load",function(){return v.loading|=1}),c.addEventListener("error",function(){return v.loading|=2}),In(c,"link",p),un(c),s.head.appendChild(c))}function Ac(s){return'[src="'+cr(s)+'"]'}function Eh(s){return"script[async]"+s}function XL(s,c,p){if(c.count++,c.instance===null)switch(c.type){case"style":var v=s.querySelector('style[data-href~="'+cr(p.href)+'"]');if(v)return c.instance=v,un(v),v;var T=h({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return v=(s.ownerDocument||s).createElement("style"),un(v),In(v,"style",T),vv(v,p.precedence,s),c.instance=v;case"stylesheet":T=Ec(p.href);var N=s.querySelector(_h(T));if(N)return c.state.loading|=4,c.instance=N,un(N),N;v=YL(p),(T=Jr.get(T))&&cS(v,T),N=(s.ownerDocument||s).createElement("link"),un(N);var B=N;return B._p=new Promise(function(W,ee){B.onload=W,B.onerror=ee}),In(N,"link",v),c.state.loading|=4,vv(N,p.precedence,s),c.instance=N;case"script":return N=Ac(p.src),(T=s.querySelector(Eh(N)))?(c.instance=T,un(T),T):(v=p,(T=Jr.get(N))&&(v=h({},p),fS(v,T)),s=s.ownerDocument||s,T=s.createElement("script"),un(T),In(T,"link",v),s.head.appendChild(T),c.instance=T);case"void":return null;default:throw Error(r(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(v=c.instance,c.state.loading|=4,vv(v,p.precedence,s));return c.instance}function vv(s,c,p){for(var v=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),T=v.length?v[v.length-1]:null,N=T,B=0;B<v.length;B++){var W=v[B];if(W.dataset.precedence===c)N=W;else if(N!==T)break}N?N.parentNode.insertBefore(s,N.nextSibling):(c=p.nodeType===9?p.head:p,c.insertBefore(s,c.firstChild))}function cS(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.title==null&&(s.title=c.title)}function fS(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.integrity==null&&(s.integrity=c.integrity)}var yv=null;function ZL(s,c,p){if(yv===null){var v=new Map,T=yv=new Map;T.set(p,v)}else T=yv,v=T.get(p),v||(v=new Map,T.set(p,v));if(v.has(s))return v;for(v.set(s,null),p=p.getElementsByTagName(s),T=0;T<p.length;T++){var N=p[T];if(!(N[cl]||N[xn]||s==="link"&&N.getAttribute("rel")==="stylesheet")&&N.namespaceURI!=="http://www.w3.org/2000/svg"){var B=N.getAttribute(c)||"";B=s+B;var W=v.get(B);W?W.push(N):v.set(B,[N])}}return v}function QL(s,c,p){s=s.ownerDocument||s,s.head.insertBefore(p,c==="title"?s.querySelector("head > title"):null)}function fie(s,c,p){if(p===1||c.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return s=c.disabled,typeof c.precedence=="string"&&s==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function JL(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function die(s,c,p,v){if(p.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var T=Ec(v.href),N=c.querySelector(_h(T));if(N){c=N._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(s.count++,s=bv.bind(s),c.then(s,s)),p.state.loading|=4,p.instance=N,un(N);return}N=c.ownerDocument||c,v=YL(v),(T=Jr.get(T))&&cS(v,T),N=N.createElement("link"),un(N);var B=N;B._p=new Promise(function(W,ee){B.onload=W,B.onerror=ee}),In(N,"link",v),p.instance=N}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(p,c),(c=p.state.preload)&&(p.state.loading&3)===0&&(s.count++,p=bv.bind(s),c.addEventListener("load",p),c.addEventListener("error",p))}}var dS=0;function hie(s,c){return s.stylesheets&&s.count===0&&wv(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var v=setTimeout(function(){if(s.stylesheets&&wv(s,s.stylesheets),s.unsuspend){var N=s.unsuspend;s.unsuspend=null,N()}},6e4+c);0<s.imgBytes&&dS===0&&(dS=62500*Wre());var T=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&wv(s,s.stylesheets),s.unsuspend)){var N=s.unsuspend;s.unsuspend=null,N()}},(s.imgBytes>dS?50:800)+c);return s.unsuspend=p,function(){s.unsuspend=null,clearTimeout(v),clearTimeout(T)}}:null}function bv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)wv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var xv=null;function wv(s,c){s.stylesheets=null,s.unsuspend!==null&&(s.count++,xv=new Map,c.forEach(pie,s),xv=null,bv.call(s))}function pie(s,c){if(!(c.state.loading&4)){var p=xv.get(s);if(p)var v=p.get(null);else{p=new Map,xv.set(s,p);for(var T=s.querySelectorAll("link[data-precedence],style[data-precedence]"),N=0;N<T.length;N++){var B=T[N];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(p.set(B.dataset.precedence,B),v=B)}v&&p.set(null,v)}T=c.instance,B=T.getAttribute("data-precedence"),N=p.get(B)||v,N===v&&p.set(null,T),p.set(B,T),this.count++,v=bv.bind(this),T.addEventListener("load",v),T.addEventListener("error",v),N?N.parentNode.insertBefore(T,N.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(T,s.firstChild)),c.state.loading|=4}}var Ah={$$typeof:_,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function mie(s,c,p,v,T,N,B,W,ee){this.tag=1,this.containerInfo=s,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=Id(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Id(0),this.hiddenUpdates=Id(null),this.identifierPrefix=v,this.onUncaughtError=T,this.onCaughtError=N,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function e$(s,c,p,v,T,N,B,W,ee,ue,pe,ve){return s=new mie(s,c,p,B,ee,ue,pe,ve,W),c=1,N===!0&&(c|=24),N=Tr(3,null,null,c),s.current=N,N.stateNode=s,c=Hw(),c.refCount++,s.pooledCache=c,c.refCount++,N.memoizedState={element:v,isDehydrated:p,cache:c},Yw(N),s}function t$(s){return s?(s=nc,s):nc}function n$(s,c,p,v,T,N){T=t$(T),v.context===null?v.context=T:v.pendingContext=T,v=$o(c),v.payload={element:p},N=N===void 0?null:N,N!==null&&(v.callback=N),p=Bo(s,v,c),p!==null&&(gr(p,s,c),rh(p,s,c))}function r$(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<c?p:c}}function hS(s,c){r$(s,c),(s=s.alternate)&&r$(s,c)}function i$(s){if(s.tag===13||s.tag===31){var c=gl(s,67108864);c!==null&&gr(c,s,67108864),hS(s,67108864)}}function a$(s){if(s.tag===13||s.tag===31){var c=Mr();c=Ld(c);var p=gl(s,c);p!==null&&gr(p,s,c),hS(s,c)}}var Sv=!0;function gie(s,c,p,v){var T=L.T;L.T=null;var N=z.p;try{z.p=2,pS(s,c,p,v)}finally{z.p=N,L.T=T}}function vie(s,c,p,v){var T=L.T;L.T=null;var N=z.p;try{z.p=8,pS(s,c,p,v)}finally{z.p=N,L.T=T}}function pS(s,c,p,v){if(Sv){var T=mS(v);if(T===null)eS(s,c,v,_v,p),s$(s,v);else if(bie(T,s,c,p,v))v.stopPropagation();else if(s$(s,v),c&4&&-1<yie.indexOf(s)){for(;T!==null;){var N=To(T);if(N!==null)switch(N.tag){case 3:if(N=N.stateNode,N.current.memoizedState.isDehydrated){var B=Sa(N.pendingLanes);if(B!==0){var W=N;for(W.pendingLanes|=2,W.entangledLanes|=2;B;){var ee=1<<31-Zn(B);W.entanglements[1]|=ee,B&=~ee}Zi(N),(vt&6)===0&&(av=At()+500,bh(0))}}break;case 31:case 13:W=gl(N,2),W!==null&&gr(W,N,2),sv(),hS(N,2)}if(N=mS(v),N===null&&eS(s,c,v,_v,p),N===T)break;T=N}T!==null&&v.stopPropagation()}else eS(s,c,v,null,p)}}function mS(s){return s=vw(s),gS(s)}var _v=null;function gS(s){if(_v=null,s=Co(s),s!==null){var c=a(s);if(c===null)s=null;else{var p=c.tag;if(p===13){if(s=o(c),s!==null)return s;s=null}else if(p===31){if(s=l(c),s!==null)return s;s=null}else if(p===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;s=null}else c!==s&&(s=null)}}return _v=s,null}function o$(s){switch(s){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(Ge()){case $t:return 2;case bn:return 8;case Vn:case qu:return 32;case wa:return 268435456;default:return 32}default:return 32}}var vS=!1,Xo=null,Zo=null,Qo=null,Ch=new Map,Th=new Map,Jo=[],yie="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 s$(s,c){switch(s){case"focusin":case"focusout":Xo=null;break;case"dragenter":case"dragleave":Zo=null;break;case"mouseover":case"mouseout":Qo=null;break;case"pointerover":case"pointerout":Ch.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Th.delete(c.pointerId)}}function Oh(s,c,p,v,T,N){return s===null||s.nativeEvent!==N?(s={blockedOn:c,domEventName:p,eventSystemFlags:v,nativeEvent:N,targetContainers:[T]},c!==null&&(c=To(c),c!==null&&i$(c)),s):(s.eventSystemFlags|=v,c=s.targetContainers,T!==null&&c.indexOf(T)===-1&&c.push(T),s)}function bie(s,c,p,v,T){switch(c){case"focusin":return Xo=Oh(Xo,s,c,p,v,T),!0;case"dragenter":return Zo=Oh(Zo,s,c,p,v,T),!0;case"mouseover":return Qo=Oh(Qo,s,c,p,v,T),!0;case"pointerover":var N=T.pointerId;return Ch.set(N,Oh(Ch.get(N)||null,s,c,p,v,T)),!0;case"gotpointercapture":return N=T.pointerId,Th.set(N,Oh(Th.get(N)||null,s,c,p,v,T)),!0}return!1}function l$(s){var c=Co(s.target);if(c!==null){var p=a(c);if(p!==null){if(c=p.tag,c===13){if(c=o(p),c!==null){s.blockedOn=c,fg(s.priority,function(){a$(p)});return}}else if(c===31){if(c=l(p),c!==null){s.blockedOn=c,fg(s.priority,function(){a$(p)});return}}else if(c===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function Ev(s){if(s.blockedOn!==null)return!1;for(var c=s.targetContainers;0<c.length;){var p=mS(s.nativeEvent);if(p===null){p=s.nativeEvent;var v=new p.constructor(p.type,p);gw=v,p.target.dispatchEvent(v),gw=null}else return c=To(p),c!==null&&i$(c),s.blockedOn=p,!1;c.shift()}return!0}function u$(s,c,p){Ev(s)&&p.delete(c)}function xie(){vS=!1,Xo!==null&&Ev(Xo)&&(Xo=null),Zo!==null&&Ev(Zo)&&(Zo=null),Qo!==null&&Ev(Qo)&&(Qo=null),Ch.forEach(u$),Th.forEach(u$)}function Av(s,c){s.blockedOn===c&&(s.blockedOn=null,vS||(vS=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,xie)))}var Cv=null;function c$(s){Cv!==s&&(Cv=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Cv===s&&(Cv=null);for(var c=0;c<s.length;c+=3){var p=s[c],v=s[c+1],T=s[c+2];if(typeof v!="function"){if(gS(v||p)===null)continue;break}var N=To(p);N!==null&&(s.splice(c,3),c-=3,m1(N,{pending:!0,data:T,method:p.method,action:v},v,T))}}))}function Cc(s){function c(ee){return Av(ee,s)}Xo!==null&&Av(Xo,s),Zo!==null&&Av(Zo,s),Qo!==null&&Av(Qo,s),Ch.forEach(c),Th.forEach(c);for(var p=0;p<Jo.length;p++){var v=Jo[p];v.blockedOn===s&&(v.blockedOn=null)}for(;0<Jo.length&&(p=Jo[0],p.blockedOn===null);)l$(p),p.blockedOn===null&&Jo.shift();if(p=(s.ownerDocument||s).$$reactFormReplay,p!=null)for(v=0;v<p.length;v+=3){var T=p[v],N=p[v+1],B=T[Un]||null;if(typeof N=="function")B||c$(p);else if(B){var W=null;if(N&&N.hasAttribute("formAction")){if(T=N,B=N[Un]||null)W=B.formAction;else if(gS(T)!==null)continue}else W=B.action;typeof W=="function"?p[v+1]=W:(p.splice(v,3),v-=3),c$(p)}}}function f$(){function s(N){N.canIntercept&&N.info==="react-transition"&&N.intercept({handler:function(){return new Promise(function(B){return T=B})},focusReset:"manual",scroll:"manual"})}function c(){T!==null&&(T(),T=null),v||setTimeout(p,20)}function p(){if(!v&&!navigation.transition){var N=navigation.currentEntry;N&&N.url!=null&&navigation.navigate(N.url,{state:N.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,T=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",c),navigation.addEventListener("navigateerror",c),setTimeout(p,100),function(){v=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",c),navigation.removeEventListener("navigateerror",c),T!==null&&(T(),T=null)}}}function yS(s){this._internalRoot=s}Tv.prototype.render=yS.prototype.render=function(s){var c=this._internalRoot;if(c===null)throw Error(r(409));var p=c.current,v=Mr();n$(p,v,s,c,null,null)},Tv.prototype.unmount=yS.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var c=s.containerInfo;n$(s.current,2,null,s,null,null),sv(),c[_a]=null}};function Tv(s){this._internalRoot=s}Tv.prototype.unstable_scheduleHydration=function(s){if(s){var c=cg();s={blockedOn:null,target:s,priority:c};for(var p=0;p<Jo.length&&c!==0&&c<Jo[p].priority;p++);Jo.splice(p,0,s),p===0&&l$(s)}};var d$=t.version;if(d$!=="19.2.6")throw Error(r(527,d$,"19.2.6"));z.findDOMNode=function(s){var c=s._reactInternals;if(c===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(c),s=s!==null?d(s):null,s=s===null?null:s.stateNode,s};var wie={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ov=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ov.isDisabled&&Ov.supportsFiber)try{Fn=Ov.inject(wie),Qt=Ov}catch{}}return Nh.createRoot=function(s,c){if(!i(s))throw Error(r(299));var p=!1,v="",T=bI,N=xI,B=wI;return c!=null&&(c.unstable_strictMode===!0&&(p=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(T=c.onUncaughtError),c.onCaughtError!==void 0&&(N=c.onCaughtError),c.onRecoverableError!==void 0&&(B=c.onRecoverableError)),c=e$(s,1,!1,null,null,p,v,null,T,N,B,f$),s[_a]=c.current,J1(s),new yS(c)},Nh.hydrateRoot=function(s,c,p){if(!i(s))throw Error(r(299));var v=!1,T="",N=bI,B=xI,W=wI,ee=null;return p!=null&&(p.unstable_strictMode===!0&&(v=!0),p.identifierPrefix!==void 0&&(T=p.identifierPrefix),p.onUncaughtError!==void 0&&(N=p.onUncaughtError),p.onCaughtError!==void 0&&(B=p.onCaughtError),p.onRecoverableError!==void 0&&(W=p.onRecoverableError),p.formState!==void 0&&(ee=p.formState)),c=e$(s,1,!0,c,p??null,v,T,ee,N,B,W,f$),c.context=t$(null),p=c.current,v=Mr(),v=Ld(v),T=$o(v),T.callback=null,Bo(p,T,v),p=v,c.current.lanes=p,ul(c,p),Zi(c),s[_a]=c.current,J1(s),new Tv(c)},Nh.version="19.2.6",Nh}var _$;function Pie(){if(_$)return SS.exports;_$=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(),SS.exports=Nie(),SS.exports}var Mie=Pie();const Rie=yt(Mie);var cd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Yl,vs,of,m9,kie=(m9=class extends cd{constructor(){super();De(this,Yl);De(this,vs);De(this,of);Ee(this,of,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){te(this,vs)||this.setEventListener(te(this,of))}onUnsubscribe(){var t;this.hasListeners()||((t=te(this,vs))==null||t.call(this),Ee(this,vs,void 0))}setEventListener(t){var n;Ee(this,of,t),(n=te(this,vs))==null||n.call(this),Ee(this,vs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){te(this,Yl)!==t&&(Ee(this,Yl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof te(this,Yl)=="boolean"?te(this,Yl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Yl=new WeakMap,vs=new WeakMap,of=new WeakMap,m9),MM=new kie,Die={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ys,NM,g9,Iie=(g9=class{constructor(){De(this,ys,Die);De(this,NM,!1)}setTimeoutProvider(e){Ee(this,ys,e)}setTimeout(e,t){return te(this,ys).setTimeout(e,t)}clearTimeout(e){te(this,ys).clearTimeout(e)}setInterval(e,t){return te(this,ys).setInterval(e,t)}clearInterval(e){te(this,ys).clearInterval(e)}},ys=new WeakMap,NM=new WeakMap,g9),Bl=new Iie;function Lie(e){setTimeout(e,0)}var $ie=typeof window>"u"||"Deno"in globalThis;function er(){}function Bie(e,t){return typeof e=="function"?e(t):e}function Lj(e){return typeof e=="number"&&e>=0&&e!==1/0}function T9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Rs(e,t){return typeof e=="function"?e(t):e}function Ir(e,t){return typeof e=="function"?e(t):e}function E$(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==RM(o,t.options))return!1}else if(!yp(t.queryKey,o))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||a&&!a(t))}function A$(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(du(t.options.mutationKey)!==du(a))return!1}else if(!yp(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function RM(e,t){return((t==null?void 0:t.queryKeyHashFn)||du)(e)}function du(e){return JSON.stringify(e,(t,n)=>$j(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function yp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>yp(e[n],t[n])):!1}var qie=Object.prototype.hasOwnProperty;function O9(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=C$(e)&&C$(t);if(!r&&!($j(e)&&$j(t)))return t;const a=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),l=o.length,u=r?new Array(l):{};let f=0;for(let d=0;d<l;d++){const h=r?d:o[d],m=e[h],g=t[h];if(m===g){u[h]=m,(r?d<a:qie.call(e,h))&&f++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){u[h]=g;continue}const x=O9(m,g,n+1);u[h]=x,x===m&&f++}return a===l&&f===a?e:u}function Iy(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function C$(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $j(e){if(!T$(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!T$(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function T$(e){return Object.prototype.toString.call(e)==="[object Object]"}function zie(e){return new Promise(t=>{Bl.setTimeout(t,e)})}function Bj(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?O9(e,t):t}function Vie(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Fie(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var kM=Symbol();function j9(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===kM?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function DM(e,t){return typeof e=="function"?e(...t):!!e}function Uie(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var bp=(()=>{let e=()=>$ie;return{isServer(){return e()},setIsServer(t){e=t}}})();function qj(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Hie=Lie;function Gie(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=Hie;const a=l=>{t?e.push(l):i(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(u=>{n(u)})})})};return{batch:l=>{let u;t++;try{u=l()}finally{t--,t||o()}return u},batchCalls:l=>(...u)=>{a(()=>{l(...u)})},schedule:a,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var An=Gie(),sf,bs,lf,v9,Wie=(v9=class extends cd{constructor(){super();De(this,sf,!0);De(this,bs);De(this,lf);Ee(this,lf,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){te(this,bs)||this.setEventListener(te(this,lf))}onUnsubscribe(){var t;this.hasListeners()||((t=te(this,bs))==null||t.call(this),Ee(this,bs,void 0))}setEventListener(t){var n;Ee(this,lf,t),(n=te(this,bs))==null||n.call(this),Ee(this,bs,t(this.setOnline.bind(this)))}setOnline(t){te(this,sf)!==t&&(Ee(this,sf,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return te(this,sf)}},sf=new WeakMap,bs=new WeakMap,lf=new WeakMap,v9),Ly=new Wie;function Kie(e){return Math.min(1e3*2**e,3e4)}function N9(e){return(e??"online")==="online"?Ly.isOnline():!0}var zj=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function P9(e){let t=!1,n=0,r;const i=qj(),a=()=>i.status!=="pending",o=w=>{var y;if(!a()){const S=new zj(w);m(S),(y=e.onCancel)==null||y.call(e,S)}},l=()=>{t=!0},u=()=>{t=!1},f=()=>MM.isFocused()&&(e.networkMode==="always"||Ly.isOnline())&&e.canRun(),d=()=>N9(e.networkMode)&&e.canRun(),h=w=>{a()||(r==null||r(),i.resolve(w))},m=w=>{a()||(r==null||r(),i.reject(w))},g=()=>new Promise(w=>{var y;r=S=>{(a()||f())&&w(S)},(y=e.onPause)==null||y.call(e)}).then(()=>{var w;r=void 0,a()||(w=e.onContinue)==null||w.call(e)}),x=()=>{if(a())return;let w;const y=n===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(S){w=Promise.reject(S)}Promise.resolve(w).then(h).catch(S=>{var O;if(a())return;const E=e.retry??(bp.isServer()?0:3),_=e.retryDelay??Kie,A=typeof _=="function"?_(n,S):_,C=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,S);if(t||!C){m(S);return}n++,(O=e.onFail)==null||O.call(e,n,S),zie(A).then(()=>f()?void 0:g()).then(()=>{t?m(S):x()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:u,canStart:d,start:()=>(d()?x():g().then(x),i)}}var Xl,y9,M9=(y9=class{constructor(){De(this,Xl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Lj(this.gcTime)&&Ee(this,Xl,Bl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bp.isServer()?1/0:300*1e3))}clearGcTimeout(){te(this,Xl)!==void 0&&(Bl.clearTimeout(te(this,Xl)),Ee(this,Xl,void 0))}},Xl=new WeakMap,y9);function Yie(e){return{onFetch:(t,n)=>{var d,h,m,g,x;const r=t.options,i=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,a=((g=t.state.data)==null?void 0:g.pages)||[],o=((x=t.state.data)==null?void 0:x.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const f=async()=>{let w=!1;const y=_=>{Uie(_,()=>t.signal,()=>w=!0)},S=j9(t.options,t.fetchOptions),E=async(_,A,C)=>{if(w)return Promise.reject(t.signal.reason);if(A==null&&_.pages.length)return Promise.resolve(_);const P=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:A,direction:C?"backward":"forward",meta:t.options.meta};return y(I),I})(),M=await S(P),{maxPages:R}=t.options,$=C?Fie:Vie;return{pages:$(_.pages,M,R),pageParams:$(_.pageParams,A,R)}};if(i&&a.length){const _=i==="backward",A=_?R9:Vj,C={pages:a,pageParams:o},O=A(r,C);l=await E(C,O,_)}else{const _=e??a.length;do{const A=u===0?o[0]??r.initialPageParam:Vj(r,l);if(u>0&&A==null)break;l=await E(l,A),u++}while(u<_)}return l};t.options.persister?t.fetchFn=()=>{var w,y;return(y=(w=t.options).persister)==null?void 0:y.call(w,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function Vj(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function R9(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function Xie(e,t){return t?Vj(e,t)!=null:!1}function Zie(e,t){return!t||!e.getPreviousPageParam?!1:R9(e,t)!=null}var uf,Zl,cf,ri,Ql,jn,Em,Jl,Dr,k9,Ga,b9,Qie=(b9=class extends M9{constructor(t){super();De(this,Dr);De(this,uf);De(this,Zl);De(this,cf);De(this,ri);De(this,Ql);De(this,jn);De(this,Em);De(this,Jl);Ee(this,Jl,!1),Ee(this,Em,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ee(this,Ql,t.client),Ee(this,ri,te(this,Ql).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ee(this,Zl,j$(this.options)),this.state=t.state??te(this,Zl),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return te(this,uf)}get promise(){var t;return(t=te(this,jn))==null?void 0:t.promise}setOptions(t){if(this.options={...te(this,Em),...t},t!=null&&t._type&&Ee(this,uf,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=j$(this.options);n.data!==void 0&&(this.setState(O$(n.data,n.dataUpdatedAt)),Ee(this,Zl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&te(this,ri).remove(this)}setData(t,n){const r=Bj(this.state.data,t,this.options);return Ke(this,Dr,Ga).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Ke(this,Dr,Ga).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=te(this,jn))==null?void 0:r.promise;return(i=te(this,jn))==null||i.cancel(t),n?n.then(er).catch(er):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return te(this,Zl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ir(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===kM||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Rs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!T9(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=te(this,jn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=te(this,jn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),te(this,ri).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(te(this,jn)&&(te(this,Jl)||Ke(this,Dr,k9).call(this)?te(this,jn).cancel({revert:!0}):te(this,jn).cancelRetry()),this.scheduleGc()),te(this,ri).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,Dr,Ga).call(this,{type:"invalidate"})}async fetch(t,n){var f,d,h,m,g,x,w,y,S,E,_;if(this.state.fetchStatus!=="idle"&&((f=te(this,jn))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(te(this,jn))return te(this,jn).continueRetry(),te(this,jn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(C=>C.options.queryFn);A&&this.setOptions(A.options)}const r=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(Ee(this,Jl,!0),r.signal)})},a=()=>{const A=j9(this.options,n),O=(()=>{const P={client:te(this,Ql),queryKey:this.queryKey,meta:this.meta};return i(P),P})();return Ee(this,Jl,!1),this.options.persister?this.options.persister(A,O,this):A(O)},l=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:te(this,Ql),state:this.state,fetchFn:a};return i(A),A})(),u=te(this,uf)==="infinite"?Yie(this.options.pages):this.options.behavior;u==null||u.onFetch(l,this),Ee(this,cf,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Ke(this,Dr,Ga).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),Ee(this,jn,P9({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:A=>{A instanceof zj&&A.revert&&this.setState({...te(this,cf),fetchStatus:"idle"}),r.abort()},onFail:(A,C)=>{Ke(this,Dr,Ga).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{Ke(this,Dr,Ga).call(this,{type:"pause"})},onContinue:()=>{Ke(this,Dr,Ga).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const A=await te(this,jn).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(g=(m=te(this,ri).config).onSuccess)==null||g.call(m,A,this),(w=(x=te(this,ri).config).onSettled)==null||w.call(x,A,this.state.error,this),A}catch(A){if(A instanceof zj){if(A.silent)return te(this,jn).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ke(this,Dr,Ga).call(this,{type:"error",error:A}),(S=(y=te(this,ri).config).onError)==null||S.call(y,A,this),(_=(E=te(this,ri).config).onSettled)==null||_.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},uf=new WeakMap,Zl=new WeakMap,cf=new WeakMap,ri=new WeakMap,Ql=new WeakMap,jn=new WeakMap,Em=new WeakMap,Jl=new WeakMap,Dr=new WeakSet,k9=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ga=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...D9(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...O$(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ee(this,cf,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),An.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),te(this,ri).notify({query:this,type:"updated",action:t})})},b9);function D9(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N9(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function O$(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function j$(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var vr,lt,Am,Jn,eu,ff,Ka,xs,Cm,df,hf,tu,nu,ws,pf,wt,Xh,Fj,Uj,Hj,Gj,Wj,Kj,Yj,L9,x9,I9=(x9=class extends cd{constructor(t,n){super();De(this,wt);De(this,vr);De(this,lt);De(this,Am);De(this,Jn);De(this,eu);De(this,ff);De(this,Ka);De(this,xs);De(this,Cm);De(this,df);De(this,hf);De(this,tu);De(this,nu);De(this,ws);De(this,pf,new Set);this.options=n,Ee(this,vr,t),Ee(this,xs,null),Ee(this,Ka,qj()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(te(this,lt).addObserver(this),N$(te(this,lt),this.options)?Ke(this,wt,Xh).call(this):this.updateResult(),Ke(this,wt,Gj).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Xj(te(this,lt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Xj(te(this,lt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,wt,Wj).call(this),Ke(this,wt,Kj).call(this),te(this,lt).removeObserver(this)}setOptions(t){const n=this.options,r=te(this,lt);if(this.options=te(this,vr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ir(this.options.enabled,te(this,lt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ke(this,wt,Yj).call(this),te(this,lt).setOptions(this.options),n._defaulted&&!Iy(this.options,n)&&te(this,vr).getQueryCache().notify({type:"observerOptionsUpdated",query:te(this,lt),observer:this});const i=this.hasListeners();i&&P$(te(this,lt),r,this.options,n)&&Ke(this,wt,Xh).call(this),this.updateResult(),i&&(te(this,lt)!==r||Ir(this.options.enabled,te(this,lt))!==Ir(n.enabled,te(this,lt))||Rs(this.options.staleTime,te(this,lt))!==Rs(n.staleTime,te(this,lt)))&&Ke(this,wt,Fj).call(this);const a=Ke(this,wt,Uj).call(this);i&&(te(this,lt)!==r||Ir(this.options.enabled,te(this,lt))!==Ir(n.enabled,te(this,lt))||a!==te(this,ws))&&Ke(this,wt,Hj).call(this,a)}getOptimisticResult(t){const n=te(this,vr).getQueryCache().build(te(this,vr),t),r=this.createResult(n,t);return eae(this,r)&&(Ee(this,Jn,r),Ee(this,ff,this.options),Ee(this,eu,te(this,lt).state)),r}getCurrentResult(){return te(this,Jn)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&te(this,Ka).status==="pending"&&te(this,Ka).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){te(this,pf).add(t)}getCurrentQuery(){return te(this,lt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=te(this,vr).defaultQueryOptions(t),r=te(this,vr).getQueryCache().build(te(this,vr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ke(this,wt,Xh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),te(this,Jn)))}createResult(t,n){var R;const r=te(this,lt),i=this.options,a=te(this,Jn),o=te(this,eu),l=te(this,ff),f=t!==r?t.state:te(this,Am),{state:d}=t;let h={...d},m=!1,g;if(n._optimisticResults){const $=this.hasListeners(),I=!$&&N$(t,n),k=$&&P$(t,r,n,i);(I||k)&&(h={...h,...D9(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:x,errorUpdatedAt:w,status:y}=h;g=h.data;let S=!1;if(n.placeholderData!==void 0&&g===void 0&&y==="pending"){let $;a!=null&&a.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?($=a.data,S=!0):$=typeof n.placeholderData=="function"?n.placeholderData((R=te(this,hf))==null?void 0:R.state.data,te(this,hf)):n.placeholderData,$!==void 0&&(y="success",g=Bj(a==null?void 0:a.data,$,n),m=!0)}if(n.select&&g!==void 0&&!S)if(a&&g===(o==null?void 0:o.data)&&n.select===te(this,Cm))g=te(this,df);else try{Ee(this,Cm,n.select),g=n.select(g),g=Bj(a==null?void 0:a.data,g,n),Ee(this,df,g),Ee(this,xs,null)}catch($){Ee(this,xs,$)}te(this,xs)&&(x=te(this,xs),g=te(this,df),w=Date.now(),y="error");const E=h.fetchStatus==="fetching",_=y==="pending",A=y==="error",C=_&&E,O=g!==void 0,M={status:y,fetchStatus:h.fetchStatus,isPending:_,isSuccess:y==="success",isError:A,isInitialLoading:C,isLoading:C,data:g,dataUpdatedAt:h.dataUpdatedAt,error:x,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>f.dataUpdateCount||h.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!_,isLoadingError:A&&!O,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&O,isStale:IM(t,n),refetch:this.refetch,promise:te(this,Ka),isEnabled:Ir(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=M.data!==void 0,I=M.status==="error"&&!$,k=q=>{I?q.reject(M.error):$&&q.resolve(M.data)},V=()=>{const q=Ee(this,Ka,M.promise=qj());k(q)},D=te(this,Ka);switch(D.status){case"pending":t.queryHash===r.queryHash&&k(D);break;case"fulfilled":(I||M.data!==D.value)&&V();break;case"rejected":(!I||M.error!==D.reason)&&V();break}}return M}updateResult(){const t=te(this,Jn),n=this.createResult(te(this,lt),this.options);if(Ee(this,eu,te(this,lt).state),Ee(this,ff,this.options),te(this,eu).data!==void 0&&Ee(this,hf,te(this,lt)),Iy(n,t))return;Ee(this,Jn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!te(this,pf).size)return!0;const o=new Set(a??te(this,pf));return this.options.throwOnError&&o.add("error"),Object.keys(te(this,Jn)).some(l=>{const u=l;return te(this,Jn)[u]!==t[u]&&o.has(u)})};Ke(this,wt,L9).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,wt,Gj).call(this)}},vr=new WeakMap,lt=new WeakMap,Am=new WeakMap,Jn=new WeakMap,eu=new WeakMap,ff=new WeakMap,Ka=new WeakMap,xs=new WeakMap,Cm=new WeakMap,df=new WeakMap,hf=new WeakMap,tu=new WeakMap,nu=new WeakMap,ws=new WeakMap,pf=new WeakMap,wt=new WeakSet,Xh=function(t){Ke(this,wt,Yj).call(this);let n=te(this,lt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(er)),n},Fj=function(){Ke(this,wt,Wj).call(this);const t=Rs(this.options.staleTime,te(this,lt));if(bp.isServer()||te(this,Jn).isStale||!Lj(t))return;const r=T9(te(this,Jn).dataUpdatedAt,t)+1;Ee(this,tu,Bl.setTimeout(()=>{te(this,Jn).isStale||this.updateResult()},r))},Uj=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(te(this,lt)):this.options.refetchInterval)??!1},Hj=function(t){Ke(this,wt,Kj).call(this),Ee(this,ws,t),!(bp.isServer()||Ir(this.options.enabled,te(this,lt))===!1||!Lj(te(this,ws))||te(this,ws)===0)&&Ee(this,nu,Bl.setInterval(()=>{(this.options.refetchIntervalInBackground||MM.isFocused())&&Ke(this,wt,Xh).call(this)},te(this,ws)))},Gj=function(){Ke(this,wt,Fj).call(this),Ke(this,wt,Hj).call(this,Ke(this,wt,Uj).call(this))},Wj=function(){te(this,tu)!==void 0&&(Bl.clearTimeout(te(this,tu)),Ee(this,tu,void 0))},Kj=function(){te(this,nu)!==void 0&&(Bl.clearInterval(te(this,nu)),Ee(this,nu,void 0))},Yj=function(){const t=te(this,vr).getQueryCache().build(te(this,vr),this.options);if(t===te(this,lt))return;const n=te(this,lt);Ee(this,lt,t),Ee(this,Am,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},L9=function(t){An.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(te(this,Jn))}),te(this,vr).getQueryCache().notify({query:te(this,lt),type:"observerResultsUpdated"})})},x9);function Jie(e,t){return Ir(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ir(t.retryOnMount,e)===!1)}function N$(e,t){return Jie(e,t)||e.state.data!==void 0&&Xj(e,t,t.refetchOnMount)}function Xj(e,t,n){if(Ir(t.enabled,e)!==!1&&Rs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&IM(e,t)}return!1}function P$(e,t,n,r){return(e!==t||Ir(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&IM(e,n)}function IM(e,t){return Ir(t.enabled,e)!==!1&&e.isStaleByTime(Rs(t.staleTime,e))}function eae(e,t){return!Iy(e.getCurrentResult(),t)}var tae=class extends I9{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var x,w;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:l}=r,u=(w=(x=n.fetchMeta)==null?void 0:x.fetchMore)==null?void 0:w.direction,f=o&&u==="forward",d=i&&u==="forward",h=o&&u==="backward",m=i&&u==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Xie(t,n.data),hasPreviousPage:Zie(t,n.data),isFetchNextPageError:f,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:m,isRefetchError:l&&!f&&!h,isRefetching:a&&!d&&!m}}},Tm,ea,Gn,ru,ta,as,w9,nae=(w9=class extends M9{constructor(t){super();De(this,ta);De(this,Tm);De(this,ea);De(this,Gn);De(this,ru);Ee(this,Tm,t.client),this.mutationId=t.mutationId,Ee(this,Gn,t.mutationCache),Ee(this,ea,[]),this.state=t.state||$9(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){te(this,ea).includes(t)||(te(this,ea).push(t),this.clearGcTimeout(),te(this,Gn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ee(this,ea,te(this,ea).filter(n=>n!==t)),this.scheduleGc(),te(this,Gn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){te(this,ea).length||(this.state.status==="pending"?this.scheduleGc():te(this,Gn).remove(this))}continue(){var t;return((t=te(this,ru))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,u,f,d,h,m,g,x,w,y,S,E,_,A,C,O,P;const n=()=>{Ke(this,ta,as).call(this,{type:"continue"})},r={client:te(this,Tm),meta:this.options.meta,mutationKey:this.options.mutationKey};Ee(this,ru,P9({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,R)=>{Ke(this,ta,as).call(this,{type:"failed",failureCount:M,error:R})},onPause:()=>{Ke(this,ta,as).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>te(this,Gn).canRun(this)}));const i=this.state.status==="pending",a=!te(this,ru).canStart();try{if(i)n();else{Ke(this,ta,as).call(this,{type:"pending",variables:t,isPaused:a}),te(this,Gn).config.onMutate&&await te(this,Gn).config.onMutate(t,this,r);const R=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,r));R!==this.state.context&&Ke(this,ta,as).call(this,{type:"pending",context:R,variables:t,isPaused:a})}const M=await te(this,ru).start();return await((f=(u=te(this,Gn).config).onSuccess)==null?void 0:f.call(u,M,t,this.state.context,this,r)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,M,t,this.state.context,r)),await((g=(m=te(this,Gn).config).onSettled)==null?void 0:g.call(m,M,null,this.state.variables,this.state.context,this,r)),await((w=(x=this.options).onSettled)==null?void 0:w.call(x,M,null,t,this.state.context,r)),Ke(this,ta,as).call(this,{type:"success",data:M}),M}catch(M){try{await((S=(y=te(this,Gn).config).onError)==null?void 0:S.call(y,M,t,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((_=(E=this.options).onError)==null?void 0:_.call(E,M,t,this.state.context,r))}catch(R){Promise.reject(R)}try{await((C=(A=te(this,Gn).config).onSettled)==null?void 0:C.call(A,void 0,M,this.state.variables,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((P=(O=this.options).onSettled)==null?void 0:P.call(O,void 0,M,t,this.state.context,r))}catch(R){Promise.reject(R)}throw Ke(this,ta,as).call(this,{type:"error",error:M}),M}finally{te(this,Gn).runNext(this)}}},Tm=new WeakMap,ea=new WeakMap,Gn=new WeakMap,ru=new WeakMap,ta=new WeakSet,as=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),An.batch(()=>{te(this,ea).forEach(r=>{r.onMutationUpdate(t)}),te(this,Gn).notify({mutation:this,type:"updated",action:t})})},w9);function $9(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ya,Ci,Om,S9,rae=(S9=class extends cd{constructor(t={}){super();De(this,Ya);De(this,Ci);De(this,Om);this.config=t,Ee(this,Ya,new Set),Ee(this,Ci,new Map),Ee(this,Om,0)}build(t,n,r){const i=new nae({client:t,mutationCache:this,mutationId:++jv(this,Om)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){te(this,Ya).add(t);const n=Pv(t);if(typeof n=="string"){const r=te(this,Ci).get(n);r?r.push(t):te(this,Ci).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(te(this,Ya).delete(t)){const n=Pv(t);if(typeof n=="string"){const r=te(this,Ci).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&te(this,Ci).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Pv(t);if(typeof n=="string"){const r=te(this,Ci).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Pv(t);if(typeof n=="string"){const i=(r=te(this,Ci).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){An.batch(()=>{te(this,Ya).forEach(t=>{this.notify({type:"removed",mutation:t})}),te(this,Ya).clear(),te(this,Ci).clear()})}getAll(){return Array.from(te(this,Ya))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>A$(n,r))}findAll(t={}){return this.getAll().filter(n=>A$(t,n))}notify(t){An.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return An.batch(()=>Promise.all(t.map(n=>n.continue().catch(er))))}},Ya=new WeakMap,Ci=new WeakMap,Om=new WeakMap,S9);function Pv(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Xa,Ss,yr,Za,uo,py,Zj,_9,iae=(_9=class extends cd{constructor(n,r){super();De(this,uo);De(this,Xa);De(this,Ss);De(this,yr);De(this,Za);Ee(this,Xa,n),this.setOptions(r),this.bindMethods(),Ke(this,uo,py).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=te(this,Xa).defaultMutationOptions(n),Iy(this.options,r)||te(this,Xa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:te(this,yr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&du(r.mutationKey)!==du(this.options.mutationKey)?this.reset():((i=te(this,yr))==null?void 0:i.state.status)==="pending"&&te(this,yr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=te(this,yr))==null||n.removeObserver(this)}onMutationUpdate(n){Ke(this,uo,py).call(this),Ke(this,uo,Zj).call(this,n)}getCurrentResult(){return te(this,Ss)}reset(){var n;(n=te(this,yr))==null||n.removeObserver(this),Ee(this,yr,void 0),Ke(this,uo,py).call(this),Ke(this,uo,Zj).call(this)}mutate(n,r){var i;return Ee(this,Za,r),(i=te(this,yr))==null||i.removeObserver(this),Ee(this,yr,te(this,Xa).getMutationCache().build(te(this,Xa),this.options)),te(this,yr).addObserver(this),te(this,yr).execute(n)}},Xa=new WeakMap,Ss=new WeakMap,yr=new WeakMap,Za=new WeakMap,uo=new WeakSet,py=function(){var r;const n=((r=te(this,yr))==null?void 0:r.state)??$9();Ee(this,Ss,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Zj=function(n){An.batch(()=>{var r,i,a,o,l,u,f,d;if(te(this,Za)&&this.hasListeners()){const h=te(this,Ss).variables,m=te(this,Ss).context,g={client:te(this,Xa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=te(this,Za)).onSuccess)==null||i.call(r,n.data,h,m,g)}catch(x){Promise.reject(x)}try{(o=(a=te(this,Za)).onSettled)==null||o.call(a,n.data,null,h,m,g)}catch(x){Promise.reject(x)}}else if((n==null?void 0:n.type)==="error"){try{(u=(l=te(this,Za)).onError)==null||u.call(l,n.error,h,m,g)}catch(x){Promise.reject(x)}try{(d=(f=te(this,Za)).onSettled)==null||d.call(f,void 0,n.error,h,m,g)}catch(x){Promise.reject(x)}}}this.listeners.forEach(h=>{h(te(this,Ss))})})},_9),na,E9,aae=(E9=class extends cd{constructor(t={}){super();De(this,na);this.config=t,Ee(this,na,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??RM(i,n);let o=this.get(a);return o||(o=new Qie({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){te(this,na).has(t.queryHash)||(te(this,na).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=te(this,na).get(t.queryHash);n&&(t.destroy(),n===t&&te(this,na).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){An.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return te(this,na).get(t)}getAll(){return[...te(this,na).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>E$(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>E$(t,r)):n}notify(t){An.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){An.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){An.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},na=new WeakMap,E9),nn,_s,Es,mf,gf,As,vf,yf,A9,oae=(A9=class{constructor(e={}){De(this,nn);De(this,_s);De(this,Es);De(this,mf);De(this,gf);De(this,As);De(this,vf);De(this,yf);Ee(this,nn,e.queryCache||new aae),Ee(this,_s,e.mutationCache||new rae),Ee(this,Es,e.defaultOptions||{}),Ee(this,mf,new Map),Ee(this,gf,new Map),Ee(this,As,0)}mount(){jv(this,As)._++,te(this,As)===1&&(Ee(this,vf,MM.subscribe(async e=>{e&&(await this.resumePausedMutations(),te(this,nn).onFocus())})),Ee(this,yf,Ly.subscribe(async e=>{e&&(await this.resumePausedMutations(),te(this,nn).onOnline())})))}unmount(){var e,t;jv(this,As)._--,te(this,As)===0&&((e=te(this,vf))==null||e.call(this),Ee(this,vf,void 0),(t=te(this,yf))==null||t.call(this),Ee(this,yf,void 0))}isFetching(e){return te(this,nn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return te(this,_s).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=te(this,nn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=te(this,nn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Rs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return te(this,nn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=te(this,nn).get(r.queryHash),a=i==null?void 0:i.state.data,o=Bie(t,a);if(o!==void 0)return te(this,nn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return An.batch(()=>te(this,nn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=te(this,nn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=te(this,nn);An.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=te(this,nn);return An.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=An.batch(()=>te(this,nn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(er).catch(er)}invalidateQueries(e,t={}){return An.batch(()=>(te(this,nn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=An.batch(()=>te(this,nn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(er)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(er)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=te(this,nn).build(this,t);return n.isStaleByTime(Rs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(er).catch(er)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(er).catch(er)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ly.isOnline()?te(this,_s).resumePausedMutations():Promise.resolve()}getQueryCache(){return te(this,nn)}getMutationCache(){return te(this,_s)}getDefaultOptions(){return te(this,Es)}setDefaultOptions(e){Ee(this,Es,e)}setQueryDefaults(e,t){te(this,mf).set(du(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...te(this,mf).values()],n={};return t.forEach(r=>{yp(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){te(this,gf).set(du(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...te(this,gf).values()],n={};return t.forEach(r=>{yp(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...te(this,Es).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=RM(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===kM&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...te(this,Es).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){te(this,nn).clear(),te(this,_s).clear()}},nn=new WeakMap,_s=new WeakMap,Es=new WeakMap,mf=new WeakMap,gf=new WeakMap,As=new WeakMap,vf=new WeakMap,yf=new WeakMap,A9),B9=j.createContext(void 0),sr=e=>{const t=j.useContext(B9);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},sae=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),b.jsx(B9.Provider,{value:e,children:t})),q9=j.createContext(!1),lae=()=>j.useContext(q9);q9.Provider;function uae(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var cae=j.createContext(uae()),fae=()=>j.useContext(cae),dae=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?DM(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},hae=e=>{j.useEffect(()=>{e.clearReset()},[e])},pae=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||DM(n,[e.error,r])),mae=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},gae=(e,t)=>e.isLoading&&e.isFetching&&!t,vae=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,M$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function z9(e,t,n){var g,x,w,y;const r=lae(),i=fae(),a=sr(),o=a.defaultQueryOptions(e);(x=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||x.call(g,o);const l=a.getQueryCache().get(o.queryHash),u=e.subscribed!==!1;o._optimisticResults=r?"isRestoring":u?"optimistic":void 0,mae(o),dae(o,i,l),hae(i);const f=!a.getQueryCache().get(o.queryHash),[d]=j.useState(()=>new t(a,o)),h=d.getOptimisticResult(o),m=!r&&u;if(j.useSyncExternalStore(j.useCallback(S=>{const E=m?d.subscribe(An.batchCalls(S)):er;return d.updateResult(),E},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),j.useEffect(()=>{d.setOptions(o)},[o,d]),vae(o,h))throw M$(o,d,i);if(pae({result:h,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw h.error;if((y=(w=a.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||y.call(w,o,h),o.experimental_prefetchInRender&&!bp.isServer()&&gae(h,r)){const S=f?M$(o,d,i):l==null?void 0:l.promise;S==null||S.catch(er).finally(()=>{d.updateResult()})}return o.notifyOnChangeProps?h:d.trackResult(h)}function fi(e,t){return z9(e,I9)}function ga(e,t){const n=sr(),[r]=j.useState(()=>new iae(n,e));j.useEffect(()=>{r.setOptions(e)},[r,e]);const i=j.useSyncExternalStore(j.useCallback(o=>r.subscribe(An.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=j.useCallback((o,l)=>{r.mutate(o,l).catch(er)},[r]);if(i.error&&DM(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function V9(e,t){return z9(e,tae)}var Zh=typeof window<"u"?j.useLayoutEffect:j.useEffect;function CS(e){const t=j.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function yae(e,t,n={},r={}){j.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([a])=>{t(a)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function bae(e){const t=j.useRef(null);return j.useImperativeHandle(e,()=>t.current,[]),t}const F9=!1;function xp(e){return e[e.length-1]}function xae(e){return typeof e=="function"}function ql(e,t){return xae(e)?e(t):e}const U9=Object.prototype.hasOwnProperty,R$=Object.prototype.propertyIsEnumerable;function H9(e){for(const t in e)if(U9.call(e,t))return!0;return!1}const wae=()=>Object.create(null),jl=(e,t)=>Cs(e,t,wae);function Cs(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,a=I$(e)&&I$(i);if(!a&&!($y(e)&&$y(i)))return i;const o=a?e:k$(e);if(!o)return i;const l=a?i:k$(i);if(!l)return i;const u=o.length,f=l.length,d=a?new Array(f):n();let h=0;for(let m=0;m<f;m++){const g=a?m:l[m],x=e[g],w=i[g];if(x===w){d[g]=x,(a?m<u:U9.call(e,g))&&h++;continue}if(x===null||w===null||typeof x!="object"||typeof w!="object"){d[g]=w;continue}const y=Cs(x,w,n,r+1);d[g]=y,y===x&&h++}return u===f&&h===u?e:d}function k$(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!R$.call(e,i))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const i of n){if(!R$.call(e,i))return!1;r.push(i)}return r}function $y(e){if(!D$(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!D$(n)||!n.hasOwnProperty("isPrototypeOf"))}function D$(e){return Object.prototype.toString.call(e)==="[object Object]"}function I$(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function iu(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!iu(e[r],t[r],n))return!1;return!0}if($y(e)&&$y(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const o in t)if((!r||t[o]!==void 0)&&!iu(e[o],t[o],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&i++;let a=0;for(const o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!iu(e[o],t[o],n)))return!1;return i===a}return!1}function bf(e){let t,n;const r=new Promise((i,a)=>{t=i,n=a});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e==null||e(i)},r.reject=i=>{r.status="rejected",n(i)},r}function wp(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Sae(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function L$(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Sae(t)}const _ae=["http:","https:","mailto:","tel:"];function By(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Ph(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",i;for(;(i=t.exec(e))!==null;)r+=L$(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+L$(n?e.slice(n):e);let a=!1;return r.startsWith("//")&&(a=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:a}}function Eae(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Aae(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function io(){throw new Error("Invariant failed")}function Sp(e){const t=new Map;let n,r;const i=a=>{a.next&&(a.prev?(a.prev.next=a.next,a.next.prev=a.prev,a.next=void 0,r&&(r.next=a,a.prev=r)):(a.next.prev=void 0,n=a.next,a.next=void 0,r&&(a.prev=r,r.next=a)),r=a)};return{get(a){const o=t.get(a);if(o)return i(o),o.value},set(a,o){if(t.size>=e&&n){const u=n;t.delete(u.key),u.next&&(n=u.next,u.next.prev=void 0),u===r&&(r=void 0)}const l=t.get(a);if(l)l.value=o,i(l);else{const u={key:a,value:o,prev:r};r&&(r.next=u),r=u,n||(n=u),t.set(a,u)}},clear(){t.clear(),n=void 0,r=void 0}}}const Ts=4,G9=5;function Cae(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function W9(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a==="$"){const l=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=l,n[4]=l,n[5]=l,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const o=Cae(a);if(o){const[l,u]=o,f=a.charCodeAt(l+1);if(f===45){if(l+2<a.length&&a.charCodeAt(l+2)===36){const d=l+3,h=u;if(d<h)return n[0]=3,n[1]=t+l,n[2]=t+d,n[3]=t+h,n[4]=t+u+1,n[5]=i,n}}else if(f===36){const d=l+1,h=l+2;return h===u?(n[0]=2,n[1]=t+l,n[2]=t+d,n[3]=t+h,n[4]=t+u+1,n[5]=e.length,n):(n[0]=1,n[1]=t+l,n[2]=t+h,n[3]=t+u,n[4]=t+u+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function O0(e,t,n,r,i,a,o){var u,f,d,h,m,g,x,w,y,S;o==null||o(n);let l=r;{const E=n.fullPath??n.from,_=E.length,A=((u=n.options)==null?void 0:u.caseSensitive)??e,C=((d=(f=n.options)==null?void 0:f.params)==null?void 0:d.parse)??((h=n.options)==null?void 0:h.parseParams);for(;l<_;){const P=W9(E,l,t);let M;const R=l,$=P[5];switch(l=$+1,a++,P[0]){case 0:{const I=E.substring(P[2],P[3]);if(A){const k=(m=i.static)==null?void 0:m.get(I);if(k)M=k;else{i.static??(i.static=new Map);const V=zl(n.fullPath??n.from);V.parent=i,V.depth=a,M=V,i.static.set(I,V)}}else{const k=I.toLowerCase(),V=(g=i.staticInsensitive)==null?void 0:g.get(k);if(V)M=V;else{i.staticInsensitive??(i.staticInsensitive=new Map);const D=zl(n.fullPath??n.from);D.parent=i,D.depth=a,M=D,i.staticInsensitive.set(k,D)}}break}case 1:{const I=E.substring(R,P[1]),k=E.substring(P[4],$),V=A&&!!(I||k),D=I?V?I:I.toLowerCase():void 0,q=k?V?k:k.toLowerCase():void 0,L=!C&&((x=i.dynamic)==null?void 0:x.find(z=>!z.parse&&z.caseSensitive===V&&z.prefix===D&&z.suffix===q));if(L)M=L;else{const z=OS(1,n.fullPath??n.from,V,D,q);M=z,z.depth=a,z.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(z)}break}case 3:{const I=E.substring(R,P[1]),k=E.substring(P[4],$),V=A&&!!(I||k),D=I?V?I:I.toLowerCase():void 0,q=k?V?k:k.toLowerCase():void 0,L=!C&&((w=i.optional)==null?void 0:w.find(z=>!z.parse&&z.caseSensitive===V&&z.prefix===D&&z.suffix===q));if(L)M=L;else{const z=OS(3,n.fullPath??n.from,V,D,q);M=z,z.parent=i,z.depth=a,i.optional??(i.optional=[]),i.optional.push(z)}break}case 2:{const I=E.substring(R,P[1]),k=E.substring(P[4],$),V=A&&!!(I||k),D=I?V?I:I.toLowerCase():void 0,q=k?V?k:k.toLowerCase():void 0,L=OS(2,n.fullPath??n.from,V,D,q);M=L,L.parent=i,L.depth=a,i.wildcard??(i.wildcard=[]),i.wildcard.push(L)}}i=M}if(C&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const P=zl(n.fullPath??n.from);P.kind=G9,P.parent=i,a++,P.depth=a,i.pathless??(i.pathless=[]),i.pathless.push(P),i=P}const O=(n.path||!n.children)&&!n.isRoot;if(O&&E.endsWith("/")){const P=zl(n.fullPath??n.from);P.kind=Ts,P.parent=i,a++,P.depth=a,i.index=P,i=P}i.parse=C??null,i.priority=((S=(y=n.options)==null?void 0:y.params)==null?void 0:S.priority)??0,O&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const E of n.children)O0(e,t,E,l,i,a,o)}function TS(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function fs(e){var t,n,r;if(e.pathless)for(const i of e.pathless)fs(i);if(e.static)for(const i of e.static.values())fs(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())fs(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(TS);for(const i of e.dynamic)fs(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(TS);for(const i of e.optional)fs(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(TS);for(const i of e.wildcard)fs(i)}}function zl(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function OS(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Tae(e,t){const n=zl("/"),r=new Uint16Array(6);for(const i of e)O0(!1,r,i,1,n,0);fs(n),t.masksTree=n,t.flatCache=Sp(1e3)}function Oae(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=LM(e,t.masksTree);return t.flatCache.set(e,r),r}function jae(e,t,n,r,i){e||(e="/"),r||(r="/");const a=t?`case\0${e}`:e;let o=i.singleCache.get(a);return o||(o=zl("/"),O0(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),LM(r,o,n)}function Nae(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||(e="/");let a;try{a=LM(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)a=null;else throw o}return a&&(a.branch=Y9(a.route)),t.matchCache.set(r,a),a}function Pae(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Mae(e,t=!1,n){const r=zl(e.fullPath),i=new Uint16Array(6),a={},o={};let l=0;return O0(t,i,e,1,r,0,u=>{if(n==null||n(u,l),u.id in a&&io(),a[u.id]=u,l!==0&&u.path){const f=Pae(u.fullPath);(!o[f]||u.fullPath.endsWith("/"))&&(o[f]=u)}l++}),fs(r),{processedTree:{segmentTree:r,singleCache:Sp(1e3),matchCache:Sp(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function LM(e,t,n=!1){const r=e.split("/"),i=kae(e,r,t,n);if(!i)return null;const[a]=K9(e,r,i);return{route:i.node.route,rawParams:a}}function K9(e,t,n){var d,h,m,g,x,w,y,S,E,_;const r=Rae(n.node);let i=null;const a=Object.create(null);let o=((d=n.extract)==null?void 0:d.part)??0,l=((h=n.extract)==null?void 0:h.node)??0,u=((m=n.extract)==null?void 0:m.path)??0,f=((g=n.extract)==null?void 0:g.segment)??0;for(;l<r.length;o++,l++,u++,f++){const A=r[l];if(A.kind===Ts)break;if(A.kind===G9){f--,o--,u--;continue}const C=t[o],O=u;if(C&&(u+=C.length),A.kind===1){i??(i=n.node.fullPath.split("/"));const P=i[f],M=((x=A.prefix)==null?void 0:x.length)??0;if(P.charCodeAt(M)===123){const R=((w=A.suffix)==null?void 0:w.length)??0,$=P.substring(M+2,P.length-R-1),I=C.substring(M,C.length-R);a[$]=decodeURIComponent(I)}else{const R=P.substring(1);a[R]=decodeURIComponent(C)}}else if(A.kind===3){if(n.skipped&1<<l){o--,u=O-1;continue}i??(i=n.node.fullPath.split("/"));const P=i[f],M=((y=A.prefix)==null?void 0:y.length)??0,R=((S=A.suffix)==null?void 0:S.length)??0,$=P.substring(M+3,P.length-R-1),I=A.suffix||A.prefix?C.substring(M,C.length-R):C;I&&(a[$]=decodeURIComponent(I))}else if(A.kind===2){const P=A,M=e.substring(O+(((E=P.prefix)==null?void 0:E.length)??0),e.length-(((_=P.suffix)==null?void 0:_.length)??0)),R=decodeURIComponent(M);a["*"]=R,a._splat=R;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:l,path:u,segment:f}]}function Y9(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Rae(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function kae(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!xp(t),a=i&&e!=="/",o=t.length-(i?1:0),l=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let u=null,f=null;for(;l.length;){const d=l.pop(),{node:h,index:m,skipped:g,depth:x,statics:w,dynamics:y,optionals:S}=d;let{extract:E,rawParams:_}=d;if(h.kind===2&&h.route&&!Rv(f,d))continue;if(h.parse){if(!$$(e,t,d))continue;_=d.rawParams,E=d.extract}r&&h.route&&h.kind!==Ts&&Rv(u,d)&&(u=d);const A=m===o;if(A&&(h.route&&(!a||h.kind===Ts||h.kind===2)&&Rv(f,d)&&(f=d),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const C=A?void 0:t[m];let O;if(A&&h.index){const P={node:h.index,index:m,skipped:g,depth:x+1,statics:w,dynamics:y,optionals:S,extract:E,rawParams:_};let M=!0;if(h.index.parse&&($$(e,t,P)||(M=!1)),M){if(!y&&!S&&!g&&Dae(w,o))return P;Rv(f,P)&&(f=P)}}if(h.wildcard)for(let P=h.wildcard.length-1;P>=0;P--){const M=h.wildcard[P],{prefix:R,suffix:$}=M;if(!(R&&(A||!(M.caseSensitive?C:O??(O=C.toLowerCase())).startsWith(R)))){if($){if(A)continue;const I=t.slice(m).join("/").slice(-$.length);if((M.caseSensitive?I:I.toLowerCase())!==$)continue}l.push({node:M,index:o,skipped:g,depth:x+1,statics:w,dynamics:y,optionals:S,extract:E,rawParams:_})}}if(h.optional){const P=g|1<<x,M=x+1;for(let R=h.optional.length-1;R>=0;R--){const $=h.optional[R];l.push({node:$,index:m,skipped:P,depth:M,statics:w,dynamics:y,optionals:S,extract:E,rawParams:_})}if(!A)for(let R=h.optional.length-1;R>=0;R--){const $=h.optional[R],{prefix:I,suffix:k}=$;if(I||k){const V=$.caseSensitive?C:O??(O=C.toLowerCase());if(I&&!V.startsWith(I)||k&&!V.endsWith(k))continue}l.push({node:$,index:m+1,skipped:g,depth:M,statics:w,dynamics:y,optionals:S+Mv(o,m),extract:E,rawParams:_})}}if(!A&&h.dynamic&&C)for(let P=h.dynamic.length-1;P>=0;P--){const M=h.dynamic[P],{prefix:R,suffix:$}=M;if(R||$){const I=M.caseSensitive?C:O??(O=C.toLowerCase());if(R&&!I.startsWith(R)||$&&!I.endsWith($))continue}l.push({node:M,index:m+1,skipped:g,depth:x+1,statics:w,dynamics:y+Mv(o,m),optionals:S,extract:E,rawParams:_})}if(!A&&h.staticInsensitive){const P=h.staticInsensitive.get(O??(O=C.toLowerCase()));P&&l.push({node:P,index:m+1,skipped:g,depth:x+1,statics:w+Mv(o,m),dynamics:y,optionals:S,extract:E,rawParams:_})}if(!A&&h.static){const P=h.static.get(C);P&&l.push({node:P,index:m+1,skipped:g,depth:x+1,statics:w+Mv(o,m),dynamics:y,optionals:S,extract:E,rawParams:_})}if(h.pathless){const P=x+1;for(let M=h.pathless.length-1;M>=0;M--){const R=h.pathless[M];l.push({node:R,index:m,skipped:g,depth:P,statics:w,dynamics:y,optionals:S,extract:E,rawParams:_})}}}if(f)return f;if(r&&u){let d=u.index;for(let m=0;m<u.index;m++)d+=t[m].length;const h=d===e.length?"/":e.slice(d);return u.rawParams??(u.rawParams=Object.create(null)),u.rawParams["**"]=decodeURIComponent(h),u}return null}function Mv(e,t){return 2**(e-t-1)}function Dae(e,t){return e===2**(t-1)-1}function $$(e,t,n){let r,i;try{[r,i]=K9(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Rv(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ts)>(e.node.kind===Ts)||t.node.kind===Ts==(e.node.kind===Ts)&&t.depth>e.depth))):!0}function my(e){return $M(e.filter(t=>t!==void 0).join("/"))}function $M(e){return e.replace(/\/{2,}/g,"/")}function X9(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ja(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function Z9(e){return Ja(X9(e))}function qy(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Iae(e,t,n){return qy(e,n)===qy(t,n)}function Lae({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),a=!i&&t===".";let o;if(r){o=i?t:a?e:e+"\0"+t;const f=r.get(o);if(f)return f}let l;if(a)l=e.split("/");else if(i)l=t.split("/");else{for(l=e.split("/");l.length>1&&xp(l)==="";)l.pop();const f=t.split("/");for(let d=0,h=f.length;d<h;d++){const m=f[d];m===""?d?d===h-1&&l.push(m):l=[m]:m===".."?l.pop():m==="."||l.push(m)}}l.length>1&&(xp(l)===""?n==="never"&&l.pop():n==="always"&&l.push(""));const u=$M(l.join("/"))||"/";return o&&r&&r.set(o,u),u}function $ae(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,a=>t.get(a)??a)}function jS(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>q$(i,n)).join("/"):q$(r,n)}function B$({path:e,params:t,decoder:n,...r}){let i=!1;const a=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:i};const o=e.length;let l=0,u,f="";for(;l<o;){const d=l;u=W9(e,d,u);const h=u[5];if(l=h+1,d===h)continue;const m=u[0];if(m===0){f+="/"+e.substring(d,h);continue}if(m===2){const g=t._splat;a._splat=g,a["*"]=g;const x=e.substring(d,u[1]),w=e.substring(u[4],h);if(!g){i=!0,(x||w)&&(f+="/"+x+w);continue}const y=jS("_splat",t,n);f+="/"+x+y+w;continue}if(m===1){const g=e.substring(u[2],u[3]);!i&&!(g in t)&&(i=!0),a[g]=t[g];const x=e.substring(d,u[1]),w=e.substring(u[4],h),y=jS(g,t,n)??"undefined";f+="/"+x+y+w;continue}if(m===3){const g=e.substring(u[2],u[3]),x=t[g];if(x==null)continue;a[g]=x;const w=e.substring(d,u[1]),y=e.substring(u[4],h),S=jS(g,t,n)??"";f+="/"+w+S+y;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:a,interpolatedPath:f||"/",isMissingParams:i}}function q$(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function Xn(e){return(e==null?void 0:e.isNotFound)===!0}function Bae(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function NS(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function qae(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,i]of t.entries()){const a=n[r];a==null?n[r]=NS(i):Array.isArray(a)?a.push(NS(i)):n[r]=[a,NS(i)]}return n}const zae=Fae(JSON.parse),Vae=Uae(JSON.stringify,JSON.parse);function Fae(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=qae(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function Uae(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const a=Bae(i,r);return a?`?${a}`:""}}const au="__root__";function Hae(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function br(e){return e instanceof Response&&!!e.options}const Qj=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Gae=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),j0=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),ou=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let a=0;a<=i;a++){const o=e.matches[a];if(!o)continue;const l=e.router.getMatch(o.id);l&&Object.assign(r,l.__routeContext,l.__beforeLoadContext)}return r},z$=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(o=>o.routeId===e.router.routeTree.id),i=r>=0?r:0;let a=n?e.matches.findIndex(o=>o.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let o=a;o>=0;o--){const l=e.matches[o];if(e.router.looseRoutesById[l.routeId].options.notFoundComponent)return o}return n?a:i},Os=(e,t,n)=>{var r,i,a;if(!(!br(n)&&!Xn(n)))throw br(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:br(n)?"redirected":Xn(n)?"notFound":o.status==="pending"?"success":o.status,context:ou(e,t.index),isFetching:!1,error:n})),Xn(n)&&!n.routeId&&(n.routeId=t.routeId),(a=t._nonReactive.loadPromise)==null||a.resolve()),br(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},Q9=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},V$=(e,t,n)=>{const r=ou(e,n);e.updateMatch(t,i=>({...i,context:r}))},Mh=(e,t,n,r)=>{var l,u;const{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Os(e,e.router.getMatch(i),n);try{(u=(l=o.options).onError)==null||u.call(l,n)}catch(f){n=f,Os(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>{var d,h;return(d=f._nonReactive.beforeLoadPromise)==null||d.resolve(),f._nonReactive.beforeLoadPromise=void 0,(h=f._nonReactive.loadPromise)==null||h.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!br(n)&&!Xn(n)&&(e.serialError??(e.serialError=n))},J9=(e,t,n,r)=>{var a;if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!j0(e,t)&&(n.options.loader||n.options.beforeLoad||tG(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((a=e.router.options)==null?void 0:a.defaultPendingComponent))){const o=setTimeout(()=>{Qj(e)},i);r._nonReactive.pendingTimeout=o}},Wae=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;J9(e,t,n,r);const i=()=>{const a=e.router.getMatch(t);a.preload&&(a.status==="redirected"||a.status==="notFound")&&Os(e,a,a.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Kae=(e,t,n,r)=>{const i=e.router.getMatch(t);let a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=bf(()=>{a==null||a.resolve(),a=void 0});const{paramsError:o,searchError:l}=i;o&&Mh(e,n,o,"PARSE_PARAMS"),l&&Mh(e,n,l,"VALIDATE_SEARCH"),J9(e,t,r,i);const u=new AbortController;let f=!1;const d=()=>{f||(f=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:u})))},h=()=>{var A;(A=i._nonReactive.beforeLoadPromise)==null||A.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{d(),h()});return}i._nonReactive.beforeLoadPromise=bf();const m={...ou(e,n,!1),...i.__routeContext},{search:g,params:x,cause:w}=i,y=j0(e,t),S={search:g,abortController:u,params:x,preload:y,context:m,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:y?"preload":w,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},E=A=>{if(A===void 0){e.router.batch(()=>{d(),h()});return}(br(A)||Xn(A))&&(d(),Mh(e,n,A,"BEFORE_LOAD")),e.router.batch(()=>{d(),e.updateMatch(t,C=>({...C,__beforeLoadContext:A})),h()})};let _;try{if(_=r.options.beforeLoad(S),wp(_))return d(),_.catch(A=>{Mh(e,n,A,"BEFORE_LOAD")}).then(E)}catch(A){d(),Mh(e,n,A,"BEFORE_LOAD")}E(_)},Yae=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>l(),o=()=>Kae(e,n,t,i),l=()=>{if(Q9(e,n))return;const u=Wae(e,n,i);return wp(u)?u.then(o):o()};return a()},Xae=(e,t,n)=>{var a,o,l,u,f,d;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(o=(a=n.options).head)==null?void 0:o.call(a,i),(u=(l=n.options).scripts)==null?void 0:u.call(l,i),(d=(f=n.options).headers)==null?void 0:d.call(f,i)]).then(([h,m,g])=>({meta:h==null?void 0:h.meta,links:h==null?void 0:h.links,headScripts:h==null?void 0:h.scripts,headers:g,scripts:m,styles:h==null?void 0:h.styles}))},eG=(e,t,n,r,i)=>{const a=t[r-1],{params:o,loaderDeps:l,abortController:u,cause:f}=e.router.getMatch(n),d=ou(e,r),h=j0(e,n);return{params:o,deps:l,preload:!!h,parentMatchPromise:a,abortController:u,context:d,location:e.location,navigate:m=>e.router.navigate({...m,_fromLocation:e.location}),cause:h?"preload":f,route:i,...e.router.options.additionalContext}},F$=async(e,t,n,r,i)=>{var a,o,l,u,f;try{const d=e.router.getMatch(n);try{(!(F9??e.router.isServer)||d.ssr===!0)&&_p(i);const h=i.options.loader,m=typeof h=="function"?h:h==null?void 0:h.handler,g=m==null?void 0:m(eG(e,t,n,r,i)),x=!!m&&wp(g);if((x||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||d._nonReactive.minPendingPromise)&&e.updateMatch(n,y=>({...y,isFetching:"loader"})),m){const y=x?await g:g;Os(e,e.router.getMatch(n),y),y!==void 0&&e.updateMatch(n,S=>({...S,loaderData:y}))}i._lazyPromise&&await i._lazyPromise;const w=d._nonReactive.minPendingPromise;w&&await w,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,y=>({...y,error:void 0,context:ou(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(h){let m=h;if((m==null?void 0:m.name)==="AbortError"){if(d.abortController.signal.aborted){(a=d._nonReactive.loaderPromise)==null||a.resolve(),d._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,x=>({...x,status:x.status==="pending"?"success":x.status,isFetching:!1,context:ou(e,r)}));return}const g=d._nonReactive.minPendingPromise;g&&await g,Xn(h)&&await((l=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:l.call(o)),Os(e,e.router.getMatch(n),h);try{(f=(u=i.options).onError)==null||f.call(u,h)}catch(x){m=x,Os(e,e.router.getMatch(n),x)}!br(m)&&!Xn(m)&&await _p(i,["errorComponent"]),e.updateMatch(n,x=>({...x,error:m,context:ou(e,r),status:"error",isFetching:!1}))}}catch(d){const h=e.router.getMatch(n);h&&(h._nonReactive.loaderPromise=void 0),Os(e,h,d)}},Zae=async(e,t,n)=>{var g,x,w,y;async function r(S,E,_,A,C){const O=Date.now()-E.updatedAt,P=S?C.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:C.options.staleTime??e.router.options.defaultStaleTime??0,M=C.options.shouldReload,R=typeof M=="function"?M(eG(e,t,i,n,C)):M,{status:$,invalid:I}=A,k=O>=P&&(!!e.forceStaleReload||A.cause==="enter"||_!==void 0&&_!==A.id);o=$==="success"&&(I||(R??k)),S&&C.options.preload===!1||(o&&!e.sync&&d?(l=!0,(async()=>{var V,D;try{await F$(e,t,i,n,C);const q=e.router.getMatch(i);(V=q._nonReactive.loaderPromise)==null||V.resolve(),(D=q._nonReactive.loadPromise)==null||D.resolve(),q._nonReactive.loaderPromise=void 0,q._nonReactive.loadPromise=void 0}catch(q){br(q)&&await e.router.navigate(q.options)}})()):$!=="success"||o?await F$(e,t,i,n,C):V$(e,i,n))}const{id:i,routeId:a}=e.matches[n];let o=!1,l=!1;const u=e.router.looseRoutesById[a],f=u.options.loader,d=((typeof f=="function"||f==null?void 0:f.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(Q9(e,i)){if(!e.router.getMatch(i))return e.matches[n];V$(e,i,n)}else{const S=e.router.getMatch(i),E=e.router.stores.matchesId.get()[n],_=((g=E&&e.router.stores.matchStores.get(E)||null)==null?void 0:g.routeId)===a?E:(x=e.router.stores.matches.get().find(C=>C.routeId===a))==null?void 0:x.id,A=j0(e,i);if(S._nonReactive.loaderPromise){if(S.status==="success"&&!e.sync&&!S.preload&&d)return S;await S._nonReactive.loaderPromise;const C=e.router.getMatch(i),O=C._nonReactive.error||C.error;O&&Os(e,C,O),C.status==="pending"&&await r(A,S,_,C,u)}else{const C=A&&!e.router.stores.matchStores.has(i),O=e.router.getMatch(i);O._nonReactive.loaderPromise=bf(),C!==O.preload&&e.updateMatch(i,P=>({...P,preload:C})),await r(A,S,_,O,u)}}const h=e.router.getMatch(i);l||((w=h._nonReactive.loaderPromise)==null||w.resolve(),(y=h._nonReactive.loadPromise)==null||y.resolve(),h._nonReactive.loadPromise=void 0),clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,l||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;const m=l?h.isFetching:!1;return m!==h.isFetching||h.invalid!==!1?(e.updateMatch(i,S=>({...S,isFetching:m,invalid:!1})),e.router.getMatch(i)):h};async function U$(e){var m,g;const t=e,n=[];Gae(t.router)&&Qj(t);let r;for(let x=0;x<t.matches.length;x++){try{const w=Yae(t,x);wp(w)&&await w}catch(w){if(br(w))throw w;if(Xn(w))r=w;else if(!t.preload)throw w;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?z$(t,r):void 0,o=r&&t.preload?0:a!==void 0?Math.min(a+1,i):i;let l,u;for(let x=0;x<o;x++)n.push(Zae(t,n,x));try{await Promise.all(n)}catch{const x=await Promise.allSettled(n);for(const w of x){if(w.status!=="rejected")continue;const y=w.reason;if(br(y))throw y;Xn(y)?l??(l=y):u??(u=y)}if(u!==void 0)throw u}const f=l??(r&&!t.preload?r:void 0);let d=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const x=z$(t,f);x===void 0&&io();const w=t.matches[x],y=t.router.looseRoutesById[w.routeId],S=(m=t.router.options)==null?void 0:m.defaultNotFoundComponent;!y.options.notFoundComponent&&S&&(y.options.notFoundComponent=S),f.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,_=>({..._,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),d=x,await _p(y,["notFoundComponent"])}else if(!t.preload){const x=t.matches[0];x.globalNotFound||(g=t.router.getMatch(x.id))!=null&&g.globalNotFound&&t.updateMatch(x.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const x=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await _p(x,["errorComponent"])}for(let x=0;x<=d;x++){const{id:w,routeId:y}=t.matches[x],S=t.router.looseRoutesById[y];try{const E=Xae(t,w,S);if(E){const _=await E;t.updateMatch(w,A=>({...A,..._}))}}catch(E){console.error(`Error executing head for route ${y}:`,E)}}const h=Qj(t);if(wp(h)&&await h,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function H$(e,t){const n=t.map(r=>{var i,a;return(a=(i=e.options[r])==null?void 0:i.preload)==null?void 0:a.call(i)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function _p(e,t=gy){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:i,...a}=r.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===gy?(()=>{if(e._componentsPromise===void 0){const r=H$(e,gy);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():H$(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function tG(e){var t;for(const n of gy)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const gy=["component","errorComponent","pendingComponent","notFoundComponent"];function Qae(e){return{input:({url:t})=>{for(const n of e)t=Jj(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=nG(e[n],t);return t}}}function Jae(e){const t=Z9(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:a})=>{const o=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return o===r?a.pathname="/":o.startsWith(i)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=my(["/",t,a.pathname]),a)}}function Jj(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function nG(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function eoe(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,l=new Map,u=new Map,f=n(e.status),d=n(e.loadedAt),h=n(e.isLoading),m=n(e.isTransitioning),g=n(e.location),x=n(e.resolvedLocation),w=n(e.statusCode),y=n(e.redirect),S=n([]),E=n([]),_=n([]),A=r(()=>PS(o,S.get())),C=r(()=>PS(l,E.get())),O=r(()=>PS(u,_.get())),P=r(()=>S.get()[0]),M=r(()=>S.get().some(z=>{var H;return((H=o.get(z))==null?void 0:H.get().status)==="pending"})),R=r(()=>{var z;return{locationHref:g.get().href,resolvedLocationHref:(z=x.get())==null?void 0:z.href,status:f.get()}}),$=r(()=>({status:f.get(),loadedAt:d.get(),isLoading:h.get(),isTransitioning:m.get(),matches:A.get(),location:g.get(),resolvedLocation:x.get(),statusCode:w.get(),redirect:y.get()})),I=Sp(64);function k(z){let H=I.get(z);return H||(H=r(()=>{const Y=S.get();for(const Z of Y){const U=o.get(Z);if(U&&U.routeId===z)return U.get()}}),I.set(z,H)),H}const V={status:f,loadedAt:d,isLoading:h,isTransitioning:m,location:g,resolvedLocation:x,statusCode:w,redirect:y,matchesId:S,pendingIds:E,cachedIds:_,matches:A,pendingMatches:C,cachedMatches:O,firstId:P,hasPending:M,matchRouteDeps:R,matchStores:o,pendingMatchStores:l,cachedMatchStores:u,__store:$,getRouteMatchStore:k,setMatches:D,setPending:q,setCached:L};D(e.matches),a==null||a(V);function D(z){MS(z,o,S,n,i)}function q(z){MS(z,l,E,n,i)}function L(z){MS(z,u,_,n,i)}return V}function PS(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function MS(e,t,n,r,i){const a=e.map(l=>l.id),o=new Set(a);i(()=>{for(const l of t.keys())o.has(l)||t.delete(l);for(const l of e){const u=t.get(l.id);if(!u){const f=r(l);f.routeId=l.routeId,t.set(l.id,f);continue}u.routeId=l.routeId,u.get()!==l&&u.set(l)}Aae(n.get(),a)||n.set(a)})}var ks="__TSR_index",G$="popstate",W$="beforeunload";function toe(e){let t=e.getLocation();const n=new Set,r=o=>{t=e.getLocation(),n.forEach(l=>l({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?r(o):t=e.getLocation()},a=async({task:o,navigateOpts:l,...u})=>{var h,m;if((l==null?void 0:l.ignoreBlocker)??!1){o();return}const f=((h=e.getBlockers)==null?void 0:h.call(e))??[],d=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&f.length&&d)for(const g of f){const x=zy(u.path,u.state);if(await g.blockerFn({currentLocation:t,nextLocation:x,action:u.type})){(m=e.onBlocked)==null||m.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,l,u)=>{const f=t.state[ks];l=K$(f+1,l),a({task:()=>{e.pushState(o,l),r({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:o,state:l})},replace:(o,l,u)=>{const f=t.state[ks];l=K$(f,l),a({task:()=>{e.replaceState(o,l),r({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:o,state:l})},go:(o,l)=>{a({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:l,type:"GO"})},back:o=>{a({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{a({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[ks]!==0,createHref:o=>e.createHref(o),block:o=>{var u;if(!e.setBlockers)return()=>{};const l=((u=e.getBlockers)==null?void 0:u.call(e))??[];return e.setBlockers([...l,o]),()=>{var d,h;const f=((d=e.getBlockers)==null?void 0:d.call(e))??[];(h=e.setBlockers)==null||h.call(e,f.filter(m=>m!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:r}}function K$(e,t){t||(t={});const n=BM();return{...t,key:n,__TSR_key:n,[ks]:e}}function noe(e){var M,R;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const a=()=>i,o=$=>i=$,l=($=>$),u=(()=>zy(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((M=t.history.state)!=null&&M.__TSR_key)&&!((R=t.history.state)!=null&&R.key)){const $=BM();t.history.replaceState({[ks]:0,key:$,__TSR_key:$},"")}let f=u(),d,h=!1,m=!1,g=!1,x=!1;const w=()=>f;let y,S;const E=()=>{y&&(P._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),P._ignoreSubscribers=!1,y=void 0,S=void 0,d=void 0)},_=($,I,k)=>{const V=l(I);S||(d=f),f=zy(I,k),y={href:V,state:k,isPush:(y==null?void 0:y.isPush)||$==="push"},S||(S=Promise.resolve().then(()=>E()))},A=$=>{f=u(),P.notify({type:$})},C=async()=>{if(m){m=!1;return}const $=u(),I=$.state[ks]-f.state[ks],k=I===1,V=I===-1,D=!k&&!V||h;h=!1;const q=D?"GO":V?"BACK":"FORWARD",L=D?{type:"GO",index:I}:{type:V?"BACK":"FORWARD"};if(g)g=!1;else{const z=a();if(typeof document<"u"&&z.length){for(const H of z)if(await H.blockerFn({currentLocation:f,nextLocation:$,action:q})){m=!0,t.history.go(1),P.notify(L);return}}}f=u(),P.notify(L)},O=$=>{if(x){x=!1;return}let I=!1;const k=a();if(typeof document<"u"&&k.length)for(const V of k){const D=V.enableBeforeUnload??!0;if(D===!0){I=!0;break}if(typeof D=="function"&&D()===!0){I=!0;break}}if(I)return $.preventDefault(),$.returnValue=""},P=toe({getLocation:w,getLength:()=>t.history.length,pushState:($,I)=>_("push",$,I),replaceState:($,I)=>_("replace",$,I),back:$=>($&&(g=!0),x=!0,t.history.back()),forward:$=>{$&&(g=!0),x=!0,t.history.forward()},go:$=>{h=!0,t.history.go($)},createHref:$=>l($),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(W$,O,{capture:!0}),t.removeEventListener(G$,C)},onBlocked:()=>{d&&f!==d&&(f=d)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(W$,O,{capture:!0}),t.addEventListener(G$,C),t.history.pushState=function(...$){const I=n.apply(t.history,$);return P._ignoreSubscribers||A("PUSH"),I},t.history.replaceState=function(...$){const I=r.apply(t.history,$);return P._ignoreSubscribers||A("REPLACE"),I},P}function roe(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function zy(e,t){const n=roe(e),r=n.indexOf("#"),i=n.indexOf("?"),a=BM();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:t||{[ks]:0,key:a,__TSR_key:a}}}function BM(){return(Math.random()+1).toString(36).substring(7)}function Xc(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}const eN=new WeakMap;var ioe=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{var d;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",a=this.basepath===void 0,o=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=$ae(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=noe()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let h;this.resolvePathCache=Sp(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=eoe(ooe(this.latestLocation),h),voe(this)}let l=!1;const u=this.options.basepath??"/",f=this.options.rewrite;if(a||i!==u||o!==f){this.basepath=u;const h=[],m=Z9(u);m&&m!=="/"&&h.push(Jae({basepath:u})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:Qae(h),this.history&&this.updateLatestLocation(),l=!0}l&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((d=window.CSS)==null?void 0:d.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Mae(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&Tae(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:u,search:f,hash:d,href:h,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){const S=this.options.parseSearch(f),E=this.options.stringifySearch(S);return{href:u+E+d,publicHref:u+E+d,pathname:Ph(u).path,external:!1,searchStr:E,search:jl(r==null?void 0:r.search,S),hash:Ph(d.slice(1)).path,state:Cs(r==null?void 0:r.state,m)}}const g=new URL(h,this.origin),x=Jj(this.rewrite,g),w=this.options.parseSearch(x.search),y=this.options.stringifySearch(w);return x.search=y,{href:x.href.replace(x.origin,""),publicHref:h,pathname:Ph(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:y,search:jl(r==null?void 0:r.search,w),hash:Ph(x.hash.slice(1)).path,state:Cs(r==null?void 0:r.state,m)}},a=i(n),{__tempLocation:o,__tempKey:l}=a.state;if(o&&(!l||l===this.tempLocationKey)){const u=i(o);return u.state.key=a.state.key,u.state.__TSR_key=a.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:a}}return a},this.resolvePathWithBase=(n,r)=>Lae({base:n,to:r.includes("//")?$M(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>soe({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(a={})=>{var I,k;const o=a._fromLocation||this.pendingBuiltLocation||this.latestLocation,l=this.matchRoutesLightweight(o);a.from;const u=a.unsafeRelative==="path"?o.pathname:a.from??l.fullPath,f=a.to?`${a.to}`:void 0,d=l.search,h=Object.assign(Object.create(null),l.params),m=(f==null?void 0:f.charCodeAt(0))===47?"/":this.resolvePathWithBase(u,"."),g=f?this.resolvePathWithBase(m,f):m,x=a.params===!1||a.params===null?Object.create(null):(a.params??!0)===!0?h:Object.assign(h,ql(a.params,h)),w=this.routesByPath[Ja(g)];let y;if(w)y=this.getRouteBranch(w);else if(g.includes("$"))y=[];else{const V=this.getMatchedRoutes(g);y=V.matchedRoutes,this.options.notFoundRoute&&(!V.foundRoute||V.foundRoute.path!=="/"&&V.routeParams["**"])&&(y=[...y,this.options.notFoundRoute])}if(y.length&&H9(x))for(const V of y){const D=((I=V.options.params)==null?void 0:I.stringify)??V.options.stringifyParams;if(D)try{Object.assign(x,D(x))}catch{}}const S=n.leaveParams?g:Ph(B$({path:g,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let E=d;if(n._includeValidateSearch&&((k=this.options.search)!=null&&k.strict)){const V={};y.forEach(D=>{if(D.options.validateSearch)try{Object.assign(V,vy(D.options.validateSearch,{...V,...E}))}catch{}}),E=V}E=loe({search:E,dest:a,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),E=jl(d,E);const _=this.options.stringifySearch(E),A=a.hash===!0?o.hash:a.hash?ql(a.hash,o.hash):void 0,C=A?`#${A}`:"";let O=a.state===!0?o.state:a.state?ql(a.state,o.state):{};O=Cs(o.state,O);const P=`${S}${_}${C}`;let M,R,$=!1;if(this.rewrite){const V=new URL(P,this.origin),D=nG(this.rewrite,V);M=V.href.replace(V.origin,""),D.origin!==this.origin?(R=D.href,$=!0):R=D.pathname+D.search+D.hash}else M=Eae(P),R=M;return{publicHref:R,href:M,pathname:S,search:E,searchStr:_,state:O,hash:A??"",external:$,unmaskOnReload:a.unmaskOnReload}},i=(a={},o)=>{const l=r(a);let u=o?r(o):void 0;if(!u){const f=Object.create(null);if(this.options.routeMasks){const d=Oae(l.pathname,this.processedTree);if(d){Object.assign(f,d.rawParams);const{from:h,params:m,...g}=d.route,x=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,ql(m,f));o={from:n.from,...g,params:x},u=r(o)}}}return u&&(l.maskedLocation=u),l};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{let a;const o=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(h=>{i.state[h]=this.latestLocation.state[h]});const d=iu(i.state,this.latestLocation.state);return f.forEach(h=>{delete i.state[h]}),d},l=Ja(this.latestLocation.href)===Ja(i.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=bf(()=>{u==null||u.resolve(),u=void 0}),l&&o())this.load();else{let{maskedLocation:f,hashScrollIntoView:d,...h}=i;f&&(h={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=d??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,a=i.replace?"REPLACE":"PUSH",this.history[a==="REPLACE"?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(a?{action:{type:a}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:a,ignoreBlocker:o,href:l,...u}={})=>{if(l){const h=this.history.location.state.__TSR_index,m=zy(l,{__TSR_index:n?h:h+1}),g=new URL(m.pathname,this.origin);u.to=Jj(this.rewrite,g).pathname,u.search=this.options.parseSearch(m.search),u.hash=m.hash.slice(1)}const f=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const d=this.commitLocation({...f,viewTransition:a,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),d},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:a,...o})=>{var u,f;let l=!1;if(i)try{new URL(`${i}`),l=!0}catch{}if(l&&!r&&(r=!0),r){if(n!==void 0||!i){const h=this.buildLocation({to:n,...o});i=i??h.publicHref,a=a??h.publicHref}const d=!l&&a?a:i;if(By(d,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const h=((f=(u=this.history).getBlockers)==null?void 0:f.call(u))??[];for(const m of h)if(m!=null&&m.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(a=>a.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{var f;const r=(f=n==null?void 0:n.action)==null?void 0:f.type;let i,a,o;const l=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(d=>{this.startTransition(async()=>{var h;try{this.beforeLoad(),r?eN.set(this.latestLocation,r):eN.delete(this.latestLocation);const m=this.latestLocation,g=Xc(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await U$({router:this,sync:n==null?void 0:n.sync,forceStaleReload:l.href===m.href,matches:this.stores.pendingMatches.get(),location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var E,_;let x=null,w=null,y=null,S=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),C=A.length,O=this.stores.matches.get();x=C?O.filter(R=>!this.stores.pendingMatchStores.has(R.id)):null;const P=new Set;for(const R of this.stores.pendingMatchStores.values())R.routeId&&P.add(R.routeId);const M=new Set;for(const R of this.stores.matchStores.values())R.routeId&&M.add(R.routeId);w=C?O.filter(R=>!P.has(R.routeId)):null,y=C?A.filter(R=>!M.has(R.routeId)):null,S=C?A.filter(R=>M.has(R.routeId)):O,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),C&&(this.stores.setMatches(A),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...x.filter(R=>R.status!=="error"&&R.status!=="notFound"&&R.status!=="redirected")]),this.clearExpiredCache())});for(const[A,C]of[[w,"onLeave"],[y,"onEnter"],[S,"onStay"]])if(A)for(const O of A)(_=(E=this.looseRoutesById[O.routeId].options)[C])==null||_.call(E,O)})})}})}catch(m){br(m)?(i=m,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Xn(m)&&(a=m);const g=i?i.status:a?404:this.stores.matches.get().some(x=>x.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(i)})}this.latestLoadPromise===o&&((h=this.commitLocationPromise)==null||h.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(d=>d.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const a=this.latestLocation,o=this.stores.resolvedLocation.get(),l=typeof r.types=="function"?r.types(Xc(a,o)):r.types;if(l===!1){n();return}i={update:n,types:l}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const a=this.stores.matchStores.get(n);if(a){a.set(r);return}const o=this.stores.cachedMatchStores.get(n);if(o){const l=r(o.get());l.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(u=>u.filter(f=>f!==n)):o.set(l)}})},this.getMatch=n=>{var r,i,a;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((a=this.stores.matchStores.get(n))==null?void 0:a.get())},this.invalidate=n=>{const r=i=>{var a;return((a=n==null?void 0:n.filter)==null?void 0:a.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),a=this.getParsedLocationHref(i);n.options.href=a,n.headers.set("Location",a)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const a=i.pathname+i.search+i.hash;n.options.href=a,n.headers.set("Location",a)}}catch{}if(n.options.href&&!n.options._builtLocation&&By(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(i=>!r(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=i=>{const a=this.looseRoutesById[i.routeId];if(!a.options.loader)return!0;const o=(i.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=o};this.clearCache({filter:r})},this.loadRouteChunk=_p,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const a=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...a,...this.stores.cachedIds.get()]),l=i.filter(u=>!o.has(u.id));if(l.length){const u=this.stores.cachedMatches.get();this.stores.setCached([...u,...l])}try{return i=await U$({router:this,matches:i,location:r,preload:!0,updateMatch:(u,f)=>{a.has(u)?i=i.map(d=>d.id===u?f(d):d):this.updateMatch(u,f)}}),i}catch(u){if(br(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});Xn(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},a=this.buildLocation(i);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const o=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=jae(a.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!l||n.params&&!iu(l.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?iu(o.search,a.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Vae,parseSearch:e.parseSearch??zae,protocolAllowlist:e.protocolAllowlist??_ae}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=Y9(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var d,h;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n;let{matchedRoutes:a}=n,o=!1;(r?r.path!=="/"&&i["**"]:Ja(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);const l=o?coe(this.options.notFoundMode,a):void 0,u=new Array(a.length),f=new Map;for(const m of this.stores.matchStores.values())m.routeId&&f.set(m.routeId,m.get());for(let m=0;m<a.length;m++){const g=a[m],x=u[m-1];let w,y,S;{const D=(x==null?void 0:x.search)??e.search,q=(x==null?void 0:x._strictSearch)??void 0;try{const L=vy(g.options.validateSearch,{...D})??void 0;w={...D,...L},y={...q,...L},S=void 0}catch(L){let z=L;if(L instanceof Vy||(z=new Vy(L.message,{cause:L})),t!=null&&t.throwOnError)throw z;w=D,y={},S=z}}const E=((h=(d=g.options).loaderDeps)==null?void 0:h.call(d,{search:w}))??"",_=E?JSON.stringify(E):"",{interpolatedPath:A,usedParams:C}=B$({path:g.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),O=g.id+A+_,P=this.getMatch(O),M=f.get(g.id),R=(P==null?void 0:P._strictParams)??C;let $;if(!P)try{Y$(g,R)}catch(D){if(Xn(D)||br(D)?$=D:$=new aoe(D.message,{cause:D}),t!=null&&t.throwOnError)throw $}Object.assign(i,R);const I=M?"stay":"enter";let k;if(P)k={...P,cause:I,params:(M==null?void 0:M.params)??i,_strictParams:R,search:jl(M?M.search:P.search,w),_strictSearch:y};else{const D=g.options.loader||g.options.beforeLoad||g.lazyFn||tG(g)?"pending":"success";k={id:O,ssr:g.options.ssr,index:m,routeId:g.id,params:(M==null?void 0:M.params)??i,_strictParams:R,pathname:A,updatedAt:Date.now(),search:M?jl(M.search,w):w,_strictSearch:y,searchError:void 0,status:D,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:bf()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:I,loaderDeps:M?Cs(M.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:g.options.staticData||{},fullPath:g.fullPath}}t!=null&&t.preload||(k.globalNotFound=l===g.id),k.searchError=S;const V=this.getParentContext(x);k.context={...V,...k.__routeContext,...k.__beforeLoadContext},u[m]=k}for(let m=0;m<u.length;m++){const g=u[m],x=this.looseRoutesById[g.routeId],w=this.getMatch(g.id),y=f.get(g.routeId);if(g.params=y?jl(y.params,i):i,!w){const S=u[m-1],E=this.getParentContext(S);if(x.options.context){const _={deps:g.loaderDeps,params:g.params,context:E??{},location:e,navigate:A=>this.navigate({...A,_fromLocation:e}),buildLocation:this.buildLocation,cause:g.cause,abortController:g.abortController,preload:!!g.preload,matches:u,routeId:x.id};g.__routeContext=x.options.context(_)??void 0}g.context={...E,...g.__routeContext,...g.__beforeLoadContext}}}return u}matchRoutesLightweight(e){var f;const{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=xp(t),i={...e.search};for(const d of t)try{Object.assign(i,vy(d.options.validateSearch,i))}catch{}const a=xp(this.stores.matchesId.get()),o=a&&((f=this.stores.matchStores.get(a))==null?void 0:f.get()),l=o&&o.routeId===r.id&&o.pathname===e.pathname;let u;if(l)u=o.params;else{const d=Object.assign(Object.create(null),n);for(const h of t)try{Y$(h,d)}catch{}u=d}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:u}}},Vy=class extends Error{},aoe=class extends Error{};function ooe(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function vy(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Vy("Async validation not supported");if(n.issues)throw new Vy(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function soe({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=Ja(e);let a;const o=Nae(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:(o==null?void 0:o.branch)||[t.__root__],routeParams:r,foundRoute:a}}function loe({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return uoe(n)(e,t,r??!1)}function uoe(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const a of e){if("search"in a.options)(i=a.options.search)!=null&&i.middlewares&&t.middlewares.push(...a.options.search.middlewares);else if(a.options.preSearchFilters||a.options.postSearchFilters){const o=({search:l,next:u})=>{let f=l;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(f=a.options.preSearchFilters.reduce((h,m)=>m(h),l));const d=u(f);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((h,m)=>m(h),d):d};t.middlewares.push(o)}if(a.options.validateSearch){const o=({search:l,next:u})=>{const f=u(l);if(!t._includeValidateSearch)return f;try{return{...f,...vy(a.options.validateSearch,f)??void 0}}catch{return f}};t.middlewares.push(o)}}const n=({search:a})=>{const o=t.dest;return o.search?o.search===!0?a:ql(o.search,a):{}};t.middlewares.push(n);const r=(a,o,l)=>{if(a>=l.length)return o;const u=l[a];return u({search:o,next:d=>r(a+1,d,l)})};return function(o,l,u){return t.dest=l,t._includeValidateSearch=u,r(0,o,t.middlewares)}}function coe(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return au}function Y$(e,t){var r;const n=((r=e.options.params)==null?void 0:r.parse)??e.options.parseParams;if(n){const i=n(t);if(i===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,i)}}function foe(){try{return sessionStorage}catch{return}}const doe="tsr-scroll-restoration-v1_3",Zc=foe();function hoe(){try{return JSON.parse((Zc==null?void 0:Zc.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function poe(){try{Zc==null||Zc.setItem(doe,JSON.stringify(os))}catch{}}const os=hoe(),X$="data-scroll-restoration-id",moe=e=>e.state.__TSR_key||e.href;function goe(e){const t=e.getAttribute(X$);if(t)return`[${X$}="${t}"]`;let n="",r=e,i;for(;i=r.parentNode;){let a=1,o=r;for(;o=o.previousElementSibling;)a++;const l=`${r.localName}:nth-child(${a})`;n=n?`${l} > ${n}`:l,r=i}return n}let kv=!1;const Ic="window";function tN(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function Z$(e){const t=[];for(const n of e){if(n===Ic)continue;const r=tN(n);r&&t.push(r)}return t}function voe(e,t){if(e.options.scrollRestoration&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,kv=!1;const n=e.options.getScrollRestorationKey||moe,r=new Map,i=(l,u,f)=>{const d=r.get(l)||{};d.scrollX=u,d.scrollY=f,r.set(l,d)};history.scrollRestoration="manual";const a=l=>{if(!(kv||!e.isScrollRestoring))if(l.target===document)i(Ic,scrollX,scrollY);else{const u=l.target;i(u,u.scrollLeft,u.scrollTop)}},o=l=>{if(!e.isScrollRestoring)return;const u=os[l]||(os[l]={});for(const[f,d]of r)f===Ic?u[Ic]=d:f.isConnected&&(u[goe(f)]=d)};document.addEventListener("scroll",a,!0),e.subscribe("onBeforeLoad",l=>{l.fromLocation&&o(n(l.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{o(n(e.stores.resolvedLocation.get()??e.stores.location.get())),poe()}),e.subscribe("onRendered",l=>{var x;const u=e.options.scrollRestorationBehavior,f=e.options.scrollToTopSelectors,d=e.resetNextScroll;let h;if(r.clear(),d||(e.resetNextScroll=!0),typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=n(l.toLocation),g=l.fromLocation&&n(l.fromLocation);if(e.isScrollRestoring&&g&&g!==m){const w=os[g];if(w){let y=os[m];for(const S in w){if(S===Ic){if(d)continue}else{const E=tN(S);if(!E||d&&f&&(h??(h=Z$(f)),h.includes(E)))continue}y||(y=os[m]={}),y[S]??(y[S]=w[S])}}}kv=!0;try{const w=l.toLocation.hash,y=l.toLocation.state.__hashScrollIntoViewOptions??!0;let S=!1;if(d){const E=eN.get(l.toLocation),_=w&&y&&(E==="PUSH"||E==="REPLACE"),A=e.isScrollRestoring?os[m]:void 0;if(A)for(const C in A){const{scrollX:O,scrollY:P}=A[C];if(C===Ic){if(_)continue;scrollTo({top:P,left:O,behavior:u}),S=!0}else{const M=tN(C);M&&(M.scrollLeft=O,M.scrollTop=P)}}if(!S&&!w){const C={top:0,left:0,behavior:u};if(scrollTo(C),f){h??(h=Z$(f));for(const O of h)O.scrollTo(C)}}}!S&&w&&y&&((x=document.getElementById(w))==null||x.scrollIntoView(y))}finally{kv=!1}})}const yoe="Error preloading route! ☝️";var rG=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var u,f;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(f=(u=this.options).getParentRoute)==null?void 0:f.call(u),r?this._path=au:this.parentRoute||io();let i=r?au:n==null?void 0:n.path;i&&i!=="/"&&(i=X9(i));const a=(n==null?void 0:n.id)||i;let o=r?au:my([this.parentRoute.id==="__root__"?"":this.parentRoute.id,a]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=my(["/",o]));const l=o==="__root__"?"/":my([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=l,this._to=Ja(l)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Hae({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},boe=class extends rG{constructor(e){super(e)}};function qM(e){const t=e.errorComponent??zM;return b.jsx(xoe,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?j.createElement(t,{error:n,reset:r}):e.children})}var xoe=class extends j.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function zM({error:e}){const[t,n]=j.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),t?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?b.jsx("code",{children:e.message}):null})}):null]})}function woe({children:e,fallback:t=null}){return iG()?b.jsx(ie.Fragment,{children:e}):b.jsx(ie.Fragment,{children:t})}function iG(){return ie.useSyncExternalStore(Soe,()=>!0,()=>!1)}function Soe(){return()=>{}}var aG=j.createContext(null);function Hr(e){return j.useContext(aG)}var N0=j.createContext(void 0),_oe=j.createContext(void 0),Gt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Gt||{});function Eoe({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:l};function r(f,d,h){const m=d.depsTail;if(m!==void 0&&m.dep===f)return;const g=m!==void 0?m.nextDep:d.deps;if(g!==void 0&&g.dep===f){g.version=h,d.depsTail=g;return}const x=f.subsTail;if(x!==void 0&&x.version===h&&x.sub===d)return;const w=d.depsTail=f.subsTail={version:h,dep:f,sub:d,prevDep:m,nextDep:g,prevSub:x,nextSub:void 0};g!==void 0&&(g.prevDep=w),m!==void 0?m.nextDep=w:d.deps=w,x!==void 0?x.nextSub=w:f.subs=w}function i(f,d=f.sub){const h=f.dep,m=f.prevDep,g=f.nextDep,x=f.nextSub,w=f.prevSub;return g!==void 0?g.prevDep=m:d.depsTail=m,m!==void 0?m.nextDep=g:d.deps=g,x!==void 0?x.prevSub=w:h.subsTail=w,w!==void 0?w.nextSub=x:(h.subs=x)===void 0&&n(h),g}function a(f){let d=f.nextSub,h;e:do{const m=f.sub;let g=m.flags;if(g&60?g&12?g&4?!(g&48)&&u(f,m)?(m.flags=g|40,g&=1):g=0:m.flags=g&-9|32:g=0:m.flags=g|32,g&2&&t(m),g&1){const x=m.subs;if(x!==void 0){const w=(f=x).nextSub;w!==void 0&&(h={value:d,prev:h},d=w);continue}}if((f=d)!==void 0){d=f.nextSub;continue}for(;h!==void 0;)if(f=h.value,h=h.prev,f!==void 0){d=f.nextSub;continue e}break}while(!0)}function o(f,d){let h,m=0,g=!1;e:do{const x=f.dep,w=x.flags;if(d.flags&16)g=!0;else if((w&17)===17){if(e(x)){const y=x.subs;y.nextSub!==void 0&&l(y),g=!0}}else if((w&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(h={value:f,prev:h}),f=x.deps,d=x,++m;continue}if(!g){const y=f.nextDep;if(y!==void 0){f=y;continue}}for(;m--;){const y=d.subs,S=y.nextSub!==void 0;if(S?(f=h.value,h=h.prev):f=y,g){if(e(d)){S&&l(y),d=f.sub;continue}g=!1}else d.flags&=-33;d=f.sub;const E=f.nextDep;if(E!==void 0){f=E;continue e}}return g}while(!0)}function l(f){do{const d=f.sub,h=d.flags;(h&48)===32&&(d.flags=h|16,(h&6)===2&&t(d))}while((f=f.nextSub)!==void 0)}function u(f,d){let h=d.depsTail;for(;h!==void 0;){if(h===f)return!0;h=h.prevDep}return!1}}function Aoe(e,t,n){var a,o,l;const r=typeof e=="object",i=r?e:void 0;return{next:(a=r?e.next:e)==null?void 0:a.bind(i),error:(o=r?e.error:t)==null?void 0:o.bind(i),complete:(l=r?e.complete:n)==null?void 0:l.bind(i)}}const nN=[];let yy=0;const{link:Q$,unlink:Coe,propagate:Toe,checkDirty:oG,shallowPropagate:J$}=Eoe({update(e){return e._update()},notify(e){nN[rN++]=e,e.flags&=~Gt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Gt.Mutable|Gt.Dirty,Fy(e))}});let Dv=0,rN=0,Ji,iN=0;function sG(e){try{++iN,e()}finally{--iN||lG()}}function Fy(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Coe(n,e)}function lG(){if(!(iN>0)){for(;Dv<rN;){const e=nN[Dv];nN[Dv++]=void 0,e.notify()}Dv=0,rN=0}}function e3(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Gt.None:Gt.Mutable,get(){return Ji!==void 0&&Q$(i,Ji,yy),i._snapshot},subscribe(a){const o=Aoe(a),l={current:!1},u=Ooe(()=>{var f;i.get(),l.current?(f=o.next)==null||f.call(o,i._snapshot):l.current=!0});return{unsubscribe:()=>{u.stop()}}},_update(a){const o=Ji,l=(t==null?void 0:t.compare)??Object.is;if(n)Ji=i,++yy,i.depsTail=void 0;else if(a===void 0)return!1;n&&(i.flags=Gt.Mutable|Gt.RecursedCheck);try{const u=i._snapshot,f=typeof a=="function"?a(u):a===void 0&&n?r(u):a;return u===void 0||!l(u,f)?(i._snapshot=f,!0):!1}finally{Ji=o,n&&(i.flags&=~Gt.RecursedCheck),Fy(i)}}};return n?(i.flags=Gt.Mutable|Gt.Dirty,i.get=function(){const a=i.flags;if(a&Gt.Dirty||a&Gt.Pending&&oG(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&J$(o)}}else a&Gt.Pending&&(i.flags=a&~Gt.Pending);return Ji!==void 0&&Q$(i,Ji,yy),i._snapshot}):i.set=function(a){if(i._update(a)){const o=i.subs;o!==void 0&&(Toe(o),J$(o),lG())}},i}function Ooe(e){const t=()=>{const r=Ji;Ji=n,++yy,n.depsTail=void 0,n.flags=Gt.Watching|Gt.RecursedCheck;try{return e()}finally{Ji=r,n.flags&=~Gt.RecursedCheck,Fy(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Gt.Watching|Gt.RecursedCheck,notify(){const r=this.flags;r&Gt.Dirty||r&Gt.Pending&&oG(this.deps,this)?t():this.flags=Gt.Watching},stop(){this.flags=Gt.None,this.depsTail=void 0,Fy(this)}};return t(),n}var RS={exports:{}},kS={},DS={exports:{}},IS={};/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var t3;function joe(){if(t3)return IS;t3=1;var e=jm();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(h,m){var g=m(),x=r({inst:{value:g,getSnapshot:m}}),w=x[0].inst,y=x[1];return a(function(){w.value=g,w.getSnapshot=m,u(w)&&y({inst:w})},[h,g,m]),i(function(){return u(w)&&y({inst:w}),h(function(){u(w)&&y({inst:w})})},[h]),o(g),g}function u(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!n(h,g)}catch{return!0}}function f(h,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return IS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,IS}var n3;function Noe(){return n3||(n3=1,DS.exports=joe()),DS.exports}/**
|
|
58
|
+
* @license React
|
|
59
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/var r3;function Poe(){if(r3)return kS;r3=1;var e=jm(),t=Noe();function n(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,l=e.useMemo,u=e.useDebugValue;return kS.useSyncExternalStoreWithSelector=function(f,d,h,m,g){var x=a(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=l(function(){function S(O){if(!E){if(E=!0,_=O,O=m(O),g!==void 0&&w.hasValue){var P=w.value;if(g(P,O))return A=P}return A=O}if(P=A,r(_,O))return P;var M=m(O);return g!==void 0&&g(P,M)?(_=O,P):(_=O,A=M)}var E=!1,_,A,C=h===void 0?null:h;return[function(){return S(d())},C===null?void 0:function(){return S(C())}]},[d,h,m,g]);var y=i(f,x[0],x[1]);return o(function(){w.hasValue=!0,w.value=y},[y]),u(y),y},kS}var i3;function Moe(){return i3||(i3=1,RS.exports=Poe()),RS.exports}var uG=Moe();const Roe=yt(uG);function koe(e,t){return e===t}function _r(e,t,n=koe){const r=j.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:l}=e.subscribe(o);return l},[e]),i=j.useCallback(()=>e==null?void 0:e.get(),[e]);return uG.useSyncExternalStoreWithSelector(r,i,i,t,n)}var Doe={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Pu(e){const t=Hr(),n=j.useContext(e.from?_oe:N0),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=j.useRef(void 0);return _r(i??Doe,o=>{if((e.shouldThrow??!0)&&!o&&io(),o===void 0)return;const l=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const u=Cs(a.current,l);return a.current=u,u}return l})}function cG(e){return Pu({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function fG(e){const{select:t,...n}=e;return Pu({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Nm(e){return Pu({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Mu(e){return Pu({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function zi(e){const t=Hr();return j.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function dG(e){return Pu({...e,select:t=>e.select?e.select(t.context):t.context})}var Ru=C9();const Ioe=yt(Ru);function Loe(e,t){const n=Hr(),r=bae(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:l,preload:u,preloadDelay:f,preloadIntentProximity:d,hashScrollIntoView:h,replace:m,startTransition:g,resetScroll:x,viewTransition:w,children:y,target:S,disabled:E,style:_,className:A,onClick:C,onBlur:O,onFocus:P,onMouseEnter:M,onMouseLeave:R,onTouchStart:$,ignoreBlocker:I,params:k,search:V,hash:D,state:q,mask:L,reloadDocument:z,unsafeRelative:H,from:Y,_fromLocation:Z,...U}=e,F=iG(),X=j.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),K=_r(n.stores.location,Ge=>Ge,(Ge,$t)=>Ge.href===$t.href),G=j.useMemo(()=>{const Ge={_fromLocation:K,...X};return n.buildLocation(Ge)},[n,K,X]),Q=G.maskedLocation?G.maskedLocation.publicHref:G.publicHref,J=G.maskedLocation?G.maskedLocation.external:G.external,re=j.useMemo(()=>Foe(Q,J,n.history,E),[E,J,Q,n.history]),ne=j.useMemo(()=>{if(re!=null&&re.external)return By(re.href,n.protocolAllowlist)?void 0:re.href;if(!Uoe(l)&&!(typeof l!="string"||l.indexOf(":")===-1))try{return new URL(l),By(l,n.protocolAllowlist)?void 0:l}catch{}},[l,re,n.protocolAllowlist]),fe=j.useMemo(()=>{if(ne)return!1;if(o!=null&&o.exact){if(!Iae(K.pathname,G.pathname,n.basepath))return!1}else{const Ge=qy(K.pathname,n.basepath),$t=qy(G.pathname,n.basepath);if(!(Ge.startsWith($t)&&(Ge.length===$t.length||Ge[$t.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!iu(K.search,G.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?F&&K.hash===G.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,K,ne,F,G.hash,G.pathname,G.search,n.basepath]),he=fe?ql(i,{})??$oe:LS,oe=fe?LS:ql(a,{})??LS,ye=[A,he.className,oe.className].filter(Boolean).join(" "),be=(_||he.style||oe.style)&&{..._,...he.style,...oe.style},[xe,Ae]=j.useState(!1),_e=j.useRef(!1),tt=e.reloadDocument||ne?!1:u??n.options.defaultPreload,nt=f??n.options.defaultPreloadDelay??0,Lt=j.useCallback(()=>{n.preloadRoute({...X,_builtLocation:G}).catch(Ge=>{console.warn(Ge),console.warn(yoe)})},[n,X,G]);yae(r,j.useCallback(Ge=>{Ge!=null&&Ge.isIntersecting&&Lt()},[Lt]),Voe,{disabled:!!E||tt!=="viewport"}),j.useEffect(()=>{_e.current||!E&&tt==="render"&&(Lt(),_e.current=!0)},[E,Lt,tt]);const Ut=Ge=>{const $t=Ge.currentTarget.getAttribute("target"),bn=S!==void 0?S:$t;if(!E&&!Hoe(Ge)&&!Ge.defaultPrevented&&(!bn||bn==="_self")&&Ge.button===0){Ge.preventDefault(),Ru.flushSync(()=>{Ae(!0)});const Vn=n.subscribe("onResolved",()=>{Vn(),Ae(!1)});n.navigate({...X,replace:m,resetScroll:x,hashScrollIntoView:h,startTransition:g,viewTransition:w,ignoreBlocker:I})}};if(ne)return{...U,ref:r,href:ne,...y&&{children:y},...S&&{target:S},...E&&{disabled:E},..._&&{style:_},...A&&{className:A},...C&&{onClick:C},...O&&{onBlur:O},...P&&{onFocus:P},...M&&{onMouseEnter:M},...R&&{onMouseLeave:R},...$&&{onTouchStart:$}};const Pt=Ge=>{if(E||tt!=="intent")return;if(!nt){Lt();return}const $t=Ge.currentTarget;if(Rh.has($t))return;const bn=setTimeout(()=>{Rh.delete($t),Lt()},nt);Rh.set($t,bn)},Et=Ge=>{E||tt!=="intent"||Lt()},At=Ge=>{if(E||!tt||!nt)return;const $t=Ge.currentTarget,bn=Rh.get($t);bn&&(clearTimeout(bn),Rh.delete($t))};return{...U,...he,...oe,href:re==null?void 0:re.href,ref:r,onClick:Tc([C,Ut]),onBlur:Tc([O,At]),onFocus:Tc([P,Pt]),onMouseEnter:Tc([M,Pt]),onMouseLeave:Tc([R,At]),onTouchStart:Tc([$,Et]),disabled:!!E,target:S,...be&&{style:be},...ye&&{className:ye},...E&&Boe,...fe&&qoe,...F&&xe&&zoe}}var LS={},$oe={className:"active"},Boe={role:"link","aria-disabled":!0},qoe={"data-status":"active","aria-current":"page"},zoe={"data-transitioning":"transitioning"},Rh=new WeakMap,Voe={rootMargin:"100px"},Tc=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Foe(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function Uoe(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var VM=j.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...a}=Loe(r,t),o=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;if(!n){const{disabled:l,...u}=a;return j.createElement("a",u,o)}return j.createElement(n,a,o)});function Hoe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Goe=class extends rG{constructor(e){super(e),this.useMatch=t=>Pu({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>dG({...t,from:this.id}),this.useSearch=t=>Mu({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Nm({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>fG({...t,from:this.id}),this.useLoaderData=t=>cG({...t,from:this.id}),this.useNavigate=()=>zi({from:this.fullPath}),this.Link=ie.forwardRef((t,n)=>b.jsx(VM,{ref:n,from:this.fullPath,...t}))}};function Qs(e){return new Goe(e)}var Woe=class extends boe{constructor(e){super(e),this.useMatch=t=>Pu({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>dG({...t,from:this.id}),this.useSearch=t=>Mu({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>Nm({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>fG({...t,from:this.id}),this.useLoaderData=t=>cG({...t,from:this.id}),this.useNavigate=()=>zi({from:this.fullPath}),this.Link=ie.forwardRef((t,n)=>b.jsx(VM,{ref:n,from:this.fullPath,...t}))}};function Koe(e){return new Woe(e)}function Yoe(e){const t=Hr(),n=`not-found-${_r(t.stores.location,r=>r.pathname)}-${_r(t.stores.status,r=>r)}`;return b.jsx(qM,{getResetKey:()=>n,onCatch:(r,i)=>{var a;if(Xn(r))(a=e.onCatch)==null||a.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(Xn(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function Xoe(){return b.jsx("p",{children:"Not Found"})}function Lc(e){return b.jsx(b.Fragment,{children:e.children})}function hG(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(Xoe,{})}function Zoe(e){return null}function Qoe(){return Zoe(Hr()),null}var pG=j.memo(function({matchId:t}){const n=Hr(),r=n.stores.matchStores.get(t);r||io();const i=_r(n.stores.loadedAt,o=>o),a=_r(r,o=>o);return b.jsx(Joe,{router:n,matchId:t,resetKey:i,matchState:j.useMemo(()=>{var u;const o=a.routeId,l=(u=n.routesById[o].parentRoute)==null?void 0:u.id;return{routeId:o,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:l}},[a._displayPending,a.routeId,a.ssr,n.routesById])})});function Joe({router:e,matchId:t,resetKey:n,matchState:r}){var x,w;const i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?b.jsx(a,{}):null,l=i.options.errorComponent??e.options.defaultErrorComponent,u=i.options.onCatch??e.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((x=e.options.notFoundRoute)==null?void 0:x.options.component):i.options.notFoundComponent,d=r.ssr===!1||r.ssr==="data-only",h=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??a??(((w=i.options.errorComponent)==null?void 0:w.preload)||d))?j.Suspense:Lc,m=l?qM:Lc,g=f?Yoe:Lc;return b.jsxs(i.isRoot?i.options.shellComponent??Lc:Lc,{children:[b.jsx(N0.Provider,{value:t,children:b.jsx(h,{fallback:o,children:b.jsx(m,{getResetKey:()=>n,errorComponent:l||zM,onCatch:(y,S)=>{if(Xn(y))throw y.routeId??(y.routeId=r.routeId),y;u==null||u(y,S)},children:b.jsx(g,{fallback:y=>{if(y.routeId??(y.routeId=r.routeId),!f||y.routeId&&y.routeId!==r.routeId||!y.routeId&&!i.isRoot)throw y;return j.createElement(f,y)},children:d||r._displayPending?b.jsx(woe,{fallback:o,children:b.jsx(a3,{matchId:t})}):b.jsx(a3,{matchId:t})})})})}),r.parentRouteId===au?b.jsxs(b.Fragment,{children:[b.jsx(ese,{resetKey:n}),e.options.scrollRestoration&&F9?b.jsx(Qoe,{}):null]}):null]})}function ese({resetKey:e}){const t=Hr(),n=j.useRef(void 0);return Zh(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Xc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var a3=j.memo(function({matchId:t}){const n=Hr(),r=(d,h)=>{var m;return((m=n.getMatch(d.id))==null?void 0:m._nonReactive[h])??d._nonReactive[h]},i=n.stores.matchStores.get(t);i||io();const a=_r(i,d=>d),o=a.routeId,l=n.routesById[o],u=j.useMemo(()=>{var h;const d=(h=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:h({routeId:o,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return d?JSON.stringify(d):void 0},[o,a.loaderDeps,a._strictParams,a._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=j.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?b.jsx(d,{},u):b.jsx(mG,{})},[u,l.options.component,n.options.defaultComponent]);if(a._displayPending)throw r(a,"displayPendingPromise");if(a._forcePending)throw r(a,"minPendingPromise");if(a.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(a.id);if(h&&!h._nonReactive.minPendingPromise){const m=bf();h._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw r(a,"loadPromise")}if(a.status==="notFound")return Xn(a.error)||io(),hG(n,l,a.error);if(a.status==="redirected")throw br(a.error)||io(),r(a,"loadPromise");if(a.status==="error")throw a.error;return f}),mG=j.memo(function(){const t=Hr(),n=j.useContext(N0);let r,i=!1,a;{const f=n?t.stores.matchStores.get(n):void 0;[r,i]=_r(f,d=>[d==null?void 0:d.routeId,(d==null?void 0:d.globalNotFound)??!1]),a=_r(t.stores.matchesId,d=>d[d.findIndex(h=>h===n)+1])}const o=r?t.routesById[r]:void 0,l=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||io(),hG(t,o,void 0);if(!a)return null;const u=b.jsx(pG,{matchId:a});return r===au?b.jsx(j.Suspense,{fallback:l,children:u}):u});function tse(){const e=Hr(),t=j.useRef({router:e,mounted:!1}),[n,r]=j.useState(!1),i=_r(e.stores.isLoading,h=>h),a=_r(e.stores.hasPending,h=>h),o=CS(i),l=i||n||a,u=CS(l),f=i||a,d=CS(f);return e.startTransition=h=>{r(!0),j.startTransition(()=>{h(),r(!1)})},j.useEffect(()=>{const h=e.history.subscribe(e.load),m=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ja(e.latestLocation.publicHref)!==Ja(m.publicHref)&&e.commitLocation({...m,replace:!0}),()=>{h()}},[e,e.history]),Zh(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(m){console.error(m)}})()},[e]),Zh(()=>{o&&!i&&e.emit({type:"onLoad",...Xc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Zh(()=>{d&&!f&&e.emit({type:"onBeforeRouteMount",...Xc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,d,e]),Zh(()=>{if(u&&!l){const h=Xc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...h}),sG(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())})}},[l,u,e]),null}function nse(){const e=Hr(),t=e.routesById[au].options.pendingComponent??e.options.defaultPendingComponent,n=t?b.jsx(t,{}):null,r=b.jsxs(typeof document<"u"&&e.ssr?Lc:j.Suspense,{fallback:n,children:[b.jsx(tse,{}),b.jsx(rse,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:r}):r}function rse(){const e=Hr(),t=_r(e.stores.firstId,i=>i),n=_r(e.stores.loadedAt,i=>i),r=t?b.jsx(pG,{matchId:t}):null;return b.jsx(N0.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:b.jsx(qM,{getResetKey:()=>n,errorComponent:zM,onCatch:void 0,children:r})})}var ise=e=>({createMutableStore:e3,createReadonlyStore:e3,batch:sG}),ase=e=>new ose(e),ose=class extends ioe{constructor(e){super(e,ise)}};function sse({router:e,children:t,...n}){H9(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=b.jsx(aG.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:r}):r}function lse({router:e,...t}){return b.jsx(sse,{router:e,...t,children:b.jsx(nse,{})})}function use(e){const t=Hr(),n=j.useRef(void 0);return _r(t.stores.location,r=>{const i=r;if(t.options.defaultStructuralSharing){const a=Cs(n.current,i);return n.current=a,a}return i})}function ke(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function o3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Vs(...e){return t=>{let n=!1;const r=e.map(i=>{const a=o3(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():o3(e[i],null)}}}}function ft(...e){return j.useCallback(Vs(...e),e)}function cse(e,t){const n=j.createContext(t),r=a=>{const{children:o,...l}=a,u=j.useMemo(()=>l,Object.values(l));return b.jsx(n.Provider,{value:u,children:o})};r.displayName=e+"Provider";function i(a){const o=j.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function va(e,t=[]){let n=[];function r(a,o){const l=j.createContext(o),u=n.length;n=[...n,o];const f=h=>{var S;const{scope:m,children:g,...x}=h,w=((S=m==null?void 0:m[e])==null?void 0:S[u])||l,y=j.useMemo(()=>x,Object.values(x));return b.jsx(w.Provider,{value:y,children:g})};f.displayName=a+"Provider";function d(h,m){var w;const g=((w=m==null?void 0:m[e])==null?void 0:w[u])||l,x=j.useContext(g);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[f,d]}const i=()=>{const a=n.map(o=>j.createContext(o));return function(l){const u=(l==null?void 0:l[e])||a;return j.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return i.scopeName=e,[r,fse(i,...t)]}function fse(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((l,{useScope:u,scopeName:f})=>{const h=u(a)[`__scope${f}`];return{...l,...h}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Ep(e){const t=dse(e),n=j.forwardRef((r,i)=>{const{children:a,...o}=r,l=j.Children.toArray(a),u=l.find(pse);if(u){const f=u.props.children,d=l.map(h=>h===u?j.Children.count(f)>1?j.Children.only(null):j.isValidElement(f)?f.props.children:null:h);return b.jsx(t,{...o,ref:i,children:j.isValidElement(f)?j.cloneElement(f,void 0,d):null})}return b.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function dse(e){const t=j.forwardRef((n,r)=>{const{children:i,...a}=n;if(j.isValidElement(i)){const o=gse(i),l=mse(a,i.props);return i.type!==j.Fragment&&(l.ref=r?Vs(r,o):o),j.cloneElement(i,l)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gG=Symbol("radix.slottable");function hse(e){const t=({children:n})=>b.jsx(b.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=gG,t}function pse(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gG}function mse(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...l)=>{const u=a(...l);return i(...l),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function gse(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vse=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=vse.reduce((e,t)=>{const n=Ep(`Primitive.${t}`),r=j.forwardRef((i,a)=>{const{asChild:o,...l}=i,u=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(u,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function yse(e,t){e&&Ru.flushSync(()=>e.dispatchEvent(t))}function nr(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function bse(e,t=globalThis==null?void 0:globalThis.document){const n=nr(e);j.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var xse="DismissableLayer",aN="dismissableLayer.update",wse="dismissableLayer.pointerDownOutside",Sse="dismissableLayer.focusOutside",s3,vG=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pm=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...u}=e,f=j.useContext(vG),[d,h]=j.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=j.useState({}),x=ft(t,P=>h(P)),w=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=w.indexOf(y),E=d?w.indexOf(d):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,A=E>=S,C=Ase(P=>{const M=P.target,R=[...f.branches].some($=>$.contains(M));!A||R||(i==null||i(P),o==null||o(P),P.defaultPrevented||l==null||l())},m),O=Cse(P=>{const M=P.target;[...f.branches].some($=>$.contains(M))||(a==null||a(P),o==null||o(P),P.defaultPrevented||l==null||l())},m);return bse(P=>{E===f.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},m),j.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(s3=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),l3(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=s3)}},[d,m,n,f]),j.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),l3())},[d,f]),j.useEffect(()=>{const P=()=>g({});return document.addEventListener(aN,P),()=>document.removeEventListener(aN,P)},[]),b.jsx(He.div,{...u,ref:x,style:{pointerEvents:_?A?"auto":"none":void 0,...e.style},onFocusCapture:ke(e.onFocusCapture,O.onFocusCapture),onBlurCapture:ke(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:ke(e.onPointerDownCapture,C.onPointerDownCapture)})});Pm.displayName=xse;var _se="DismissableLayerBranch",Ese=j.forwardRef((e,t)=>{const n=j.useContext(vG),r=j.useRef(null),i=ft(t,r);return j.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),b.jsx(He.div,{...e,ref:i})});Ese.displayName=_se;function Ase(e,t=globalThis==null?void 0:globalThis.document){const n=nr(e),r=j.useRef(!1),i=j.useRef(()=>{});return j.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let u=function(){yG(wse,n,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Cse(e,t=globalThis==null?void 0:globalThis.document){const n=nr(e),r=j.useRef(!1);return j.useEffect(()=>{const i=a=>{a.target&&!r.current&&yG(Sse,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function l3(){const e=new CustomEvent(aN);document.dispatchEvent(e)}function yG(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?yse(i,a):i.dispatchEvent(a)}var zn=globalThis!=null&&globalThis.document?j.useLayoutEffect:()=>{},Tse=PM[" useId ".trim().toString()]||(()=>{}),Ose=0;function or(e){const[t,n]=j.useState(Tse());return zn(()=>{n(r=>r??String(Ose++))},[e]),t?`radix-${t}`:""}const jse=["top","right","bottom","left"],Fs=Math.min,Lr=Math.max,Uy=Math.round,Iv=Math.floor,la=e=>({x:e,y:e}),Nse={left:"right",right:"left",bottom:"top",top:"bottom"};function oN(e,t,n){return Lr(e,Fs(t,n))}function co(e,t){return typeof e=="function"?e(t):e}function fo(e){return e.split("-")[0]}function fd(e){return e.split("-")[1]}function FM(e){return e==="x"?"y":"x"}function UM(e){return e==="y"?"height":"width"}function aa(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function HM(e){return FM(aa(e))}function Pse(e,t,n){n===void 0&&(n=!1);const r=fd(e),i=HM(e),a=UM(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Hy(o)),[o,Hy(o)]}function Mse(e){const t=Hy(e);return[sN(e),t,sN(t)]}function sN(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const u3=["left","right"],c3=["right","left"],Rse=["top","bottom"],kse=["bottom","top"];function Dse(e,t,n){switch(e){case"top":case"bottom":return n?t?c3:u3:t?u3:c3;case"left":case"right":return t?Rse:kse;default:return[]}}function Ise(e,t,n,r){const i=fd(e);let a=Dse(fo(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(sN)))),a}function Hy(e){const t=fo(e);return Nse[t]+e.slice(t.length)}function Lse(e){return{top:0,right:0,bottom:0,left:0,...e}}function bG(e){return typeof e!="number"?Lse(e):{top:e,right:e,bottom:e,left:e}}function Gy(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function f3(e,t,n){let{reference:r,floating:i}=e;const a=aa(t),o=HM(t),l=UM(o),u=fo(t),f=a==="y",d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(u){case"top":g={x:d,y:r.y-i.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-i.width,y:h};break;default:g={x:r.x,y:r.y}}switch(fd(t)){case"start":g[o]-=m*(n&&f?-1:1);break;case"end":g[o]+=m*(n&&f?-1:1);break}return g}async function $se(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:l,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=co(t,e),x=bG(g),y=l[m?h==="floating"?"reference":"floating":h],S=Gy(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:d,strategy:u})),E=h==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),A=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},C=Gy(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:_,strategy:u}):E);return{top:(S.top-C.top+x.top)/A.y,bottom:(C.bottom-S.bottom+x.bottom)/A.y,left:(S.left-C.left+x.left)/A.x,right:(C.right-S.right+x.right)/A.x}}const Bse=50,qse=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,l=o.detectOverflow?o:{...o,detectOverflow:$se},u=await(o.isRTL==null?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=f3(f,r,u),m=r,g=0;const x={};for(let w=0;w<a.length;w++){const y=a[w];if(!y)continue;const{name:S,fn:E}=y,{x:_,y:A,data:C,reset:O}=await E({x:d,y:h,initialPlacement:r,placement:m,strategy:i,middlewareData:x,rects:f,platform:l,elements:{reference:e,floating:t}});d=_??d,h=A??h,x[S]={...x[S],...C},O&&g<Bse&&(g++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(f=O.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:h}=f3(f,m,u)),w=-1)}return{x:d,y:h,placement:m,strategy:i,middlewareData:x}},zse=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:l,middlewareData:u}=t,{element:f,padding:d=0}=co(e,t)||{};if(f==null)return{};const h=bG(d),m={x:n,y:r},g=HM(i),x=UM(g),w=await o.getDimensions(f),y=g==="y",S=y?"top":"left",E=y?"bottom":"right",_=y?"clientHeight":"clientWidth",A=a.reference[x]+a.reference[g]-m[g]-a.floating[x],C=m[g]-a.reference[g],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let P=O?O[_]:0;(!P||!await(o.isElement==null?void 0:o.isElement(O)))&&(P=l.floating[_]||a.floating[x]);const M=A/2-C/2,R=P/2-w[x]/2-1,$=Fs(h[S],R),I=Fs(h[E],R),k=$,V=P-w[x]-I,D=P/2-w[x]/2+M,q=oN(k,D,V),L=!u.arrow&&fd(i)!=null&&D!==q&&a.reference[x]/2-(D<k?$:I)-w[x]/2<0,z=L?D<k?D-k:D-V:0;return{[g]:m[g]+z,data:{[g]:q,centerOffset:D-q-z,...L&&{alignmentOffset:z}},reset:L}}}),Vse=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:l,platform:u,elements:f}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,...y}=co(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=fo(i),E=aa(l),_=fo(l)===l,A=await(u.isRTL==null?void 0:u.isRTL(f.floating)),C=m||(_||!w?[Hy(l)]:Mse(l)),O=x!=="none";!m&&O&&C.push(...Ise(l,w,x,A));const P=[l,...C],M=await u.detectOverflow(t,y),R=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&R.push(M[S]),h){const D=Pse(i,o,A);R.push(M[D[0]],M[D[1]])}if($=[...$,{placement:i,overflows:R}],!R.every(D=>D<=0)){var I,k;const D=(((I=a.flip)==null?void 0:I.index)||0)+1,q=P[D];if(q&&(!(h==="alignment"?E!==aa(q):!1)||$.every(H=>aa(H.placement)===E?H.overflows[0]>0:!0)))return{data:{index:D,overflows:$},reset:{placement:q}};let L=(k=$.filter(z=>z.overflows[0]<=0).sort((z,H)=>z.overflows[1]-H.overflows[1])[0])==null?void 0:k.placement;if(!L)switch(g){case"bestFit":{var V;const z=(V=$.filter(H=>{if(O){const Y=aa(H.placement);return Y===E||Y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Y=>Y>0).reduce((Y,Z)=>Y+Z,0)]).sort((H,Y)=>H[1]-Y[1])[0])==null?void 0:V[0];z&&(L=z);break}case"initialPlacement":L=l;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function d3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function h3(e){return jse.some(t=>e[t]>=0)}const Fse=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=co(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...a,elementContext:"reference"}),l=d3(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:h3(l)}}}case"escaped":{const o=await r.detectOverflow(t,{...a,altBoundary:!0}),l=d3(o,n.floating);return{data:{escapedOffsets:l,escaped:h3(l)}}}default:return{}}}}},xG=new Set(["left","top"]);async function Use(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=fo(n),l=fd(n),u=aa(n)==="y",f=xG.has(o)?-1:1,d=a&&u?-1:1,h=co(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:x}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof x=="number"&&(g=l==="end"?x*-1:x),u?{x:g*d,y:m*f}:{x:m*f,y:g*d}}const Hse=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:l}=t,u=await Use(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},Gse=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:S=>{let{x:E,y:_}=S;return{x:E,y:_}}},...f}=co(e,t),d={x:n,y:r},h=await a.detectOverflow(t,f),m=aa(fo(i)),g=FM(m);let x=d[g],w=d[m];if(o){const S=g==="y"?"top":"left",E=g==="y"?"bottom":"right",_=x+h[S],A=x-h[E];x=oN(_,x,A)}if(l){const S=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=w+h[S],A=w-h[E];w=oN(_,w,A)}const y=u.fn({...t,[g]:x,[m]:w});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[g]:o,[m]:l}}}}}},Wse=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=co(e,t),d={x:n,y:r},h=aa(i),m=FM(h);let g=d[m],x=d[h];const w=co(l,t),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){const _=m==="y"?"height":"width",A=a.reference[m]-a.floating[_]+y.mainAxis,C=a.reference[m]+a.reference[_]-y.mainAxis;g<A?g=A:g>C&&(g=C)}if(f){var S,E;const _=m==="y"?"width":"height",A=xG.has(fo(i)),C=a.reference[h]-a.floating[_]+(A&&((S=o.offset)==null?void 0:S[h])||0)+(A?0:y.crossAxis),O=a.reference[h]+a.reference[_]+(A?0:((E=o.offset)==null?void 0:E[h])||0)-(A?y.crossAxis:0);x<C?x=C:x>O&&(x=O)}return{[m]:g,[h]:x}}}},Kse=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:l}=t,{apply:u=()=>{},...f}=co(e,t),d=await o.detectOverflow(t,f),h=fo(i),m=fd(i),g=aa(i)==="y",{width:x,height:w}=a.floating;let y,S;h==="top"||h==="bottom"?(y=h,S=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(S=h,y=m==="end"?"top":"bottom");const E=w-d.top-d.bottom,_=x-d.left-d.right,A=Fs(w-d[y],E),C=Fs(x-d[S],_),O=!t.middlewareData.shift;let P=A,M=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=E),O&&!m){const $=Lr(d.left,0),I=Lr(d.right,0),k=Lr(d.top,0),V=Lr(d.bottom,0);g?M=x-2*($!==0||I!==0?$+I:Lr(d.left,d.right)):P=w-2*(k!==0||V!==0?k+V:Lr(d.top,d.bottom))}await u({...t,availableWidth:M,availableHeight:P});const R=await o.getDimensions(l.floating);return x!==R.width||w!==R.height?{reset:{rects:!0}}:{}}}};function P0(){return typeof window<"u"}function dd(e){return wG(e)?(e.nodeName||"").toLowerCase():"#document"}function qr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ya(e){var t;return(t=(wG(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wG(e){return P0()?e instanceof Node||e instanceof qr(e).Node:!1}function $i(e){return P0()?e instanceof Element||e instanceof qr(e).Element:!1}function xo(e){return P0()?e instanceof HTMLElement||e instanceof qr(e).HTMLElement:!1}function p3(e){return!P0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qr(e).ShadowRoot}function Mm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Bi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function Yse(e){return/^(table|td|th)$/.test(dd(e))}function M0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Xse=/transform|translate|scale|rotate|perspective|filter/,Zse=/paint|layout|strict|content/,Nl=e=>!!e&&e!=="none";let $S;function GM(e){const t=$i(e)?Bi(e):e;return Nl(t.transform)||Nl(t.translate)||Nl(t.scale)||Nl(t.rotate)||Nl(t.perspective)||!WM()&&(Nl(t.backdropFilter)||Nl(t.filter))||Xse.test(t.willChange||"")||Zse.test(t.contain||"")}function Qse(e){let t=Us(e);for(;xo(t)&&!xf(t);){if(GM(t))return t;if(M0(t))return null;t=Us(t)}return null}function WM(){return $S==null&&($S=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),$S}function xf(e){return/^(html|body|#document)$/.test(dd(e))}function Bi(e){return qr(e).getComputedStyle(e)}function R0(e){return $i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Us(e){if(dd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||p3(e)&&e.host||ya(e);return p3(t)?t.host:t}function SG(e){const t=Us(e);return xf(t)?e.ownerDocument?e.ownerDocument.body:e.body:xo(t)&&Mm(t)?t:SG(t)}function Ap(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=SG(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=qr(i);if(a){const l=lN(o);return t.concat(o,o.visualViewport||[],Mm(i)?i:[],l&&n?Ap(l):[])}else return t.concat(i,Ap(i,[],n))}function lN(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _G(e){const t=Bi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=xo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,l=Uy(n)!==a||Uy(r)!==o;return l&&(n=a,r=o),{width:n,height:r,$:l}}function KM(e){return $i(e)?e:e.contextElement}function Qc(e){const t=KM(e);if(!xo(t))return la(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_G(t);let o=(a?Uy(n.width):n.width)/r,l=(a?Uy(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Jse=la(0);function EG(e){const t=qr(e);return!WM()||!t.visualViewport?Jse:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ele(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qr(e)?!1:t}function hu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=KM(e);let o=la(1);t&&(r?$i(r)&&(o=Qc(r)):o=Qc(e));const l=ele(a,n,r)?EG(a):la(0);let u=(i.left+l.x)/o.x,f=(i.top+l.y)/o.y,d=i.width/o.x,h=i.height/o.y;if(a){const m=qr(a),g=r&&$i(r)?qr(r):r;let x=m,w=lN(x);for(;w&&r&&g!==x;){const y=Qc(w),S=w.getBoundingClientRect(),E=Bi(w),_=S.left+(w.clientLeft+parseFloat(E.paddingLeft))*y.x,A=S.top+(w.clientTop+parseFloat(E.paddingTop))*y.y;u*=y.x,f*=y.y,d*=y.x,h*=y.y,u+=_,f+=A,x=qr(w),w=lN(x)}}return Gy({width:d,height:h,x:u,y:f})}function k0(e,t){const n=R0(e).scrollLeft;return t?t.left+n:hu(ya(e)).left+n}function AG(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-k0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function tle(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ya(r),l=t?M0(t.floating):!1;if(r===o||l&&a)return n;let u={scrollLeft:0,scrollTop:0},f=la(1);const d=la(0),h=xo(r);if((h||!h&&!a)&&((dd(r)!=="body"||Mm(o))&&(u=R0(r)),h)){const g=hu(r);f=Qc(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const m=o&&!h&&!a?AG(o,u):la(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+d.x+m.x,y:n.y*f.y-u.scrollTop*f.y+d.y+m.y}}function nle(e){return Array.from(e.getClientRects())}function rle(e){const t=ya(e),n=R0(e),r=e.ownerDocument.body,i=Lr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Lr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+k0(e);const l=-n.scrollTop;return Bi(r).direction==="rtl"&&(o+=Lr(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:l}}const m3=25;function ile(e,t){const n=qr(e),r=ya(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,l=0,u=0;if(i){a=i.width,o=i.height;const d=WM();(!d||d&&t==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}const f=k0(r);if(f<=0){const d=r.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(r.clientWidth-h.clientWidth-g);x<=m3&&(a-=x)}else f<=m3&&(a+=f);return{width:a,height:o,x:l,y:u}}function ale(e,t){const n=hu(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=xo(e)?Qc(e):la(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,u=i*a.x,f=r*a.y;return{width:o,height:l,x:u,y:f}}function g3(e,t,n){let r;if(t==="viewport")r=ile(e,n);else if(t==="document")r=rle(ya(e));else if($i(t))r=ale(t,n);else{const i=EG(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Gy(r)}function CG(e,t){const n=Us(e);return n===t||!$i(n)||xf(n)?!1:Bi(n).position==="fixed"||CG(n,t)}function ole(e,t){const n=t.get(e);if(n)return n;let r=Ap(e,[],!1).filter(l=>$i(l)&&dd(l)!=="body"),i=null;const a=Bi(e).position==="fixed";let o=a?Us(e):e;for(;$i(o)&&!xf(o);){const l=Bi(o),u=GM(o);!u&&l.position==="fixed"&&(i=null),(a?!u&&!i:!u&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Mm(o)&&!u&&CG(e,o))?r=r.filter(d=>d!==o):i=l,o=Us(o)}return t.set(e,r),r}function sle(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?M0(t)?[]:ole(t,this._c):[].concat(n),r],l=g3(t,o[0],i);let u=l.top,f=l.right,d=l.bottom,h=l.left;for(let m=1;m<o.length;m++){const g=g3(t,o[m],i);u=Lr(g.top,u),f=Fs(g.right,f),d=Fs(g.bottom,d),h=Lr(g.left,h)}return{width:f-h,height:d-u,x:h,y:u}}function lle(e){const{width:t,height:n}=_G(e);return{width:t,height:n}}function ule(e,t,n){const r=xo(t),i=ya(t),a=n==="fixed",o=hu(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=la(0);function f(){u.x=k0(i)}if(r||!r&&!a)if((dd(t)!=="body"||Mm(i))&&(l=R0(t)),r){const g=hu(t,!0,a,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else i&&f();a&&!r&&i&&f();const d=i&&!r&&!a?AG(i,l):la(0),h=o.left+l.scrollLeft-u.x-d.x,m=o.top+l.scrollTop-u.y-d.y;return{x:h,y:m,width:o.width,height:o.height}}function BS(e){return Bi(e).position==="static"}function v3(e,t){if(!xo(e)||Bi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ya(e)===n&&(n=n.ownerDocument.body),n}function TG(e,t){const n=qr(e);if(M0(e))return n;if(!xo(e)){let i=Us(e);for(;i&&!xf(i);){if($i(i)&&!BS(i))return i;i=Us(i)}return n}let r=v3(e,t);for(;r&&Yse(r)&&BS(r);)r=v3(r,t);return r&&xf(r)&&BS(r)&&!GM(r)?n:r||Qse(e)||n}const cle=async function(e){const t=this.getOffsetParent||TG,n=this.getDimensions,r=await n(e.floating);return{reference:ule(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fle(e){return Bi(e).direction==="rtl"}const dle={convertOffsetParentRelativeRectToViewportRelativeRect:tle,getDocumentElement:ya,getClippingRect:sle,getOffsetParent:TG,getElementRects:cle,getClientRects:nle,getDimensions:lle,getScale:Qc,isElement:$i,isRTL:fle};function OG(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hle(e,t){let n=null,r;const i=ya(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const f=e.getBoundingClientRect(),{left:d,top:h,width:m,height:g}=f;if(l||t(),!m||!g)return;const x=Iv(h),w=Iv(i.clientWidth-(d+m)),y=Iv(i.clientHeight-(h+g)),S=Iv(d),_={rootMargin:-x+"px "+-w+"px "+-y+"px "+-S+"px",threshold:Lr(0,Fs(1,u))||1};let A=!0;function C(O){const P=O[0].intersectionRatio;if(P!==u){if(!A)return o();P?o(!1,P):r=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!OG(f,e.getBoundingClientRect())&&o(),A=!1}try{n=new IntersectionObserver(C,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,_)}n.observe(e)}return o(!0),a}function ple(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=KM(e),d=i||a?[...f?Ap(f):[],...t?Ap(t):[]]:[];d.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const h=f&&l?hle(f,n):null;let m=-1,g=null;o&&(g=new ResizeObserver(S=>{let[E]=S;E&&E.target===f&&g&&t&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=g)==null||_.observe(t)})),n()}),f&&!u&&g.observe(f),t&&g.observe(t));let x,w=u?hu(e):null;u&&y();function y(){const S=hu(e);w&&!OG(w,S)&&n(),w=S,x=requestAnimationFrame(y)}return n(),()=>{var S;d.forEach(E=>{i&&E.removeEventListener("scroll",n),a&&E.removeEventListener("resize",n)}),h==null||h(),(S=g)==null||S.disconnect(),g=null,u&&cancelAnimationFrame(x)}}const mle=Hse,gle=Gse,vle=Vse,yle=Kse,ble=Fse,y3=zse,xle=Wse,wle=(e,t,n)=>{const r=new Map,i={platform:dle,...n},a={...i.platform,_c:r};return qse(e,t,{...i,platform:a})};var Sle=typeof document<"u",_le=function(){},by=Sle?j.useLayoutEffect:_le;function Wy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Wy(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Wy(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function jG(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function b3(e,t){const n=jG(e);return Math.round(t*n)/n}function qS(e){const t=j.useRef(e);return by(()=>{t.current=e}),t}function Ele(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:u,open:f}=e,[d,h]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=j.useState(r);Wy(m,r)||g(r);const[x,w]=j.useState(null),[y,S]=j.useState(null),E=j.useCallback(H=>{H!==O.current&&(O.current=H,w(H))},[]),_=j.useCallback(H=>{H!==P.current&&(P.current=H,S(H))},[]),A=a||x,C=o||y,O=j.useRef(null),P=j.useRef(null),M=j.useRef(d),R=u!=null,$=qS(u),I=qS(i),k=qS(f),V=j.useCallback(()=>{if(!O.current||!P.current)return;const H={placement:t,strategy:n,middleware:m};I.current&&(H.platform=I.current),wle(O.current,P.current,H).then(Y=>{const Z={...Y,isPositioned:k.current!==!1};D.current&&!Wy(M.current,Z)&&(M.current=Z,Ru.flushSync(()=>{h(Z)}))})},[m,t,n,I,k]);by(()=>{f===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,h(H=>({...H,isPositioned:!1})))},[f]);const D=j.useRef(!1);by(()=>(D.current=!0,()=>{D.current=!1}),[]),by(()=>{if(A&&(O.current=A),C&&(P.current=C),A&&C){if($.current)return $.current(A,C,V);V()}},[A,C,V,$,R]);const q=j.useMemo(()=>({reference:O,floating:P,setReference:E,setFloating:_}),[E,_]),L=j.useMemo(()=>({reference:A,floating:C}),[A,C]),z=j.useMemo(()=>{const H={position:n,left:0,top:0};if(!L.floating)return H;const Y=b3(L.floating,d.x),Z=b3(L.floating,d.y);return l?{...H,transform:"translate("+Y+"px, "+Z+"px)",...jG(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:Z}},[n,l,L.floating,d.x,d.y]);return j.useMemo(()=>({...d,update:V,refs:q,elements:L,floatingStyles:z}),[d,V,q,L,z])}const Ale=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?y3({element:r.current,padding:i}).fn(n):{}:r?y3({element:r,padding:i}).fn(n):{}}}},Cle=(e,t)=>{const n=mle(e);return{name:n.name,fn:n.fn,options:[e,t]}},Tle=(e,t)=>{const n=gle(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ole=(e,t)=>({fn:xle(e).fn,options:[e,t]}),jle=(e,t)=>{const n=vle(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nle=(e,t)=>{const n=yle(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ple=(e,t)=>{const n=ble(e);return{name:n.name,fn:n.fn,options:[e,t]}},Mle=(e,t)=>{const n=Ale(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Rle="Arrow",NG=j.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return b.jsx(He.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});NG.displayName=Rle;var kle=NG;function PG(e){const[t,n]=j.useState(void 0);return zn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,l;if("borderBoxSize"in a){const u=a.borderBoxSize,f=Array.isArray(u)?u[0]:u;o=f.inlineSize,l=f.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var YM="Popper",[MG,hd]=va(YM),[Dle,RG]=MG(YM),kG=e=>{const{__scopePopper:t,children:n}=e,[r,i]=j.useState(null);return b.jsx(Dle,{scope:t,anchor:r,onAnchorChange:i,children:n})};kG.displayName=YM;var DG="PopperAnchor",IG=j.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=RG(DG,n),o=j.useRef(null),l=ft(t,o),u=j.useRef(null);return j.useEffect(()=>{const f=u.current;u.current=(r==null?void 0:r.current)||o.current,f!==u.current&&a.onAnchorChange(u.current)}),r?null:b.jsx(He.div,{...i,ref:l})});IG.displayName=DG;var XM="PopperContent",[Ile,Lle]=MG(XM),LG=j.forwardRef((e,t)=>{var J,re,ne,fe,he,oe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:x,...w}=e,y=RG(XM,n),[S,E]=j.useState(null),_=ft(t,ye=>E(ye)),[A,C]=j.useState(null),O=PG(A),P=(O==null?void 0:O.width)??0,M=(O==null?void 0:O.height)??0,R=r+(a!=="center"?"-"+a:""),$=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},I=Array.isArray(f)?f:[f],k=I.length>0,V={padding:$,boundary:I.filter(Ble),altBoundary:k},{refs:D,floatingStyles:q,placement:L,isPositioned:z,middlewareData:H}=Ele({strategy:"fixed",placement:R,whileElementsMounted:(...ye)=>ple(...ye,{animationFrame:g==="always"}),elements:{reference:y.anchor},middleware:[Cle({mainAxis:i+M,alignmentAxis:o}),u&&Tle({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Ole():void 0,...V}),u&&jle({...V}),Nle({...V,apply:({elements:ye,rects:be,availableWidth:xe,availableHeight:Ae})=>{const{width:_e,height:tt}=be.reference,nt=ye.floating.style;nt.setProperty("--radix-popper-available-width",`${xe}px`),nt.setProperty("--radix-popper-available-height",`${Ae}px`),nt.setProperty("--radix-popper-anchor-width",`${_e}px`),nt.setProperty("--radix-popper-anchor-height",`${tt}px`)}}),A&&Mle({element:A,padding:l}),qle({arrowWidth:P,arrowHeight:M}),m&&Ple({strategy:"referenceHidden",...V})]}),[Y,Z]=qG(L),U=nr(x);zn(()=>{z&&(U==null||U())},[z,U]);const F=(J=H.arrow)==null?void 0:J.x,X=(re=H.arrow)==null?void 0:re.y,K=((ne=H.arrow)==null?void 0:ne.centerOffset)!==0,[G,Q]=j.useState();return zn(()=>{S&&Q(window.getComputedStyle(S).zIndex)},[S]),b.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:z?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(fe=H.transformOrigin)==null?void 0:fe.x,(he=H.transformOrigin)==null?void 0:he.y].join(" "),...((oe=H.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(Ile,{scope:n,placedSide:Y,onArrowChange:C,arrowX:F,arrowY:X,shouldHideArrow:K,children:b.jsx(He.div,{"data-side":Y,"data-align":Z,...w,ref:_,style:{...w.style,animation:z?void 0:"none"}})})})});LG.displayName=XM;var $G="PopperArrow",$le={top:"bottom",right:"left",bottom:"top",left:"right"},BG=j.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=Lle($G,r),o=$le[a.placedSide];return b.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:b.jsx(kle,{...i,ref:n,style:{...i.style,display:"block"}})})});BG.displayName=$G;function Ble(e){return e!==null}var qle=e=>({name:"transformOrigin",options:e,fn(t){var y,S,E;const{placement:n,rects:r,middlewareData:i}=t,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,l=o?0:e.arrowWidth,u=o?0:e.arrowHeight,[f,d]=qG(n),h={start:"0%",center:"50%",end:"100%"}[d],m=(((S=i.arrow)==null?void 0:S.x)??0)+l/2,g=(((E=i.arrow)==null?void 0:E.y)??0)+u/2;let x="",w="";return f==="bottom"?(x=o?h:`${m}px`,w=`${-u}px`):f==="top"?(x=o?h:`${m}px`,w=`${r.floating.height+u}px`):f==="right"?(x=`${-u}px`,w=o?h:`${g}px`):f==="left"&&(x=`${r.floating.width+u}px`,w=o?h:`${g}px`),{data:{x,y:w}}}});function qG(e){const[t,n="center"]=e.split("-");return[t,n]}var ZM=kG,QM=IG,JM=LG,eR=BG,zle="Portal",Rm=j.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,a]=j.useState(!1);zn(()=>a(!0),[]);const o=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Ioe.createPortal(b.jsx(He.div,{...r,ref:t}),o):null});Rm.displayName=zle;function Vle(e,t){return j.useReducer((n,r)=>t[n][r]??n,e)}var Er=e=>{const{present:t,children:n}=e,r=Fle(t),i=typeof n=="function"?n({present:r.isPresent}):j.Children.only(n),a=ft(r.ref,Ule(i));return typeof n=="function"||r.isPresent?j.cloneElement(i,{ref:a}):null};Er.displayName="Presence";function Fle(e){const[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef("none"),o=e?"mounted":"unmounted",[l,u]=Vle(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const f=Lv(r.current);a.current=l==="mounted"?f:"none"},[l]),zn(()=>{const f=r.current,d=i.current;if(d!==e){const m=a.current,g=Lv(f);e?u("MOUNT"):g==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),zn(()=>{if(t){let f;const d=t.ownerDocument.defaultView??window,h=g=>{const w=Lv(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&w&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",f=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=g=>{g.target===t&&(a.current=Lv(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:j.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Lv(e){return(e==null?void 0:e.animationName)||"none"}function Ule(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Hle=PM[" useInsertionEffect ".trim().toString()]||zn;function Hs({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=Gle({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:i;{const d=j.useRef(e!==void 0);j.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const f=j.useCallback(d=>{var h;if(l){const m=Wle(d)?d(e):d;m!==e&&((h=o.current)==null||h.call(o,m))}else a(d)},[l,e,a,o]);return[u,f]}function Gle({defaultProp:e,onChange:t}){const[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return Hle(()=>{a.current=t},[t]),j.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function Wle(e){return typeof e=="function"}var zG=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"}),Kle="VisuallyHidden",VG=j.forwardRef((e,t)=>b.jsx(He.span,{...e,ref:t,style:{...zG,...e.style}}));VG.displayName=Kle;var Yle=VG,[D0]=va("Tooltip",[hd]),I0=hd(),FG="TooltipProvider",Xle=700,uN="tooltip.open",[Zle,tR]=D0(FG),UG=e=>{const{__scopeTooltip:t,delayDuration:n=Xle,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=j.useRef(!0),l=j.useRef(!1),u=j.useRef(0);return j.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),b.jsx(Zle,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:j.useCallback(()=>{window.clearTimeout(u.current),o.current=!1},[]),onClose:j.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:j.useCallback(f=>{l.current=f},[]),disableHoverableContent:i,children:a})};UG.displayName=FG;var Cp="Tooltip",[Qle,km]=D0(Cp),HG=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:l}=e,u=tR(Cp,e.__scopeTooltip),f=I0(t),[d,h]=j.useState(null),m=or(),g=j.useRef(0),x=o??u.disableHoverableContent,w=l??u.delayDuration,y=j.useRef(!1),[S,E]=Hs({prop:r,defaultProp:i??!1,onChange:P=>{P?(u.onOpen(),document.dispatchEvent(new CustomEvent(uN))):u.onClose(),a==null||a(P)},caller:Cp}),_=j.useMemo(()=>S?y.current?"delayed-open":"instant-open":"closed",[S]),A=j.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,E(!0)},[E]),C=j.useCallback(()=>{window.clearTimeout(g.current),g.current=0,E(!1)},[E]),O=j.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,E(!0),g.current=0},w)},[w,E]);return j.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),b.jsx(ZM,{...f,children:b.jsx(Qle,{scope:t,contentId:m,open:S,stateAttribute:_,trigger:d,onTriggerChange:h,onTriggerEnter:j.useCallback(()=>{u.isOpenDelayedRef.current?O():A()},[u.isOpenDelayedRef,O,A]),onTriggerLeave:j.useCallback(()=>{x?C():(window.clearTimeout(g.current),g.current=0)},[C,x]),onOpen:A,onClose:C,disableHoverableContent:x,children:n})})};HG.displayName=Cp;var cN="TooltipTrigger",GG=j.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=km(cN,n),a=tR(cN,n),o=I0(n),l=j.useRef(null),u=ft(t,l,i.onTriggerChange),f=j.useRef(!1),d=j.useRef(!1),h=j.useCallback(()=>f.current=!1,[]);return j.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),b.jsx(QM,{asChild:!0,...o,children:b.jsx(He.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:ke(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:ke(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:ke(e.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ke(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:ke(e.onBlur,i.onClose),onClick:ke(e.onClick,i.onClose)})})});GG.displayName=cN;var nR="TooltipPortal",[Jle,eue]=D0(nR,{forceMount:void 0}),WG=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=km(nR,t);return b.jsx(Jle,{scope:t,forceMount:n,children:b.jsx(Er,{present:n||a.open,children:b.jsx(Rm,{asChild:!0,container:i,children:r})})})};WG.displayName=nR;var wf="TooltipContent",KG=j.forwardRef((e,t)=>{const n=eue(wf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=km(wf,e.__scopeTooltip);return b.jsx(Er,{present:r||o.open,children:o.disableHoverableContent?b.jsx(YG,{side:i,...a,ref:t}):b.jsx(tue,{side:i,...a,ref:t})})}),tue=j.forwardRef((e,t)=>{const n=km(wf,e.__scopeTooltip),r=tR(wf,e.__scopeTooltip),i=j.useRef(null),a=ft(t,i),[o,l]=j.useState(null),{trigger:u,onClose:f}=n,d=i.current,{onPointerInTransitChange:h}=r,m=j.useCallback(()=>{l(null),h(!1)},[h]),g=j.useCallback((x,w)=>{const y=x.currentTarget,S={x:x.clientX,y:x.clientY},E=oue(S,y.getBoundingClientRect()),_=sue(S,E),A=lue(w.getBoundingClientRect()),C=cue([..._,...A]);l(C),h(!0)},[h]);return j.useEffect(()=>()=>m(),[m]),j.useEffect(()=>{if(u&&d){const x=y=>g(y,d),w=y=>g(y,u);return u.addEventListener("pointerleave",x),d.addEventListener("pointerleave",w),()=>{u.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",w)}}},[u,d,g,m]),j.useEffect(()=>{if(o){const x=w=>{const y=w.target,S={x:w.clientX,y:w.clientY},E=(u==null?void 0:u.contains(y))||(d==null?void 0:d.contains(y)),_=!uue(S,o);E?m():_&&(m(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[u,d,o,f,m]),b.jsx(YG,{...e,ref:a})}),[nue,rue]=D0(Cp,{isInside:!1}),iue=hse("TooltipContent"),YG=j.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,u=km(wf,n),f=I0(n),{onClose:d}=u;return j.useEffect(()=>(document.addEventListener(uN,d),()=>document.removeEventListener(uN,d)),[d]),j.useEffect(()=>{if(u.trigger){const h=m=>{const g=m.target;g!=null&&g.contains(u.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,d]),b.jsx(Pm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:b.jsxs(JM,{"data-state":u.stateAttribute,...f,...l,ref:t,style:{...l.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:[b.jsx(iue,{children:r}),b.jsx(nue,{scope:n,isInside:!0,children:b.jsx(Yle,{id:u.contentId,role:"tooltip",children:i||r})})]})})});KG.displayName=wf;var XG="TooltipArrow",aue=j.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=I0(n);return rue(XG,n).isInside?null:b.jsx(eR,{...i,...r,ref:t})});aue.displayName=XG;function oue(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function sue(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 lue(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function uue(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],u=t[o],f=l.x,d=l.y,h=u.x,m=u.y;d>r!=m>r&&n<(h-f)*(r-d)/(m-d)+f&&(i=!i)}return i}function cue(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),fue(t)}function fue(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}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 due=UG,hue=HG,pue=GG,mue=WG,ZG=KG;function QG(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=QG(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ut(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=QG(e))&&(r&&(r+=" "),r+=t);return r}const rR="-",gue=e=>{const t=yue(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(rR);return l[0]===""&&l.length!==1&&l.shift(),JG(l,t)||vue(o)},getConflictingClassGroupIds:(o,l)=>{const u=n[o]||[];return l&&r[o]?[...u,...r[o]]:u}}},JG=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?JG(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(rR);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},x3=/^\[(.+)\]$/,vue=e=>{if(x3.test(e)){const t=x3.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},yue=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return xue(Object.entries(e.classGroups),n).forEach(([a,o])=>{fN(o,r,a,t)}),r},fN=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:w3(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(bue(i)){fN(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{fN(o,w3(t,a),n,r)})})},w3=(e,t)=>{let n=e;return t.split(rR).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},bue=e=>e.isThemeGetter,xue=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[n,i]}):e,wue=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},e7="!",Sue=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=l=>{const u=[];let f=0,d=0,h;for(let y=0;y<l.length;y++){let S=l[y];if(f===0){if(S===i&&(r||l.slice(y,y+a)===t)){u.push(l.slice(d,y)),d=y+a;continue}if(S==="/"){h=y;continue}}S==="["?f++:S==="]"&&f--}const m=u.length===0?l:l.substring(d),g=m.startsWith(e7),x=g?m.substring(1):m,w=h&&h>d?h-d:void 0;return{modifiers:u,hasImportantModifier:g,baseClassName:x,maybePostfixModifierPosition:w}};return n?l=>n({className:l,parseClassName:o}):o},_ue=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},Eue=e=>({cache:wue(e.cacheSize),parseClassName:Sue(e),...gue(e)}),Aue=/\s+/,Cue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Aue);let l="";for(let u=o.length-1;u>=0;u-=1){const f=o[u],{modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:g}=n(f);let x=!!g,w=r(x?m.substring(0,g):m);if(!w){if(!x){l=f+(l.length>0?" "+l:l);continue}if(w=r(m),!w){l=f+(l.length>0?" "+l:l);continue}x=!1}const y=_ue(d).join(":"),S=h?y+e7:y,E=S+w;if(a.includes(E))continue;a.push(E);const _=i(w,x);for(let A=0;A<_.length;++A){const C=_[A];a.push(S+C)}l=f+(l.length>0?" "+l:l)}return l};function Tue(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=t7(t))&&(r&&(r+=" "),r+=n);return r}const t7=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=t7(e[r]))&&(n&&(n+=" "),n+=t);return n};function Oue(e,...t){let n,r,i,a=o;function o(u){const f=t.reduce((d,h)=>h(d),e());return n=Eue(f),r=n.cache.get,i=n.cache.set,a=l,l(u)}function l(u){const f=r(u);if(f)return f;const d=Cue(u,n);return i(u,d),d}return function(){return a(Tue.apply(null,arguments))}}const Vt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},n7=/^\[(?:([a-z-]+):)?(.+)\]$/i,jue=/^\d+\/\d+$/,Nue=new Set(["px","full","screen"]),Pue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mue=/\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$/,Rue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Due=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fa=e=>Jc(e)||Nue.has(e)||jue.test(e),ts=e=>pd(e,"length",Fue),Jc=e=>!!e&&!Number.isNaN(Number(e)),zS=e=>pd(e,"number",Jc),kh=e=>!!e&&Number.isInteger(Number(e)),Iue=e=>e.endsWith("%")&&Jc(e.slice(0,-1)),Ye=e=>n7.test(e),ns=e=>Pue.test(e),Lue=new Set(["length","size","percentage"]),$ue=e=>pd(e,Lue,r7),Bue=e=>pd(e,"position",r7),que=new Set(["image","url"]),zue=e=>pd(e,que,Hue),Vue=e=>pd(e,"",Uue),Dh=()=>!0,pd=(e,t,n)=>{const r=n7.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Fue=e=>Mue.test(e)&&!Rue.test(e),r7=()=>!1,Uue=e=>kue.test(e),Hue=e=>Due.test(e),Gue=()=>{const e=Vt("colors"),t=Vt("spacing"),n=Vt("blur"),r=Vt("brightness"),i=Vt("borderColor"),a=Vt("borderRadius"),o=Vt("borderSpacing"),l=Vt("borderWidth"),u=Vt("contrast"),f=Vt("grayscale"),d=Vt("hueRotate"),h=Vt("invert"),m=Vt("gap"),g=Vt("gradientColorStops"),x=Vt("gradientColorStopPositions"),w=Vt("inset"),y=Vt("margin"),S=Vt("opacity"),E=Vt("padding"),_=Vt("saturate"),A=Vt("scale"),C=Vt("sepia"),O=Vt("skew"),P=Vt("space"),M=Vt("translate"),R=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Ye,t],k=()=>[Ye,t],V=()=>["",Fa,ts],D=()=>["auto",Jc,Ye],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],Y=()=>["","0",Ye],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[Jc,Ye];return{cacheSize:500,separator:":",theme:{colors:[Dh],spacing:[Fa,ts],blur:["none","",ns,Ye],brightness:U(),borderColor:[e],borderRadius:["none","","full",ns,Ye],borderSpacing:k(),borderWidth:V(),contrast:U(),grayscale:Y(),hueRotate:U(),invert:Y(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Iue,ts],inset:I(),margin:I(),opacity:U(),padding:k(),saturate:U(),scale:U(),sepia:Y(),skew:U(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",Ye]}],container:["container"],columns:[{columns:[ns]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"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:[...q(),Ye]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",kh,Ye]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ye]}],grow:[{grow:Y()}],shrink:[{shrink:Y()}],order:[{order:["first","last","none",kh,Ye]}],"grid-cols":[{"grid-cols":[Dh]}],"col-start-end":[{col:["auto",{span:["full",kh,Ye]},Ye]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Dh]}],"row-start-end":[{row:["auto",{span:[kh,Ye]},Ye]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ye]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"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:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ye,t]}],"min-w":[{"min-w":[Ye,t,"min","max","fit"]}],"max-w":[{"max-w":[Ye,t,"none","full","min","max","fit","prose",{screen:[ns]},ns]}],h:[{h:[Ye,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ye,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ye,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ye,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ns,ts]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zS]}],"font-family":[{font:[Dh]}],"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",Ye]}],"line-clamp":[{"line-clamp":["none",Jc,zS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fa,Ye]}],"list-image":[{"list-image":["none",Ye]}],"list-style-type":[{list:["none","disc","decimal",Ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fa,ts]}],"underline-offset":[{"underline-offset":["auto",Fa,Ye]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye]}],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",Ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),Bue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$ue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:L()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Fa,Ye]}],"outline-w":[{outline:[Fa,ts]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Fa,ts]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ns,Vue]}],"shadow-color":[{shadow:[Dh]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",ns,Ye]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[_]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ye]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",Ye]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[kh,Ye]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ye]}],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",Ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Fa,ts,zS]}],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"]}}},Wue=Oue(Gue);function Te(...e){return Wue(ut(e))}function wr(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}m`:`${(e/36e5).toFixed(1)}h`}function Ky(e,t){return e.length<=t?e:`${e.slice(0,t)}...`}function i7(e){const n=Date.now()-e;return n<6e4?`${Math.floor(n/1e3)}s ago`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:`${Math.floor(n/864e5)}d ago`}function xy(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}const Kue=due,Tp=hue,Op=pue,Sf=j.forwardRef(({className:e,sideOffset:t=4,...n},r)=>b.jsx(mue,{children:b.jsx(ZG,{ref:r,sideOffset:t,className:Te("z-50 overflow-hidden border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md 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",e),...n})}));Sf.displayName=ZG.displayName;var mt;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),o={};for(const l of a)o[l]=i[l];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(mt||(mt={}));var S3;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(S3||(S3={}));const Pe=mt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ds=e=>{switch(typeof e){case"undefined":return Pe.undefined;case"string":return Pe.string;case"number":return Number.isNaN(e)?Pe.nan:Pe.number;case"boolean":return Pe.boolean;case"function":return Pe.function;case"bigint":return Pe.bigint;case"symbol":return Pe.symbol;case"object":return Array.isArray(e)?Pe.array:e===null?Pe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Pe.promise:typeof Map<"u"&&e instanceof Map?Pe.map:typeof Set<"u"&&e instanceof Set?Pe.set:typeof Date<"u"&&e instanceof Date?Pe.date:Pe.object;default:return Pe.unknown}},we=mt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ho extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let l=r,u=0;for(;u<o.path.length;){const f=o.path[u];u===o.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(n(o))):l[f]=l[f]||{_errors:[]},l=l[f],u++}}};return i(this),r}static assert(t){if(!(t instanceof ho))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,mt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ho.create=e=>new ho(e);const dN=(e,t)=>{let n;switch(e.code){case we.invalid_type:e.received===Pe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case we.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,mt.jsonStringifyReplacer)}`;break;case we.unrecognized_keys:n=`Unrecognized key(s) in object: ${mt.joinValues(e.keys,", ")}`;break;case we.invalid_union:n="Invalid input";break;case we.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${mt.joinValues(e.options)}`;break;case we.invalid_enum_value:n=`Invalid enum value. Expected ${mt.joinValues(e.options)}, received '${e.received}'`;break;case we.invalid_arguments:n="Invalid function arguments";break;case we.invalid_return_type:n="Invalid function return type";break;case we.invalid_date:n="Invalid date";break;case we.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:mt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case we.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case we.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case we.custom:n="Invalid input";break;case we.invalid_intersection_types:n="Intersection results could not be merged";break;case we.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case we.not_finite:n="Number must be finite";break;default:n=t.defaultError,mt.assertNever(e)}return{message:n}};let Yue=dN;function Xue(){return Yue}const Zue=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let l="";const u=r.filter(f=>!!f).slice().reverse();for(const f of u)l=f(o,{data:t,defaultError:l}).message;return{...i,path:a,message:l}};function Ce(e,t){const n=Xue(),r=Zue({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===dN?void 0:dN].filter(i=>!!i)});e.common.issues.push(r)}class Vr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Ve;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return Vr.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Ve;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Ve=Object.freeze({status:"aborted"}),Qh=e=>({status:"dirty",value:e}),di=e=>({status:"valid",value:e}),_3=e=>e.status==="aborted",E3=e=>e.status==="dirty",_f=e=>e.status==="valid",Yy=e=>typeof Promise<"u"&&e instanceof Promise;var Re;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Re||(Re={}));class Gs{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const A3=(e,t)=>{if(_f(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ho(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,l)=>{const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??l.defaultError}:typeof l.data>"u"?{message:u??r??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:u??n??l.defaultError}},description:i}}class dt{get description(){return this._def.description}_getType(t){return ds(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ds(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Vr,ctx:{common:t.parent.common,data:t.data,parsedType:ds(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Yy(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ds(t)},i=this._parseSync({data:t,path:r.path,parent:r});return A3(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ds(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return _f(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(i=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>_f(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ds(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Yy(i)?i:Promise.resolve(i));return A3(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),l=()=>a.addIssue({code:we.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Cf({schema:this,typeName:Fe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Ds.create(this,this._def)}nullable(){return Tf.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ua.create(this)}promise(){return Jy.create(this,this._def)}or(t){return Zy.create([this,t],this._def)}and(t){return Qy.create(this,t,this._def)}transform(t){return new Cf({...Ze(this._def),schema:this,typeName:Fe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new pN({...Ze(this._def),innerType:this,defaultValue:n,typeName:Fe.ZodDefault})}brand(){return new xce({typeName:Fe.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new mN({...Ze(this._def),innerType:this,catchValue:n,typeName:Fe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return iR.create(this,t)}readonly(){return gN.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Que=/^c[^\s-]{8,}$/i,Jue=/^[0-9a-z]+$/,ece=/^[0-9A-HJKMNP-TV-Z]{26}$/i,tce=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nce=/^[a-z0-9_-]{21}$/i,rce=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ice=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ace=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,oce="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let VS;const sce=/^(?:(?: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])$/,lce=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,uce=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,cce=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fce=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dce=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,a7="((\\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])))",hce=new RegExp(`^${a7}$`);function o7(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function pce(e){return new RegExp(`^${o7(e)}$`)}function mce(e){let t=`${a7}T${o7(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function gce(e,t){return!!((t==="v4"||!t)&&sce.test(e)||(t==="v6"||!t)&&uce.test(e))}function vce(e,t){if(!rce.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function yce(e,t){return!!((t==="v4"||!t)&&lce.test(e)||(t==="v6"||!t)&&cce.test(e))}class js extends dt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Pe.string){const a=this._getOrReturnCtx(t);return Ce(a,{code:we.invalid_type,expected:Pe.string,received:a.parsedType}),Ve}const r=new Vr;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,l=t.data.length<a.value;(o||l)&&(i=this._getOrReturnCtx(t,i),o?Ce(i,{code:we.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&Ce(i,{code:we.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")ace.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"email",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")VS||(VS=new RegExp(oce,"u")),VS.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"emoji",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")tce.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"uuid",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")nce.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"nanoid",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")Que.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"cuid",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Jue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"cuid2",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")ece.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"ulid",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Ce(i,{validation:"url",code:we.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"regex",code:we.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?mce(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?hce.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?pce(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?ice.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"duration",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?gce(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"ip",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?vce(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"jwt",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?yce(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"cidr",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?fce.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"base64",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?dce.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"base64url",code:we.invalid_string,message:a.message}),r.dirty()):mt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:we.invalid_string,...Re.errToObj(r)})}_addCheck(t){return new js({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Re.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Re.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Re.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Re.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Re.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Re.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Re.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Re.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Re.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Re.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Re.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Re.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Re.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Re.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Re.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Re.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Re.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Re.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Re.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Re.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Re.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Re.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Re.errToObj(n)})}nonempty(t){return this.min(1,Re.errToObj(t))}trim(){return new js({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new js({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new js({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}js.create=e=>new js({checks:[],typeName:Fe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});function bce(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return a%o/10**i}class Ef extends dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Pe.number){const a=this._getOrReturnCtx(t);return Ce(a,{code:we.invalid_type,expected:Pe.number,received:a.parsedType}),Ve}let r;const i=new Vr;for(const a of this._def.checks)a.kind==="int"?mt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ce(r,{code:we.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:we.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:we.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?bce(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:we.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Ce(r,{code:we.not_finite,message:a.message}),i.dirty()):mt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,r,i){return new Ef({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Re.toString(i)}]})}_addCheck(t){return new Ef({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Re.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Re.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Re.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Re.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&mt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Ef.create=e=>new Ef({checks:[],typeName:Fe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class jp extends dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Pe.bigint)return this._getInvalidInput(t);let r;const i=new Vr;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:we.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:we.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:we.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):mt.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Ce(n,{code:we.invalid_type,expected:Pe.bigint,received:n.parsedType}),Ve}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,r,i){return new jp({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Re.toString(i)}]})}_addCheck(t){return new jp({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}jp.create=e=>new jp({checks:[],typeName:Fe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});class C3 extends dt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Pe.boolean){const r=this._getOrReturnCtx(t);return Ce(r,{code:we.invalid_type,expected:Pe.boolean,received:r.parsedType}),Ve}return di(t.data)}}C3.create=e=>new C3({typeName:Fe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Xy extends dt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Pe.date){const a=this._getOrReturnCtx(t);return Ce(a,{code:we.invalid_type,expected:Pe.date,received:a.parsedType}),Ve}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Ce(a,{code:we.invalid_date}),Ve}const r=new Vr;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),Ce(i,{code:we.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):mt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Xy({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Re.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Re.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Xy.create=e=>new Xy({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Fe.ZodDate,...Ze(e)});class T3 extends dt{_parse(t){if(this._getType(t)!==Pe.symbol){const r=this._getOrReturnCtx(t);return Ce(r,{code:we.invalid_type,expected:Pe.symbol,received:r.parsedType}),Ve}return di(t.data)}}T3.create=e=>new T3({typeName:Fe.ZodSymbol,...Ze(e)});class O3 extends dt{_parse(t){if(this._getType(t)!==Pe.undefined){const r=this._getOrReturnCtx(t);return Ce(r,{code:we.invalid_type,expected:Pe.undefined,received:r.parsedType}),Ve}return di(t.data)}}O3.create=e=>new O3({typeName:Fe.ZodUndefined,...Ze(e)});class j3 extends dt{_parse(t){if(this._getType(t)!==Pe.null){const r=this._getOrReturnCtx(t);return Ce(r,{code:we.invalid_type,expected:Pe.null,received:r.parsedType}),Ve}return di(t.data)}}j3.create=e=>new j3({typeName:Fe.ZodNull,...Ze(e)});class N3 extends dt{constructor(){super(...arguments),this._any=!0}_parse(t){return di(t.data)}}N3.create=e=>new N3({typeName:Fe.ZodAny,...Ze(e)});class P3 extends dt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return di(t.data)}}P3.create=e=>new P3({typeName:Fe.ZodUnknown,...Ze(e)});class Ws extends dt{_parse(t){const n=this._getOrReturnCtx(t);return Ce(n,{code:we.invalid_type,expected:Pe.never,received:n.parsedType}),Ve}}Ws.create=e=>new Ws({typeName:Fe.ZodNever,...Ze(e)});class M3 extends dt{_parse(t){if(this._getType(t)!==Pe.undefined){const r=this._getOrReturnCtx(t);return Ce(r,{code:we.invalid_type,expected:Pe.void,received:r.parsedType}),Ve}return di(t.data)}}M3.create=e=>new M3({typeName:Fe.ZodVoid,...Ze(e)});class ua extends dt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Pe.array)return Ce(n,{code:we.invalid_type,expected:Pe.array,received:n.parsedType}),Ve;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,l=n.data.length<i.exactLength.value;(o||l)&&(Ce(n,{code:o?we.too_big:we.too_small,minimum:l?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Ce(n,{code:we.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Ce(n,{code:we.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,l)=>i.type._parseAsync(new Gs(n,o,n.path,l)))).then(o=>Vr.mergeArray(r,o));const a=[...n.data].map((o,l)=>i.type._parseSync(new Gs(n,o,n.path,l)));return Vr.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new ua({...this._def,minLength:{value:t,message:Re.toString(n)}})}max(t,n){return new ua({...this._def,maxLength:{value:t,message:Re.toString(n)}})}length(t,n){return new ua({...this._def,exactLength:{value:t,message:Re.toString(n)}})}nonempty(t){return this.min(1,t)}}ua.create=(e,t)=>new ua({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Fe.ZodArray,...Ze(t)});function $c(e){if(e instanceof mn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ds.create($c(r))}return new mn({...e._def,shape:()=>t})}else return e instanceof ua?new ua({...e._def,type:$c(e.element)}):e instanceof Ds?Ds.create($c(e.unwrap())):e instanceof Tf?Tf.create($c(e.unwrap())):e instanceof pu?pu.create(e.items.map(t=>$c(t))):e}class mn extends dt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=mt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Pe.object){const f=this._getOrReturnCtx(t);return Ce(f,{code:we.invalid_type,expected:Pe.object,received:f.parsedType}),Ve}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Ws&&this._def.unknownKeys==="strip"))for(const f in i.data)o.includes(f)||l.push(f);const u=[];for(const f of o){const d=a[f],h=i.data[f];u.push({key:{status:"valid",value:f},value:d._parse(new Gs(i,h,i.path,f)),alwaysSet:f in i.data})}if(this._def.catchall instanceof Ws){const f=this._def.unknownKeys;if(f==="passthrough")for(const d of l)u.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(f==="strict")l.length>0&&(Ce(i,{code:we.unrecognized_keys,keys:l}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const d of l){const h=i.data[d];u.push({key:{status:"valid",value:d},value:f._parse(new Gs(i,h,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const f=[];for(const d of u){const h=await d.key,m=await d.value;f.push({key:h,value:m,alwaysSet:d.alwaysSet})}return f}).then(f=>Vr.mergeObjectSync(r,f)):Vr.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Re.errToObj,new mn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,o;const i=((o=(a=this._def).errorMap)==null?void 0:o.call(a,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Re.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new mn({...this._def,unknownKeys:"strip"})}passthrough(){return new mn({...this._def,unknownKeys:"passthrough"})}extend(t){return new mn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new mn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Fe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new mn({...this._def,catchall:t})}pick(t){const n={};for(const r of mt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new mn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of mt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new mn({...this._def,shape:()=>n})}deepPartial(){return $c(this)}partial(t){const n={};for(const r of mt.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new mn({...this._def,shape:()=>n})}required(t){const n={};for(const r of mt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Ds;)a=a._def.innerType;n[r]=a}return new mn({...this._def,shape:()=>n})}keyof(){return s7(mt.objectKeys(this.shape))}}mn.create=(e,t)=>new mn({shape:()=>e,unknownKeys:"strip",catchall:Ws.create(),typeName:Fe.ZodObject,...Ze(t)});mn.strictCreate=(e,t)=>new mn({shape:()=>e,unknownKeys:"strict",catchall:Ws.create(),typeName:Fe.ZodObject,...Ze(t)});mn.lazycreate=(e,t)=>new mn({shape:e,unknownKeys:"strip",catchall:Ws.create(),typeName:Fe.ZodObject,...Ze(t)});class Zy extends dt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const o=a.map(l=>new ho(l.ctx.common.issues));return Ce(n,{code:we.invalid_union,unionErrors:o}),Ve}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const f={...n,common:{...n.common,issues:[]},parent:null},d=u._parseSync({data:n.data,path:n.path,parent:f});if(d.status==="valid")return d;d.status==="dirty"&&!a&&(a={result:d,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const l=o.map(u=>new ho(u));return Ce(n,{code:we.invalid_union,unionErrors:l}),Ve}}get options(){return this._def.options}}Zy.create=(e,t)=>new Zy({options:e,typeName:Fe.ZodUnion,...Ze(t)});function hN(e,t){const n=ds(e),r=ds(t);if(e===t)return{valid:!0,data:e};if(n===Pe.object&&r===Pe.object){const i=mt.objectKeys(t),a=mt.objectKeys(e).filter(l=>i.indexOf(l)!==-1),o={...e,...t};for(const l of a){const u=hN(e[l],t[l]);if(!u.valid)return{valid:!1};o[l]=u.data}return{valid:!0,data:o}}else if(n===Pe.array&&r===Pe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],l=t[a],u=hN(o,l);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===Pe.date&&r===Pe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Qy extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(_3(a)||_3(o))return Ve;const l=hN(a.value,o.value);return l.valid?((E3(a)||E3(o))&&n.dirty(),{status:n.value,value:l.data}):(Ce(r,{code:we.invalid_intersection_types}),Ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Qy.create=(e,t,n)=>new Qy({left:e,right:t,typeName:Fe.ZodIntersection,...Ze(n)});class pu extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Pe.array)return Ce(r,{code:we.invalid_type,expected:Pe.array,received:r.parsedType}),Ve;if(r.data.length<this._def.items.length)return Ce(r,{code:we.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ve;!this._def.rest&&r.data.length>this._def.items.length&&(Ce(r,{code:we.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new Gs(r,o,r.path,l)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>Vr.mergeArray(n,o)):Vr.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new pu({...this._def,rest:t})}}pu.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pu({items:e,typeName:Fe.ZodTuple,rest:null,...Ze(t)})};class R3 extends dt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Pe.map)return Ce(r,{code:we.invalid_type,expected:Pe.map,received:r.parsedType}),Ve;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([l,u],f)=>({key:i._parse(new Gs(r,l,r.path,[f,"key"])),value:a._parse(new Gs(r,u,r.path,[f,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of o){const f=await u.key,d=await u.value;if(f.status==="aborted"||d.status==="aborted")return Ve;(f.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(f.value,d.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const u of o){const f=u.key,d=u.value;if(f.status==="aborted"||d.status==="aborted")return Ve;(f.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(f.value,d.value)}return{status:n.value,value:l}}}}R3.create=(e,t,n)=>new R3({valueType:t,keyType:e,typeName:Fe.ZodMap,...Ze(n)});class Np extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Pe.set)return Ce(r,{code:we.invalid_type,expected:Pe.set,received:r.parsedType}),Ve;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Ce(r,{code:we.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Ce(r,{code:we.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const f=new Set;for(const d of u){if(d.status==="aborted")return Ve;d.status==="dirty"&&n.dirty(),f.add(d.value)}return{status:n.value,value:f}}const l=[...r.data.values()].map((u,f)=>a._parse(new Gs(r,u,r.path,f)));return r.common.async?Promise.all(l).then(u=>o(u)):o(l)}min(t,n){return new Np({...this._def,minSize:{value:t,message:Re.toString(n)}})}max(t,n){return new Np({...this._def,maxSize:{value:t,message:Re.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Np.create=(e,t)=>new Np({valueType:e,minSize:null,maxSize:null,typeName:Fe.ZodSet,...Ze(t)});class k3 extends dt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}k3.create=(e,t)=>new k3({getter:e,typeName:Fe.ZodLazy,...Ze(t)});class D3 extends dt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ce(n,{received:n.data,code:we.invalid_literal,expected:this._def.value}),Ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}D3.create=(e,t)=>new D3({value:e,typeName:Fe.ZodLiteral,...Ze(t)});function s7(e,t){return new Af({values:e,typeName:Fe.ZodEnum,...Ze(t)})}class Af extends dt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ce(n,{expected:mt.joinValues(r),received:n.parsedType,code:we.invalid_type}),Ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Ce(n,{received:n.data,code:we.invalid_enum_value,options:r}),Ve}return di(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Af.create(t,{...this._def,...n})}exclude(t,n=this._def){return Af.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Af.create=s7;class I3 extends dt{_parse(t){const n=mt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Pe.string&&r.parsedType!==Pe.number){const i=mt.objectValues(n);return Ce(r,{expected:mt.joinValues(i),received:r.parsedType,code:we.invalid_type}),Ve}if(this._cache||(this._cache=new Set(mt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=mt.objectValues(n);return Ce(r,{received:r.data,code:we.invalid_enum_value,options:i}),Ve}return di(t.data)}get enum(){return this._def.values}}I3.create=(e,t)=>new I3({values:e,typeName:Fe.ZodNativeEnum,...Ze(t)});class Jy extends dt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Pe.promise&&n.common.async===!1)return Ce(n,{code:we.invalid_type,expected:Pe.promise,received:n.parsedType}),Ve;const r=n.parsedType===Pe.promise?n.data:Promise.resolve(n.data);return di(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Jy.create=(e,t)=>new Jy({type:e,typeName:Fe.ZodPromise,...Ze(t)});class Cf extends dt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{Ce(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async l=>{if(n.value==="aborted")return Ve;const u=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return u.status==="aborted"?Ve:u.status==="dirty"||n.value==="dirty"?Qh(u.value):u});{if(n.value==="aborted")return Ve;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?Ve:l.status==="dirty"||n.value==="dirty"?Qh(l.value):l}}if(i.type==="refinement"){const o=l=>{const u=i.refinement(l,a);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?Ve:(l.status==="dirty"&&n.dirty(),o(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?Ve:(l.status==="dirty"&&n.dirty(),o(l.value).then(()=>({status:n.value,value:l.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!_f(o))return Ve;const l=i.transform(o.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>_f(o)?Promise.resolve(i.transform(o.value,a)).then(l=>({status:n.value,value:l})):Ve);mt.assertNever(i)}}Cf.create=(e,t,n)=>new Cf({schema:e,typeName:Fe.ZodEffects,effect:t,...Ze(n)});Cf.createWithPreprocess=(e,t,n)=>new Cf({schema:t,effect:{type:"preprocess",transform:e},typeName:Fe.ZodEffects,...Ze(n)});class Ds extends dt{_parse(t){return this._getType(t)===Pe.undefined?di(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ds.create=(e,t)=>new Ds({innerType:e,typeName:Fe.ZodOptional,...Ze(t)});class Tf extends dt{_parse(t){return this._getType(t)===Pe.null?di(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Tf.create=(e,t)=>new Tf({innerType:e,typeName:Fe.ZodNullable,...Ze(t)});class pN extends dt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Pe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}pN.create=(e,t)=>new pN({innerType:e,typeName:Fe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class mN extends dt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Yy(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new ho(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ho(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}mN.create=(e,t)=>new mN({innerType:e,typeName:Fe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class L3 extends dt{_parse(t){if(this._getType(t)!==Pe.nan){const r=this._getOrReturnCtx(t);return Ce(r,{code:we.invalid_type,expected:Pe.nan,received:r.parsedType}),Ve}return{status:"valid",value:t.data}}}L3.create=e=>new L3({typeName:Fe.ZodNaN,...Ze(e)});class xce extends dt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class iR extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ve:a.status==="dirty"?(n.dirty(),Qh(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ve:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new iR({in:t,out:n,typeName:Fe.ZodPipeline})}}class gN extends dt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(_f(i)&&(i.value=Object.freeze(i.value)),i);return Yy(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}gN.create=(e,t)=>new gN({innerType:e,typeName:Fe.ZodReadonly,...Ze(t)});var Fe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Fe||(Fe={}));const Is=js.create,$3=Ef.create;Ws.create;ua.create;const Dm=mn.create;Zy.create;Qy.create;pu.create;const L0=Af.create;Jy.create;Ds.create;Tf.create;/**
|
|
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
|
+
*/const wce=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),l7=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
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
|
+
*/var Sce={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"};/**
|
|
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 _ce=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},u)=>j.createElement("svg",{ref:u,...Sce,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:l7("lucide",i),...l},[...o.map(([f,d])=>j.createElement(f,d)),...Array.isArray(a)?a:[a]]));/**
|
|
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 qe=(e,t)=>{const n=j.forwardRef(({className:r,...i},a)=>j.createElement(_ce,{ref:a,iconNode:t,className:l7(`lucide-${wce(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
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 Ece=qe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
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 u7=qe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
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 Ace=qe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
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 Cce=qe("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
|
|
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 c7=qe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
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 Tce=qe("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
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 f7=qe("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
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 Im=qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
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 $0=qe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
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 Of=qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
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 Oce=qe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
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 md=qe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
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 jce=qe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
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 Lm=qe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
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 B0=qe("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
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 FS=qe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
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 si=qe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
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 Nce=qe("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
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 aR=qe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
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 Pce=qe("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
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 US=qe("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
|
|
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 Mce=qe("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
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 Rce=qe("FastForward",[["polygon",{points:"13 19 22 12 13 5 13 19",key:"587y9g"}],["polygon",{points:"2 19 11 12 2 5 2 19",key:"3pweh0"}]]);/**
|
|
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 mu=qe("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
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 oR=qe("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);/**
|
|
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 kce=qe("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
|
|
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 Dce=qe("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
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 Ice=qe("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
|
|
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 Lce=qe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
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 sR=qe("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
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 sp=qe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
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 d7=qe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
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 h7=qe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
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 gd=qe("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
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 p7=qe("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
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 eb=qe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
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 q0=qe("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
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 lR=qe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
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 Pp=qe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
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 m7=qe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
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 B3=qe("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
|
|
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 g7=qe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
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 $ce=qe("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
301
|
+
* @license lucide-react v0.468.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const q3=qe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
306
|
+
* @license lucide-react v0.468.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const tb=qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
311
|
+
* @license lucide-react v0.468.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const v7=qe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var HS,z0="HoverCard",[y7]=va(z0,[hd]),V0=hd(),[Bce,F0]=y7(z0),b7=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:l=300}=e,u=V0(t),f=j.useRef(0),d=j.useRef(0),h=j.useRef(!1),m=j.useRef(!1),[g,x]=Hs({prop:r,defaultProp:i??!1,onChange:a,caller:z0}),w=j.useCallback(()=>{clearTimeout(d.current),f.current=window.setTimeout(()=>x(!0),o)},[o,x]),y=j.useCallback(()=>{clearTimeout(f.current),!h.current&&!m.current&&(d.current=window.setTimeout(()=>x(!1),l))},[l,x]),S=j.useCallback(()=>x(!1),[x]);return j.useEffect(()=>()=>{clearTimeout(f.current),clearTimeout(d.current)},[]),b.jsx(Bce,{scope:t,open:g,onOpenChange:x,onOpen:w,onClose:y,onDismiss:S,hasSelectionRef:h,isPointerDownOnContentRef:m,children:b.jsx(ZM,{...u,children:n})})};b7.displayName=z0;var x7="HoverCardTrigger",w7=j.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=F0(x7,n),a=V0(n);return b.jsx(QM,{asChild:!0,...a,children:b.jsx(He.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:ke(e.onPointerEnter,rb(i.onOpen)),onPointerLeave:ke(e.onPointerLeave,rb(i.onClose)),onFocus:ke(e.onFocus,i.onOpen),onBlur:ke(e.onBlur,i.onClose),onTouchStart:ke(e.onTouchStart,o=>o.preventDefault())})})});w7.displayName=x7;var uR="HoverCardPortal",[qce,zce]=y7(uR,{forceMount:void 0}),S7=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=F0(uR,t);return b.jsx(qce,{scope:t,forceMount:n,children:b.jsx(Er,{present:n||a.open,children:b.jsx(Rm,{asChild:!0,container:i,children:r})})})};S7.displayName=uR;var nb="HoverCardContent",_7=j.forwardRef((e,t)=>{const n=zce(nb,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=F0(nb,e.__scopeHoverCard);return b.jsx(Er,{present:r||a.open,children:b.jsx(Vce,{"data-state":a.open?"open":"closed",...i,onPointerEnter:ke(e.onPointerEnter,rb(a.onOpen)),onPointerLeave:ke(e.onPointerLeave,rb(a.onClose)),ref:t})})});_7.displayName=nb;var Vce=j.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...l}=e,u=F0(nb,n),f=V0(n),d=j.useRef(null),h=ft(t,d),[m,g]=j.useState(!1);return j.useEffect(()=>{if(m){const x=document.body;return HS=x.style.userSelect||x.style.webkitUserSelect,x.style.userSelect="none",x.style.webkitUserSelect="none",()=>{x.style.userSelect=HS,x.style.webkitUserSelect=HS}}},[m]),j.useEffect(()=>{if(d.current){const x=()=>{g(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",x),()=>{document.removeEventListener("pointerup",x),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),j.useEffect(()=>{d.current&&Hce(d.current).forEach(w=>w.setAttribute("tabindex","-1"))}),b.jsx(Pm,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:ke(a,x=>{x.preventDefault()}),onDismiss:u.onDismiss,children:b.jsx(JM,{...f,...l,onPointerDown:ke(l.onPointerDown,x=>{x.currentTarget.contains(x.target)&&g(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:h,style:{...l.style,userSelect:m?"text":void 0,WebkitUserSelect:m?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Fce="HoverCardArrow",Uce=j.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=V0(n);return b.jsx(eR,{...i,...r,ref:t})});Uce.displayName=Fce;function rb(e){return t=>t.pointerType==="touch"?void 0:e()}function Hce(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var Gce=b7,Wce=w7,Kce=S7,Yce=_7;function Xce({...e}){return b.jsx(Gce,{"data-slot":"hover-card",...e})}function Zce({...e}){return b.jsx(Wce,{"data-slot":"hover-card-trigger",...e})}function Qce({className:e,align:t="center",sideOffset:n=4,...r}){return b.jsx(Kce,{"data-slot":"hover-card-portal",children:b.jsx(Yce,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:Te("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) border p-4 shadow-md outline-hidden",e),...r})})}var Jce=j.createContext(void 0);function U0(e){const t=j.useContext(Jce);return e||t||"ltr"}function vN(e,[t,n]){return Math.min(n,Math.max(t,e))}function efe(e,t){return j.useReducer((n,r)=>t[n][r]??n,e)}var cR="ScrollArea",[E7]=va(cR),[tfe,hi]=E7(cR),A7=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:a=600,...o}=e,[l,u]=j.useState(null),[f,d]=j.useState(null),[h,m]=j.useState(null),[g,x]=j.useState(null),[w,y]=j.useState(null),[S,E]=j.useState(0),[_,A]=j.useState(0),[C,O]=j.useState(!1),[P,M]=j.useState(!1),R=ft(t,I=>u(I)),$=U0(i);return b.jsx(tfe,{scope:n,type:r,dir:$,scrollHideDelay:a,scrollArea:l,viewport:f,onViewportChange:d,content:h,onContentChange:m,scrollbarX:g,onScrollbarXChange:x,scrollbarXEnabled:C,onScrollbarXEnabledChange:O,scrollbarY:w,onScrollbarYChange:y,scrollbarYEnabled:P,onScrollbarYEnabledChange:M,onCornerWidthChange:E,onCornerHeightChange:A,children:b.jsx(He.div,{dir:$,...o,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});A7.displayName=cR;var C7="ScrollAreaViewport",T7=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=hi(C7,n),l=j.useRef(null),u=ft(t,l,o.onViewportChange);return b.jsxs(b.Fragment,{children:[b.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:i}),b.jsx(He.div,{"data-radix-scroll-area-viewport":"",...a,ref:u,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:b.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});T7.displayName=C7;var ba="ScrollAreaScrollbar",fR=j.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=hi(ba,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,l=e.orientation==="horizontal";return j.useEffect(()=>(l?a(!0):o(!0),()=>{l?a(!1):o(!1)}),[l,a,o]),i.type==="hover"?b.jsx(nfe,{...r,ref:t,forceMount:n}):i.type==="scroll"?b.jsx(rfe,{...r,ref:t,forceMount:n}):i.type==="auto"?b.jsx(O7,{...r,ref:t,forceMount:n}):i.type==="always"?b.jsx(dR,{...r,ref:t}):null});fR.displayName=ba;var nfe=j.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=hi(ba,e.__scopeScrollArea),[a,o]=j.useState(!1);return j.useEffect(()=>{const l=i.scrollArea;let u=0;if(l){const f=()=>{window.clearTimeout(u),o(!0)},d=()=>{u=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return l.addEventListener("pointerenter",f),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),l.removeEventListener("pointerenter",f),l.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),b.jsx(Er,{present:n||a,children:b.jsx(O7,{"data-state":a?"visible":"hidden",...r,ref:t})})}),rfe=j.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=hi(ba,e.__scopeScrollArea),a=e.orientation==="horizontal",o=G0(()=>u("SCROLL_END"),100),[l,u]=efe("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 j.useEffect(()=>{if(l==="idle"){const f=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[l,i.scrollHideDelay,u]),j.useEffect(()=>{const f=i.viewport,d=a?"scrollLeft":"scrollTop";if(f){let h=f[d];const m=()=>{const g=f[d];h!==g&&(u("SCROLL"),o()),h=g};return f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[i.viewport,a,u,o]),b.jsx(Er,{present:n||l!=="hidden",children:b.jsx(dR,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ke(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:ke(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),O7=j.forwardRef((e,t)=>{const n=hi(ba,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=j.useState(!1),l=e.orientation==="horizontal",u=G0(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(l?f:d)}},10);return jf(n.viewport,u),jf(n.content,u),b.jsx(Er,{present:r||a,children:b.jsx(dR,{"data-state":a?"visible":"hidden",...i,ref:t})})}),dR=j.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=hi(ba,e.__scopeScrollArea),a=j.useRef(null),o=j.useRef(0),[l,u]=j.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=R7(l.viewport,l.content),d={...r,sizes:l,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function h(m,g){return ufe(m,o.current,l,g)}return n==="horizontal"?b.jsx(ife,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollLeft,g=z3(m,l,i.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=h(m,i.dir))}}):n==="vertical"?b.jsx(afe,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollTop,g=z3(m,l);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=h(m))}}):null}),ife=j.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=hi(ba,e.__scopeScrollArea),[o,l]=j.useState(),u=j.useRef(null),f=ft(t,u,a.onScrollbarXChange);return j.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),b.jsx(N7,{"data-orientation":"horizontal",...i,ref:f,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":H0(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),D7(m,h)&&d.preventDefault()}},onResize:()=>{u.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:ab(o.paddingLeft),paddingEnd:ab(o.paddingRight)}})}})}),afe=j.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=hi(ba,e.__scopeScrollArea),[o,l]=j.useState(),u=j.useRef(null),f=ft(t,u,a.onScrollbarYChange);return j.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),b.jsx(N7,{"data-orientation":"vertical",...i,ref:f,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":H0(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),D7(m,h)&&d.preventDefault()}},onResize:()=>{u.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:ab(o.paddingTop),paddingEnd:ab(o.paddingBottom)}})}})}),[ofe,j7]=E7(ba),N7=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:u,onDragScroll:f,onWheelScroll:d,onResize:h,...m}=e,g=hi(ba,n),[x,w]=j.useState(null),y=ft(t,R=>w(R)),S=j.useRef(null),E=j.useRef(""),_=g.viewport,A=r.content-r.viewport,C=nr(d),O=nr(u),P=G0(h,10);function M(R){if(S.current){const $=R.clientX-S.current.left,I=R.clientY-S.current.top;f({x:$,y:I})}}return j.useEffect(()=>{const R=$=>{const I=$.target;(x==null?void 0:x.contains(I))&&C($,A)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[_,x,A,C]),j.useEffect(O,[r,O]),jf(x,P),jf(g.content,P),b.jsx(ofe,{scope:n,scrollbar:x,hasThumb:i,onThumbChange:nr(a),onThumbPointerUp:nr(o),onThumbPositionChange:O,onThumbPointerDown:nr(l),children:b.jsx(He.div,{...m,ref:y,style:{position:"absolute",...m.style},onPointerDown:ke(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),S.current=x.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),M(R))}),onPointerMove:ke(e.onPointerMove,M),onPointerUp:ke(e.onPointerUp,R=>{const $=R.target;$.hasPointerCapture(R.pointerId)&&$.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=E.current,g.viewport&&(g.viewport.style.scrollBehavior=""),S.current=null})})})}),ib="ScrollAreaThumb",P7=j.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=j7(ib,e.__scopeScrollArea);return b.jsx(Er,{present:n||i.hasThumb,children:b.jsx(sfe,{ref:t,...r})})}),sfe=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,a=hi(ib,n),o=j7(ib,n),{onThumbPositionChange:l}=o,u=ft(t,h=>o.onThumbChange(h)),f=j.useRef(void 0),d=G0(()=>{f.current&&(f.current(),f.current=void 0)},100);return j.useEffect(()=>{const h=a.viewport;if(h){const m=()=>{if(d(),!f.current){const g=cfe(h,l);f.current=g,l()}};return l(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[a.viewport,d,l]),b.jsx(He.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ke(e.onPointerDownCapture,h=>{const g=h.target.getBoundingClientRect(),x=h.clientX-g.left,w=h.clientY-g.top;o.onThumbPointerDown({x,y:w})}),onPointerUp:ke(e.onPointerUp,o.onThumbPointerUp)})});P7.displayName=ib;var hR="ScrollAreaCorner",M7=j.forwardRef((e,t)=>{const n=hi(hR,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?b.jsx(lfe,{...e,ref:t}):null});M7.displayName=hR;var lfe=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=hi(hR,n),[a,o]=j.useState(0),[l,u]=j.useState(0),f=!!(a&&l);return jf(i.scrollbarX,()=>{var h;const d=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(d),u(d)}),jf(i.scrollbarY,()=>{var h;const d=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(d),o(d)}),f?b.jsx(He.div,{...r,ref:t,style:{width:a,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ab(e){return e?parseInt(e,10):0}function R7(e,t){const n=e/t;return isNaN(n)?0:n}function H0(e){const t=R7(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function ufe(e,t,n,r="ltr"){const i=H0(n),a=i/2,o=t||a,l=i-o,u=n.scrollbar.paddingStart+o,f=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,h=r==="ltr"?[0,d]:[d*-1,0];return k7([u,f],h)(e)}function z3(e,t,n="ltr"){const r=H0(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,l=a-r,u=n==="ltr"?[0,o]:[o*-1,0],f=vN(e,u);return k7([0,o],[0,l])(f)}function k7(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 D7(e,t){return e>0&&e<t}var cfe=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){const a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,l=n.top!==a.top;(o||l)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function G0(e,t){const n=nr(e),r=j.useRef(0);return j.useEffect(()=>()=>window.clearTimeout(r.current),[]),j.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function jf(e,t){const n=nr(t);zn(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var I7=A7,ffe=T7,dfe=M7;const L7=j.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(I7,{ref:r,className:Te("relative overflow-hidden",e),...n,children:[b.jsx(ffe,{className:"h-full w-full",children:t}),b.jsx($7,{}),b.jsx(dfe,{})]}));L7.displayName=I7.displayName;const $7=j.forwardRef(({className:e,orientation:t="vertical",...n},r)=>b.jsx(fR,{ref:r,orientation:t,className:Te("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:b.jsx(P7,{className:"relative flex-1 rounded-full bg-border"})}));$7.displayName=fR.displayName;function B7(){var e;return typeof window<"u"&&((e=window.__WORKBENCH_RUNTIME__)!=null&&e.apiBase)?pfe(window.__WORKBENCH_RUNTIME__.apiBase):""}function hfe(){const e=B7();return e?`${e}/config`:"./config"}function pfe(e){return e.endsWith("/")?e.slice(0,-1):e}const Rt={toString(){const e=B7();return e?`${e}/api`:"./api"}},mfe=6e4,Ih=12e4;async function jt(e,t){const{timeout:n=mfe,signal:r,...i}=t||{},a=new AbortController,o=setTimeout(()=>a.abort(),n);let l;r&&"any"in AbortSignal?l=AbortSignal.any([r,a.signal]):(r&&(r.aborted?a.abort():r.addEventListener("abort",()=>a.abort())),l=a.signal);try{const u=await fetch(e,{...i,signal:l,headers:{"Content-Type":"application/json",...i==null?void 0:i.headers}});if(!u.ok){const f=await u.json().catch(()=>({}));throw new Error(f.error||`HTTP ${u.status}`)}return u.json()}catch(u){throw u instanceof Error&&u.name==="AbortError"?r!=null&&r.aborted?u:new Error(`Request timed out after ${n/1e3}s`):u}finally{clearTimeout(o)}}const Yt={async refresh(){return jt(`${Rt}/refresh`,{method:"POST"})},async getOverview(e){return jt(`${Rt}/overview`,{signal:e,timeout:Ih})},async getCounts(e){return jt(`${Rt}/counts`,{signal:e})},async getQueueNames(e){return jt(`${Rt}/queue-names`,{signal:e})},async getQueues(e){return jt(`${Rt}/queues`,{signal:e})},async getMetrics(e){return jt(`${Rt}/metrics`,{signal:e,timeout:Ih})},async getActivityStats(e){return jt(`${Rt}/activity`,{signal:e,timeout:Ih})},async getJobs(e,t){const n=new URLSearchParams;t!=null&&t.status&&n.set("status",t.status),t!=null&&t.limit&&n.set("limit",String(t.limit)),t!=null&&t.cursor&&n.set("cursor",t.cursor),t!=null&&t.sort&&n.set("sort",t.sort);const r=n.toString();return jt(`${Rt}/queues/${encodeURIComponent(e)}/jobs${r?`?${r}`:""}`)},async getJob(e,t){return jt(`${Rt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},async retryJob(e,t){await jt(`${Rt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/retry`,{method:"POST"})},async removeJob(e,t){await jt(`${Rt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/remove`,{method:"POST"})},async promoteJob(e,t){await jt(`${Rt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/promote`,{method:"POST"})},async search(e,t){const n=new URLSearchParams({q:e});return t&&n.set("limit",String(t)),jt(`${Rt}/search?${n.toString()}`)},async cleanJobs(e,t,n){return jt(`${Rt}/queues/${encodeURIComponent(e)}/clean`,{method:"POST",body:JSON.stringify({status:t,grace:n})})},async getConfig(){return jt(hfe())},async getTagValues(e,t){const n=new URLSearchParams;t&&n.set("limit",String(t));const r=n.toString();return jt(`${Rt}/tags/${encodeURIComponent(e)}/values${r?`?${r}`:""}`)},async getRuns(e,t){const n=new URLSearchParams;e!=null&&e.limit&&n.set("limit",String(e.limit)),e!=null&&e.cursor&&n.set("cursor",e.cursor),e!=null&&e.sort&&n.set("sort",e.sort),e!=null&&e.status&&n.set("status",e.status),e!=null&&e.tags&&Object.keys(e.tags).length>0&&n.set("tags",JSON.stringify(e.tags)),e!=null&&e.text&&n.set("q",e.text),e!=null&&e.timeRange&&(n.set("from",String(e.timeRange.start)),n.set("to",String(e.timeRange.end)));const r=n.toString();return jt(`${Rt}/runs${r?`?${r}`:""}`,{signal:t,timeout:Ih})},async getSchedulers(e){const t=new URLSearchParams;e!=null&&e.repeatableSort&&t.set("repeatableSort",e.repeatableSort),e!=null&&e.delayedSort&&t.set("delayedSort",e.delayedSort);const n=t.toString();return jt(`${Rt}/schedulers${n?`?${n}`:""}`)},async getRepeatableSchedulers(e){const{repeatable:t}=await this.getSchedulers({repeatableSort:e});return t},async getDelayedSchedulers(e){const{delayed:t}=await this.getSchedulers({delayedSort:e});return t},async testJob(e){const t={queueName:e.queueName,jobName:e.name,data:e.data,opts:e.delay!==void 0?{delay:e.delay}:void 0};return jt(`${Rt}/test`,{method:"POST",body:JSON.stringify(t)})},async cleanQueue(e,t,n){return jt(`${Rt}/queues/${encodeURIComponent(e)}/clean`,{method:"POST",body:JSON.stringify({status:t,grace:n})})},async bulkRetry(e){return jt(`${Rt}/bulk/retry`,{method:"POST",body:JSON.stringify({jobs:e})})},async bulkDelete(e){return jt(`${Rt}/bulk/delete`,{method:"POST",body:JSON.stringify({jobs:e})})},async bulkPromote(e){return jt(`${Rt}/bulk/promote`,{method:"POST",body:JSON.stringify({jobs:e})})},async pauseQueue(e){return jt(`${Rt}/queues/${encodeURIComponent(e)}/pause`,{method:"POST"})},async resumeQueue(e){return jt(`${Rt}/queues/${encodeURIComponent(e)}/resume`,{method:"POST"})},async getFlows(e,t){const n=new URLSearchParams;e&&n.set("limit",String(e));const r=n.toString();return jt(`${Rt}/flows${r?`?${r}`:""}`,{signal:t,timeout:Ih})},async getFlow(e,t){return jt(`${Rt}/flows/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},async createFlow(e){return jt(`${Rt}/flows`,{method:"POST",body:JSON.stringify(e)})}},at={config:["config"],overview:["overview"],queueNames:["queue-names"],queues:["queues"],queue:e=>["queue",e],jobs:(e,t,n)=>["jobs",e,t,n],jobsAll:e=>["jobs",e],job:(e,t)=>["job",e,t],runs:(e,t)=>["runs",e,t],runsAll:["runs"],schedulers:{repeatable:e=>["schedulers","repeatable",e],delayed:e=>["schedulers","delayed",e],all:["schedulers"]},search:e=>["search",e],tagValues:e=>["tagValues",e],metrics:["metrics"],activity:["activity"],flows:["flows"],flow:(e,t)=>["flow",e,t]};function $m(){return fi({queryKey:at.config,queryFn:()=>Yt.getConfig(),staleTime:Number.POSITIVE_INFINITY})}function gfe(){return fi({queryKey:at.queueNames,queryFn:({signal:e})=>Yt.getQueueNames(e),staleTime:6e4})}function pR(){return fi({queryKey:at.queues,queryFn:({signal:e})=>Yt.getQueues(e),refetchInterval:5e3})}function vfe(e){const{data:t}=pR();return j.useMemo(()=>t==null?void 0:t.find(n=>n.name===e),[t,e])}function yfe(){return fi({queryKey:at.metrics,queryFn:({signal:e})=>Yt.getMetrics(e),refetchInterval:3e4})}function bfe(){return fi({queryKey:at.activity,queryFn:({signal:e})=>Yt.getActivityStats(e),refetchInterval:3e4})}function xfe(e,t,n){return V9({queryKey:at.jobs(e,t,n),queryFn:({pageParam:r})=>Yt.getJobs(e,{status:t,limit:50,cursor:r,sort:n}),getNextPageParam:r=>r.cursor,initialPageParam:void 0,refetchInterval:5e3})}function wfe(e,t){return fi({queryKey:at.job(e,t),queryFn:()=>Yt.getJob(e,t),refetchInterval:5e3})}function Sfe(e,t){return V9({queryKey:at.runs(e,t),queryFn:({pageParam:n,signal:r})=>Yt.getRuns({limit:30,cursor:n,sort:e,...t},r),getNextPageParam:n=>n.cursor,initialPageParam:void 0,refetchInterval:5e3,staleTime:3e3})}function _fe(e){return fi({queryKey:at.schedulers.repeatable(e),queryFn:()=>Yt.getRepeatableSchedulers(e),refetchInterval:5e3})}function Efe(e){return fi({queryKey:at.schedulers.delayed(e),queryFn:()=>Yt.getDelayedSchedulers(e),refetchInterval:5e3})}function Afe(e){return fi({queryKey:at.search(e),queryFn:()=>Yt.search(e),enabled:e.trim().length>0,staleTime:1e3*30})}function q7(e,t=!0){return fi({queryKey:at.tagValues(e),queryFn:()=>Yt.getTagValues(e),enabled:t&&e.length>0,staleTime:1e3*60})}function mR(){const e=sr();return ga({mutationFn:()=>Yt.refresh(),onSuccess:()=>{e.invalidateQueries()}})}function Cfe(){const e=sr();return ga({mutationFn:({queueName:t,jobId:n})=>Yt.retryJob(t,n),onSuccess:(t,{queueName:n,jobId:r})=>{e.invalidateQueries({queryKey:at.job(n,r)}),e.invalidateQueries({queryKey:at.jobsAll(n)}),e.invalidateQueries({queryKey:at.runsAll})}})}function Tfe(){const e=sr();return ga({mutationFn:({queueName:t,jobId:n})=>Yt.removeJob(t,n),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:at.jobsAll(n)}),e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues})}})}function Ofe(){const e=sr();return ga({mutationFn:({queueName:t,jobId:n})=>Yt.promoteJob(t,n),onSuccess:(t,{queueName:n,jobId:r})=>{e.invalidateQueries({queryKey:at.job(n,r)}),e.invalidateQueries({queryKey:at.jobsAll(n)}),e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.schedulers.all})}})}function jfe(){const e=sr();return ga({mutationFn:t=>Yt.testJob(t),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:at.jobsAll(n)}),e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues})}})}function z7(){const e=sr();return ga({mutationFn:({jobs:t})=>Yt.bulkRetry(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues})}})}function V7(){const e=sr();return ga({mutationFn:({jobs:t})=>Yt.bulkDelete(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues})}})}function F7(){const e=sr();return ga({mutationFn:({jobs:t})=>Yt.bulkPromote(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues}),e.invalidateQueries({queryKey:at.schedulers.all})}})}function Nfe(){const e=sr();return ga({mutationFn:t=>Yt.pauseQueue(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.queues})}})}function Pfe(){const e=sr();return ga({mutationFn:t=>Yt.resumeQueue(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.queues})}})}function Mfe(){return fi({queryKey:at.flows,queryFn:({signal:e})=>Yt.getFlows(void 0,e),refetchInterval:5e3})}function Rfe(e,t){return fi({queryKey:at.flow(e,t),queryFn:()=>Yt.getFlow(e,t),enabled:!!e&&!!t,retry:!1,refetchInterval:5e3})}function kfe({queueName:e}){const t=vfe(e);if(!t)return b.jsx("div",{className:"flex gap-2 text-[9px] text-muted-foreground",children:b.jsx("span",{children:"Loading..."})});const{counts:n}=t,r=n.waiting+n.active+n.completed+n.failed+n.delayed+n.prioritized+n["waiting-children"];return b.jsxs("div",{className:"flex gap-2 text-[9px]",children:[n.active>0&&b.jsxs("span",{className:"text-chart-2",children:[n.active," active"]}),n.waiting>0&&b.jsxs("span",{className:"text-muted-foreground",children:[n.waiting," waiting"]}),n["waiting-children"]>0&&b.jsxs("span",{className:"text-muted-foreground",children:[n["waiting-children"]," waiting children"]}),n.prioritized>0&&b.jsxs("span",{className:"text-chart-4",children:[n.prioritized," prioritized"]}),n.completed>0&&b.jsxs("span",{className:"text-chart-1",children:[n.completed," completed"]}),n.failed>0&&b.jsxs("span",{className:"text-chart-3",children:[n.failed," failed"]}),n.delayed>0&&b.jsxs("span",{className:"text-chart-5",children:[n.delayed," delayed"]}),r===0&&b.jsx("span",{className:"text-muted-foreground",children:"empty"})]})}function Dfe({className:e}){return b.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[b.jsx("path",{d:"M12 2L21 7V17L12 22L3 17V7L12 2Z",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),b.jsx("rect",{x:"7",y:"9",width:"10",height:"2",rx:"0.5",fill:"currentColor"}),b.jsx("rect",{x:"7",y:"13",width:"6",height:"2",rx:"0.5",fill:"currentColor"})]})}function Ife({queues:e,pausedQueues:t=new Set,activeNav:n,activeQueue:r,onNavSelect:i,onQueueSelect:a,isDark:o,onToggleTheme:l}){const u=[{id:"runs",label:"Runs",icon:eb},{id:"metrics",label:"Metrics",icon:f7},{id:"schedulers",label:"Schedulers",icon:si},{id:"flows",label:"Flows",icon:gd},{id:"test",label:"Test",icon:oR}],f=({icon:d,label:h,isActive:m,onClick:g,isPaused:x})=>b.jsxs(Tp,{children:[b.jsx(Op,{asChild:!0,children:b.jsx("button",{type:"button",onClick:g,className:Te("flex w-full items-center justify-center p-2 text-sm font-medium transition-colors",m?"text-foreground":"text-muted-foreground hover:text-foreground"),children:b.jsxs("div",{className:"relative",children:[b.jsx(d,{className:"h-4 w-4 shrink-0"}),x&&b.jsx("span",{className:"absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-amber-500"})]})})}),b.jsx(Sf,{side:"right",sideOffset:16,children:b.jsxs("span",{className:"flex items-center gap-2",children:[h,x&&b.jsx("span",{className:"text-amber-500",children:"(paused)"})]})})]});return b.jsxs("aside",{className:"flex h-screen w-[52px] flex-col border-r border-border bg-background",children:[b.jsx("div",{className:"flex h-14 items-center justify-center border-b border-border",children:b.jsx(Dfe,{className:"h-5 w-5"})}),b.jsx(L7,{className:"flex-1",children:b.jsxs("div",{className:"space-y-6 p-2",children:[b.jsx("nav",{className:"space-y-1",children:u.map(d=>b.jsx(f,{icon:d.icon,label:d.label,isActive:n===d.id,onClick:()=>i(d.id)},d.id))}),b.jsx("div",{className:"border-t border-border pt-2",children:b.jsxs(Xce,{openDelay:100,closeDelay:200,children:[b.jsx(Zce,{asChild:!0,children:b.jsx("button",{type:"button",className:Te("flex w-full items-center justify-center p-2 text-sm font-medium transition-colors",n==="queues"||r?"text-foreground":"text-muted-foreground hover:text-foreground"),children:b.jsx(sR,{className:"h-4 w-4 shrink-0"})})}),b.jsxs(Qce,{side:"right",align:"start",sideOffset:16,className:"w-auto min-w-[140px] max-w-[260px] p-1",children:[b.jsx("div",{className:"px-2 py-1.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Queues"}),b.jsx("div",{className:"max-h-[min(70svh,32rem)] space-y-0.5 overflow-y-auto pr-0.5",children:e.map(d=>b.jsxs("button",{type:"button",onClick:()=>a(d),title:d,className:Te("flex w-full min-w-0 flex-col items-start gap-0.5 px-2 py-1.5 transition-colors",r===d?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[b.jsxs("div",{className:"flex w-full min-w-0 items-center justify-between gap-2",children:[b.jsx("span",{className:"min-w-0 truncate font-mono text-[11px]",children:d}),t.has(d)&&b.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-amber-500"})]}),b.jsx(kfe,{queueName:d})]},d))})]})]})})]})}),b.jsx("div",{className:"border-t border-border p-2",children:b.jsxs(Tp,{children:[b.jsx(Op,{asChild:!0,children:b.jsx("button",{type:"button",onClick:l,className:"flex w-full items-center justify-center rounded p-2 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:o?b.jsx(m7,{className:"h-4 w-4 shrink-0"}):b.jsx(h7,{className:"h-4 w-4 shrink-0"})})}),b.jsx(Sf,{side:"right",sideOffset:16,children:o?"Light mode":"Dark mode"})]})})]})}const V3=[{value:"all",label:"All statuses"},{value:"active",label:"Active"},{value:"waiting",label:"Waiting"},{value:"waiting-children",label:"Waiting Children"},{value:"prioritized",label:"Prioritized"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"delayed",label:"Delayed"}];function gR(e){const t={},n=[],r=/(\w+):(?:"([^"]+)"|(\S+))/g;let i=0,a;for(;a=r.exec(e),!!a;){if(a.index>i){const u=e.slice(i,a.index).trim();u&&n.push(u)}const o=a[1],l=a[2]||a[3];o==="status"||(t[o]=l),i=r.lastIndex}if(i<e.length){const o=e.slice(i).trim();o&&n.push(o)}return{tags:t,text:n.join(" ")}}function Lfe(e){const t=[];for(const[n,r]of Object.entries(e.tags))if(r){const i=r.includes(" ")?`"${r}"`:r;t.push(`${n}:${i}`)}return e.text&&t.push(e.text),t.join(" ")}function $fe({value:e,status:t,onChange:n,className:r}){const{data:i}=$m(),[a,o]=j.useState(e),[l,u]=j.useState(!1),[f,d]=j.useState(0),h=j.useRef(null),m=j.useRef(null),g=(i==null?void 0:i.tags)??[],x="Search runs...",{currentToken:w,tokenType:y,tokenPrefix:S}=j.useMemo(()=>{var Y;const D=((Y=h.current)==null?void 0:Y.selectionStart)??a.length,q=a.slice(0,D),L=q.lastIndexOf(" "),z=q.slice(L+1),H=z.indexOf(":");if(H>0){const Z=z.slice(0,H),U=z.slice(H+1);return{currentToken:z,tokenType:"value",tokenPrefix:{key:Z,valuePrefix:U}}}return{currentToken:z,tokenType:"key",tokenPrefix:null}},[a]),E=y==="value"?S==null?void 0:S.key:void 0,{data:_}=q7(E??"",!!E),A=(_==null?void 0:_.values)??[],C=j.useMemo(()=>{const D=[];if(y==="key"&&w){const q=w.toLowerCase();for(const L of g)L.toLowerCase().startsWith(q)&&D.push({type:"key",label:`${L}:`,value:`${L}:`});"status".startsWith(q)&&D.push({type:"key",label:"status:",value:"status:"});for(const L of V3)L.value!=="all"&&(L.value.toLowerCase().startsWith(q)||L.label.toLowerCase().startsWith(q))&&D.push({type:"status",label:`status:${L.value}`,value:`status:${L.value}`})}else if(y==="value"&&S){const{key:q,valuePrefix:L}=S,z=L.toLowerCase();if(q==="status")for(const H of V3)H.value!=="all"&&H.value.toLowerCase().startsWith(z)&&D.push({type:"status",label:H.label,value:H.value});else for(const H of A)H.value.toLowerCase().startsWith(z)&&D.push({type:"value",label:`${H.value} (${H.count})`,value:H.value})}else if(!w){for(const q of g.slice(0,4))D.push({type:"key",label:`${q}:`,value:`${q}:`});g.includes("status")||D.push({type:"key",label:"status:",value:"status:"})}return D.slice(0,8)},[w,y,S,g,A,a]),O=j.useMemo(()=>gR(a),[a]),P=D=>{o(D.target.value),u(!0),d(0)},M=D=>{var F,X;const q=((F=h.current)==null?void 0:F.selectionStart)??a.length,L=a.slice(0,q),z=a.slice(q),Y=L.lastIndexOf(" ")+1;let Z,U=t;if(D.type==="status")U=D.value.replace("status:",""),Z=L.slice(0,Y)+z.trimStart();else if(D.type==="key")Z=L.slice(0,Y)+D.value+z;else{const K=(S==null?void 0:S.key)??"";Z=`${L.slice(0,Y)}${K}:${D.value}${z.startsWith(" ")?z:` ${z.trimStart()}`}`}o(Z.trim()),u(!1),n(Z.trim(),U),(X=h.current)==null||X.focus()},R=D=>{if(!l||C.length===0){D.key==="Enter"&&(D.preventDefault(),n(a,t));return}switch(D.key){case"ArrowDown":D.preventDefault(),d(q=>(q+1)%C.length);break;case"ArrowUp":D.preventDefault(),d(q=>(q-1+C.length)%C.length);break;case"Enter":case"Tab":D.preventDefault(),M(C[f]);break;case"Escape":u(!1);break}},$=D=>{const q={...O};delete q.tags[D];const L=Lfe(q);o(L),n(L,t)},I=()=>{n(a,"all")};j.useEffect(()=>{e!==a&&o(e)},[e]),j.useEffect(()=>{const D=q=>{m.current&&!m.current.contains(q.target)&&u(!1)};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const k=Object.keys(O.tags).length>0||t&&t!=="all",V=()=>{u(!1),n(a,t)};return b.jsxs("div",{className:Te("space-y-2",r),children:[b.jsxs("div",{ref:m,className:"relative",children:[b.jsxs("div",{className:"relative",children:[b.jsx(Pp,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),b.jsx("input",{ref:h,type:"text",value:a,onChange:P,onKeyDown:R,onFocus:()=>u(!0),placeholder:x,className:"h-9 w-full border bg-transparent pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:outline-none"})]}),l&&b.jsxs("div",{className:"absolute left-0 right-0 top-full z-50 mt-1 overflow-hidden border bg-popover/95 shadow-lg backdrop-blur-sm",children:[b.jsxs("button",{type:"button",onClick:V,className:Te("flex w-full items-center justify-between border-b px-3 py-2.5 text-left text-sm transition-colors",f===-1?"bg-accent":"hover:bg-accent/50"),children:[b.jsx("span",{children:"Confirm search"}),b.jsx("span",{className:"text-muted-foreground",children:"↵"})]}),C.length>0&&b.jsx("div",{className:"flex flex-wrap gap-2 p-3",children:C.map((D,q)=>b.jsx("button",{type:"button",onClick:()=>M(D),className:Te(" bg-muted px-3 py-1.5 font-mono text-sm transition-colors",q===f?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted/80"),children:D.label},`${D.type}-${D.value}`))})]})]}),k&&b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t&&t!=="all"&&b.jsxs("button",{type:"button",onClick:I,className:"group flex items-center gap-1 bg-primary/10 px-2 py-1 text-xs font-medium text-primary hover:bg-primary/20",children:[b.jsxs("span",{className:"font-mono",children:["status:",t]}),b.jsx(tb,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]}),Object.entries(O.tags).map(([D,q])=>b.jsxs("button",{type:"button",onClick:()=>$(D),className:"group flex items-center gap-1 bg-primary/10 px-2 py-1 text-xs font-medium text-primary hover:bg-primary/20",children:[b.jsxs("span",{className:"font-mono",children:[D,":",q.length>16?`${q.slice(0,16)}...`:q]}),b.jsx(tb,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},D)),b.jsx("button",{type:"button",onClick:()=>{o(""),n("","all")},className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]})]})}var F3=1,Bfe=.9,qfe=.8,zfe=.17,GS=.1,WS=.999,Vfe=.9999,Ffe=.99,Ufe=/[\\\/_+.#"@\[\(\{&]/,Hfe=/[\\\/_+.#"@\[\(\{&]/g,Gfe=/[\s-]/,U7=/[\s-]/g;function yN(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?F3:Ffe;var l=`${i},${a}`;if(o[l]!==void 0)return o[l];for(var u=r.charAt(a),f=n.indexOf(u,i),d=0,h,m,g,x;f>=0;)h=yN(e,t,n,r,f+1,a+1,o),h>d&&(f===i?h*=F3:Ufe.test(e.charAt(f-1))?(h*=qfe,g=e.slice(i,f-1).match(Hfe),g&&i>0&&(h*=Math.pow(WS,g.length))):Gfe.test(e.charAt(f-1))?(h*=Bfe,x=e.slice(i,f-1).match(U7),x&&i>0&&(h*=Math.pow(WS,x.length))):(h*=zfe,i>0&&(h*=Math.pow(WS,f-i))),e.charAt(f)!==t.charAt(a)&&(h*=Vfe)),(h<GS&&n.charAt(f-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(f-1)!==r.charAt(a))&&(m=yN(e,t,n,r,f+1,a+2,o),m*GS>h&&(h=m*GS)),h>d&&(d=h),f=n.indexOf(u,f+1);return o[l]=d,d}function U3(e){return e.toLowerCase().replace(U7," ")}function Wfe(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,yN(e,t,U3(e),U3(t),0,0,{})}var KS="focusScope.autoFocusOnMount",YS="focusScope.autoFocusOnUnmount",H3={bubbles:!1,cancelable:!0},Kfe="FocusScope",vR=j.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,u]=j.useState(null),f=nr(i),d=nr(a),h=j.useRef(null),m=ft(t,w=>u(w)),g=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let w=function(_){if(g.paused||!l)return;const A=_.target;l.contains(A)?h.current=A:ss(h.current,{select:!0})},y=function(_){if(g.paused||!l)return;const A=_.relatedTarget;A!==null&&(l.contains(A)||ss(h.current,{select:!0}))},S=function(_){if(document.activeElement===document.body)for(const C of _)C.removedNodes.length>0&&ss(l)};document.addEventListener("focusin",w),document.addEventListener("focusout",y);const E=new MutationObserver(S);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",y),E.disconnect()}}},[r,l,g.paused]),j.useEffect(()=>{if(l){W3.add(g);const w=document.activeElement;if(!l.contains(w)){const S=new CustomEvent(KS,H3);l.addEventListener(KS,f),l.dispatchEvent(S),S.defaultPrevented||(Yfe(ede(H7(l)),{select:!0}),document.activeElement===w&&ss(l))}return()=>{l.removeEventListener(KS,f),setTimeout(()=>{const S=new CustomEvent(YS,H3);l.addEventListener(YS,d),l.dispatchEvent(S),S.defaultPrevented||ss(w??document.body,{select:!0}),l.removeEventListener(YS,d),W3.remove(g)},0)}}},[l,f,d,g]);const x=j.useCallback(w=>{if(!n&&!r||g.paused)return;const y=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,S=document.activeElement;if(y&&S){const E=w.currentTarget,[_,A]=Xfe(E);_&&A?!w.shiftKey&&S===A?(w.preventDefault(),n&&ss(_,{select:!0})):w.shiftKey&&S===_&&(w.preventDefault(),n&&ss(A,{select:!0})):S===E&&w.preventDefault()}},[n,r,g.paused]);return b.jsx(He.div,{tabIndex:-1,...o,ref:m,onKeyDown:x})});vR.displayName=Kfe;function Yfe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ss(r,{select:t}),document.activeElement!==n)return}function Xfe(e){const t=H7(e),n=G3(t,e),r=G3(t.reverse(),e);return[n,r]}function H7(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function G3(e,t){for(const n of e)if(!Zfe(n,{upTo:t}))return n}function Zfe(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 Qfe(e){return e instanceof HTMLInputElement&&"select"in e}function ss(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qfe(e)&&t&&e.select()}}var W3=Jfe();function Jfe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=K3(e,t),e.unshift(t)},remove(t){var n;e=K3(e,t),(n=e[0])==null||n.resume()}}}function K3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ede(e){return e.filter(t=>t.tagName!=="A")}var XS=0;function G7(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Y3()),document.body.insertAdjacentElement("beforeend",e[1]??Y3()),XS++,()=>{XS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),XS--}},[])}function Y3(){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 ia=function(){return ia=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ia.apply(this,arguments)};function W7(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function tde(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var wy="right-scroll-bar-position",Sy="width-before-scroll-bar",nde="with-scroll-bars-hidden",rde="--removed-body-scroll-bar-size";function ZS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ide(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var ade=typeof window<"u"?j.useLayoutEffect:j.useEffect,X3=new WeakMap;function ode(e,t){var n=ide(null,function(r){return e.forEach(function(i){return ZS(i,r)})});return ade(function(){var r=X3.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(l){a.has(l)||ZS(l,null)}),a.forEach(function(l){i.has(l)||ZS(l,o)})}X3.set(n,e)},[e]),n}function sde(e){return e}function lde(e,t){t===void 0&&(t=sde);var n=[],r=!1,i={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(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(a),o=n}var u=function(){var d=o;o=[],d.forEach(a)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(d){o.push(d),f()},filter:function(d){return o=o.filter(d),n}}}};return i}function ude(e){e===void 0&&(e={});var t=lde(null);return t.options=ia({async:!0,ssr:!1},e),t}var K7=function(e){var t=e.sideCar,n=W7(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 j.createElement(r,ia({},n))};K7.isSideCarExport=!0;function cde(e,t){return e.useMedium(t),K7}var Y7=ude(),QS=function(){},W0=j.forwardRef(function(e,t){var n=j.useRef(null),r=j.useState({onScrollCapture:QS,onWheelCapture:QS,onTouchMoveCapture:QS}),i=r[0],a=r[1],o=e.forwardProps,l=e.children,u=e.className,f=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,g=e.noRelative,x=e.noIsolation,w=e.inert,y=e.allowPinchZoom,S=e.as,E=S===void 0?"div":S,_=e.gapMode,A=W7(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,O=ode([n,t]),P=ia(ia({},A),i);return j.createElement(j.Fragment,null,d&&j.createElement(C,{sideCar:Y7,removeScrollBar:f,shards:h,noRelative:g,noIsolation:x,inert:w,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:_}),o?j.cloneElement(j.Children.only(l),ia(ia({},P),{ref:O})):j.createElement(E,ia({},P,{className:u,ref:O}),l))});W0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};W0.classNames={fullWidth:Sy,zeroRight:wy};var fde=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dde(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fde();return t&&e.setAttribute("nonce",t),e}function hde(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function pde(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mde=function(){var e=0,t=null;return{add:function(n){e==0&&(t=dde())&&(hde(t,n),pde(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gde=function(){var e=mde();return function(t,n){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},X7=function(){var e=gde(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},vde={left:0,top:0,right:0,gap:0},JS=function(e){return parseInt(e||"",10)||0},yde=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[JS(n),JS(r),JS(i)]},bde=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vde;var t=yde(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])}},xde=X7(),ef="data-scroll-locked",wde=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
316
|
+
.`.concat(nde,` {
|
|
317
|
+
overflow: hidden `).concat(r,`;
|
|
318
|
+
padding-right: `).concat(l,"px ").concat(r,`;
|
|
319
|
+
}
|
|
320
|
+
body[`).concat(ef,`] {
|
|
321
|
+
overflow: hidden `).concat(r,`;
|
|
322
|
+
overscroll-behavior: contain;
|
|
323
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
324
|
+
padding-left: `.concat(i,`px;
|
|
325
|
+
padding-top: `).concat(a,`px;
|
|
326
|
+
padding-right: `).concat(o,`px;
|
|
327
|
+
margin-left:0;
|
|
328
|
+
margin-top:0;
|
|
329
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
330
|
+
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.`).concat(wy,` {
|
|
334
|
+
right: `).concat(l,"px ").concat(r,`;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.`).concat(Sy,` {
|
|
338
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.`).concat(wy," .").concat(wy,` {
|
|
342
|
+
right: 0 `).concat(r,`;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.`).concat(Sy," .").concat(Sy,` {
|
|
346
|
+
margin-right: 0 `).concat(r,`;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
body[`).concat(ef,`] {
|
|
350
|
+
`).concat(rde,": ").concat(l,`px;
|
|
351
|
+
}
|
|
352
|
+
`)},Z3=function(){var e=parseInt(document.body.getAttribute(ef)||"0",10);return isFinite(e)?e:0},Sde=function(){j.useEffect(function(){return document.body.setAttribute(ef,(Z3()+1).toString()),function(){var e=Z3()-1;e<=0?document.body.removeAttribute(ef):document.body.setAttribute(ef,e.toString())}},[])},_de=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Sde();var a=j.useMemo(function(){return bde(i)},[i]);return j.createElement(xde,{styles:wde(a,!t,i,n?"":"!important")})},bN=!1;if(typeof window<"u")try{var $v=Object.defineProperty({},"passive",{get:function(){return bN=!0,!0}});window.addEventListener("test",$v,$v),window.removeEventListener("test",$v,$v)}catch{bN=!1}var Oc=bN?{passive:!1}:!1,Ede=function(e){return e.tagName==="TEXTAREA"},Z7=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ede(e)&&n[t]==="visible")},Ade=function(e){return Z7(e,"overflowY")},Cde=function(e){return Z7(e,"overflowX")},Q3=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=Q7(e,r);if(i){var a=J7(e,r),o=a[1],l=a[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Tde=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ode=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Q7=function(e,t){return e==="v"?Ade(t):Cde(t)},J7=function(e,t){return e==="v"?Tde(t):Ode(t)},jde=function(e,t){return e==="h"&&t==="rtl"?-1:1},Nde=function(e,t,n,r,i){var a=jde(e,window.getComputedStyle(t).direction),o=a*r,l=n.target,u=t.contains(l),f=!1,d=o>0,h=0,m=0;do{if(!l)break;var g=J7(e,l),x=g[0],w=g[1],y=g[2],S=w-y-a*x;(x||S)&&Q7(e,l)&&(h+=S,m+=x);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(d&&Math.abs(h)<1||!d&&Math.abs(m)<1)&&(f=!0),f},Bv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},J3=function(e){return[e.deltaX,e.deltaY]},eB=function(e){return e&&"current"in e?e.current:e},Pde=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Mde=function(e){return`
|
|
353
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
354
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
355
|
+
`)},Rde=0,jc=[];function kde(e){var t=j.useRef([]),n=j.useRef([0,0]),r=j.useRef(),i=j.useState(Rde++)[0],a=j.useState(X7)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=tde([e.lockRef.current],(e.shards||[]).map(eB),!0).filter(Boolean);return w.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=j.useCallback(function(w,y){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var S=Bv(w),E=n.current,_="deltaX"in w?w.deltaX:E[0]-S[0],A="deltaY"in w?w.deltaY:E[1]-S[1],C,O=w.target,P=Math.abs(_)>Math.abs(A)?"h":"v";if("touches"in w&&P==="h"&&O.type==="range")return!1;var M=window.getSelection(),R=M&&M.anchorNode,$=R?R===O||R.contains(O):!1;if($)return!1;var I=Q3(P,O);if(!I)return!0;if(I?C=P:(C=P==="v"?"h":"v",I=Q3(P,O)),!I)return!1;if(!r.current&&"changedTouches"in w&&(_||A)&&(r.current=C),!C)return!0;var k=r.current||C;return Nde(k,y,w,k==="h"?_:A)},[]),u=j.useCallback(function(w){var y=w;if(!(!jc.length||jc[jc.length-1]!==a)){var S="deltaY"in y?J3(y):Bv(y),E=t.current.filter(function(C){return C.name===y.type&&(C.target===y.target||y.target===C.shadowParent)&&Pde(C.delta,S)})[0];if(E&&E.should){y.cancelable&&y.preventDefault();return}if(!E){var _=(o.current.shards||[]).map(eB).filter(Boolean).filter(function(C){return C.contains(y.target)}),A=_.length>0?l(y,_[0]):!o.current.noIsolation;A&&y.cancelable&&y.preventDefault()}}},[]),f=j.useCallback(function(w,y,S,E){var _={name:w,delta:y,target:S,should:E,shadowParent:Dde(S)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(A){return A!==_})},1)},[]),d=j.useCallback(function(w){n.current=Bv(w),r.current=void 0},[]),h=j.useCallback(function(w){f(w.type,J3(w),w.target,l(w,e.lockRef.current))},[]),m=j.useCallback(function(w){f(w.type,Bv(w),w.target,l(w,e.lockRef.current))},[]);j.useEffect(function(){return jc.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Oc),document.addEventListener("touchmove",u,Oc),document.addEventListener("touchstart",d,Oc),function(){jc=jc.filter(function(w){return w!==a}),document.removeEventListener("wheel",u,Oc),document.removeEventListener("touchmove",u,Oc),document.removeEventListener("touchstart",d,Oc)}},[]);var g=e.removeScrollBar,x=e.inert;return j.createElement(j.Fragment,null,x?j.createElement(a,{styles:Mde(i)}):null,g?j.createElement(_de,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Dde(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ide=cde(Y7,kde);var yR=j.forwardRef(function(e,t){return j.createElement(W0,ia({},e,{ref:t,sideCar:Ide}))});yR.classNames=W0.classNames;var Lde=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Nc=new WeakMap,qv=new WeakMap,zv={},e_=0,eW=function(e){return e&&(e.host||eW(e.parentNode))},$de=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=eW(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})},Bde=function(e,t,n,r){var i=$de(t,Array.isArray(e)?e:[e]);zv[n]||(zv[n]=new WeakMap);var a=zv[n],o=[],l=new Set,u=new Set(i),f=function(h){!h||l.has(h)||(l.add(h),f(h.parentNode))};i.forEach(f);var d=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(m){if(l.has(m))d(m);else try{var g=m.getAttribute(r),x=g!==null&&g!=="false",w=(Nc.get(m)||0)+1,y=(a.get(m)||0)+1;Nc.set(m,w),a.set(m,y),o.push(m),w===1&&x&&qv.set(m,!0),y===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return d(t),l.clear(),e_++,function(){o.forEach(function(h){var m=Nc.get(h)-1,g=a.get(h)-1;Nc.set(h,m),a.set(h,g),m||(qv.has(h)||h.removeAttribute(r),qv.delete(h)),g||h.removeAttribute(n)}),e_--,e_||(Nc=new WeakMap,Nc=new WeakMap,qv=new WeakMap,zv={})}},tW=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Lde(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Bde(r,i,n,"aria-hidden")):function(){return null}},K0="Dialog",[nW]=va(K0),[qde,Vi]=nW(K0),rW=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=j.useRef(null),u=j.useRef(null),[f,d]=Hs({prop:r,defaultProp:i??!1,onChange:a,caller:K0});return b.jsx(qde,{scope:t,triggerRef:l,contentRef:u,contentId:or(),titleId:or(),descriptionId:or(),open:f,onOpenChange:d,onOpenToggle:j.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};rW.displayName=K0;var iW="DialogTrigger",zde=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(iW,n),a=ft(t,i.triggerRef);return b.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":wR(i.open),...r,ref:a,onClick:ke(e.onClick,i.onOpenToggle)})});zde.displayName=iW;var bR="DialogPortal",[Vde,aW]=nW(bR,{forceMount:void 0}),oW=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Vi(bR,t);return b.jsx(Vde,{scope:t,forceMount:n,children:j.Children.map(r,o=>b.jsx(Er,{present:n||a.open,children:b.jsx(Rm,{asChild:!0,container:i,children:o})}))})};oW.displayName=bR;var ob="DialogOverlay",sW=j.forwardRef((e,t)=>{const n=aW(ob,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Vi(ob,e.__scopeDialog);return a.modal?b.jsx(Er,{present:r||a.open,children:b.jsx(Ude,{...i,ref:t})}):null});sW.displayName=ob;var Fde=Ep("DialogOverlay.RemoveScroll"),Ude=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(ob,n);return b.jsx(yR,{as:Fde,allowPinchZoom:!0,shards:[i.contentRef],children:b.jsx(He.div,{"data-state":wR(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gu="DialogContent",lW=j.forwardRef((e,t)=>{const n=aW(gu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Vi(gu,e.__scopeDialog);return b.jsx(Er,{present:r||a.open,children:a.modal?b.jsx(Hde,{...i,ref:t}):b.jsx(Gde,{...i,ref:t})})});lW.displayName=gu;var Hde=j.forwardRef((e,t)=>{const n=Vi(gu,e.__scopeDialog),r=j.useRef(null),i=ft(t,n.contentRef,r);return j.useEffect(()=>{const a=r.current;if(a)return tW(a)},[]),b.jsx(uW,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,a=>a.preventDefault())})}),Gde=j.forwardRef((e,t)=>{const n=Vi(gu,e.__scopeDialog),r=j.useRef(!1),i=j.useRef(!1);return b.jsx(uW,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,f;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((f=n.triggerRef.current)==null?void 0:f.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),uW=j.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=Vi(gu,n),u=j.useRef(null),f=ft(t,u);return G7(),b.jsxs(b.Fragment,{children:[b.jsx(vR,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:b.jsx(Pm,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":wR(l.open),...o,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(Wde,{titleId:l.titleId}),b.jsx(Yde,{contentRef:u,descriptionId:l.descriptionId})]})]})}),xR="DialogTitle",cW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(xR,n);return b.jsx(He.h2,{id:i.titleId,...r,ref:t})});cW.displayName=xR;var fW="DialogDescription",dW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(fW,n);return b.jsx(He.p,{id:i.descriptionId,...r,ref:t})});dW.displayName=fW;var hW="DialogClose",pW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(hW,n);return b.jsx(He.button,{type:"button",...r,ref:t,onClick:ke(e.onClick,()=>i.onOpenChange(!1))})});pW.displayName=hW;function wR(e){return e?"open":"closed"}var mW="DialogTitleWarning",[a4e,gW]=cse(mW,{contentName:gu,titleName:xR,docsSlug:"dialog"}),Wde=({titleId:e})=>{const t=gW(mW),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
356
|
+
|
|
357
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
358
|
+
|
|
359
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Kde="DialogDescriptionWarning",Yde=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gW(Kde).contentName}}.`;return j.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},vW=rW,yW=oW,SR=sW,_R=lW,bW=cW,xW=dW,Xde=pW,Zde=Symbol.for("react.lazy"),sb=PM[" use ".trim().toString()];function Qde(e){return typeof e=="object"&&e!==null&&"then"in e}function wW(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Zde&&"_payload"in e&&Qde(e._payload)}function SW(e){const t=ehe(e),n=j.forwardRef((r,i)=>{let{children:a,...o}=r;wW(a)&&typeof sb=="function"&&(a=sb(a._payload));const l=j.Children.toArray(a),u=l.find(nhe);if(u){const f=u.props.children,d=l.map(h=>h===u?j.Children.count(f)>1?j.Children.only(null):j.isValidElement(f)?f.props.children:null:h);return b.jsx(t,{...o,ref:i,children:j.isValidElement(f)?j.cloneElement(f,void 0,d):null})}return b.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var Jde=SW("Slot");function ehe(e){const t=j.forwardRef((n,r)=>{let{children:i,...a}=n;if(wW(i)&&typeof sb=="function"&&(i=sb(i._payload)),j.isValidElement(i)){const o=ihe(i),l=rhe(a,i.props);return i.type!==j.Fragment&&(l.ref=r?Vs(r,o):o),j.cloneElement(i,l)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var the=Symbol("radix.slottable");function nhe(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===the}function rhe(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...l)=>{const u=a(...l);return i(...l),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function ihe(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ahe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Js=ahe.reduce((e,t)=>{const n=SW(`Primitive.${t}`),r=j.forwardRef((i,a)=>{const{asChild:o,...l}=i,u=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(u,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Lh='[cmdk-group=""]',t_='[cmdk-group-items=""]',ohe='[cmdk-group-heading=""]',_W='[cmdk-item=""]',tB=`${_W}:not([aria-disabled="true"])`,xN="cmdk-item-select",Bc="data-value",she=(e,t,n)=>Wfe(e,t,n),EW=j.createContext(void 0),Bm=()=>j.useContext(EW),AW=j.createContext(void 0),ER=()=>j.useContext(AW),CW=j.createContext(void 0),TW=j.forwardRef((e,t)=>{let n=qc(()=>{var F,X;return{search:"",value:(X=(F=e.value)!=null?F:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=qc(()=>new Set),i=qc(()=>new Map),a=qc(()=>new Map),o=qc(()=>new Set),l=OW(e),{label:u,children:f,value:d,onValueChange:h,filter:m,shouldFilter:g,loop:x,disablePointerSelection:w=!1,vimBindings:y=!0,...S}=e,E=or(),_=or(),A=or(),C=j.useRef(null),O=yhe();vu(()=>{if(d!==void 0){let F=d.trim();n.current.value=F,P.emit()}},[d]),vu(()=>{O(6,V)},[]);let P=j.useMemo(()=>({subscribe:F=>(o.current.add(F),()=>o.current.delete(F)),snapshot:()=>n.current,setState:(F,X,K)=>{var G,Q,J,re;if(!Object.is(n.current[F],X)){if(n.current[F]=X,F==="search")k(),$(),O(1,I);else if(F==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ne=document.getElementById(A);ne?ne.focus():(G=document.getElementById(E))==null||G.focus()}if(O(7,()=>{var ne;n.current.selectedItemId=(ne=D())==null?void 0:ne.id,P.emit()}),K||O(5,V),((Q=l.current)==null?void 0:Q.value)!==void 0){let ne=X??"";(re=(J=l.current).onValueChange)==null||re.call(J,ne);return}}P.emit()}},emit:()=>{o.current.forEach(F=>F())}}),[]),M=j.useMemo(()=>({value:(F,X,K)=>{var G;X!==((G=a.current.get(F))==null?void 0:G.value)&&(a.current.set(F,{value:X,keywords:K}),n.current.filtered.items.set(F,R(X,K)),O(2,()=>{$(),P.emit()}))},item:(F,X)=>(r.current.add(F),X&&(i.current.has(X)?i.current.get(X).add(F):i.current.set(X,new Set([F]))),O(3,()=>{k(),$(),n.current.value||I(),P.emit()}),()=>{a.current.delete(F),r.current.delete(F),n.current.filtered.items.delete(F);let K=D();O(4,()=>{k(),(K==null?void 0:K.getAttribute("id"))===F&&I(),P.emit()})}),group:F=>(i.current.has(F)||i.current.set(F,new Set),()=>{a.current.delete(F),i.current.delete(F)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:E,inputId:A,labelId:_,listInnerRef:C}),[]);function R(F,X){var K,G;let Q=(G=(K=l.current)==null?void 0:K.filter)!=null?G:she;return F?Q(F,n.current.search,X):0}function $(){if(!n.current.search||l.current.shouldFilter===!1)return;let F=n.current.filtered.items,X=[];n.current.filtered.groups.forEach(G=>{let Q=i.current.get(G),J=0;Q.forEach(re=>{let ne=F.get(re);J=Math.max(ne,J)}),X.push([G,J])});let K=C.current;q().sort((G,Q)=>{var J,re;let ne=G.getAttribute("id"),fe=Q.getAttribute("id");return((J=F.get(fe))!=null?J:0)-((re=F.get(ne))!=null?re:0)}).forEach(G=>{let Q=G.closest(t_);Q?Q.appendChild(G.parentElement===Q?G:G.closest(`${t_} > *`)):K.appendChild(G.parentElement===K?G:G.closest(`${t_} > *`))}),X.sort((G,Q)=>Q[1]-G[1]).forEach(G=>{var Q;let J=(Q=C.current)==null?void 0:Q.querySelector(`${Lh}[${Bc}="${encodeURIComponent(G[0])}"]`);J==null||J.parentElement.appendChild(J)})}function I(){let F=q().find(K=>K.getAttribute("aria-disabled")!=="true"),X=F==null?void 0:F.getAttribute(Bc);P.setState("value",X||void 0)}function k(){var F,X,K,G;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Q=0;for(let J of r.current){let re=(X=(F=a.current.get(J))==null?void 0:F.value)!=null?X:"",ne=(G=(K=a.current.get(J))==null?void 0:K.keywords)!=null?G:[],fe=R(re,ne);n.current.filtered.items.set(J,fe),fe>0&&Q++}for(let[J,re]of i.current)for(let ne of re)if(n.current.filtered.items.get(ne)>0){n.current.filtered.groups.add(J);break}n.current.filtered.count=Q}function V(){var F,X,K;let G=D();G&&(((F=G.parentElement)==null?void 0:F.firstChild)===G&&((K=(X=G.closest(Lh))==null?void 0:X.querySelector(ohe))==null||K.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function D(){var F;return(F=C.current)==null?void 0:F.querySelector(`${_W}[aria-selected="true"]`)}function q(){var F;return Array.from(((F=C.current)==null?void 0:F.querySelectorAll(tB))||[])}function L(F){let X=q()[F];X&&P.setState("value",X.getAttribute(Bc))}function z(F){var X;let K=D(),G=q(),Q=G.findIndex(re=>re===K),J=G[Q+F];(X=l.current)!=null&&X.loop&&(J=Q+F<0?G[G.length-1]:Q+F===G.length?G[0]:G[Q+F]),J&&P.setState("value",J.getAttribute(Bc))}function H(F){let X=D(),K=X==null?void 0:X.closest(Lh),G;for(;K&&!G;)K=F>0?ghe(K,Lh):vhe(K,Lh),G=K==null?void 0:K.querySelector(tB);G?P.setState("value",G.getAttribute(Bc)):z(F)}let Y=()=>L(q().length-1),Z=F=>{F.preventDefault(),F.metaKey?Y():F.altKey?H(1):z(1)},U=F=>{F.preventDefault(),F.metaKey?L(0):F.altKey?H(-1):z(-1)};return j.createElement(Js.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:F=>{var X;(X=S.onKeyDown)==null||X.call(S,F);let K=F.nativeEvent.isComposing||F.keyCode===229;if(!(F.defaultPrevented||K))switch(F.key){case"n":case"j":{y&&F.ctrlKey&&Z(F);break}case"ArrowDown":{Z(F);break}case"p":case"k":{y&&F.ctrlKey&&U(F);break}case"ArrowUp":{U(F);break}case"Home":{F.preventDefault(),L(0);break}case"End":{F.preventDefault(),Y();break}case"Enter":{F.preventDefault();let G=D();if(G){let Q=new Event(xN);G.dispatchEvent(Q)}}}}},j.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:xhe},u),Y0(e,F=>j.createElement(AW.Provider,{value:P},j.createElement(EW.Provider,{value:M},F))))}),lhe=j.forwardRef((e,t)=>{var n,r;let i=or(),a=j.useRef(null),o=j.useContext(CW),l=Bm(),u=OW(e),f=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;vu(()=>{if(!f)return l.item(i,o==null?void 0:o.id)},[f]);let d=jW(i,a,[e.value,e.children,a],e.keywords),h=ER(),m=Ks(O=>O.value&&O.value===d.current),g=Ks(O=>f||l.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);j.useEffect(()=>{let O=a.current;if(!(!O||e.disabled))return O.addEventListener(xN,x),()=>O.removeEventListener(xN,x)},[g,e.onSelect,e.disabled]);function x(){var O,P;w(),(P=(O=u.current).onSelect)==null||P.call(O,d.current)}function w(){h.setState("value",d.current,!0)}if(!g)return null;let{disabled:y,value:S,onSelect:E,forceMount:_,keywords:A,...C}=e;return j.createElement(Js.div,{ref:Vs(a,t),...C,id:i,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!m,"data-disabled":!!y,"data-selected":!!m,onPointerMove:y||l.getDisablePointerSelection()?void 0:w,onClick:y?void 0:x},e.children)}),uhe=j.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=or(),l=j.useRef(null),u=j.useRef(null),f=or(),d=Bm(),h=Ks(g=>i||d.filter()===!1?!0:g.search?g.filtered.groups.has(o):!0);vu(()=>d.group(o),[]),jW(o,l,[e.value,e.heading,u]);let m=j.useMemo(()=>({id:o,forceMount:i}),[i]);return j.createElement(Js.div,{ref:Vs(l,t),...a,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&j.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),Y0(e,g=>j.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},j.createElement(CW.Provider,{value:m},g))))}),che=j.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=j.useRef(null),a=Ks(o=>!o.search);return!n&&!a?null:j.createElement(Js.div,{ref:Vs(i,t),...r,"cmdk-separator":"",role:"separator"})}),fhe=j.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=ER(),o=Ks(f=>f.search),l=Ks(f=>f.selectedItemId),u=Bm();return j.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),j.createElement(Js.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:i?e.value:o,onChange:f=>{i||a.setState("search",f.target.value),n==null||n(f.target.value)}})}),dhe=j.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=j.useRef(null),o=j.useRef(null),l=Ks(f=>f.selectedItemId),u=Bm();return j.useEffect(()=>{if(o.current&&a.current){let f=o.current,d=a.current,h,m=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let g=f.offsetHeight;d.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return m.observe(f),()=>{cancelAnimationFrame(h),m.unobserve(f)}}},[]),j.createElement(Js.div,{ref:Vs(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:u.listId},Y0(e,f=>j.createElement("div",{ref:Vs(o,u.listInnerRef),"cmdk-list-sizer":""},f)))}),hhe=j.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...l}=e;return j.createElement(vW,{open:n,onOpenChange:r},j.createElement(yW,{container:o},j.createElement(SR,{"cmdk-overlay":"",className:i}),j.createElement(_R,{"aria-label":e.label,"cmdk-dialog":"",className:a},j.createElement(TW,{ref:t,...l}))))}),phe=j.forwardRef((e,t)=>Ks(n=>n.filtered.count===0)?j.createElement(Js.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),mhe=j.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return j.createElement(Js.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Y0(e,o=>j.createElement("div",{"aria-hidden":!0},o)))}),Ar=Object.assign(TW,{List:dhe,Item:lhe,Input:fhe,Group:uhe,Separator:che,Dialog:hhe,Empty:phe,Loading:mhe});function ghe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function vhe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function OW(e){let t=j.useRef(e);return vu(()=>{t.current=e}),t}var vu=typeof window>"u"?j.useEffect:j.useLayoutEffect;function qc(e){let t=j.useRef();return t.current===void 0&&(t.current=e()),t}function Ks(e){let t=ER(),n=()=>e(t.snapshot());return j.useSyncExternalStore(t.subscribe,n,n)}function jW(e,t,n,r=[]){let i=j.useRef(),a=Bm();return vu(()=>{var o;let l=(()=>{var f;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(f=d.current.textContent)==null?void 0:f.trim():i.current}})(),u=r.map(f=>f.trim());a.value(e,l,u),(o=t.current)==null||o.setAttribute(Bc,l),i.current=l}),i}var yhe=()=>{let[e,t]=j.useState(),n=qc(()=>new Map);return vu(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function bhe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Y0({asChild:e,children:t},n){return e&&j.isValidElement(t)?j.cloneElement(bhe(t),{ref:t.ref},n(t.props.children)):n(t)}var xhe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const whe=vW,She=yW,NW=j.forwardRef(({className:e,...t},n)=>b.jsx(SR,{ref:n,className:Te("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));NW.displayName=SR.displayName;const PW=j.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(She,{children:[b.jsx(NW,{}),b.jsxs(_R,{ref:r,className:Te("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%]",e),...n,children:[t,b.jsxs(Xde,{className:"absolute right-4 top-4 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:[b.jsx(tb,{className:"h-4 w-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));PW.displayName=_R.displayName;const _he=j.forwardRef(({className:e,...t},n)=>b.jsx(bW,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));_he.displayName=bW.displayName;const Ehe=j.forwardRef(({className:e,...t},n)=>b.jsx(xW,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Ehe.displayName=xW.displayName;const MW=j.forwardRef(({className:e,...t},n)=>b.jsx(Ar,{ref:n,className:Te("flex h-full w-full flex-col overflow-hidden bg-[hsl(0,0%,100%)] dark:bg-[hsl(0,0%,3%)] text-popover-foreground",e),...t}));MW.displayName=Ar.displayName;const Ahe=({children:e,...t})=>b.jsx(whe,{...t,children:b.jsx(PW,{className:"overflow-hidden p-0 rounded-none bg-[hsl(0,0%,100%)] dark:bg-[hsl(0,0%,3%)] border border-border shadow-2xl backdrop-blur-sm",children:b.jsx(MW,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),RW=j.forwardRef(({className:e,...t},n)=>b.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[b.jsx(Pp,{className:"mr-2 h-4 w-4 shrink-0 text-foreground/60"}),b.jsx(Ar.Input,{ref:n,className:Te("flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));RW.displayName=Ar.Input.displayName;const kW=j.forwardRef(({className:e,...t},n)=>b.jsx(Ar.List,{ref:n,className:Te("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));kW.displayName=Ar.List.displayName;const DW=j.forwardRef((e,t)=>b.jsx(Ar.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));DW.displayName=Ar.Empty.displayName;const kl=j.forwardRef(({className:e,...t},n)=>b.jsx(Ar.Group,{ref:n,className:Te("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));kl.displayName=Ar.Group.displayName;const IW=j.forwardRef(({className:e,...t},n)=>b.jsx(Ar.Separator,{ref:n,className:Te("-mx-1 h-px bg-border",e),...t}));IW.displayName=Ar.Separator.displayName;const ls=j.forwardRef(({className:e,...t},n)=>b.jsx(Ar.Item,{ref:n,className:Te("relative flex cursor-default gap-2 select-none items-center px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-[hsl(0,0%,93%)] data-[selected=true]:text-foreground dark:data-[selected=true]:bg-[hsl(0,0%,12%)] dark:data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));ls.displayName=Ar.Item.displayName;const nB=[{id:"runs",label:"Runs",path:"/",icon:b.jsx(mu,{className:"h-4 w-4"}),keywords:["runs","jobs","all"]},{id:"metrics",label:"Metrics",path:"/metrics",icon:b.jsx(f7,{className:"h-4 w-4"}),keywords:["metrics","stats","analytics","dashboard"]},{id:"schedulers",label:"Schedulers",path:"/schedulers",icon:b.jsx(Tce,{className:"h-4 w-4"}),keywords:["schedulers","scheduled","cron","repeatable","delayed"]},{id:"flows",label:"Flows",path:"/flows",icon:b.jsx(gd,{className:"h-4 w-4"}),keywords:["flows","workflows","graph"]},{id:"test",label:"Test",path:"/test",icon:b.jsx(oR,{className:"h-4 w-4"}),keywords:["test","testing","try"]}];function Che({open:e,onOpenChange:t,queues:n,searchQuery:r,onSearchQueryChange:i,isDark:a,onToggleTheme:o,onSelectQueue:l,onSelectJob:u,onNavigate:f}){const{data:d}=$m(),[h,m]=j.useState(r),g=(d==null?void 0:d.tags)??[];j.useEffect(()=>{e&&m(r)},[e,r]);const x=k=>{m(k),i(k)};j.useMemo(()=>gR(h),[h]);const{currentToken:w,tokenType:y,tokenPrefix:S}=j.useMemo(()=>{const k=h.length,V=h.slice(0,k),D=V.lastIndexOf(" "),q=V.slice(D+1),L=q.indexOf(":");if(L>0){const z=q.slice(0,L),H=q.slice(L+1);return{currentToken:q,tokenType:"value",tokenPrefix:{key:z,valuePrefix:H}}}return{currentToken:q,tokenType:"key",tokenPrefix:null}},[h]),E=y==="value"?S==null?void 0:S.key:void 0,{data:_}=q7(E??"",!!E&&g.includes(E??"")),A=(_==null?void 0:_.values)??[],{data:C,isLoading:O}=Afe(h),P=(C==null?void 0:C.results)??[],M=j.useMemo(()=>{if(!h.trim())return nB;const k=h.toLowerCase();return nB.filter(V=>V.label.toLowerCase().includes(k)||V.keywords.some(D=>D.toLowerCase().includes(k)))},[h]),R=j.useMemo(()=>{if(!h.trim())return n;const k=h.toLowerCase();return n.filter(V=>V.toLowerCase().includes(k))},[h,n]),$=j.useMemo(()=>y!=="key"||!w?[]:g.filter(k=>k.toLowerCase().startsWith(w.toLowerCase())),[y,w,g]),I=j.useMemo(()=>{if(y!=="value"||!S)return[];const k=S.valuePrefix.toLowerCase();return A.filter(V=>V.value.toLowerCase().startsWith(k)).slice(0,10)},[y,S,A]);return M.length>0||R.length>0||P.length>0||$.length>0||I.length>0,b.jsxs(Ahe,{open:e,onOpenChange:t,children:[b.jsx(RW,{placeholder:"Search jobs, queues, tags, or navigate...",value:h,onValueChange:x}),b.jsxs(kW,{children:[b.jsx(DW,{children:O?"Searching...":"No results found."}),$.length>0&&b.jsx(kl,{heading:"Tag Fields",children:$.map(k=>b.jsxs(ls,{value:`tag-key-${k}`,onSelect:()=>{const V=h.replace(w,`${k}:`);x(V)},children:[b.jsx(Pp,{className:"mr-2 h-4 w-4"}),b.jsxs("span",{className:"font-mono",children:[k,":"]}),b.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"tag field"})]},k))}),I.length>0&&b.jsx(kl,{heading:`${S==null?void 0:S.key} values`,children:I.map(k=>{const V=`${S==null?void 0:S.key}:${k.value}`;return b.jsxs(ls,{value:`tag-value-${k.value}`,onSelect:()=>{const q=`${h.slice(0,h.lastIndexOf(w))}${V} `.trim();x(q)},children:[b.jsx(Pp,{className:"mr-2 h-4 w-4"}),b.jsx("span",{className:"font-mono",children:V}),k.count>0&&b.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:[k.count," jobs"]})]},k.value)})}),M.length>0&&b.jsx(kl,{heading:"Navigation",children:M.map(k=>b.jsxs(ls,{value:`nav-${k.id}`,onSelect:()=>{f(k.path),t(!1)},children:[k.icon,b.jsx("span",{children:k.label}),b.jsx(Ace,{className:"ml-auto h-4 w-4 text-muted-foreground"})]},k.id))}),R.length>0&&b.jsx(kl,{heading:"Queues",children:R.map(k=>b.jsxs(ls,{value:`queue-${k}`,onSelect:()=>{l(k),t(!1)},children:[b.jsx(sR,{className:"mr-2 h-4 w-4"}),b.jsx("span",{className:"font-mono",children:k})]},k))}),P.length>0&&b.jsx(kl,{heading:`Jobs (${P.length})`,children:P.map(k=>b.jsxs(ls,{value:`job-${k.job.id}`,onSelect:()=>{u(k.queue,k.job.id),t(!1)},children:[b.jsx(mu,{className:"mr-2 h-4 w-4"}),b.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"font-medium",children:k.job.name}),b.jsx("span",{className:"text-xs text-muted-foreground",children:i7(k.job.timestamp)})]}),b.jsxs("span",{className:"truncate font-mono text-xs text-muted-foreground",children:[Ky(k.job.id,30)," · ",k.queue]})]}),b.jsx(The,{status:k.job.status})]},`${k.queue}-${k.job.id}`))}),!h.trim()&&b.jsxs(b.Fragment,{children:[b.jsx(IW,{}),b.jsxs(kl,{heading:"Actions",children:[b.jsxs(ls,{value:"refresh",onSelect:()=>{window.location.reload()},children:[b.jsx(q0,{className:"mr-2 h-4 w-4"}),b.jsx("span",{children:"Refresh"}),b.jsxs("kbd",{className:"ml-auto pointer-events-none flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[b.jsx("span",{className:"text-xs",children:"⌘"}),"R"]})]}),b.jsxs(ls,{value:"theme",onSelect:()=>{o()},children:[a?b.jsx(m7,{className:"mr-2 h-4 w-4"}):b.jsx(h7,{className:"mr-2 h-4 w-4"}),b.jsx("span",{children:"Toggle Theme"}),b.jsxs("kbd",{className:"ml-auto pointer-events-none flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[b.jsx("span",{className:"text-xs",children:"⌘"}),"⇧T"]})]})]})]})]})]})}function The({status:e}){const t={active:"bg-warning",waiting:"bg-muted-foreground","waiting-children":"bg-muted-foreground",prioritized:"bg-muted-foreground",completed:"bg-success",failed:"bg-destructive",delayed:"bg-muted-foreground"};return b.jsx("span",{className:`h-2 w-2 rounded-full ${t[e]||"bg-muted-foreground"}`})}const LW=j.forwardRef(({className:e,type:t,...n},r)=>b.jsx("input",{type:t,className:Te("flex h-9 w-full border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));LW.displayName="Input";function Ohe({value:e,onValueChange:t,onFocus:n,placeholder:r="Search anything...",className:i}){const a=j.useRef(null),o=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),n==null||n())};return b.jsxs("div",{className:Te("relative flex items-center",i),children:[b.jsx(Pp,{className:"absolute left-2 h-4 w-4 text-foreground/60 pointer-events-none"}),b.jsx(LW,{ref:a,type:"text",value:e,onChange:l=>t(l.target.value),onFocus:n,onKeyDown:o,placeholder:r,className:"h-8 w-64 pl-8 pr-20 text-[10px] bg-transparent border-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 rounded-none !text-foreground placeholder:text-foreground/30"}),b.jsxs("kbd",{className:"absolute right-2 hidden h-5 items-center gap-1 rounded-none border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100 sm:flex pointer-events-none",children:[b.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]})}function yn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=yn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var jhe={value:()=>{}};function X0(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new _y(n)}function _y(e){this._=e}function Nhe(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}_y.prototype=X0.prototype={constructor:_y,on:function(e,t){var n=this._,r=Nhe(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Phe(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=rB(n[i],e.name,t);else if(t==null)for(i in n)n[i]=rB(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new _y(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Phe(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function rB(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=jhe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var wN="http://www.w3.org/1999/xhtml";const iB={svg:"http://www.w3.org/2000/svg",xhtml:wN,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Z0(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),iB.hasOwnProperty(t)?{space:iB[t],local:e}:e}function Mhe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===wN&&t.documentElement.namespaceURI===wN?t.createElement(e):t.createElementNS(n,e)}}function Rhe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function $W(e){var t=Z0(e);return(t.local?Rhe:Mhe)(t)}function khe(){}function AR(e){return e==null?khe:function(){return this.querySelector(e)}}function Dhe(e){typeof e!="function"&&(e=AR(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=new Array(o),u,f,d=0;d<o;++d)(u=a[d])&&(f=e.call(u,u.__data__,d,a))&&("__data__"in u&&(f.__data__=u.__data__),l[d]=f);return new Fr(r,this._parents)}function Ihe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Lhe(){return[]}function BW(e){return e==null?Lhe:function(){return this.querySelectorAll(e)}}function $he(e){return function(){return Ihe(e.apply(this,arguments))}}function Bhe(e){typeof e=="function"?e=$he(e):e=BW(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],l=o.length,u,f=0;f<l;++f)(u=o[f])&&(r.push(e.call(u,u.__data__,f,o)),i.push(u));return new Fr(r,i)}function qW(e){return function(){return this.matches(e)}}function zW(e){return function(t){return t.matches(e)}}var qhe=Array.prototype.find;function zhe(e){return function(){return qhe.call(this.children,e)}}function Vhe(){return this.firstElementChild}function Fhe(e){return this.select(e==null?Vhe:zhe(typeof e=="function"?e:zW(e)))}var Uhe=Array.prototype.filter;function Hhe(){return Array.from(this.children)}function Ghe(e){return function(){return Uhe.call(this.children,e)}}function Whe(e){return this.selectAll(e==null?Hhe:Ghe(typeof e=="function"?e:zW(e)))}function Khe(e){typeof e!="function"&&(e=qW(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],u,f=0;f<o;++f)(u=a[f])&&e.call(u,u.__data__,f,a)&&l.push(u);return new Fr(r,this._parents)}function VW(e){return new Array(e.length)}function Yhe(){return new Fr(this._enter||this._groups.map(VW),this._parents)}function lb(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}lb.prototype={constructor:lb,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Xhe(e){return function(){return e}}function Zhe(e,t,n,r,i,a){for(var o=0,l,u=t.length,f=a.length;o<f;++o)(l=t[o])?(l.__data__=a[o],r[o]=l):n[o]=new lb(e,a[o]);for(;o<u;++o)(l=t[o])&&(i[o]=l)}function Qhe(e,t,n,r,i,a,o){var l,u,f=new Map,d=t.length,h=a.length,m=new Array(d),g;for(l=0;l<d;++l)(u=t[l])&&(m[l]=g=o.call(u,u.__data__,l,t)+"",f.has(g)?i[l]=u:f.set(g,u));for(l=0;l<h;++l)g=o.call(e,a[l],l,a)+"",(u=f.get(g))?(r[l]=u,u.__data__=a[l],f.delete(g)):n[l]=new lb(e,a[l]);for(l=0;l<d;++l)(u=t[l])&&f.get(m[l])===u&&(i[l]=u)}function Jhe(e){return e.__data__}function epe(e,t){if(!arguments.length)return Array.from(this,Jhe);var n=t?Qhe:Zhe,r=this._parents,i=this._groups;typeof e!="function"&&(e=Xhe(e));for(var a=i.length,o=new Array(a),l=new Array(a),u=new Array(a),f=0;f<a;++f){var d=r[f],h=i[f],m=h.length,g=tpe(e.call(d,d&&d.__data__,f,r)),x=g.length,w=l[f]=new Array(x),y=o[f]=new Array(x),S=u[f]=new Array(m);n(d,h,w,y,S,g,t);for(var E=0,_=0,A,C;E<x;++E)if(A=w[E]){for(E>=_&&(_=E+1);!(C=y[_])&&++_<x;);A._next=C||null}}return o=new Fr(o,r),o._enter=l,o._exit=u,o}function tpe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function npe(){return new Fr(this._exit||this._groups.map(VW),this._parents)}function rpe(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function ipe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),l=new Array(i),u=0;u<o;++u)for(var f=n[u],d=r[u],h=f.length,m=l[u]=new Array(h),g,x=0;x<h;++x)(g=f[x]||d[x])&&(m[x]=g);for(;u<i;++u)l[u]=n[u];return new Fr(l,this._parents)}function ape(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function ope(e){e||(e=spe);function t(h,m){return h&&m?e(h.__data__,m.__data__):!h-!m}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],l=o.length,u=i[a]=new Array(l),f,d=0;d<l;++d)(f=o[d])&&(u[d]=f);u.sort(t)}return new Fr(i,this._parents).order()}function spe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function lpe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function upe(){return Array.from(this)}function cpe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function fpe(){let e=0;for(const t of this)++e;return e}function dpe(){return!this.node()}function hpe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,l;a<o;++a)(l=i[a])&&e.call(l,l.__data__,a,i);return this}function ppe(e){return function(){this.removeAttribute(e)}}function mpe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function gpe(e,t){return function(){this.setAttribute(e,t)}}function vpe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ype(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function bpe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function xpe(e,t){var n=Z0(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?mpe:ppe:typeof t=="function"?n.local?bpe:ype:n.local?vpe:gpe)(n,t))}function FW(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function wpe(e){return function(){this.style.removeProperty(e)}}function Spe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function _pe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Epe(e,t,n){return arguments.length>1?this.each((t==null?wpe:typeof t=="function"?_pe:Spe)(e,t,n??"")):Nf(this.node(),e)}function Nf(e,t){return e.style.getPropertyValue(t)||FW(e).getComputedStyle(e,null).getPropertyValue(t)}function Ape(e){return function(){delete this[e]}}function Cpe(e,t){return function(){this[e]=t}}function Tpe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ope(e,t){return arguments.length>1?this.each((t==null?Ape:typeof t=="function"?Tpe:Cpe)(e,t)):this.node()[e]}function UW(e){return e.trim().split(/^|\s+/)}function CR(e){return e.classList||new HW(e)}function HW(e){this._node=e,this._names=UW(e.getAttribute("class")||"")}HW.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function GW(e,t){for(var n=CR(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function WW(e,t){for(var n=CR(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function jpe(e){return function(){GW(this,e)}}function Npe(e){return function(){WW(this,e)}}function Ppe(e,t){return function(){(t.apply(this,arguments)?GW:WW)(this,e)}}function Mpe(e,t){var n=UW(e+"");if(arguments.length<2){for(var r=CR(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Ppe:t?jpe:Npe)(n,t))}function Rpe(){this.textContent=""}function kpe(e){return function(){this.textContent=e}}function Dpe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ipe(e){return arguments.length?this.each(e==null?Rpe:(typeof e=="function"?Dpe:kpe)(e)):this.node().textContent}function Lpe(){this.innerHTML=""}function $pe(e){return function(){this.innerHTML=e}}function Bpe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function qpe(e){return arguments.length?this.each(e==null?Lpe:(typeof e=="function"?Bpe:$pe)(e)):this.node().innerHTML}function zpe(){this.nextSibling&&this.parentNode.appendChild(this)}function Vpe(){return this.each(zpe)}function Fpe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Upe(){return this.each(Fpe)}function Hpe(e){var t=typeof e=="function"?e:$W(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Gpe(){return null}function Wpe(e,t){var n=typeof e=="function"?e:$W(e),r=t==null?Gpe:typeof t=="function"?t:AR(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Kpe(){var e=this.parentNode;e&&e.removeChild(this)}function Ype(){return this.each(Kpe)}function Xpe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Zpe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Qpe(e){return this.select(e?Zpe:Xpe)}function Jpe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function eme(e){return function(t){e.call(this,t,this.__data__)}}function tme(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function nme(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function rme(e,t,n){return function(){var r=this.__on,i,a=eme(t);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function ime(e,t,n){var r=tme(e+""),i,a=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,f=l.length,d;u<f;++u)for(i=0,d=l[u];i<a;++i)if((o=r[i]).type===d.type&&o.name===d.name)return d.value}return}for(l=t?rme:nme,i=0;i<a;++i)this.each(l(r[i],t,n));return this}function KW(e,t,n){var r=FW(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function ame(e,t){return function(){return KW(this,e,t)}}function ome(e,t){return function(){return KW(this,e,t.apply(this,arguments))}}function sme(e,t){return this.each((typeof t=="function"?ome:ame)(e,t))}function*lme(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var YW=[null];function Fr(e,t){this._groups=e,this._parents=t}function qm(){return new Fr([[document.documentElement]],YW)}function ume(){return this}Fr.prototype=qm.prototype={constructor:Fr,select:Dhe,selectAll:Bhe,selectChild:Fhe,selectChildren:Whe,filter:Khe,data:epe,enter:Yhe,exit:npe,join:rpe,merge:ipe,selection:ume,order:ape,sort:ope,call:lpe,nodes:upe,node:cpe,size:fpe,empty:dpe,each:hpe,attr:xpe,style:Epe,property:Ope,classed:Mpe,text:Ipe,html:qpe,raise:Vpe,lower:Upe,append:Hpe,insert:Wpe,remove:Ype,clone:Qpe,datum:Jpe,on:ime,dispatch:sme,[Symbol.iterator]:lme};function $r(e){return typeof e=="string"?new Fr([[document.querySelector(e)]],[document.documentElement]):new Fr([[e]],YW)}function cme(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ti(e,t){if(e=cme(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const fme={passive:!1},Mp={capture:!0,passive:!1};function n_(e){e.stopImmediatePropagation()}function tf(e){e.preventDefault(),e.stopImmediatePropagation()}function XW(e){var t=e.document.documentElement,n=$r(e).on("dragstart.drag",tf,Mp);"onselectstart"in t?n.on("selectstart.drag",tf,Mp):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ZW(e,t){var n=e.document.documentElement,r=$r(e).on("dragstart.drag",null);t&&(r.on("click.drag",tf,Mp),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Vv=e=>()=>e;function SN(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:l,dx:u,dy:f,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:d}})}SN.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function dme(e){return!e.ctrlKey&&!e.button}function hme(){return this.parentNode}function pme(e,t){return t??{x:e.x,y:e.y}}function mme(){return navigator.maxTouchPoints||"ontouchstart"in this}function QW(){var e=dme,t=hme,n=pme,r=mme,i={},a=X0("start","drag","end"),o=0,l,u,f,d,h=0;function m(A){A.on("mousedown.drag",g).filter(r).on("touchstart.drag",y).on("touchmove.drag",S,fme).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(A,C){if(!(d||!e.call(this,A,C))){var O=_(this,t.call(this,A,C),A,C,"mouse");O&&($r(A.view).on("mousemove.drag",x,Mp).on("mouseup.drag",w,Mp),XW(A.view),n_(A),f=!1,l=A.clientX,u=A.clientY,O("start",A))}}function x(A){if(tf(A),!f){var C=A.clientX-l,O=A.clientY-u;f=C*C+O*O>h}i.mouse("drag",A)}function w(A){$r(A.view).on("mousemove.drag mouseup.drag",null),ZW(A.view,f),tf(A),i.mouse("end",A)}function y(A,C){if(e.call(this,A,C)){var O=A.changedTouches,P=t.call(this,A,C),M=O.length,R,$;for(R=0;R<M;++R)($=_(this,P,A,C,O[R].identifier,O[R]))&&(n_(A),$("start",A,O[R]))}}function S(A){var C=A.changedTouches,O=C.length,P,M;for(P=0;P<O;++P)(M=i[C[P].identifier])&&(tf(A),M("drag",A,C[P]))}function E(A){var C=A.changedTouches,O=C.length,P,M;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),P=0;P<O;++P)(M=i[C[P].identifier])&&(n_(A),M("end",A,C[P]))}function _(A,C,O,P,M,R){var $=a.copy(),I=Ti(R||O,C),k,V,D;if((D=n.call(A,new SN("beforestart",{sourceEvent:O,target:m,identifier:M,active:o,x:I[0],y:I[1],dx:0,dy:0,dispatch:$}),P))!=null)return k=D.x-I[0]||0,V=D.y-I[1]||0,function q(L,z,H){var Y=I,Z;switch(L){case"start":i[M]=q,Z=o++;break;case"end":delete i[M],--o;case"drag":I=Ti(H||z,C),Z=o;break}$.call(L,A,new SN(L,{sourceEvent:z,subject:D,target:m,identifier:M,active:Z,x:I[0]+k,y:I[1]+V,dx:I[0]-Y[0],dy:I[1]-Y[1],dispatch:$}),P)}}return m.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Vv(!!A),m):e},m.container=function(A){return arguments.length?(t=typeof A=="function"?A:Vv(A),m):t},m.subject=function(A){return arguments.length?(n=typeof A=="function"?A:Vv(A),m):n},m.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Vv(!!A),m):r},m.on=function(){var A=a.on.apply(a,arguments);return A===a?m:A},m.clickDistance=function(A){return arguments.length?(h=(A=+A)*A,m):Math.sqrt(h)},m}function TR(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function JW(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zm(){}var Rp=.7,ub=1/Rp,nf="\\s*([+-]?\\d+)\\s*",kp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",gme=/^#([0-9a-f]{3,8})$/,vme=new RegExp(`^rgb\\(${nf},${nf},${nf}\\)$`),yme=new RegExp(`^rgb\\(${ca},${ca},${ca}\\)$`),bme=new RegExp(`^rgba\\(${nf},${nf},${nf},${kp}\\)$`),xme=new RegExp(`^rgba\\(${ca},${ca},${ca},${kp}\\)$`),wme=new RegExp(`^hsl\\(${kp},${ca},${ca}\\)$`),Sme=new RegExp(`^hsla\\(${kp},${ca},${ca},${kp}\\)$`),aB={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};TR(zm,yu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:oB,formatHex:oB,formatHex8:_me,formatHsl:Eme,formatRgb:sB,toString:sB});function oB(){return this.rgb().formatHex()}function _me(){return this.rgb().formatHex8()}function Eme(){return eK(this).formatHsl()}function sB(){return this.rgb().formatRgb()}function yu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=gme.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?lB(t):n===3?new xr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Fv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Fv(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=vme.exec(e))?new xr(t[1],t[2],t[3],1):(t=yme.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=bme.exec(e))?Fv(t[1],t[2],t[3],t[4]):(t=xme.exec(e))?Fv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=wme.exec(e))?fB(t[1],t[2]/100,t[3]/100,1):(t=Sme.exec(e))?fB(t[1],t[2]/100,t[3]/100,t[4]):aB.hasOwnProperty(e)?lB(aB[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function lB(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function Fv(e,t,n,r){return r<=0&&(e=t=n=NaN),new xr(e,t,n,r)}function Ame(e){return e instanceof zm||(e=yu(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function _N(e,t,n,r){return arguments.length===1?Ame(e):new xr(e,t,n,r??1)}function xr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}TR(xr,_N,JW(zm,{brighter(e){return e=e==null?ub:Math.pow(ub,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rp:Math.pow(Rp,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(su(this.r),su(this.g),su(this.b),cb(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:uB,formatHex:uB,formatHex8:Cme,formatRgb:cB,toString:cB}));function uB(){return`#${Vl(this.r)}${Vl(this.g)}${Vl(this.b)}`}function Cme(){return`#${Vl(this.r)}${Vl(this.g)}${Vl(this.b)}${Vl((isNaN(this.opacity)?1:this.opacity)*255)}`}function cB(){const e=cb(this.opacity);return`${e===1?"rgb(":"rgba("}${su(this.r)}, ${su(this.g)}, ${su(this.b)}${e===1?")":`, ${e})`}`}function cb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function su(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Vl(e){return e=su(e),(e<16?"0":"")+e.toString(16)}function fB(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Pi(e,t,n,r)}function eK(e){if(e instanceof Pi)return new Pi(e.h,e.s,e.l,e.opacity);if(e instanceof zm||(e=yu(e)),!e)return new Pi;if(e instanceof Pi)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,u=(a+i)/2;return l?(t===a?o=(n-r)/l+(n<r)*6:n===a?o=(r-t)/l+2:o=(t-n)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new Pi(o,l,u,e.opacity)}function Tme(e,t,n,r){return arguments.length===1?eK(e):new Pi(e,t,n,r??1)}function Pi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}TR(Pi,Tme,JW(zm,{brighter(e){return e=e==null?ub:Math.pow(ub,e),new Pi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rp:Math.pow(Rp,e),new Pi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new xr(r_(e>=240?e-240:e+120,i,r),r_(e,i,r),r_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Pi(dB(this.h),Uv(this.s),Uv(this.l),cb(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=cb(this.opacity);return`${e===1?"hsl(":"hsla("}${dB(this.h)}, ${Uv(this.s)*100}%, ${Uv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dB(e){return e=(e||0)%360,e<0?e+360:e}function Uv(e){return Math.max(0,Math.min(1,e||0))}function r_(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 OR=e=>()=>e;function Ome(e,t){return function(n){return e+n*t}}function jme(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 Nme(e){return(e=+e)==1?tK:function(t,n){return n-t?jme(t,n,e):OR(isNaN(t)?n:t)}}function tK(e,t){var n=t-e;return n?Ome(e,n):OR(isNaN(e)?t:e)}const fb=(function e(t){var n=Nme(t);function r(i,a){var o=n((i=_N(i)).r,(a=_N(a)).r),l=n(i.g,a.g),u=n(i.b,a.b),f=tK(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=l(d),i.b=u(d),i.opacity=f(d),i+""}}return r.gamma=e,r})(1);function Pme(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Mme(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Rme(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=ao(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(l){for(o=0;o<r;++o)a[o]=i[o](l);return a}}function kme(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ni(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Dme(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ao(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var EN=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,i_=new RegExp(EN.source,"g");function Ime(e){return function(){return e}}function Lme(e){return function(t){return e(t)+""}}function nK(e,t){var n=EN.lastIndex=i_.lastIndex=0,r,i,a,o=-1,l=[],u=[];for(e=e+"",t=t+"";(r=EN.exec(e))&&(i=i_.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:Ni(r,i)})),n=i_.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?u[0]?Lme(u[0].x):Ime(t):(t=u.length,function(f){for(var d=0,h;d<t;++d)l[(h=u[d]).i]=h.x(f);return l.join("")})}function ao(e,t){var n=typeof t,r;return t==null||n==="boolean"?OR(t):(n==="number"?Ni:n==="string"?(r=yu(t))?(t=r,fb):nK:t instanceof yu?fb:t instanceof Date?kme:Mme(t)?Pme:Array.isArray(t)?Rme:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Dme:Ni)(e,t)}function jR(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var hB=180/Math.PI,AN={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function rK(e,t,n,r,i,a){var o,l,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),e*r<t*n&&(e=-e,t=-t,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*hB,skewX:Math.atan(u)*hB,scaleX:o,scaleY:l}}var Hv;function $me(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?AN:rK(t.a,t.b,t.c,t.d,t.e,t.f)}function Bme(e){return e==null||(Hv||(Hv=document.createElementNS("http://www.w3.org/2000/svg","g")),Hv.setAttribute("transform",e),!(e=Hv.transform.baseVal.consolidate()))?AN:(e=e.matrix,rK(e.a,e.b,e.c,e.d,e.e,e.f))}function iK(e,t,n,r){function i(f){return f.length?f.pop()+" ":""}function a(f,d,h,m,g,x){if(f!==h||d!==m){var w=g.push("translate(",null,t,null,n);x.push({i:w-4,x:Ni(f,h)},{i:w-2,x:Ni(d,m)})}else(h||m)&&g.push("translate("+h+t+m+n)}function o(f,d,h,m){f!==d?(f-d>180?d+=360:d-f>180&&(f+=360),m.push({i:h.push(i(h)+"rotate(",null,r)-2,x:Ni(f,d)})):d&&h.push(i(h)+"rotate("+d+r)}function l(f,d,h,m){f!==d?m.push({i:h.push(i(h)+"skewX(",null,r)-2,x:Ni(f,d)}):d&&h.push(i(h)+"skewX("+d+r)}function u(f,d,h,m,g,x){if(f!==h||d!==m){var w=g.push(i(g)+"scale(",null,",",null,")");x.push({i:w-4,x:Ni(f,h)},{i:w-2,x:Ni(d,m)})}else(h!==1||m!==1)&&g.push(i(g)+"scale("+h+","+m+")")}return function(f,d){var h=[],m=[];return f=e(f),d=e(d),a(f.translateX,f.translateY,d.translateX,d.translateY,h,m),o(f.rotate,d.rotate,h,m),l(f.skewX,d.skewX,h,m),u(f.scaleX,f.scaleY,d.scaleX,d.scaleY,h,m),f=d=null,function(g){for(var x=-1,w=m.length,y;++x<w;)h[(y=m[x]).i]=y.x(g);return h.join("")}}}var qme=iK($me,"px, ","px)","deg)"),zme=iK(Bme,", ",")",")"),Vme=1e-12;function pB(e){return((e=Math.exp(e))+1/e)/2}function Fme(e){return((e=Math.exp(e))-1/e)/2}function Ume(e){return((e=Math.exp(2*e))-1)/(e+1)}const Ey=(function e(t,n,r){function i(a,o){var l=a[0],u=a[1],f=a[2],d=o[0],h=o[1],m=o[2],g=d-l,x=h-u,w=g*g+x*x,y,S;if(w<Vme)S=Math.log(m/f)/t,y=function(P){return[l+P*g,u+P*x,f*Math.exp(t*P*S)]};else{var E=Math.sqrt(w),_=(m*m-f*f+r*w)/(2*f*n*E),A=(m*m-f*f-r*w)/(2*m*n*E),C=Math.log(Math.sqrt(_*_+1)-_),O=Math.log(Math.sqrt(A*A+1)-A);S=(O-C)/t,y=function(P){var M=P*S,R=pB(C),$=f/(n*E)*(R*Ume(t*M+C)-Fme(C));return[l+$*g,u+$*x,f*R/pB(t*M+C)]}}return y.duration=S*1e3*t/Math.SQRT2,y}return i.rho=function(a){var o=Math.max(.001,+a),l=o*o,u=l*l;return e(o,l,u)},i})(Math.SQRT2,2,4);function Hme(e,t){t===void 0&&(t=e,e=ao);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[l](o-l)}}var Pf=0,Jh=0,$h=0,aK=1e3,db,ep,hb=0,bu=0,Q0=0,Dp=typeof performance=="object"&&performance.now?performance:Date,oK=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function NR(){return bu||(oK(Gme),bu=Dp.now()+Q0)}function Gme(){bu=0}function pb(){this._call=this._time=this._next=null}pb.prototype=sK.prototype={constructor:pb,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?NR():+n)+(t==null?0:+t),!this._next&&ep!==this&&(ep?ep._next=this:db=this,ep=this),this._call=e,this._time=n,CN()},stop:function(){this._call&&(this._call=null,this._time=1/0,CN())}};function sK(e,t,n){var r=new pb;return r.restart(e,t,n),r}function Wme(){NR(),++Pf;for(var e=db,t;e;)(t=bu-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pf}function mB(){bu=(hb=Dp.now())+Q0,Pf=Jh=0;try{Wme()}finally{Pf=0,Yme(),bu=0}}function Kme(){var e=Dp.now(),t=e-hb;t>aK&&(Q0-=t,hb=e)}function Yme(){for(var e,t=db,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:db=n);ep=e,CN(r)}function CN(e){if(!Pf){Jh&&(Jh=clearTimeout(Jh));var t=e-bu;t>24?(e<1/0&&(Jh=setTimeout(mB,e-Dp.now()-Q0)),$h&&($h=clearInterval($h))):($h||(hb=Dp.now(),$h=setInterval(Kme,aK)),Pf=1,oK(mB))}}function gB(e,t,n){var r=new pb;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Xme=X0("start","end","cancel","interrupt"),Zme=[],lK=0,vB=1,TN=2,Ay=3,yB=4,ON=5,Cy=6;function J0(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Qme(e,n,{name:t,index:r,group:i,on:Xme,tween:Zme,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:lK})}function PR(e,t){var n=Fi(e,t);if(n.state>lK)throw new Error("too late; already scheduled");return n}function xa(e,t){var n=Fi(e,t);if(n.state>Ay)throw new Error("too late; already running");return n}function Fi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Qme(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=sK(a,0,n.time);function a(f){n.state=vB,n.timer.restart(o,n.delay,n.time),n.delay<=f&&o(f-n.delay)}function o(f){var d,h,m,g;if(n.state!==vB)return u();for(d in r)if(g=r[d],g.name===n.name){if(g.state===Ay)return gB(o);g.state===yB?(g.state=Cy,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=Cy,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(gB(function(){n.state===Ay&&(n.state=yB,n.timer.restart(l,n.delay,n.time),l(f))}),n.state=TN,n.on.call("start",e,e.__data__,n.index,n.group),n.state===TN){for(n.state=Ay,i=new Array(m=n.tween.length),d=0,h=-1;d<m;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=g);i.length=h+1}}function l(f){for(var d=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(u),n.state=ON,1),h=-1,m=i.length;++h<m;)i[h].call(e,d);n.state===ON&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=Cy,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Ty(e,t){var n=e.__transition,r,i,a=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>TN&&r.state<ON,r.state=Cy,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Jme(e){return this.each(function(){Ty(this,e)})}function ege(e,t){var n,r;return function(){var i=xa(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,l=r.length;o<l;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function tge(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=xa(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:t,value:n},u=0,f=i.length;u<f;++u)if(i[u].name===t){i[u]=l;break}u===f&&i.push(l)}a.tween=i}}function nge(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fi(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?ege:tge)(n,e,t))}function MR(e,t,n){var r=e._id;return e.each(function(){var i=xa(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fi(i,r).value[t]}}function uK(e,t){var n;return(typeof t=="number"?Ni:t instanceof yu?fb:(n=yu(t))?(t=n,fb):nK)(e,t)}function rge(e){return function(){this.removeAttribute(e)}}function ige(e){return function(){this.removeAttributeNS(e.space,e.local)}}function age(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function oge(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function sge(e,t,n){var r,i,a;return function(){var o,l=n(this),u;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),u=l+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l)))}}function lge(e,t,n){var r,i,a;return function(){var o,l=n(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),u=l+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l)))}}function uge(e,t){var n=Z0(e),r=n==="transform"?zme:uK;return this.attrTween(e,typeof t=="function"?(n.local?lge:sge)(n,r,MR(this,"attr."+e,t)):t==null?(n.local?ige:rge)(n):(n.local?oge:age)(n,r,t))}function cge(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function fge(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function dge(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&fge(e,a)),n}return i._value=t,i}function hge(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&cge(e,a)),n}return i._value=t,i}function pge(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Z0(e);return this.tween(n,(r.local?dge:hge)(r,t))}function mge(e,t){return function(){PR(this,e).delay=+t.apply(this,arguments)}}function gge(e,t){return t=+t,function(){PR(this,e).delay=t}}function vge(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?mge:gge)(t,e)):Fi(this.node(),t).delay}function yge(e,t){return function(){xa(this,e).duration=+t.apply(this,arguments)}}function bge(e,t){return t=+t,function(){xa(this,e).duration=t}}function xge(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?yge:bge)(t,e)):Fi(this.node(),t).duration}function wge(e,t){if(typeof t!="function")throw new Error;return function(){xa(this,e).ease=t}}function Sge(e){var t=this._id;return arguments.length?this.each(wge(t,e)):Fi(this.node(),t).ease}function _ge(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;xa(this,e).ease=n}}function Ege(e){if(typeof e!="function")throw new Error;return this.each(_ge(this._id,e))}function Age(e){typeof e!="function"&&(e=qW(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],u,f=0;f<o;++f)(u=a[f])&&e.call(u,u.__data__,f,a)&&l.push(u);return new po(r,this._parents,this._name,this._id)}function Cge(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u=t[l],f=n[l],d=u.length,h=o[l]=new Array(d),m,g=0;g<d;++g)(m=u[g]||f[g])&&(h[g]=m);for(;l<r;++l)o[l]=t[l];return new po(o,this._parents,this._name,this._id)}function Tge(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Oge(e,t,n){var r,i,a=Tge(t)?PR:xa;return function(){var o=a(this,e),l=o.on;l!==r&&(i=(r=l).copy()).on(t,n),o.on=i}}function jge(e,t){var n=this._id;return arguments.length<2?Fi(this.node(),n).on.on(e):this.each(Oge(n,e,t))}function Nge(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Pge(){return this.on("end.remove",Nge(this._id))}function Mge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=AR(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l=r[o],u=l.length,f=a[o]=new Array(u),d,h,m=0;m<u;++m)(d=l[m])&&(h=e.call(d,d.__data__,m,l))&&("__data__"in d&&(h.__data__=d.__data__),f[m]=h,J0(f[m],t,n,m,f,Fi(d,n)));return new po(a,this._parents,t,n)}function Rge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=BW(e));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var u=r[l],f=u.length,d,h=0;h<f;++h)if(d=u[h]){for(var m=e.call(d,d.__data__,h,u),g,x=Fi(d,n),w=0,y=m.length;w<y;++w)(g=m[w])&&J0(g,t,n,w,m,x);a.push(m),o.push(d)}return new po(a,o,t,n)}var kge=qm.prototype.constructor;function Dge(){return new kge(this._groups,this._parents)}function Ige(e,t){var n,r,i;return function(){var a=Nf(this,e),o=(this.style.removeProperty(e),Nf(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function cK(e){return function(){this.style.removeProperty(e)}}function Lge(e,t,n){var r,i=n+"",a;return function(){var o=Nf(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function $ge(e,t,n){var r,i,a;return function(){var o=Nf(this,e),l=n(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),Nf(this,e))),o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l))}}function Bge(e,t){var n,r,i,a="style."+t,o="end."+a,l;return function(){var u=xa(this,e),f=u.on,d=u.value[a]==null?l||(l=cK(t)):void 0;(f!==n||i!==d)&&(r=(n=f).copy()).on(o,i=d),u.on=r}}function qge(e,t,n){var r=(e+="")=="transform"?qme:uK;return t==null?this.styleTween(e,Ige(e,r)).on("end.style."+e,cK(e)):typeof t=="function"?this.styleTween(e,$ge(e,r,MR(this,"style."+e,t))).each(Bge(this._id,e)):this.styleTween(e,Lge(e,r,t),n).on("end.style."+e,null)}function zge(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Vge(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&zge(e,o,n)),r}return a._value=t,a}function Fge(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Vge(e,t,n??""))}function Uge(e){return function(){this.textContent=e}}function Hge(e){return function(){var t=e(this);this.textContent=t??""}}function Gge(e){return this.tween("text",typeof e=="function"?Hge(MR(this,"text",e)):Uge(e==null?"":e+""))}function Wge(e){return function(t){this.textContent=e.call(this,t)}}function Kge(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Wge(i)),t}return r._value=e,r}function Yge(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,Kge(e))}function Xge(){for(var e=this._name,t=this._id,n=fK(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,u,f=0;f<l;++f)if(u=o[f]){var d=Fi(u,t);J0(u,e,n,f,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new po(r,this._parents,e,n)}function Zge(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var l={value:o},u={value:function(){--i===0&&a()}};n.each(function(){var f=xa(this,r),d=f.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),f.on=t}),i===0&&a()})}var Qge=0;function po(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function fK(){return++Qge}var Ua=qm.prototype;po.prototype={constructor:po,select:Mge,selectAll:Rge,selectChild:Ua.selectChild,selectChildren:Ua.selectChildren,filter:Age,merge:Cge,selection:Dge,transition:Xge,call:Ua.call,nodes:Ua.nodes,node:Ua.node,size:Ua.size,empty:Ua.empty,each:Ua.each,on:jge,attr:uge,attrTween:pge,style:qge,styleTween:Fge,text:Gge,textTween:Yge,remove:Pge,tween:nge,delay:vge,duration:xge,ease:Sge,easeVarying:Ege,end:Zge,[Symbol.iterator]:Ua[Symbol.iterator]};function Jge(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var eve={time:null,delay:0,duration:250,ease:Jge};function tve(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function nve(e){var t,n;e instanceof po?(t=e._id,e=e._name):(t=fK(),(n=eve).time=NR(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,u,f=0;f<l;++f)(u=o[f])&&J0(u,e,t,f,o,n||tve(u,t));return new po(r,this._parents,e,t)}qm.prototype.interrupt=Jme;qm.prototype.transition=nve;const Gv=e=>()=>e;function rve(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function eo(e,t,n){this.k=e,this.x=t,this.y=n}eo.prototype={constructor:eo,scale:function(e){return e===1?this:new eo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new eo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ex=new eo(1,0,0);dK.prototype=eo.prototype;function dK(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ex;return e.__zoom}function a_(e){e.stopImmediatePropagation()}function Bh(e){e.preventDefault(),e.stopImmediatePropagation()}function ive(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function ave(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function bB(){return this.__zoom||ex}function ove(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function sve(){return navigator.maxTouchPoints||"ontouchstart"in this}function lve(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function hK(){var e=ive,t=ave,n=lve,r=ove,i=sve,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,u=Ey,f=X0("start","zoom","end"),d,h,m,g=500,x=150,w=0,y=10;function S(D){D.property("__zoom",bB).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",$).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(D,q,L,z){var H=D.selection?D.selection():D;H.property("__zoom",bB),D!==H?C(D,q,L,z):H.interrupt().each(function(){O(this,arguments).event(z).start().zoom(null,typeof q=="function"?q.apply(this,arguments):q).end()})},S.scaleBy=function(D,q,L,z){S.scaleTo(D,function(){var H=this.__zoom.k,Y=typeof q=="function"?q.apply(this,arguments):q;return H*Y},L,z)},S.scaleTo=function(D,q,L,z){S.transform(D,function(){var H=t.apply(this,arguments),Y=this.__zoom,Z=L==null?A(H):typeof L=="function"?L.apply(this,arguments):L,U=Y.invert(Z),F=typeof q=="function"?q.apply(this,arguments):q;return n(_(E(Y,F),Z,U),H,o)},L,z)},S.translateBy=function(D,q,L,z){S.transform(D,function(){return n(this.__zoom.translate(typeof q=="function"?q.apply(this,arguments):q,typeof L=="function"?L.apply(this,arguments):L),t.apply(this,arguments),o)},null,z)},S.translateTo=function(D,q,L,z,H){S.transform(D,function(){var Y=t.apply(this,arguments),Z=this.__zoom,U=z==null?A(Y):typeof z=="function"?z.apply(this,arguments):z;return n(ex.translate(U[0],U[1]).scale(Z.k).translate(typeof q=="function"?-q.apply(this,arguments):-q,typeof L=="function"?-L.apply(this,arguments):-L),Y,o)},z,H)};function E(D,q){return q=Math.max(a[0],Math.min(a[1],q)),q===D.k?D:new eo(q,D.x,D.y)}function _(D,q,L){var z=q[0]-L[0]*D.k,H=q[1]-L[1]*D.k;return z===D.x&&H===D.y?D:new eo(D.k,z,H)}function A(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function C(D,q,L,z){D.on("start.zoom",function(){O(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(z).end()}).tween("zoom",function(){var H=this,Y=arguments,Z=O(H,Y).event(z),U=t.apply(H,Y),F=L==null?A(U):typeof L=="function"?L.apply(H,Y):L,X=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),K=H.__zoom,G=typeof q=="function"?q.apply(H,Y):q,Q=u(K.invert(F).concat(X/K.k),G.invert(F).concat(X/G.k));return function(J){if(J===1)J=G;else{var re=Q(J),ne=X/re[2];J=new eo(ne,F[0]-re[0]*ne,F[1]-re[1]*ne)}Z.zoom(null,J)}})}function O(D,q,L){return!L&&D.__zooming||new P(D,q)}function P(D,q){this.that=D,this.args=q,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,q),this.taps=0}P.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,q){return this.mouse&&D!=="mouse"&&(this.mouse[1]=q.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=q.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=q.invert(this.touch1[0])),this.that.__zoom=q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var q=$r(this.that).datum();f.call(D,this.that,new rve(D,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:f}),q)}};function M(D,...q){if(!e.apply(this,arguments))return;var L=O(this,q).event(D),z=this.__zoom,H=Math.max(a[0],Math.min(a[1],z.k*Math.pow(2,r.apply(this,arguments)))),Y=Ti(D);if(L.wheel)(L.mouse[0][0]!==Y[0]||L.mouse[0][1]!==Y[1])&&(L.mouse[1]=z.invert(L.mouse[0]=Y)),clearTimeout(L.wheel);else{if(z.k===H)return;L.mouse=[Y,z.invert(Y)],Ty(this),L.start()}Bh(D),L.wheel=setTimeout(Z,x),L.zoom("mouse",n(_(E(z,H),L.mouse[0],L.mouse[1]),L.extent,o));function Z(){L.wheel=null,L.end()}}function R(D,...q){if(m||!e.apply(this,arguments))return;var L=D.currentTarget,z=O(this,q,!0).event(D),H=$r(D.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",X,!0),Y=Ti(D,L),Z=D.clientX,U=D.clientY;XW(D.view),a_(D),z.mouse=[Y,this.__zoom.invert(Y)],Ty(this),z.start();function F(K){if(Bh(K),!z.moved){var G=K.clientX-Z,Q=K.clientY-U;z.moved=G*G+Q*Q>w}z.event(K).zoom("mouse",n(_(z.that.__zoom,z.mouse[0]=Ti(K,L),z.mouse[1]),z.extent,o))}function X(K){H.on("mousemove.zoom mouseup.zoom",null),ZW(K.view,z.moved),Bh(K),z.event(K).end()}}function $(D,...q){if(e.apply(this,arguments)){var L=this.__zoom,z=Ti(D.changedTouches?D.changedTouches[0]:D,this),H=L.invert(z),Y=L.k*(D.shiftKey?.5:2),Z=n(_(E(L,Y),z,H),t.apply(this,q),o);Bh(D),l>0?$r(this).transition().duration(l).call(C,Z,z,D):$r(this).call(S.transform,Z,z,D)}}function I(D,...q){if(e.apply(this,arguments)){var L=D.touches,z=L.length,H=O(this,q,D.changedTouches.length===z).event(D),Y,Z,U,F;for(a_(D),Z=0;Z<z;++Z)U=L[Z],F=Ti(U,this),F=[F,this.__zoom.invert(F),U.identifier],H.touch0?!H.touch1&&H.touch0[2]!==F[2]&&(H.touch1=F,H.taps=0):(H.touch0=F,Y=!0,H.taps=1+!!d);d&&(d=clearTimeout(d)),Y&&(H.taps<2&&(h=F[0],d=setTimeout(function(){d=null},g)),Ty(this),H.start())}}function k(D,...q){if(this.__zooming){var L=O(this,q).event(D),z=D.changedTouches,H=z.length,Y,Z,U,F;for(Bh(D),Y=0;Y<H;++Y)Z=z[Y],U=Ti(Z,this),L.touch0&&L.touch0[2]===Z.identifier?L.touch0[0]=U:L.touch1&&L.touch1[2]===Z.identifier&&(L.touch1[0]=U);if(Z=L.that.__zoom,L.touch1){var X=L.touch0[0],K=L.touch0[1],G=L.touch1[0],Q=L.touch1[1],J=(J=G[0]-X[0])*J+(J=G[1]-X[1])*J,re=(re=Q[0]-K[0])*re+(re=Q[1]-K[1])*re;Z=E(Z,Math.sqrt(J/re)),U=[(X[0]+G[0])/2,(X[1]+G[1])/2],F=[(K[0]+Q[0])/2,(K[1]+Q[1])/2]}else if(L.touch0)U=L.touch0[0],F=L.touch0[1];else return;L.zoom("touch",n(_(Z,U,F),L.extent,o))}}function V(D,...q){if(this.__zooming){var L=O(this,q).event(D),z=D.changedTouches,H=z.length,Y,Z;for(a_(D),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),Y=0;Y<H;++Y)Z=z[Y],L.touch0&&L.touch0[2]===Z.identifier?delete L.touch0:L.touch1&&L.touch1[2]===Z.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2&&(Z=Ti(Z,this),Math.hypot(h[0]-Z[0],h[1]-Z[1])<y)){var U=$r(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return S.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:Gv(+D),S):r},S.filter=function(D){return arguments.length?(e=typeof D=="function"?D:Gv(!!D),S):e},S.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:Gv(!!D),S):i},S.extent=function(D){return arguments.length?(t=typeof D=="function"?D:Gv([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),S):t},S.scaleExtent=function(D){return arguments.length?(a[0]=+D[0],a[1]=+D[1],S):[a[0],a[1]]},S.translateExtent=function(D){return arguments.length?(o[0][0]=+D[0][0],o[1][0]=+D[1][0],o[0][1]=+D[0][1],o[1][1]=+D[1][1],S):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},S.constrain=function(D){return arguments.length?(n=D,S):n},S.duration=function(D){return arguments.length?(l=+D,S):l},S.interpolate=function(D){return arguments.length?(u=D,S):u},S.on=function(){var D=f.on.apply(f,arguments);return D===f?S:D},S.clickDistance=function(D){return arguments.length?(w=(D=+D)*D,S):Math.sqrt(w)},S.tapDistance=function(D){return arguments.length?(y=+D,S):y},S}const ha={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Ip=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],pK=["Enter"," ","Escape"],mK={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Mf;(function(e){e.Strict="strict",e.Loose="loose"})(Mf||(Mf={}));var lu;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(lu||(lu={}));var Lp;(function(e){e.Partial="partial",e.Full="full"})(Lp||(Lp={}));const gK={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ps;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ps||(ps={}));var mb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(mb||(mb={}));var Ie;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ie||(Ie={}));const xB={[Ie.Left]:Ie.Right,[Ie.Right]:Ie.Left,[Ie.Top]:Ie.Bottom,[Ie.Bottom]:Ie.Top};function vK(e){return e===null?null:e?"valid":"invalid"}const yK=e=>"id"in e&&"source"in e&&"target"in e,uve=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),RR=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Vm=(e,t=[0,0])=>{const{width:n,height:r}=wo(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},cve=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const a=typeof i=="string";let o=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(o=a?t.nodeLookup.get(i):RR(i)?i:t.nodeLookup.get(i.id));const l=o?gb(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return tx(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return nx(n)},Fm=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=tx(n,gb(i)),r=!0)}),r?nx(n):{x:0,y:0,width:0,height:0}},kR=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{const l={...Hm(t,[n,r,i]),width:t.width/i,height:t.height/i},u=[];for(const f of e.values()){const{measured:d,selectable:h=!0,hidden:m=!1}=f;if(o&&!h||m)continue;const g=d.width??f.width??f.initialWidth??null,x=d.height??f.height??f.initialHeight??null,w=$p(l,kf(f)),y=(g??0)*(x??0),S=a&&w>0;(!f.internals.handleBounds||S||w>=y||f.dragging)&&u.push(f)}return u},fve=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function dve(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function hve({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);const l=dve(e,o),u=Fm(l),f=DR(u,t,n,(o==null?void 0:o.minZoom)??i,(o==null?void 0:o.maxZoom)??a,(o==null?void 0:o.padding)??.1);return await r.setViewport(f,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),Promise.resolve(!0)}function bK({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){const o=n.get(e),l=o.parentId?n.get(o.parentId):void 0,{x:u,y:f}=l?l.internals.positionAbsolute:{x:0,y:0},d=o.origin??r;let h=o.extent||i;if(o.extent==="parent"&&!o.expandParent)if(!l)a==null||a("005",ha.error005());else{const g=l.measured.width,x=l.measured.height;g&&x&&(h=[[u,f],[u+g,f+x]])}else l&&Df(o.extent)&&(h=[[o.extent[0][0]+u,o.extent[0][1]+f],[o.extent[1][0]+u,o.extent[1][1]+f]]);const m=Df(h)?xu(t,h,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",ha.error015())),{position:{x:m.x-u+(o.measured.width??0)*d[0],y:m.y-f+(o.measured.height??0)*d[1]},positionAbsolute:m}}async function pve({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const a=new Set(e.map(m=>m.id)),o=[];for(const m of n){if(m.deletable===!1)continue;const g=a.has(m.id),x=!g&&m.parentId&&o.find(w=>w.id===m.parentId);(g||x)&&o.push(m)}const l=new Set(t.map(m=>m.id)),u=r.filter(m=>m.deletable!==!1),d=fve(o,u);for(const m of u)l.has(m.id)&&!d.find(x=>x.id===m.id)&&d.push(m);if(!i)return{edges:d,nodes:o};const h=await i({nodes:o,edges:d});return typeof h=="boolean"?h?{edges:d,nodes:o}:{edges:[],nodes:[]}:h}const Rf=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),xu=(e={x:0,y:0},t,n)=>({x:Rf(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Rf(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function xK(e,t,n){const{width:r,height:i}=wo(n),{x:a,y:o}=n.internals.positionAbsolute;return xu(e,[[a,o],[a+r,o+i]],t)}const wB=(e,t,n)=>e<t?Rf(Math.abs(e-t),1,t)/t:e>n?-Rf(Math.abs(e-n),1,t)/t:0,wK=(e,t,n=15,r=40)=>{const i=wB(e.x,r,t.width-r)*n,a=wB(e.y,r,t.height-r)*n;return[i,a]},tx=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),jN=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),nx=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),kf=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=RR(e)?e.internals.positionAbsolute:Vm(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},gb=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=RR(e)?e.internals.positionAbsolute:Vm(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},SK=(e,t)=>nx(tx(jN(e),jN(t))),$p=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},SB=e=>Mi(e.width)&&Mi(e.height)&&Mi(e.x)&&Mi(e.y),Mi=e=>!isNaN(e)&&isFinite(e),mve=(e,t)=>{},Um=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Hm=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{const l={x:(e-n)/i,y:(t-r)/i};return a?Um(l,o):l},vb=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function Pc(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function gve(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Pc(e,n),i=Pc(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=Pc(e.top??e.y??0,n),i=Pc(e.bottom??e.y??0,n),a=Pc(e.left??e.x??0,t),o=Pc(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function vve(e,t,n,r,i,a){const{x:o,y:l}=vb(e,[t,n,r]),{x:u,y:f}=vb({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=i-u,h=a-f;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(h)}}const DR=(e,t,n,r,i,a)=>{const o=gve(a,t,n),l=(t-o.x)/e.width,u=(n-o.y)/e.height,f=Math.min(l,u),d=Rf(f,r,i),h=e.x+e.width/2,m=e.y+e.height/2,g=t/2-h*d,x=n/2-m*d,w=vve(e,g,x,d,t,n),y={left:Math.min(w.left-o.left,0),top:Math.min(w.top-o.top,0),right:Math.min(w.right-o.right,0),bottom:Math.min(w.bottom-o.bottom,0)};return{x:g-y.left+y.right,y:x-y.top+y.bottom,zoom:d}},Bp=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Df(e){return e!=null&&e!=="parent"}function wo(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function _K(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function EK(e,t={width:0,height:0},n,r,i){const a={...e},o=r.get(n);if(o){const l=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*l[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*l[1]}return a}function _B(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function yve(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function bve(e){return{...mK,...e||{}}}function lp(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:a,y:o}=Ri(e),l=Hm({x:a-((i==null?void 0:i.left)??0),y:o-((i==null?void 0:i.top)??0)},r),{x:u,y:f}=n?Um(l,t):l;return{xSnapped:u,ySnapped:f,...l}}const IR=e=>({width:e.offsetWidth,height:e.offsetHeight}),AK=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},xve=["INPUT","SELECT","TEXTAREA"];function CK(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:xve.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const TK=e=>"clientX"in e,Ri=(e,t)=>{var a,o;const n=TK(e),r=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,i=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},EB=(e,t,n,r,i)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:i,position:o.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...IR(o)}})};function OK({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:l}){const u=e*.125+i*.375+o*.375+n*.125,f=t*.125+a*.375+l*.375+r*.125,d=Math.abs(u-e),h=Math.abs(f-t);return[u,f,d,h]}function Wv(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function AB({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case Ie.Left:return[t-Wv(t-r,a),n];case Ie.Right:return[t+Wv(r-t,a),n];case Ie.Top:return[t,n-Wv(n-i,a)];case Ie.Bottom:return[t,n+Wv(i-n,a)]}}function jK({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top,curvature:o=.25}){const[l,u]=AB({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[f,d]=AB({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[h,m,g,x]=OK({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:u,targetControlX:f,targetControlY:d});return[`M${e},${t} C${l},${u} ${f},${d} ${r},${i}`,h,m,g,x]}function NK({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2,l=r<t?r+o:r-o;return[a,l,i,o]}function wve({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return r;const o=i&&n?r+1e3:r,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return o+l}function Sve({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const a=tx(gb(e),gb(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const o={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return $p(o,nx(a))>0}const _ve=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Eve=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Ave=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||_ve;let i;return yK(e)?i={...e}:i={...e,id:r(e)},Eve(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function PK({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,a,o,l]=NK({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,l]}const CB={[Ie.Left]:{x:-1,y:0},[Ie.Right]:{x:1,y:0},[Ie.Top]:{x:0,y:-1},[Ie.Bottom]:{x:0,y:1}},Cve=({source:e,sourcePosition:t=Ie.Bottom,target:n})=>t===Ie.Left||t===Ie.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},TB=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Tve({source:e,sourcePosition:t=Ie.Bottom,target:n,targetPosition:r=Ie.Top,center:i,offset:a,stepPosition:o}){const l=CB[t],u=CB[r],f={x:e.x+l.x*a,y:e.y+l.y*a},d={x:n.x+u.x*a,y:n.y+u.y*a},h=Cve({source:f,sourcePosition:t,target:d}),m=h.x!==0?"x":"y",g=h[m];let x=[],w,y;const S={x:0,y:0},E={x:0,y:0},[,,_,A]=NK({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[m]*u[m]===-1){m==="x"?(w=i.x??f.x+(d.x-f.x)*o,y=i.y??(f.y+d.y)/2):(w=i.x??(f.x+d.x)/2,y=i.y??f.y+(d.y-f.y)*o);const M=[{x:w,y:f.y},{x:w,y:d.y}],R=[{x:f.x,y},{x:d.x,y}];l[m]===g?x=m==="x"?M:R:x=m==="x"?R:M}else{const M=[{x:f.x,y:d.y}],R=[{x:d.x,y:f.y}];if(m==="x"?x=l.x===g?R:M:x=l.y===g?M:R,t===r){const D=Math.abs(e[m]-n[m]);if(D<=a){const q=Math.min(a-1,a-D);l[m]===g?S[m]=(f[m]>e[m]?-1:1)*q:E[m]=(d[m]>n[m]?-1:1)*q}}if(t!==r){const D=m==="x"?"y":"x",q=l[m]===u[D],L=f[D]>d[D],z=f[D]<d[D];(l[m]===1&&(!q&&L||q&&z)||l[m]!==1&&(!q&&z||q&&L))&&(x=m==="x"?M:R)}const $={x:f.x+S.x,y:f.y+S.y},I={x:d.x+E.x,y:d.y+E.y},k=Math.max(Math.abs($.x-x[0].x),Math.abs(I.x-x[0].x)),V=Math.max(Math.abs($.y-x[0].y),Math.abs(I.y-x[0].y));k>=V?(w=($.x+I.x)/2,y=x[0].y):(w=x[0].x,y=($.y+I.y)/2)}const C={x:f.x+S.x,y:f.y+S.y},O={x:d.x+E.x,y:d.y+E.y};return[[e,...C.x!==x[0].x||C.y!==x[0].y?[C]:[],...x,...O.x!==x[x.length-1].x||O.y!==x[x.length-1].y?[O]:[],n],w,y,_,A]}function Ove(e,t,n,r){const i=Math.min(TB(e,t)/2,TB(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){const f=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${a+i*f},${o}Q ${a},${o} ${a},${o+i*d}`}const l=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${a},${o+i*u}Q ${a},${o} ${a+i*l},${o}`}function NN({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top,borderRadius:o=5,centerX:l,centerY:u,offset:f=20,stepPosition:d=.5}){const[h,m,g,x,w]=Tve({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:l,y:u},offset:f,stepPosition:d});let y=`M${h[0].x} ${h[0].y}`;for(let S=1;S<h.length-1;S++)y+=Ove(h[S-1],h[S],h[S+1],o);return y+=`L${h[h.length-1].x} ${h[h.length-1].y}`,[y,m,g,x,w]}function OB(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function jve(e){var h;const{sourceNode:t,targetNode:n}=e;if(!OB(t)||!OB(n))return null;const r=t.internals.handleBounds||jB(t.handles),i=n.internals.handleBounds||jB(n.handles),a=NB((r==null?void 0:r.source)??[],e.sourceHandle),o=NB(e.connectionMode===Mf.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!a||!o)return(h=e.onError)==null||h.call(e,"008",ha.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(a==null?void 0:a.position)||Ie.Bottom,u=(o==null?void 0:o.position)||Ie.Top,f=wu(t,a,l),d=wu(n,o,u);return{sourceX:f.x,sourceY:f.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:u}}function jB(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function wu(e,t,n=Ie.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:l}=t??wo(e);if(r)return{x:i+o/2,y:a+l/2};switch((t==null?void 0:t.position)??n){case Ie.Top:return{x:i+o/2,y:a};case Ie.Right:return{x:i+o,y:a+l/2};case Ie.Bottom:return{x:i+o/2,y:a+l};case Ie.Left:return{x:i,y:a+l/2}}}function NB(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function PN(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Nve(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const a=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||i].forEach(u=>{if(u&&typeof u=="object"){const f=PN(u,t);a.has(f)||(o.push({id:f,color:u.color||n,...u}),a.add(f))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const MK=1e3,Pve=10,LR={nodeOrigin:[0,0],nodeExtent:Ip,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Mve={...LR,checkEquality:!0};function $R(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function Rve(e,t,n){const r=$R(LR,n);for(const i of e.values())if(i.parentId)qR(i,e,t,r);else{const a=Vm(i,r.nodeOrigin),o=Df(i.extent)?i.extent:r.nodeExtent,l=xu(a,o,wo(i));i.internals.positionAbsolute=l}}function kve(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&r.push(a)}return{source:n,target:r}}function BR(e){return e==="manual"}function MN(e,t,n,r={}){var d,h;const i=$R(Mve,r),a={i:0},o=new Map(t),l=i!=null&&i.elevateNodesOnSelect&&!BR(i.zIndexMode)?MK:0;let u=e.length>0,f=!1;t.clear(),n.clear();for(const m of e){let g=o.get(m.id);if(i.checkEquality&&m===(g==null?void 0:g.internals.userNode))t.set(m.id,g);else{const x=Vm(m,i.nodeOrigin),w=Df(m.extent)?m.extent:i.nodeExtent,y=xu(x,w,wo(m));g={...i.defaults,...m,measured:{width:(d=m.measured)==null?void 0:d.width,height:(h=m.measured)==null?void 0:h.height},internals:{positionAbsolute:y,handleBounds:kve(m,g),z:RK(m,l,i.zIndexMode),userNode:m}},t.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(u=!1),m.parentId&&qR(g,t,n,r,a),f||(f=m.selected??!1)}return{nodesInitialized:u,hasSelectedNodes:f}}function Dve(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function qR(e,t,n,r,i){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:l,zIndexMode:u}=$R(LR,r),f=e.parentId,d=t.get(f);if(!d){console.warn(`Parent node ${f} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Dve(e,n),i&&!d.parentId&&d.internals.rootParentIndex===void 0&&u==="auto"&&(d.internals.rootParentIndex=++i.i,d.internals.z=d.internals.z+i.i*Pve),i&&d.internals.rootParentIndex!==void 0&&(i.i=d.internals.rootParentIndex);const h=a&&!BR(u)?MK:0,{x:m,y:g,z:x}=Ive(e,d,o,l,h,u),{positionAbsolute:w}=e.internals,y=m!==w.x||g!==w.y;(y||x!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:y?{x:m,y:g}:w,z:x}})}function RK(e,t,n){const r=Mi(e.zIndex)?e.zIndex:0;return BR(n)?r:r+(e.selected?t:0)}function Ive(e,t,n,r,i,a){const{x:o,y:l}=t.internals.positionAbsolute,u=wo(e),f=Vm(e,n),d=Df(e.extent)?xu(f,e.extent,u):f;let h=xu({x:o+d.x,y:l+d.y},r,u);e.extent==="parent"&&(h=xK(h,u,t));const m=RK(e,i,a),g=t.internals.z??0;return{x:h.x,y:h.y,z:g>=m?g+1:m}}function zR(e,t,n,r=[0,0]){var o;const i=[],a=new Map;for(const l of e){const u=t.get(l.parentId);if(!u)continue;const f=((o=a.get(l.parentId))==null?void 0:o.expandedRect)??kf(u),d=SK(f,l.rect);a.set(l.parentId,{expandedRect:d,parent:u})}return a.size>0&&a.forEach(({expandedRect:l,parent:u},f)=>{var _;const d=u.internals.positionAbsolute,h=wo(u),m=u.origin??r,g=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,x=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,w=Math.max(h.width,Math.round(l.width)),y=Math.max(h.height,Math.round(l.height)),S=(w-h.width)*m[0],E=(y-h.height)*m[1];(g>0||x>0||S||E)&&(i.push({id:f,type:"position",position:{x:u.position.x-g+S,y:u.position.y-x+E}}),(_=n.get(f))==null||_.forEach(A=>{e.some(C=>C.id===A.id)||i.push({id:A.id,type:"position",position:{x:A.position.x+g,y:A.position.y+x}})})),(h.width<l.width||h.height<l.height||g||x)&&i.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:w+(g?m[0]*g-S:0),height:y+(x?m[1]*x-E:0)}})}),i}function Lve(e,t,n,r,i,a,o){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let u=!1;if(!l)return{changes:[],updatedInternals:u};const f=[],d=window.getComputedStyle(l),{m22:h}=new window.DOMMatrixReadOnly(d.transform),m=[];for(const g of e.values()){const x=t.get(g.id);if(!x)continue;if(x.hidden){t.set(x.id,{...x,internals:{...x.internals,handleBounds:void 0}}),u=!0;continue}const w=IR(g.nodeElement),y=x.measured.width!==w.width||x.measured.height!==w.height;if(!!(w.width&&w.height&&(y||!x.internals.handleBounds||g.force))){const E=g.nodeElement.getBoundingClientRect(),_=Df(x.extent)?x.extent:a;let{positionAbsolute:A}=x.internals;x.parentId&&x.extent==="parent"?A=xK(A,w,t.get(x.parentId)):_&&(A=xu(A,_,w));const C={...x,measured:w,internals:{...x.internals,positionAbsolute:A,handleBounds:{source:EB("source",g.nodeElement,E,h,x.id),target:EB("target",g.nodeElement,E,h,x.id)}}};t.set(x.id,C),x.parentId&&qR(C,t,n,{nodeOrigin:i,zIndexMode:o}),u=!0,y&&(f.push({id:x.id,type:"dimensions",dimensions:w}),x.expandParent&&x.parentId&&m.push({id:x.id,parentId:x.parentId,rect:kf(C,i)}))}}if(m.length>0){const g=zR(m,t,n,i);f.push(...g)}return{changes:f,updatedInternals:u}}async function $ve({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),l=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(l)}function PB(e,t,n,r,i,a){let o=i;const l=r.get(o)||new Map;r.set(o,l.set(n,t)),o=`${i}-${e}`;const u=r.get(o)||new Map;if(r.set(o,u.set(n,t)),a){o=`${i}-${e}-${a}`;const f=r.get(o)||new Map;r.set(o,f.set(n,t))}}function kK(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:a,sourceHandle:o=null,targetHandle:l=null}=r,u={edgeId:r.id,source:i,target:a,sourceHandle:o,targetHandle:l},f=`${i}-${o}--${a}-${l}`,d=`${a}-${l}--${i}-${o}`;PB("source",u,d,e,i,o),PB("target",u,f,e,a,l),t.set(r.id,r)}}function DK(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:DK(n,t):!1}function MB(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function Bve(e,t,n,r){const i=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!DK(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const l=e.get(a);l&&i.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function o_({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,l,u;const i=[];for(const[f,d]of t){const h=(o=n.get(f))==null?void 0:o.internals.userNode;h&&i.push({...h,position:d.position,dragging:r})}if(!e)return[i[0],i];const a=(l=n.get(e))==null?void 0:l.internals.userNode;return[a?{...a,position:((u=t.get(e))==null?void 0:u.position)||a.position,dragging:r}:i[0],i]}function qve({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const a={x:n-i.distance.x,y:r-i.distance.y},o=Um(a,t);return{x:o.x-a.x,y:o.y-a.y}}function zve({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,l=new Map,u=!1,f={x:0,y:0},d=null,h=!1,m=null,g=!1,x=!1,w=null;function y({noDragClassName:E,handleSelector:_,domNode:A,isSelectable:C,nodeId:O,nodeClickDistance:P=0}){m=$r(A);function M({x:k,y:V}){const{nodeLookup:D,nodeExtent:q,snapGrid:L,snapToGrid:z,nodeOrigin:H,onNodeDrag:Y,onSelectionDrag:Z,onError:U,updateNodePositions:F}=t();a={x:k,y:V};let X=!1;const K=l.size>1,G=K&&q?jN(Fm(l)):null,Q=K&&z?qve({dragItems:l,snapGrid:L,x:k,y:V}):null;for(const[J,re]of l){if(!D.has(J))continue;let ne={x:k-re.distance.x,y:V-re.distance.y};z&&(ne=Q?{x:Math.round(ne.x+Q.x),y:Math.round(ne.y+Q.y)}:Um(ne,L));let fe=null;if(K&&q&&!re.extent&&G){const{positionAbsolute:ye}=re.internals,be=ye.x-G.x+q[0][0],xe=ye.x+re.measured.width-G.x2+q[1][0],Ae=ye.y-G.y+q[0][1],_e=ye.y+re.measured.height-G.y2+q[1][1];fe=[[be,Ae],[xe,_e]]}const{position:he,positionAbsolute:oe}=bK({nodeId:J,nextPosition:ne,nodeLookup:D,nodeExtent:fe||q,nodeOrigin:H,onError:U});X=X||re.position.x!==he.x||re.position.y!==he.y,re.position=he,re.internals.positionAbsolute=oe}if(x=x||X,!!X&&(F(l,!0),w&&(r||Y||!O&&Z))){const[J,re]=o_({nodeId:O,dragItems:l,nodeLookup:D});r==null||r(w,l,J,re),Y==null||Y(w,J,re),O||Z==null||Z(w,re)}}async function R(){if(!d)return;const{transform:k,panBy:V,autoPanSpeed:D,autoPanOnNodeDrag:q}=t();if(!q){u=!1,cancelAnimationFrame(o);return}const[L,z]=wK(f,d,D);(L!==0||z!==0)&&(a.x=(a.x??0)-L/k[2],a.y=(a.y??0)-z/k[2],await V({x:L,y:z})&&M(a)),o=requestAnimationFrame(R)}function $(k){var K;const{nodeLookup:V,multiSelectionActive:D,nodesDraggable:q,transform:L,snapGrid:z,snapToGrid:H,selectNodesOnDrag:Y,onNodeDragStart:Z,onSelectionDragStart:U,unselectNodesAndEdges:F}=t();h=!0,(!Y||!C)&&!D&&O&&((K=V.get(O))!=null&&K.selected||F()),C&&Y&&O&&(e==null||e(O));const X=lp(k.sourceEvent,{transform:L,snapGrid:z,snapToGrid:H,containerBounds:d});if(a=X,l=Bve(V,q,X,O),l.size>0&&(n||Z||!O&&U)){const[G,Q]=o_({nodeId:O,dragItems:l,nodeLookup:V});n==null||n(k.sourceEvent,l,G,Q),Z==null||Z(k.sourceEvent,G,Q),O||U==null||U(k.sourceEvent,Q)}}const I=QW().clickDistance(P).on("start",k=>{const{domNode:V,nodeDragThreshold:D,transform:q,snapGrid:L,snapToGrid:z}=t();d=(V==null?void 0:V.getBoundingClientRect())||null,g=!1,x=!1,w=k.sourceEvent,D===0&&$(k),a=lp(k.sourceEvent,{transform:q,snapGrid:L,snapToGrid:z,containerBounds:d}),f=Ri(k.sourceEvent,d)}).on("drag",k=>{const{autoPanOnNodeDrag:V,transform:D,snapGrid:q,snapToGrid:L,nodeDragThreshold:z,nodeLookup:H}=t(),Y=lp(k.sourceEvent,{transform:D,snapGrid:q,snapToGrid:L,containerBounds:d});if(w=k.sourceEvent,(k.sourceEvent.type==="touchmove"&&k.sourceEvent.touches.length>1||O&&!H.has(O))&&(g=!0),!g){if(!u&&V&&h&&(u=!0,R()),!h){const Z=Ri(k.sourceEvent,d),U=Z.x-f.x,F=Z.y-f.y;Math.sqrt(U*U+F*F)>z&&$(k)}(a.x!==Y.xSnapped||a.y!==Y.ySnapped)&&l&&h&&(f=Ri(k.sourceEvent,d),M(Y))}}).on("end",k=>{if(!(!h||g)&&(u=!1,h=!1,cancelAnimationFrame(o),l.size>0)){const{nodeLookup:V,updateNodePositions:D,onNodeDragStop:q,onSelectionDragStop:L}=t();if(x&&(D(l,!1),x=!1),i||q||!O&&L){const[z,H]=o_({nodeId:O,dragItems:l,nodeLookup:V,dragging:!1});i==null||i(k.sourceEvent,l,z,H),q==null||q(k.sourceEvent,z,H),O||L==null||L(k.sourceEvent,H)}}}).filter(k=>{const V=k.target;return!k.button&&(!E||!MB(V,`.${E}`,A))&&(!_||MB(V,_,A))});m.call(I)}function S(){m==null||m.on(".drag",null)}return{update:y,destroy:S}}function Vve(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())$p(i,kf(a))>0&&r.push(a);return r}const Fve=250;function Uve(e,t,n,r){var l,u;let i=[],a=1/0;const o=Vve(e,n,t+Fve);for(const f of o){const d=[...((l=f.internals.handleBounds)==null?void 0:l.source)??[],...((u=f.internals.handleBounds)==null?void 0:u.target)??[]];for(const h of d){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:m,y:g}=wu(f,h,h.position,!0),x=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));x>t||(x<a?(i=[{...h,x:m,y:g}],a=x):x===a&&i.push({...h,x:m,y:g}))}}if(!i.length)return null;if(i.length>1){const f=r.type==="source"?"target":"source";return i.find(d=>d.type===f)??i[0]}return i[0]}function IK(e,t,n,r,i,a=!1){var f,d,h;const o=r.get(e);if(!o)return null;const l=i==="strict"?(f=o.internals.handleBounds)==null?void 0:f[t]:[...((d=o.internals.handleBounds)==null?void 0:d.source)??[],...((h=o.internals.handleBounds)==null?void 0:h.target)??[]],u=(n?l==null?void 0:l.find(m=>m.id===n):l==null?void 0:l[0])??null;return u&&a?{...u,...wu(o,u,u.position,!0)}:u}function LK(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Hve(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const $K=()=>!0;function Gve(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:l,nodeLookup:u,lib:f,autoPanOnConnect:d,flowId:h,panBy:m,cancelConnection:g,onConnectStart:x,onConnect:w,onConnectEnd:y,isValidConnection:S=$K,onReconnectEnd:E,updateConnection:_,getTransform:A,getFromHandle:C,autoPanSpeed:O,dragThreshold:P=1,handleDomNode:M}){const R=AK(e.target);let $=0,I;const{x:k,y:V}=Ri(e),D=LK(a,M),q=l==null?void 0:l.getBoundingClientRect();let L=!1;if(!q||!D)return;const z=IK(i,D,r,u,t);if(!z)return;let H=Ri(e,q),Y=!1,Z=null,U=!1,F=null;function X(){if(!d||!q)return;const[he,oe]=wK(H,q,O);m({x:he,y:oe}),$=requestAnimationFrame(X)}const K={...z,nodeId:i,type:D,position:z.position},G=u.get(i);let J={inProgress:!0,isValid:null,from:wu(G,K,Ie.Left,!0),fromHandle:K,fromPosition:K.position,fromNode:G,to:H,toHandle:null,toPosition:xB[K.position],toNode:null,pointer:H};function re(){L=!0,_(J),x==null||x(e,{nodeId:i,handleId:r,handleType:D})}P===0&&re();function ne(he){if(!L){const{x:_e,y:tt}=Ri(he),nt=_e-k,Lt=tt-V;if(!(nt*nt+Lt*Lt>P*P))return;re()}if(!C()||!K){fe(he);return}const oe=A();H=Ri(he,q),I=Uve(Hm(H,oe,!1,[1,1]),n,u,K),Y||(X(),Y=!0);const ye=BK(he,{handle:I,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:S,doc:R,lib:f,flowId:h,nodeLookup:u});F=ye.handleDomNode,Z=ye.connection,U=Hve(!!I,ye.isValid);const be=u.get(i),xe=be?wu(be,K,Ie.Left,!0):J.from,Ae={...J,from:xe,isValid:U,to:ye.toHandle&&U?vb({x:ye.toHandle.x,y:ye.toHandle.y},oe):H,toHandle:ye.toHandle,toPosition:U&&ye.toHandle?ye.toHandle.position:xB[K.position],toNode:ye.toHandle?u.get(ye.toHandle.nodeId):null,pointer:H};_(Ae),J=Ae}function fe(he){if(!("touches"in he&&he.touches.length>0)){if(L){(I||F)&&Z&&U&&(w==null||w(Z));const{inProgress:oe,...ye}=J,be={...ye,toPosition:J.toHandle?J.toPosition:null};y==null||y(he,be),a&&(E==null||E(he,be))}g(),cancelAnimationFrame($),Y=!1,U=!1,Z=null,F=null,R.removeEventListener("mousemove",ne),R.removeEventListener("mouseup",fe),R.removeEventListener("touchmove",ne),R.removeEventListener("touchend",fe)}}R.addEventListener("mousemove",ne),R.addEventListener("mouseup",fe),R.addEventListener("touchmove",ne),R.addEventListener("touchend",fe)}function BK(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:l,flowId:u,isValidConnection:f=$K,nodeLookup:d}){const h=a==="target",m=t?o.querySelector(`.${l}-flow__handle[data-id="${u}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:g,y:x}=Ri(e),w=o.elementFromPoint(g,x),y=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:m,S={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){const E=LK(void 0,y),_=y.getAttribute("data-nodeid"),A=y.getAttribute("data-handleid"),C=y.classList.contains("connectable"),O=y.classList.contains("connectableend");if(!_||!E)return S;const P={source:h?_:r,sourceHandle:h?A:i,target:h?r:_,targetHandle:h?i:A};S.connection=P;const R=C&&O&&(n===Mf.Strict?h&&E==="source"||!h&&E==="target":_!==r||A!==i);S.isValid=R&&f(P),S.toHandle=IK(_,E,A,d,n,!0)}return S}const RN={onPointerDown:Gve,isValid:BK};function Wve({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=$r(e);function a({translateExtent:l,width:u,height:f,zoomStep:d=1,pannable:h=!0,zoomable:m=!0,inversePan:g=!1}){const x=_=>{if(_.sourceEvent.type!=="wheel"||!t)return;const A=n(),C=_.sourceEvent.ctrlKey&&Bp()?10:1,O=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*d,P=A[2]*Math.pow(2,O*C);t.scaleTo(P)};let w=[0,0];const y=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(w=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY])},S=_=>{const A=n();if(_.sourceEvent.type!=="mousemove"&&_.sourceEvent.type!=="touchmove"||!t)return;const C=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],O=[C[0]-w[0],C[1]-w[1]];w=C;const P=r()*Math.max(A[2],Math.log(A[2]))*(g?-1:1),M={x:A[0]-O[0]*P,y:A[1]-O[1]*P},R=[[0,0],[u,f]];t.setViewportConstrained({x:M.x,y:M.y,zoom:A[2]},R,l)},E=hK().on("start",y).on("zoom",h?S:null).on("zoom.wheel",m?x:null);i.call(E,{})}function o(){i.on("zoom",null)}return{update:a,destroy:o,pointer:Ti}}const rx=e=>({x:e.x,y:e.y,zoom:e.k}),s_=({x:e,y:t,zoom:n})=>ex.translate(e,t).scale(n),Vc=(e,t)=>e.target.closest(`.${t}`),qK=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Kve=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,l_=(e,t=0,n=Kve,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},zK=e=>{const t=e.ctrlKey&&Bp()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Yve({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:u,onPanZoomEnd:f}){return d=>{if(Vc(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(d.ctrlKey&&o){const y=Ti(d),S=zK(d),E=h*Math.pow(2,S);r.scaleTo(n,E,y,d);return}const m=d.deltaMode===1?20:1;let g=i===lu.Vertical?0:d.deltaX*m,x=i===lu.Horizontal?0:d.deltaY*m;!Bp()&&d.shiftKey&&i!==lu.Vertical&&(g=d.deltaY*m,x=0),r.translateBy(n,-(g/h)*a,-(x/h)*a,{internal:!0});const w=rx(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(u==null||u(d,w),e.panScrollTimeout=setTimeout(()=>{f==null||f(d,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(d,w))}}function Xve({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const a=r.type==="wheel",o=!t&&a&&!r.ctrlKey,l=Vc(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),n.call(this,r,i)}}function Zve({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var a,o,l;if((a=r.sourceEvent)!=null&&a.internal)return;const i=rx(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function Qve({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{var o,l;e.usedRightMouseButton=!!(n&&qK(t,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!((l=a.sourceEvent)!=null&&l.internal)&&(i==null||i(a.sourceEvent,rx(a.transform)))}}function Jve({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,a&&qK(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const u=rx(o.transform);e.prevViewport=u,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,u)},n?150:0)}}}function eye({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:l,noPanClassName:u,lib:f,connectionInProgress:d}){return h=>{var y;const m=e||t,g=n&&h.ctrlKey,x=h.type==="wheel";if(h.button===1&&h.type==="mousedown"&&(Vc(h,`${f}-flow__node`)||Vc(h,`${f}-flow__edge`)))return!0;if(!r&&!m&&!i&&!a&&!n||o||d&&!x||Vc(h,l)&&x||Vc(h,u)&&(!x||i&&x&&!e)||!n&&h.ctrlKey&&x)return!1;if(!n&&h.type==="touchstart"&&((y=h.touches)==null?void 0:y.length)>1)return h.preventDefault(),!1;if(!m&&!i&&!g&&x||!r&&(h.type==="mousedown"||h.type==="touchstart")||Array.isArray(r)&&!r.includes(h.button)&&h.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||x)&&w}}function tye({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:u}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),h=hK().scaleExtent([t,n]).translateExtent(r),m=$r(e).call(h);E({x:i.x,y:i.y,zoom:Rf(i.zoom,t,n)},[[0,0],[d.width,d.height]],r);const g=m.on("wheel.zoom"),x=m.on("dblclick.zoom");h.wheelDelta(zK);function w(I,k){return m?new Promise(V=>{h==null||h.interpolate((k==null?void 0:k.interpolate)==="linear"?ao:Ey).transform(l_(m,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>V(!0)),I)}):Promise.resolve(!1)}function y({noWheelClassName:I,noPanClassName:k,onPaneContextMenu:V,userSelectionActive:D,panOnScroll:q,panOnDrag:L,panOnScrollMode:z,panOnScrollSpeed:H,preventScrolling:Y,zoomOnPinch:Z,zoomOnScroll:U,zoomOnDoubleClick:F,zoomActivationKeyPressed:X,lib:K,onTransformChange:G,connectionInProgress:Q,paneClickDistance:J,selectionOnDrag:re}){D&&!f.isZoomingOrPanning&&S();const ne=q&&!X&&!D;h.clickDistance(re?1/0:!Mi(J)||J<0?0:J);const fe=ne?Yve({zoomPanValues:f,noWheelClassName:I,d3Selection:m,d3Zoom:h,panOnScrollMode:z,panOnScrollSpeed:H,zoomOnPinch:Z,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:l}):Xve({noWheelClassName:I,preventScrolling:Y,d3ZoomHandler:g});if(m.on("wheel.zoom",fe,{passive:!1}),!D){const oe=Zve({zoomPanValues:f,onDraggingChange:u,onPanZoomStart:o});h.on("start",oe);const ye=Qve({zoomPanValues:f,panOnDrag:L,onPaneContextMenu:!!V,onPanZoom:a,onTransformChange:G});h.on("zoom",ye);const be=Jve({zoomPanValues:f,panOnDrag:L,panOnScroll:q,onPaneContextMenu:V,onPanZoomEnd:l,onDraggingChange:u});h.on("end",be)}const he=eye({zoomActivationKeyPressed:X,panOnDrag:L,zoomOnScroll:U,panOnScroll:q,zoomOnDoubleClick:F,zoomOnPinch:Z,userSelectionActive:D,noPanClassName:k,noWheelClassName:I,lib:K,connectionInProgress:Q});h.filter(he),F?m.on("dblclick.zoom",x):m.on("dblclick.zoom",null)}function S(){h.on("zoom",null)}async function E(I,k,V){const D=s_(I),q=h==null?void 0:h.constrain()(D,k,V);return q&&await w(q),new Promise(L=>L(q))}async function _(I,k){const V=s_(I);return await w(V,k),new Promise(D=>D(V))}function A(I){if(m){const k=s_(I),V=m.property("__zoom");(V.k!==I.zoom||V.x!==I.x||V.y!==I.y)&&(h==null||h.transform(m,k,null,{sync:!0}))}}function C(){const I=m?dK(m.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function O(I,k){return m?new Promise(V=>{h==null||h.interpolate((k==null?void 0:k.interpolate)==="linear"?ao:Ey).scaleTo(l_(m,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>V(!0)),I)}):Promise.resolve(!1)}function P(I,k){return m?new Promise(V=>{h==null||h.interpolate((k==null?void 0:k.interpolate)==="linear"?ao:Ey).scaleBy(l_(m,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>V(!0)),I)}):Promise.resolve(!1)}function M(I){h==null||h.scaleExtent(I)}function R(I){h==null||h.translateExtent(I)}function $(I){const k=!Mi(I)||I<0?0:I;h==null||h.clickDistance(k)}return{update:y,destroy:S,setViewport:_,setViewportConstrained:E,getViewport:C,scaleTo:O,scaleBy:P,setScaleExtent:M,setTranslateExtent:R,syncViewport:A,setClickDistance:$}}var If;(function(e){e.Line="line",e.Handle="handle"})(If||(If={}));function nye({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){const o=e-t,l=n-r,u=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&i&&(u[0]=u[0]*-1),l&&a&&(u[1]=u[1]*-1),u}function RB(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function rs(e,t){return Math.max(0,t-e)}function is(e,t){return Math.max(0,e-t)}function Kv(e,t,n){return Math.max(0,t-e,e-n)}function kB(e,t){return e?!t:t}function rye(e,t,n,r,i,a,o,l){let{affectsX:u,affectsY:f}=t;const{isHorizontal:d,isVertical:h}=t,m=d&&h,{xSnapped:g,ySnapped:x}=n,{minWidth:w,maxWidth:y,minHeight:S,maxHeight:E}=r,{x:_,y:A,width:C,height:O,aspectRatio:P}=e;let M=Math.floor(d?g-e.pointerX:0),R=Math.floor(h?x-e.pointerY:0);const $=C+(u?-M:M),I=O+(f?-R:R),k=-a[0]*C,V=-a[1]*O;let D=Kv($,w,y),q=Kv(I,S,E);if(o){let H=0,Y=0;u&&M<0?H=rs(_+M+k,o[0][0]):!u&&M>0&&(H=is(_+$+k,o[1][0])),f&&R<0?Y=rs(A+R+V,o[0][1]):!f&&R>0&&(Y=is(A+I+V,o[1][1])),D=Math.max(D,H),q=Math.max(q,Y)}if(l){let H=0,Y=0;u&&M>0?H=is(_+M,l[0][0]):!u&&M<0&&(H=rs(_+$,l[1][0])),f&&R>0?Y=is(A+R,l[0][1]):!f&&R<0&&(Y=rs(A+I,l[1][1])),D=Math.max(D,H),q=Math.max(q,Y)}if(i){if(d){const H=Kv($/P,S,E)*P;if(D=Math.max(D,H),o){let Y=0;!u&&!f||u&&!f&&m?Y=is(A+V+$/P,o[1][1])*P:Y=rs(A+V+(u?M:-M)/P,o[0][1])*P,D=Math.max(D,Y)}if(l){let Y=0;!u&&!f||u&&!f&&m?Y=rs(A+$/P,l[1][1])*P:Y=is(A+(u?M:-M)/P,l[0][1])*P,D=Math.max(D,Y)}}if(h){const H=Kv(I*P,w,y)/P;if(q=Math.max(q,H),o){let Y=0;!u&&!f||f&&!u&&m?Y=is(_+I*P+k,o[1][0])/P:Y=rs(_+(f?R:-R)*P+k,o[0][0])/P,q=Math.max(q,Y)}if(l){let Y=0;!u&&!f||f&&!u&&m?Y=rs(_+I*P,l[1][0])/P:Y=is(_+(f?R:-R)*P,l[0][0])/P,q=Math.max(q,Y)}}}R=R+(R<0?q:-q),M=M+(M<0?D:-D),i&&(m?$>I*P?R=(kB(u,f)?-M:M)/P:M=(kB(u,f)?-R:R)*P:d?(R=M/P,f=u):(M=R*P,u=f));const L=u?_+M:_,z=f?A+R:A;return{width:C+(u?-M:M),height:O+(f?-R:R),x:a[0]*M*(u?-1:1)+L,y:a[1]*R*(f?-1:1)+z}}const VK={width:0,height:0,x:0,y:0},iye={...VK,pointerX:0,pointerY:0,aspectRatio:1};function aye(e){return[[0,0],[e.measured.width,e.measured.height]]}function oye(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,l=n[0]*a,u=n[1]*o;return[[r-l,i-u],[r+a-l,i+o-u]]}function sye({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const a=$r(e);let o={controlDirection:RB("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:f,boundaries:d,keepAspectRatio:h,resizeDirection:m,onResizeStart:g,onResize:x,onResizeEnd:w,shouldResize:y}){let S={...VK},E={...iye};o={boundaries:d,resizeDirection:m,keepAspectRatio:h,controlDirection:RB(f)};let _,A=null,C=[],O,P,M,R=!1;const $=QW().on("start",I=>{const{nodeLookup:k,transform:V,snapGrid:D,snapToGrid:q,nodeOrigin:L,paneDomNode:z}=n();if(_=k.get(t),!_)return;A=(z==null?void 0:z.getBoundingClientRect())??null;const{xSnapped:H,ySnapped:Y}=lp(I.sourceEvent,{transform:V,snapGrid:D,snapToGrid:q,containerBounds:A});S={width:_.measured.width??0,height:_.measured.height??0,x:_.position.x??0,y:_.position.y??0},E={...S,pointerX:H,pointerY:Y,aspectRatio:S.width/S.height},O=void 0,_.parentId&&(_.extent==="parent"||_.expandParent)&&(O=k.get(_.parentId),P=O&&_.extent==="parent"?aye(O):void 0),C=[],M=void 0;for(const[Z,U]of k)if(U.parentId===t&&(C.push({id:Z,position:{...U.position},extent:U.extent}),U.extent==="parent"||U.expandParent)){const F=oye(U,_,U.origin??L);M?M=[[Math.min(F[0][0],M[0][0]),Math.min(F[0][1],M[0][1])],[Math.max(F[1][0],M[1][0]),Math.max(F[1][1],M[1][1])]]:M=F}g==null||g(I,{...S})}).on("drag",I=>{const{transform:k,snapGrid:V,snapToGrid:D,nodeOrigin:q}=n(),L=lp(I.sourceEvent,{transform:k,snapGrid:V,snapToGrid:D,containerBounds:A}),z=[];if(!_)return;const{x:H,y:Y,width:Z,height:U}=S,F={},X=_.origin??q,{width:K,height:G,x:Q,y:J}=rye(E,o.controlDirection,L,o.boundaries,o.keepAspectRatio,X,P,M),re=K!==Z,ne=G!==U,fe=Q!==H&&re,he=J!==Y&≠if(!fe&&!he&&!re&&!ne)return;if((fe||he||X[0]===1||X[1]===1)&&(F.x=fe?Q:S.x,F.y=he?J:S.y,S.x=F.x,S.y=F.y,C.length>0)){const xe=Q-H,Ae=J-Y;for(const _e of C)_e.position={x:_e.position.x-xe+X[0]*(K-Z),y:_e.position.y-Ae+X[1]*(G-U)},z.push(_e)}if((re||ne)&&(F.width=re&&(!o.resizeDirection||o.resizeDirection==="horizontal")?K:S.width,F.height=ne&&(!o.resizeDirection||o.resizeDirection==="vertical")?G:S.height,S.width=F.width,S.height=F.height),O&&_.expandParent){const xe=X[0]*(F.width??0);F.x&&F.x<xe&&(S.x=xe,E.x=E.x-(F.x-xe));const Ae=X[1]*(F.height??0);F.y&&F.y<Ae&&(S.y=Ae,E.y=E.y-(F.y-Ae))}const oe=nye({width:S.width,prevWidth:Z,height:S.height,prevHeight:U,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),ye={...S,direction:oe};(y==null?void 0:y(I,ye))!==!1&&(R=!0,x==null||x(I,ye),r(F,z))}).on("end",I=>{R&&(w==null||w(I,{...S}),i==null||i({...S}),R=!1)});a.call($)}function u(){a.on(".drag",null)}return{update:l,destroy:u}}const lye={},DB=e=>{let t;const n=new Set,r=(d,h)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const g=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(x=>x(t,g))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(lye?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,i,u);return u},uye=e=>e?DB(e):DB,{useDebugValue:cye}=ie,{useSyncExternalStoreWithSelector:fye}=Roe,dye=e=>e;function FK(e,t=dye,n){const r=fye(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return cye(r),r}const IB=(e,t)=>{const n=uye(e),r=(i,a=t)=>FK(n,i,a);return Object.assign(r,n),r},hye=(e,t)=>e?IB(e,t):IB;function Kt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const ix=j.createContext(null),pye=ix.Provider,UK=ha.error001();function ct(e,t){const n=j.useContext(ix);if(n===null)throw new Error(UK);return FK(n,e,t)}function Xt(){const e=j.useContext(ix);if(e===null)throw new Error(UK);return j.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const LB={display:"none"},mye={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},HK="react-flow__node-desc",GK="react-flow__edge-desc",gye="react-flow__aria-live",vye=e=>e.ariaLiveMessage,yye=e=>e.ariaLabelConfig;function bye({rfId:e}){const t=ct(vye);return b.jsx("div",{id:`${gye}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:mye,children:t})}function xye({rfId:e,disableKeyboardA11y:t}){const n=ct(yye);return b.jsxs(b.Fragment,{children:[b.jsx("div",{id:`${HK}-${e}`,style:LB,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),b.jsx("div",{id:`${GK}-${e}`,style:LB,children:n["edge.a11yDescription.default"]}),!t&&b.jsx(bye,{rfId:e})]})}const ax=j.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},a)=>{const o=`${e}`.split("-");return b.jsx("div",{className:yn(["react-flow__panel",n,...o]),style:r,ref:a,...i,children:t})});ax.displayName="Panel";function wye({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:b.jsx(ax,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:b.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Sye=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Yv=e=>e.id;function _ye(e,t){return Kt(e.selectedNodes.map(Yv),t.selectedNodes.map(Yv))&&Kt(e.selectedEdges.map(Yv),t.selectedEdges.map(Yv))}function Eye({onSelectionChange:e}){const t=Xt(),{selectedNodes:n,selectedEdges:r}=ct(Sye,_ye);return j.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,r,e]),null}const Aye=e=>!!e.onSelectionChangeHandlers;function Cye({onSelectionChange:e}){const t=ct(Aye);return e||t?b.jsx(Eye,{onSelectionChange:e}):null}const kN=typeof window<"u"?j.useLayoutEffect:j.useEffect,WK=[0,0],Tye={x:0,y:0,zoom:1},Oye=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],$B=[...Oye,"rfId"],jye=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),BB={translateExtent:Ip,nodeOrigin:WK,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Nye(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:u}=ct(jye,Kt),f=Xt();kN(()=>(u(e.defaultNodes,e.defaultEdges),()=>{d.current=BB,l()}),[]);const d=j.useRef(BB);return kN(()=>{for(const h of $B){const m=e[h],g=d.current[h];m!==g&&(typeof e[h]>"u"||(h==="nodes"?t(m):h==="edges"?n(m):h==="minZoom"?r(m):h==="maxZoom"?i(m):h==="translateExtent"?a(m):h==="nodeExtent"?o(m):h==="ariaLabelConfig"?f.setState({ariaLabelConfig:bve(m)}):h==="fitView"?f.setState({fitViewQueued:m}):h==="fitViewOptions"?f.setState({fitViewOptions:m}):f.setState({[h]:m})))}d.current=e},$B.map(h=>e[h])),null}function qB(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Pye(e){var r;const[t,n]=j.useState(e==="system"?null:e);return j.useEffect(()=>{if(e!=="system"){n(e);return}const i=qB(),a=()=>n(i!=null&&i.matches?"dark":"light");return a(),i==null||i.addEventListener("change",a),()=>{i==null||i.removeEventListener("change",a)}},[e]),t!==null?t:(r=qB())!=null&&r.matches?"dark":"light"}const zB=typeof document<"u"?document:null;function qp(e=null,t={target:zB,actInsideInputWithModifier:!0}){const[n,r]=j.useState(!1),i=j.useRef(!1),a=j.useRef(new Set([])),[o,l]=j.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",`
|
|
360
|
+
`).replace(`
|
|
361
|
+
|
|
362
|
+
`,`
|
|
363
|
+
+`).split(`
|
|
364
|
+
`)),d=f.reduce((h,m)=>h.concat(...m),[]);return[f,d]}return[[],[]]},[e]);return j.useEffect(()=>{const u=(t==null?void 0:t.target)??zB,f=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=g=>{var y,S;if(i.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!i.current||i.current&&!f)&&CK(g))return!1;const w=FB(g.code,l);if(a.current.add(g[w]),VB(o,a.current,!1)){const E=((S=(y=g.composedPath)==null?void 0:y.call(g))==null?void 0:S[0])||g.target,_=(E==null?void 0:E.nodeName)==="BUTTON"||(E==null?void 0:E.nodeName)==="A";t.preventDefault!==!1&&(i.current||!_)&&g.preventDefault(),r(!0)}},h=g=>{const x=FB(g.code,l);VB(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[x]),g.key==="Meta"&&a.current.clear(),i.current=!1},m=()=>{a.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",d),u==null||u.addEventListener("keyup",h),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{u==null||u.removeEventListener("keydown",d),u==null||u.removeEventListener("keyup",h),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),n}function VB(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function FB(e,t){return t.includes(e)?"code":"key"}const Mye=()=>{const e=Xt();return j.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:a,maxZoom:o,panZoom:l}=e.getState(),u=DR(t,r,i,a,o,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(u,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;const{x:l,y:u}=o.getBoundingClientRect(),f={x:t.x-l,y:t.y-u},d=n.snapGrid??i,h=n.snapToGrid??a;return Hm(f,r,h,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:a}=r.getBoundingClientRect(),o=vb(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function KK(e,t){const n=[],r=new Map,i=[];for(const a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of t){const o=r.get(a.id);if(!o){n.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){n.push({...o[0].item});continue}const l={...a};for(const u of o)Rye(u,l);n.push(l)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function Rye(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function kye(e,t){return KK(e,t)}function Dye(e,t){return KK(e,t)}function Dl(e,t){return{id:e,type:"select",selected:t}}function Fc(e,t=new Set,n=!1){const r=[];for(const[i,a]of e){const o=t.has(i);!(a.selected===void 0&&!o)&&a.selected!==o&&(n&&(a.selected=o),r.push(Dl(a.id,o)))}return r}function UB({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,o]of e.entries()){const l=t.get(o.id),u=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;u!==void 0&&u!==o&&n.push({id:o.id,item:o,type:"replace"}),u===void 0&&n.push({item:o,type:"add",index:a})}for(const[a]of t)r.get(a)===void 0&&n.push({id:a,type:"remove"});return n}function HB(e){return{id:e.id,type:"remove"}}const GB=e=>uve(e),Iye=e=>yK(e);function YK(e){return j.forwardRef(e)}function WB(e){const[t,n]=j.useState(BigInt(0)),[r]=j.useState(()=>Lye(()=>n(i=>i+BigInt(1))));return kN(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function Lye(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const XK=j.createContext(null);function $ye({children:e}){const t=Xt(),n=j.useCallback(l=>{const{nodes:u=[],setNodes:f,hasDefaultNodes:d,onNodesChange:h,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:x}=t.getState();let w=u;for(const S of l)w=typeof S=="function"?S(w):S;let y=UB({items:w,lookup:m});for(const S of x.values())y=S(y);d&&f(w),y.length>0?h==null||h(y):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:S,nodes:E,setNodes:_}=t.getState();S&&_(E)})},[]),r=WB(n),i=j.useCallback(l=>{const{edges:u=[],setEdges:f,hasDefaultEdges:d,onEdgesChange:h,edgeLookup:m}=t.getState();let g=u;for(const x of l)g=typeof x=="function"?x(g):x;d?f(g):h&&h(UB({items:g,lookup:m}))},[]),a=WB(i),o=j.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return b.jsx(XK.Provider,{value:o,children:e})}function Bye(){const e=j.useContext(XK);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const qye=e=>!!e.panZoom;function VR(){const e=Mye(),t=Xt(),n=Bye(),r=ct(qye),i=j.useMemo(()=>{const a=h=>t.getState().nodeLookup.get(h),o=h=>{n.nodeQueue.push(h)},l=h=>{n.edgeQueue.push(h)},u=h=>{var S,E;const{nodeLookup:m,nodeOrigin:g}=t.getState(),x=GB(h)?h:m.get(h.id),w=x.parentId?EK(x.position,x.measured,x.parentId,m,g):x.position,y={...x,position:w,width:((S=x.measured)==null?void 0:S.width)??x.width,height:((E=x.measured)==null?void 0:E.height)??x.height};return kf(y)},f=(h,m,g={replace:!1})=>{o(x=>x.map(w=>{if(w.id===h){const y=typeof m=="function"?m(w):m;return g.replace&&GB(y)?y:{...w,...y}}return w}))},d=(h,m,g={replace:!1})=>{l(x=>x.map(w=>{if(w.id===h){const y=typeof m=="function"?m(w):m;return g.replace&&Iye(y)?y:{...w,...y}}return w}))};return{getNodes:()=>t.getState().nodes.map(h=>({...h})),getNode:h=>{var m;return(m=a(h))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:h=[]}=t.getState();return h.map(m=>({...m}))},getEdge:h=>t.getState().edgeLookup.get(h),setNodes:o,setEdges:l,addNodes:h=>{const m=Array.isArray(h)?h:[h];n.nodeQueue.push(g=>[...g,...m])},addEdges:h=>{const m=Array.isArray(h)?h:[h];n.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:h=[],edges:m=[],transform:g}=t.getState(),[x,w,y]=g;return{nodes:h.map(S=>({...S})),edges:m.map(S=>({...S})),viewport:{x,y:w,zoom:y}}},deleteElements:async({nodes:h=[],edges:m=[]})=>{const{nodes:g,edges:x,onNodesDelete:w,onEdgesDelete:y,triggerNodeChanges:S,triggerEdgeChanges:E,onDelete:_,onBeforeDelete:A}=t.getState(),{nodes:C,edges:O}=await pve({nodesToRemove:h,edgesToRemove:m,nodes:g,edges:x,onBeforeDelete:A}),P=O.length>0,M=C.length>0;if(P){const R=O.map(HB);y==null||y(O),E(R)}if(M){const R=C.map(HB);w==null||w(C),S(R)}return(M||P)&&(_==null||_({nodes:C,edges:O})),{deletedNodes:C,deletedEdges:O}},getIntersectingNodes:(h,m=!0,g)=>{const x=SB(h),w=x?h:u(h),y=g!==void 0;return w?(g||t.getState().nodes).filter(S=>{const E=t.getState().nodeLookup.get(S.id);if(E&&!x&&(S.id===h.id||!E.internals.positionAbsolute))return!1;const _=kf(y?S:E),A=$p(_,w);return m&&A>0||A>=_.width*_.height||A>=w.width*w.height}):[]},isNodeIntersecting:(h,m,g=!0)=>{const w=SB(h)?h:u(h);if(!w)return!1;const y=$p(w,m);return g&&y>0||y>=m.width*m.height||y>=w.width*w.height},updateNode:f,updateNodeData:(h,m,g={replace:!1})=>{f(h,x=>{const w=typeof m=="function"?m(x):m;return g.replace?{...x,data:w}:{...x,data:{...x.data,...w}}},g)},updateEdge:d,updateEdgeData:(h,m,g={replace:!1})=>{d(h,x=>{const w=typeof m=="function"?m(x):m;return g.replace?{...x,data:w}:{...x,data:{...x.data,...w}}},g)},getNodesBounds:h=>{const{nodeLookup:m,nodeOrigin:g}=t.getState();return cve(h,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:h,id:m,nodeId:g})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${g}-${h}${m?`-${m}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:h,handleId:m,nodeId:g})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${g}${h?m?`-${h}-${m}`:`-${h}`:""}`))==null?void 0:x.values())??[])},fitView:async h=>{const m=t.getState().fitViewResolver??yve();return t.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:m}),n.nodeQueue.push(g=>[...g]),m.promise}}},[]);return j.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const KB=e=>e.selected,zye=typeof window<"u"?window:void 0;function Vye({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Xt(),{deleteElements:r}=VR(),i=qp(e,{actInsideInputWithModifier:!1}),a=qp(t,{target:zye});j.useEffect(()=>{if(i){const{edges:o,nodes:l}=n.getState();r({nodes:l.filter(KB),edges:o.filter(KB)}),n.setState({nodesSelectionActive:!1})}},[i]),j.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function Fye(e){const t=Xt();j.useEffect(()=>{const n=()=>{var i,a,o,l;if(!e.current||!(((a=(i=e.current).checkVisibility)==null?void 0:a.call(i))??!0))return!1;const r=IR(e.current);(r.height===0||r.width===0)&&((l=(o=t.getState()).onError)==null||l.call(o,"004",ha.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const ox={position:"absolute",width:"100%",height:"100%",top:0,left:0},Uye=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Hye({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=lu.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:u,translateExtent:f,minZoom:d,maxZoom:h,zoomActivationKeyCode:m,preventScrolling:g=!0,children:x,noWheelClassName:w,noPanClassName:y,onViewportChange:S,isControlledViewport:E,paneClickDistance:_,selectionOnDrag:A}){const C=Xt(),O=j.useRef(null),{userSelectionActive:P,lib:M,connectionInProgress:R}=ct(Uye,Kt),$=qp(m),I=j.useRef();Fye(O);const k=j.useCallback(V=>{S==null||S({x:V[0],y:V[1],zoom:V[2]}),E||C.setState({transform:V})},[S,E]);return j.useEffect(()=>{if(O.current){I.current=tye({domNode:O.current,minZoom:d,maxZoom:h,translateExtent:f,viewport:u,onDraggingChange:L=>C.setState(z=>z.paneDragging===L?z:{paneDragging:L}),onPanZoomStart:(L,z)=>{const{onViewportChangeStart:H,onMoveStart:Y}=C.getState();Y==null||Y(L,z),H==null||H(z)},onPanZoom:(L,z)=>{const{onViewportChange:H,onMove:Y}=C.getState();Y==null||Y(L,z),H==null||H(z)},onPanZoomEnd:(L,z)=>{const{onViewportChangeEnd:H,onMoveEnd:Y}=C.getState();Y==null||Y(L,z),H==null||H(z)}});const{x:V,y:D,zoom:q}=I.current.getViewport();return C.setState({panZoom:I.current,transform:[V,D,q],domNode:O.current.closest(".react-flow")}),()=>{var L;(L=I.current)==null||L.destroy()}}},[]),j.useEffect(()=>{var V;(V=I.current)==null||V.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:$,preventScrolling:g,noPanClassName:y,userSelectionActive:P,noWheelClassName:w,lib:M,onTransformChange:k,connectionInProgress:R,selectionOnDrag:A,paneClickDistance:_})},[e,t,n,r,i,a,o,l,$,g,y,P,w,M,k,R,A,_]),b.jsx("div",{className:"react-flow__renderer",ref:O,style:ox,children:x})}const Gye=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Wye(){const{userSelectionActive:e,userSelectionRect:t}=ct(Gye,Kt);return e&&t?b.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const u_=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Kye=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Yye({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Lp.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:l,onPaneClick:u,onPaneContextMenu:f,onPaneScroll:d,onPaneMouseEnter:h,onPaneMouseMove:m,onPaneMouseLeave:g,children:x}){const w=Xt(),{userSelectionActive:y,elementsSelectable:S,dragging:E,connectionInProgress:_}=ct(Kye,Kt),A=S&&(e||y),C=j.useRef(null),O=j.useRef(),P=j.useRef(new Set),M=j.useRef(new Set),R=j.useRef(!1),$=H=>{if(R.current||_){R.current=!1;return}u==null||u(H),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},I=H=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){H.preventDefault();return}f==null||f(H)},k=d?H=>d(H):void 0,V=H=>{R.current&&(H.stopPropagation(),R.current=!1)},D=H=>{var G,Q;const{domNode:Y}=w.getState();if(O.current=Y==null?void 0:Y.getBoundingClientRect(),!O.current)return;const Z=H.target===C.current;if(!Z&&!!H.target.closest(".nokey")||!e||!(a&&Z||t)||H.button!==0||!H.isPrimary)return;(Q=(G=H.target)==null?void 0:G.setPointerCapture)==null||Q.call(G,H.pointerId),R.current=!1;const{x:X,y:K}=Ri(H.nativeEvent,O.current);w.setState({userSelectionRect:{width:0,height:0,startX:X,startY:K,x:X,y:K}}),Z||(H.stopPropagation(),H.preventDefault())},q=H=>{const{userSelectionRect:Y,transform:Z,nodeLookup:U,edgeLookup:F,connectionLookup:X,triggerNodeChanges:K,triggerEdgeChanges:G,defaultEdgeOptions:Q,resetSelectedElements:J}=w.getState();if(!O.current||!Y)return;const{x:re,y:ne}=Ri(H.nativeEvent,O.current),{startX:fe,startY:he}=Y;if(!R.current){const Ae=t?0:i;if(Math.hypot(re-fe,ne-he)<=Ae)return;J(),o==null||o(H)}R.current=!0;const oe={startX:fe,startY:he,x:re<fe?re:fe,y:ne<he?ne:he,width:Math.abs(re-fe),height:Math.abs(ne-he)},ye=P.current,be=M.current;P.current=new Set(kR(U,oe,Z,n===Lp.Partial,!0).map(Ae=>Ae.id)),M.current=new Set;const xe=(Q==null?void 0:Q.selectable)??!0;for(const Ae of P.current){const _e=X.get(Ae);if(_e)for(const{edgeId:tt}of _e.values()){const nt=F.get(tt);nt&&(nt.selectable??xe)&&M.current.add(tt)}}if(!_B(ye,P.current)){const Ae=Fc(U,P.current,!0);K(Ae)}if(!_B(be,M.current)){const Ae=Fc(F,M.current);G(Ae)}w.setState({userSelectionRect:oe,userSelectionActive:!0,nodesSelectionActive:!1})},L=H=>{var Y,Z;H.button===0&&((Z=(Y=H.target)==null?void 0:Y.releasePointerCapture)==null||Z.call(Y,H.pointerId),!y&&H.target===C.current&&w.getState().userSelectionRect&&($==null||$(H)),w.setState({userSelectionActive:!1,userSelectionRect:null}),R.current&&(l==null||l(H),w.setState({nodesSelectionActive:P.current.size>0})))},z=r===!0||Array.isArray(r)&&r.includes(0);return b.jsxs("div",{className:yn(["react-flow__pane",{draggable:z,dragging:E,selection:e}]),onClick:A?void 0:u_($,C),onContextMenu:u_(I,C),onWheel:u_(k,C),onPointerEnter:A?void 0:h,onPointerMove:A?q:m,onPointerUp:A?L:void 0,onPointerDownCapture:A?D:void 0,onClickCapture:A?V:void 0,onPointerLeave:g,ref:C,style:ox,children:[x,b.jsx(Wye,{})]})}function DN({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:l,onError:u}=t.getState(),f=l.get(e);if(!f){u==null||u("012",ha.error012(e));return}t.setState({nodesSelectionActive:!1}),f.selected?(n||f.selected&&o)&&(a({nodes:[f],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):i([e])}function ZK({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){const l=Xt(),[u,f]=j.useState(!1),d=j.useRef();return j.useEffect(()=>{d.current=zve({getStoreItems:()=>l.getState(),onNodeMouseDown:h=>{DN({id:h,store:l,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),j.useEffect(()=>{if(!(t||!e.current||!d.current))return d.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{var h;(h=d.current)==null||h.destroy()}},[n,r,t,a,e,i,o]),u}const Xye=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function QK(){const e=Xt();return j.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:a,nodesDraggable:o,onError:l,updateNodePositions:u,nodeLookup:f,nodeOrigin:d}=e.getState(),h=new Map,m=Xye(o),g=i?a[0]:5,x=i?a[1]:5,w=n.direction.x*g*n.factor,y=n.direction.y*x*n.factor;for(const[,S]of f){if(!m(S))continue;let E={x:S.internals.positionAbsolute.x+w,y:S.internals.positionAbsolute.y+y};i&&(E=Um(E,a));const{position:_,positionAbsolute:A}=bK({nodeId:S.id,nextPosition:E,nodeLookup:f,nodeExtent:r,nodeOrigin:d,onError:l});S.position=_,S.internals.positionAbsolute=A,h.set(S.id,S)}u(h)},[])}const FR=j.createContext(null),Zye=FR.Provider;FR.Consumer;const JK=()=>j.useContext(FR),Qye=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Jye=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:l,toHandle:u,isValid:f}=o,d=(u==null?void 0:u.nodeId)===e&&(u==null?void 0:u.id)===t&&(u==null?void 0:u.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:d,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:a===Mf.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:d&&f}};function ebe({type:e="source",position:t=Ie.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:u,className:f,onMouseDown:d,onTouchStart:h,...m},g){var q,L;const x=o||null,w=e==="target",y=Xt(),S=JK(),{connectOnClick:E,noPanClassName:_,rfId:A}=ct(Qye,Kt),{connectingFrom:C,connectingTo:O,clickConnecting:P,isPossibleEndHandle:M,connectionInProcess:R,clickConnectionInProcess:$,valid:I}=ct(Jye(S,x,e),Kt);S||(L=(q=y.getState()).onError)==null||L.call(q,"010",ha.error010());const k=z=>{const{defaultEdgeOptions:H,onConnect:Y,hasDefaultEdges:Z}=y.getState(),U={...H,...z};if(Z){const{edges:F,setEdges:X}=y.getState();X(Ave(U,F))}Y==null||Y(U),l==null||l(U)},V=z=>{if(!S)return;const H=TK(z.nativeEvent);if(i&&(H&&z.button===0||!H)){const Y=y.getState();RN.onPointerDown(z.nativeEvent,{handleDomNode:z.currentTarget,autoPanOnConnect:Y.autoPanOnConnect,connectionMode:Y.connectionMode,connectionRadius:Y.connectionRadius,domNode:Y.domNode,nodeLookup:Y.nodeLookup,lib:Y.lib,isTarget:w,handleId:x,nodeId:S,flowId:Y.rfId,panBy:Y.panBy,cancelConnection:Y.cancelConnection,onConnectStart:Y.onConnectStart,onConnectEnd:(...Z)=>{var U,F;return(F=(U=y.getState()).onConnectEnd)==null?void 0:F.call(U,...Z)},updateConnection:Y.updateConnection,onConnect:k,isValidConnection:n||((...Z)=>{var U,F;return((F=(U=y.getState()).isValidConnection)==null?void 0:F.call(U,...Z))??!0}),getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,autoPanSpeed:Y.autoPanSpeed,dragThreshold:Y.connectionDragThreshold})}H?d==null||d(z):h==null||h(z)},D=z=>{const{onClickConnectStart:H,onClickConnectEnd:Y,connectionClickStartHandle:Z,connectionMode:U,isValidConnection:F,lib:X,rfId:K,nodeLookup:G,connection:Q}=y.getState();if(!S||!Z&&!i)return;if(!Z){H==null||H(z.nativeEvent,{nodeId:S,handleId:x,handleType:e}),y.setState({connectionClickStartHandle:{nodeId:S,type:e,id:x}});return}const J=AK(z.target),re=n||F,{connection:ne,isValid:fe}=RN.isValid(z.nativeEvent,{handle:{nodeId:S,id:x,type:e},connectionMode:U,fromNodeId:Z.nodeId,fromHandleId:Z.id||null,fromType:Z.type,isValidConnection:re,flowId:K,doc:J,lib:X,nodeLookup:G});fe&&ne&&k(ne);const he=structuredClone(Q);delete he.inProgress,he.toPosition=he.toHandle?he.toHandle.position:null,Y==null||Y(z,he),y.setState({connectionClickStartHandle:null})};return b.jsx("div",{"data-handleid":x,"data-nodeid":S,"data-handlepos":t,"data-id":`${A}-${S}-${x}-${e}`,className:yn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",_,f,{source:!w,target:w,connectable:r,connectablestart:i,connectableend:a,clickconnecting:P,connectingfrom:C,connectingto:O,valid:I,connectionindicator:r&&(!R||M)&&(R||$?a:i)}]),onMouseDown:V,onTouchStart:V,onClick:E?D:void 0,ref:g,...m,children:u})}const Lf=j.memo(YK(ebe));function tbe({data:e,isConnectable:t,sourcePosition:n=Ie.Bottom}){return b.jsxs(b.Fragment,{children:[e==null?void 0:e.label,b.jsx(Lf,{type:"source",position:n,isConnectable:t})]})}function nbe({data:e,isConnectable:t,targetPosition:n=Ie.Top,sourcePosition:r=Ie.Bottom}){return b.jsxs(b.Fragment,{children:[b.jsx(Lf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,b.jsx(Lf,{type:"source",position:r,isConnectable:t})]})}function rbe(){return null}function ibe({data:e,isConnectable:t,targetPosition:n=Ie.Top}){return b.jsxs(b.Fragment,{children:[b.jsx(Lf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const yb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},YB={input:tbe,default:nbe,output:ibe,group:rbe};function abe(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const obe=e=>{const{width:t,height:n,x:r,y:i}=Fm(e.nodeLookup,{filter:a=>!!a.selected});return{width:Mi(t)?t:null,height:Mi(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function sbe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Xt(),{width:i,height:a,transformString:o,userSelectionActive:l}=ct(obe,Kt),u=QK(),f=j.useRef(null);j.useEffect(()=>{var g;n||(g=f.current)==null||g.focus({preventScroll:!0})},[n]);const d=!l&&i!==null&&a!==null;if(ZK({nodeRef:f,disabled:!d}),!d)return null;const h=e?g=>{const x=r.getState().nodes.filter(w=>w.selected);e(g,x)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(yb,g.key)&&(g.preventDefault(),u({direction:yb[g.key],factor:g.shiftKey?4:1}))};return b.jsx("div",{className:yn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:b.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:m,style:{width:i,height:a}})})}const XB=typeof window<"u"?window:void 0,lbe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function eY({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:u,selectionKeyCode:f,selectionOnDrag:d,selectionMode:h,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:x,panActivationKeyCode:w,zoomActivationKeyCode:y,elementsSelectable:S,zoomOnScroll:E,zoomOnPinch:_,panOnScroll:A,panOnScrollSpeed:C,panOnScrollMode:O,zoomOnDoubleClick:P,panOnDrag:M,defaultViewport:R,translateExtent:$,minZoom:I,maxZoom:k,preventScrolling:V,onSelectionContextMenu:D,noWheelClassName:q,noPanClassName:L,disableKeyboardA11y:z,onViewportChange:H,isControlledViewport:Y}){const{nodesSelectionActive:Z,userSelectionActive:U}=ct(lbe,Kt),F=qp(f,{target:XB}),X=qp(w,{target:XB}),K=X||M,G=X||A,Q=d&&K!==!0,J=F||U||Q;return Vye({deleteKeyCode:u,multiSelectionKeyCode:x}),b.jsx(Hye,{onPaneContextMenu:a,elementsSelectable:S,zoomOnScroll:E,zoomOnPinch:_,panOnScroll:G,panOnScrollSpeed:C,panOnScrollMode:O,zoomOnDoubleClick:P,panOnDrag:!F&&K,defaultViewport:R,translateExtent:$,minZoom:I,maxZoom:k,zoomActivationKeyCode:y,preventScrolling:V,noWheelClassName:q,noPanClassName:L,onViewportChange:H,isControlledViewport:Y,paneClickDistance:l,selectionOnDrag:Q,children:b.jsxs(Yye,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:K,isSelecting:!!J,selectionMode:h,selectionKeyPressed:F,paneClickDistance:l,selectionOnDrag:Q,children:[e,Z&&b.jsx(sbe,{onSelectionContextMenu:D,noPanClassName:L,disableKeyboardA11y:z})]})})}eY.displayName="FlowRenderer";const ube=j.memo(eY),cbe=e=>t=>e?kR(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function fbe(e){return ct(j.useCallback(cbe(e),[e]),Kt)}const dbe=e=>e.updateNodeInternals;function hbe(){const e=ct(dbe),[t]=j.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const a=i.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:i.target,force:!0})}),e(r)}));return j.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function pbe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Xt(),a=j.useRef(null),o=j.useRef(null),l=j.useRef(e.sourcePosition),u=j.useRef(e.targetPosition),f=j.useRef(t),d=n&&!!e.internals.handleBounds;return j.useEffect(()=>{a.current&&!e.hidden&&(!d||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[d,e.hidden]),j.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),j.useEffect(()=>{if(a.current){const h=f.current!==t,m=l.current!==e.sourcePosition,g=u.current!==e.targetPosition;(h||m||g)&&(f.current=t,l.current=e.sourcePosition,u.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function mbe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:u,nodesConnectable:f,nodesFocusable:d,resizeObserver:h,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:x,rfId:w,nodeTypes:y,nodeClickDistance:S,onError:E}){const{node:_,internals:A,isParent:C}=ct(re=>{const ne=re.nodeLookup.get(e),fe=re.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:fe}},Kt);let O=_.type||"default",P=(y==null?void 0:y[O])||YB[O];P===void 0&&(E==null||E("003",ha.error003(O)),O="default",P=(y==null?void 0:y.default)||YB.default);const M=!!(_.draggable||l&&typeof _.draggable>"u"),R=!!(_.selectable||u&&typeof _.selectable>"u"),$=!!(_.connectable||f&&typeof _.connectable>"u"),I=!!(_.focusable||d&&typeof _.focusable>"u"),k=Xt(),V=_K(_),D=pbe({node:_,nodeType:O,hasDimensions:V,resizeObserver:h}),q=ZK({nodeRef:D,disabled:_.hidden||!M,noDragClassName:m,handleSelector:_.dragHandle,nodeId:e,isSelectable:R,nodeClickDistance:S}),L=QK();if(_.hidden)return null;const z=wo(_),H=abe(_),Y=R||M||t||n||r||i,Z=n?re=>n(re,{...A.userNode}):void 0,U=r?re=>r(re,{...A.userNode}):void 0,F=i?re=>i(re,{...A.userNode}):void 0,X=a?re=>a(re,{...A.userNode}):void 0,K=o?re=>o(re,{...A.userNode}):void 0,G=re=>{const{selectNodesOnDrag:ne,nodeDragThreshold:fe}=k.getState();R&&(!ne||!M||fe>0)&&DN({id:e,store:k,nodeRef:D}),t&&t(re,{...A.userNode})},Q=re=>{if(!(CK(re.nativeEvent)||x)){if(pK.includes(re.key)&&R){const ne=re.key==="Escape";DN({id:e,store:k,unselect:ne,nodeRef:D})}else if(M&&_.selected&&Object.prototype.hasOwnProperty.call(yb,re.key)){re.preventDefault();const{ariaLabelConfig:ne}=k.getState();k.setState({ariaLiveMessage:ne["node.a11yDescription.ariaLiveMessage"]({direction:re.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),L({direction:yb[re.key],factor:re.shiftKey?4:1})}}},J=()=>{var be;if(x||!((be=D.current)!=null&&be.matches(":focus-visible")))return;const{transform:re,width:ne,height:fe,autoPanOnNodeFocus:he,setCenter:oe}=k.getState();if(!he)return;kR(new Map([[e,_]]),{x:0,y:0,width:ne,height:fe},re,!0).length>0||oe(_.position.x+z.width/2,_.position.y+z.height/2,{zoom:re[2]})};return b.jsx("div",{className:yn(["react-flow__node",`react-flow__node-${O}`,{[g]:M},_.className,{selected:_.selected,selectable:R,parent:C,draggable:M,dragging:q}]),ref:D,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:Y?"all":"none",visibility:V?"visible":"hidden",..._.style,...H},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:Z,onMouseMove:U,onMouseLeave:F,onContextMenu:X,onClick:G,onDoubleClick:K,onKeyDown:I?Q:void 0,tabIndex:I?0:void 0,onFocus:I?J:void 0,role:_.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${HK}-${w}`,"aria-label":_.ariaLabel,..._.domAttributes,children:b.jsx(Zye,{value:e,children:b.jsx(P,{id:e,data:_.data,type:O,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:_.selected??!1,selectable:R,draggable:M,deletable:_.deletable??!0,isConnectable:$,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:q,dragHandle:_.dragHandle,zIndex:A.z,parentId:_.parentId,...z})})})}var gbe=j.memo(mbe);const vbe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function tY(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=ct(vbe,Kt),o=fbe(e.onlyRenderVisibleElements),l=hbe();return b.jsx("div",{className:"react-flow__nodes",style:ox,children:o.map(u=>b.jsx(gbe,{id:u,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},u))})}tY.displayName="NodeRenderer";const ybe=j.memo(tY);function bbe(e){return ct(j.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const a=n.nodeLookup.get(i.source),o=n.nodeLookup.get(i.target);a&&o&&Sve({sourceNode:a,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Kt)}const xbe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return b.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},wbe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return b.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},ZB={[mb.Arrow]:xbe,[mb.ArrowClosed]:wbe};function Sbe(e){const t=Xt();return j.useMemo(()=>{var i,a;return Object.prototype.hasOwnProperty.call(ZB,e)?ZB[e]:((a=(i=t.getState()).onError)==null||a.call(i,"009",ha.error009(e)),null)},[e])}const _be=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const u=Sbe(t);return u?b.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:b.jsx(u,{color:n,strokeWidth:o})}):null},nY=({defaultColor:e,rfId:t})=>{const n=ct(a=>a.edges),r=ct(a=>a.defaultEdgeOptions),i=j.useMemo(()=>Nve(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?b.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:b.jsx("defs",{children:i.map(a=>b.jsx(_be,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};nY.displayName="MarkerDefinitions";var Ebe=j.memo(nY);function rY({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:u,className:f,...d}){const[h,m]=j.useState({x:1,y:0,width:0,height:0}),g=yn(["react-flow__edge-textwrapper",f]),x=j.useRef(null);return j.useEffect(()=>{if(x.current){const w=x.current.getBBox();m({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?b.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",...d,children:[i&&b.jsx("rect",{width:h.width+2*o[0],x:-o[0],y:-o[1],height:h.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),b.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:x,style:r,children:n}),u]}):null}rY.displayName="EdgeText";const Abe=j.memo(rY);function sx({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u,interactionWidth:f=20,...d}){return b.jsxs(b.Fragment,{children:[b.jsx("path",{...d,d:e,fill:"none",className:yn(["react-flow__edge-path",d.className])}),f?b.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}):null,r&&Mi(t)&&Mi(n)?b.jsx(Abe,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u}):null]})}function QB({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Ie.Left||e===Ie.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function iY({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top}){const[o,l]=QB({pos:n,x1:e,y1:t,x2:r,y2:i}),[u,f]=QB({pos:a,x1:r,y1:i,x2:e,y2:t}),[d,h,m,g]=OK({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:l,targetControlX:u,targetControlY:f});return[`M${e},${t} C${o},${l} ${u},${f} ${r},${i}`,d,h,m,g]}function aY(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:l,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:x,markerEnd:w,markerStart:y,interactionWidth:S})=>{const[E,_,A]=iY({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l}),C=e.isInternal?void 0:t;return b.jsx(sx,{id:C,path:E,labelX:_,labelY:A,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:x,markerEnd:w,markerStart:y,interactionWidth:S})})}const Cbe=aY({isInternal:!1}),oY=aY({isInternal:!0});Cbe.displayName="SimpleBezierEdge";oY.displayName="SimpleBezierEdgeInternal";function sY(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,sourcePosition:g=Ie.Bottom,targetPosition:x=Ie.Top,markerEnd:w,markerStart:y,pathOptions:S,interactionWidth:E})=>{const[_,A,C]=NN({sourceX:n,sourceY:r,sourcePosition:g,targetX:i,targetY:a,targetPosition:x,borderRadius:S==null?void 0:S.borderRadius,offset:S==null?void 0:S.offset,stepPosition:S==null?void 0:S.stepPosition}),O=e.isInternal?void 0:t;return b.jsx(sx,{id:O,path:_,labelX:A,labelY:C,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:y,interactionWidth:E})})}const lY=sY({isInternal:!1}),uY=sY({isInternal:!0});lY.displayName="SmoothStepEdge";uY.displayName="SmoothStepEdgeInternal";function cY(e){return j.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return b.jsx(lY,{...n,id:r,pathOptions:j.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const Tbe=cY({isInternal:!1}),fY=cY({isInternal:!0});Tbe.displayName="StepEdge";fY.displayName="StepEdgeInternal";function dY(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:x,interactionWidth:w})=>{const[y,S,E]=PK({sourceX:n,sourceY:r,targetX:i,targetY:a}),_=e.isInternal?void 0:t;return b.jsx(sx,{id:_,path:y,labelX:S,labelY:E,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:x,interactionWidth:w})})}const Obe=dY({isInternal:!1}),hY=dY({isInternal:!0});Obe.displayName="StraightEdge";hY.displayName="StraightEdgeInternal";function pY(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=Ie.Bottom,targetPosition:l=Ie.Top,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:x,markerEnd:w,markerStart:y,pathOptions:S,interactionWidth:E})=>{const[_,A,C]=jK({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l,curvature:S==null?void 0:S.curvature}),O=e.isInternal?void 0:t;return b.jsx(sx,{id:O,path:_,labelX:A,labelY:C,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:x,markerEnd:w,markerStart:y,interactionWidth:E})})}const jbe=pY({isInternal:!1}),mY=pY({isInternal:!0});jbe.displayName="BezierEdge";mY.displayName="BezierEdgeInternal";const JB={default:mY,straight:hY,step:fY,smoothstep:uY,simplebezier:oY},eq={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Nbe=(e,t,n)=>n===Ie.Left?e-t:n===Ie.Right?e+t:e,Pbe=(e,t,n)=>n===Ie.Top?e-t:n===Ie.Bottom?e+t:e,tq="react-flow__edgeupdater";function nq({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:l}){return b.jsx("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:yn([tq,`${tq}-${l}`]),cx:Nbe(t,r,e),cy:Pbe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function Mbe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:l,targetPosition:u,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,setReconnecting:m,setUpdateHover:g}){const x=Xt(),w=(A,C)=>{if(A.button!==0)return;const{autoPanOnConnect:O,domNode:P,connectionMode:M,connectionRadius:R,lib:$,onConnectStart:I,cancelConnection:k,nodeLookup:V,rfId:D,panBy:q,updateConnection:L}=x.getState(),z=C.type==="target",H=(U,F)=>{m(!1),h==null||h(U,n,C.type,F)},Y=U=>f==null?void 0:f(n,U),Z=(U,F)=>{m(!0),d==null||d(A,n,C.type),I==null||I(U,F)};RN.onPointerDown(A.nativeEvent,{autoPanOnConnect:O,connectionMode:M,connectionRadius:R,domNode:P,handleId:C.id,nodeId:C.nodeId,nodeLookup:V,isTarget:z,edgeUpdaterType:C.type,lib:$,flowId:D,cancelConnection:k,panBy:q,isValidConnection:(...U)=>{var F,X;return((X=(F=x.getState()).isValidConnection)==null?void 0:X.call(F,...U))??!0},onConnect:Y,onConnectStart:Z,onConnectEnd:(...U)=>{var F,X;return(X=(F=x.getState()).onConnectEnd)==null?void 0:X.call(F,...U)},onReconnectEnd:H,updateConnection:L,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},y=A=>w(A,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),S=A=>w(A,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),E=()=>g(!0),_=()=>g(!1);return b.jsxs(b.Fragment,{children:[(e===!0||e==="source")&&b.jsx(nq,{position:l,centerX:r,centerY:i,radius:t,onMouseDown:y,onMouseEnter:E,onMouseOut:_,type:"source"}),(e===!0||e==="target")&&b.jsx(nq,{position:u,centerX:a,centerY:o,radius:t,onMouseDown:S,onMouseEnter:E,onMouseOut:_,type:"target"})]})}function Rbe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:l,onMouseMove:u,onMouseLeave:f,reconnectRadius:d,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,rfId:x,edgeTypes:w,noPanClassName:y,onError:S,disableKeyboardA11y:E}){let _=ct(oe=>oe.edgeLookup.get(e));const A=ct(oe=>oe.defaultEdgeOptions);_=A?{...A,..._}:_;let C=_.type||"default",O=(w==null?void 0:w[C])||JB[C];O===void 0&&(S==null||S("011",ha.error011(C)),C="default",O=(w==null?void 0:w.default)||JB.default);const P=!!(_.focusable||t&&typeof _.focusable>"u"),M=typeof h<"u"&&(_.reconnectable||n&&typeof _.reconnectable>"u"),R=!!(_.selectable||r&&typeof _.selectable>"u"),$=j.useRef(null),[I,k]=j.useState(!1),[V,D]=j.useState(!1),q=Xt(),{zIndex:L,sourceX:z,sourceY:H,targetX:Y,targetY:Z,sourcePosition:U,targetPosition:F}=ct(j.useCallback(oe=>{const ye=oe.nodeLookup.get(_.source),be=oe.nodeLookup.get(_.target);if(!ye||!be)return{zIndex:_.zIndex,...eq};const xe=jve({id:e,sourceNode:ye,targetNode:be,sourceHandle:_.sourceHandle||null,targetHandle:_.targetHandle||null,connectionMode:oe.connectionMode,onError:S});return{zIndex:wve({selected:_.selected,zIndex:_.zIndex,sourceNode:ye,targetNode:be,elevateOnSelect:oe.elevateEdgesOnSelect,zIndexMode:oe.zIndexMode}),...xe||eq}},[_.source,_.target,_.sourceHandle,_.targetHandle,_.selected,_.zIndex]),Kt),X=j.useMemo(()=>_.markerStart?`url('#${PN(_.markerStart,x)}')`:void 0,[_.markerStart,x]),K=j.useMemo(()=>_.markerEnd?`url('#${PN(_.markerEnd,x)}')`:void 0,[_.markerEnd,x]);if(_.hidden||z===null||H===null||Y===null||Z===null)return null;const G=oe=>{var Ae;const{addSelectedEdges:ye,unselectNodesAndEdges:be,multiSelectionActive:xe}=q.getState();R&&(q.setState({nodesSelectionActive:!1}),_.selected&&xe?(be({nodes:[],edges:[_]}),(Ae=$.current)==null||Ae.blur()):ye([e])),i&&i(oe,_)},Q=a?oe=>{a(oe,{..._})}:void 0,J=o?oe=>{o(oe,{..._})}:void 0,re=l?oe=>{l(oe,{..._})}:void 0,ne=u?oe=>{u(oe,{..._})}:void 0,fe=f?oe=>{f(oe,{..._})}:void 0,he=oe=>{var ye;if(!E&&pK.includes(oe.key)&&R){const{unselectNodesAndEdges:be,addSelectedEdges:xe}=q.getState();oe.key==="Escape"?((ye=$.current)==null||ye.blur(),be({edges:[_]})):xe([e])}};return b.jsx("svg",{style:{zIndex:L},children:b.jsxs("g",{className:yn(["react-flow__edge",`react-flow__edge-${C}`,_.className,y,{selected:_.selected,animated:_.animated,inactive:!R&&!i,updating:I,selectable:R}]),onClick:G,onDoubleClick:Q,onContextMenu:J,onMouseEnter:re,onMouseMove:ne,onMouseLeave:fe,onKeyDown:P?he:void 0,tabIndex:P?0:void 0,role:_.ariaRole??(P?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":_.ariaLabel===null?void 0:_.ariaLabel||`Edge from ${_.source} to ${_.target}`,"aria-describedby":P?`${GK}-${x}`:void 0,ref:$,..._.domAttributes,children:[!V&&b.jsx(O,{id:e,source:_.source,target:_.target,type:_.type,selected:_.selected,animated:_.animated,selectable:R,deletable:_.deletable??!0,label:_.label,labelStyle:_.labelStyle,labelShowBg:_.labelShowBg,labelBgStyle:_.labelBgStyle,labelBgPadding:_.labelBgPadding,labelBgBorderRadius:_.labelBgBorderRadius,sourceX:z,sourceY:H,targetX:Y,targetY:Z,sourcePosition:U,targetPosition:F,data:_.data,style:_.style,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerStart:X,markerEnd:K,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth}),M&&b.jsx(Mbe,{edge:_,isReconnectable:M,reconnectRadius:d,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,sourceX:z,sourceY:H,targetX:Y,targetY:Z,sourcePosition:U,targetPosition:F,setUpdateHover:k,setReconnecting:D})]})})}var kbe=j.memo(Rbe);const Dbe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function gY({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:f,onEdgeClick:d,reconnectRadius:h,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:x,disableKeyboardA11y:w}){const{edgesFocusable:y,edgesReconnectable:S,elementsSelectable:E,onError:_}=ct(Dbe,Kt),A=bbe(t);return b.jsxs("div",{className:"react-flow__edges",children:[b.jsx(Ebe,{defaultColor:e,rfId:n}),A.map(C=>b.jsx(kbe,{id:C,edgesFocusable:y,edgesReconnectable:S,elementsSelectable:E,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:l,onMouseMove:u,onMouseLeave:f,onClick:d,reconnectRadius:h,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:x,rfId:n,onError:_,edgeTypes:r,disableKeyboardA11y:w},C))]})}gY.displayName="EdgeRenderer";const Ibe=j.memo(gY),Lbe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function $be({children:e}){const t=ct(Lbe);return b.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Bbe(e){const t=VR(),n=j.useRef(!1);j.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const qbe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function zbe(e){const t=ct(qbe),n=Xt();return j.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Vbe(e){return e.connection.inProgress?{...e.connection,to:Hm(e.connection.to,e.transform)}:{...e.connection}}function Fbe(e){return Vbe}function Ube(e){const t=Fbe();return ct(t,Kt)}const Hbe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Gbe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:a,height:o,isValid:l,inProgress:u}=ct(Hbe,Kt);return!(a&&i&&u)?null:b.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:b.jsx("g",{className:yn(["react-flow__connection",vK(l)]),children:b.jsx(vY,{style:t,type:n,CustomComponent:r,isValid:l})})})}const vY=({style:e,type:t=ps.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:a,fromNode:o,fromHandle:l,fromPosition:u,to:f,toNode:d,toHandle:h,toPosition:m,pointer:g}=Ube();if(!i)return;if(n)return b.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:a.x,fromY:a.y,toX:f.x,toY:f.y,fromPosition:u,toPosition:m,connectionStatus:vK(r),toNode:d,toHandle:h,pointer:g});let x="";const w={sourceX:a.x,sourceY:a.y,sourcePosition:u,targetX:f.x,targetY:f.y,targetPosition:m};switch(t){case ps.Bezier:[x]=jK(w);break;case ps.SimpleBezier:[x]=iY(w);break;case ps.Step:[x]=NN({...w,borderRadius:0});break;case ps.SmoothStep:[x]=NN(w);break;default:[x]=PK(w)}return b.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};vY.displayName="ConnectionLine";const Wbe={};function rq(e=Wbe){j.useRef(e),Xt(),j.useEffect(()=>{},[e])}function Kbe(){Xt(),j.useRef(!1),j.useEffect(()=>{},[])}function yY({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:f,onNodeContextMenu:d,onSelectionContextMenu:h,onSelectionStart:m,onSelectionEnd:g,connectionLineType:x,connectionLineStyle:w,connectionLineComponent:y,connectionLineContainerStyle:S,selectionKeyCode:E,selectionOnDrag:_,selectionMode:A,multiSelectionKeyCode:C,panActivationKeyCode:O,zoomActivationKeyCode:P,deleteKeyCode:M,onlyRenderVisibleElements:R,elementsSelectable:$,defaultViewport:I,translateExtent:k,minZoom:V,maxZoom:D,preventScrolling:q,defaultMarkerColor:L,zoomOnScroll:z,zoomOnPinch:H,panOnScroll:Y,panOnScrollSpeed:Z,panOnScrollMode:U,zoomOnDoubleClick:F,panOnDrag:X,onPaneClick:K,onPaneMouseEnter:G,onPaneMouseMove:Q,onPaneMouseLeave:J,onPaneScroll:re,onPaneContextMenu:ne,paneClickDistance:fe,nodeClickDistance:he,onEdgeContextMenu:oe,onEdgeMouseEnter:ye,onEdgeMouseMove:be,onEdgeMouseLeave:xe,reconnectRadius:Ae,onReconnect:_e,onReconnectStart:tt,onReconnectEnd:nt,noDragClassName:Lt,noWheelClassName:Ut,noPanClassName:Pt,disableKeyboardA11y:Et,nodeExtent:At,rfId:Ge,viewport:$t,onViewportChange:bn}){return rq(e),rq(t),Kbe(),Bbe(n),zbe($t),b.jsx(ube,{onPaneClick:K,onPaneMouseEnter:G,onPaneMouseMove:Q,onPaneMouseLeave:J,onPaneContextMenu:ne,onPaneScroll:re,paneClickDistance:fe,deleteKeyCode:M,selectionKeyCode:E,selectionOnDrag:_,selectionMode:A,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:C,panActivationKeyCode:O,zoomActivationKeyCode:P,elementsSelectable:$,zoomOnScroll:z,zoomOnPinch:H,zoomOnDoubleClick:F,panOnScroll:Y,panOnScrollSpeed:Z,panOnScrollMode:U,panOnDrag:X,defaultViewport:I,translateExtent:k,minZoom:V,maxZoom:D,onSelectionContextMenu:h,preventScrolling:q,noDragClassName:Lt,noWheelClassName:Ut,noPanClassName:Pt,disableKeyboardA11y:Et,onViewportChange:bn,isControlledViewport:!!$t,children:b.jsxs($be,{children:[b.jsx(Ibe,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:_e,onReconnectStart:tt,onReconnectEnd:nt,onlyRenderVisibleElements:R,onEdgeContextMenu:oe,onEdgeMouseEnter:ye,onEdgeMouseMove:be,onEdgeMouseLeave:xe,reconnectRadius:Ae,defaultMarkerColor:L,noPanClassName:Pt,disableKeyboardA11y:Et,rfId:Ge}),b.jsx(Gbe,{style:w,type:x,component:y,containerStyle:S}),b.jsx("div",{className:"react-flow__edgelabel-renderer"}),b.jsx(ybe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:f,onNodeContextMenu:d,nodeClickDistance:he,onlyRenderVisibleElements:R,noPanClassName:Pt,noDragClassName:Lt,disableKeyboardA11y:Et,nodeExtent:At,rfId:Ge}),b.jsx("div",{className:"react-flow__viewport-portal"})]})})}yY.displayName="GraphView";const Ybe=j.memo(yY),iq=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:u=.5,maxZoom:f=2,nodeOrigin:d,nodeExtent:h,zIndexMode:m="basic"}={})=>{const g=new Map,x=new Map,w=new Map,y=new Map,S=r??t??[],E=n??e??[],_=d??[0,0],A=h??Ip;kK(w,y,S);const{nodesInitialized:C}=MN(E,g,x,{nodeOrigin:_,nodeExtent:A,zIndexMode:m});let O=[0,0,1];if(o&&i&&a){const P=Fm(g,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:M,y:R,zoom:$}=DR(P,i,a,u,f,(l==null?void 0:l.padding)??.1);O=[M,R,$]}return{rfId:"1",width:i??0,height:a??0,transform:O,nodes:E,nodesInitialized:C,nodeLookup:g,parentLookup:x,edges:S,edgeLookup:y,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:u,maxZoom:f,translateExtent:Ip,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Mf.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:_,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...gK},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:mve,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:mK,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Xbe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:u,maxZoom:f,nodeOrigin:d,nodeExtent:h,zIndexMode:m})=>hye((g,x)=>{async function w(){const{nodeLookup:y,panZoom:S,fitViewOptions:E,fitViewResolver:_,width:A,height:C,minZoom:O,maxZoom:P}=x();S&&(await hve({nodes:y,width:A,height:C,panZoom:S,minZoom:O,maxZoom:P},E),_==null||_.resolve(!0),g({fitViewResolver:null}))}return{...iq({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:u,maxZoom:f,nodeOrigin:d,nodeExtent:h,defaultNodes:n,defaultEdges:r,zIndexMode:m}),setNodes:y=>{const{nodeLookup:S,parentLookup:E,nodeOrigin:_,elevateNodesOnSelect:A,fitViewQueued:C,zIndexMode:O,nodesSelectionActive:P}=x(),{nodesInitialized:M,hasSelectedNodes:R}=MN(y,S,E,{nodeOrigin:_,nodeExtent:h,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:O}),$=P&&R;C&&M?(w(),g({nodes:y,nodesInitialized:M,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:$})):g({nodes:y,nodesInitialized:M,nodesSelectionActive:$})},setEdges:y=>{const{connectionLookup:S,edgeLookup:E}=x();kK(S,E,y),g({edges:y})},setDefaultNodesAndEdges:(y,S)=>{if(y){const{setNodes:E}=x();E(y),g({hasDefaultNodes:!0})}if(S){const{setEdges:E}=x();E(S),g({hasDefaultEdges:!0})}},updateNodeInternals:y=>{const{triggerNodeChanges:S,nodeLookup:E,parentLookup:_,domNode:A,nodeOrigin:C,nodeExtent:O,debug:P,fitViewQueued:M,zIndexMode:R}=x(),{changes:$,updatedInternals:I}=Lve(y,E,_,A,C,O,R);I&&(Rve(E,_,{nodeOrigin:C,nodeExtent:O,zIndexMode:R}),M?(w(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),($==null?void 0:$.length)>0&&(P&&console.log("React Flow: trigger node changes",$),S==null||S($)))},updateNodePositions:(y,S=!1)=>{const E=[];let _=[];const{nodeLookup:A,triggerNodeChanges:C,connection:O,updateConnection:P,onNodesChangeMiddlewareMap:M}=x();for(const[R,$]of y){const I=A.get(R),k=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&($!=null&&$.position)),V={id:R,type:"position",position:k?{x:Math.max(0,$.position.x),y:Math.max(0,$.position.y)}:$.position,dragging:S};if(I&&O.inProgress&&O.fromNode.id===I.id){const D=wu(I,O.fromHandle,Ie.Left,!0);P({...O,from:D})}k&&I.parentId&&E.push({id:R,parentId:I.parentId,rect:{...$.internals.positionAbsolute,width:$.measured.width??0,height:$.measured.height??0}}),_.push(V)}if(E.length>0){const{parentLookup:R,nodeOrigin:$}=x(),I=zR(E,A,R,$);_.push(...I)}for(const R of M.values())_=R(_);C(_)},triggerNodeChanges:y=>{const{onNodesChange:S,setNodes:E,nodes:_,hasDefaultNodes:A,debug:C}=x();if(y!=null&&y.length){if(A){const O=kye(y,_);E(O)}C&&console.log("React Flow: trigger node changes",y),S==null||S(y)}},triggerEdgeChanges:y=>{const{onEdgesChange:S,setEdges:E,edges:_,hasDefaultEdges:A,debug:C}=x();if(y!=null&&y.length){if(A){const O=Dye(y,_);E(O)}C&&console.log("React Flow: trigger edge changes",y),S==null||S(y)}},addSelectedNodes:y=>{const{multiSelectionActive:S,edgeLookup:E,nodeLookup:_,triggerNodeChanges:A,triggerEdgeChanges:C}=x();if(S){const O=y.map(P=>Dl(P,!0));A(O);return}A(Fc(_,new Set([...y]),!0)),C(Fc(E))},addSelectedEdges:y=>{const{multiSelectionActive:S,edgeLookup:E,nodeLookup:_,triggerNodeChanges:A,triggerEdgeChanges:C}=x();if(S){const O=y.map(P=>Dl(P,!0));C(O);return}C(Fc(E,new Set([...y]))),A(Fc(_,new Set,!0))},unselectNodesAndEdges:({nodes:y,edges:S}={})=>{const{edges:E,nodes:_,nodeLookup:A,triggerNodeChanges:C,triggerEdgeChanges:O}=x(),P=y||_,M=S||E,R=[];for(const I of P){if(!I.selected)continue;const k=A.get(I.id);k&&(k.selected=!1),R.push(Dl(I.id,!1))}const $=[];for(const I of M)I.selected&&$.push(Dl(I.id,!1));C(R),O($)},setMinZoom:y=>{const{panZoom:S,maxZoom:E}=x();S==null||S.setScaleExtent([y,E]),g({minZoom:y})},setMaxZoom:y=>{const{panZoom:S,minZoom:E}=x();S==null||S.setScaleExtent([E,y]),g({maxZoom:y})},setTranslateExtent:y=>{var S;(S=x().panZoom)==null||S.setTranslateExtent(y),g({translateExtent:y})},resetSelectedElements:()=>{const{edges:y,nodes:S,triggerNodeChanges:E,triggerEdgeChanges:_,elementsSelectable:A}=x();if(!A)return;const C=S.reduce((P,M)=>M.selected?[...P,Dl(M.id,!1)]:P,[]),O=y.reduce((P,M)=>M.selected?[...P,Dl(M.id,!1)]:P,[]);E(C),_(O)},setNodeExtent:y=>{const{nodes:S,nodeLookup:E,parentLookup:_,nodeOrigin:A,elevateNodesOnSelect:C,nodeExtent:O,zIndexMode:P}=x();y[0][0]===O[0][0]&&y[0][1]===O[0][1]&&y[1][0]===O[1][0]&&y[1][1]===O[1][1]||(MN(S,E,_,{nodeOrigin:A,nodeExtent:y,elevateNodesOnSelect:C,checkEquality:!1,zIndexMode:P}),g({nodeExtent:y}))},panBy:y=>{const{transform:S,width:E,height:_,panZoom:A,translateExtent:C}=x();return $ve({delta:y,panZoom:A,transform:S,translateExtent:C,width:E,height:_})},setCenter:async(y,S,E)=>{const{width:_,height:A,maxZoom:C,panZoom:O}=x();if(!O)return Promise.resolve(!1);const P=typeof(E==null?void 0:E.zoom)<"u"?E.zoom:C;return await O.setViewport({x:_/2-y*P,y:A/2-S*P,zoom:P},{duration:E==null?void 0:E.duration,ease:E==null?void 0:E.ease,interpolate:E==null?void 0:E.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{g({connection:{...gK}})},updateConnection:y=>{g({connection:y})},reset:()=>g({...iq()})}},Object.is);function Zbe({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:u,fitView:f,nodeOrigin:d,nodeExtent:h,zIndexMode:m,children:g}){const[x]=j.useState(()=>Xbe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:f,minZoom:o,maxZoom:l,fitViewOptions:u,nodeOrigin:d,nodeExtent:h,zIndexMode:m}));return b.jsx(pye,{value:x,children:b.jsx($ye,{children:g})})}function Qbe({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:l,fitViewOptions:u,minZoom:f,maxZoom:d,nodeOrigin:h,nodeExtent:m,zIndexMode:g}){return j.useContext(ix)?b.jsx(b.Fragment,{children:e}):b.jsx(Zbe,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:l,initialFitViewOptions:u,initialMinZoom:f,initialMaxZoom:d,nodeOrigin:h,nodeExtent:m,zIndexMode:g,children:e})}const Jbe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function e0e({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:l,onEdgeClick:u,onInit:f,onMove:d,onMoveStart:h,onMoveEnd:m,onConnect:g,onConnectStart:x,onConnectEnd:w,onClickConnectStart:y,onClickConnectEnd:S,onNodeMouseEnter:E,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:C,onNodeDoubleClick:O,onNodeDragStart:P,onNodeDrag:M,onNodeDragStop:R,onNodesDelete:$,onEdgesDelete:I,onDelete:k,onSelectionChange:V,onSelectionDragStart:D,onSelectionDrag:q,onSelectionDragStop:L,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:Y,onBeforeDelete:Z,connectionMode:U,connectionLineType:F=ps.Bezier,connectionLineStyle:X,connectionLineComponent:K,connectionLineContainerStyle:G,deleteKeyCode:Q="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:re=!1,selectionMode:ne=Lp.Full,panActivationKeyCode:fe="Space",multiSelectionKeyCode:he=Bp()?"Meta":"Control",zoomActivationKeyCode:oe=Bp()?"Meta":"Control",snapToGrid:ye,snapGrid:be,onlyRenderVisibleElements:xe=!1,selectNodesOnDrag:Ae,nodesDraggable:_e,autoPanOnNodeFocus:tt,nodesConnectable:nt,nodesFocusable:Lt,nodeOrigin:Ut=WK,edgesFocusable:Pt,edgesReconnectable:Et,elementsSelectable:At=!0,defaultViewport:Ge=Tye,minZoom:$t=.5,maxZoom:bn=2,translateExtent:Vn=Ip,preventScrolling:qu=!0,nodeExtent:wa,defaultMarkerColor:Dd="#b1b1b7",zoomOnScroll:zu=!0,zoomOnPinch:Fn=!0,panOnScroll:Qt=!1,panOnScrollSpeed:Gi=.5,panOnScrollMode:Zn=lu.Free,zoomOnDoubleClick:aw=!0,panOnDrag:ow=!0,onPaneClick:sw,onPaneMouseEnter:Vu,onPaneMouseMove:Fu,onPaneMouseLeave:Uu,onPaneScroll:Sa,onPaneContextMenu:Hu,paneClickDistance:ll=1,nodeClickDistance:lw=0,children:og,onReconnect:Id,onReconnectStart:ul,onReconnectEnd:uw,onEdgeContextMenu:sg,onEdgeDoubleClick:lg,onEdgeMouseEnter:ug,onEdgeMouseMove:Ld,onEdgeMouseLeave:$d,reconnectRadius:cg=10,onNodesChange:fg,onEdgesChange:Wi,noDragClassName:xn="nodrag",noWheelClassName:Un="nowheel",noPanClassName:_a="nopan",fitView:Gu,fitViewOptions:dg,connectOnClick:cw,attributionPosition:hg,proOptions:cl,defaultEdgeOptions:Bd,elevateNodesOnSelect:Co=!0,elevateEdgesOnSelect:To=!1,disableKeyboardA11y:Oo=!1,autoPanOnConnect:jo,autoPanOnNodeDrag:un,autoPanSpeed:pg,connectionRadius:mg,isValidConnection:Ea,onError:No,style:fw,id:qd,nodeDragThreshold:gg,connectionDragThreshold:dw,viewport:Wu,onViewportChange:Ku,width:yi,height:ur,colorMode:vg="light",debug:hw,onScroll:Po,ariaLabelConfig:yg,zIndexMode:fl="basic",...pw},cr){const dl=qd||"1",bg=Pye(vg),zd=j.useCallback(Aa=>{Aa.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Po==null||Po(Aa)},[Po]);return b.jsx("div",{"data-testid":"rf__wrapper",...pw,onScroll:zd,style:{...fw,...Jbe},ref:cr,className:yn(["react-flow",i,bg]),id:qd,role:"application",children:b.jsxs(Qbe,{nodes:e,edges:t,width:yi,height:ur,fitView:Gu,fitViewOptions:dg,minZoom:$t,maxZoom:bn,nodeOrigin:Ut,nodeExtent:wa,zIndexMode:fl,children:[b.jsx(Nye,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:x,onConnectEnd:w,onClickConnectStart:y,onClickConnectEnd:S,nodesDraggable:_e,autoPanOnNodeFocus:tt,nodesConnectable:nt,nodesFocusable:Lt,edgesFocusable:Pt,edgesReconnectable:Et,elementsSelectable:At,elevateNodesOnSelect:Co,elevateEdgesOnSelect:To,minZoom:$t,maxZoom:bn,nodeExtent:wa,onNodesChange:fg,onEdgesChange:Wi,snapToGrid:ye,snapGrid:be,connectionMode:U,translateExtent:Vn,connectOnClick:cw,defaultEdgeOptions:Bd,fitView:Gu,fitViewOptions:dg,onNodesDelete:$,onEdgesDelete:I,onDelete:k,onNodeDragStart:P,onNodeDrag:M,onNodeDragStop:R,onSelectionDrag:q,onSelectionDragStart:D,onSelectionDragStop:L,onMove:d,onMoveStart:h,onMoveEnd:m,noPanClassName:_a,nodeOrigin:Ut,rfId:dl,autoPanOnConnect:jo,autoPanOnNodeDrag:un,autoPanSpeed:pg,onError:No,connectionRadius:mg,isValidConnection:Ea,selectNodesOnDrag:Ae,nodeDragThreshold:gg,connectionDragThreshold:dw,onBeforeDelete:Z,debug:hw,ariaLabelConfig:yg,zIndexMode:fl}),b.jsx(Ybe,{onInit:f,onNodeClick:l,onEdgeClick:u,onNodeMouseEnter:E,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:C,onNodeDoubleClick:O,nodeTypes:a,edgeTypes:o,connectionLineType:F,connectionLineStyle:X,connectionLineComponent:K,connectionLineContainerStyle:G,selectionKeyCode:J,selectionOnDrag:re,selectionMode:ne,deleteKeyCode:Q,multiSelectionKeyCode:he,panActivationKeyCode:fe,zoomActivationKeyCode:oe,onlyRenderVisibleElements:xe,defaultViewport:Ge,translateExtent:Vn,minZoom:$t,maxZoom:bn,preventScrolling:qu,zoomOnScroll:zu,zoomOnPinch:Fn,zoomOnDoubleClick:aw,panOnScroll:Qt,panOnScrollSpeed:Gi,panOnScrollMode:Zn,panOnDrag:ow,onPaneClick:sw,onPaneMouseEnter:Vu,onPaneMouseMove:Fu,onPaneMouseLeave:Uu,onPaneScroll:Sa,onPaneContextMenu:Hu,paneClickDistance:ll,nodeClickDistance:lw,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:Y,onReconnect:Id,onReconnectStart:ul,onReconnectEnd:uw,onEdgeContextMenu:sg,onEdgeDoubleClick:lg,onEdgeMouseEnter:ug,onEdgeMouseMove:Ld,onEdgeMouseLeave:$d,reconnectRadius:cg,defaultMarkerColor:Dd,noDragClassName:xn,noWheelClassName:Un,noPanClassName:_a,rfId:dl,disableKeyboardA11y:Oo,nodeExtent:wa,viewport:Wu,onViewportChange:Ku}),b.jsx(Cye,{onSelectionChange:V}),og,b.jsx(wye,{proOptions:cl,position:hg}),b.jsx(xye,{rfId:dl,disableKeyboardA11y:Oo})]})})}var t0e=YK(e0e);function n0e({dimensions:e,lineWidth:t,variant:n,className:r}){return b.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:yn(["react-flow__background-pattern",n,r])})}function r0e({radius:e,className:t}){return b.jsx("circle",{cx:e,cy:e,r:e,className:yn(["react-flow__background-pattern","dots",t])})}var Ls;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ls||(Ls={}));const i0e={[Ls.Dots]:1,[Ls.Lines]:1,[Ls.Cross]:6},a0e=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function bY({id:e,variant:t=Ls.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:l,style:u,className:f,patternClassName:d}){const h=j.useRef(null),{transform:m,patternId:g}=ct(a0e,Kt),x=r||i0e[t],w=t===Ls.Dots,y=t===Ls.Cross,S=Array.isArray(n)?n:[n,n],E=[S[0]*m[2]||1,S[1]*m[2]||1],_=x*m[2],A=Array.isArray(a)?a:[a,a],C=y?[_,_]:E,O=[A[0]*m[2]||1+C[0]/2,A[1]*m[2]||1+C[1]/2],P=`${g}${e||""}`;return b.jsxs("svg",{className:yn(["react-flow__background",f]),style:{...u,...ox,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:h,"data-testid":"rf__background",children:[b.jsx("pattern",{id:P,x:m[0]%E[0],y:m[1]%E[1],width:E[0],height:E[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${O[0]},-${O[1]})`,children:w?b.jsx(r0e,{radius:_/2,className:d}):b.jsx(n0e,{dimensions:C,lineWidth:i,variant:t,className:d})}),b.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}bY.displayName="Background";j.memo(bY);function o0e(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:b.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function s0e(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:b.jsx("path",{d:"M0 0h32v4.2H0z"})})}function l0e(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:b.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function u0e(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:b.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function c0e(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:b.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Xv({children:e,className:t,...n}){return b.jsx("button",{type:"button",className:yn(["react-flow__controls-button",t]),...n,children:e})}const f0e=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function xY({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:u,className:f,children:d,position:h="bottom-left",orientation:m="vertical","aria-label":g}){const x=Xt(),{isInteractive:w,minZoomReached:y,maxZoomReached:S,ariaLabelConfig:E}=ct(f0e,Kt),{zoomIn:_,zoomOut:A,fitView:C}=VR(),O=()=>{_(),a==null||a()},P=()=>{A(),o==null||o()},M=()=>{C(i),l==null||l()},R=()=>{x.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),u==null||u(!w)},$=m==="horizontal"?"horizontal":"vertical";return b.jsxs(ax,{className:yn(["react-flow__controls",$,f]),position:h,style:e,"data-testid":"rf__controls","aria-label":g??E["controls.ariaLabel"],children:[t&&b.jsxs(b.Fragment,{children:[b.jsx(Xv,{onClick:O,className:"react-flow__controls-zoomin",title:E["controls.zoomIn.ariaLabel"],"aria-label":E["controls.zoomIn.ariaLabel"],disabled:S,children:b.jsx(o0e,{})}),b.jsx(Xv,{onClick:P,className:"react-flow__controls-zoomout",title:E["controls.zoomOut.ariaLabel"],"aria-label":E["controls.zoomOut.ariaLabel"],disabled:y,children:b.jsx(s0e,{})})]}),n&&b.jsx(Xv,{className:"react-flow__controls-fitview",onClick:M,title:E["controls.fitView.ariaLabel"],"aria-label":E["controls.fitView.ariaLabel"],children:b.jsx(l0e,{})}),r&&b.jsx(Xv,{className:"react-flow__controls-interactive",onClick:R,title:E["controls.interactive.ariaLabel"],"aria-label":E["controls.interactive.ariaLabel"],children:w?b.jsx(c0e,{}):b.jsx(u0e,{})}),d]})}xY.displayName="Controls";j.memo(xY);function d0e({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:l,strokeWidth:u,className:f,borderRadius:d,shapeRendering:h,selected:m,onClick:g}){const{background:x,backgroundColor:w}=a||{},y=o||x||w;return b.jsx("rect",{className:yn(["react-flow__minimap-node",{selected:m},f]),x:t,y:n,rx:d,ry:d,width:r,height:i,style:{fill:y,stroke:l,strokeWidth:u},shapeRendering:h,onClick:g?S=>g(S,e):void 0})}const h0e=j.memo(d0e),p0e=e=>e.nodes.map(t=>t.id),c_=e=>e instanceof Function?e:()=>e;function m0e({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=h0e,onClick:o}){const l=ct(p0e,Kt),u=c_(t),f=c_(e),d=c_(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return b.jsx(b.Fragment,{children:l.map(m=>b.jsx(v0e,{id:m,nodeColorFunc:u,nodeStrokeColorFunc:f,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:h},m))})}function g0e({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:l,onClick:u}){const{node:f,x:d,y:h,width:m,height:g}=ct(x=>{const w=x.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const y=w.internals.userNode,{x:S,y:E}=w.internals.positionAbsolute,{width:_,height:A}=wo(y);return{node:y,x:S,y:E,width:_,height:A}},Kt);return!f||f.hidden||!_K(f)?null:b.jsx(l,{x:d,y:h,width:m,height:g,style:f.style,selected:!!f.selected,className:r(f),color:t(f),borderRadius:i,strokeColor:n(f),strokeWidth:a,shapeRendering:o,onClick:u,id:f.id})}const v0e=j.memo(g0e);var y0e=j.memo(m0e);const b0e=200,x0e=150,w0e=e=>!e.hidden,S0e=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?SK(Fm(e.nodeLookup,{filter:w0e}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},_0e="react-flow__minimap-desc";function wY({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:u,maskColor:f,maskStrokeColor:d,maskStrokeWidth:h,position:m="bottom-right",onClick:g,onNodeClick:x,pannable:w=!1,zoomable:y=!1,ariaLabel:S,inversePan:E,zoomStep:_=1,offsetScale:A=5}){const C=Xt(),O=j.useRef(null),{boundingRect:P,viewBB:M,rfId:R,panZoom:$,translateExtent:I,flowWidth:k,flowHeight:V,ariaLabelConfig:D}=ct(S0e,Kt),q=(e==null?void 0:e.width)??b0e,L=(e==null?void 0:e.height)??x0e,z=P.width/q,H=P.height/L,Y=Math.max(z,H),Z=Y*q,U=Y*L,F=A*Y,X=P.x-(Z-P.width)/2-F,K=P.y-(U-P.height)/2-F,G=Z+F*2,Q=U+F*2,J=`${_0e}-${R}`,re=j.useRef(0),ne=j.useRef();re.current=Y,j.useEffect(()=>{if(O.current&&$)return ne.current=Wve({domNode:O.current,panZoom:$,getTransform:()=>C.getState().transform,getViewScale:()=>re.current}),()=>{var ye;(ye=ne.current)==null||ye.destroy()}},[$]),j.useEffect(()=>{var ye;(ye=ne.current)==null||ye.update({translateExtent:I,width:k,height:V,inversePan:E,pannable:w,zoomStep:_,zoomable:y})},[w,y,E,_,I,k,V]);const fe=g?ye=>{var Ae;const[be,xe]=((Ae=ne.current)==null?void 0:Ae.pointer(ye))||[0,0];g(ye,{x:be,y:xe})}:void 0,he=x?j.useCallback((ye,be)=>{const xe=C.getState().nodeLookup.get(be).internals.userNode;x(ye,xe)},[]):void 0,oe=S??D["minimap.ariaLabel"];return b.jsx(ax,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof h=="number"?h*Y:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:yn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:b.jsxs("svg",{width:q,height:L,viewBox:`${X} ${K} ${G} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:O,onClick:fe,children:[oe&&b.jsx("title",{id:J,children:oe}),b.jsx(y0e,{onClick:he,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:l}),b.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-F},${K-F}h${G+F*2}v${Q+F*2}h${-G-F*2}z
|
|
365
|
+
M${M.x},${M.y}h${M.width}v${M.height}h${-M.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}wY.displayName="MiniMap";j.memo(wY);const E0e=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,A0e={[If.Line]:"right",[If.Handle]:"bottom-right"};function C0e({nodeId:e,position:t,variant:n=If.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:l=10,minHeight:u=10,maxWidth:f=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:m,autoScale:g=!0,shouldResize:x,onResizeStart:w,onResize:y,onResizeEnd:S}){const E=JK(),_=typeof e=="string"?e:E,A=Xt(),C=j.useRef(null),O=n===If.Handle,P=ct(j.useCallback(E0e(O&&g),[O,g]),Kt),M=j.useRef(null),R=t??A0e[n];j.useEffect(()=>{if(!(!C.current||!_))return M.current||(M.current=sye({domNode:C.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:I,transform:k,snapGrid:V,snapToGrid:D,nodeOrigin:q,domNode:L}=A.getState();return{nodeLookup:I,transform:k,snapGrid:V,snapToGrid:D,nodeOrigin:q,paneDomNode:L}},onChange:(I,k)=>{const{triggerNodeChanges:V,nodeLookup:D,parentLookup:q,nodeOrigin:L}=A.getState(),z=[],H={x:I.x,y:I.y},Y=D.get(_);if(Y&&Y.expandParent&&Y.parentId){const Z=Y.origin??L,U=I.width??Y.measured.width??0,F=I.height??Y.measured.height??0,X={id:Y.id,parentId:Y.parentId,rect:{width:U,height:F,...EK({x:I.x??Y.position.x,y:I.y??Y.position.y},{width:U,height:F},Y.parentId,D,Z)}},K=zR([X],D,q,L);z.push(...K),H.x=I.x?Math.max(Z[0]*U,I.x):void 0,H.y=I.y?Math.max(Z[1]*F,I.y):void 0}if(H.x!==void 0&&H.y!==void 0){const Z={id:_,type:"position",position:{...H}};z.push(Z)}if(I.width!==void 0&&I.height!==void 0){const U={id:_,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};z.push(U)}for(const Z of k){const U={...Z,type:"position"};z.push(U)}V(z)},onEnd:({width:I,height:k})=>{const V={id:_,type:"dimensions",resizing:!1,dimensions:{width:I,height:k}};A.getState().triggerNodeChanges([V])}})),M.current.update({controlPosition:R,boundaries:{minWidth:l,minHeight:u,maxWidth:f,maxHeight:d},keepAspectRatio:h,resizeDirection:m,onResizeStart:w,onResize:y,onResizeEnd:S,shouldResize:x}),()=>{var I;(I=M.current)==null||I.destroy()}},[R,l,u,f,d,h,w,y,S,x]);const $=R.split("-");return b.jsx("div",{className:yn(["react-flow__resize-control","nodrag",...$,n,r]),ref:C,style:{...i,scale:P,...o&&{[O?"backgroundColor":"borderColor"]:o}},children:a})}j.memo(C0e);function UR(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var f_,aq;function T0e(){if(aq)return f_;aq=1;function e(){this.__data__=[],this.size=0}return f_=e,f_}var d_,oq;function vd(){if(oq)return d_;oq=1;function e(t,n){return t===n||t!==t&&n!==n}return d_=e,d_}var h_,sq;function lx(){if(sq)return h_;sq=1;var e=vd();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return h_=t,h_}var p_,lq;function O0e(){if(lq)return p_;lq=1;var e=lx(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var l=a.length-1;return o==l?a.pop():n.call(a,o,1),--this.size,!0}return p_=r,p_}var m_,uq;function j0e(){if(uq)return m_;uq=1;var e=lx();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return m_=t,m_}var g_,cq;function N0e(){if(cq)return g_;cq=1;var e=lx();function t(n){return e(this.__data__,n)>-1}return g_=t,g_}var v_,fq;function P0e(){if(fq)return v_;fq=1;var e=lx();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return v_=t,v_}var y_,dq;function ux(){if(dq)return y_;dq=1;var e=T0e(),t=O0e(),n=j0e(),r=N0e(),i=P0e();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l<u;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,y_=a,y_}var b_,hq;function M0e(){if(hq)return b_;hq=1;var e=ux();function t(){this.__data__=new e,this.size=0}return b_=t,b_}var x_,pq;function R0e(){if(pq)return x_;pq=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return x_=e,x_}var w_,mq;function k0e(){if(mq)return w_;mq=1;function e(t){return this.__data__.get(t)}return w_=e,w_}var S_,gq;function D0e(){if(gq)return S_;gq=1;function e(t){return this.__data__.has(t)}return S_=e,S_}var __,vq;function SY(){if(vq)return __;vq=1;var e=typeof Nv=="object"&&Nv&&Nv.Object===Object&&Nv;return __=e,__}var E_,yq;function Ui(){if(yq)return E_;yq=1;var e=SY(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return E_=n,E_}var A_,bq;function yd(){if(bq)return A_;bq=1;var e=Ui(),t=e.Symbol;return A_=t,A_}var C_,xq;function I0e(){if(xq)return C_;xq=1;var e=yd(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var l=n.call(o,i),u=o[i];try{o[i]=void 0;var f=!0}catch{}var d=r.call(o);return f&&(l?o[i]=u:delete o[i]),d}return C_=a,C_}var T_,wq;function L0e(){if(wq)return T_;wq=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return T_=n,T_}var O_,Sq;function So(){if(Sq)return O_;Sq=1;var e=yd(),t=I0e(),n=L0e(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:r:a&&a in Object(l)?t(l):n(l)}return O_=o,O_}var j_,_q;function lr(){if(_q)return j_;_q=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return j_=e,j_}var N_,Eq;function bd(){if(Eq)return N_;Eq=1;var e=So(),t=lr(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!t(l))return!1;var u=e(l);return u==r||u==i||u==n||u==a}return N_=o,N_}var P_,Aq;function $0e(){if(Aq)return P_;Aq=1;var e=Ui(),t=e["__core-js_shared__"];return P_=t,P_}var M_,Cq;function B0e(){if(Cq)return M_;Cq=1;var e=$0e(),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 M_=n,M_}var R_,Tq;function _Y(){if(Tq)return R_;Tq=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 R_=n,R_}var k_,Oq;function q0e(){if(Oq)return k_;Oq=1;var e=bd(),t=B0e(),n=lr(),r=_Y(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,u=o.toString,f=l.hasOwnProperty,d=RegExp("^"+u.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!n(m)||t(m))return!1;var g=e(m)?d:a;return g.test(r(m))}return k_=h,k_}var D_,jq;function z0e(){if(jq)return D_;jq=1;function e(t,n){return t==null?void 0:t[n]}return D_=e,D_}var I_,Nq;function ku(){if(Nq)return I_;Nq=1;var e=q0e(),t=z0e();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return I_=n,I_}var L_,Pq;function HR(){if(Pq)return L_;Pq=1;var e=ku(),t=Ui(),n=e(t,"Map");return L_=n,L_}var $_,Mq;function cx(){if(Mq)return $_;Mq=1;var e=ku(),t=e(Object,"create");return $_=t,$_}var B_,Rq;function V0e(){if(Rq)return B_;Rq=1;var e=cx();function t(){this.__data__=e?e(null):{},this.size=0}return B_=t,B_}var q_,kq;function F0e(){if(kq)return q_;kq=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return q_=e,q_}var z_,Dq;function U0e(){if(Dq)return z_;Dq=1;var e=cx(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var l=o[a];return l===t?void 0:l}return r.call(o,a)?o[a]:void 0}return z_=i,z_}var V_,Iq;function H0e(){if(Iq)return V_;Iq=1;var e=cx(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return V_=r,V_}var F_,Lq;function G0e(){if(Lq)return F_;Lq=1;var e=cx(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return F_=n,F_}var U_,$q;function W0e(){if($q)return U_;$q=1;var e=V0e(),t=F0e(),n=U0e(),r=H0e(),i=G0e();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l<u;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,U_=a,U_}var H_,Bq;function K0e(){if(Bq)return H_;Bq=1;var e=W0e(),t=ux(),n=HR();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return H_=r,H_}var G_,qq;function Y0e(){if(qq)return G_;qq=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return G_=e,G_}var W_,zq;function fx(){if(zq)return W_;zq=1;var e=Y0e();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return W_=t,W_}var K_,Vq;function X0e(){if(Vq)return K_;Vq=1;var e=fx();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return K_=t,K_}var Y_,Fq;function Z0e(){if(Fq)return Y_;Fq=1;var e=fx();function t(n){return e(this,n).get(n)}return Y_=t,Y_}var X_,Uq;function Q0e(){if(Uq)return X_;Uq=1;var e=fx();function t(n){return e(this,n).has(n)}return X_=t,X_}var Z_,Hq;function J0e(){if(Hq)return Z_;Hq=1;var e=fx();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return Z_=t,Z_}var Q_,Gq;function GR(){if(Gq)return Q_;Gq=1;var e=K0e(),t=X0e(),n=Z0e(),r=Q0e(),i=J0e();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l<u;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Q_=a,Q_}var J_,Wq;function exe(){if(Wq)return J_;Wq=1;var e=ux(),t=HR(),n=GR(),r=200;function i(a,o){var l=this.__data__;if(l instanceof e){var u=l.__data__;if(!t||u.length<r-1)return u.push([a,o]),this.size=++l.size,this;l=this.__data__=new n(u)}return l.set(a,o),this.size=l.size,this}return J_=i,J_}var eE,Kq;function dx(){if(Kq)return eE;Kq=1;var e=ux(),t=M0e(),n=R0e(),r=k0e(),i=D0e(),a=exe();function o(l){var u=this.__data__=new e(l);this.size=u.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,eE=o,eE}var tE,Yq;function WR(){if(Yq)return tE;Yq=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return tE=e,tE}var nE,Xq;function EY(){if(Xq)return nE;Xq=1;var e=ku(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return nE=t,nE}var rE,Zq;function hx(){if(Zq)return rE;Zq=1;var e=EY();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return rE=t,rE}var iE,Qq;function px(){if(Qq)return iE;Qq=1;var e=hx(),t=vd(),n=Object.prototype,r=n.hasOwnProperty;function i(a,o,l){var u=a[o];(!(r.call(a,o)&&t(u,l))||l===void 0&&!(o in a))&&e(a,o,l)}return iE=i,iE}var aE,Jq;function Gm(){if(Jq)return aE;Jq=1;var e=px(),t=hx();function n(r,i,a,o){var l=!a;a||(a={});for(var u=-1,f=i.length;++u<f;){var d=i[u],h=o?o(a[d],r[d],d,a,r):void 0;h===void 0&&(h=r[d]),l?t(a,d,h):e(a,d,h)}return a}return aE=n,aE}var oE,e4;function txe(){if(e4)return oE;e4=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return oE=e,oE}var sE,t4;function pi(){if(t4)return sE;t4=1;function e(t){return t!=null&&typeof t=="object"}return sE=e,sE}var lE,n4;function nxe(){if(n4)return lE;n4=1;var e=So(),t=pi(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return lE=r,lE}var uE,r4;function Wm(){if(r4)return uE;r4=1;var e=nxe(),t=pi(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return uE=a,uE}var cE,i4;function on(){if(i4)return cE;i4=1;var e=Array.isArray;return cE=e,cE}var tp={exports:{}},fE,a4;function rxe(){if(a4)return fE;a4=1;function e(){return!1}return fE=e,fE}tp.exports;var o4;function xd(){return o4||(o4=1,(function(e,t){var n=Ui(),r=rxe(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?n.Buffer:void 0,u=l?l.isBuffer:void 0,f=u||r;e.exports=f})(tp,tp.exports)),tp.exports}var dE,s4;function mx(){if(s4)return dE;s4=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return dE=n,dE}var hE,l4;function KR(){if(l4)return hE;l4=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return hE=t,hE}var pE,u4;function ixe(){if(u4)return pE;u4=1;var e=So(),t=KR(),n=pi(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",u="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",x="[object String]",w="[object WeakMap]",y="[object ArrayBuffer]",S="[object DataView]",E="[object Float32Array]",_="[object Float64Array]",A="[object Int8Array]",C="[object Int16Array]",O="[object Int32Array]",P="[object Uint8Array]",M="[object Uint8ClampedArray]",R="[object Uint16Array]",$="[object Uint32Array]",I={};I[E]=I[_]=I[A]=I[C]=I[O]=I[P]=I[M]=I[R]=I[$]=!0,I[r]=I[i]=I[y]=I[a]=I[S]=I[o]=I[l]=I[u]=I[f]=I[d]=I[h]=I[m]=I[g]=I[x]=I[w]=!1;function k(V){return n(V)&&t(V.length)&&!!I[e(V)]}return pE=k,pE}var mE,c4;function gx(){if(c4)return mE;c4=1;function e(t){return function(n){return t(n)}}return mE=e,mE}var np={exports:{}};np.exports;var f4;function YR(){return f4||(f4=1,(function(e,t){var n=SY(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,l=(function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(np,np.exports)),np.exports}var gE,d4;function Km(){if(d4)return gE;d4=1;var e=ixe(),t=gx(),n=YR(),r=n&&n.isTypedArray,i=r?t(r):e;return gE=i,gE}var vE,h4;function AY(){if(h4)return vE;h4=1;var e=txe(),t=Wm(),n=on(),r=xd(),i=mx(),a=Km(),o=Object.prototype,l=o.hasOwnProperty;function u(f,d){var h=n(f),m=!h&&t(f),g=!h&&!m&&r(f),x=!h&&!m&&!g&&a(f),w=h||m||g||x,y=w?e(f.length,String):[],S=y.length;for(var E in f)(d||l.call(f,E))&&!(w&&(E=="length"||g&&(E=="offset"||E=="parent")||x&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||i(E,S)))&&y.push(E);return y}return vE=u,vE}var yE,p4;function vx(){if(p4)return yE;p4=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return yE=t,yE}var bE,m4;function CY(){if(m4)return bE;m4=1;function e(t,n){return function(r){return t(n(r))}}return bE=e,bE}var xE,g4;function axe(){if(g4)return xE;g4=1;var e=CY(),t=e(Object.keys,Object);return xE=t,xE}var wE,v4;function XR(){if(v4)return wE;v4=1;var e=vx(),t=axe(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var l in Object(a))r.call(a,l)&&l!="constructor"&&o.push(l);return o}return wE=i,wE}var SE,y4;function _o(){if(y4)return SE;y4=1;var e=bd(),t=KR();function n(r){return r!=null&&t(r.length)&&!e(r)}return SE=n,SE}var _E,b4;function el(){if(b4)return _E;b4=1;var e=AY(),t=XR(),n=_o();function r(i){return n(i)?e(i):t(i)}return _E=r,_E}var EE,x4;function oxe(){if(x4)return EE;x4=1;var e=Gm(),t=el();function n(r,i){return r&&e(i,t(i),r)}return EE=n,EE}var AE,w4;function sxe(){if(w4)return AE;w4=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return AE=e,AE}var CE,S4;function lxe(){if(S4)return CE;S4=1;var e=lr(),t=vx(),n=sxe(),r=Object.prototype,i=r.hasOwnProperty;function a(o){if(!e(o))return n(o);var l=t(o),u=[];for(var f in o)f=="constructor"&&(l||!i.call(o,f))||u.push(f);return u}return CE=a,CE}var TE,_4;function Du(){if(_4)return TE;_4=1;var e=AY(),t=lxe(),n=_o();function r(i){return n(i)?e(i,!0):t(i)}return TE=r,TE}var OE,E4;function uxe(){if(E4)return OE;E4=1;var e=Gm(),t=Du();function n(r,i){return r&&e(i,t(i),r)}return OE=n,OE}var rp={exports:{}};rp.exports;var A4;function TY(){return A4||(A4=1,(function(e,t){var n=Ui(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,l=o?o.allocUnsafe:void 0;function u(f,d){if(d)return f.slice();var h=f.length,m=l?l(h):new f.constructor(h);return f.copy(m),m}e.exports=u})(rp,rp.exports)),rp.exports}var jE,C4;function OY(){if(C4)return jE;C4=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return jE=e,jE}var NE,T4;function jY(){if(T4)return NE;T4=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var l=t[r];n(l,r,t)&&(o[a++]=l)}return o}return NE=e,NE}var PE,O4;function NY(){if(O4)return PE;O4=1;function e(){return[]}return PE=e,PE}var ME,j4;function ZR(){if(j4)return ME;j4=1;var e=jY(),t=NY(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return r.call(o,l)}))}:t;return ME=a,ME}var RE,N4;function cxe(){if(N4)return RE;N4=1;var e=Gm(),t=ZR();function n(r,i){return e(r,t(r),i)}return RE=n,RE}var kE,P4;function QR(){if(P4)return kE;P4=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return kE=e,kE}var DE,M4;function yx(){if(M4)return DE;M4=1;var e=CY(),t=e(Object.getPrototypeOf,Object);return DE=t,DE}var IE,R4;function PY(){if(R4)return IE;R4=1;var e=QR(),t=yx(),n=ZR(),r=NY(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var l=[];o;)e(l,n(o)),o=t(o);return l}:r;return IE=a,IE}var LE,k4;function fxe(){if(k4)return LE;k4=1;var e=Gm(),t=PY();function n(r,i){return e(r,t(r),i)}return LE=n,LE}var $E,D4;function MY(){if(D4)return $E;D4=1;var e=QR(),t=on();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return $E=n,$E}var BE,I4;function RY(){if(I4)return BE;I4=1;var e=MY(),t=ZR(),n=el();function r(i){return e(i,n,t)}return BE=r,BE}var qE,L4;function dxe(){if(L4)return qE;L4=1;var e=MY(),t=PY(),n=Du();function r(i){return e(i,n,t)}return qE=r,qE}var zE,$4;function hxe(){if($4)return zE;$4=1;var e=ku(),t=Ui(),n=e(t,"DataView");return zE=n,zE}var VE,B4;function pxe(){if(B4)return VE;B4=1;var e=ku(),t=Ui(),n=e(t,"Promise");return VE=n,VE}var FE,q4;function kY(){if(q4)return FE;q4=1;var e=ku(),t=Ui(),n=e(t,"Set");return FE=n,FE}var UE,z4;function mxe(){if(z4)return UE;z4=1;var e=ku(),t=Ui(),n=e(t,"WeakMap");return UE=n,UE}var HE,V4;function wd(){if(V4)return HE;V4=1;var e=hxe(),t=HR(),n=pxe(),r=kY(),i=mxe(),a=So(),o=_Y(),l="[object Map]",u="[object Object]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",m="[object DataView]",g=o(e),x=o(t),w=o(n),y=o(r),S=o(i),E=a;return(e&&E(new e(new ArrayBuffer(1)))!=m||t&&E(new t)!=l||n&&E(n.resolve())!=f||r&&E(new r)!=d||i&&E(new i)!=h)&&(E=function(_){var A=a(_),C=A==u?_.constructor:void 0,O=C?o(C):"";if(O)switch(O){case g:return m;case x:return l;case w:return f;case y:return d;case S:return h}return A}),HE=E,HE}var GE,F4;function gxe(){if(F4)return GE;F4=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,a=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(a.index=r.index,a.input=r.input),a}return GE=n,GE}var WE,U4;function DY(){if(U4)return WE;U4=1;var e=Ui(),t=e.Uint8Array;return WE=t,WE}var KE,H4;function JR(){if(H4)return KE;H4=1;var e=DY();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return KE=t,KE}var YE,G4;function vxe(){if(G4)return YE;G4=1;var e=JR();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return YE=t,YE}var XE,W4;function yxe(){if(W4)return XE;W4=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return XE=t,XE}var ZE,K4;function bxe(){if(K4)return ZE;K4=1;var e=yd(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return ZE=r,ZE}var QE,Y4;function IY(){if(Y4)return QE;Y4=1;var e=JR();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return QE=t,QE}var JE,X4;function xxe(){if(X4)return JE;X4=1;var e=JR(),t=vxe(),n=yxe(),r=bxe(),i=IY(),a="[object Boolean]",o="[object Date]",l="[object Map]",u="[object Number]",f="[object RegExp]",d="[object Set]",h="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",y="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",_="[object Int32Array]",A="[object Uint8Array]",C="[object Uint8ClampedArray]",O="[object Uint16Array]",P="[object Uint32Array]";function M(R,$,I){var k=R.constructor;switch($){case g:return e(R);case a:case o:return new k(+R);case x:return t(R,I);case w:case y:case S:case E:case _:case A:case C:case O:case P:return i(R,I);case l:return new k;case u:case h:return new k(R);case f:return n(R);case d:return new k;case m:return r(R)}}return JE=M,JE}var eA,Z4;function LY(){if(Z4)return eA;Z4=1;var e=lr(),t=Object.create,n=(function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var a=new r;return r.prototype=void 0,a}})();return eA=n,eA}var tA,Q4;function $Y(){if(Q4)return tA;Q4=1;var e=LY(),t=yx(),n=vx();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return tA=r,tA}var nA,J4;function wxe(){if(J4)return nA;J4=1;var e=wd(),t=pi(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return nA=r,nA}var rA,ez;function Sxe(){if(ez)return rA;ez=1;var e=wxe(),t=gx(),n=YR(),r=n&&n.isMap,i=r?t(r):e;return rA=i,rA}var iA,tz;function _xe(){if(tz)return iA;tz=1;var e=wd(),t=pi(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return iA=r,iA}var aA,nz;function Exe(){if(nz)return aA;nz=1;var e=_xe(),t=gx(),n=YR(),r=n&&n.isSet,i=r?t(r):e;return aA=i,aA}var oA,rz;function BY(){if(rz)return oA;rz=1;var e=dx(),t=WR(),n=px(),r=oxe(),i=uxe(),a=TY(),o=OY(),l=cxe(),u=fxe(),f=RY(),d=dxe(),h=wd(),m=gxe(),g=xxe(),x=$Y(),w=on(),y=xd(),S=Sxe(),E=lr(),_=Exe(),A=el(),C=Du(),O=1,P=2,M=4,R="[object Arguments]",$="[object Array]",I="[object Boolean]",k="[object Date]",V="[object Error]",D="[object Function]",q="[object GeneratorFunction]",L="[object Map]",z="[object Number]",H="[object Object]",Y="[object RegExp]",Z="[object Set]",U="[object String]",F="[object Symbol]",X="[object WeakMap]",K="[object ArrayBuffer]",G="[object DataView]",Q="[object Float32Array]",J="[object Float64Array]",re="[object Int8Array]",ne="[object Int16Array]",fe="[object Int32Array]",he="[object Uint8Array]",oe="[object Uint8ClampedArray]",ye="[object Uint16Array]",be="[object Uint32Array]",xe={};xe[R]=xe[$]=xe[K]=xe[G]=xe[I]=xe[k]=xe[Q]=xe[J]=xe[re]=xe[ne]=xe[fe]=xe[L]=xe[z]=xe[H]=xe[Y]=xe[Z]=xe[U]=xe[F]=xe[he]=xe[oe]=xe[ye]=xe[be]=!0,xe[V]=xe[D]=xe[X]=!1;function Ae(_e,tt,nt,Lt,Ut,Pt){var Et,At=tt&O,Ge=tt&P,$t=tt&M;if(nt&&(Et=Ut?nt(_e,Lt,Ut,Pt):nt(_e)),Et!==void 0)return Et;if(!E(_e))return _e;var bn=w(_e);if(bn){if(Et=m(_e),!At)return o(_e,Et)}else{var Vn=h(_e),qu=Vn==D||Vn==q;if(y(_e))return a(_e,At);if(Vn==H||Vn==R||qu&&!Ut){if(Et=Ge||qu?{}:x(_e),!At)return Ge?u(_e,i(Et,_e)):l(_e,r(Et,_e))}else{if(!xe[Vn])return Ut?_e:{};Et=g(_e,Vn,At)}}Pt||(Pt=new e);var wa=Pt.get(_e);if(wa)return wa;Pt.set(_e,Et),_(_e)?_e.forEach(function(Fn){Et.add(Ae(Fn,tt,nt,Fn,_e,Pt))}):S(_e)&&_e.forEach(function(Fn,Qt){Et.set(Qt,Ae(Fn,tt,nt,Qt,_e,Pt))});var Dd=$t?Ge?d:f:Ge?C:A,zu=bn?void 0:Dd(_e);return t(zu||_e,function(Fn,Qt){zu&&(Qt=Fn,Fn=_e[Qt]),n(Et,Qt,Ae(Fn,tt,nt,Qt,_e,Pt))}),Et}return oA=Ae,oA}var sA,iz;function Axe(){if(iz)return sA;iz=1;var e=BY(),t=4;function n(r){return e(r,t)}return sA=n,sA}var lA,az;function e2(){if(az)return lA;az=1;function e(t){return function(){return t}}return lA=e,lA}var uA,oz;function Cxe(){if(oz)return uA;oz=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),l=i(n),u=l.length;u--;){var f=l[t?u:++a];if(r(o[f],f,o)===!1)break}return n}}return uA=e,uA}var cA,sz;function t2(){if(sz)return cA;sz=1;var e=Cxe(),t=e();return cA=t,cA}var fA,lz;function n2(){if(lz)return fA;lz=1;var e=t2(),t=el();function n(r,i){return r&&e(r,i,t)}return fA=n,fA}var dA,uz;function Txe(){if(uz)return dA;uz=1;var e=_o();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var o=i.length,l=r?o:-1,u=Object(i);(r?l--:++l<o)&&a(u[l],l,u)!==!1;);return i}}return dA=t,dA}var hA,cz;function Sd(){if(cz)return hA;cz=1;var e=n2(),t=Txe(),n=t(e);return hA=n,hA}var pA,fz;function Iu(){if(fz)return pA;fz=1;function e(t){return t}return pA=e,pA}var mA,dz;function qY(){if(dz)return mA;dz=1;var e=Iu();function t(n){return typeof n=="function"?n:e}return mA=t,mA}var gA,hz;function zY(){if(hz)return gA;hz=1;var e=WR(),t=Sd(),n=qY(),r=on();function i(a,o){var l=r(a)?e:t;return l(a,n(o))}return gA=i,gA}var vA,pz;function VY(){return pz||(pz=1,vA=zY()),vA}var yA,mz;function Oxe(){if(mz)return yA;mz=1;var e=Sd();function t(n,r){var i=[];return e(n,function(a,o,l){r(a,o,l)&&i.push(a)}),i}return yA=t,yA}var bA,gz;function jxe(){if(gz)return bA;gz=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return bA=t,bA}var xA,vz;function Nxe(){if(vz)return xA;vz=1;function e(t){return this.__data__.has(t)}return xA=e,xA}var wA,yz;function FY(){if(yz)return wA;yz=1;var e=GR(),t=jxe(),n=Nxe();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,wA=r,wA}var SA,bz;function UY(){if(bz)return SA;bz=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return SA=e,SA}var _A,xz;function HY(){if(xz)return _A;xz=1;function e(t,n){return t.has(n)}return _A=e,_A}var EA,wz;function GY(){if(wz)return EA;wz=1;var e=FY(),t=UY(),n=HY(),r=1,i=2;function a(o,l,u,f,d,h){var m=u&r,g=o.length,x=l.length;if(g!=x&&!(m&&x>g))return!1;var w=h.get(o),y=h.get(l);if(w&&y)return w==l&&y==o;var S=-1,E=!0,_=u&i?new e:void 0;for(h.set(o,l),h.set(l,o);++S<g;){var A=o[S],C=l[S];if(f)var O=m?f(C,A,S,l,o,h):f(A,C,S,o,l,h);if(O!==void 0){if(O)continue;E=!1;break}if(_){if(!t(l,function(P,M){if(!n(_,M)&&(A===P||d(A,P,u,f,h)))return _.push(M)})){E=!1;break}}else if(!(A===C||d(A,C,u,f,h))){E=!1;break}}return h.delete(o),h.delete(l),E}return EA=a,EA}var AA,Sz;function Pxe(){if(Sz)return AA;Sz=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return AA=e,AA}var CA,_z;function r2(){if(_z)return CA;_z=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return CA=e,CA}var TA,Ez;function Mxe(){if(Ez)return TA;Ez=1;var e=yd(),t=DY(),n=vd(),r=GY(),i=Pxe(),a=r2(),o=1,l=2,u="[object Boolean]",f="[object Date]",d="[object Error]",h="[object Map]",m="[object Number]",g="[object RegExp]",x="[object Set]",w="[object String]",y="[object Symbol]",S="[object ArrayBuffer]",E="[object DataView]",_=e?e.prototype:void 0,A=_?_.valueOf:void 0;function C(O,P,M,R,$,I,k){switch(M){case E:if(O.byteLength!=P.byteLength||O.byteOffset!=P.byteOffset)return!1;O=O.buffer,P=P.buffer;case S:return!(O.byteLength!=P.byteLength||!I(new t(O),new t(P)));case u:case f:case m:return n(+O,+P);case d:return O.name==P.name&&O.message==P.message;case g:case w:return O==P+"";case h:var V=i;case x:var D=R&o;if(V||(V=a),O.size!=P.size&&!D)return!1;var q=k.get(O);if(q)return q==P;R|=l,k.set(O,P);var L=r(V(O),V(P),R,$,I,k);return k.delete(O),L;case y:if(A)return A.call(O)==A.call(P)}return!1}return TA=C,TA}var OA,Az;function Rxe(){if(Az)return OA;Az=1;var e=RY(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,l,u,f,d){var h=l&t,m=e(a),g=m.length,x=e(o),w=x.length;if(g!=w&&!h)return!1;for(var y=g;y--;){var S=m[y];if(!(h?S in o:r.call(o,S)))return!1}var E=d.get(a),_=d.get(o);if(E&&_)return E==o&&_==a;var A=!0;d.set(a,o),d.set(o,a);for(var C=h;++y<g;){S=m[y];var O=a[S],P=o[S];if(u)var M=h?u(P,O,S,o,a,d):u(O,P,S,a,o,d);if(!(M===void 0?O===P||f(O,P,l,u,d):M)){A=!1;break}C||(C=S=="constructor")}if(A&&!C){var R=a.constructor,$=o.constructor;R!=$&&"constructor"in a&&"constructor"in o&&!(typeof R=="function"&&R instanceof R&&typeof $=="function"&&$ instanceof $)&&(A=!1)}return d.delete(a),d.delete(o),A}return OA=i,OA}var jA,Cz;function kxe(){if(Cz)return jA;Cz=1;var e=dx(),t=GY(),n=Mxe(),r=Rxe(),i=wd(),a=on(),o=xd(),l=Km(),u=1,f="[object Arguments]",d="[object Array]",h="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function x(w,y,S,E,_,A){var C=a(w),O=a(y),P=C?d:i(w),M=O?d:i(y);P=P==f?h:P,M=M==f?h:M;var R=P==h,$=M==h,I=P==M;if(I&&o(w)){if(!o(y))return!1;C=!0,R=!1}if(I&&!R)return A||(A=new e),C||l(w)?t(w,y,S,E,_,A):n(w,y,P,S,E,_,A);if(!(S&u)){var k=R&&g.call(w,"__wrapped__"),V=$&&g.call(y,"__wrapped__");if(k||V){var D=k?w.value():w,q=V?y.value():y;return A||(A=new e),_(D,q,S,E,A)}}return I?(A||(A=new e),r(w,y,S,E,_,A)):!1}return jA=x,jA}var NA,Tz;function i2(){if(Tz)return NA;Tz=1;var e=kxe(),t=pi();function n(r,i,a,o,l){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,l)}return NA=n,NA}var PA,Oz;function Dxe(){if(Oz)return PA;Oz=1;var e=dx(),t=i2(),n=1,r=2;function i(a,o,l,u){var f=l.length,d=f,h=!u;if(a==null)return!d;for(a=Object(a);f--;){var m=l[f];if(h&&m[2]?m[1]!==a[m[0]]:!(m[0]in a))return!1}for(;++f<d;){m=l[f];var g=m[0],x=a[g],w=m[1];if(h&&m[2]){if(x===void 0&&!(g in a))return!1}else{var y=new e;if(u)var S=u(x,w,g,a,o,y);if(!(S===void 0?t(w,x,n|r,u,y):S))return!1}}return!0}return PA=i,PA}var MA,jz;function WY(){if(jz)return MA;jz=1;var e=lr();function t(n){return n===n&&!e(n)}return MA=t,MA}var RA,Nz;function Ixe(){if(Nz)return RA;Nz=1;var e=WY(),t=el();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],l=r[o];i[a]=[o,l,e(l)]}return i}return RA=n,RA}var kA,Pz;function KY(){if(Pz)return kA;Pz=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return kA=e,kA}var DA,Mz;function Lxe(){if(Mz)return DA;Mz=1;var e=Dxe(),t=Ixe(),n=KY();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return DA=r,DA}var IA,Rz;function _d(){if(Rz)return IA;Rz=1;var e=So(),t=pi(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return IA=r,IA}var LA,kz;function a2(){if(kz)return LA;kz=1;var e=on(),t=_d(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return LA=i,LA}var $A,Dz;function YY(){if(Dz)return $A;Dz=1;var e=GR(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,l=i?i.apply(this,o):o[0],u=a.cache;if(u.has(l))return u.get(l);var f=r.apply(this,o);return a.cache=u.set(l,f)||u,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,$A=n,$A}var BA,Iz;function $xe(){if(Iz)return BA;Iz=1;var e=YY(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return BA=n,BA}var qA,Lz;function Bxe(){if(Lz)return qA;Lz=1;var e=$xe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,l,u,f){a.push(u?f.replace(n,"$1"):l||o)}),a});return qA=r,qA}var zA,$z;function bx(){if($z)return zA;$z=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return zA=e,zA}var VA,Bz;function qxe(){if(Bz)return VA;Bz=1;var e=yd(),t=bx(),n=on(),r=_d(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return a?a.call(l):"";var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}return VA=o,VA}var FA,qz;function o2(){if(qz)return FA;qz=1;var e=qxe();function t(n){return n==null?"":e(n)}return FA=t,FA}var UA,zz;function xx(){if(zz)return UA;zz=1;var e=on(),t=a2(),n=Bxe(),r=o2();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return UA=i,UA}var HA,Vz;function Ym(){if(Vz)return HA;Vz=1;var e=_d();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return HA=t,HA}var GA,Fz;function wx(){if(Fz)return GA;Fz=1;var e=xx(),t=Ym();function n(r,i){i=e(i,r);for(var a=0,o=i.length;r!=null&&a<o;)r=r[t(i[a++])];return a&&a==o?r:void 0}return GA=n,GA}var WA,Uz;function XY(){if(Uz)return WA;Uz=1;var e=wx();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return WA=t,WA}var KA,Hz;function zxe(){if(Hz)return KA;Hz=1;function e(t,n){return t!=null&&n in Object(t)}return KA=e,KA}var YA,Gz;function ZY(){if(Gz)return YA;Gz=1;var e=xx(),t=Wm(),n=on(),r=mx(),i=KR(),a=Ym();function o(l,u,f){u=e(u,l);for(var d=-1,h=u.length,m=!1;++d<h;){var g=a(u[d]);if(!(m=l!=null&&f(l,g)))break;l=l[g]}return m||++d!=h?m:(h=l==null?0:l.length,!!h&&i(h)&&r(g,h)&&(n(l)||t(l)))}return YA=o,YA}var XA,Wz;function QY(){if(Wz)return XA;Wz=1;var e=zxe(),t=ZY();function n(r,i){return r!=null&&t(r,i,e)}return XA=n,XA}var ZA,Kz;function Vxe(){if(Kz)return ZA;Kz=1;var e=i2(),t=XY(),n=QY(),r=a2(),i=WY(),a=KY(),o=Ym(),l=1,u=2;function f(d,h){return r(d)&&i(h)?a(o(d),h):function(m){var g=t(m,d);return g===void 0&&g===h?n(m,d):e(h,g,l|u)}}return ZA=f,ZA}var QA,Yz;function JY(){if(Yz)return QA;Yz=1;function e(t){return function(n){return n==null?void 0:n[t]}}return QA=e,QA}var JA,Xz;function Fxe(){if(Xz)return JA;Xz=1;var e=wx();function t(n){return function(r){return e(r,n)}}return JA=t,JA}var eC,Zz;function Uxe(){if(Zz)return eC;Zz=1;var e=JY(),t=Fxe(),n=a2(),r=Ym();function i(a){return n(a)?e(r(a)):t(a)}return eC=i,eC}var tC,Qz;function mi(){if(Qz)return tC;Qz=1;var e=Lxe(),t=Vxe(),n=Iu(),r=on(),i=Uxe();function a(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return tC=a,tC}var nC,Jz;function eX(){if(Jz)return nC;Jz=1;var e=jY(),t=Oxe(),n=mi(),r=on();function i(a,o){var l=r(a)?e:t;return l(a,n(o,3))}return nC=i,nC}var rC,e5;function Hxe(){if(e5)return rC;e5=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return rC=n,rC}var iC,t5;function tX(){if(t5)return iC;t5=1;var e=Hxe(),t=ZY();function n(r,i){return r!=null&&t(r,i,e)}return iC=n,iC}var aC,n5;function Gxe(){if(n5)return aC;n5=1;var e=XR(),t=wd(),n=Wm(),r=on(),i=_o(),a=xd(),o=vx(),l=Km(),u="[object Map]",f="[object Set]",d=Object.prototype,h=d.hasOwnProperty;function m(g){if(g==null)return!0;if(i(g)&&(r(g)||typeof g=="string"||typeof g.splice=="function"||a(g)||l(g)||n(g)))return!g.length;var x=t(g);if(x==u||x==f)return!g.size;if(o(g))return!e(g).length;for(var w in g)if(h.call(g,w))return!1;return!0}return aC=m,aC}var oC,r5;function nX(){if(r5)return oC;r5=1;function e(t){return t===void 0}return oC=e,oC}var sC,i5;function rX(){if(i5)return sC;i5=1;var e=Sd(),t=_o();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(l,u,f){o[++a]=i(l,u,f)}),o}return sC=n,sC}var lC,a5;function s2(){if(a5)return lC;a5=1;var e=bx(),t=mi(),n=rX(),r=on();function i(a,o){var l=r(a)?e:n;return l(a,t(o,3))}return lC=i,lC}var uC,o5;function Wxe(){if(o5)return uC;o5=1;function e(t,n,r,i){var a=-1,o=t==null?0:t.length;for(i&&o&&(r=t[++a]);++a<o;)r=n(r,t[a],a,t);return r}return uC=e,uC}var cC,s5;function Kxe(){if(s5)return cC;s5=1;function e(t,n,r,i,a){return a(t,function(o,l,u){r=i?(i=!1,o):n(r,o,l,u)}),r}return cC=e,cC}var fC,l5;function iX(){if(l5)return fC;l5=1;var e=Wxe(),t=Sd(),n=mi(),r=Kxe(),i=on();function a(o,l,u){var f=i(o)?e:r,d=arguments.length<3;return f(o,n(l,4),u,d,t)}return fC=a,fC}var dC,u5;function aX(){if(u5)return dC;u5=1;var e=So(),t=on(),n=pi(),r="[object String]";function i(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return dC=i,dC}var hC,c5;function Yxe(){if(c5)return hC;c5=1;var e=JY(),t=e("length");return hC=t,hC}var pC,f5;function l2(){if(f5)return pC;f5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+i+a+"]");function u(f){return l.test(f)}return pC=u,pC}var mC,d5;function Xxe(){if(d5)return mC;d5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+u+")",d="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",x=f+"?",w="["+a+"]?",y="(?:"+g+"(?:"+[d,h,m].join("|")+")"+w+x+")*",S=w+x+y,E="(?:"+[d+l+"?",l,h,m,o].join("|")+")",_=RegExp(u+"(?="+u+")|"+E+S,"g");function A(C){for(var O=_.lastIndex=0;_.test(C);)++O;return O}return mC=A,mC}var gC,h5;function Zxe(){if(h5)return gC;h5=1;var e=Yxe(),t=l2(),n=Xxe();function r(i){return t(i)?n(i):e(i)}return gC=r,gC}var vC,p5;function Qxe(){if(p5)return vC;p5=1;var e=XR(),t=wd(),n=_o(),r=aX(),i=Zxe(),a="[object Map]",o="[object Set]";function l(u){if(u==null)return 0;if(n(u))return r(u)?i(u):u.length;var f=t(u);return f==a||f==o?u.size:e(u).length}return vC=l,vC}var yC,m5;function Jxe(){if(m5)return yC;m5=1;var e=WR(),t=LY(),n=n2(),r=mi(),i=yx(),a=on(),o=xd(),l=bd(),u=lr(),f=Km();function d(h,m,g){var x=a(h),w=x||o(h)||f(h);if(m=r(m,4),g==null){var y=h&&h.constructor;w?g=x?new y:[]:u(h)?g=l(y)?t(i(h)):{}:g={}}return(w?e:n)(h,function(S,E,_){return m(g,S,E,_)}),g}return yC=d,yC}var bC,g5;function ewe(){if(g5)return bC;g5=1;var e=yd(),t=Wm(),n=on(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return bC=i,bC}var xC,v5;function Sx(){if(v5)return xC;v5=1;var e=QR(),t=ewe();function n(r,i,a,o,l){var u=-1,f=r.length;for(a||(a=t),l||(l=[]);++u<f;){var d=r[u];i>0&&a(d)?i>1?n(d,i-1,a,o,l):e(l,d):o||(l[l.length]=d)}return l}return xC=n,xC}var wC,y5;function twe(){if(y5)return wC;y5=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 wC=e,wC}var SC,b5;function oX(){if(b5)return SC;b5=1;var e=twe(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,l=-1,u=t(o.length-i,0),f=Array(u);++l<u;)f[l]=o[i+l];l=-1;for(var d=Array(i+1);++l<i;)d[l]=o[l];return d[i]=a(f),e(r,this,d)}}return SC=n,SC}var _C,x5;function nwe(){if(x5)return _C;x5=1;var e=e2(),t=EY(),n=Iu(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return _C=r,_C}var EC,w5;function rwe(){if(w5)return EC;w5=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var l=n(),u=t-(l-o);if(o=l,u>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return EC=r,EC}var AC,S5;function sX(){if(S5)return AC;S5=1;var e=nwe(),t=rwe(),n=t(e);return AC=n,AC}var CC,_5;function _x(){if(_5)return CC;_5=1;var e=Iu(),t=oX(),n=sX();function r(i,a){return n(t(i,a,e),i+"")}return CC=r,CC}var TC,E5;function lX(){if(E5)return TC;E5=1;function e(t,n,r,i){for(var a=t.length,o=r+(i?1:-1);i?o--:++o<a;)if(n(t[o],o,t))return o;return-1}return TC=e,TC}var OC,A5;function iwe(){if(A5)return OC;A5=1;function e(t){return t!==t}return OC=e,OC}var jC,C5;function awe(){if(C5)return jC;C5=1;function e(t,n,r){for(var i=r-1,a=t.length;++i<a;)if(t[i]===n)return i;return-1}return jC=e,jC}var NC,T5;function owe(){if(T5)return NC;T5=1;var e=lX(),t=iwe(),n=awe();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return NC=r,NC}var PC,O5;function swe(){if(O5)return PC;O5=1;var e=owe();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return PC=t,PC}var MC,j5;function lwe(){if(j5)return MC;j5=1;function e(t,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(n,t[i]))return!0;return!1}return MC=e,MC}var RC,N5;function uwe(){if(N5)return RC;N5=1;function e(){}return RC=e,RC}var kC,P5;function cwe(){if(P5)return kC;P5=1;var e=kY(),t=uwe(),n=r2(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return kC=i,kC}var DC,M5;function uX(){if(M5)return DC;M5=1;var e=FY(),t=swe(),n=lwe(),r=HY(),i=cwe(),a=r2(),o=200;function l(u,f,d){var h=-1,m=t,g=u.length,x=!0,w=[],y=w;if(d)x=!1,m=n;else if(g>=o){var S=f?null:i(u);if(S)return a(S);x=!1,m=r,y=new e}else y=f?[]:w;e:for(;++h<g;){var E=u[h],_=f?f(E):E;if(E=d||E!==0?E:0,x&&_===_){for(var A=y.length;A--;)if(y[A]===_)continue e;f&&y.push(_),w.push(E)}else m(y,_,d)||(y!==w&&y.push(_),w.push(E))}return w}return DC=l,DC}var IC,R5;function cX(){if(R5)return IC;R5=1;var e=_o(),t=pi();function n(r){return t(r)&&e(r)}return IC=n,IC}var LC,k5;function fwe(){if(k5)return LC;k5=1;var e=Sx(),t=_x(),n=uX(),r=cX(),i=t(function(a){return n(e(a,1,r,!0))});return LC=i,LC}var $C,D5;function dwe(){if(D5)return $C;D5=1;var e=bx();function t(n,r){return e(r,function(i){return n[i]})}return $C=t,$C}var BC,I5;function fX(){if(I5)return BC;I5=1;var e=dwe(),t=el();function n(r){return r==null?[]:e(r,t(r))}return BC=n,BC}var qC,L5;function gi(){if(L5)return qC;L5=1;var e;if(typeof UR=="function")try{e={clone:Axe(),constant:e2(),each:VY(),filter:eX(),has:tX(),isArray:on(),isEmpty:Gxe(),isFunction:bd(),isUndefined:nX(),keys:el(),map:s2(),reduce:iX(),size:Qxe(),transform:Jxe(),union:fwe(),values:fX()}}catch{}return e||(e=window._),qC=e,qC}var zC,$5;function u2(){if($5)return zC;$5=1;var e=gi();zC=i;var t="\0",n="\0",r="";function i(d){this._isDirected=e.has(d,"directed")?d.directed:!0,this._isMultigraph=e.has(d,"multigraph")?d.multigraph:!1,this._isCompound=e.has(d,"compound")?d.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(d){return this._label=d,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultNodeLabelFn=d,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var d=this;return e.filter(this.nodes(),function(h){return e.isEmpty(d._in[h])})},i.prototype.sinks=function(){var d=this;return e.filter(this.nodes(),function(h){return e.isEmpty(d._out[h])})},i.prototype.setNodes=function(d,h){var m=arguments,g=this;return e.each(d,function(x){m.length>1?g.setNode(x,h):g.setNode(x)}),this},i.prototype.setNode=function(d,h){return e.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=h),this):(this._nodes[d]=arguments.length>1?h:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=n,this._children[d]={},this._children[n][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},i.prototype.node=function(d){return this._nodes[d]},i.prototype.hasNode=function(d){return e.has(this._nodes,d)},i.prototype.removeNode=function(d){var h=this;if(e.has(this._nodes,d)){var m=function(g){h.removeEdge(h._edgeObjs[g])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],e.each(this.children(d),function(g){h.setParent(g)}),delete this._children[d]),e.each(e.keys(this._in[d]),m),delete this._in[d],delete this._preds[d],e.each(e.keys(this._out[d]),m),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},i.prototype.setParent=function(d,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(h))h=n;else{h+="";for(var m=h;!e.isUndefined(m);m=this.parent(m))if(m===d)throw new Error("Setting "+h+" as parent of "+d+" would create a cycle");this.setNode(h)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=h,this._children[h][d]=!0,this},i.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},i.prototype.parent=function(d){if(this._isCompound){var h=this._parent[d];if(h!==n)return h}},i.prototype.children=function(d){if(e.isUndefined(d)&&(d=n),this._isCompound){var h=this._children[d];if(h)return e.keys(h)}else{if(d===n)return this.nodes();if(this.hasNode(d))return[]}},i.prototype.predecessors=function(d){var h=this._preds[d];if(h)return e.keys(h)},i.prototype.successors=function(d){var h=this._sucs[d];if(h)return e.keys(h)},i.prototype.neighbors=function(d){var h=this.predecessors(d);if(h)return e.union(h,this.successors(d))},i.prototype.isLeaf=function(d){var h;return this.isDirected()?h=this.successors(d):h=this.neighbors(d),h.length===0},i.prototype.filterNodes=function(d){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var m=this;e.each(this._nodes,function(w,y){d(y)&&h.setNode(y,w)}),e.each(this._edgeObjs,function(w){h.hasNode(w.v)&&h.hasNode(w.w)&&h.setEdge(w,m.edge(w))});var g={};function x(w){var y=m.parent(w);return y===void 0||h.hasNode(y)?(g[w]=y,y):y in g?g[y]:x(y)}return this._isCompound&&e.each(h.nodes(),function(w){h.setParent(w,x(w))}),h},i.prototype.setDefaultEdgeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultEdgeLabelFn=d,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(d,h){var m=this,g=arguments;return e.reduce(d,function(x,w){return g.length>1?m.setEdge(x,w,h):m.setEdge(x,w),w}),this},i.prototype.setEdge=function(){var d,h,m,g,x=!1,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(d=w.v,h=w.w,m=w.name,arguments.length===2&&(g=arguments[1],x=!0)):(d=w,h=arguments[1],m=arguments[3],arguments.length>2&&(g=arguments[2],x=!0)),d=""+d,h=""+h,e.isUndefined(m)||(m=""+m);var y=l(this._isDirected,d,h,m);if(e.has(this._edgeLabels,y))return x&&(this._edgeLabels[y]=g),this;if(!e.isUndefined(m)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(h),this._edgeLabels[y]=x?g:this._defaultEdgeLabelFn(d,h,m);var S=u(this._isDirected,d,h,m);return d=S.v,h=S.w,Object.freeze(S),this._edgeObjs[y]=S,a(this._preds[h],d),a(this._sucs[d],h),this._in[h][y]=S,this._out[d][y]=S,this._edgeCount++,this},i.prototype.edge=function(d,h,m){var g=arguments.length===1?f(this._isDirected,arguments[0]):l(this._isDirected,d,h,m);return this._edgeLabels[g]},i.prototype.hasEdge=function(d,h,m){var g=arguments.length===1?f(this._isDirected,arguments[0]):l(this._isDirected,d,h,m);return e.has(this._edgeLabels,g)},i.prototype.removeEdge=function(d,h,m){var g=arguments.length===1?f(this._isDirected,arguments[0]):l(this._isDirected,d,h,m),x=this._edgeObjs[g];return x&&(d=x.v,h=x.w,delete this._edgeLabels[g],delete this._edgeObjs[g],o(this._preds[h],d),o(this._sucs[d],h),delete this._in[h][g],delete this._out[d][g],this._edgeCount--),this},i.prototype.inEdges=function(d,h){var m=this._in[d];if(m){var g=e.values(m);return h?e.filter(g,function(x){return x.v===h}):g}},i.prototype.outEdges=function(d,h){var m=this._out[d];if(m){var g=e.values(m);return h?e.filter(g,function(x){return x.w===h}):g}},i.prototype.nodeEdges=function(d,h){var m=this.inEdges(d,h);if(m)return m.concat(this.outEdges(d,h))};function a(d,h){d[h]?d[h]++:d[h]=1}function o(d,h){--d[h]||delete d[h]}function l(d,h,m,g){var x=""+h,w=""+m;if(!d&&x>w){var y=x;x=w,w=y}return x+r+w+r+(e.isUndefined(g)?t:g)}function u(d,h,m,g){var x=""+h,w=""+m;if(!d&&x>w){var y=x;x=w,w=y}var S={v:x,w};return g&&(S.name=g),S}function f(d,h){return l(d,h.v,h.w,h.name)}return zC}var VC,B5;function hwe(){return B5||(B5=1,VC="2.1.8"),VC}var FC,q5;function pwe(){return q5||(q5=1,FC={Graph:u2(),version:hwe()}),FC}var UC,z5;function mwe(){if(z5)return UC;z5=1;var e=gi(),t=u2();UC={write:n,read:a};function n(o){var l={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:r(o),edges:i(o)};return e.isUndefined(o.graph())||(l.value=e.clone(o.graph())),l}function r(o){return e.map(o.nodes(),function(l){var u=o.node(l),f=o.parent(l),d={v:l};return e.isUndefined(u)||(d.value=u),e.isUndefined(f)||(d.parent=f),d})}function i(o){return e.map(o.edges(),function(l){var u=o.edge(l),f={v:l.v,w:l.w};return e.isUndefined(l.name)||(f.name=l.name),e.isUndefined(u)||(f.value=u),f})}function a(o){var l=new t(o.options).setGraph(o.value);return e.each(o.nodes,function(u){l.setNode(u.v,u.value),u.parent&&l.setParent(u.v,u.parent)}),e.each(o.edges,function(u){l.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),l}return UC}var HC,V5;function gwe(){if(V5)return HC;V5=1;var e=gi();HC=t;function t(n){var r={},i=[],a;function o(l){e.has(r,l)||(r[l]=!0,a.push(l),e.each(n.successors(l),o),e.each(n.predecessors(l),o))}return e.each(n.nodes(),function(l){a=[],o(l),a.length&&i.push(a)}),i}return HC}var GC,F5;function dX(){if(F5)return GC;F5=1;var e=gi();GC=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var a=this._arr,o=a.length;return i[n]=o,a.push({key:n,priority:r}),this._decrease(o),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)},t.prototype._heapify=function(n){var r=this._arr,i=2*n,a=i+1,o=n;i<r.length&&(o=r[i].priority<r[o].priority?i:o,a<r.length&&(o=r[a].priority<r[o].priority?a:o),o!==n&&(this._swap(n,o),this._heapify(o)))},t.prototype._decrease=function(n){for(var r=this._arr,i=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<i));)this._swap(n,a),n=a},t.prototype._swap=function(n,r){var i=this._arr,a=this._keyIndices,o=i[n],l=i[r];i[n]=l,i[r]=o,a[l.key]=n,a[o.key]=r},GC}var WC,U5;function hX(){if(U5)return WC;U5=1;var e=gi(),t=dX();WC=r;var n=e.constant(1);function r(a,o,l,u){return i(a,String(o),l||n,u||function(f){return a.outEdges(f)})}function i(a,o,l,u){var f={},d=new t,h,m,g=function(x){var w=x.v!==h?x.v:x.w,y=f[w],S=l(x),E=m.distance+S;if(S<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+S);E<y.distance&&(y.distance=E,y.predecessor=h,d.decrease(w,E))};for(a.nodes().forEach(function(x){var w=x===o?0:Number.POSITIVE_INFINITY;f[x]={distance:w},d.add(x,w)});d.size()>0&&(h=d.removeMin(),m=f[h],m.distance!==Number.POSITIVE_INFINITY);)u(h).forEach(g);return f}return WC}var KC,H5;function vwe(){if(H5)return KC;H5=1;var e=hX(),t=gi();KC=n;function n(r,i,a){return t.transform(r.nodes(),function(o,l){o[l]=e(r,l,i,a)},{})}return KC}var YC,G5;function pX(){if(G5)return YC;G5=1;var e=gi();YC=t;function t(n){var r=0,i=[],a={},o=[];function l(u){var f=a[u]={onStack:!0,lowlink:r,index:r++};if(i.push(u),n.successors(u).forEach(function(m){e.has(a,m)?a[m].onStack&&(f.lowlink=Math.min(f.lowlink,a[m].index)):(l(m),f.lowlink=Math.min(f.lowlink,a[m].lowlink))}),f.lowlink===f.index){var d=[],h;do h=i.pop(),a[h].onStack=!1,d.push(h);while(u!==h);o.push(d)}}return n.nodes().forEach(function(u){e.has(a,u)||l(u)}),o}return YC}var XC,W5;function ywe(){if(W5)return XC;W5=1;var e=gi(),t=pX();XC=n;function n(r){return e.filter(t(r),function(i){return i.length>1||i.length===1&&r.hasEdge(i[0],i[0])})}return XC}var ZC,K5;function bwe(){if(K5)return ZC;K5=1;var e=gi();ZC=n;var t=e.constant(1);function n(i,a,o){return r(i,a||t,o||function(l){return i.outEdges(l)})}function r(i,a,o){var l={},u=i.nodes();return u.forEach(function(f){l[f]={},l[f][f]={distance:0},u.forEach(function(d){f!==d&&(l[f][d]={distance:Number.POSITIVE_INFINITY})}),o(f).forEach(function(d){var h=d.v===f?d.w:d.v,m=a(d);l[f][h]={distance:m,predecessor:f}})}),u.forEach(function(f){var d=l[f];u.forEach(function(h){var m=l[h];u.forEach(function(g){var x=m[f],w=d[g],y=m[g],S=x.distance+w.distance;S<y.distance&&(y.distance=S,y.predecessor=w.predecessor)})})}),l}return ZC}var QC,Y5;function mX(){if(Y5)return QC;Y5=1;var e=gi();QC=t,t.CycleException=n;function t(r){var i={},a={},o=[];function l(u){if(e.has(a,u))throw new n;e.has(i,u)||(a[u]=!0,i[u]=!0,e.each(r.predecessors(u),l),delete a[u],o.push(u))}if(e.each(r.sinks(),l),e.size(i)!==r.nodeCount())throw new n;return o}function n(){}return n.prototype=new Error,QC}var JC,X5;function xwe(){if(X5)return JC;X5=1;var e=mX();JC=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return JC}var eT,Z5;function gX(){if(Z5)return eT;Z5=1;var e=gi();eT=t;function t(r,i,a){e.isArray(i)||(i=[i]);var o=(r.isDirected()?r.successors:r.neighbors).bind(r),l=[],u={};return e.each(i,function(f){if(!r.hasNode(f))throw new Error("Graph does not have node: "+f);n(r,f,a==="post",u,o,l)}),l}function n(r,i,a,o,l,u){e.has(o,i)||(o[i]=!0,a||u.push(i),e.each(l(i),function(f){n(r,f,a,o,l,u)}),a&&u.push(i))}return eT}var tT,Q5;function wwe(){if(Q5)return tT;Q5=1;var e=gX();tT=t;function t(n,r){return e(n,r,"post")}return tT}var nT,J5;function Swe(){if(J5)return nT;J5=1;var e=gX();nT=t;function t(n,r){return e(n,r,"pre")}return nT}var rT,eV;function _we(){if(eV)return rT;eV=1;var e=gi(),t=u2(),n=dX();rT=r;function r(i,a){var o=new t,l={},u=new n,f;function d(m){var g=m.v===f?m.w:m.v,x=u.priority(g);if(x!==void 0){var w=a(m);w<x&&(l[g]=f,u.decrease(g,w))}}if(i.nodeCount()===0)return o;e.each(i.nodes(),function(m){u.add(m,Number.POSITIVE_INFINITY),o.setNode(m)}),u.decrease(i.nodes()[0],0);for(var h=!1;u.size()>0;){if(f=u.removeMin(),e.has(l,f))o.setEdge(f,l[f]);else{if(h)throw new Error("Input graph is not connected: "+i);h=!0}i.nodeEdges(f).forEach(d)}return o}return rT}var iT,tV;function Ewe(){return tV||(tV=1,iT={components:gwe(),dijkstra:hX(),dijkstraAll:vwe(),findCycles:ywe(),floydWarshall:bwe(),isAcyclic:xwe(),postorder:wwe(),preorder:Swe(),prim:_we(),tarjan:pX(),topsort:mX()}),iT}var aT,nV;function Awe(){if(nV)return aT;nV=1;var e=pwe();return aT={Graph:e.Graph,json:mwe(),alg:Ewe(),version:e.version},aT}var oT,rV;function qi(){if(rV)return oT;rV=1;var e;if(typeof UR=="function")try{e=Awe()}catch{}return e||(e=window.graphlib),oT=e,oT}var sT,iV;function Cwe(){if(iV)return sT;iV=1;var e=BY(),t=1,n=4;function r(i){return e(i,t|n)}return sT=r,sT}var lT,aV;function Ed(){if(aV)return lT;aV=1;var e=vd(),t=_o(),n=mx(),r=lr();function i(a,o,l){if(!r(l))return!1;var u=typeof o;return(u=="number"?t(l)&&n(o,l.length):u=="string"&&o in l)?e(l[o],a):!1}return lT=i,lT}var uT,oV;function Twe(){if(oV)return uT;oV=1;var e=_x(),t=vd(),n=Ed(),r=Du(),i=Object.prototype,a=i.hasOwnProperty,o=e(function(l,u){l=Object(l);var f=-1,d=u.length,h=d>2?u[2]:void 0;for(h&&n(u[0],u[1],h)&&(d=1);++f<d;)for(var m=u[f],g=r(m),x=-1,w=g.length;++x<w;){var y=g[x],S=l[y];(S===void 0||t(S,i[y])&&!a.call(l,y))&&(l[y]=m[y])}return l});return uT=o,uT}var cT,sV;function Owe(){if(sV)return cT;sV=1;var e=mi(),t=_o(),n=el();function r(i){return function(a,o,l){var u=Object(a);if(!t(a)){var f=e(o,3);a=n(a),o=function(h){return f(u[h],h,u)}}var d=i(a,o,l);return d>-1?u[f?a[d]:d]:void 0}}return cT=r,cT}var fT,lV;function jwe(){if(lV)return fT;lV=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return fT=t,fT}var dT,uV;function Nwe(){if(uV)return dT;uV=1;var e=jwe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return dT=n,dT}var hT,cV;function vX(){if(cV)return hT;cV=1;var e=Nwe(),t=lr(),n=_d(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function u(f){if(typeof f=="number")return f;if(n(f))return r;if(t(f)){var d=typeof f.valueOf=="function"?f.valueOf():f;f=t(d)?d+"":d}if(typeof f!="string")return f===0?f:+f;f=e(f);var h=a.test(f);return h||o.test(f)?l(f.slice(2),h?2:8):i.test(f)?r:+f}return hT=u,hT}var pT,fV;function yX(){if(fV)return pT;fV=1;var e=vX(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return pT=r,pT}var mT,dV;function Pwe(){if(dV)return mT;dV=1;var e=yX();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return mT=t,mT}var gT,hV;function Mwe(){if(hV)return gT;hV=1;var e=lX(),t=mi(),n=Pwe(),r=Math.max;function i(a,o,l){var u=a==null?0:a.length;if(!u)return-1;var f=l==null?0:n(l);return f<0&&(f=r(u+f,0)),e(a,t(o,3),f)}return gT=i,gT}var vT,pV;function bX(){if(pV)return vT;pV=1;var e=Owe(),t=Mwe(),n=e(t);return vT=n,vT}var yT,mV;function xX(){if(mV)return yT;mV=1;var e=Sx();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return yT=t,yT}var bT,gV;function Rwe(){if(gV)return bT;gV=1;var e=t2(),t=qY(),n=Du();function r(i,a){return i==null?i:e(i,t(a),n)}return bT=r,bT}var xT,vV;function wX(){if(vV)return xT;vV=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return xT=e,xT}var wT,yV;function SX(){if(yV)return wT;yV=1;var e=hx(),t=n2(),n=mi();function r(i,a){var o={};return a=n(a,3),t(i,function(l,u,f){e(o,u,a(l,u,f))}),o}return wT=r,wT}var ST,bV;function c2(){if(bV)return ST;bV=1;var e=_d();function t(n,r,i){for(var a=-1,o=n.length;++a<o;){var l=n[a],u=r(l);if(u!=null&&(f===void 0?u===u&&!e(u):i(u,f)))var f=u,d=l}return d}return ST=t,ST}var _T,xV;function kwe(){if(xV)return _T;xV=1;function e(t,n){return t>n}return _T=e,_T}var ET,wV;function _X(){if(wV)return ET;wV=1;var e=c2(),t=kwe(),n=Iu();function r(i){return i&&i.length?e(i,n,t):void 0}return ET=r,ET}var AT,SV;function EX(){if(SV)return AT;SV=1;var e=hx(),t=vd();function n(r,i,a){(a!==void 0&&!t(r[i],a)||a===void 0&&!(i in r))&&e(r,i,a)}return AT=n,AT}var CT,_V;function AX(){if(_V)return CT;_V=1;var e=So(),t=yx(),n=pi(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,l=a.hasOwnProperty,u=o.call(Object);function f(d){if(!n(d)||e(d)!=r)return!1;var h=t(d);if(h===null)return!0;var m=l.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&o.call(m)==u}return CT=f,CT}var TT,EV;function CX(){if(EV)return TT;EV=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return TT=e,TT}var OT,AV;function Dwe(){if(AV)return OT;AV=1;var e=Gm(),t=Du();function n(r){return e(r,t(r))}return OT=n,OT}var jT,CV;function Iwe(){if(CV)return jT;CV=1;var e=EX(),t=TY(),n=IY(),r=OY(),i=$Y(),a=Wm(),o=on(),l=cX(),u=xd(),f=bd(),d=lr(),h=AX(),m=Km(),g=CX(),x=Dwe();function w(y,S,E,_,A,C,O){var P=g(y,E),M=g(S,E),R=O.get(M);if(R){e(y,E,R);return}var $=C?C(P,M,E+"",y,S,O):void 0,I=$===void 0;if(I){var k=o(M),V=!k&&u(M),D=!k&&!V&&m(M);$=M,k||V||D?o(P)?$=P:l(P)?$=r(P):V?(I=!1,$=t(M,!0)):D?(I=!1,$=n(M,!0)):$=[]:h(M)||a(M)?($=P,a(P)?$=x(P):(!d(P)||f(P))&&($=i(M))):I=!1}I&&(O.set(M,$),A($,M,_,C,O),O.delete(M)),e(y,E,$)}return jT=w,jT}var NT,TV;function Lwe(){if(TV)return NT;TV=1;var e=dx(),t=EX(),n=t2(),r=Iwe(),i=lr(),a=Du(),o=CX();function l(u,f,d,h,m){u!==f&&n(f,function(g,x){if(m||(m=new e),i(g))r(u,f,x,d,l,h,m);else{var w=h?h(o(u,x),g,x+"",u,f,m):void 0;w===void 0&&(w=g),t(u,x,w)}},a)}return NT=l,NT}var PT,OV;function $we(){if(OV)return PT;OV=1;var e=_x(),t=Ed();function n(r){return e(function(i,a){var o=-1,l=a.length,u=l>1?a[l-1]:void 0,f=l>2?a[2]:void 0;for(u=r.length>3&&typeof u=="function"?(l--,u):void 0,f&&t(a[0],a[1],f)&&(u=l<3?void 0:u,l=1),i=Object(i);++o<l;){var d=a[o];d&&r(i,d,o,u)}return i})}return PT=n,PT}var MT,jV;function Bwe(){if(jV)return MT;jV=1;var e=Lwe(),t=$we(),n=t(function(r,i,a){e(r,i,a)});return MT=n,MT}var RT,NV;function TX(){if(NV)return RT;NV=1;function e(t,n){return t<n}return RT=e,RT}var kT,PV;function OX(){if(PV)return kT;PV=1;var e=c2(),t=TX(),n=Iu();function r(i){return i&&i.length?e(i,n,t):void 0}return kT=r,kT}var DT,MV;function qwe(){if(MV)return DT;MV=1;var e=c2(),t=mi(),n=TX();function r(i,a){return i&&i.length?e(i,t(a,2),n):void 0}return DT=r,DT}var IT,RV;function jX(){if(RV)return IT;RV=1;var e=Ui(),t=function(){return e.Date.now()};return IT=t,IT}var LT,kV;function zwe(){if(kV)return LT;kV=1;var e=px(),t=xx(),n=mx(),r=lr(),i=Ym();function a(o,l,u,f){if(!r(o))return o;l=t(l,o);for(var d=-1,h=l.length,m=h-1,g=o;g!=null&&++d<h;){var x=i(l[d]),w=u;if(x==="__proto__"||x==="constructor"||x==="prototype")return o;if(d!=m){var y=g[x];w=f?f(y,x,g):void 0,w===void 0&&(w=r(y)?y:n(l[d+1])?[]:{})}e(g,x,w),g=g[x]}return o}return LT=a,LT}var $T,DV;function Vwe(){if(DV)return $T;DV=1;var e=wx(),t=zwe(),n=xx();function r(i,a,o){for(var l=-1,u=a.length,f={};++l<u;){var d=a[l],h=e(i,d);o(h,d)&&t(f,n(d,i),h)}return f}return $T=r,$T}var BT,IV;function Fwe(){if(IV)return BT;IV=1;var e=Vwe(),t=QY();function n(r,i){return e(r,i,function(a,o){return t(r,o)})}return BT=n,BT}var qT,LV;function Uwe(){if(LV)return qT;LV=1;var e=xX(),t=oX(),n=sX();function r(i){return n(t(i,void 0,e),i+"")}return qT=r,qT}var zT,$V;function Hwe(){if($V)return zT;$V=1;var e=Fwe(),t=Uwe(),n=t(function(r,i){return r==null?{}:e(r,i)});return zT=n,zT}var VT,BV;function Gwe(){if(BV)return VT;BV=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var l=-1,u=t(e((i-r)/(a||1)),0),f=Array(u);u--;)f[o?u:++l]=r,r+=a;return f}return VT=n,VT}var FT,qV;function Wwe(){if(qV)return FT;qV=1;var e=Gwe(),t=Ed(),n=yX();function r(i){return function(a,o,l){return l&&typeof l!="number"&&t(a,o,l)&&(o=l=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),l=l===void 0?a<o?1:-1:n(l),e(a,o,l,i)}}return FT=r,FT}var UT,zV;function NX(){if(zV)return UT;zV=1;var e=Wwe(),t=e();return UT=t,UT}var HT,VV;function Kwe(){if(VV)return HT;VV=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return HT=e,HT}var GT,FV;function Ywe(){if(FV)return GT;FV=1;var e=_d();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,l=e(n),u=r!==void 0,f=r===null,d=r===r,h=e(r);if(!f&&!h&&!l&&n>r||l&&u&&d&&!f&&!h||a&&u&&d||!i&&d||!o)return 1;if(!a&&!l&&!h&&n<r||h&&i&&o&&!a&&!l||f&&i&&o||!u&&o||!d)return-1}return 0}return GT=t,GT}var WT,UV;function Xwe(){if(UV)return WT;UV=1;var e=Ywe();function t(n,r,i){for(var a=-1,o=n.criteria,l=r.criteria,u=o.length,f=i.length;++a<u;){var d=e(o[a],l[a]);if(d){if(a>=f)return d;var h=i[a];return d*(h=="desc"?-1:1)}}return n.index-r.index}return WT=t,WT}var KT,HV;function Zwe(){if(HV)return KT;HV=1;var e=bx(),t=wx(),n=mi(),r=rX(),i=Kwe(),a=gx(),o=Xwe(),l=Iu(),u=on();function f(d,h,m){h.length?h=e(h,function(w){return u(w)?function(y){return t(y,w.length===1?w[0]:w)}:w}):h=[l];var g=-1;h=e(h,a(n));var x=r(d,function(w,y,S){var E=e(h,function(_){return _(w)});return{criteria:E,index:++g,value:w}});return i(x,function(w,y){return o(w,y,m)})}return KT=f,KT}var YT,GV;function PX(){if(GV)return YT;GV=1;var e=Sx(),t=Zwe(),n=_x(),r=Ed(),i=n(function(a,o){if(a==null)return[];var l=o.length;return l>1&&r(a,o[0],o[1])?o=[]:l>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return YT=i,YT}var XT,WV;function Qwe(){if(WV)return XT;WV=1;var e=o2(),t=0;function n(r){var i=++t;return e(r)+i}return XT=n,XT}var ZT,KV;function Jwe(){if(KV)return ZT;KV=1;function e(t,n,r){for(var i=-1,a=t.length,o=n.length,l={};++i<a;){var u=i<o?n[i]:void 0;r(l,t[i],u)}return l}return ZT=e,ZT}var QT,YV;function e1e(){if(YV)return QT;YV=1;var e=px(),t=Jwe();function n(r,i){return t(r||[],i||[],e)}return QT=n,QT}var JT,XV;function Zt(){if(XV)return JT;XV=1;var e;if(typeof UR=="function")try{e={cloneDeep:Cwe(),constant:e2(),defaults:Twe(),each:VY(),filter:eX(),find:bX(),flatten:xX(),forEach:zY(),forIn:Rwe(),has:tX(),isUndefined:nX(),last:wX(),map:s2(),mapValues:SX(),max:_X(),merge:Bwe(),min:OX(),minBy:qwe(),now:jX(),pick:Hwe(),range:NX(),reduce:iX(),sortBy:PX(),uniqueId:Qwe(),values:fX(),zipObject:e1e()}}catch{}return e||(e=window._),JT=e,JT}var eO,ZV;function t1e(){if(ZV)return eO;ZV=1,eO=e;function e(){var r={};r._next=r._prev=r,this._sentinel=r}e.prototype.dequeue=function(){var r=this._sentinel,i=r._prev;if(i!==r)return t(i),i},e.prototype.enqueue=function(r){var i=this._sentinel;r._prev&&r._next&&t(r),r._next=i._next,i._next._prev=r,i._next=r,r._prev=i},e.prototype.toString=function(){for(var r=[],i=this._sentinel,a=i._prev;a!==i;)r.push(JSON.stringify(a,n)),a=a._prev;return"["+r.join(", ")+"]"};function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,i){if(r!=="_next"&&r!=="_prev")return i}return eO}var tO,QV;function n1e(){if(QV)return tO;QV=1;var e=Zt(),t=qi().Graph,n=t1e();tO=i;var r=e.constant(1);function i(f,d){if(f.nodeCount()<=1)return[];var h=l(f,d||r),m=a(h.graph,h.buckets,h.zeroIdx);return e.flatten(e.map(m,function(g){return f.outEdges(g.v,g.w)}),!0)}function a(f,d,h){for(var m=[],g=d[d.length-1],x=d[0],w;f.nodeCount();){for(;w=x.dequeue();)o(f,d,h,w);for(;w=g.dequeue();)o(f,d,h,w);if(f.nodeCount()){for(var y=d.length-2;y>0;--y)if(w=d[y].dequeue(),w){m=m.concat(o(f,d,h,w,!0));break}}}return m}function o(f,d,h,m,g){var x=g?[]:void 0;return e.forEach(f.inEdges(m.v),function(w){var y=f.edge(w),S=f.node(w.v);g&&x.push({v:w.v,w:w.w}),S.out-=y,u(d,h,S)}),e.forEach(f.outEdges(m.v),function(w){var y=f.edge(w),S=w.w,E=f.node(S);E.in-=y,u(d,h,E)}),f.removeNode(m.v),x}function l(f,d){var h=new t,m=0,g=0;e.forEach(f.nodes(),function(y){h.setNode(y,{v:y,in:0,out:0})}),e.forEach(f.edges(),function(y){var S=h.edge(y.v,y.w)||0,E=d(y),_=S+E;h.setEdge(y.v,y.w,_),g=Math.max(g,h.node(y.v).out+=E),m=Math.max(m,h.node(y.w).in+=E)});var x=e.range(g+m+3).map(function(){return new n}),w=m+1;return e.forEach(h.nodes(),function(y){u(x,w,h.node(y))}),{graph:h,buckets:x,zeroIdx:w}}function u(f,d,h){h.out?h.in?f[h.out-h.in+d].enqueue(h):f[f.length-1].enqueue(h):f[0].enqueue(h)}return tO}var nO,JV;function r1e(){if(JV)return nO;JV=1;var e=Zt(),t=n1e();nO={run:n,undo:i};function n(a){var o=a.graph().acyclicer==="greedy"?t(a,l(a)):r(a);e.forEach(o,function(u){var f=a.edge(u);a.removeEdge(u),f.forwardName=u.name,f.reversed=!0,a.setEdge(u.w,u.v,f,e.uniqueId("rev"))});function l(u){return function(f){return u.edge(f).weight}}}function r(a){var o=[],l={},u={};function f(d){e.has(u,d)||(u[d]=!0,l[d]=!0,e.forEach(a.outEdges(d),function(h){e.has(l,h.w)?o.push(h):f(h.w)}),delete l[d])}return e.forEach(a.nodes(),f),o}function i(a){e.forEach(a.edges(),function(o){var l=a.edge(o);if(l.reversed){a.removeEdge(o);var u=l.forwardName;delete l.reversed,delete l.forwardName,a.setEdge(o.w,o.v,l,u)}})}return nO}var rO,eF;function Sr(){if(eF)return rO;eF=1;var e=Zt(),t=qi().Graph;rO={addDummyNode:n,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:l,buildLayerMatrix:u,normalizeRanks:f,removeEmptyRanks:d,addBorderNode:h,maxRank:m,partition:g,time:x,notime:w};function n(y,S,E,_){var A;do A=e.uniqueId(_);while(y.hasNode(A));return E.dummy=S,y.setNode(A,E),A}function r(y){var S=new t().setGraph(y.graph());return e.forEach(y.nodes(),function(E){S.setNode(E,y.node(E))}),e.forEach(y.edges(),function(E){var _=S.edge(E.v,E.w)||{weight:0,minlen:1},A=y.edge(E);S.setEdge(E.v,E.w,{weight:_.weight+A.weight,minlen:Math.max(_.minlen,A.minlen)})}),S}function i(y){var S=new t({multigraph:y.isMultigraph()}).setGraph(y.graph());return e.forEach(y.nodes(),function(E){y.children(E).length||S.setNode(E,y.node(E))}),e.forEach(y.edges(),function(E){S.setEdge(E,y.edge(E))}),S}function a(y){var S=e.map(y.nodes(),function(E){var _={};return e.forEach(y.outEdges(E),function(A){_[A.w]=(_[A.w]||0)+y.edge(A).weight}),_});return e.zipObject(y.nodes(),S)}function o(y){var S=e.map(y.nodes(),function(E){var _={};return e.forEach(y.inEdges(E),function(A){_[A.v]=(_[A.v]||0)+y.edge(A).weight}),_});return e.zipObject(y.nodes(),S)}function l(y,S){var E=y.x,_=y.y,A=S.x-E,C=S.y-_,O=y.width/2,P=y.height/2;if(!A&&!C)throw new Error("Not possible to find intersection inside of the rectangle");var M,R;return Math.abs(C)*O>Math.abs(A)*P?(C<0&&(P=-P),M=P*A/C,R=P):(A<0&&(O=-O),M=O,R=O*C/A),{x:E+M,y:_+R}}function u(y){var S=e.map(e.range(m(y)+1),function(){return[]});return e.forEach(y.nodes(),function(E){var _=y.node(E),A=_.rank;e.isUndefined(A)||(S[A][_.order]=E)}),S}function f(y){var S=e.min(e.map(y.nodes(),function(E){return y.node(E).rank}));e.forEach(y.nodes(),function(E){var _=y.node(E);e.has(_,"rank")&&(_.rank-=S)})}function d(y){var S=e.min(e.map(y.nodes(),function(C){return y.node(C).rank})),E=[];e.forEach(y.nodes(),function(C){var O=y.node(C).rank-S;E[O]||(E[O]=[]),E[O].push(C)});var _=0,A=y.graph().nodeRankFactor;e.forEach(E,function(C,O){e.isUndefined(C)&&O%A!==0?--_:_&&e.forEach(C,function(P){y.node(P).rank+=_})})}function h(y,S,E,_){var A={width:0,height:0};return arguments.length>=4&&(A.rank=E,A.order=_),n(y,"border",A,S)}function m(y){return e.max(e.map(y.nodes(),function(S){var E=y.node(S).rank;if(!e.isUndefined(E))return E}))}function g(y,S){var E={lhs:[],rhs:[]};return e.forEach(y,function(_){S(_)?E.lhs.push(_):E.rhs.push(_)}),E}function x(y,S){var E=e.now();try{return S()}finally{console.log(y+" time: "+(e.now()-E)+"ms")}}function w(y,S){return S()}return rO}var iO,tF;function i1e(){if(tF)return iO;tF=1;var e=Zt(),t=Sr();iO={run:n,undo:i};function n(a){a.graph().dummyChains=[],e.forEach(a.edges(),function(o){r(a,o)})}function r(a,o){var l=o.v,u=a.node(l).rank,f=o.w,d=a.node(f).rank,h=o.name,m=a.edge(o),g=m.labelRank;if(d!==u+1){a.removeEdge(o);var x,w,y;for(y=0,++u;u<d;++y,++u)m.points=[],w={width:0,height:0,edgeLabel:m,edgeObj:o,rank:u},x=t.addDummyNode(a,"edge",w,"_d"),u===g&&(w.width=m.width,w.height=m.height,w.dummy="edge-label",w.labelpos=m.labelpos),a.setEdge(l,x,{weight:m.weight},h),y===0&&a.graph().dummyChains.push(x),l=x;a.setEdge(l,f,{weight:m.weight},h)}}function i(a){e.forEach(a.graph().dummyChains,function(o){var l=a.node(o),u=l.edgeLabel,f;for(a.setEdge(l.edgeObj,u);l.dummy;)f=a.successors(o)[0],a.removeNode(o),u.points.push({x:l.x,y:l.y}),l.dummy==="edge-label"&&(u.x=l.x,u.y=l.y,u.width=l.width,u.height=l.height),o=f,l=a.node(o)})}return iO}var aO,nF;function bb(){if(nF)return aO;nF=1;var e=Zt();aO={longestPath:t,slack:n};function t(r){var i={};function a(o){var l=r.node(o);if(e.has(i,o))return l.rank;i[o]=!0;var u=e.min(e.map(r.outEdges(o),function(f){return a(f.w)-r.edge(f).minlen}));return(u===Number.POSITIVE_INFINITY||u===void 0||u===null)&&(u=0),l.rank=u}e.forEach(r.sources(),a)}function n(r,i){return r.node(i.w).rank-r.node(i.v).rank-r.edge(i).minlen}return aO}var oO,rF;function MX(){if(rF)return oO;rF=1;var e=Zt(),t=qi().Graph,n=bb().slack;oO=r;function r(l){var u=new t({directed:!1}),f=l.nodes()[0],d=l.nodeCount();u.setNode(f,{});for(var h,m;i(u,l)<d;)h=a(u,l),m=u.hasNode(h.v)?n(l,h):-n(l,h),o(u,l,m);return u}function i(l,u){function f(d){e.forEach(u.nodeEdges(d),function(h){var m=h.v,g=d===m?h.w:m;!l.hasNode(g)&&!n(u,h)&&(l.setNode(g,{}),l.setEdge(d,g,{}),f(g))})}return e.forEach(l.nodes(),f),l.nodeCount()}function a(l,u){return e.minBy(u.edges(),function(f){if(l.hasNode(f.v)!==l.hasNode(f.w))return n(u,f)})}function o(l,u,f){e.forEach(l.nodes(),function(d){u.node(d).rank+=f})}return oO}var sO,iF;function a1e(){if(iF)return sO;iF=1;var e=Zt(),t=MX(),n=bb().slack,r=bb().longestPath,i=qi().alg.preorder,a=qi().alg.postorder,o=Sr().simplify;sO=l,l.initLowLimValues=h,l.initCutValues=u,l.calcCutValue=d,l.leaveEdge=g,l.enterEdge=x,l.exchangeEdges=w;function l(_){_=o(_),r(_);var A=t(_);h(A),u(A,_);for(var C,O;C=g(A);)O=x(A,_,C),w(A,_,C,O)}function u(_,A){var C=a(_,_.nodes());C=C.slice(0,C.length-1),e.forEach(C,function(O){f(_,A,O)})}function f(_,A,C){var O=_.node(C),P=O.parent;_.edge(C,P).cutvalue=d(_,A,C)}function d(_,A,C){var O=_.node(C),P=O.parent,M=!0,R=A.edge(C,P),$=0;return R||(M=!1,R=A.edge(P,C)),$=R.weight,e.forEach(A.nodeEdges(C),function(I){var k=I.v===C,V=k?I.w:I.v;if(V!==P){var D=k===M,q=A.edge(I).weight;if($+=D?q:-q,S(_,C,V)){var L=_.edge(C,V).cutvalue;$+=D?-L:L}}}),$}function h(_,A){arguments.length<2&&(A=_.nodes()[0]),m(_,{},1,A)}function m(_,A,C,O,P){var M=C,R=_.node(O);return A[O]=!0,e.forEach(_.neighbors(O),function($){e.has(A,$)||(C=m(_,A,C,$,O))}),R.low=M,R.lim=C++,P?R.parent=P:delete R.parent,C}function g(_){return e.find(_.edges(),function(A){return _.edge(A).cutvalue<0})}function x(_,A,C){var O=C.v,P=C.w;A.hasEdge(O,P)||(O=C.w,P=C.v);var M=_.node(O),R=_.node(P),$=M,I=!1;M.lim>R.lim&&($=R,I=!0);var k=e.filter(A.edges(),function(V){return I===E(_,_.node(V.v),$)&&I!==E(_,_.node(V.w),$)});return e.minBy(k,function(V){return n(A,V)})}function w(_,A,C,O){var P=C.v,M=C.w;_.removeEdge(P,M),_.setEdge(O.v,O.w,{}),h(_),u(_,A),y(_,A)}function y(_,A){var C=e.find(_.nodes(),function(P){return!A.node(P).parent}),O=i(_,C);O=O.slice(1),e.forEach(O,function(P){var M=_.node(P).parent,R=A.edge(P,M),$=!1;R||(R=A.edge(M,P),$=!0),A.node(P).rank=A.node(M).rank+($?R.minlen:-R.minlen)})}function S(_,A,C){return _.hasEdge(A,C)}function E(_,A,C){return C.low<=A.lim&&A.lim<=C.lim}return sO}var lO,aF;function o1e(){if(aF)return lO;aF=1;var e=bb(),t=e.longestPath,n=MX(),r=a1e();lO=i;function i(u){switch(u.graph().ranker){case"network-simplex":l(u);break;case"tight-tree":o(u);break;case"longest-path":a(u);break;default:l(u)}}var a=t;function o(u){t(u),n(u)}function l(u){r(u)}return lO}var uO,oF;function s1e(){if(oF)return uO;oF=1;var e=Zt();uO=t;function t(i){var a=r(i);e.forEach(i.graph().dummyChains,function(o){for(var l=i.node(o),u=l.edgeObj,f=n(i,a,u.v,u.w),d=f.path,h=f.lca,m=0,g=d[m],x=!0;o!==u.w;){if(l=i.node(o),x){for(;(g=d[m])!==h&&i.node(g).maxRank<l.rank;)m++;g===h&&(x=!1)}if(!x){for(;m<d.length-1&&i.node(g=d[m+1]).minRank<=l.rank;)m++;g=d[m]}i.setParent(o,g),o=i.successors(o)[0]}})}function n(i,a,o,l){var u=[],f=[],d=Math.min(a[o].low,a[l].low),h=Math.max(a[o].lim,a[l].lim),m,g;m=o;do m=i.parent(m),u.push(m);while(m&&(a[m].low>d||h>a[m].lim));for(g=m,m=l;(m=i.parent(m))!==g;)f.push(m);return{path:u.concat(f.reverse()),lca:g}}function r(i){var a={},o=0;function l(u){var f=o;e.forEach(i.children(u),l),a[u]={low:f,lim:o++}}return e.forEach(i.children(),l),a}return uO}var cO,sF;function l1e(){if(sF)return cO;sF=1;var e=Zt(),t=Sr();cO={run:n,cleanup:o};function n(l){var u=t.addDummyNode(l,"root",{},"_root"),f=i(l),d=e.max(e.values(f))-1,h=2*d+1;l.graph().nestingRoot=u,e.forEach(l.edges(),function(g){l.edge(g).minlen*=h});var m=a(l)+1;e.forEach(l.children(),function(g){r(l,u,h,m,d,f,g)}),l.graph().nodeRankFactor=h}function r(l,u,f,d,h,m,g){var x=l.children(g);if(!x.length){g!==u&&l.setEdge(u,g,{weight:0,minlen:f});return}var w=t.addBorderNode(l,"_bt"),y=t.addBorderNode(l,"_bb"),S=l.node(g);l.setParent(w,g),S.borderTop=w,l.setParent(y,g),S.borderBottom=y,e.forEach(x,function(E){r(l,u,f,d,h,m,E);var _=l.node(E),A=_.borderTop?_.borderTop:E,C=_.borderBottom?_.borderBottom:E,O=_.borderTop?d:2*d,P=A!==C?1:h-m[g]+1;l.setEdge(w,A,{weight:O,minlen:P,nestingEdge:!0}),l.setEdge(C,y,{weight:O,minlen:P,nestingEdge:!0})}),l.parent(g)||l.setEdge(u,w,{weight:0,minlen:h+m[g]})}function i(l){var u={};function f(d,h){var m=l.children(d);m&&m.length&&e.forEach(m,function(g){f(g,h+1)}),u[d]=h}return e.forEach(l.children(),function(d){f(d,1)}),u}function a(l){return e.reduce(l.edges(),function(u,f){return u+l.edge(f).weight},0)}function o(l){var u=l.graph();l.removeNode(u.nestingRoot),delete u.nestingRoot,e.forEach(l.edges(),function(f){var d=l.edge(f);d.nestingEdge&&l.removeEdge(f)})}return cO}var fO,lF;function u1e(){if(lF)return fO;lF=1;var e=Zt(),t=Sr();fO=n;function n(i){function a(o){var l=i.children(o),u=i.node(o);if(l.length&&e.forEach(l,a),e.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var f=u.minRank,d=u.maxRank+1;f<d;++f)r(i,"borderLeft","_bl",o,u,f),r(i,"borderRight","_br",o,u,f)}}e.forEach(i.children(),a)}function r(i,a,o,l,u,f){var d={width:0,height:0,rank:f,borderType:a},h=u[a][f-1],m=t.addDummyNode(i,"border",d,o);u[a][f]=m,i.setParent(m,l),h&&i.setEdge(h,m,{weight:1})}return fO}var dO,uF;function c1e(){if(uF)return dO;uF=1;var e=Zt();dO={adjust:t,undo:n};function t(f){var d=f.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&r(f)}function n(f){var d=f.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&a(f),(d==="lr"||d==="rl")&&(l(f),r(f))}function r(f){e.forEach(f.nodes(),function(d){i(f.node(d))}),e.forEach(f.edges(),function(d){i(f.edge(d))})}function i(f){var d=f.width;f.width=f.height,f.height=d}function a(f){e.forEach(f.nodes(),function(d){o(f.node(d))}),e.forEach(f.edges(),function(d){var h=f.edge(d);e.forEach(h.points,o),e.has(h,"y")&&o(h)})}function o(f){f.y=-f.y}function l(f){e.forEach(f.nodes(),function(d){u(f.node(d))}),e.forEach(f.edges(),function(d){var h=f.edge(d);e.forEach(h.points,u),e.has(h,"x")&&u(h)})}function u(f){var d=f.x;f.x=f.y,f.y=d}return dO}var hO,cF;function f1e(){if(cF)return hO;cF=1;var e=Zt();hO=t;function t(n){var r={},i=e.filter(n.nodes(),function(f){return!n.children(f).length}),a=e.max(e.map(i,function(f){return n.node(f).rank})),o=e.map(e.range(a+1),function(){return[]});function l(f){if(!e.has(r,f)){r[f]=!0;var d=n.node(f);o[d.rank].push(f),e.forEach(n.successors(f),l)}}var u=e.sortBy(i,function(f){return n.node(f).rank});return e.forEach(u,l),o}return hO}var pO,fF;function d1e(){if(fF)return pO;fF=1;var e=Zt();pO=t;function t(r,i){for(var a=0,o=1;o<i.length;++o)a+=n(r,i[o-1],i[o]);return a}function n(r,i,a){for(var o=e.zipObject(a,e.map(a,function(m,g){return g})),l=e.flatten(e.map(i,function(m){return e.sortBy(e.map(r.outEdges(m),function(g){return{pos:o[g.w],weight:r.edge(g).weight}}),"pos")}),!0),u=1;u<a.length;)u<<=1;var f=2*u-1;u-=1;var d=e.map(new Array(f),function(){return 0}),h=0;return e.forEach(l.forEach(function(m){var g=m.pos+u;d[g]+=m.weight;for(var x=0;g>0;)g%2&&(x+=d[g+1]),g=g-1>>1,d[g]+=m.weight;h+=m.weight*x})),h}return pO}var mO,dF;function h1e(){if(dF)return mO;dF=1;var e=Zt();mO=t;function t(n,r){return e.map(r,function(i){var a=n.inEdges(i);if(a.length){var o=e.reduce(a,function(l,u){var f=n.edge(u),d=n.node(u.v);return{sum:l.sum+f.weight*d.order,weight:l.weight+f.weight}},{sum:0,weight:0});return{v:i,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:i}})}return mO}var gO,hF;function p1e(){if(hF)return gO;hF=1;var e=Zt();gO=t;function t(i,a){var o={};e.forEach(i,function(u,f){var d=o[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:f};e.isUndefined(u.barycenter)||(d.barycenter=u.barycenter,d.weight=u.weight)}),e.forEach(a.edges(),function(u){var f=o[u.v],d=o[u.w];!e.isUndefined(f)&&!e.isUndefined(d)&&(d.indegree++,f.out.push(o[u.w]))});var l=e.filter(o,function(u){return!u.indegree});return n(l)}function n(i){var a=[];function o(f){return function(d){d.merged||(e.isUndefined(d.barycenter)||e.isUndefined(f.barycenter)||d.barycenter>=f.barycenter)&&r(f,d)}}function l(f){return function(d){d.in.push(f),--d.indegree===0&&i.push(d)}}for(;i.length;){var u=i.pop();a.push(u),e.forEach(u.in.reverse(),o(u)),e.forEach(u.out,l(u))}return e.map(e.filter(a,function(f){return!f.merged}),function(f){return e.pick(f,["vs","i","barycenter","weight"])})}function r(i,a){var o=0,l=0;i.weight&&(o+=i.barycenter*i.weight,l+=i.weight),a.weight&&(o+=a.barycenter*a.weight,l+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=o/l,i.weight=l,i.i=Math.min(a.i,i.i),a.merged=!0}return gO}var vO,pF;function m1e(){if(pF)return vO;pF=1;var e=Zt(),t=Sr();vO=n;function n(a,o){var l=t.partition(a,function(w){return e.has(w,"barycenter")}),u=l.lhs,f=e.sortBy(l.rhs,function(w){return-w.i}),d=[],h=0,m=0,g=0;u.sort(i(!!o)),g=r(d,f,g),e.forEach(u,function(w){g+=w.vs.length,d.push(w.vs),h+=w.barycenter*w.weight,m+=w.weight,g=r(d,f,g)});var x={vs:e.flatten(d,!0)};return m&&(x.barycenter=h/m,x.weight=m),x}function r(a,o,l){for(var u;o.length&&(u=e.last(o)).i<=l;)o.pop(),a.push(u.vs),l++;return l}function i(a){return function(o,l){return o.barycenter<l.barycenter?-1:o.barycenter>l.barycenter?1:a?l.i-o.i:o.i-l.i}}return vO}var yO,mF;function g1e(){if(mF)return yO;mF=1;var e=Zt(),t=h1e(),n=p1e(),r=m1e();yO=i;function i(l,u,f,d){var h=l.children(u),m=l.node(u),g=m?m.borderLeft:void 0,x=m?m.borderRight:void 0,w={};g&&(h=e.filter(h,function(C){return C!==g&&C!==x}));var y=t(l,h);e.forEach(y,function(C){if(l.children(C.v).length){var O=i(l,C.v,f,d);w[C.v]=O,e.has(O,"barycenter")&&o(C,O)}});var S=n(y,f);a(S,w);var E=r(S,d);if(g&&(E.vs=e.flatten([g,E.vs,x],!0),l.predecessors(g).length)){var _=l.node(l.predecessors(g)[0]),A=l.node(l.predecessors(x)[0]);e.has(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+_.order+A.order)/(E.weight+2),E.weight+=2}return E}function a(l,u){e.forEach(l,function(f){f.vs=e.flatten(f.vs.map(function(d){return u[d]?u[d].vs:d}),!0)})}function o(l,u){e.isUndefined(l.barycenter)?(l.barycenter=u.barycenter,l.weight=u.weight):(l.barycenter=(l.barycenter*l.weight+u.barycenter*u.weight)/(l.weight+u.weight),l.weight+=u.weight)}return yO}var bO,gF;function v1e(){if(gF)return bO;gF=1;var e=Zt(),t=qi().Graph;bO=n;function n(i,a,o){var l=r(i),u=new t({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(function(f){return i.node(f)});return e.forEach(i.nodes(),function(f){var d=i.node(f),h=i.parent(f);(d.rank===a||d.minRank<=a&&a<=d.maxRank)&&(u.setNode(f),u.setParent(f,h||l),e.forEach(i[o](f),function(m){var g=m.v===f?m.w:m.v,x=u.edge(g,f),w=e.isUndefined(x)?0:x.weight;u.setEdge(g,f,{weight:i.edge(m).weight+w})}),e.has(d,"minRank")&&u.setNode(f,{borderLeft:d.borderLeft[a],borderRight:d.borderRight[a]}))}),u}function r(i){for(var a;i.hasNode(a=e.uniqueId("_root")););return a}return bO}var xO,vF;function y1e(){if(vF)return xO;vF=1;var e=Zt();xO=t;function t(n,r,i){var a={},o;e.forEach(i,function(l){for(var u=n.parent(l),f,d;u;){if(f=n.parent(u),f?(d=a[f],a[f]=u):(d=o,o=u),d&&d!==u){r.setEdge(d,u);return}u=f}})}return xO}var wO,yF;function b1e(){if(yF)return wO;yF=1;var e=Zt(),t=f1e(),n=d1e(),r=g1e(),i=v1e(),a=y1e(),o=qi().Graph,l=Sr();wO=u;function u(m){var g=l.maxRank(m),x=f(m,e.range(1,g+1),"inEdges"),w=f(m,e.range(g-1,-1,-1),"outEdges"),y=t(m);h(m,y);for(var S=Number.POSITIVE_INFINITY,E,_=0,A=0;A<4;++_,++A){d(_%2?x:w,_%4>=2),y=l.buildLayerMatrix(m);var C=n(m,y);C<S&&(A=0,E=e.cloneDeep(y),S=C)}h(m,E)}function f(m,g,x){return e.map(g,function(w){return i(m,w,x)})}function d(m,g){var x=new o;e.forEach(m,function(w){var y=w.graph().root,S=r(w,y,x,g);e.forEach(S.vs,function(E,_){w.node(E).order=_}),a(w,x,S.vs)})}function h(m,g){e.forEach(g,function(x){e.forEach(x,function(w,y){m.node(w).order=y})})}return wO}var SO,bF;function x1e(){if(bF)return SO;bF=1;var e=Zt(),t=qi().Graph,n=Sr();SO={positionX:x,findType1Conflicts:r,findType2Conflicts:i,addConflict:o,hasConflict:l,verticalAlignment:u,horizontalCompaction:f,alignCoordinates:m,findSmallestWidthAlignment:h,balance:g};function r(S,E){var _={};function A(C,O){var P=0,M=0,R=C.length,$=e.last(O);return e.forEach(O,function(I,k){var V=a(S,I),D=V?S.node(V).order:R;(V||I===$)&&(e.forEach(O.slice(M,k+1),function(q){e.forEach(S.predecessors(q),function(L){var z=S.node(L),H=z.order;(H<P||D<H)&&!(z.dummy&&S.node(q).dummy)&&o(_,L,q)})}),M=k+1,P=D)}),O}return e.reduce(E,A),_}function i(S,E){var _={};function A(O,P,M,R,$){var I;e.forEach(e.range(P,M),function(k){I=O[k],S.node(I).dummy&&e.forEach(S.predecessors(I),function(V){var D=S.node(V);D.dummy&&(D.order<R||D.order>$)&&o(_,V,I)})})}function C(O,P){var M=-1,R,$=0;return e.forEach(P,function(I,k){if(S.node(I).dummy==="border"){var V=S.predecessors(I);V.length&&(R=S.node(V[0]).order,A(P,$,k,M,R),$=k,M=R)}A(P,$,P.length,R,O.length)}),P}return e.reduce(E,C),_}function a(S,E){if(S.node(E).dummy)return e.find(S.predecessors(E),function(_){return S.node(_).dummy})}function o(S,E,_){if(E>_){var A=E;E=_,_=A}var C=S[E];C||(S[E]=C={}),C[_]=!0}function l(S,E,_){if(E>_){var A=E;E=_,_=A}return e.has(S[E],_)}function u(S,E,_,A){var C={},O={},P={};return e.forEach(E,function(M){e.forEach(M,function(R,$){C[R]=R,O[R]=R,P[R]=$})}),e.forEach(E,function(M){var R=-1;e.forEach(M,function($){var I=A($);if(I.length){I=e.sortBy(I,function(L){return P[L]});for(var k=(I.length-1)/2,V=Math.floor(k),D=Math.ceil(k);V<=D;++V){var q=I[V];O[$]===$&&R<P[q]&&!l(_,$,q)&&(O[q]=$,O[$]=C[$]=C[q],R=P[q])}}})}),{root:C,align:O}}function f(S,E,_,A,C){var O={},P=d(S,E,_,C),M=C?"borderLeft":"borderRight";function R(k,V){for(var D=P.nodes(),q=D.pop(),L={};q;)L[q]?k(q):(L[q]=!0,D.push(q),D=D.concat(V(q))),q=D.pop()}function $(k){O[k]=P.inEdges(k).reduce(function(V,D){return Math.max(V,O[D.v]+P.edge(D))},0)}function I(k){var V=P.outEdges(k).reduce(function(q,L){return Math.min(q,O[L.w]-P.edge(L))},Number.POSITIVE_INFINITY),D=S.node(k);V!==Number.POSITIVE_INFINITY&&D.borderType!==M&&(O[k]=Math.max(O[k],V))}return R($,P.predecessors.bind(P)),R(I,P.successors.bind(P)),e.forEach(A,function(k){O[k]=O[_[k]]}),O}function d(S,E,_,A){var C=new t,O=S.graph(),P=w(O.nodesep,O.edgesep,A);return e.forEach(E,function(M){var R;e.forEach(M,function($){var I=_[$];if(C.setNode(I),R){var k=_[R],V=C.edge(k,I);C.setEdge(k,I,Math.max(P(S,$,R),V||0))}R=$})}),C}function h(S,E){return e.minBy(e.values(E),function(_){var A=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY;return e.forIn(_,function(O,P){var M=y(S,P)/2;A=Math.max(O+M,A),C=Math.min(O-M,C)}),A-C})}function m(S,E){var _=e.values(E),A=e.min(_),C=e.max(_);e.forEach(["u","d"],function(O){e.forEach(["l","r"],function(P){var M=O+P,R=S[M],$;if(R!==E){var I=e.values(R);$=P==="l"?A-e.min(I):C-e.max(I),$&&(S[M]=e.mapValues(R,function(k){return k+$}))}})})}function g(S,E){return e.mapValues(S.ul,function(_,A){if(E)return S[E.toLowerCase()][A];var C=e.sortBy(e.map(S,A));return(C[1]+C[2])/2})}function x(S){var E=n.buildLayerMatrix(S),_=e.merge(r(S,E),i(S,E)),A={},C;e.forEach(["u","d"],function(P){C=P==="u"?E:e.values(E).reverse(),e.forEach(["l","r"],function(M){M==="r"&&(C=e.map(C,function(k){return e.values(k).reverse()}));var R=(P==="u"?S.predecessors:S.successors).bind(S),$=u(S,C,_,R),I=f(S,C,$.root,$.align,M==="r");M==="r"&&(I=e.mapValues(I,function(k){return-k})),A[P+M]=I})});var O=h(S,A);return m(A,O),g(A,S.graph().align)}function w(S,E,_){return function(A,C,O){var P=A.node(C),M=A.node(O),R=0,$;if(R+=P.width/2,e.has(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":$=-P.width/2;break;case"r":$=P.width/2;break}if($&&(R+=_?$:-$),$=0,R+=(P.dummy?E:S)/2,R+=(M.dummy?E:S)/2,R+=M.width/2,e.has(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":$=M.width/2;break;case"r":$=-M.width/2;break}return $&&(R+=_?$:-$),$=0,R}}function y(S,E){return S.node(E).width}return SO}var _O,xF;function w1e(){if(xF)return _O;xF=1;var e=Zt(),t=Sr(),n=x1e().positionX;_O=r;function r(a){a=t.asNonCompoundGraph(a),i(a),e.forEach(n(a),function(o,l){a.node(l).x=o})}function i(a){var o=t.buildLayerMatrix(a),l=a.graph().ranksep,u=0;e.forEach(o,function(f){var d=e.max(e.map(f,function(h){return a.node(h).height}));e.forEach(f,function(h){a.node(h).y=u+d/2}),u+=d+l})}return _O}var EO,wF;function S1e(){if(wF)return EO;wF=1;var e=Zt(),t=r1e(),n=i1e(),r=o1e(),i=Sr().normalizeRanks,a=s1e(),o=Sr().removeEmptyRanks,l=l1e(),u=u1e(),f=c1e(),d=b1e(),h=w1e(),m=Sr(),g=qi().Graph;EO=x;function x(K,G){var Q=G&&G.debugTiming?m.time:m.notime;Q("layout",function(){var J=Q(" buildLayoutGraph",function(){return R(K)});Q(" runLayout",function(){w(J,Q)}),Q(" updateInputGraph",function(){y(K,J)})})}function w(K,G){G(" makeSpaceForEdgeLabels",function(){$(K)}),G(" removeSelfEdges",function(){Y(K)}),G(" acyclic",function(){t.run(K)}),G(" nestingGraph.run",function(){l.run(K)}),G(" rank",function(){r(m.asNonCompoundGraph(K))}),G(" injectEdgeLabelProxies",function(){I(K)}),G(" removeEmptyRanks",function(){o(K)}),G(" nestingGraph.cleanup",function(){l.cleanup(K)}),G(" normalizeRanks",function(){i(K)}),G(" assignRankMinMax",function(){k(K)}),G(" removeEdgeLabelProxies",function(){V(K)}),G(" normalize.run",function(){n.run(K)}),G(" parentDummyChains",function(){a(K)}),G(" addBorderSegments",function(){u(K)}),G(" order",function(){d(K)}),G(" insertSelfEdges",function(){Z(K)}),G(" adjustCoordinateSystem",function(){f.adjust(K)}),G(" position",function(){h(K)}),G(" positionSelfEdges",function(){U(K)}),G(" removeBorderNodes",function(){H(K)}),G(" normalize.undo",function(){n.undo(K)}),G(" fixupEdgeLabelCoords",function(){L(K)}),G(" undoCoordinateSystem",function(){f.undo(K)}),G(" translateGraph",function(){D(K)}),G(" assignNodeIntersects",function(){q(K)}),G(" reversePoints",function(){z(K)}),G(" acyclic.undo",function(){t.undo(K)})}function y(K,G){e.forEach(K.nodes(),function(Q){var J=K.node(Q),re=G.node(Q);J&&(J.x=re.x,J.y=re.y,G.children(Q).length&&(J.width=re.width,J.height=re.height))}),e.forEach(K.edges(),function(Q){var J=K.edge(Q),re=G.edge(Q);J.points=re.points,e.has(re,"x")&&(J.x=re.x,J.y=re.y)}),K.graph().width=G.graph().width,K.graph().height=G.graph().height}var S=["nodesep","edgesep","ranksep","marginx","marginy"],E={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],A=["width","height"],C={width:0,height:0},O=["minlen","weight","width","height","labeloffset"],P={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},M=["labelpos"];function R(K){var G=new g({multigraph:!0,compound:!0}),Q=X(K.graph());return G.setGraph(e.merge({},E,F(Q,S),e.pick(Q,_))),e.forEach(K.nodes(),function(J){var re=X(K.node(J));G.setNode(J,e.defaults(F(re,A),C)),G.setParent(J,K.parent(J))}),e.forEach(K.edges(),function(J){var re=X(K.edge(J));G.setEdge(J,e.merge({},P,F(re,O),e.pick(re,M)))}),G}function $(K){var G=K.graph();G.ranksep/=2,e.forEach(K.edges(),function(Q){var J=K.edge(Q);J.minlen*=2,J.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?J.width+=J.labeloffset:J.height+=J.labeloffset)})}function I(K){e.forEach(K.edges(),function(G){var Q=K.edge(G);if(Q.width&&Q.height){var J=K.node(G.v),re=K.node(G.w),ne={rank:(re.rank-J.rank)/2+J.rank,e:G};m.addDummyNode(K,"edge-proxy",ne,"_ep")}})}function k(K){var G=0;e.forEach(K.nodes(),function(Q){var J=K.node(Q);J.borderTop&&(J.minRank=K.node(J.borderTop).rank,J.maxRank=K.node(J.borderBottom).rank,G=e.max(G,J.maxRank))}),K.graph().maxRank=G}function V(K){e.forEach(K.nodes(),function(G){var Q=K.node(G);Q.dummy==="edge-proxy"&&(K.edge(Q.e).labelRank=Q.rank,K.removeNode(G))})}function D(K){var G=Number.POSITIVE_INFINITY,Q=0,J=Number.POSITIVE_INFINITY,re=0,ne=K.graph(),fe=ne.marginx||0,he=ne.marginy||0;function oe(ye){var be=ye.x,xe=ye.y,Ae=ye.width,_e=ye.height;G=Math.min(G,be-Ae/2),Q=Math.max(Q,be+Ae/2),J=Math.min(J,xe-_e/2),re=Math.max(re,xe+_e/2)}e.forEach(K.nodes(),function(ye){oe(K.node(ye))}),e.forEach(K.edges(),function(ye){var be=K.edge(ye);e.has(be,"x")&&oe(be)}),G-=fe,J-=he,e.forEach(K.nodes(),function(ye){var be=K.node(ye);be.x-=G,be.y-=J}),e.forEach(K.edges(),function(ye){var be=K.edge(ye);e.forEach(be.points,function(xe){xe.x-=G,xe.y-=J}),e.has(be,"x")&&(be.x-=G),e.has(be,"y")&&(be.y-=J)}),ne.width=Q-G+fe,ne.height=re-J+he}function q(K){e.forEach(K.edges(),function(G){var Q=K.edge(G),J=K.node(G.v),re=K.node(G.w),ne,fe;Q.points?(ne=Q.points[0],fe=Q.points[Q.points.length-1]):(Q.points=[],ne=re,fe=J),Q.points.unshift(m.intersectRect(J,ne)),Q.points.push(m.intersectRect(re,fe))})}function L(K){e.forEach(K.edges(),function(G){var Q=K.edge(G);if(e.has(Q,"x"))switch((Q.labelpos==="l"||Q.labelpos==="r")&&(Q.width-=Q.labeloffset),Q.labelpos){case"l":Q.x-=Q.width/2+Q.labeloffset;break;case"r":Q.x+=Q.width/2+Q.labeloffset;break}})}function z(K){e.forEach(K.edges(),function(G){var Q=K.edge(G);Q.reversed&&Q.points.reverse()})}function H(K){e.forEach(K.nodes(),function(G){if(K.children(G).length){var Q=K.node(G),J=K.node(Q.borderTop),re=K.node(Q.borderBottom),ne=K.node(e.last(Q.borderLeft)),fe=K.node(e.last(Q.borderRight));Q.width=Math.abs(fe.x-ne.x),Q.height=Math.abs(re.y-J.y),Q.x=ne.x+Q.width/2,Q.y=J.y+Q.height/2}}),e.forEach(K.nodes(),function(G){K.node(G).dummy==="border"&&K.removeNode(G)})}function Y(K){e.forEach(K.edges(),function(G){if(G.v===G.w){var Q=K.node(G.v);Q.selfEdges||(Q.selfEdges=[]),Q.selfEdges.push({e:G,label:K.edge(G)}),K.removeEdge(G)}})}function Z(K){var G=m.buildLayerMatrix(K);e.forEach(G,function(Q){var J=0;e.forEach(Q,function(re,ne){var fe=K.node(re);fe.order=ne+J,e.forEach(fe.selfEdges,function(he){m.addDummyNode(K,"selfedge",{width:he.label.width,height:he.label.height,rank:fe.rank,order:ne+ ++J,e:he.e,label:he.label},"_se")}),delete fe.selfEdges})})}function U(K){e.forEach(K.nodes(),function(G){var Q=K.node(G);if(Q.dummy==="selfedge"){var J=K.node(Q.e.v),re=J.x+J.width/2,ne=J.y,fe=Q.x-re,he=J.height/2;K.setEdge(Q.e,Q.label),K.removeNode(G),Q.label.points=[{x:re+2*fe/3,y:ne-he},{x:re+5*fe/6,y:ne-he},{x:re+fe,y:ne},{x:re+5*fe/6,y:ne+he},{x:re+2*fe/3,y:ne+he}],Q.label.x=Q.x,Q.label.y=Q.y}})}function F(K,G){return e.mapValues(e.pick(K,G),Number)}function X(K){var G={};return e.forEach(K,function(Q,J){G[J.toLowerCase()]=Q}),G}return EO}var AO,SF;function _1e(){if(SF)return AO;SF=1;var e=Zt(),t=Sr(),n=qi().Graph;AO={debugOrdering:r};function r(i){var a=t.buildLayerMatrix(i),o=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(l){o.setNode(l,{label:l}),o.setParent(l,"layer"+i.node(l).rank)}),e.forEach(i.edges(),function(l){o.setEdge(l.v,l.w,{},l.name)}),e.forEach(a,function(l,u){var f="layer"+u;o.setNode(f,{rank:"same"}),e.reduce(l,function(d,h){return o.setEdge(d,h,{style:"invis"}),h})}),o}return AO}var CO,_F;function E1e(){return _F||(_F=1,CO="0.8.5"),CO}var TO,EF;function A1e(){return EF||(EF=1,TO={graphlib:qi(),layout:S1e(),debug:_1e(),util:{time:Sr().time,notime:Sr().notime},version:E1e()}),TO}var C1e=A1e();const AF=yt(C1e),CF={active:{icon:sp,color:"text-blue-600 dark:text-blue-400",bg:"bg-blue-50 dark:bg-blue-500/10",border:"border-blue-200 dark:border-blue-500/20",animate:!0},waiting:{icon:FS,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},"waiting-children":{icon:FS,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},prioritized:{icon:si,color:"text-amber-600 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-500/10",border:"border-amber-200 dark:border-amber-500/20"},completed:{icon:Lm,color:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-500/10",border:"border-emerald-200 dark:border-emerald-500/20"},failed:{icon:B0,color:"text-destructive",bg:"bg-red-50 dark:bg-red-500/10",border:"border-red-200 dark:border-red-500/20"},delayed:{icon:si,color:"text-amber-600 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-500/10",border:"border-amber-200 dark:border-amber-500/20"},paused:{icon:p7,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},unknown:{icon:FS,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"}};function T1e(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`}function O1e({data:e}){const{flowNode:t,onClick:n}=e,{job:r,queueName:i}=t,a=CF[r.status]||CF.unknown,o=a.icon;return b.jsxs("div",{className:Te("relative min-w-[180px] px-3 py-2.5 transition-all","hover:bg-accent/50 cursor-pointer","bg-background border",a.border),onClick:()=>n==null?void 0:n(t),children:[b.jsx(Lf,{type:"target",position:Ie.Top,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-0"}),b.jsxs("div",{className:"flex items-start gap-2.5",children:[b.jsx("div",{className:Te("p-1.5 shrink-0",a.bg),children:b.jsx(o,{className:Te("h-3.5 w-3.5",a.color,a.animate&&"animate-spin")})}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsx("div",{className:"font-medium text-sm truncate text-foreground",children:r.name}),b.jsx("div",{className:"text-[11px] text-muted-foreground truncate mt-0.5",children:i}),r.duration!==void 0&&b.jsx("div",{className:"text-[11px] text-muted-foreground mt-1 font-mono tabular-nums",children:T1e(r.duration)})]})]}),b.jsx("div",{className:Te("absolute -top-1.5 -right-1.5 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wide","bg-background border",a.color,a.border),children:r.status}),b.jsx(Lf,{type:"source",position:Ie.Bottom,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-0"})]})}const j1e=j.memo(O1e),N1e={flowNode:j1e},TF=200,OF=80;function P1e(e,t){const n=[],r=[],i=new AF.graphlib.Graph;i.setGraph({rankdir:"TB",nodesep:50,ranksep:80}),i.setDefaultEdgeLabel(()=>({}));function a(o,l){const u=`${o.queueName}:${o.job.id}`;if(i.setNode(u,{width:TF,height:OF}),l&&(i.setEdge(l,u),r.push({id:`${l}->${u}`,source:l,target:u,type:"smoothstep",animated:o.job.status==="active",style:{stroke:"hsl(var(--border))",strokeWidth:2}})),n.push({id:u,type:"flowNode",position:{x:0,y:0},data:{flowNode:o,onClick:t}}),o.children)for(const f of o.children)a(f,u)}a(e),AF.layout(i);for(const o of n){const l=i.node(o.id);l&&(o.position={x:l.x-TF/2,y:l.y-OF/2})}return{nodes:n,edges:r}}function M1e({flow:e,onNodeClick:t}){const{nodes:n,edges:r}=j.useMemo(()=>P1e(e,t),[e,t]),i=j.useCallback((a,o)=>{o.data.onClick&&o.data.flowNode&&o.data.onClick(o.data.flowNode)},[]);return b.jsx("div",{className:"w-full h-full",children:b.jsx(t0e,{nodes:n,edges:r,nodeTypes:N1e,onNodeClick:i,fitView:!0,fitViewOptions:{padding:.3,maxZoom:1},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!0,panOnScroll:!0,zoomOnScroll:!0,minZoom:.2,maxZoom:1.5,defaultViewport:{x:0,y:0,zoom:.8},proOptions:{hideAttribution:!0},style:{background:"transparent"}})})}function Di({icon:e,title:t,description:n,action:r,className:i}){return b.jsxs("div",{className:Te("flex flex-col items-center justify-center py-12 text-center",i),children:[b.jsx("div",{className:"bg-muted p-4 mb-4",children:b.jsx(e,{className:"h-8 w-8 text-muted-foreground"})}),b.jsx("h3",{className:"font-medium text-lg mb-1",children:t}),n&&b.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mb-4",children:n}),r]})}const xb={active:{label:"Active",dotClass:"bg-status-active",textClass:"text-status-active",bgClass:"bg-status-active/10"},waiting:{label:"Waiting",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"},"waiting-children":{label:"Waiting Children",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"},prioritized:{label:"Prioritized",dotClass:"bg-status-warning",textClass:"text-status-warning",bgClass:"bg-status-warning/10"},completed:{label:"Completed",dotClass:"bg-status-success",textClass:"text-status-success",bgClass:"bg-status-success/10"},failed:{label:"Failed",dotClass:"bg-status-error",textClass:"text-status-error",bgClass:"bg-status-error/10"},delayed:{label:"Delayed",dotClass:"bg-status-warning",textClass:"text-status-warning",bgClass:"bg-status-warning/10"},paused:{label:"Paused",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"},unknown:{label:"Unknown",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"}};function Xm({status:e,duration:t,className:n}){const r=xb[e]||xb.unknown;return b.jsxs("span",{className:Te("inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium",r.bgClass,n),children:[b.jsx("span",{className:Te("h-1.5 w-1.5 rounded-full",r.dotClass)}),b.jsx("span",{className:r.textClass,children:r.label})]})}function R1e({status:e,className:t}){const n=xb[e]||xb.unknown;return b.jsx("span",{className:Te("h-2 w-2 rounded-full",n.dotClass,t)})}function k1e({queueName:e,jobId:t}){const n=zi(),{data:r,isLoading:i,error:a}=Rfe(e,t),o=u=>{n({to:"/queues/$queueName/jobs/$jobId",params:{queueName:u.queueName,jobId:u.job.id}})};if(i)return b.jsxs("div",{className:"flex flex-col h-full -mb-6",children:[b.jsxs("div",{className:"pb-4 border-b border-border shrink-0",children:[b.jsx("div",{className:"flex items-center justify-between mb-4",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"h-6 w-32 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-5 w-20 animate-pulse rounded bg-muted"})]})}),b.jsxs("div",{className:"flex items-center gap-6",children:[b.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})]})]}),b.jsx("div",{className:"flex-1 -mx-6 -mb-6 mt-6 flex items-center justify-center dotted-bg",children:b.jsx(sp,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]});if(a||!r)return b.jsx(Di,{icon:md,title:"Failed to load flow",description:(a==null?void 0:a.message)||"Flow not found or jobs have been cleaned up"});const l=RX(r);return b.jsxs("div",{className:"flex flex-col h-full -mb-6",children:[b.jsxs("div",{className:"pb-4 border-b border-border shrink-0",children:[b.jsx("div",{className:"flex items-center justify-between mb-4",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx(gd,{className:"h-5 w-5 text-muted-foreground"}),b.jsx(Xm,{status:r.job.status})]})}),b.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2 text-sm",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"text-muted-foreground",children:"Queue:"}),b.jsx("button",{type:"button",onClick:()=>n({to:"/queues/$queueName",params:{queueName:e}}),className:"text-xs bg-muted px-1.5 py-0.5 font-mono text-primary hover:underline",children:e})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(kce,{className:"h-4 w-4 text-muted-foreground"}),b.jsxs("span",{className:"text-muted-foreground",children:[l.total," job",l.total!==1?"s":""]})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Lm,{className:"h-4 w-4 text-emerald-500"}),b.jsxs("span",{className:"text-muted-foreground",children:[l.completed," completed"]})]}),l.failed>0&&b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(B0,{className:"h-4 w-4 text-red-500"}),b.jsxs("span",{className:"text-red-500",children:[l.failed," failed"]})]}),r.job.duration!==void 0&&b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(si,{className:"h-4 w-4 text-muted-foreground"}),b.jsx("span",{className:"text-muted-foreground",children:wr(r.job.duration)})]})]})]}),b.jsx("div",{className:"flex-1 -mx-6 -mb-6 mt-6 dotted-bg",children:b.jsx(M1e,{flow:r,onNodeClick:o})})]})}function RX(e){let t=1,n=e.job.status==="completed"?1:0,r=e.job.status==="failed"?1:0;if(e.children)for(const i of e.children){const a=RX(i);t+=a.total,n+=a.completed,r+=a.failed}return{total:t,completed:n,failed:r}}function Su({timestamp:e,className:t}){return b.jsxs(Tp,{children:[b.jsx(Op,{asChild:!0,children:b.jsx("span",{className:t,children:i7(e)})}),b.jsx(Sf,{children:b.jsx("span",{className:"font-mono text-xs",children:xy(e)})})]})}function D1e({onFlowSelect:e}){const t=zi(),{data:n,isLoading:r,error:i}=Mfe(),a=l=>{t({to:"/queues/$queueName",params:{queueName:l}})},o=(n==null?void 0:n.flows)||[];return r&&o.length===0?b.jsx("div",{className:"divide-y divide-border/50",children:[...Array(12)].map((l,u)=>b.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[b.jsxs("div",{className:"col-span-4 flex items-center gap-3",children:[b.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"})]}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-4 w-16 animate-pulse rounded bg-muted"})}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-4 w-16 animate-pulse rounded bg-muted"})}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})})]},u.toString()))}):i?b.jsx("div",{className:"flex h-64 items-center justify-center",children:b.jsx(Di,{icon:md,title:"Failed to load flows",description:i.message})}):o.length===0?b.jsx("div",{className:"flex h-64 items-center justify-center",children:b.jsx(Di,{icon:gd,title:"No flows found",description:"Flows are created when you use BullMQ's FlowProducer"})}):b.jsxs("div",{children:[b.jsx("div",{className:"sticky top-0 z-10 bg-background",children:b.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[b.jsx("div",{className:"col-span-4",children:"Flow"}),b.jsx("div",{className:"col-span-2",children:"Queue"}),b.jsx("div",{className:"col-span-2",children:"Status"}),b.jsx("div",{className:"col-span-2",children:"Progress"}),b.jsx("div",{className:"col-span-2",children:"Created"})]})}),b.jsx("div",{className:"divide-y divide-border/50",children:o.map(l=>b.jsx(I1e,{flow:l,onClick:()=>e(l.queueName,l.id),onQueueClick:a},`${l.queueName}:${l.id}`))}),b.jsxs("div",{className:"py-2.5 text-[11px] text-muted-foreground border-t border-dashed",children:[o.length," flow",o.length!==1?"s":""]})]})}function I1e({flow:e,onClick:t,onQueueClick:n}){const r=i=>{i.stopPropagation(),n(e.queueName)};return b.jsxs("div",{onClick:t,className:"group grid w-full grid-cols-12 items-center gap-4 py-3 text-left text-sm cursor-default",children:[b.jsxs("div",{className:"col-span-4 flex items-center gap-3 min-w-0",children:[b.jsx(gd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("div",{className:"truncate font-medium text-sm",children:e.name}),b.jsx("div",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.id})]})]}),b.jsx("div",{className:"col-span-2",children:b.jsx("button",{type:"button",onClick:r,className:"truncate font-mono text-[11px] text-primary hover:underline",children:e.queueName})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Xm,{status:e.status})}),b.jsx("div",{className:"col-span-2",children:b.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(Lm,{className:"h-3.5 w-3.5 text-emerald-600 dark:text-emerald-400"}),b.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.completedJobs})]}),b.jsx("span",{className:"text-muted-foreground",children:"/"}),b.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.totalJobs}),e.failedJobs>0&&b.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[b.jsx(B0,{className:"h-3.5 w-3.5 text-destructive"}),b.jsx("span",{className:"text-destructive tabular-nums",children:e.failedJobs})]})]})}),b.jsxs("div",{className:"col-span-2 flex items-center justify-between",children:[b.jsx(Su,{timestamp:e.timestamp}),b.jsx(Of,{className:"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})]})}function jF({data:e,className:t,defaultExpanded:n=!0}){const[r,i]=j.useState(!1),a=()=>{navigator.clipboard.writeText(JSON.stringify(e,null,2)),i(!0),setTimeout(()=>i(!1),2e3)};return b.jsxs("div",{className:Te("relative group",t),children:[b.jsx("button",{type:"button",onClick:a,className:"absolute right-3 top-3 rounded p-1.5 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100",children:r?b.jsx(Im,{size:16,className:"h-4 w-4 text-status-success"}):b.jsx(aR,{className:"h-4 w-4 text-muted-foreground"})}),b.jsx("div",{className:"max-h-96 overflow-auto p-4 font-mono text-sm",children:b.jsx(IN,{data:e,level:0,defaultExpanded:n})})]})}function IN({data:e,level:t,defaultExpanded:n,keyName:r}){const[i,a]=j.useState(n),o=({name:l})=>b.jsxs("span",{className:"text-primary",children:['"',l,'"']});if(e===null)return b.jsxs("span",{children:[r&&b.jsxs(b.Fragment,{children:[b.jsx(o,{name:r}),b.jsx("span",{className:"text-foreground",children:": "})]}),b.jsx("span",{className:"text-muted-foreground italic",children:"null"})]});if(e===void 0)return b.jsxs("span",{children:[r&&b.jsxs(b.Fragment,{children:[b.jsx(o,{name:r}),b.jsx("span",{className:"text-foreground",children:": "})]}),b.jsx("span",{className:"text-muted-foreground italic",children:"undefined"})]});if(typeof e=="boolean")return b.jsxs("span",{children:[r&&b.jsxs(b.Fragment,{children:[b.jsx(o,{name:r}),b.jsx("span",{className:"text-foreground",children:": "})]}),b.jsx("span",{className:"text-status-warning",children:String(e)})]});if(typeof e=="number")return b.jsxs("span",{children:[r&&b.jsxs(b.Fragment,{children:[b.jsx(o,{name:r}),b.jsx("span",{className:"text-foreground",children:": "})]}),b.jsx("span",{className:"text-status-success",children:e})]});if(typeof e=="string")return b.jsxs("span",{children:[r&&b.jsxs(b.Fragment,{children:[b.jsx(o,{name:r}),b.jsx("span",{className:"text-foreground",children:": "})]}),b.jsxs("span",{className:"text-chart-5",children:['"',e,'"']})]});if(Array.isArray(e))return e.length===0?b.jsxs("span",{children:[r&&b.jsxs(b.Fragment,{children:[b.jsx(o,{name:r}),b.jsx("span",{className:"text-foreground",children:": "})]}),b.jsx("span",{className:"text-muted-foreground",children:"[]"})]}):b.jsxs("div",{children:[b.jsxs("button",{type:"button",onClick:()=>a(!i),className:"inline-flex items-center gap-1 hover:opacity-70",children:[b.jsx(Of,{className:Te("h-3 w-3 text-muted-foreground transition-transform",i&&"rotate-90")}),r&&b.jsxs(b.Fragment,{children:[b.jsx(o,{name:r}),b.jsx("span",{className:"text-foreground",children:": "})]}),b.jsxs("span",{className:"text-muted-foreground",children:["Array(",e.length,")"]})]}),i&&b.jsx("div",{className:"ml-4 mt-1 space-y-1 border-l border-border pl-3",children:e.map((l,u)=>b.jsx("div",{children:b.jsx(IN,{data:l,level:t+1,defaultExpanded:t<1,keyName:String(u)})},u.toString()))})]});if(typeof e=="object"){const l=Object.entries(e);return l.length===0?b.jsxs("span",{children:[r&&b.jsxs(b.Fragment,{children:[b.jsx(o,{name:r}),b.jsx("span",{className:"text-foreground",children:": "})]}),b.jsx("span",{className:"text-muted-foreground",children:"{}"})]}):b.jsxs("div",{children:[b.jsxs("button",{type:"button",onClick:()=>a(!i),className:"inline-flex items-center gap-1 hover:opacity-70",children:[b.jsx(Of,{className:Te("h-3 w-3 text-muted-foreground transition-transform",i&&"rotate-90")}),r&&b.jsxs(b.Fragment,{children:[b.jsx(o,{name:r}),b.jsx("span",{className:"text-foreground",children:": "})]}),b.jsxs("span",{className:"text-muted-foreground",children:["Object(",l.length,")"]})]}),i&&b.jsx("div",{className:"ml-4 mt-1 space-y-1 border-l border-border pl-3",children:l.map(([u,f])=>b.jsx("div",{children:b.jsx(IN,{data:f,level:t+1,defaultExpanded:t<1,keyName:u})},u))})]})}return b.jsx("span",{children:String(e)})}const NF=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,PF=ut,kX=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return PF(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(f=>{const d=n==null?void 0:n[f],h=a==null?void 0:a[f];if(d===null)return null;const m=NF(d)||NF(h);return i[f][m]}),l=n&&Object.entries(n).reduce((f,d)=>{let[h,m]=d;return m===void 0||(f[h]=m),f},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,d)=>{let{class:h,className:m,...g}=d;return Object.entries(g).every(x=>{let[w,y]=x;return Array.isArray(y)?y.includes({...a,...l}[w]):{...a,...l}[w]===y})?[...f,h,m]:f},[]);return PF(e,o,u,n==null?void 0:n.class,n==null?void 0:n.className)},L1e=kX("inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-white",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function _u({className:e,variant:t,...n}){return b.jsx("span",{"data-slot":"badge",className:Te(L1e({variant:t}),e),...n})}const $1e=kX("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none 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 text-destructive-foreground hover:bg-destructive/90",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 px-3",lg:"h-11 px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),tr=j.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?Jde:"button";return b.jsx(o,{className:Te($1e({variant:t,size:n,className:e})),ref:a,...i})});tr.displayName="Button";function DX(e){const t=e+"CollectionProvider",[n,r]=va(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=w=>{const{scope:y,children:S}=w,E=ie.useRef(null),_=ie.useRef(new Map).current;return b.jsx(i,{scope:y,itemMap:_,collectionRef:E,children:S})};o.displayName=t;const l=e+"CollectionSlot",u=Ep(l),f=ie.forwardRef((w,y)=>{const{scope:S,children:E}=w,_=a(l,S),A=ft(y,_.collectionRef);return b.jsx(u,{ref:A,children:E})});f.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=Ep(d),g=ie.forwardRef((w,y)=>{const{scope:S,children:E,..._}=w,A=ie.useRef(null),C=ft(y,A),O=a(d,S);return ie.useEffect(()=>(O.itemMap.set(A,{ref:A,..._}),()=>void O.itemMap.delete(A))),b.jsx(m,{[h]:"",ref:C,children:E})});g.displayName=d;function x(w){const y=a(e+"CollectionConsumer",w);return ie.useCallback(()=>{const E=y.collectionRef.current;if(!E)return[];const _=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((O,P)=>_.indexOf(O.ref.current)-_.indexOf(P.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:f,ItemSlot:g},x,r]}var OO="rovingFocusGroup.onEntryFocus",B1e={bubbles:!1,cancelable:!0},Zm="RovingFocusGroup",[LN,IX,q1e]=DX(Zm),[z1e,LX]=va(Zm,[q1e]),[V1e,F1e]=z1e(Zm),$X=j.forwardRef((e,t)=>b.jsx(LN.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(LN.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(U1e,{...e,ref:t})})}));$X.displayName=Zm;var U1e=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:d=!1,...h}=e,m=j.useRef(null),g=ft(t,m),x=U0(a),[w,y]=Hs({prop:o,defaultProp:l??null,onChange:u,caller:Zm}),[S,E]=j.useState(!1),_=nr(f),A=IX(n),C=j.useRef(!1),[O,P]=j.useState(0);return j.useEffect(()=>{const M=m.current;if(M)return M.addEventListener(OO,_),()=>M.removeEventListener(OO,_)},[_]),b.jsx(V1e,{scope:n,orientation:r,dir:x,loop:i,currentTabStopId:w,onItemFocus:j.useCallback(M=>y(M),[y]),onItemShiftTab:j.useCallback(()=>E(!0),[]),onFocusableItemAdd:j.useCallback(()=>P(M=>M+1),[]),onFocusableItemRemove:j.useCallback(()=>P(M=>M-1),[]),children:b.jsx(He.div,{tabIndex:S||O===0?-1:0,"data-orientation":r,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:ke(e.onMouseDown,()=>{C.current=!0}),onFocus:ke(e.onFocus,M=>{const R=!C.current;if(M.target===M.currentTarget&&R&&!S){const $=new CustomEvent(OO,B1e);if(M.currentTarget.dispatchEvent($),!$.defaultPrevented){const I=A().filter(L=>L.focusable),k=I.find(L=>L.active),V=I.find(L=>L.id===w),q=[k,V,...I].filter(Boolean).map(L=>L.ref.current);zX(q,d)}}C.current=!1}),onBlur:ke(e.onBlur,()=>E(!1))})})}),BX="RovingFocusGroupItem",qX=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...l}=e,u=or(),f=a||u,d=F1e(BX,n),h=d.currentTabStopId===f,m=IX(n),{onFocusableItemAdd:g,onFocusableItemRemove:x,currentTabStopId:w}=d;return j.useEffect(()=>{if(r)return g(),()=>x()},[r,g,x]),b.jsx(LN.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:b.jsx(He.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:ke(e.onMouseDown,y=>{r?d.onItemFocus(f):y.preventDefault()}),onFocus:ke(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:ke(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const S=W1e(y,d.orientation,d.dir);if(S!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let _=m().filter(A=>A.focusable).map(A=>A.ref.current);if(S==="last")_.reverse();else if(S==="prev"||S==="next"){S==="prev"&&_.reverse();const A=_.indexOf(y.currentTarget);_=d.loop?K1e(_,A+1):_.slice(A+1)}setTimeout(()=>zX(_))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:w!=null}):o})})});qX.displayName=BX;var H1e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function G1e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function W1e(e,t,n){const r=G1e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return H1e[r]}function zX(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function K1e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Y1e=$X,X1e=qX,Ex="Tabs",[Z1e]=va(Ex,[LX]),VX=LX(),[Q1e,f2]=Z1e(Ex),FX=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:u="automatic",...f}=e,d=U0(l),[h,m]=Hs({prop:r,onChange:i,defaultProp:a??"",caller:Ex});return b.jsx(Q1e,{scope:n,baseId:or(),value:h,onValueChange:m,orientation:o,dir:d,activationMode:u,children:b.jsx(He.div,{dir:d,"data-orientation":o,...f,ref:t})})});FX.displayName=Ex;var UX="TabsList",HX=j.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=f2(UX,n),o=VX(n);return b.jsx(Y1e,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:b.jsx(He.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});HX.displayName=UX;var GX="TabsTrigger",WX=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=f2(GX,n),l=VX(n),u=XX(o.baseId,r),f=ZX(o.baseId,r),d=r===o.value;return b.jsx(X1e,{asChild:!0,...l,focusable:!i,active:d,children:b.jsx(He.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":f,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...a,ref:t,onMouseDown:ke(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:ke(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:ke(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!i&&h&&o.onValueChange(r)})})})});WX.displayName=GX;var KX="TabsContent",YX=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,l=f2(KX,n),u=XX(l.baseId,r),f=ZX(l.baseId,r),d=r===l.value,h=j.useRef(d);return j.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),b.jsx(Er,{present:i||d,children:({present:m})=>b.jsx(He.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!m,id:f,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&a})})});YX.displayName=KX;function XX(e,t){return`${e}-trigger-${t}`}function ZX(e,t){return`${e}-content-${t}`}var J1e=FX,QX=HX,JX=WX,eZ=YX;const d2=J1e,Ax=j.forwardRef(({className:e,...t},n)=>b.jsx(QX,{ref:n,className:Te("inline-flex h-9 items-center gap-1 bg-muted p-1 text-muted-foreground",e),...t}));Ax.displayName=QX.displayName;const Qa=j.forwardRef(({className:e,...t},n)=>b.jsx(JX,{ref:n,className:Te("inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium transition-all","focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Qa.displayName=JX.displayName;const ms=j.forwardRef(({className:e,...t},n)=>b.jsx(eZ,{ref:n,className:Te("mt-2 focus-visible:outline-none",e),...t}));ms.displayName=eZ.displayName;function eSe({queueName:e,jobId:t,readonly:n,search:r,onSearchChange:i,onBack:a,onClone:o}){const l=zi(),{data:u,isLoading:f,error:d}=wfe(e,t),h=Cfe(),m=Tfe(),g=Ofe(),[x,w]=j.useState(!1),y=h.isPending||m.isPending||g.isPending,S=async()=>{await navigator.clipboard.writeText(t),w(!0),setTimeout(()=>w(!1),2e3)},E=()=>{h.mutate({queueName:e,jobId:t})},_=()=>{m.mutate({queueName:e,jobId:t},{onSuccess:()=>a()})},A=()=>{g.mutate({queueName:e,jobId:t})},C=()=>{if(!u)return;const P={id:u.id,name:u.name,queueName:e,status:u.status,data:u.data,returnvalue:u.returnvalue,failedReason:u.failedReason,stacktrace:u.stacktrace,attemptsMade:u.attemptsMade,opts:u.opts,timestamp:u.timestamp,processedOn:u.processedOn,finishedOn:u.finishedOn,duration:u.duration,progress:u.progress,tags:u.tags},M=new Blob([JSON.stringify(P,null,2)],{type:"application/json"}),R=URL.createObjectURL(M),$=document.createElement("a");$.href=R,$.download=`job-${u.name}-${t}.json`,$.click(),URL.revokeObjectURL(R)},O=()=>{if(!u)return;const P=JSON.stringify(u.data,null,2);o(e,u.name,P)};return f&&!u?b.jsxs("div",{className:"space-y-4",children:[b.jsxs("div",{className:" border bg-card",children:[b.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"h-6 w-32 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"h-8 w-8 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-8 w-8 animate-pulse rounded bg-muted"})]})]}),b.jsxs("div",{className:"flex items-center gap-6 px-4 py-3",children:[b.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})]})]}),b.jsxs("div",{className:" border bg-card p-4",children:[b.jsx("div",{className:"h-5 w-16 animate-pulse rounded bg-muted mb-3"}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"})]})]})]}):d||!u?b.jsx(Di,{icon:md,title:"Job not found",description:(d==null?void 0:d.message)||"This job may have been removed",action:b.jsx(tr,{variant:"outline",onClick:a,children:"Go back"})}):b.jsxs("div",{className:"flex h-full flex-col gap-4",children:[b.jsxs("div",{className:" border bg-card",children:[b.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"flex items-center gap-2 bg-muted px-2.5 py-1 text-sm font-medium",children:u.name}),b.jsx(Xm,{status:u.status})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsxs(tr,{variant:"outline",size:"sm",onClick:C,children:[b.jsx(Pce,{className:"mr-1.5 h-3.5 w-3.5"}),"Export"]}),!n&&b.jsxs(b.Fragment,{children:[b.jsxs(tr,{variant:"outline",size:"sm",onClick:O,children:[b.jsx(Nce,{className:"mr-1.5 h-3.5 w-3.5"}),"Clone"]}),u.status==="failed"&&b.jsxs(tr,{variant:"outline",size:"sm",onClick:E,disabled:y,children:[b.jsx(q0,{className:"mr-1.5 h-3.5 w-3.5"}),"Retry"]}),u.status==="delayed"&&b.jsxs(tr,{variant:"outline",size:"sm",onClick:A,disabled:y,children:[b.jsx(Rce,{className:"mr-1.5 h-3.5 w-3.5"}),"Run Now"]}),b.jsxs(tr,{variant:"outline",size:"sm",onClick:_,disabled:y,className:"text-destructive hover:bg-destructive/10 hover:text-destructive",children:[b.jsx(g7,{className:"mr-1.5 h-3.5 w-3.5"}),"Remove"]})]})]})]}),b.jsxs("div",{className:"divide-y text-sm",children:[b.jsx(Mc,{icon:Dce,label:"Job ID",mono:!0,children:b.jsxs("span",{className:"flex items-center gap-2",children:[t,b.jsx("button",{type:"button",onClick:S,className:"rounded p-1 hover:bg-muted",children:x?b.jsx(Im,{className:"h-3.5 w-3.5 text-status-success"}):b.jsx(aR,{className:"h-3.5 w-3.5 text-muted-foreground"})})]})}),b.jsx(Mc,{icon:sR,label:"Queue",children:b.jsx("button",{type:"button",onClick:()=>l({to:"/queues/$queueName",params:{queueName:e}}),className:"font-mono text-xs text-primary hover:underline",children:e})}),u.parent&&b.jsx(Mc,{icon:gd,label:"Part of Flow",children:b.jsxs("button",{type:"button",onClick:()=>l({to:"/flows/$queueName/$jobId",params:{queueName:u.parent.queueName,jobId:u.parent.id}}),className:"flex items-center gap-1.5 text-primary hover:underline",children:[b.jsx("span",{className:"font-mono text-xs",children:u.parent.id}),b.jsx(Mce,{className:"h-3 w-3"})]})}),b.jsx(Mc,{icon:si,label:"Created",children:xy(u.timestamp)}),u.processedOn&&b.jsx(Mc,{icon:si,label:"Started",children:xy(u.processedOn)}),u.finishedOn&&b.jsx(Mc,{icon:si,label:"Finished",children:xy(u.finishedOn)})]}),b.jsxs("div",{className:"flex items-center gap-6 border-t px-4 py-3 text-sm",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"text-muted-foreground",children:"Duration"}),b.jsx("span",{className:"font-mono font-medium",children:u.duration?wr(u.duration):"-"})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(lR,{className:"h-3.5 w-3.5 text-muted-foreground"}),b.jsx("span",{className:"text-muted-foreground",children:"Attempts"}),b.jsxs("span",{className:"font-mono font-medium",children:[u.attemptsMade," / ",u.opts.attempts||3]}),u.attemptsMade>1&&b.jsx(_u,{variant:"secondary",className:"bg-amber-500/10 text-amber-600 text-[10px] px-1.5",children:"Retried"})]}),u.opts.delay&&b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"text-muted-foreground",children:"Delay"}),b.jsx("span",{className:"font-mono font-medium",children:wr(u.opts.delay)})]})]})]}),b.jsxs(d2,{value:r.tab||(u.status==="failed"?"error":"payload"),onValueChange:P=>i({...r,tab:P}),className:"flex-1",children:[b.jsxs(Ax,{children:[b.jsx(Qa,{value:"payload",children:"Payload"}),b.jsx(Qa,{value:"output",children:"Output"}),u.failedReason&&b.jsx(Qa,{value:"error",className:"text-status-error",children:"Error"}),u.attemptsMade>1&&u.stacktrace&&u.stacktrace.length>0&&b.jsxs(Qa,{value:"retries",children:["Retries (",u.attemptsMade-1,")"]}),b.jsx(Qa,{value:"timeline",children:"Timeline"})]}),b.jsx(ms,{value:"payload",className:"mt-4",children:b.jsx("div",{className:" border",children:b.jsx(jF,{data:u.data})})}),b.jsx(ms,{value:"output",className:"mt-4",children:b.jsx("div",{className:" border",children:u.returnvalue?b.jsx(jF,{data:u.returnvalue}):b.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No output data"})})}),u.failedReason&&b.jsx(ms,{value:"error",className:"mt-4 flex flex-col",style:{maxHeight:"calc(100vh - 480px)",minHeight:"200px"},children:b.jsx(tSe,{error:u.failedReason,stacktrace:u.stacktrace,jobName:u.name,queueName:e})}),u.attemptsMade>1&&u.stacktrace&&u.stacktrace.length>0&&b.jsx(ms,{value:"retries",className:"mt-4",children:b.jsx(rSe,{attemptsMade:u.attemptsMade,maxAttempts:u.opts.attempts||3,stacktraces:u.stacktrace,status:u.status})}),b.jsx(ms,{value:"timeline",className:"mt-4",children:b.jsx(nSe,{job:u})})]})]})}function Mc({icon:e,label:t,children:n,mono:r}){return b.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",children:[b.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[b.jsx(e,{className:"h-4 w-4"}),t]}),b.jsx("div",{className:Te(r&&"font-mono"),children:n})]})}function tSe({error:e,stacktrace:t,jobName:n,queueName:r}){const[i,a]=j.useState(!0),[o,l]=j.useState(!1),u=async()=>{const d=t?`${e}
|
|
366
|
+
|
|
367
|
+
${t.join(`
|
|
368
|
+
`)}`:e;await navigator.clipboard.writeText(d),l(!0),setTimeout(()=>l(!1),2e3)},f=()=>{const d=t?`${e}
|
|
369
|
+
|
|
370
|
+
${t.join(`
|
|
371
|
+
`)}`:e,h=`Debug this error from job "${n||"unknown"}" in queue "${r||"unknown"}":
|
|
372
|
+
|
|
373
|
+
${d}
|
|
374
|
+
|
|
375
|
+
Help me understand what caused this error and how to fix it.`,m=`https://cursor.com/link/prompt?text=${encodeURIComponent(h)}`;window.open(m,"_blank")};return b.jsxs("div",{className:"flex flex-col h-full overflow-hidden border border-status-error/30 bg-status-error/5",children:[b.jsxs("div",{className:"flex items-center justify-between border-b border-status-error/30 px-4 py-2 shrink-0",children:[b.jsx("span",{className:"font-medium text-status-error",children:e}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsxs("button",{type:"button",onClick:f,className:"inline-flex items-center gap-1.5 rounded px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-status-error/10 hover:text-foreground",title:"Fix in Cursor",children:[b.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0",children:b.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})}),b.jsx("span",{children:"Fix in Cursor"})]}),b.jsx("div",{className:"h-4 w-px bg-border"}),b.jsx("button",{type:"button",onClick:u,className:"rounded p-1.5 hover:bg-status-error/10",title:"Copy error",children:o?b.jsx(Im,{className:"h-4 w-4 text-status-success"}):b.jsx(aR,{className:"h-4 w-4 text-muted-foreground"})}),t&&t.length>0&&b.jsx("button",{type:"button",onClick:()=>a(!i),className:"rounded p-1.5 hover:bg-status-error/10",title:i?"Collapse":"Expand",children:b.jsx($0,{className:Te("h-4 w-4 text-muted-foreground transition-transform",i&&"rotate-180")})})]})]}),i&&t&&t.length>0&&b.jsx("div",{className:"flex-1 overflow-auto p-4 min-h-0",children:b.jsx("pre",{className:"font-mono text-xs text-muted-foreground",children:t.join(`
|
|
376
|
+
`)})})]})}function nSe({job:e}){const[t,n]=j.useState({root:!0,attempt:!0}),{spans:r,timeRange:i}=j.useMemo(()=>{var m,g,x,w;const u=e.timestamp,f=e.finishedOn||e.processedOn||Date.now(),d=f-u,h={id:"root",label:e.name,icon:e.status==="completed"?Lm:e.status==="failed"?B0:eb,iconColor:e.status==="completed"?"text-status-success":e.status==="failed"?"text-status-error":"text-status-warning",startTime:e.timestamp,endTime:e.finishedOn,status:e.status==="completed"?"success":e.status==="failed"?"error":"running",badge:e.attemptsMade>0?`Attempt ${e.attemptsMade}`:void 0,children:[]};if(e.processedOn&&e.processedOn>e.timestamp&&e.processedOn-e.timestamp>100&&((m=h.children)==null||m.push({id:"wait",label:"Queued",icon:si,iconColor:"text-muted-foreground",startTime:e.timestamp,endTime:e.processedOn,status:"waiting"})),e.processedOn){const y={id:"exec",label:"run()",icon:eb,iconColor:"text-blue-500",startTime:e.processedOn,endTime:e.finishedOn,status:e.status==="completed"?"success":e.status==="failed"?"error":"running",badge:e.duration?wr(e.duration):void 0,children:[]};if(e.progress&&typeof e.progress=="object"){const S=e.progress;if(Array.isArray(S.logs))for(const E of S.logs)(g=y.children)==null||g.push({id:`log-${y.children.length}`,label:E.message,icon:Lce,iconColor:"text-blue-400",startTime:E.time||e.processedOn,status:"success",isLog:!0})}e.status==="failed"&&e.failedReason&&((x=y.children)==null||x.push({id:"error",label:e.failedReason,icon:md,iconColor:"text-status-error",startTime:e.finishedOn||e.processedOn,status:"error",isLog:!0})),(w=h.children)==null||w.push(y)}return{spans:[h],timeRange:{start:u,end:f,duration:d}}},[e]),a=u=>{n(f=>({...f,[u]:!f[u]}))},o=j.useMemo(()=>{const{start:u,duration:f}=i,d=[],h=5;for(let m=0;m<=h;m++){const g=u+f/h*m,x=(g-u)/f*100;d.push({position:x,label:wr(g-u)})}return d},[i]),l=(u,f=0)=>{var y;const d=u.children&&u.children.length>0,h=t[u.id]!==!1,m=u.icon,g=(u.startTime-i.start)/i.duration*100,x=u.endTime?(u.endTime-i.start)/i.duration*100:100,w=Math.max(x-g,.5);return b.jsxs(j.Fragment,{children:[b.jsxs("div",{className:"group flex min-h-[36px] items-center border-b border-border/50 hover:bg-muted/30",children:[b.jsxs("div",{className:"flex w-[45%] min-w-0 items-center gap-1 py-2 pr-4",style:{paddingLeft:`${f*20+12}px`},children:[d?b.jsx("button",{type:"button",onClick:()=>a(u.id),className:"flex h-5 w-5 shrink-0 items-center justify-center rounded hover:bg-muted",children:b.jsx(Of,{className:Te("h-3.5 w-3.5 text-muted-foreground transition-transform",h&&"rotate-90")})}):b.jsx("div",{className:"w-5 shrink-0"}),b.jsx(m,{className:Te("h-4 w-4 shrink-0",u.iconColor)}),b.jsx("span",{className:Te("truncate text-sm",u.isLog?"text-muted-foreground":"font-medium"),children:u.label}),u.badge&&b.jsx("span",{className:"ml-2 shrink-0 rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:u.badge})]}),b.jsx("div",{className:"relative h-full flex-1 py-2 pr-4",children:u.isLog?b.jsx("div",{className:"absolute top-1/2 h-2 w-2 -translate-y-1/2 rounded-full bg-muted-foreground/40",style:{left:`${g}%`}}):b.jsx("div",{className:Te("absolute top-1/2 h-5 -translate-y-1/2 ",u.status==="success"&&"bg-status-success",u.status==="error"&&"bg-status-error",u.status==="running"&&"bg-status-warning",u.status==="waiting"&&"bg-muted-foreground/30"),style:{left:`${g}%`,width:`${w}%`,minWidth:"2px"},children:w>8&&u.endTime&&b.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-[10px] font-medium text-white",children:wr(u.endTime-u.startTime)})})})]}),d&&h&&((y=u.children)==null?void 0:y.map(S=>l(S,f+1)))]},u.id)};return b.jsxs("div",{className:"flex flex-col border bg-card overflow-hidden h-full",children:[b.jsxs("div",{className:"flex border-b bg-muted/30 shrink-0",children:[b.jsx("div",{className:"w-[45%] shrink-0 flex items-center py-2 pr-4",style:{paddingLeft:"12px"},children:b.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Span"})}),b.jsx("div",{className:"relative flex-1 py-2 pr-4 flex items-center",children:o.map((u,f)=>b.jsx("span",{className:"absolute font-mono text-[10px] text-muted-foreground",style:{left:`${u.position}%`,transform:"translateX(-50%)"},children:u.label},f.toString()))})]}),b.jsx("div",{className:"flex-1 overflow-auto min-h-0",children:r.map(u=>l(u))})]})}function rSe({attemptsMade:e,maxAttempts:t,stacktraces:n,status:r}){return b.jsxs("div",{className:"space-y-4",children:[b.jsxs("div",{className:"flex items-center gap-4 border bg-muted/30 px-4 py-3",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(lR,{className:"h-4 w-4 text-amber-500"}),b.jsx("span",{className:"font-medium",children:"Retry History"})]}),b.jsxs("div",{className:"text-sm text-muted-foreground",children:[e," of ",t," attempts"]}),b.jsx(_u,{variant:r==="completed"?"default":"destructive",className:"ml-auto",children:r==="completed"?"Eventually succeeded":"All attempts failed"})]}),b.jsx("div",{className:"space-y-3",children:n.map((i,a)=>b.jsx(iSe,{attemptNumber:a+1,isLast:a===n.length-1,stacktrace:i,succeeded:r==="completed"&&a===n.length-1},a.toString()))})]})}function iSe({attemptNumber:e,isLast:t,stacktrace:n,succeeded:r}){const[i,a]=j.useState(t),o=n.split(`
|
|
377
|
+
`)[0]||"Unknown error";return b.jsxs("div",{className:Te("overflow-hidden border",r?"border-status-success/30 bg-status-success/5":"border-status-error/30 bg-status-error/5"),children:[b.jsxs("button",{type:"button",onClick:()=>a(!i),className:"flex w-full items-center gap-3 px-4 py-2.5 text-left",children:[b.jsx("div",{className:Te("flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium",r?"bg-status-success/20 text-status-success":"bg-status-error/20 text-status-error"),children:e}),b.jsxs("div",{className:"flex-1 min-w-0",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsxs("span",{className:"text-sm font-medium",children:["Attempt ",e]}),r?b.jsx(_u,{variant:"secondary",className:"bg-status-success/10 text-status-success text-[10px]",children:"Success"}):b.jsx(_u,{variant:"secondary",className:"bg-status-error/10 text-status-error text-[10px]",children:"Failed"})]}),!r&&b.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o})]}),b.jsx($0,{className:Te("h-4 w-4 text-muted-foreground transition-transform",i&&"rotate-180")})]}),i&&!r&&b.jsx("div",{className:"border-t border-inherit px-4 py-3",children:b.jsx("pre",{className:"max-h-48 overflow-auto font-mono text-xs text-muted-foreground whitespace-pre-wrap",children:n})}),i&&r&&b.jsx("div",{className:"border-t border-inherit px-4 py-3 text-sm text-status-success",children:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Lm,{className:"h-4 w-4"}),"Job completed successfully on this attempt"]})})]})}function aSe({data:e,className:t,color:n="default"}){if(e.length===0)return null;const r=Math.max(...e,1),i=Math.min(...e,0),a=r-i||1,o=80,l=24,u=e.map((w,y)=>{const S=y/(e.length-1)*o,E=l-(w-i)/a*l;return`${S},${E}`}),f=`M ${u.join(" L ")}`,d=[`0,${l}`,...u,`${o},${l}`].join(" "),h={default:"text-chart-1",success:"text-chart-success",danger:"text-chart-error",warning:"text-chart-4"}[n],m=`sparkline-${n}-pattern`,g={default:"fill-chart-1",success:"fill-chart-success",danger:"fill-chart-error",warning:"fill-chart-4"}[n],x={default:"stroke-chart-1",success:"stroke-chart-success",danger:"stroke-chart-error",warning:"stroke-chart-4"}[n];return b.jsxs("svg",{viewBox:`0 0 ${o} ${l}`,className:Te("w-20 h-6",t),preserveAspectRatio:"none",children:[b.jsx("defs",{children:b.jsxs("pattern",{id:m,x:"0",y:"0",width:"4",height:"4",patternUnits:"userSpaceOnUse",children:[b.jsx("rect",{width:"4",height:"4",className:Te(g,"opacity-15")}),b.jsx("path",{d:"M0,0 L4,4 M-1,3 L3,7 M-1,-1 L5,5",className:x,strokeWidth:"0.75",opacity:"0.4"})]})}),b.jsx("polygon",{points:d,fill:`url(#${m})`}),b.jsx("path",{d:f,fill:"none",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:Te("stroke-current",h)})]})}function oSe({current:e,previous:t,higherIsBetter:n=!0}){if(t===0)return null;const r=(e-t)/t*100,i=r>0,a=Math.abs(r)<1,o=n?i:!i;return a?b.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[b.jsx(d7,{className:"h-3 w-3 mr-0.5"}),"0%"]}):b.jsxs("span",{className:Te("inline-flex items-center text-xs font-medium",o?"text-chart-success":"text-chart-error"),children:[i?b.jsx(c7,{className:"h-3 w-3 mr-0.5"}):b.jsx(u7,{className:"h-3 w-3 mr-0.5"}),Math.abs(r).toFixed(0),"%"]})}function Zv({title:e,value:t,subtitle:n,sparklineData:r,sparklineColor:i="default",trend:a,className:o,icon:l}){return b.jsxs("div",{className:Te("border border-dashed bg-card p-4 flex flex-col gap-2",o),children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:e}),l&&b.jsx("span",{className:"text-muted-foreground",children:l})]}),b.jsxs("div",{className:"flex items-end justify-between gap-4",children:[b.jsxs("div",{className:"flex flex-col gap-1",children:[b.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:t}),n&&b.jsx("span",{className:"text-xs text-muted-foreground",children:n}),a&&b.jsx(oSe,{current:a.current,previous:a.previous,higherIsBetter:a.higherIsBetter})]}),r&&r.length>0&&b.jsx(aSe,{data:r,color:i})]})]})}var sSe=XY();const li=yt(sSe);var jO,MF;function lSe(){if(MF)return jO;MF=1;function e(t){return t==null}return jO=e,jO}var uSe=lSe();const ot=yt(uSe);var cSe=aX();const Eu=yt(cSe);var fSe=bd();const Xe=yt(fSe);var dSe=lr();const Ad=yt(dSe);var NO={exports:{}},bt={};/**
|
|
378
|
+
* @license React
|
|
379
|
+
* react-is.production.min.js
|
|
380
|
+
*
|
|
381
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the MIT license found in the
|
|
384
|
+
* LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/var RF;function hSe(){if(RF)return bt;RF=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),x;x=Symbol.for("react.module.reference");function w(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case e:switch(y=y.type,y){case n:case i:case r:case f:case d:return y;default:switch(y=y&&y.$$typeof,y){case l:case o:case u:case m:case h:case a:return y;default:return S}}case t:return S}}}return bt.ContextConsumer=o,bt.ContextProvider=a,bt.Element=e,bt.ForwardRef=u,bt.Fragment=n,bt.Lazy=m,bt.Memo=h,bt.Portal=t,bt.Profiler=i,bt.StrictMode=r,bt.Suspense=f,bt.SuspenseList=d,bt.isAsyncMode=function(){return!1},bt.isConcurrentMode=function(){return!1},bt.isContextConsumer=function(y){return w(y)===o},bt.isContextProvider=function(y){return w(y)===a},bt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},bt.isForwardRef=function(y){return w(y)===u},bt.isFragment=function(y){return w(y)===n},bt.isLazy=function(y){return w(y)===m},bt.isMemo=function(y){return w(y)===h},bt.isPortal=function(y){return w(y)===t},bt.isProfiler=function(y){return w(y)===i},bt.isStrictMode=function(y){return w(y)===r},bt.isSuspense=function(y){return w(y)===f},bt.isSuspenseList=function(y){return w(y)===d},bt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===i||y===r||y===f||y===d||y===g||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===h||y.$$typeof===a||y.$$typeof===o||y.$$typeof===u||y.$$typeof===x||y.getModuleId!==void 0)},bt.typeOf=w,bt}var kF;function pSe(){return kF||(kF=1,NO.exports=hSe()),NO.exports}var mSe=pSe(),PO,DF;function tZ(){if(DF)return PO;DF=1;var e=So(),t=pi(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return PO=r,PO}var MO,IF;function gSe(){if(IF)return MO;IF=1;var e=tZ();function t(n){return e(n)&&n!=+n}return MO=t,MO}var vSe=gSe();const Cd=yt(vSe);var ySe=tZ();const bSe=yt(ySe);var ki=function(t){return t===0?0:t>0?1:-1},Fl=function(t){return Eu(t)&&t.indexOf("%")===t.length-1},Se=function(t){return bSe(t)&&!Cd(t)},xSe=function(t){return ot(t)},Cn=function(t){return Se(t)||Eu(t)},wSe=0,Qm=function(t){var n=++wSe;return"".concat(t||"").concat(n)},Au=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Se(t)&&!Eu(t))return r;var a;if(Fl(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return Cd(a)&&(a=r),i&&a>n&&(a=n),a},gs=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},SSe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},ii=function(t,n){return Se(t)&&Se(n)?function(r){return t+r*(n-t)}:function(){return n}};function wb(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):li(r,t))===n})}var _Se=function(t,n){return Se(t)&&Se(n)?t-n:Eu(t)&&Eu(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function rf(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 $N(e){"@babel/helpers - typeof";return $N=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},$N(e)}var ESe=["viewBox","children"],ASe=["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"],LF=["points","pathLength"],RO={svg:ESe,polygon:LF,polyline:LF},h2=["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"],Sb=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(j.isValidElement(t)&&(r=t.props),!Ad(r))return null;var i={};return Object.keys(r).forEach(function(a){h2.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},CSe=function(t,n,r){return function(i){return t(n,r,i),null}},_b=function(t,n,r){if(!Ad(t)||$N(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];h2.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=CSe(o,n,r))}),i},TSe=["children"],OSe=["children"];function $F(e,t){if(e==null)return{};var n=jSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jSe(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 BN(e){"@babel/helpers - typeof";return BN=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},BN(e)}var BF={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"},oo=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},qF=null,kO=null,p2=function e(t){if(t===qF&&Array.isArray(kO))return kO;var n=[];return j.Children.forEach(t,function(r){ot(r)||(mSe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),kO=n,qF=t,n};function Ii(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return oo(i)}):r=[oo(t)],p2(e).forEach(function(i){var a=li(i,"type.displayName")||li(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function kr(e,t){var n=Ii(e,t);return n&&n[0]}var zF=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Se(r)||r<=0||!Se(i)||i<=0)},NSe=["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"],PSe=function(t){return t&&t.type&&Eu(t.type)&&NSe.indexOf(t.type)>=0},MSe=function(t){return t&&BN(t)==="object"&&"clipDot"in t},RSe=function(t,n,r,i){var a,o=(a=RO==null?void 0:RO[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!Xe(t)&&(i&&o.includes(n)||ASe.includes(n))||r&&h2.includes(n)},et=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(j.isValidElement(t)&&(i=t.props),!Ad(i))return null;var a={};return Object.keys(i).forEach(function(o){var l;RSe((l=i)===null||l===void 0?void 0:l[o],o,n,r)&&(a[o]=i[o])}),a},qN=function e(t,n){if(t===n)return!0;var r=j.Children.count(t);if(r!==j.Children.count(n))return!1;if(r===0)return!0;if(r===1)return VF(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!VF(a,o))return!1}return!0},VF=function(t,n){if(ot(t)&&ot(n))return!0;if(!ot(t)&&!ot(n)){var r=t.props||{},i=r.children,a=$F(r,TSe),o=n.props||{},l=o.children,u=$F(o,OSe);return i&&l?rf(a,u)&&qN(i,l):!i&&!l?rf(a,u):!1}return!1},FF=function(t,n){var r=[],i={};return p2(t).forEach(function(a,o){if(PSe(a))r.push(a);else if(a){var l=oo(a.type),u=n[l]||{},f=u.handler,d=u.once;if(f&&(!d||!i[l])){var h=f(a,l,o);r.push(h),i[l]=!0}}}),r},kSe=function(t){var n=t&&t.type;return n&&BF[n]?BF[n]:null},DSe=function(t,n){return p2(n).indexOf(t)},ISe=["children","width","height","viewBox","className","style","title","desc"];function zN(){return zN=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},zN.apply(this,arguments)}function LSe(e,t){if(e==null)return{};var n=$Se(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Se(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 VN(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,f=LSe(e,ISe),d=i||{width:n,height:r,x:0,y:0},h=ut("recharts-surface",a);return ie.createElement("svg",zN({},et(f,!0,"svg"),{className:h,width:n,height:r,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),ie.createElement("title",null,l),ie.createElement("desc",null,u),t)}var BSe=["children","className"];function FN(){return FN=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},FN.apply(this,arguments)}function qSe(e,t){if(e==null)return{};var n=zSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Jt=ie.forwardRef(function(e,t){var n=e.children,r=e.className,i=qSe(e,BSe),a=ut("recharts-layer",r);return ie.createElement("g",FN({className:a},et(i,!0),{ref:t}),n)}),so=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]},DO,UF;function VSe(){if(UF)return DO;UF=1;function e(t,n,r){var i=-1,a=t.length;n<0&&(n=-n>a?0:a+n),r=r>a?a:r,r<0&&(r+=a),a=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+n];return o}return DO=e,DO}var IO,HF;function FSe(){if(HF)return IO;HF=1;var e=VSe();function t(n,r,i){var a=n.length;return i=i===void 0?a:i,!r&&i>=a?n:e(n,r,i)}return IO=t,IO}var LO,GF;function USe(){if(GF)return LO;GF=1;function e(t){return t.split("")}return LO=e,LO}var $O,WF;function HSe(){if(WF)return $O;WF=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+u+")",d="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",x=f+"?",w="["+a+"]?",y="(?:"+g+"(?:"+[d,h,m].join("|")+")"+w+x+")*",S=w+x+y,E="(?:"+[d+l+"?",l,h,m,o].join("|")+")",_=RegExp(u+"(?="+u+")|"+E+S,"g");function A(C){return C.match(_)||[]}return $O=A,$O}var BO,KF;function GSe(){if(KF)return BO;KF=1;var e=USe(),t=l2(),n=HSe();function r(i){return t(i)?n(i):e(i)}return BO=r,BO}var qO,YF;function WSe(){if(YF)return qO;YF=1;var e=FSe(),t=l2(),n=GSe(),r=o2();function i(a){return function(o){o=r(o);var l=t(o)?n(o):void 0,u=l?l[0]:o.charAt(0),f=l?e(l,1).join(""):o.slice(1);return u[a]()+f}}return qO=i,qO}var zO,XF;function KSe(){if(XF)return zO;XF=1;var e=WSe(),t=e("toUpperCase");return zO=t,zO}var YSe=KSe();const Cx=yt(YSe);function Bt(e){return function(){return e}}const nZ=Math.cos,Eb=Math.sin,Hi=Math.sqrt,Ab=Math.PI,Tx=2*Ab,UN=Math.PI,HN=2*UN,Il=1e-6,XSe=HN-Il;function rZ(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ZSe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return rZ;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class QSe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?rZ:ZSe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=r-t,f=i-n,d=o-t,h=l-n,m=d*d+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(m>Il)if(!(Math.abs(h*u-f*d)>Il)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let g=r-o,x=i-l,w=u*u+f*f,y=g*g+x*x,S=Math.sqrt(w),E=Math.sqrt(m),_=a*Math.tan((UN-Math.acos((w+m-y)/(2*S*E)))/2),A=_/E,C=_/S;Math.abs(A-1)>Il&&this._append`L${t+A*d},${n+A*h}`,this._append`A${a},${a},0,0,${+(h*g>d*x)},${this._x1=t+C*u},${this._y1=n+C*f}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),u=r*Math.sin(i),f=t+l,d=n+u,h=1^o,m=o?i-a:a-i;this._x1===null?this._append`M${f},${d}`:(Math.abs(this._x1-f)>Il||Math.abs(this._y1-d)>Il)&&this._append`L${f},${d}`,r&&(m<0&&(m=m%HN+HN),m>XSe?this._append`A${r},${r},0,1,${h},${t-l},${n-u}A${r},${r},0,1,${h},${this._x1=f},${this._y1=d}`:m>Il&&this._append`A${r},${r},0,${+(m>=UN)},${h},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function m2(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 QSe(t)}function g2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function iZ(e){this._context=e}iZ.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 Ox(e){return new iZ(e)}function aZ(e){return e[0]}function oZ(e){return e[1]}function sZ(e,t){var n=Bt(!0),r=null,i=Ox,a=null,o=m2(l);e=typeof e=="function"?e:e===void 0?aZ:Bt(e),t=typeof t=="function"?t:t===void 0?oZ:Bt(t);function l(u){var f,d=(u=g2(u)).length,h,m=!1,g;for(r==null&&(a=i(g=o())),f=0;f<=d;++f)!(f<d&&n(h=u[f],f,u))===m&&((m=!m)?a.lineStart():a.lineEnd()),m&&a.point(+e(h,f,u),+t(h,f,u));if(g)return a=null,g+""||null}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:Bt(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:Bt(+u),l):t},l.defined=function(u){return arguments.length?(n=typeof u=="function"?u:Bt(!!u),l):n},l.curve=function(u){return arguments.length?(i=u,r!=null&&(a=i(r)),l):i},l.context=function(u){return arguments.length?(u==null?r=a=null:a=i(r=u),l):r},l}function Qv(e,t,n){var r=null,i=Bt(!0),a=null,o=Ox,l=null,u=m2(f);e=typeof e=="function"?e:e===void 0?aZ:Bt(+e),t=typeof t=="function"?t:Bt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?oZ:Bt(+n);function f(h){var m,g,x,w=(h=g2(h)).length,y,S=!1,E,_=new Array(w),A=new Array(w);for(a==null&&(l=o(E=u())),m=0;m<=w;++m){if(!(m<w&&i(y=h[m],m,h))===S)if(S=!S)g=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),x=m-1;x>=g;--x)l.point(_[x],A[x]);l.lineEnd(),l.areaEnd()}S&&(_[m]=+e(y,m,h),A[m]=+t(y,m,h),l.point(r?+r(y,m,h):_[m],n?+n(y,m,h):A[m]))}if(E)return l=null,E+""||null}function d(){return sZ().defined(i).curve(o).context(a)}return f.x=function(h){return arguments.length?(e=typeof h=="function"?h:Bt(+h),r=null,f):e},f.x0=function(h){return arguments.length?(e=typeof h=="function"?h:Bt(+h),f):e},f.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:Bt(+h),f):r},f.y=function(h){return arguments.length?(t=typeof h=="function"?h:Bt(+h),n=null,f):t},f.y0=function(h){return arguments.length?(t=typeof h=="function"?h:Bt(+h),f):t},f.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:Bt(+h),f):n},f.lineX0=f.lineY0=function(){return d().x(e).y(t)},f.lineY1=function(){return d().x(e).y(n)},f.lineX1=function(){return d().x(r).y(t)},f.defined=function(h){return arguments.length?(i=typeof h=="function"?h:Bt(!!h),f):i},f.curve=function(h){return arguments.length?(o=h,a!=null&&(l=o(a)),f):o},f.context=function(h){return arguments.length?(h==null?a=l=null:l=o(a=h),f):a},f}class lZ{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 JSe(e){return new lZ(e,!0)}function e_e(e){return new lZ(e,!1)}const v2={draw(e,t){const n=Hi(t/Ab);e.moveTo(n,0),e.arc(0,0,n,0,Tx)}},t_e={draw(e,t){const n=Hi(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()}},uZ=Hi(1/3),n_e=uZ*2,r_e={draw(e,t){const n=Hi(t/n_e),r=n*uZ;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},i_e={draw(e,t){const n=Hi(t),r=-n/2;e.rect(r,r,n,n)}},a_e=.8908130915292852,cZ=Eb(Ab/10)/Eb(7*Ab/10),o_e=Eb(Tx/10)*cZ,s_e=-nZ(Tx/10)*cZ,l_e={draw(e,t){const n=Hi(t*a_e),r=o_e*n,i=s_e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=Tx*a/5,l=nZ(o),u=Eb(o);e.lineTo(u*n,-l*n),e.lineTo(l*r-u*i,u*r+l*i)}e.closePath()}},VO=Hi(3),u_e={draw(e,t){const n=-Hi(t/(VO*3));e.moveTo(0,n*2),e.lineTo(-VO*n,-n),e.lineTo(VO*n,-n),e.closePath()}},ei=-.5,ti=Hi(3)/2,GN=1/Hi(12),c_e=(GN/2+1)*3,f_e={draw(e,t){const n=Hi(t/c_e),r=n/2,i=n*GN,a=r,o=n*GN+n,l=-a,u=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(ei*r-ti*i,ti*r+ei*i),e.lineTo(ei*a-ti*o,ti*a+ei*o),e.lineTo(ei*l-ti*u,ti*l+ei*u),e.lineTo(ei*r+ti*i,ei*i-ti*r),e.lineTo(ei*a+ti*o,ei*o-ti*a),e.lineTo(ei*l+ti*u,ei*u-ti*l),e.closePath()}};function d_e(e,t){let n=null,r=m2(i);e=typeof e=="function"?e:Bt(e||v2),t=typeof t=="function"?t:Bt(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Bt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Bt(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function Cb(){}function Tb(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 fZ(e){this._context=e}fZ.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:Tb(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:Tb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function h_e(e){return new fZ(e)}function dZ(e){this._context=e}dZ.prototype={areaStart:Cb,areaEnd:Cb,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:Tb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function p_e(e){return new dZ(e)}function hZ(e){this._context=e}hZ.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:Tb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function m_e(e){return new hZ(e)}function pZ(e){this._context=e}pZ.prototype={areaStart:Cb,areaEnd:Cb,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 g_e(e){return new pZ(e)}function ZF(e){return e<0?-1:1}function QF(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(ZF(a)+ZF(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function JF(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function FO(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-r)/3;e._context.bezierCurveTo(r+l,i+l*t,a-l,o-l*n,a,o)}function Ob(e){this._context=e}Ob.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:FO(this,this._t0,JF(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,FO(this,JF(this,n=QF(this,e,t)),n);break;default:FO(this,this._t0,n=QF(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function mZ(e){this._context=new gZ(e)}(mZ.prototype=Object.create(Ob.prototype)).point=function(e,t){Ob.prototype.point.call(this,t,e)};function gZ(e){this._context=e}gZ.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function v_e(e){return new Ob(e)}function y_e(e){return new mZ(e)}function vZ(e){this._context=e}vZ.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=eU(e),i=eU(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(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 eU(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function b_e(e){return new vZ(e)}function jx(e,t){this._context=e,this._t=t}jx.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 x_e(e){return new jx(e,.5)}function w_e(e){return new jx(e,0)}function S_e(e){return new jx(e,1)}function $f(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,l=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<l;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function WN(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function __e(e,t){return e[t]}function E_e(e){const t=[];return t.key=e,t}function A_e(){var e=Bt([]),t=WN,n=$f,r=__e;function i(a){var o=Array.from(e.apply(this,arguments),E_e),l,u=o.length,f=-1,d;for(const h of a)for(l=0,++f;l<u;++l)(o[l][f]=[0,+r(h,o[l].key,f,a)]).data=h;for(l=0,d=g2(t(o));l<u;++l)o[d[l]].index=l;return n(o,d),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Bt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:Bt(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?WN:typeof a=="function"?a:Bt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??$f,i):n},i}function C_e(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}$f(e,t)}}function T_e(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,l=0;o<i;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}$f(e,t)}}function O_e(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var l=0,u=0,f=0;l<o;++l){for(var d=e[t[l]],h=d[r][1]||0,m=d[r-1][1]||0,g=(h-m)/2,x=0;x<l;++x){var w=e[t[x]],y=w[r][1]||0,S=w[r-1][1]||0;g+=y-S}u+=h,f+=g*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=f/u)}i[r-1][1]+=i[r-1][0]=n,$f(e,t)}}function zp(e){"@babel/helpers - typeof";return zp=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},zp(e)}var j_e=["type","size","sizeType"];function KN(){return KN=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},KN.apply(this,arguments)}function tU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tU(Object(n),!0).forEach(function(r){N_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N_e(e,t,n){return t=P_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P_e(e){var t=M_e(e,"string");return zp(t)=="symbol"?t:t+""}function M_e(e,t){if(zp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function R_e(e,t){if(e==null)return{};var n=k_e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function k_e(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 yZ={symbolCircle:v2,symbolCross:t_e,symbolDiamond:r_e,symbolSquare:i_e,symbolStar:l_e,symbolTriangle:u_e,symbolWye:f_e},D_e=Math.PI/180,I_e=function(t){var n="symbol".concat(Cx(t));return yZ[n]||v2},L_e=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 i=18*D_e;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},$_e=function(t,n){yZ["symbol".concat(Cx(t))]=n},y2=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,u=R_e(t,j_e),f=nU(nU({},u),{},{type:r,size:a,sizeType:l}),d=function(){var y=I_e(r),S=d_e().type(y).size(L_e(a,l,r));return S()},h=f.className,m=f.cx,g=f.cy,x=et(f,!0);return m===+m&&g===+g&&a===+a?ie.createElement("path",KN({},x,{className:ut("recharts-symbols",h),transform:"translate(".concat(m,", ").concat(g,")"),d:d()})):null};y2.registerSymbol=$_e;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 YN(){return YN=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},YN.apply(this,arguments)}function rU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function B_e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rU(Object(n),!0).forEach(function(r){Vp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z_e(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,xZ(r.key),r)}}function V_e(e,t,n){return t&&z_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function F_e(e,t,n){return t=jb(t),U_e(e,bZ()?Reflect.construct(t,n||[],jb(e).constructor):t.apply(e,n))}function U_e(e,t){if(t&&(Bf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return H_e(e)}function H_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bZ=function(){return!!e})()}function jb(e){return jb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jb(e)}function G_e(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&&XN(e,t)}function XN(e,t){return XN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},XN(e,t)}function Vp(e,t,n){return t=xZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xZ(e){var t=W_e(e,"string");return Bf(t)=="symbol"?t:t+""}function W_e(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 String(e)}var ni=32,b2=(function(e){function t(){return q_e(this,t),F_e(this,t,arguments)}return G_e(t,e),V_e(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=ni/2,o=ni/6,l=ni/3,u=r.inactive?i:r.color;if(r.type==="plainline")return ie.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:ni,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return ie.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(a,"h").concat(l,`
|
|
386
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(a,`
|
|
387
|
+
H`).concat(ni,"M").concat(2*l,",").concat(a,`
|
|
388
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return ie.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(ni/8,"h").concat(ni,"v").concat(ni*3/4,"h").concat(-ni,"z"),className:"recharts-legend-icon"});if(ie.isValidElement(r.legendIcon)){var f=B_e({},r);return delete f.legendIcon,ie.cloneElement(r.legendIcon,f)}return ie.createElement(y2,{fill:u,cx:a,cy:a,size:ni,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,o=i.iconSize,l=i.layout,u=i.formatter,f=i.inactiveColor,d={x:0,y:0,width:ni,height:ni},h={display:l==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(g,x){var w=g.formatter||u,y=ut(Vp(Vp({"recharts-legend-item":!0},"legend-item-".concat(x),!0),"inactive",g.inactive));if(g.type==="none")return null;var S=Xe(g.value)?null:g.value;so(!Xe(g.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=g.inactive?f:g.color;return ie.createElement("li",YN({className:y,style:h,key:"legend-item-".concat(x)},_b(r.props,g,x)),ie.createElement(VN,{width:o,height:o,viewBox:d,style:m},r.renderIcon(g)),ie.createElement("span",{className:"recharts-legend-item-text",style:{color:E}},w?w(S,g,x):S))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return ie.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(j.PureComponent);Vp(b2,"displayName","Legend");Vp(b2,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var UO,iU;function K_e(){if(iU)return UO;iU=1;var e=mi(),t=uX();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return UO=n,UO}var Y_e=K_e();const aU=yt(Y_e);function wZ(e,t,n){return t===!0?aU(e,n):Xe(t)?aU(e,t):e}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)}var X_e=["ref"];function oU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oU(Object(n),!0).forEach(function(r){Nx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Z_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sU(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,_Z(r.key),r)}}function Q_e(e,t,n){return t&&sU(e.prototype,t),n&&sU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function J_e(e,t,n){return t=Nb(t),eEe(e,SZ()?Reflect.construct(t,n||[],Nb(e).constructor):t.apply(e,n))}function eEe(e,t){if(t&&(qf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tEe(e)}function tEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SZ=function(){return!!e})()}function Nb(e){return Nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nb(e)}function nEe(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&&ZN(e,t)}function ZN(e,t){return ZN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ZN(e,t)}function Nx(e,t,n){return t=_Z(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Z(e){var t=rEe(e,"string");return qf(t)=="symbol"?t:t+""}function rEe(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)}function iEe(e,t){if(e==null)return{};var n=aEe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aEe(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 oEe(e){return e.value}function sEe(e,t){if(ie.isValidElement(e))return ie.cloneElement(e,t);if(typeof e=="function")return ie.createElement(e,t);t.ref;var n=iEe(t,X_e);return ie.createElement(b2,n)}var lU=1,$s=(function(e){function t(){var n;Z_e(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=J_e(this,t,[].concat(i)),Nx(n,"lastBoundingBox",{width:-1,height:-1}),n}return nEe(t,e),Q_e(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,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>lU||Math.abs(i.height-this.lastBoundingBox.height)>lU)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(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?Ha({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,u=i.margin,f=i.chartWidth,d=i.chartHeight,h,m;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var g=this.getBBoxSnapshot();h={left:((f||0)-g.width)/2}}else h=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var x=this.getBBoxSnapshot();m={top:((d||0)-x.height)/2}}else m=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Ha(Ha({},h),m)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,l=i.height,u=i.wrapperStyle,f=i.payloadUniqBy,d=i.payload,h=Ha(Ha({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return ie.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(g){r.wrapperNode=g}},sEe(a,Ha(Ha({},this.props),{},{payload:wZ(d,f,oEe)})))}}],[{key:"getWithHeight",value:function(r,i){var a=Ha(Ha({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&Se(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])})(j.PureComponent);Nx($s,"displayName","Legend");Nx($s,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var lEe=PX();const x2=yt(lEe);function Fp(e){"@babel/helpers - typeof";return Fp=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},Fp(e)}function QN(){return QN=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},QN.apply(this,arguments)}function uEe(e,t){return hEe(e)||dEe(e,t)||fEe(e,t)||cEe()}function cEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
389
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fEe(e,t){if(e){if(typeof e=="string")return uU(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 uU(e,t)}}function uU(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 dEe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function hEe(e){if(Array.isArray(e))return e}function cU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cU(Object(n),!0).forEach(function(r){pEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pEe(e,t,n){return t=mEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mEe(e){var t=gEe(e,"string");return Fp(t)=="symbol"?t:t+""}function gEe(e,t){if(Fp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vEe(e){return Array.isArray(e)&&Cn(e[0])&&Cn(e[1])?e.join(" ~ "):e}var yEe=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,u=t.labelStyle,f=u===void 0?{}:u,d=t.payload,h=t.formatter,m=t.itemSorter,g=t.wrapperClassName,x=t.labelClassName,w=t.label,y=t.labelFormatter,S=t.accessibilityLayer,E=S===void 0?!1:S,_=function(){if(d&&d.length){var k={padding:0,margin:0},V=(m?x2(d,m):d).map(function(D,q){if(D.type==="none")return null;var L=HO({display:"block",paddingTop:4,paddingBottom:4,color:D.color||"#000"},l),z=D.formatter||h||vEe,H=D.value,Y=D.name,Z=H,U=Y;if(z&&Z!=null&&U!=null){var F=z(H,Y,D,q,d);if(Array.isArray(F)){var X=uEe(F,2);Z=X[0],U=X[1]}else Z=F}return ie.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(q),style:L},Cn(U)?ie.createElement("span",{className:"recharts-tooltip-item-name"},U):null,Cn(U)?ie.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,ie.createElement("span",{className:"recharts-tooltip-item-value"},Z),ie.createElement("span",{className:"recharts-tooltip-item-unit"},D.unit||""))});return ie.createElement("ul",{className:"recharts-tooltip-item-list",style:k},V)}return null},A=HO({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),C=HO({margin:0},f),O=!ot(w),P=O?w:"",M=ut("recharts-default-tooltip",g),R=ut("recharts-tooltip-label",x);O&&y&&d!==void 0&&d!==null&&(P=y(w,d));var $=E?{role:"status","aria-live":"assertive"}:{};return ie.createElement("div",QN({className:M,style:A},$),ie.createElement("p",{className:R,style:C},ie.isValidElement(P)?P:"".concat(P)),_())};function Up(e){"@babel/helpers - typeof";return Up=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},Up(e)}function Jv(e,t,n){return t=bEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bEe(e){var t=xEe(e,"string");return Up(t)=="symbol"?t:t+""}function xEe(e,t){if(Up(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Up(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qh="recharts-tooltip-wrapper",wEe={visibility:"hidden"};function SEe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ut(qh,Jv(Jv(Jv(Jv({},"".concat(qh,"-right"),Se(n)&&t&&Se(t.x)&&n>=t.x),"".concat(qh,"-left"),Se(n)&&t&&Se(t.x)&&n<t.x),"".concat(qh,"-bottom"),Se(r)&&t&&Se(t.y)&&r>=t.y),"".concat(qh,"-top"),Se(r)&&t&&Se(t.y)&&r<t.y))}function fU(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,f=e.viewBoxDimension;if(a&&Se(a[r]))return a[r];var d=n[r]-l-i,h=n[r]+i;if(t[r])return o[r]?d:h;if(o[r]){var m=d,g=u[r];return m<g?Math.max(h,u[r]):Math.max(d,u[r])}var x=h+l,w=u[r]+f;return x>w?Math.max(d,u[r]):Math.max(h,u[r])}function _Ee(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 EEe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,f,d,h;return o.height>0&&o.width>0&&n?(d=fU({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),h=fU({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),f=_Ee({translateX:d,translateY:h,useTranslate3d:l})):f=wEe,{cssProperties:f,cssClasses:SEe({translateX:d,translateY:h,coordinate:n})}}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 dU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dU(Object(n),!0).forEach(function(r){eP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CEe(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,AZ(r.key),r)}}function TEe(e,t,n){return t&&CEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function OEe(e,t,n){return t=Pb(t),jEe(e,EZ()?Reflect.construct(t,n||[],Pb(e).constructor):t.apply(e,n))}function jEe(e,t){if(t&&(zf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NEe(e)}function NEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EZ=function(){return!!e})()}function Pb(e){return Pb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pb(e)}function PEe(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&&JN(e,t)}function JN(e,t){return JN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},JN(e,t)}function eP(e,t,n){return t=AZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AZ(e){var t=MEe(e,"string");return zf(t)=="symbol"?t:t+""}function MEe(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 String(e)}var pU=1,REe=(function(e){function t(){var n;AEe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=OEe(this,t,[].concat(i)),eP(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),eP(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,u,f,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(u=n.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&l!==void 0?l:0,y:(f=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&f!==void 0?f:0}})}}),n}return PEe(t,e),TEe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>pU||Math.abs(r.height-this.state.lastBoundingBox.height)>pU)&&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,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,f=i.children,d=i.coordinate,h=i.hasPayload,m=i.isAnimationActive,g=i.offset,x=i.position,w=i.reverseDirection,y=i.useTranslate3d,S=i.viewBox,E=i.wrapperStyle,_=EEe({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:g,position:x,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:S}),A=_.cssClasses,C=_.cssProperties,O=hU(hU({transition:m&&a?"transform ".concat(l,"ms ").concat(u):void 0},C),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},E);return ie.createElement("div",{tabIndex:-1,className:A,style:O,ref:function(M){r.wrapperNode=M}},f)}}])})(j.PureComponent),kEe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Td={isSsr:kEe()};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 mU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mU(Object(n),!0).forEach(function(r){w2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IEe(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,TZ(r.key),r)}}function LEe(e,t,n){return t&&IEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Ee(e,t,n){return t=Mb(t),BEe(e,CZ()?Reflect.construct(t,n||[],Mb(e).constructor):t.apply(e,n))}function BEe(e,t){if(t&&(Vf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qEe(e)}function qEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CZ=function(){return!!e})()}function Mb(e){return Mb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mb(e)}function zEe(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&&tP(e,t)}function tP(e,t){return tP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tP(e,t)}function w2(e,t,n){return t=TZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TZ(e){var t=VEe(e,"string");return Vf(t)=="symbol"?t:t+""}function VEe(e,t){if(Vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function FEe(e){return e.dataKey}function UEe(e,t){return ie.isValidElement(e)?ie.cloneElement(e,t):typeof e=="function"?ie.createElement(e,t):ie.createElement(yEe,t)}var Oi=(function(e){function t(){return DEe(this,t),$Ee(this,t,arguments)}return zEe(t,e),LEe(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,f=i.content,d=i.coordinate,h=i.filterNull,m=i.isAnimationActive,g=i.offset,x=i.payload,w=i.payloadUniqBy,y=i.position,S=i.reverseDirection,E=i.useTranslate3d,_=i.viewBox,A=i.wrapperStyle,C=x??[];h&&C.length&&(C=wZ(x.filter(function(P){return P.value!=null&&(P.hide!==!0||r.props.includeHidden)}),w,FEe));var O=C.length>0;return ie.createElement(REe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:m,active:a,coordinate:d,hasPayload:O,offset:g,position:y,reverseDirection:S,useTranslate3d:E,viewBox:_,wrapperStyle:A},UEe(f,gU(gU({},this.props),{},{payload:C})))}}])})(j.PureComponent);w2(Oi,"displayName","Tooltip");w2(Oi,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Td.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 GO,vU;function HEe(){if(vU)return GO;vU=1;var e=lr(),t=jX(),n=vX(),r="Expected a function",i=Math.max,a=Math.min;function o(l,u,f){var d,h,m,g,x,w,y=0,S=!1,E=!1,_=!0;if(typeof l!="function")throw new TypeError(r);u=n(u)||0,e(f)&&(S=!!f.leading,E="maxWait"in f,m=E?i(n(f.maxWait)||0,u):m,_="trailing"in f?!!f.trailing:_);function A(V){var D=d,q=h;return d=h=void 0,y=V,g=l.apply(q,D),g}function C(V){return y=V,x=setTimeout(M,u),S?A(V):g}function O(V){var D=V-w,q=V-y,L=u-D;return E?a(L,m-q):L}function P(V){var D=V-w,q=V-y;return w===void 0||D>=u||D<0||E&&q>=m}function M(){var V=t();if(P(V))return R(V);x=setTimeout(M,O(V))}function R(V){return x=void 0,_&&d?A(V):(d=h=void 0,g)}function $(){x!==void 0&&clearTimeout(x),y=0,d=w=h=x=void 0}function I(){return x===void 0?g:R(t())}function k(){var V=t(),D=P(V);if(d=arguments,h=this,w=V,D){if(x===void 0)return C(w);if(E)return clearTimeout(x),x=setTimeout(M,u),A(w)}return x===void 0&&(x=setTimeout(M,u)),g}return k.cancel=$,k.flush=I,k}return GO=o,GO}var WO,yU;function GEe(){if(yU)return WO;yU=1;var e=HEe(),t=lr(),n="Expected a function";function r(i,a,o){var l=!0,u=!0;if(typeof i!="function")throw new TypeError(n);return t(o)&&(l="leading"in o?!!o.leading:l,u="trailing"in o?!!o.trailing:u),e(i,a,{leading:l,maxWait:a,trailing:u})}return WO=r,WO}var WEe=GEe();const OZ=yt(WEe);function Hp(e){"@babel/helpers - typeof";return Hp=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},Hp(e)}function bU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ey(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bU(Object(n),!0).forEach(function(r){KEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KEe(e,t,n){return t=YEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YEe(e){var t=XEe(e,"string");return Hp(t)=="symbol"?t:t+""}function XEe(e,t){if(Hp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZEe(e,t){return tAe(e)||eAe(e,t)||JEe(e,t)||QEe()}function QEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
390
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JEe(e,t){if(e){if(typeof e=="string")return xU(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 xU(e,t)}}function xU(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 eAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function tAe(e){if(Array.isArray(e))return e}var nAe=j.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?"100%":a,l=e.height,u=l===void 0?"100%":l,f=e.minWidth,d=f===void 0?0:f,h=e.minHeight,m=e.maxHeight,g=e.children,x=e.debounce,w=x===void 0?0:x,y=e.id,S=e.className,E=e.onResize,_=e.style,A=_===void 0?{}:_,C=j.useRef(null),O=j.useRef();O.current=E,j.useImperativeHandle(t,function(){return Object.defineProperty(C.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),C.current},configurable:!0})});var P=j.useState({containerWidth:i.width,containerHeight:i.height}),M=ZEe(P,2),R=M[0],$=M[1],I=j.useCallback(function(V,D){$(function(q){var L=Math.round(V),z=Math.round(D);return q.containerWidth===L&&q.containerHeight===z?q:{containerWidth:L,containerHeight:z}})},[]);j.useEffect(function(){var V=function(Y){var Z,U=Y[0].contentRect,F=U.width,X=U.height;I(F,X),(Z=O.current)===null||Z===void 0||Z.call(O,F,X)};w>0&&(V=OZ(V,w,{trailing:!0,leading:!1}));var D=new ResizeObserver(V),q=C.current.getBoundingClientRect(),L=q.width,z=q.height;return I(L,z),D.observe(C.current),function(){D.disconnect()}},[I,w]);var k=j.useMemo(function(){var V=R.containerWidth,D=R.containerHeight;if(V<0||D<0)return null;so(Fl(o)||Fl(u),`The width(%s) and height(%s) are both fixed numbers,
|
|
391
|
+
maybe you don't need to use a ResponsiveContainer.`,o,u),so(!n||n>0,"The aspect(%s) must be greater than zero.",n);var q=Fl(o)?V:o,L=Fl(u)?D:u;n&&n>0&&(q?L=q/n:L&&(q=L*n),m&&L>m&&(L=m)),so(q>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
392
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
393
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
394
|
+
height and width.`,q,L,o,u,d,h,n);var z=!Array.isArray(g)&&oo(g.type).endsWith("Chart");return ie.Children.map(g,function(H){return ie.isValidElement(H)?j.cloneElement(H,ey({width:q,height:L},z?{style:ey({height:"100%",width:"100%",maxHeight:L,maxWidth:q},H.props.style)}:{})):H})},[n,g,u,m,h,d,R,o]);return ie.createElement("div",{id:y?"".concat(y):void 0,className:ut("recharts-responsive-container",S),style:ey(ey({},A),{},{width:o,height:u,minWidth:d,minHeight:h,maxHeight:m}),ref:C},k)}),jZ=function(t){return null};jZ.displayName="Cell";function Gp(e){"@babel/helpers - typeof";return Gp=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},Gp(e)}function wU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wU(Object(n),!0).forEach(function(r){rAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rAe(e,t,n){return t=iAe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iAe(e){var t=aAe(e,"string");return Gp(t)=="symbol"?t:t+""}function aAe(e,t){if(Gp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rc={widthCache:{},cacheCount:0},oAe=2e3,sAe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},SU="recharts_measurement_span";function lAe(e){var t=nP({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var up=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Td.isSsr)return{width:0,height:0};var r=lAe(n),i=JSON.stringify({text:t,copyStyle:r});if(Rc.widthCache[i])return Rc.widthCache[i];try{var a=document.getElementById(SU);a||(a=document.createElement("span"),a.setAttribute("id",SU),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=nP(nP({},sAe),r);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return Rc.widthCache[i]=u,++Rc.cacheCount>oAe&&(Rc.cacheCount=0,Rc.widthCache={}),u}catch{return{width:0,height:0}}},uAe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Wp(e){"@babel/helpers - typeof";return Wp=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},Wp(e)}function Rb(e,t){return hAe(e)||dAe(e,t)||fAe(e,t)||cAe()}function cAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
395
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fAe(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 _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 dAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function hAe(e){if(Array.isArray(e))return e}function pAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EU(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,gAe(r.key),r)}}function mAe(e,t,n){return t&&EU(e.prototype,t),n&&EU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gAe(e){var t=vAe(e,"string");return Wp(t)=="symbol"?t:t+""}function vAe(e,t){if(Wp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var AU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,CU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,yAe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,bAe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,NZ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},xAe=Object.keys(NZ),Uc="NaN";function wAe(e,t){return e*NZ[t]}var ty=(function(){function e(t,n){pAe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!yAe.test(n)&&(this.num=NaN,this.unit=""),xAe.includes(n)&&(this.num=wAe(t,n),this.unit="px")}return mAe(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,i=(r=bAe.exec(n))!==null&&r!==void 0?r:[],a=Rb(i,3),o=a[1],l=a[2];return new e(parseFloat(o),l??"")}}])})();function PZ(e){if(e.includes(Uc))return Uc;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=AU.exec(t))!==null&&n!==void 0?n:[],i=Rb(r,4),a=i[1],o=i[2],l=i[3],u=ty.parse(a??""),f=ty.parse(l??""),d=o==="*"?u.multiply(f):u.divide(f);if(d.isNaN())return Uc;t=t.replace(AU,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,m=(h=CU.exec(t))!==null&&h!==void 0?h:[],g=Rb(m,4),x=g[1],w=g[2],y=g[3],S=ty.parse(x??""),E=ty.parse(y??""),_=w==="+"?S.add(E):S.subtract(E);if(_.isNaN())return Uc;t=t.replace(CU,_.toString())}return t}var TU=/\(([^()]*)\)/;function SAe(e){for(var t=e;t.includes("(");){var n=TU.exec(t),r=Rb(n,2),i=r[1];t=t.replace(TU,PZ(i))}return t}function _Ae(e){var t=e.replace(/\s+/g,"");return t=SAe(t),t=PZ(t),t}function EAe(e){try{return _Ae(e)}catch{return Uc}}function KO(e){var t=EAe(e.slice(5,-1));return t===Uc?"":t}var AAe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],CAe=["dx","dy","angle","className","breakAll"];function rP(){return rP=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},rP.apply(this,arguments)}function OU(e,t){if(e==null)return{};var n=TAe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TAe(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 jU(e,t){return PAe(e)||NAe(e,t)||jAe(e,t)||OAe()}function OAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
396
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jAe(e,t){if(e){if(typeof e=="string")return NU(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 NU(e,t)}}function NU(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 NAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function PAe(e){if(Array.isArray(e))return e}var MZ=/[ \f\n\r\t\v\u2028\u2029]+/,RZ=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];ot(n)||(r?a=n.toString().split(""):a=n.toString().split(MZ));var o=a.map(function(u){return{word:u,width:up(u,i).width}}),l=r?0:up(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},MAe=function(t,n,r,i,a){var o=t.maxLines,l=t.children,u=t.style,f=t.breakAll,d=Se(o),h=l,m=function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return q.reduce(function(L,z){var H=z.word,Y=z.width,Z=L[L.length-1];if(Z&&(i==null||a||Z.width+Y+r<Number(i)))Z.words.push(H),Z.width+=Y+r;else{var U={words:[H],width:Y};L.push(U)}return L},[])},g=m(n),x=function(q){return q.reduce(function(L,z){return L.width>z.width?L:z})};if(!d)return g;for(var w="…",y=function(q){var L=h.slice(0,q),z=RZ({breakAll:f,style:u,children:L+w}).wordsWithComputedWidth,H=m(z),Y=H.length>o||x(H).width>Number(i);return[Y,H]},S=0,E=h.length-1,_=0,A;S<=E&&_<=h.length-1;){var C=Math.floor((S+E)/2),O=C-1,P=y(O),M=jU(P,2),R=M[0],$=M[1],I=y(C),k=jU(I,1),V=k[0];if(!R&&!V&&(S=C+1),R&&V&&(E=C-1),!R&&V){A=$;break}_++}return A||g},PU=function(t){var n=ot(t)?[]:t.toString().split(MZ);return[{words:n}]},RAe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((n||r)&&!Td.isSsr){var u,f,d=RZ({breakAll:o,children:i,style:a});if(d){var h=d.wordsWithComputedWidth,m=d.spaceWidth;u=h,f=m}else return PU(i);return MAe({breakAll:o,children:i,maxLines:l,style:a},u,f,n,r)}return PU(i)},MU="#808080",kb=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,u=t.capHeight,f=u===void 0?"0.71em":u,d=t.scaleToFit,h=d===void 0?!1:d,m=t.textAnchor,g=m===void 0?"start":m,x=t.verticalAnchor,w=x===void 0?"end":x,y=t.fill,S=y===void 0?MU:y,E=OU(t,AAe),_=j.useMemo(function(){return RAe({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]),A=E.dx,C=E.dy,O=E.angle,P=E.className,M=E.breakAll,R=OU(E,CAe);if(!Cn(r)||!Cn(a))return null;var $=r+(Se(A)?A:0),I=a+(Se(C)?C:0),k;switch(w){case"start":k=KO("calc(".concat(f,")"));break;case"middle":k=KO("calc(".concat((_.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:k=KO("calc(".concat(_.length-1," * -").concat(l,")"));break}var V=[];if(h){var D=_[0].width,q=E.width;V.push("scale(".concat((Se(q)?q/D:1)/D,")"))}return O&&V.push("rotate(".concat(O,", ").concat($,", ").concat(I,")")),V.length&&(R.transform=V.join(" ")),ie.createElement("text",rP({},et(R,!0),{x:$,y:I,className:ut("recharts-text",P),textAnchor:g,fill:S.includes("url")?MU:S}),_.map(function(L,z){var H=L.words.join(M?"":" ");return ie.createElement("tspan",{x:$,dy:z===0?k:l,key:"".concat(H,"-").concat(z)},H)}))};function Bs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function kAe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function S2(e){let t,n,r;e.length!==2?(t=Bs,n=(l,u)=>Bs(e(l),u),r=(l,u)=>e(l)-u):(t=e===Bs||e===kAe?e:DAe,n=e,r=e);function i(l,u,f=0,d=l.length){if(f<d){if(t(u,u)!==0)return d;do{const h=f+d>>>1;n(l[h],u)<0?f=h+1:d=h}while(f<d)}return f}function a(l,u,f=0,d=l.length){if(f<d){if(t(u,u)!==0)return d;do{const h=f+d>>>1;n(l[h],u)<=0?f=h+1:d=h}while(f<d)}return f}function o(l,u,f=0,d=l.length){const h=i(l,u,f,d-1);return h>f&&r(l[h-1],u)>-r(l[h],u)?h-1:h}return{left:i,center:o,right:a}}function DAe(){return 0}function kZ(e){return e===null?NaN:+e}function*IAe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const LAe=S2(Bs),Jm=LAe.right;S2(kZ).center;class RU extends Map{constructor(t,n=qAe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(kU(this,t))}has(t){return super.has(kU(this,t))}set(t,n){return super.set($Ae(this,t),n)}delete(t){return super.delete(BAe(this,t))}}function kU({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function $Ae({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function BAe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function qAe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function zAe(e=Bs){if(e===Bs)return DZ;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 DZ(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const VAe=Math.sqrt(50),FAe=Math.sqrt(10),UAe=Math.sqrt(2);function Db(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=VAe?10:a>=FAe?5:a>=UAe?2:1;let l,u,f;return i<0?(f=Math.pow(10,-i)/o,l=Math.round(e*f),u=Math.round(t*f),l/f<e&&++l,u/f>t&&--u,f=-f):(f=Math.pow(10,i)*o,l=Math.round(e/f),u=Math.round(t/f),l*f<e&&++l,u*f>t&&--u),u<l&&.5<=n&&n<2?Db(e,t,n*2):[l,u,f]}function iP(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Db(t,e,n):Db(e,t,n);if(!(a>=i))return[];const l=a-i+1,u=new Array(l);if(r)if(o<0)for(let f=0;f<l;++f)u[f]=(a-f)/-o;else for(let f=0;f<l;++f)u[f]=(a-f)*o;else if(o<0)for(let f=0;f<l;++f)u[f]=(i+f)/-o;else for(let f=0;f<l;++f)u[f]=(i+f)*o;return u}function aP(e,t,n){return t=+t,e=+e,n=+n,Db(e,t,n)[2]}function oP(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?aP(t,e,n):aP(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function DU(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function IU(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function IZ(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?DZ:zAe(i);r>n;){if(r-n>600){const u=r-n+1,f=t-n+1,d=Math.log(u),h=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*h*(u-h)/u)*(f-u/2<0?-1:1),g=Math.max(n,Math.floor(t-f*h/u+m)),x=Math.min(r,Math.floor(t+(u-f)*h/u+m));IZ(e,t,g,x,i)}const a=e[t];let o=n,l=r;for(zh(e,n,t),i(e[r],a)>0&&zh(e,n,r);o<l;){for(zh(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[n],a)===0?zh(e,n,l):(++l,zh(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function zh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function HAe(e,t,n){if(e=Float64Array.from(IAe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return IU(e);if(t>=1)return DU(e);var r,i=(r-1)*t,a=Math.floor(i),o=DU(IZ(e,a).subarray(0,a+1)),l=IU(e.subarray(a+1));return o+(l-o)*(i-a)}}function GAe(e,t,n=kZ){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),l=+n(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function WAe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function vi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Eo(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 sP=Symbol("implicit");function _2(){var e=new RU,t=[],n=[],r=sP;function i(a){let o=e.get(a);if(o===void 0){if(r!==sP)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new RU;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return _2(t,n).unknown(r)},vi.apply(i,arguments),i}function Kp(){var e=_2().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,l=!1,u=0,f=0,d=.5;delete e.unknown;function h(){var m=t().length,g=i<r,x=g?i:r,w=g?r:i;a=(w-x)/Math.max(1,m-u+f*2),l&&(a=Math.floor(a)),x+=(w-x-a*(m-u))*d,o=a*(1-u),l&&(x=Math.round(x),o=Math.round(o));var y=WAe(m).map(function(S){return x+a*S});return n(g?y.reverse():y)}return e.domain=function(m){return arguments.length?(t(m),h()):t()},e.range=function(m){return arguments.length?([r,i]=m,r=+r,i=+i,h()):[r,i]},e.rangeRound=function(m){return[r,i]=m,r=+r,i=+i,l=!0,h()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(m){return arguments.length?(l=!!m,h()):l},e.padding=function(m){return arguments.length?(u=Math.min(1,f=+m),h()):u},e.paddingInner=function(m){return arguments.length?(u=Math.min(1,m),h()):u},e.paddingOuter=function(m){return arguments.length?(f=+m,h()):f},e.align=function(m){return arguments.length?(d=Math.max(0,Math.min(1,m)),h()):d},e.copy=function(){return Kp(t(),[r,i]).round(l).paddingInner(u).paddingOuter(f).align(d)},vi.apply(h(),arguments)}function LZ(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return LZ(t())},e}function cp(){return LZ(Kp.apply(null,arguments).paddingInner(1))}function KAe(e){return function(){return e}}function Ib(e){return+e}var LU=[0,1];function rr(e){return e}function lP(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:KAe(isNaN(t)?NaN:.5)}function YAe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function XAe(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=lP(i,r),a=n(o,a)):(r=lP(r,i),a=n(a,o)),function(l){return a(r(l))}}function ZAe(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=lP(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(l){var u=Jm(e,l,1,r)-1;return a[u](i[u](l))}}function eg(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Px(){var e=LU,t=LU,n=ao,r,i,a,o=rr,l,u,f;function d(){var m=Math.min(e.length,t.length);return o!==rr&&(o=YAe(e[0],e[m-1])),l=m>2?ZAe:XAe,u=f=null,h}function h(m){return m==null||isNaN(m=+m)?a:(u||(u=l(e.map(r),t,n)))(r(o(m)))}return h.invert=function(m){return o(i((f||(f=l(t,e.map(r),Ni)))(m)))},h.domain=function(m){return arguments.length?(e=Array.from(m,Ib),d()):e.slice()},h.range=function(m){return arguments.length?(t=Array.from(m),d()):t.slice()},h.rangeRound=function(m){return t=Array.from(m),n=jR,d()},h.clamp=function(m){return arguments.length?(o=m?!0:rr,d()):o!==rr},h.interpolate=function(m){return arguments.length?(n=m,d()):n},h.unknown=function(m){return arguments.length?(a=m,h):a},function(m,g){return r=m,i=g,d()}}function E2(){return Px()(rr,rr)}function QAe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Lb(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 Ff(e){return e=Lb(Math.abs(e)),e?e[1]:NaN}function JAe(e,t){return function(n,r){for(var i=n.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(n.substring(i-=l,i+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function eCe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var tCe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yp(e){if(!(t=tCe.exec(e)))throw new Error("invalid format: "+e);var t;return new A2({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]})}Yp.prototype=A2.prototype;function A2(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+""}A2.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 nCe(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var $b;function rCe(e,t){var n=Lb(e,t);if(!n)return $b=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-($b=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Lb(e,Math.max(0,t+a-1))[0]}function $U(e,t){var n=Lb(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const BU={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:QAe,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)=>$U(e*100,t),r:$U,s:rCe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function qU(e){return e}var zU=Array.prototype.map,VU=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function iCe(e){var t=e.grouping===void 0||e.thousands===void 0?qU:JAe(zU.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?qU:eCe(zU.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function f(h,m){h=Yp(h);var g=h.fill,x=h.align,w=h.sign,y=h.symbol,S=h.zero,E=h.width,_=h.comma,A=h.precision,C=h.trim,O=h.type;O==="n"?(_=!0,O="g"):BU[O]||(A===void 0&&(A=12),C=!0,O="g"),(S||g==="0"&&x==="=")&&(S=!0,g="0",x="=");var P=(m&&m.prefix!==void 0?m.prefix:"")+(y==="$"?n:y==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),M=(y==="$"?r:/[%p]/.test(O)?o:"")+(m&&m.suffix!==void 0?m.suffix:""),R=BU[O],$=/[defgprs%]/.test(O);A=A===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function I(k){var V=P,D=M,q,L,z;if(O==="c")D=R(k)+D,k="";else{k=+k;var H=k<0||1/k<0;if(k=isNaN(k)?u:R(Math.abs(k),A),C&&(k=nCe(k)),H&&+k==0&&w!=="+"&&(H=!1),V=(H?w==="("?w:l:w==="-"||w==="("?"":w)+V,D=(O==="s"&&!isNaN(k)&&$b!==void 0?VU[8+$b/3]:"")+D+(H&&w==="("?")":""),$){for(q=-1,L=k.length;++q<L;)if(z=k.charCodeAt(q),48>z||z>57){D=(z===46?i+k.slice(q+1):k.slice(q))+D,k=k.slice(0,q);break}}}_&&!S&&(k=t(k,1/0));var Y=V.length+k.length+D.length,Z=Y<E?new Array(E-Y+1).join(g):"";switch(_&&S&&(k=t(Z+k,Z.length?E-D.length:1/0),Z=""),x){case"<":k=V+k+D+Z;break;case"=":k=V+Z+k+D;break;case"^":k=Z.slice(0,Y=Z.length>>1)+V+k+D+Z.slice(Y);break;default:k=Z+V+k+D;break}return a(k)}return I.toString=function(){return h+""},I}function d(h,m){var g=Math.max(-8,Math.min(8,Math.floor(Ff(m)/3)))*3,x=Math.pow(10,-g),w=f((h=Yp(h),h.type="f",h),{suffix:VU[8+g/3]});return function(y){return w(x*y)}}return{format:f,formatPrefix:d}}var ny,C2,$Z;aCe({thousands:",",grouping:[3],currency:["$",""]});function aCe(e){return ny=iCe(e),C2=ny.format,$Z=ny.formatPrefix,ny}function oCe(e){return Math.max(0,-Ff(Math.abs(e)))}function sCe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ff(t)/3)))*3-Ff(Math.abs(e)))}function lCe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ff(t)-Ff(e))+1}function BZ(e,t,n,r){var i=oP(e,t,n),a;switch(r=Yp(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=sCe(i,o))&&(r.precision=a),$Z(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=lCe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=oCe(i))&&(r.precision=a-(r.type==="%")*2);break}}return C2(r)}function tl(e){var t=e.domain;return e.ticks=function(n){var r=t();return iP(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return BZ(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],l=r[a],u,f,d=10;for(l<o&&(f=o,o=l,l=f,f=i,i=a,a=f);d-- >0;){if(f=aP(o,l,n),f===u)return r[i]=o,r[a]=l,t(r);if(f>0)o=Math.floor(o/f)*f,l=Math.ceil(l/f)*f;else if(f<0)o=Math.ceil(o*f)/f,l=Math.floor(l*f)/f;else break;u=f}return e},e}function Bb(){var e=E2();return e.copy=function(){return eg(e,Bb())},vi.apply(e,arguments),tl(e)}function qZ(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,Ib),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return qZ(e).unknown(t)},e=arguments.length?Array.from(e,Ib):[0,1],tl(n)}function zZ(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function FU(e){return Math.log(e)}function UU(e){return Math.exp(e)}function uCe(e){return-Math.log(-e)}function cCe(e){return-Math.exp(-e)}function fCe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function dCe(e){return e===10?fCe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function hCe(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 HU(e){return(t,n)=>-e(-t,n)}function T2(e){const t=e(FU,UU),n=t.domain;let r=10,i,a;function o(){return i=hCe(r),a=dCe(r),n()[0]<0?(i=HU(i),a=HU(a),e(uCe,cCe)):e(FU,UU),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const u=n();let f=u[0],d=u[u.length-1];const h=d<f;h&&([f,d]=[d,f]);let m=i(f),g=i(d),x,w;const y=l==null?10:+l;let S=[];if(!(r%1)&&g-m<y){if(m=Math.floor(m),g=Math.ceil(g),f>0){for(;m<=g;++m)for(x=1;x<r;++x)if(w=m<0?x/a(-m):x*a(m),!(w<f)){if(w>d)break;S.push(w)}}else for(;m<=g;++m)for(x=r-1;x>=1;--x)if(w=m>0?x/a(-m):x*a(m),!(w<f)){if(w>d)break;S.push(w)}S.length*2<y&&(S=iP(f,d,y))}else S=iP(m,g,Math.min(g-m,y)).map(a);return h?S.reverse():S},t.tickFormat=(l,u)=>{if(l==null&&(l=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Yp(u)).precision==null&&(u.trim=!0),u=C2(u)),l===1/0)return u;const f=Math.max(1,r*l/t.ticks().length);return d=>{let h=d/a(Math.round(i(d)));return h*r<r-.5&&(h*=r),h<=f?u(d):""}},t.nice=()=>n(zZ(n(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function VZ(){const e=T2(Px()).domain([1,10]);return e.copy=()=>eg(e,VZ()).base(e.base()),vi.apply(e,arguments),e}function GU(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function WU(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function O2(e){var t=1,n=e(GU(t),WU(t));return n.constant=function(r){return arguments.length?e(GU(t=+r),WU(t)):t},tl(n)}function FZ(){var e=O2(Px());return e.copy=function(){return eg(e,FZ()).constant(e.constant())},vi.apply(e,arguments)}function KU(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function pCe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function mCe(e){return e<0?-e*e:e*e}function j2(e){var t=e(rr,rr),n=1;function r(){return n===1?e(rr,rr):n===.5?e(pCe,mCe):e(KU(n),KU(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},tl(t)}function N2(){var e=j2(Px());return e.copy=function(){return eg(e,N2()).exponent(e.exponent())},vi.apply(e,arguments),e}function gCe(){return N2.apply(null,arguments).exponent(.5)}function YU(e){return Math.sign(e)*e*e}function vCe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function UZ(){var e=E2(),t=[0,1],n=!1,r;function i(a){var o=vCe(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(YU(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Ib)).map(YU)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return UZ(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},vi.apply(i,arguments),tl(i)}function HZ(){var e=[],t=[],n=[],r;function i(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=GAe(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Jm(n,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(Bs),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return HZ().domain(e).range(t).unknown(r)},vi.apply(a,arguments)}function GZ(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[Jm(r,u,0,n)]:a}function l(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,l()):[e,t]},o.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,l()):i.slice()},o.invertExtent=function(u){var f=i.indexOf(u);return f<0?[NaN,NaN]:f<1?[e,r[0]]:f>=n?[r[n-1],t]:[r[f-1],r[f]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return r.slice()},o.copy=function(){return GZ().domain([e,t]).range(i).unknown(a)},vi.apply(tl(o),arguments)}function WZ(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Jm(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return WZ().domain(e).range(t).unknown(n)},vi.apply(i,arguments)}const YO=new Date,XO=new Date;function Tn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return u;let f;do u.push(f=new Date(+a)),t(a,l),e(a);while(f<a&&a<o);return u},i.filter=a=>Tn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(YO.setTime(+a),XO.setTime(+o),e(YO),e(XO),Math.floor(n(YO,XO))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const qb=Tn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);qb.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Tn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):qb);qb.range;const to=1e3,ai=to*60,no=ai*60,mo=no*24,P2=mo*7,XU=mo*30,ZO=mo*365,Ul=Tn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*to)},(e,t)=>(t-e)/to,e=>e.getUTCSeconds());Ul.range;const M2=Tn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*to)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getMinutes());M2.range;const R2=Tn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getUTCMinutes());R2.range;const k2=Tn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*to-e.getMinutes()*ai)},(e,t)=>{e.setTime(+e+t*no)},(e,t)=>(t-e)/no,e=>e.getHours());k2.range;const D2=Tn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*no)},(e,t)=>(t-e)/no,e=>e.getUTCHours());D2.range;const tg=Tn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ai)/mo,e=>e.getDate()-1);tg.range;const Mx=Tn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/mo,e=>e.getUTCDate()-1);Mx.range;const KZ=Tn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/mo,e=>Math.floor(e/mo));KZ.range;function Lu(e){return Tn(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())*ai)/P2)}const Rx=Lu(0),zb=Lu(1),yCe=Lu(2),bCe=Lu(3),Uf=Lu(4),xCe=Lu(5),wCe=Lu(6);Rx.range;zb.range;yCe.range;bCe.range;Uf.range;xCe.range;wCe.range;function $u(e){return Tn(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)/P2)}const kx=$u(0),Vb=$u(1),SCe=$u(2),_Ce=$u(3),Hf=$u(4),ECe=$u(5),ACe=$u(6);kx.range;Vb.range;SCe.range;_Ce.range;Hf.range;ECe.range;ACe.range;const I2=Tn(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());I2.range;const L2=Tn(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());L2.range;const go=Tn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());go.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Tn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});go.range;const vo=Tn(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());vo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Tn(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)});vo.range;function YZ(e,t,n,r,i,a){const o=[[Ul,1,to],[Ul,5,5*to],[Ul,15,15*to],[Ul,30,30*to],[a,1,ai],[a,5,5*ai],[a,15,15*ai],[a,30,30*ai],[i,1,no],[i,3,3*no],[i,6,6*no],[i,12,12*no],[r,1,mo],[r,2,2*mo],[n,1,P2],[t,1,XU],[t,3,3*XU],[e,1,ZO]];function l(f,d,h){const m=d<f;m&&([f,d]=[d,f]);const g=h&&typeof h.range=="function"?h:u(f,d,h),x=g?g.range(f,+d+1):[];return m?x.reverse():x}function u(f,d,h){const m=Math.abs(d-f)/h,g=S2(([,,y])=>y).right(o,m);if(g===o.length)return e.every(oP(f/ZO,d/ZO,h));if(g===0)return qb.every(Math.max(oP(f,d,h),1));const[x,w]=o[m/o[g-1][2]<o[g][2]/m?g-1:g];return x.every(w)}return[l,u]}const[CCe,TCe]=YZ(vo,L2,kx,KZ,D2,R2),[OCe,jCe]=YZ(go,I2,Rx,tg,k2,M2);function QO(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 JO(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 Vh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function NCe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,u=e.shortMonths,f=Fh(i),d=Uh(i),h=Fh(a),m=Uh(a),g=Fh(o),x=Uh(o),w=Fh(l),y=Uh(l),S=Fh(u),E=Uh(u),_={a:z,A:H,b:Y,B:Z,c:null,d:n6,e:n6,f:JCe,g:uTe,G:fTe,H:XCe,I:ZCe,j:QCe,L:XZ,m:eTe,M:tTe,p:U,q:F,Q:a6,s:o6,S:nTe,u:rTe,U:iTe,V:aTe,w:oTe,W:sTe,x:null,X:null,y:lTe,Y:cTe,Z:dTe,"%":i6},A={a:X,A:K,b:G,B:Q,c:null,d:r6,e:r6,f:gTe,g:CTe,G:OTe,H:hTe,I:pTe,j:mTe,L:QZ,m:vTe,M:yTe,p:J,q:re,Q:a6,s:o6,S:bTe,u:xTe,U:wTe,V:STe,w:_Te,W:ETe,x:null,X:null,y:ATe,Y:TTe,Z:jTe,"%":i6},C={a:$,A:I,b:k,B:V,c:D,d:e6,e:e6,f:GCe,g:JU,G:QU,H:t6,I:t6,j:VCe,L:HCe,m:zCe,M:FCe,p:R,q:qCe,Q:KCe,s:YCe,S:UCe,u:DCe,U:ICe,V:LCe,w:kCe,W:$Ce,x:q,X:L,y:JU,Y:QU,Z:BCe,"%":WCe};_.x=O(n,_),_.X=O(r,_),_.c=O(t,_),A.x=O(n,A),A.X=O(r,A),A.c=O(t,A);function O(ne,fe){return function(he){var oe=[],ye=-1,be=0,xe=ne.length,Ae,_e,tt;for(he instanceof Date||(he=new Date(+he));++ye<xe;)ne.charCodeAt(ye)===37&&(oe.push(ne.slice(be,ye)),(_e=ZU[Ae=ne.charAt(++ye)])!=null?Ae=ne.charAt(++ye):_e=Ae==="e"?" ":"0",(tt=fe[Ae])&&(Ae=tt(he,_e)),oe.push(Ae),be=ye+1);return oe.push(ne.slice(be,ye)),oe.join("")}}function P(ne,fe){return function(he){var oe=Vh(1900,void 0,1),ye=M(oe,ne,he+="",0),be,xe;if(ye!=he.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(fe&&!("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?(be=JO(Vh(oe.y,0,1)),xe=be.getUTCDay(),be=xe>4||xe===0?Vb.ceil(be):Vb(be),be=Mx.offset(be,(oe.V-1)*7),oe.y=be.getUTCFullYear(),oe.m=be.getUTCMonth(),oe.d=be.getUTCDate()+(oe.w+6)%7):(be=QO(Vh(oe.y,0,1)),xe=be.getDay(),be=xe>4||xe===0?zb.ceil(be):zb(be),be=tg.offset(be,(oe.V-1)*7),oe.y=be.getFullYear(),oe.m=be.getMonth(),oe.d=be.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),xe="Z"in oe?JO(Vh(oe.y,0,1)).getUTCDay():QO(Vh(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(xe+5)%7:oe.w+oe.U*7-(xe+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,JO(oe)):QO(oe)}}function M(ne,fe,he,oe){for(var ye=0,be=fe.length,xe=he.length,Ae,_e;ye<be;){if(oe>=xe)return-1;if(Ae=fe.charCodeAt(ye++),Ae===37){if(Ae=fe.charAt(ye++),_e=C[Ae in ZU?fe.charAt(ye++):Ae],!_e||(oe=_e(ne,he,oe))<0)return-1}else if(Ae!=he.charCodeAt(oe++))return-1}return oe}function R(ne,fe,he){var oe=f.exec(fe.slice(he));return oe?(ne.p=d.get(oe[0].toLowerCase()),he+oe[0].length):-1}function $(ne,fe,he){var oe=g.exec(fe.slice(he));return oe?(ne.w=x.get(oe[0].toLowerCase()),he+oe[0].length):-1}function I(ne,fe,he){var oe=h.exec(fe.slice(he));return oe?(ne.w=m.get(oe[0].toLowerCase()),he+oe[0].length):-1}function k(ne,fe,he){var oe=S.exec(fe.slice(he));return oe?(ne.m=E.get(oe[0].toLowerCase()),he+oe[0].length):-1}function V(ne,fe,he){var oe=w.exec(fe.slice(he));return oe?(ne.m=y.get(oe[0].toLowerCase()),he+oe[0].length):-1}function D(ne,fe,he){return M(ne,t,fe,he)}function q(ne,fe,he){return M(ne,n,fe,he)}function L(ne,fe,he){return M(ne,r,fe,he)}function z(ne){return o[ne.getDay()]}function H(ne){return a[ne.getDay()]}function Y(ne){return u[ne.getMonth()]}function Z(ne){return l[ne.getMonth()]}function U(ne){return i[+(ne.getHours()>=12)]}function F(ne){return 1+~~(ne.getMonth()/3)}function X(ne){return o[ne.getUTCDay()]}function K(ne){return a[ne.getUTCDay()]}function G(ne){return u[ne.getUTCMonth()]}function Q(ne){return l[ne.getUTCMonth()]}function J(ne){return i[+(ne.getUTCHours()>=12)]}function re(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var fe=O(ne+="",_);return fe.toString=function(){return ne},fe},parse:function(ne){var fe=P(ne+="",!1);return fe.toString=function(){return ne},fe},utcFormat:function(ne){var fe=O(ne+="",A);return fe.toString=function(){return ne},fe},utcParse:function(ne){var fe=P(ne+="",!0);return fe.toString=function(){return ne},fe}}}var ZU={"-":"",_:" ",0:"0"},Mn=/^\s*\d+/,PCe=/^%/,MCe=/[\\^$*+?|[\]().{}]/g;function gt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function RCe(e){return e.replace(MCe,"\\$&")}function Fh(e){return new RegExp("^(?:"+e.map(RCe).join("|")+")","i")}function Uh(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function kCe(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function DCe(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ICe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function LCe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function $Ce(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function QU(e,t,n){var r=Mn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function JU(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function BCe(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 qCe(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function zCe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function e6(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function VCe(e,t,n){var r=Mn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function t6(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function FCe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function UCe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function HCe(e,t,n){var r=Mn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function GCe(e,t,n){var r=Mn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function WCe(e,t,n){var r=PCe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function KCe(e,t,n){var r=Mn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function YCe(e,t,n){var r=Mn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function n6(e,t){return gt(e.getDate(),t,2)}function XCe(e,t){return gt(e.getHours(),t,2)}function ZCe(e,t){return gt(e.getHours()%12||12,t,2)}function QCe(e,t){return gt(1+tg.count(go(e),e),t,3)}function XZ(e,t){return gt(e.getMilliseconds(),t,3)}function JCe(e,t){return XZ(e,t)+"000"}function eTe(e,t){return gt(e.getMonth()+1,t,2)}function tTe(e,t){return gt(e.getMinutes(),t,2)}function nTe(e,t){return gt(e.getSeconds(),t,2)}function rTe(e){var t=e.getDay();return t===0?7:t}function iTe(e,t){return gt(Rx.count(go(e)-1,e),t,2)}function ZZ(e){var t=e.getDay();return t>=4||t===0?Uf(e):Uf.ceil(e)}function aTe(e,t){return e=ZZ(e),gt(Uf.count(go(e),e)+(go(e).getDay()===4),t,2)}function oTe(e){return e.getDay()}function sTe(e,t){return gt(zb.count(go(e)-1,e),t,2)}function lTe(e,t){return gt(e.getFullYear()%100,t,2)}function uTe(e,t){return e=ZZ(e),gt(e.getFullYear()%100,t,2)}function cTe(e,t){return gt(e.getFullYear()%1e4,t,4)}function fTe(e,t){var n=e.getDay();return e=n>=4||n===0?Uf(e):Uf.ceil(e),gt(e.getFullYear()%1e4,t,4)}function dTe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+gt(t/60|0,"0",2)+gt(t%60,"0",2)}function r6(e,t){return gt(e.getUTCDate(),t,2)}function hTe(e,t){return gt(e.getUTCHours(),t,2)}function pTe(e,t){return gt(e.getUTCHours()%12||12,t,2)}function mTe(e,t){return gt(1+Mx.count(vo(e),e),t,3)}function QZ(e,t){return gt(e.getUTCMilliseconds(),t,3)}function gTe(e,t){return QZ(e,t)+"000"}function vTe(e,t){return gt(e.getUTCMonth()+1,t,2)}function yTe(e,t){return gt(e.getUTCMinutes(),t,2)}function bTe(e,t){return gt(e.getUTCSeconds(),t,2)}function xTe(e){var t=e.getUTCDay();return t===0?7:t}function wTe(e,t){return gt(kx.count(vo(e)-1,e),t,2)}function JZ(e){var t=e.getUTCDay();return t>=4||t===0?Hf(e):Hf.ceil(e)}function STe(e,t){return e=JZ(e),gt(Hf.count(vo(e),e)+(vo(e).getUTCDay()===4),t,2)}function _Te(e){return e.getUTCDay()}function ETe(e,t){return gt(Vb.count(vo(e)-1,e),t,2)}function ATe(e,t){return gt(e.getUTCFullYear()%100,t,2)}function CTe(e,t){return e=JZ(e),gt(e.getUTCFullYear()%100,t,2)}function TTe(e,t){return gt(e.getUTCFullYear()%1e4,t,4)}function OTe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Hf(e):Hf.ceil(e),gt(e.getUTCFullYear()%1e4,t,4)}function jTe(){return"+0000"}function i6(){return"%"}function a6(e){return+e}function o6(e){return Math.floor(+e/1e3)}var kc,eQ,tQ;NTe({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 NTe(e){return kc=NCe(e),eQ=kc.format,kc.parse,tQ=kc.utcFormat,kc.utcParse,kc}function PTe(e){return new Date(e)}function MTe(e){return e instanceof Date?+e:+new Date(+e)}function $2(e,t,n,r,i,a,o,l,u,f){var d=E2(),h=d.invert,m=d.domain,g=f(".%L"),x=f(":%S"),w=f("%I:%M"),y=f("%I %p"),S=f("%a %d"),E=f("%b %d"),_=f("%B"),A=f("%Y");function C(O){return(u(O)<O?g:l(O)<O?x:o(O)<O?w:a(O)<O?y:r(O)<O?i(O)<O?S:E:n(O)<O?_:A)(O)}return d.invert=function(O){return new Date(h(O))},d.domain=function(O){return arguments.length?m(Array.from(O,MTe)):m().map(PTe)},d.ticks=function(O){var P=m();return e(P[0],P[P.length-1],O??10)},d.tickFormat=function(O,P){return P==null?C:f(P)},d.nice=function(O){var P=m();return(!O||typeof O.range!="function")&&(O=t(P[0],P[P.length-1],O??10)),O?m(zZ(P,O)):d},d.copy=function(){return eg(d,$2(e,t,n,r,i,a,o,l,u,f))},d}function RTe(){return vi.apply($2(OCe,jCe,go,I2,Rx,tg,k2,M2,Ul,eQ).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function kTe(){return vi.apply($2(CCe,TCe,vo,L2,kx,Mx,D2,R2,Ul,tQ).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Dx(){var e=0,t=1,n,r,i,a,o=rr,l=!1,u;function f(h){return h==null||isNaN(h=+h)?u:o(i===0?.5:(h=(a(h)-n)*i,l?Math.max(0,Math.min(1,h)):h))}f.domain=function(h){return arguments.length?([e,t]=h,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),f):[e,t]},f.clamp=function(h){return arguments.length?(l=!!h,f):l},f.interpolator=function(h){return arguments.length?(o=h,f):o};function d(h){return function(m){var g,x;return arguments.length?([g,x]=m,o=h(g,x),f):[o(0),o(1)]}}return f.range=d(ao),f.rangeRound=d(jR),f.unknown=function(h){return arguments.length?(u=h,f):u},function(h){return a=h,n=h(e),r=h(t),i=n===r?0:1/(r-n),f}}function nl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function nQ(){var e=tl(Dx()(rr));return e.copy=function(){return nl(e,nQ())},Eo.apply(e,arguments)}function rQ(){var e=T2(Dx()).domain([1,10]);return e.copy=function(){return nl(e,rQ()).base(e.base())},Eo.apply(e,arguments)}function iQ(){var e=O2(Dx());return e.copy=function(){return nl(e,iQ()).constant(e.constant())},Eo.apply(e,arguments)}function B2(){var e=j2(Dx());return e.copy=function(){return nl(e,B2()).exponent(e.exponent())},Eo.apply(e,arguments)}function DTe(){return B2.apply(null,arguments).exponent(.5)}function aQ(){var e=[],t=rr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Jm(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Bs),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>HAe(e,a/r))},n.copy=function(){return aQ(t).domain(e)},Eo.apply(n,arguments)}function Ix(){var e=0,t=.5,n=1,r=1,i,a,o,l,u,f=rr,d,h=!1,m;function g(w){return isNaN(w=+w)?m:(w=.5+((w=+d(w))-a)*(r*w<r*a?l:u),f(h?Math.max(0,Math.min(1,w)):w))}g.domain=function(w){return arguments.length?([e,t,n]=w,i=d(e=+e),a=d(t=+t),o=d(n=+n),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,g):[e,t,n]},g.clamp=function(w){return arguments.length?(h=!!w,g):h},g.interpolator=function(w){return arguments.length?(f=w,g):f};function x(w){return function(y){var S,E,_;return arguments.length?([S,E,_]=y,f=Hme(w,[S,E,_]),g):[f(0),f(.5),f(1)]}}return g.range=x(ao),g.rangeRound=x(jR),g.unknown=function(w){return arguments.length?(m=w,g):m},function(w){return d=w,i=w(e),a=w(t),o=w(n),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,g}}function oQ(){var e=tl(Ix()(rr));return e.copy=function(){return nl(e,oQ())},Eo.apply(e,arguments)}function sQ(){var e=T2(Ix()).domain([.1,1,10]);return e.copy=function(){return nl(e,sQ()).base(e.base())},Eo.apply(e,arguments)}function lQ(){var e=O2(Ix());return e.copy=function(){return nl(e,lQ()).constant(e.constant())},Eo.apply(e,arguments)}function q2(){var e=j2(Ix());return e.copy=function(){return nl(e,q2()).exponent(e.exponent())},Eo.apply(e,arguments)}function ITe(){return q2.apply(null,arguments).exponent(.5)}const s6=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Kp,scaleDiverging:oQ,scaleDivergingLog:sQ,scaleDivergingPow:q2,scaleDivergingSqrt:ITe,scaleDivergingSymlog:lQ,scaleIdentity:qZ,scaleImplicit:sP,scaleLinear:Bb,scaleLog:VZ,scaleOrdinal:_2,scalePoint:cp,scalePow:N2,scaleQuantile:HZ,scaleQuantize:GZ,scaleRadial:UZ,scaleSequential:nQ,scaleSequentialLog:rQ,scaleSequentialPow:B2,scaleSequentialQuantile:aQ,scaleSequentialSqrt:DTe,scaleSequentialSymlog:iQ,scaleSqrt:gCe,scaleSymlog:FZ,scaleThreshold:WZ,scaleTime:RTe,scaleUtc:kTe,tickFormat:BZ},Symbol.toStringTag,{value:"Module"}));var LTe=_X();const Ns=yt(LTe);var $Te=OX();const Lx=yt($Te);var ej,l6;function BTe(){if(l6)return ej;l6=1;var e=Sx(),t=s2();function n(r,i){return e(t(r,i),1)}return ej=n,ej}var qTe=BTe();const zTe=yt(qTe);var tj,u6;function VTe(){if(u6)return tj;u6=1;var e=i2();function t(n,r){return e(n,r)}return tj=t,tj}var FTe=VTe();const Xp=yt(FTe);var Od=1e9,UTe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},V2,Wt=!0,ci="[DecimalError] ",uu=ci+"Invalid argument: ",z2=ci+"Exponent out of range: ",jd=Math.floor,Ll=Math.pow,HTe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Br,Nn=1e7,Ft=7,uQ=9007199254740991,Fb=jd(uQ/Ft),Oe={};Oe.absoluteValue=Oe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Oe.comparedTo=Oe.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};Oe.decimalPlaces=Oe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Ft;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Oe.dividedBy=Oe.div=function(e){return lo(this,new this.constructor(e))};Oe.dividedToIntegerBy=Oe.idiv=function(e){var t=this,n=t.constructor;return Dt(lo(t,new n(e),0,1),n.precision)};Oe.equals=Oe.eq=function(e){return!this.cmp(e)};Oe.exponent=function(){return vn(this)};Oe.greaterThan=Oe.gt=function(e){return this.cmp(e)>0};Oe.greaterThanOrEqualTo=Oe.gte=function(e){return this.cmp(e)>=0};Oe.isInteger=Oe.isint=function(){return this.e>this.d.length-2};Oe.isNegative=Oe.isneg=function(){return this.s<0};Oe.isPositive=Oe.ispos=function(){return this.s>0};Oe.isZero=function(){return this.s===0};Oe.lessThan=Oe.lt=function(e){return this.cmp(e)<0};Oe.lessThanOrEqualTo=Oe.lte=function(e){return this.cmp(e)<1};Oe.logarithm=Oe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Br))throw Error(ci+"NaN");if(n.s<1)throw Error(ci+(n.s?"NaN":"-Infinity"));return n.eq(Br)?new r(0):(Wt=!1,t=lo(Zp(n,a),Zp(e,a),a),Wt=!0,Dt(t,i))};Oe.minus=Oe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?dQ(t,e):cQ(t,(e.s=-e.s,e))};Oe.modulo=Oe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ci+"NaN");return n.s?(Wt=!1,t=lo(n,e,0,1).times(e),Wt=!0,n.minus(t)):Dt(new r(n),i)};Oe.naturalExponential=Oe.exp=function(){return fQ(this)};Oe.naturalLogarithm=Oe.ln=function(){return Zp(this)};Oe.negated=Oe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Oe.plus=Oe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?cQ(t,e):dQ(t,(e.s=-e.s,e))};Oe.precision=Oe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(uu+e);if(t=vn(i)+1,r=i.d.length-1,n=r*Ft+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Oe.squareRoot=Oe.sqrt=function(){var e,t,n,r,i,a,o,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(ci+"NaN")}for(e=vn(l),Wt=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=oa(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=jd((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=o=n+3;;)if(a=r,r=a.plus(lo(l,a,o+2)).times(.5),oa(a.d).slice(0,o)===(t=oa(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Dt(a,n+1,0),a.times(a).eq(l)){r=a;break}}else if(t!="9999")break;o+=4}return Wt=!0,Dt(r,n)};Oe.times=Oe.mul=function(e){var t,n,r,i,a,o,l,u,f,d=this,h=d.constructor,m=d.d,g=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,n=d.e+e.e,u=m.length,f=g.length,u<f&&(a=m,m=g,g=a,o=u,u=f,f=o),a=[],o=u+f,r=o;r--;)a.push(0);for(r=f;--r>=0;){for(t=0,i=u+r;i>r;)l=a[i]+g[r]*m[i-r-1]+t,a[i--]=l%Nn|0,t=l/Nn|0;a[i]=(a[i]+t)%Nn|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,Wt?Dt(e,h.precision):e};Oe.toDecimalPlaces=Oe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(pa(e,0,Od),t===void 0?t=r.rounding:pa(t,0,8),Dt(n,e+vn(n)+1,t))};Oe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Cu(r,!0):(pa(e,0,Od),t===void 0?t=i.rounding:pa(t,0,8),r=Dt(new i(r),e+1,t),n=Cu(r,!0,e+1)),n};Oe.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Cu(i):(pa(e,0,Od),t===void 0?t=a.rounding:pa(t,0,8),r=Dt(new a(i),e+vn(i)+1,t),n=Cu(r.abs(),!1,e+vn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Oe.toInteger=Oe.toint=function(){var e=this,t=e.constructor;return Dt(new t(e),vn(e)+1,t.rounding)};Oe.toNumber=function(){return+this};Oe.toPower=Oe.pow=function(e){var t,n,r,i,a,o,l=this,u=l.constructor,f=12,d=+(e=new u(e));if(!e.s)return new u(Br);if(l=new u(l),!l.s){if(e.s<1)throw Error(ci+"Infinity");return l}if(l.eq(Br))return l;if(r=u.precision,e.eq(Br))return Dt(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=l.s,o){if((n=d<0?-d:d)<=uQ){for(i=new u(Br),t=Math.ceil(r/Ft+4),Wt=!1;n%2&&(i=i.times(l),f6(i.d,t)),n=jd(n/2),n!==0;)l=l.times(l),f6(l.d,t);return Wt=!0,e.s<0?new u(Br).div(i):Dt(i,r)}}else if(a<0)throw Error(ci+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,Wt=!1,i=e.times(Zp(l,r+f)),Wt=!0,i=fQ(i),i.s=a,i};Oe.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=vn(i),r=Cu(i,n<=a.toExpNeg||n>=a.toExpPos)):(pa(e,1,Od),t===void 0?t=a.rounding:pa(t,0,8),i=Dt(new a(i),e,t),n=vn(i),r=Cu(i,e<=n||n<=a.toExpNeg,e)),r};Oe.toSignificantDigits=Oe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(pa(e,1,Od),t===void 0?t=r.rounding:pa(t,0,8)),Dt(new r(n),e,t)};Oe.toString=Oe.valueOf=Oe.val=Oe.toJSON=Oe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=vn(e),n=e.constructor;return Cu(e,t<=n.toExpNeg||t>=n.toExpPos)};function cQ(e,t){var n,r,i,a,o,l,u,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Wt?Dt(t,h):t;if(u=e.d,f=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(r=u,a=-a,l=f.length):(r=f,i=o,l=u.length),o=Math.ceil(h/Ft),l=o>l?o+1:l+1,a>l&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(l=u.length,a=f.length,l-a<0&&(a=l,r=f,f=u,u=r),n=0;a;)n=(u[--a]=u[a]+f[a]+n)/Nn|0,u[a]%=Nn;for(n&&(u.unshift(n),++i),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=i,Wt?Dt(t,h):t}function pa(e,t,n){if(e!==~~e||e<t||e>n)throw Error(uu+e)}function oa(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=Ft-r.length,n&&(a+=hs(n)),a+=r;o=e[t],r=o+"",n=Ft-r.length,n&&(a+=hs(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var lo=(function(){function e(r,i){var a,o=0,l=r.length;for(r=r.slice();l--;)a=r[l]*i+o,r[l]=a%Nn|0,o=a/Nn|0;return o&&r.unshift(o),r}function t(r,i,a,o){var l,u;if(a!=o)u=a>o?1:-1;else for(l=u=0;l<a;l++)if(r[l]!=i[l]){u=r[l]>i[l]?1:-1;break}return u}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*Nn+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var l,u,f,d,h,m,g,x,w,y,S,E,_,A,C,O,P,M,R=r.constructor,$=r.s==i.s?1:-1,I=r.d,k=i.d;if(!r.s)return new R(r);if(!i.s)throw Error(ci+"Division by zero");for(u=r.e-i.e,P=k.length,C=I.length,g=new R($),x=g.d=[],f=0;k[f]==(I[f]||0);)++f;if(k[f]>(I[f]||0)&&--u,a==null?E=a=R.precision:o?E=a+(vn(r)-vn(i))+1:E=a,E<0)return new R(0);if(E=E/Ft+2|0,f=0,P==1)for(d=0,k=k[0],E++;(f<C||d)&&E--;f++)_=d*Nn+(I[f]||0),x[f]=_/k|0,d=_%k|0;else{for(d=Nn/(k[0]+1)|0,d>1&&(k=e(k,d),I=e(I,d),P=k.length,C=I.length),A=P,w=I.slice(0,P),y=w.length;y<P;)w[y++]=0;M=k.slice(),M.unshift(0),O=k[0],k[1]>=Nn/2&&++O;do d=0,l=t(k,w,P,y),l<0?(S=w[0],P!=y&&(S=S*Nn+(w[1]||0)),d=S/O|0,d>1?(d>=Nn&&(d=Nn-1),h=e(k,d),m=h.length,y=w.length,l=t(h,w,m,y),l==1&&(d--,n(h,P<m?M:k,m))):(d==0&&(l=d=1),h=k.slice()),m=h.length,m<y&&h.unshift(0),n(w,h,y),l==-1&&(y=w.length,l=t(k,w,P,y),l<1&&(d++,n(w,P<y?M:k,y))),y=w.length):l===0&&(d++,w=[0]),x[f++]=d,l&&w[0]?w[y++]=I[A]||0:(w=[I[A]],y=1);while((A++<C||w[0]!==void 0)&&E--)}return x[0]||x.shift(),g.e=u,Dt(g,o?a+vn(g)+1:a)}})();function fQ(e,t){var n,r,i,a,o,l,u=0,f=0,d=e.constructor,h=d.precision;if(vn(e)>16)throw Error(z2+vn(e));if(!e.s)return new d(Br);for(Wt=!1,l=h,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(r=Math.log(Ll(2,f))/Math.LN10*2+5|0,l+=r,n=i=a=new d(Br),d.precision=l;;){if(i=Dt(i.times(e),l),n=n.times(++u),o=a.plus(lo(i,n,l)),oa(o.d).slice(0,l)===oa(a.d).slice(0,l)){for(;f--;)a=Dt(a.times(a),l);return d.precision=h,t==null?(Wt=!0,Dt(a,h)):a}a=o}}function vn(e){for(var t=e.e*Ft,n=e.d[0];n>=10;n/=10)t++;return t}function nj(e,t,n){if(t>e.LN10.sd())throw Wt=!0,n&&(e.precision=n),Error(ci+"LN10 precision limit exceeded");return Dt(new e(e.LN10),t)}function hs(e){for(var t="";e--;)t+="0";return t}function Zp(e,t){var n,r,i,a,o,l,u,f,d,h=1,m=10,g=e,x=g.d,w=g.constructor,y=w.precision;if(g.s<1)throw Error(ci+(g.s?"NaN":"-Infinity"));if(g.eq(Br))return new w(0);if(t==null?(Wt=!1,f=y):f=t,g.eq(10))return t==null&&(Wt=!0),nj(w,f);if(f+=m,w.precision=f,n=oa(x),r=n.charAt(0),a=vn(g),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=oa(g.d),r=n.charAt(0),h++;a=vn(g),r>1?(g=new w("0."+n),a++):g=new w(r+"."+n.slice(1))}else return u=nj(w,f+2,y).times(a+""),g=Zp(new w(r+"."+n.slice(1)),f-m).plus(u),w.precision=y,t==null?(Wt=!0,Dt(g,y)):g;for(l=o=g=lo(g.minus(Br),g.plus(Br),f),d=Dt(g.times(g),f),i=3;;){if(o=Dt(o.times(d),f),u=l.plus(lo(o,new w(i),f)),oa(u.d).slice(0,f)===oa(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(nj(w,f+2,y).times(a+""))),l=lo(l,new w(h),f),w.precision=y,t==null?(Wt=!0,Dt(l,y)):l;l=u,i+=2}}function c6(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=jd(n/Ft),e.d=[],r=(n+1)%Ft,n<0&&(r+=Ft),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Ft;r<i;)e.d.push(+t.slice(r,r+=Ft));t=t.slice(r),r=Ft-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Wt&&(e.e>Fb||e.e<-Fb))throw Error(z2+n)}else e.s=0,e.e=0,e.d=[0];return e}function Dt(e,t,n){var r,i,a,o,l,u,f,d,h=e.d;for(o=1,a=h[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=Ft,i=t,f=h[d=0];else{if(d=Math.ceil((r+1)/Ft),a=h.length,d>=a)return e;for(f=a=h[d],o=1;a>=10;a/=10)o++;r%=Ft,i=r-Ft+o}if(n!==void 0&&(a=Ll(10,o-i-1),l=f/a%10|0,u=t<0||h[d+1]!==void 0||f%a,u=n<4?(l||u)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||u||n==6&&(r>0?i>0?f/Ll(10,o-i):0:h[d-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return u?(a=vn(e),h.length=1,t=t-a-1,h[0]=Ll(10,(Ft-t%Ft)%Ft),e.e=jd(-t/Ft)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=d,a=1,d--):(h.length=d+1,a=Ll(10,Ft-r),h[d]=i>0?(f/Ll(10,o-i)%Ll(10,i)|0)*a:0),u)for(;;)if(d==0){(h[0]+=a)==Nn&&(h[0]=1,++e.e);break}else{if(h[d]+=a,h[d]!=Nn)break;h[d--]=0,a=1}for(r=h.length;h[--r]===0;)h.pop();if(Wt&&(e.e>Fb||e.e<-Fb))throw Error(z2+vn(e));return e}function dQ(e,t){var n,r,i,a,o,l,u,f,d,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),Wt?Dt(t,g):t;if(u=e.d,h=t.d,r=t.e,f=e.e,u=u.slice(),o=f-r,o){for(d=o<0,d?(n=u,o=-o,l=h.length):(n=h,r=f,l=u.length),i=Math.max(Math.ceil(g/Ft),l)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=u.length,l=h.length,d=i<l,d&&(l=i),i=0;i<l;i++)if(u[i]!=h[i]){d=u[i]<h[i];break}o=0}for(d&&(n=u,u=h,h=n,t.s=-t.s),l=u.length,i=h.length-l;i>0;--i)u[l++]=0;for(i=h.length;i>o;){if(u[--i]<h[i]){for(a=i;a&&u[--a]===0;)u[a]=Nn-1;--u[a],u[i]+=Nn}u[i]-=h[i]}for(;u[--l]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=r,Wt?Dt(t,g):t):new m(0)}function Cu(e,t,n){var r,i=vn(e),a=oa(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+hs(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+hs(-i-1)+a,n&&(r=n-o)>0&&(a+=hs(r))):i>=o?(a+=hs(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+hs(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=hs(r))),e.s<0?"-"+a:a}function f6(e,t){if(e.length>t)return e.length=t,!0}function hQ(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(uu+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return c6(o,a.toString())}else if(typeof a!="string")throw Error(uu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,HTe.test(a))c6(o,a);else throw Error(uu+a)}if(i.prototype=Oe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=hQ,i.config=i.set=GTe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function GTe(e){if(!e||typeof e!="object")throw Error(ci+"Object expected");var t,n,r,i=["precision",1,Od,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(jd(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(uu+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(uu+n+": "+r);return this}var V2=hQ(UTe);Br=new V2(1);const Nt=V2;function WTe(e){return ZTe(e)||XTe(e)||YTe(e)||KTe()}function KTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
397
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YTe(e,t){if(e){if(typeof e=="string")return uP(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 uP(e,t)}}function XTe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function ZTe(e){if(Array.isArray(e))return uP(e)}function uP(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 QTe=function(t){return t},pQ={},mQ=function(t){return t===pQ},d6=function(t){return function n(){return arguments.length===0||arguments.length===1&&mQ(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},JTe=function e(t,n){return t===1?n:d6(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.filter(function(l){return l!==pQ}).length;return o>=t?n.apply(void 0,i):e(t-o,d6(function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var d=i.map(function(h){return mQ(h)?u.shift():h});return n.apply(void 0,WTe(d).concat(u))}))})},$x=function(t){return JTe(t.length,t)},cP=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},eOe=$x(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),tOe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return QTe;var i=n.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(l,u){return u(l)},a.apply(void 0,arguments))}},fP=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},gQ=function(t){var n=null,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n&&a.every(function(l,u){return l===n[u]})||(n=a,r=t.apply(void 0,a)),r}};function nOe(e){var t;return e===0?t=1:t=Math.floor(new Nt(e).abs().log(10).toNumber())+1,t}function rOe(e,t,n){for(var r=new Nt(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var iOe=$x(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),aOe=$x(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),oOe=$x(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Bx={rangeStep:rOe,getDigitCount:nOe,interpolateNumber:iOe,uninterpolateNumber:aOe,uninterpolateTruncation:oOe};function dP(e){return uOe(e)||lOe(e)||vQ(e)||sOe()}function sOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
398
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lOe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function uOe(e){if(Array.isArray(e))return hP(e)}function Qp(e,t){return dOe(e)||fOe(e,t)||vQ(e,t)||cOe()}function cOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
399
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vQ(e,t){if(e){if(typeof e=="string")return hP(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 hP(e,t)}}function hP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fOe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,a=u}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function dOe(e){if(Array.isArray(e))return e}function yQ(e){var t=Qp(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function bQ(e,t,n){if(e.lte(0))return new Nt(0);var r=Bx.getDigitCount(e.toNumber()),i=new Nt(10).pow(r),a=e.div(i),o=r!==1?.05:.1,l=new Nt(Math.ceil(a.div(o).toNumber())).add(n).mul(o),u=l.mul(i);return t?u:new Nt(Math.ceil(u))}function hOe(e,t,n){var r=1,i=new Nt(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Nt(10).pow(Bx.getDigitCount(e)-1),i=new Nt(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Nt(Math.floor(e)))}else e===0?i=new Nt(Math.floor((t-1)/2)):n||(i=new Nt(Math.floor(e)));var o=Math.floor((t-1)/2),l=tOe(eOe(function(u){return i.add(new Nt(u-o).mul(r)).toNumber()}),cP);return l(0,t)}function xQ(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Nt(0),tickMin:new Nt(0),tickMax:new Nt(0)};var a=bQ(new Nt(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Nt(0):(o=new Nt(e).add(t).div(2),o=o.sub(new Nt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),u=Math.ceil(new Nt(t).sub(o).div(a).toNumber()),f=l+u+1;return f>n?xQ(e,t,n,r,i+1):(f<n&&(u=t>0?u+(n-f):u,l=t>0?l:l+(n-f)),{step:a,tickMin:o.sub(new Nt(l).mul(a)),tickMax:o.add(new Nt(u).mul(a))})}function pOe(e){var t=Qp(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=yQ([n,r]),u=Qp(l,2),f=u[0],d=u[1];if(f===-1/0||d===1/0){var h=d===1/0?[f].concat(dP(cP(0,i-1).map(function(){return 1/0}))):[].concat(dP(cP(0,i-1).map(function(){return-1/0})),[d]);return n>r?fP(h):h}if(f===d)return hOe(f,i,a);var m=xQ(f,d,o,a),g=m.step,x=m.tickMin,w=m.tickMax,y=Bx.rangeStep(x,w.add(new Nt(.1).mul(g)),g);return n>r?fP(y):y}function mOe(e,t){var n=Qp(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=yQ([r,i]),l=Qp(o,2),u=l[0],f=l[1];if(u===-1/0||f===1/0)return[r,i];if(u===f)return[u];var d=Math.max(t,2),h=bQ(new Nt(f).sub(u).div(d-1),a,0),m=[].concat(dP(Bx.rangeStep(new Nt(u),new Nt(f).sub(new Nt(.99).mul(h)),h)),[f]);return r>i?fP(m):m}var gOe=gQ(pOe),vOe=gQ(mOe),yOe="Invariant failed";function Tu(e,t){throw new Error(yOe)}var bOe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 Ub(){return Ub=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},Ub.apply(this,arguments)}function xOe(e,t){return EOe(e)||_Oe(e,t)||SOe(e,t)||wOe()}function wOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
400
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SOe(e,t){if(e){if(typeof e=="string")return h6(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 h6(e,t)}}function h6(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 _Oe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function EOe(e){if(Array.isArray(e))return e}function AOe(e,t){if(e==null)return{};var n=COe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function COe(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 TOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OOe(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,_Q(r.key),r)}}function jOe(e,t,n){return t&&OOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function NOe(e,t,n){return t=Hb(t),POe(e,wQ()?Reflect.construct(t,n||[],Hb(e).constructor):t.apply(e,n))}function POe(e,t){if(t&&(Gf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MOe(e)}function MOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wQ=function(){return!!e})()}function Hb(e){return Hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hb(e)}function ROe(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&&pP(e,t)}function pP(e,t){return pP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},pP(e,t)}function SQ(e,t,n){return t=_Q(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Q(e){var t=kOe(e,"string");return Gf(t)=="symbol"?t:t+""}function kOe(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 String(e)}var qx=(function(e){function t(){return TOe(this,t),NOe(this,t,arguments)}return ROe(t,e),jOe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,o=r.width,l=r.dataKey,u=r.data,f=r.dataPointFormatter,d=r.xAxis,h=r.yAxis,m=AOe(r,bOe),g=et(m,!1);this.props.direction==="x"&&d.type!=="number"&&Tu();var x=u.map(function(w){var y=f(w,l),S=y.x,E=y.y,_=y.value,A=y.errorVal;if(!A)return null;var C=[],O,P;if(Array.isArray(A)){var M=xOe(A,2);O=M[0],P=M[1]}else O=P=A;if(a==="vertical"){var R=d.scale,$=E+i,I=$+o,k=$-o,V=R(_-O),D=R(_+P);C.push({x1:D,y1:I,x2:D,y2:k}),C.push({x1:V,y1:$,x2:D,y2:$}),C.push({x1:V,y1:I,x2:V,y2:k})}else if(a==="horizontal"){var q=h.scale,L=S+i,z=L-o,H=L+o,Y=q(_-O),Z=q(_+P);C.push({x1:z,y1:Z,x2:H,y2:Z}),C.push({x1:L,y1:Y,x2:L,y2:Z}),C.push({x1:z,y1:Y,x2:H,y2:Y})}return ie.createElement(Jt,Ub({className:"recharts-errorBar",key:"bar-".concat(C.map(function(U){return"".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))},g),C.map(function(U){return ie.createElement("line",Ub({},U,{key:"line-".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))}))});return ie.createElement(Jt,{className:"recharts-errorBars"},x)}}])})(ie.Component);SQ(qx,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});SQ(qx,"displayName","ErrorBar");function Jp(e){"@babel/helpers - typeof";return Jp=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},Jp(e)}function p6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p6(Object(n),!0).forEach(function(r){DOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DOe(e,t,n){return t=IOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IOe(e){var t=LOe(e,"string");return Jp(t)=="symbol"?t:t+""}function LOe(e,t){if(Jp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var EQ=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=kr(n,$s);if(!o)return null;var l=$s.defaultProps,u=l!==void 0?Pl(Pl({},l),o.props):{},f;return o.props&&o.props.payload?f=o.props&&o.props.payload:a==="children"?f=(r||[]).reduce(function(d,h){var m=h.item,g=h.props,x=g.sectors||g.data||[];return d.concat(x.map(function(w){return{type:o.props.iconType||m.props.legendType,value:w.name,color:w.fill,payload:w}}))},[]):f=(r||[]).map(function(d){var h=d.item,m=h.type.defaultProps,g=m!==void 0?Pl(Pl({},m),h.props):{},x=g.dataKey,w=g.name,y=g.legendType,S=g.hide;return{inactive:S,dataKey:x,type:u.iconType||y||"square",color:F2(h),value:w||x,payload:g}}),Pl(Pl(Pl({},u),$s.getWithHeight(o,i)),{},{payload:f,item:o})};function em(e){"@babel/helpers - typeof";return em=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},em(e)}function m6(e){return zOe(e)||qOe(e)||BOe(e)||$Oe()}function $Oe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
401
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BOe(e,t){if(e){if(typeof e=="string")return mP(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 mP(e,t)}}function qOe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zOe(e){if(Array.isArray(e))return mP(e)}function mP(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 g6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g6(Object(n),!0).forEach(function(r){af(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function af(e,t,n){return t=VOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VOe(e){var t=FOe(e,"string");return em(t)=="symbol"?t:t+""}function FOe(e,t){if(em(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(em(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ur(e,t,n){return ot(e)||ot(t)?n:Cn(t)?li(e,t,n):Xe(t)?t(e):n}function fp(e,t,n,r){var i=zTe(e,function(l){return Ur(l,t)});if(n==="number"){var a=i.filter(function(l){return Se(l)||parseFloat(l)});return a.length?[Lx(a),Ns(a)]:[1/0,-1/0]}var o=r?i.filter(function(l){return!ot(l)}):i;return o.map(function(l){return Cn(l)||l instanceof Date?l:""})}var UOe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,f=0;f<l;f++){var d=f>0?i[f-1].coordinate:i[l-1].coordinate,h=i[f].coordinate,m=f>=l-1?i[0].coordinate:i[f+1].coordinate,g=void 0;if(ki(h-d)!==ki(m-h)){var x=[];if(ki(m-h)===ki(u[1]-u[0])){g=m;var w=h+u[1]-u[0];x[0]=Math.min(w,(w+d)/2),x[1]=Math.max(w,(w+d)/2)}else{g=d;var y=m+u[1]-u[0];x[0]=Math.min(h,(y+h)/2),x[1]=Math.max(h,(y+h)/2)}var S=[Math.min(h,(g+h)/2),Math.max(h,(g+h)/2)];if(t>S[0]&&t<=S[1]||t>=x[0]&&t<=x[1]){o=i[f].index;break}}else{var E=Math.min(d,m),_=Math.max(d,m);if(t>(E+h)/2&&t<=(_+h)/2){o=i[f].index;break}}}else for(var A=0;A<l;A++)if(A===0&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A>0&&A<l-1&&t>(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===l-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){o=r[A].index;break}return o},F2=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},HOe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),u=0,f=l.length;u<f;u++)for(var d=a[l[u]].stackGroups,h=Object.keys(d),m=0,g=h.length;m<g;m++){var x=d[h[m]],w=x.items,y=x.cateAxisId,S=w.filter(function(P){return oo(P.type).indexOf("Bar")>=0});if(S&&S.length){var E=S[0].type.defaultProps,_=E!==void 0?an(an({},E),S[0].props):S[0].props,A=_.barSize,C=_[y];o[C]||(o[C]=[]);var O=ot(A)?n:A;o[C].push({item:S[0],stackList:S.slice(1),barSize:ot(O)?void 0:Au(O,r,0)})}}return o},GOe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,u=o.length;if(u<1)return null;var f=Au(n,i,0,!0),d,h=[];if(o[0].barSize===+o[0].barSize){var m=!1,g=i/u,x=o.reduce(function(A,C){return A+C.barSize||0},0);x+=(u-1)*f,x>=i&&(x-=(u-1)*f,f=0),x>=i&&g>0&&(m=!0,g*=.9,x=u*g);var w=(i-x)/2>>0,y={offset:w-f,size:0};d=o.reduce(function(A,C){var O={item:C.item,position:{offset:y.offset+y.size+f,size:m?g:C.barSize}},P=[].concat(m6(A),[O]);return y=P[P.length-1].position,C.stackList&&C.stackList.length&&C.stackList.forEach(function(M){P.push({item:M,position:y})}),P},h)}else{var S=Au(r,i,0,!0);i-2*S-(u-1)*f<=0&&(f=0);var E=(i-2*S-(u-1)*f)/u;E>1&&(E>>=0);var _=l===+l?Math.min(E,l):E;d=o.reduce(function(A,C,O){var P=[].concat(m6(A),[{item:C.item,position:{offset:S+(E+f)*O+(E-_)/2,size:_}}]);return C.stackList&&C.stackList.length&&C.stackList.forEach(function(M){P.push({item:M,position:P[P.length-1].position})}),P},h)}return d},WOe=function(t,n,r,i){var a=r.children,o=r.width,l=r.margin,u=o-(l.left||0)-(l.right||0),f=EQ({children:a,legendWidth:u});if(f){var d=i||{},h=d.width,m=d.height,g=f.align,x=f.verticalAlign,w=f.layout;if((w==="vertical"||w==="horizontal"&&x==="middle")&&g!=="center"&&Se(t[g]))return an(an({},t),{},af({},g,t[g]+(h||0)));if((w==="horizontal"||w==="vertical"&&g==="center")&&x!=="middle"&&Se(t[x]))return an(an({},t),{},af({},x,t[x]+(m||0)))}return t},KOe=function(t,n,r){return ot(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},AQ=function(t,n,r,i,a){var o=n.props.children,l=Ii(o,qx).filter(function(f){return KOe(i,a,f.props.direction)});if(l&&l.length){var u=l.map(function(f){return f.props.dataKey});return t.reduce(function(f,d){var h=Ur(d,r);if(ot(h))return f;var m=Array.isArray(h)?[Lx(h),Ns(h)]:[h,h],g=u.reduce(function(x,w){var y=Ur(d,w,0),S=m[0]-Math.abs(Array.isArray(y)?y[0]:y),E=m[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(S,x[0]),Math.max(E,x[1])]},[1/0,-1/0]);return[Math.min(g[0],f[0]),Math.max(g[1],f[1])]},[1/0,-1/0])}return null},YOe=function(t,n,r,i,a){var o=n.map(function(l){return AQ(t,l,r,a,i)}).filter(function(l){return!ot(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},CQ=function(t,n,r,i,a){var o=n.map(function(u){var f=u.props.dataKey;return r==="number"&&f&&AQ(t,u,f,i)||fp(t,f,r,a)});if(r==="number")return o.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,f){for(var d=0,h=f.length;d<h;d++)l[f[d]]||(l[f[d]]=!0,u.push(f[d]));return u},[])},TQ=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},OQ=function(t,n,r,i){if(i)return t.map(function(u){return u.coordinate});var a,o,l=t.map(function(u){return u.coordinate===n&&(a=!0),u.coordinate===r&&(o=!0),u.coordinate});return a||l.push(n),o||l.push(r),l},ro=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,l=t.range,u=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,f=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/u:0;if(f=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?ki(l[0]-l[1])*2*f:f,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(h){var m=a?a.indexOf(h):h;return{coordinate:i(m)+f,value:h,offset:f}});return d.filter(function(h){return!Cd(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,m){return{coordinate:i(h)+f,value:h,index:m,offset:f}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(h){return{coordinate:i(h)+f,value:h,offset:f}}):i.domain().map(function(h,m){return{coordinate:i(h)+f,value:a?a[h]:h,index:m,offset:f}})},rj=new WeakMap,ry=function(t,n){if(typeof n!="function")return t;rj.has(t)||rj.set(t,new WeakMap);var r=rj.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},XOe=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Kp(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:Bb(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:cp(),realScaleType:"point"}:a==="category"?{scale:Kp(),realScaleType:"band"}:{scale:Bb(),realScaleType:"linear"};if(Eu(i)){var u="scale".concat(Cx(i));return{scale:(s6[u]||cp)(),realScaleType:s6[u]?u:"point"}}return Xe(i)?{scale:i}:{scale:cp(),realScaleType:"point"}},v6=1e-4,ZOe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-v6,o=Math.max(i[0],i[1])+v6,l=t(n[0]),u=t(n[r-1]);(l<a||l>o||u<a||u>o)&&t.domain([n[0],n[r-1]])}},QOe=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},JOe=function(t,n){if(!n||n.length!==2||!Se(n[0])||!Se(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!Se(t[0])||t[0]<r)&&(a[0]=r),(!Se(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},eje=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0,l=0;l<n;++l){var u=Cd(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=a,t[l][r][1]=a+u,a=t[l][r][1]):(t[l][r][0]=o,t[l][r][1]=o+u,o=t[l][r][1])}},tje=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0;o<n;++o){var l=Cd(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=a,t[o][r][1]=a+l,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},nje={sign:eje,expand:C_e,none:$f,silhouette:T_e,wiggle:O_e,positive:tje},rje=function(t,n,r){var i=n.map(function(l){return l.props.dataKey}),a=nje[r],o=A_e().keys(i).value(function(l,u){return+Ur(l,u,0)}).order(WN).offset(a);return o(t)},ije=function(t,n,r,i,a,o){if(!t)return null;var l=o?n.reverse():n,u={},f=l.reduce(function(h,m){var g,x=(g=m.type)!==null&&g!==void 0&&g.defaultProps?an(an({},m.type.defaultProps),m.props):m.props,w=x.stackId,y=x.hide;if(y)return h;var S=x[r],E=h[S]||{hasStack:!1,stackGroups:{}};if(Cn(w)){var _=E.stackGroups[w]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(m),E.hasStack=!0,E.stackGroups[w]=_}else E.stackGroups[Qm("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[m]};return an(an({},h),{},af({},S,E))},u),d={};return Object.keys(f).reduce(function(h,m){var g=f[m];if(g.hasStack){var x={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(w,y){var S=g.stackGroups[y];return an(an({},w),{},af({},y,{numericAxisId:r,cateAxisId:i,items:S.items,stackedData:rje(t,S.items,a)}))},x)}return an(an({},h),{},af({},m,g))},d)},aje=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,l=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var f=t.domain();if(!f.length)return null;var d=gOe(f,a,l);return t.domain([Lx(d),Ns(d)]),{niceTicks:d}}if(a&&i==="number"){var h=t.domain(),m=vOe(h,a,l);return{niceTicks:m}}return null};function y6(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ot(i[t.dataKey])){var l=wb(n,"value",i[t.dataKey]);if(l)return l.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var u=Ur(i,ot(o)?t.dataKey:o);return ot(u)?null:t.scale(u)}var b6=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+i:null;var u=Ur(o,n.dataKey,n.domain[l]);return ot(u)?null:n.scale(u)-a/2+i},oje=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},sje=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Cn(a)){var o=n[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},lje=function(t){return t.reduce(function(n,r){return[Lx(r.concat([n[0]]).filter(Se)),Ns(r.concat([n[1]]).filter(Se))]},[1/0,-1/0])},jQ=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,u=l.reduce(function(f,d){var h=lje(d.slice(n,r+1));return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},x6=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,w6=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,gP=function(t,n,r){if(Xe(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Se(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(x6.test(t[0])){var a=+x6.exec(t[0])[1];i[0]=n[0]-a}else Xe(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Se(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(w6.test(t[1])){var o=+w6.exec(t[1])[1];i[1]=n[1]+o}else Xe(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Gb=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=x2(n,function(h){return h.coordinate}),o=1/0,l=1,u=a.length;l<u;l++){var f=a[l],d=a[l-1];o=Math.min((f.coordinate||0)-(d.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},S6=function(t,n,r){return!t||!t.length||Xp(t,li(r,"type.defaultProps.domain"))?n:t},NQ=function(t,n){var r=t.type.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,o=r.unit,l=r.formatter,u=r.tooltipType,f=r.chartType,d=r.hide;return an(an({},et(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:F2(t),value:Ur(n,i),type:u,payload:n,chartType:f,hide:d})};function tm(e){"@babel/helpers - typeof";return tm=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},tm(e)}function _6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function E6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_6(Object(n),!0).forEach(function(r){uje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uje(e,t,n){return t=cje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cje(e){var t=fje(e,"string");return tm(t)=="symbol"?t:t+""}function fje(e,t){if(tm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wb=Math.PI/180,dje=function(t){return t*180/Math.PI},Bn=function(t,n,r,i){return{x:t+Math.cos(-Wb*i)*r,y:n+Math.sin(-Wb*i)*r}},hje=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-o,2))},pje=function(t,n){var r=t.x,i=t.y,a=n.cx,o=n.cy,l=hje({x:r,y:i},{x:a,y:o});if(l<=0)return{radius:l};var u=(r-a)/l,f=Math.acos(u);return i>o&&(f=2*Math.PI-f),{radius:l,angle:dje(f),angleInRadian:f}},mje=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},gje=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},A6=function(t,n){var r=t.x,i=t.y,a=pje({x:r,y:i},n),o=a.radius,l=a.angle,u=n.innerRadius,f=n.outerRadius;if(o<u||o>f)return!1;if(o===0)return!0;var d=mje(n),h=d.startAngle,m=d.endAngle,g=l,x;if(h<=m){for(;g>m;)g-=360;for(;g<h;)g+=360;x=g>=h&&g<=m}else{for(;g>h;)g-=360;for(;g<m;)g+=360;x=g>=m&&g<=h}return x?E6(E6({},n),{},{radius:o,angle:gje(g,n)}):null};function nm(e){"@babel/helpers - typeof";return nm=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},nm(e)}var vje=["offset"];function yje(e){return Sje(e)||wje(e)||xje(e)||bje()}function bje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
402
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xje(e,t){if(e){if(typeof e=="string")return vP(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 vP(e,t)}}function wje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sje(e){if(Array.isArray(e))return vP(e)}function vP(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 _je(e,t){if(e==null)return{};var n=Eje(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Eje(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 C6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C6(Object(n),!0).forEach(function(r){Aje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Aje(e,t,n){return t=Cje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cje(e){var t=Tje(e,"string");return nm(t)=="symbol"?t:t+""}function Tje(e,t){if(nm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rm(){return rm=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},rm.apply(this,arguments)}var Oje=function(t){var n=t.value,r=t.formatter,i=ot(t.children)?n:t.children;return Xe(r)?r(i):i},jje=function(t,n){var r=ki(n-t),i=Math.min(Math.abs(n-t),360);return r*i},Nje=function(t,n,r){var i=t.position,a=t.viewBox,o=t.offset,l=t.className,u=a,f=u.cx,d=u.cy,h=u.innerRadius,m=u.outerRadius,g=u.startAngle,x=u.endAngle,w=u.clockWise,y=(h+m)/2,S=jje(g,x),E=S>=0?1:-1,_,A;i==="insideStart"?(_=g+E*o,A=w):i==="insideEnd"?(_=x-E*o,A=!w):i==="end"&&(_=x+E*o,A=w),A=S<=0?A:!A;var C=Bn(f,d,y,_),O=Bn(f,d,y,_+(A?1:-1)*359),P="M".concat(C.x,",").concat(C.y,`
|
|
403
|
+
A`).concat(y,",").concat(y,",0,1,").concat(A?0:1,`,
|
|
404
|
+
`).concat(O.x,",").concat(O.y),M=ot(t.id)?Qm("recharts-radial-line-"):t.id;return ie.createElement("text",rm({},r,{dominantBaseline:"central",className:ut("recharts-radial-bar-label",l)}),ie.createElement("defs",null,ie.createElement("path",{id:M,d:P})),ie.createElement("textPath",{xlinkHref:"#".concat(M)},n))},Pje=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,l=a.cy,u=a.innerRadius,f=a.outerRadius,d=a.startAngle,h=a.endAngle,m=(d+h)/2;if(i==="outside"){var g=Bn(o,l,f+r,m),x=g.x,w=g.y;return{x,y:w,textAnchor:x>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var y=(u+f)/2,S=Bn(o,l,y,m),E=S.x,_=S.y;return{x:E,y:_,textAnchor:"middle",verticalAnchor:"middle"}},Mje=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,l=o.x,u=o.y,f=o.width,d=o.height,h=d>=0?1:-1,m=h*i,g=h>0?"end":"start",x=h>0?"start":"end",w=f>=0?1:-1,y=w*i,S=w>0?"end":"start",E=w>0?"start":"end";if(a==="top"){var _={x:l+f/2,y:u-h*i,textAnchor:"middle",verticalAnchor:g};return _n(_n({},_),r?{height:Math.max(u-r.y,0),width:f}:{})}if(a==="bottom"){var A={x:l+f/2,y:u+d+m,textAnchor:"middle",verticalAnchor:x};return _n(_n({},A),r?{height:Math.max(r.y+r.height-(u+d),0),width:f}:{})}if(a==="left"){var C={x:l-y,y:u+d/2,textAnchor:S,verticalAnchor:"middle"};return _n(_n({},C),r?{width:Math.max(C.x-r.x,0),height:d}:{})}if(a==="right"){var O={x:l+f+y,y:u+d/2,textAnchor:E,verticalAnchor:"middle"};return _n(_n({},O),r?{width:Math.max(r.x+r.width-O.x,0),height:d}:{})}var P=r?{width:f,height:d}:{};return a==="insideLeft"?_n({x:l+y,y:u+d/2,textAnchor:E,verticalAnchor:"middle"},P):a==="insideRight"?_n({x:l+f-y,y:u+d/2,textAnchor:S,verticalAnchor:"middle"},P):a==="insideTop"?_n({x:l+f/2,y:u+m,textAnchor:"middle",verticalAnchor:x},P):a==="insideBottom"?_n({x:l+f/2,y:u+d-m,textAnchor:"middle",verticalAnchor:g},P):a==="insideTopLeft"?_n({x:l+y,y:u+m,textAnchor:E,verticalAnchor:x},P):a==="insideTopRight"?_n({x:l+f-y,y:u+m,textAnchor:S,verticalAnchor:x},P):a==="insideBottomLeft"?_n({x:l+y,y:u+d-m,textAnchor:E,verticalAnchor:g},P):a==="insideBottomRight"?_n({x:l+f-y,y:u+d-m,textAnchor:S,verticalAnchor:g},P):Ad(a)&&(Se(a.x)||Fl(a.x))&&(Se(a.y)||Fl(a.y))?_n({x:l+Au(a.x,f),y:u+Au(a.y,d),textAnchor:"end",verticalAnchor:"end"},P):_n({x:l+f/2,y:u+d/2,textAnchor:"middle",verticalAnchor:"middle"},P)},Rje=function(t){return"cx"in t&&Se(t.cx)};function Kn(e){var t=e.offset,n=t===void 0?5:t,r=_je(e,vje),i=_n({offset:n},r),a=i.viewBox,o=i.position,l=i.value,u=i.children,f=i.content,d=i.className,h=d===void 0?"":d,m=i.textBreakAll;if(!a||ot(l)&&ot(u)&&!j.isValidElement(f)&&!Xe(f))return null;if(j.isValidElement(f))return j.cloneElement(f,i);var g;if(Xe(f)){if(g=j.createElement(f,i),j.isValidElement(g))return g}else g=Oje(i);var x=Rje(a),w=et(i,!0);if(x&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Nje(i,g,w);var y=x?Pje(i):Mje(i);return ie.createElement(kb,rm({className:ut("recharts-label",h)},w,y,{breakAll:m}),g)}Kn.displayName="Label";var PQ=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,u=t.radius,f=t.innerRadius,d=t.outerRadius,h=t.x,m=t.y,g=t.top,x=t.left,w=t.width,y=t.height,S=t.clockWise,E=t.labelViewBox;if(E)return E;if(Se(w)&&Se(y)){if(Se(h)&&Se(m))return{x:h,y:m,width:w,height:y};if(Se(g)&&Se(x))return{x:g,y:x,width:w,height:y}}return Se(h)&&Se(m)?{x:h,y:m,width:0,height:0}:Se(n)&&Se(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:f||0,outerRadius:d||u||l||0,clockWise:S}:t.viewBox?t.viewBox:{}},kje=function(t,n){return t?t===!0?ie.createElement(Kn,{key:"label-implicit",viewBox:n}):Cn(t)?ie.createElement(Kn,{key:"label-implicit",viewBox:n,value:t}):j.isValidElement(t)?t.type===Kn?j.cloneElement(t,{key:"label-implicit",viewBox:n}):ie.createElement(Kn,{key:"label-implicit",content:t,viewBox:n}):Xe(t)?ie.createElement(Kn,{key:"label-implicit",content:t,viewBox:n}):Ad(t)?ie.createElement(Kn,rm({viewBox:n},t,{key:"label-implicit"})):null:null},Dje=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 i=t.children,a=PQ(t),o=Ii(i,Kn).map(function(u,f){return j.cloneElement(u,{viewBox:n||a,key:"label-".concat(f)})});if(!r)return o;var l=kje(t.label,n||a);return[l].concat(yje(o))};Kn.parseViewBox=PQ;Kn.renderCallByParent=Dje;var Ije=wX();const Lje=yt(Ije);function im(e){"@babel/helpers - typeof";return im=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},im(e)}var $je=["valueAccessor"],Bje=["data","dataKey","clockWise","id","textBreakAll"];function qje(e){return Uje(e)||Fje(e)||Vje(e)||zje()}function zje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
405
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vje(e,t){if(e){if(typeof e=="string")return yP(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 yP(e,t)}}function Fje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Uje(e){if(Array.isArray(e))return yP(e)}function yP(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 Kb(){return Kb=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},Kb.apply(this,arguments)}function T6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T6(Object(n),!0).forEach(function(r){Hje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hje(e,t,n){return t=Gje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gje(e){var t=Wje(e,"string");return im(t)=="symbol"?t:t+""}function Wje(e,t){if(im(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(im(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function j6(e,t){if(e==null)return{};var n=Kje(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kje(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 Yje=function(t){return Array.isArray(t.value)?Lje(t.value):t.value};function qs(e){var t=e.valueAccessor,n=t===void 0?Yje:t,r=j6(e,$je),i=r.data,a=r.dataKey,o=r.clockWise,l=r.id,u=r.textBreakAll,f=j6(r,Bje);return!i||!i.length?null:ie.createElement(Jt,{className:"recharts-label-list"},i.map(function(d,h){var m=ot(a)?n(d,h):Ur(d&&d.payload,a),g=ot(l)?{}:{id:"".concat(l,"-").concat(h)};return ie.createElement(Kn,Kb({},et(d,!0),f,g,{parentViewBox:d.parentViewBox,value:m,textBreakAll:u,viewBox:Kn.parseViewBox(ot(o)?d:O6(O6({},d),{},{clockWise:o})),key:"label-".concat(h),index:h}))}))}qs.displayName="LabelList";function Xje(e,t){return e?e===!0?ie.createElement(qs,{key:"labelList-implicit",data:t}):ie.isValidElement(e)||Xe(e)?ie.createElement(qs,{key:"labelList-implicit",data:t,content:e}):Ad(e)?ie.createElement(qs,Kb({data:t},e,{key:"labelList-implicit"})):null:null}function Zje(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,i=Ii(r,qs).map(function(o,l){return j.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return i;var a=Xje(e.label,t);return[a].concat(qje(i))}qs.renderCallByParent=Zje;function am(e){"@babel/helpers - typeof";return am=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},am(e)}function bP(){return bP=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},bP.apply(this,arguments)}function N6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function P6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N6(Object(n),!0).forEach(function(r){Qje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qje(e,t,n){return t=Jje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jje(e){var t=eNe(e,"string");return am(t)=="symbol"?t:t+""}function eNe(e,t){if(am(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(am(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tNe=function(t,n){var r=ki(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},iy=function(t){var n=t.cx,r=t.cy,i=t.radius,a=t.angle,o=t.sign,l=t.isExternal,u=t.cornerRadius,f=t.cornerIsExternal,d=u*(l?1:-1)+i,h=Math.asin(u/d)/Wb,m=f?a:a+o*h,g=Bn(n,r,d,m),x=Bn(n,r,i,m),w=f?a-o*h:a,y=Bn(n,r,d*Math.cos(h*Wb),w);return{center:g,circleTangency:x,lineTangency:y,theta:h}},MQ=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,l=t.endAngle,u=tNe(o,l),f=o+u,d=Bn(n,r,a,o),h=Bn(n,r,a,f),m="M ".concat(d.x,",").concat(d.y,`
|
|
406
|
+
A `).concat(a,",").concat(a,`,0,
|
|
407
|
+
`).concat(+(Math.abs(u)>180),",").concat(+(o>f),`,
|
|
408
|
+
`).concat(h.x,",").concat(h.y,`
|
|
409
|
+
`);if(i>0){var g=Bn(n,r,i,o),x=Bn(n,r,i,f);m+="L ".concat(x.x,",").concat(x.y,`
|
|
410
|
+
A `).concat(i,",").concat(i,`,0,
|
|
411
|
+
`).concat(+(Math.abs(u)>180),",").concat(+(o<=f),`,
|
|
412
|
+
`).concat(g.x,",").concat(g.y," Z")}else m+="L ".concat(n,",").concat(r," Z");return m},nNe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,u=t.cornerIsExternal,f=t.startAngle,d=t.endAngle,h=ki(d-f),m=iy({cx:n,cy:r,radius:a,angle:f,sign:h,cornerRadius:o,cornerIsExternal:u}),g=m.circleTangency,x=m.lineTangency,w=m.theta,y=iy({cx:n,cy:r,radius:a,angle:d,sign:-h,cornerRadius:o,cornerIsExternal:u}),S=y.circleTangency,E=y.lineTangency,_=y.theta,A=u?Math.abs(f-d):Math.abs(f-d)-w-_;if(A<0)return l?"M ".concat(x.x,",").concat(x.y,`
|
|
413
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
414
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
415
|
+
`):MQ({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:f,endAngle:d});var C="M ".concat(x.x,",").concat(x.y,`
|
|
416
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(g.x,",").concat(g.y,`
|
|
417
|
+
A`).concat(a,",").concat(a,",0,").concat(+(A>180),",").concat(+(h<0),",").concat(S.x,",").concat(S.y,`
|
|
418
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(E.x,",").concat(E.y,`
|
|
419
|
+
`);if(i>0){var O=iy({cx:n,cy:r,radius:i,angle:f,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),P=O.circleTangency,M=O.lineTangency,R=O.theta,$=iy({cx:n,cy:r,radius:i,angle:d,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),I=$.circleTangency,k=$.lineTangency,V=$.theta,D=u?Math.abs(f-d):Math.abs(f-d)-R-V;if(D<0&&o===0)return"".concat(C,"L").concat(n,",").concat(r,"Z");C+="L".concat(k.x,",").concat(k.y,`
|
|
420
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(I.x,",").concat(I.y,`
|
|
421
|
+
A`).concat(i,",").concat(i,",0,").concat(+(D>180),",").concat(+(h>0),",").concat(P.x,",").concat(P.y,`
|
|
422
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(M.x,",").concat(M.y,"Z")}else C+="L".concat(n,",").concat(r,"Z");return C},rNe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},RQ=function(t){var n=P6(P6({},rNe),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,u=n.forceCornerRadius,f=n.cornerIsExternal,d=n.startAngle,h=n.endAngle,m=n.className;if(o<a||d===h)return null;var g=ut("recharts-sector",m),x=o-a,w=Au(l,x,0,!0),y;return w>0&&Math.abs(d-h)<360?y=nNe({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,x/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:d,endAngle:h}):y=MQ({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:d,endAngle:h}),ie.createElement("path",bP({},et(n,!0),{className:g,d:y,role:"img"}))};function om(e){"@babel/helpers - typeof";return om=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},om(e)}function xP(){return xP=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},xP.apply(this,arguments)}function M6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function R6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M6(Object(n),!0).forEach(function(r){iNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iNe(e,t,n){return t=aNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aNe(e){var t=oNe(e,"string");return om(t)=="symbol"?t:t+""}function oNe(e,t){if(om(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(om(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var k6={curveBasisClosed:p_e,curveBasisOpen:m_e,curveBasis:h_e,curveBumpX:JSe,curveBumpY:e_e,curveLinearClosed:g_e,curveLinear:Ox,curveMonotoneX:v_e,curveMonotoneY:y_e,curveNatural:b_e,curveStep:x_e,curveStepAfter:S_e,curveStepBefore:w_e},ay=function(t){return t.x===+t.x&&t.y===+t.y},Hh=function(t){return t.x},Gh=function(t){return t.y},sNe=function(t,n){if(Xe(t))return t;var r="curve".concat(Cx(t));return(r==="curveMonotone"||r==="curveBump")&&n?k6["".concat(r).concat(n==="vertical"?"Y":"X")]:k6[r]||Ox},lNe=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,l=t.layout,u=t.connectNulls,f=u===void 0?!1:u,d=sNe(r,l),h=f?a.filter(function(w){return ay(w)}):a,m;if(Array.isArray(o)){var g=f?o.filter(function(w){return ay(w)}):o,x=h.map(function(w,y){return R6(R6({},w),{},{base:g[y]})});return l==="vertical"?m=Qv().y(Gh).x1(Hh).x0(function(w){return w.base.x}):m=Qv().x(Hh).y1(Gh).y0(function(w){return w.base.y}),m.defined(ay).curve(d),m(x)}return l==="vertical"&&Se(o)?m=Qv().y(Gh).x1(Hh).x0(o):Se(o)?m=Qv().x(Hh).y1(Gh).y0(o):m=sZ().x(Hh).y(Gh),m.defined(ay).curve(d),m(h)},dp=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?lNe(t):i;return j.createElement("path",xP({},et(t,!1),Sb(t),{className:ut("recharts-curve",n),d:o,ref:a}))},ij={exports:{}},aj,D6;function uNe(){if(D6)return aj;D6=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return aj=e,aj}var oj,I6;function cNe(){if(I6)return oj;I6=1;var e=uNe();function t(){}function n(){}return n.resetWarningCache=t,oj=function(){function r(o,l,u,f,d,h){if(h!==e){var m=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 m.name="Invariant Violation",m}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},oj}var L6;function fNe(){return L6||(L6=1,ij.exports=cNe()()),ij.exports}var dNe=fNe();const xt=yt(dNe),{getOwnPropertyNames:hNe,getOwnPropertySymbols:pNe}=Object,{hasOwnProperty:mNe}=Object.prototype;function sj(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function oy(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:a}=i,o=a.get(n),l=a.get(r);if(o&&l)return o===r&&l===n;a.set(n,r),a.set(r,n);const u=e(n,r,i);return a.delete(n),a.delete(r),u}}function gNe(e){return e!=null?e[Symbol.toStringTag]:void 0}function $6(e){return hNe(e).concat(pNe(e))}const vNe=Object.hasOwn||((e,t)=>mNe.call(e,t));function Bu(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const yNe="__v",bNe="__o",xNe="_owner",{getOwnPropertyDescriptor:B6,keys:q6}=Object;function wNe(e,t){return e.byteLength===t.byteLength&&Yb(new Uint8Array(e),new Uint8Array(t))}function SNe(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 _Ne(e,t){return e.byteLength===t.byteLength&&Yb(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function ENe(e,t){return Bu(e.getTime(),t.getTime())}function ANe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function CNe(e,t){return e===t}function z6(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.entries();let o,l,u=0;for(;(o=a.next())&&!o.done;){const f=t.entries();let d=!1,h=0;for(;(l=f.next())&&!l.done;){if(i[h]){h++;continue}const m=o.value,g=l.value;if(n.equals(m[0],g[0],u,h,e,t,n)&&n.equals(m[1],g[1],m[0],g[0],e,t,n)){d=i[h]=!0;break}h++}if(!d)return!1;u++}return!0}const TNe=Bu;function ONe(e,t,n){const r=q6(e);let i=r.length;if(q6(t).length!==i)return!1;for(;i-- >0;)if(!kQ(e,t,n,r[i]))return!1;return!0}function Wh(e,t,n){const r=$6(e);let i=r.length;if($6(t).length!==i)return!1;let a,o,l;for(;i-- >0;)if(a=r[i],!kQ(e,t,n,a)||(o=B6(e,a),l=B6(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function jNe(e,t){return Bu(e.valueOf(),t.valueOf())}function NNe(e,t){return e.source===t.source&&e.flags===t.flags}function V6(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const u=t.values();let f=!1,d=0;for(;(l=u.next())&&!l.done;){if(!i[d]&&n.equals(o.value,l.value,o.value,l.value,e,t,n)){f=i[d]=!0;break}d++}if(!f)return!1}return!0}function Yb(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 PNe(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 kQ(e,t,n,r){return(r===xNe||r===bNe||r===yNe)&&(e.$$typeof||t.$$typeof)?!0:vNe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const MNe="[object ArrayBuffer]",RNe="[object Arguments]",kNe="[object Boolean]",DNe="[object DataView]",INe="[object Date]",LNe="[object Error]",$Ne="[object Map]",BNe="[object Number]",qNe="[object Object]",zNe="[object RegExp]",VNe="[object Set]",FNe="[object String]",UNe={"[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},HNe="[object URL]",GNe=Object.prototype.toString;function WNe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:u,arePrimitiveWrappersEqual:f,areRegExpsEqual:d,areSetsEqual:h,areTypedArraysEqual:m,areUrlsEqual:g,unknownTagComparators:x}){return function(y,S,E){if(y===S)return!0;if(y==null||S==null)return!1;const _=typeof y;if(_!==typeof S)return!1;if(_!=="object")return _==="number"?l(y,S,E):_==="function"?a(y,S,E):!1;const A=y.constructor;if(A!==S.constructor)return!1;if(A===Object)return u(y,S,E);if(Array.isArray(y))return t(y,S,E);if(A===Date)return r(y,S,E);if(A===RegExp)return d(y,S,E);if(A===Map)return o(y,S,E);if(A===Set)return h(y,S,E);const C=GNe.call(y);if(C===INe)return r(y,S,E);if(C===zNe)return d(y,S,E);if(C===$Ne)return o(y,S,E);if(C===VNe)return h(y,S,E);if(C===qNe)return typeof y.then!="function"&&typeof S.then!="function"&&u(y,S,E);if(C===HNe)return g(y,S,E);if(C===LNe)return i(y,S,E);if(C===RNe)return u(y,S,E);if(UNe[C])return m(y,S,E);if(C===MNe)return e(y,S,E);if(C===DNe)return n(y,S,E);if(C===kNe||C===BNe||C===FNe)return f(y,S,E);if(x){let O=x[C];if(!O){const P=gNe(y);P&&(O=x[P])}if(O)return O(y,S,E)}return!1}}function KNe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:wNe,areArraysEqual:n?Wh:SNe,areDataViewsEqual:_Ne,areDatesEqual:ENe,areErrorsEqual:ANe,areFunctionsEqual:CNe,areMapsEqual:n?sj(z6,Wh):z6,areNumbersEqual:TNe,areObjectsEqual:n?Wh:ONe,arePrimitiveWrappersEqual:jNe,areRegExpsEqual:NNe,areSetsEqual:n?sj(V6,Wh):V6,areTypedArraysEqual:n?sj(Yb,Wh):Yb,areUrlsEqual:PNe,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=oy(r.areArraysEqual),a=oy(r.areMapsEqual),o=oy(r.areObjectsEqual),l=oy(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return r}function YNe(e){return function(t,n,r,i,a,o,l){return e(t,n,l)}}function XNe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(l,u){const{cache:f=e?new WeakMap:void 0,meta:d}=n();return t(l,u,{cache:f,equals:r,meta:d,strict:i})};if(e)return function(l,u){return t(l,u,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(l,u){return t(l,u,a)}}const ZNe=rl();rl({strict:!0});rl({circular:!0});rl({circular:!0,strict:!0});rl({createInternalComparator:()=>Bu});rl({strict:!0,createInternalComparator:()=>Bu});rl({circular:!0,createInternalComparator:()=>Bu});rl({circular:!0,createInternalComparator:()=>Bu,strict:!0});function rl(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=KNe(e),o=WNe(a),l=n?n(o):YNe(o);return XNe({circular:t,comparator:o,createState:r,equals:l,strict:i})}function QNe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function F6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):QNe(i)};requestAnimationFrame(r)}function wP(e){"@babel/helpers - typeof";return wP=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},wP(e)}function JNe(e){return rPe(e)||nPe(e)||tPe(e)||ePe()}function ePe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
423
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tPe(e,t){if(e){if(typeof e=="string")return U6(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 U6(e,t)}}function U6(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){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rPe(e){if(Array.isArray(e))return e}function iPe(){var e={},t=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var o=a,l=JNe(o),u=l[0],f=l.slice(1);if(typeof u=="number"){F6(i.bind(null,f),u);return}i(u),F6(i.bind(null,f));return}wP(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function sm(e){"@babel/helpers - typeof";return sm=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},sm(e)}function H6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function G6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H6(Object(n),!0).forEach(function(r){DQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DQ(e,t,n){return t=aPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aPe(e){var t=oPe(e,"string");return sm(t)==="symbol"?t:String(t)}function oPe(e,t){if(sm(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sPe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},lPe=function(t){return t},uPe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},hp=function(t,n){return Object.keys(n).reduce(function(r,i){return G6(G6({},r),{},DQ({},i,t(i,n[i])))},{})},W6=function(t,n,r){return t.map(function(i){return"".concat(uPe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function cPe(e,t){return hPe(e)||dPe(e,t)||IQ(e,t)||fPe()}function fPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
424
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function hPe(e){if(Array.isArray(e))return e}function pPe(e){return vPe(e)||gPe(e)||IQ(e)||mPe()}function mPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
425
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IQ(e,t){if(e){if(typeof e=="string")return SP(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 SP(e,t)}}function gPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vPe(e){if(Array.isArray(e))return SP(e)}function SP(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 Xb=1e-4,LQ=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},$Q=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},K6=function(t,n){return function(r){var i=LQ(t,n);return $Q(i,r)}},yPe=function(t,n){return function(r){var i=LQ(t,n),a=[].concat(pPe(i.map(function(o,l){return o*l}).slice(1)),[0]);return $Q(a,r)}},Y6=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1],o=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,o=1,l=1;break;case"ease":i=.25,a=.1,o=.25,l=1;break;case"ease-in":i=.42,a=0,o=1,l=1;break;case"ease-out":i=.42,a=0,o=.58,l=1;break;case"ease-in-out":i=0,a=0,o=.58,l=1;break;default:{var u=n[0].split("(");if(u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4){var f=u[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),d=cPe(f,4);i=d[0],a=d[1],o=d[2],l=d[3]}}}var h=K6(i,o),m=K6(a,l),g=yPe(i,o),x=function(S){return S>1?1:S<0?0:S},w=function(S){for(var E=S>1?1:S,_=E,A=0;A<8;++A){var C=h(_)-E,O=g(_);if(Math.abs(C-E)<Xb||O<Xb)return m(_);_=x(_-C/O)}return m(_)};return w.isStepper=!1,w},bPe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,u=function(d,h,m){var g=-(d-h)*r,x=m*a,w=m+(g-x)*l/1e3,y=m*l/1e3+d;return Math.abs(y-h)<Xb&&Math.abs(w)<Xb?[h,0]:[y,w]};return u.isStepper=!0,u.dt=l,u},xPe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Y6(i);case"spring":return bPe();default:if(i.split("(")[0]==="cubic-bezier")return Y6(i)}return typeof i=="function"?i:null};function lm(e){"@babel/helpers - typeof";return lm=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},lm(e)}function X6(e){return _Pe(e)||SPe(e)||BQ(e)||wPe()}function wPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
426
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Pe(e){if(Array.isArray(e))return EP(e)}function Z6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z6(Object(n),!0).forEach(function(r){_P(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _P(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=APe(e,"string");return lm(t)==="symbol"?t:String(t)}function APe(e,t){if(lm(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CPe(e,t){return jPe(e)||OPe(e,t)||BQ(e,t)||TPe()}function TPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
427
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BQ(e,t){if(e){if(typeof e=="string")return EP(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 EP(e,t)}}function EP(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 OPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function jPe(e){if(Array.isArray(e))return e}var Zb=function(t,n,r){return t+(n-t)*r},AP=function(t){var n=t.from,r=t.to;return n!==r},NPe=function e(t,n,r){var i=hp(function(a,o){if(AP(o)){var l=t(o.from,o.to,o.velocity),u=CPe(l,2),f=u[0],d=u[1];return Ln(Ln({},o),{},{from:f,velocity:d})}return o},n);return r<1?hp(function(a,o){return AP(o)?Ln(Ln({},o),{},{velocity:Zb(o.velocity,i[a].velocity,r),from:Zb(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const PPe=(function(e,t,n,r,i){var a=sPe(e,t),o=a.reduce(function(y,S){return Ln(Ln({},y),{},_P({},S,[e[S],t[S]]))},{}),l=a.reduce(function(y,S){return Ln(Ln({},y),{},_P({},S,{from:e[S],velocity:0,to:t[S]}))},{}),u=-1,f,d,h=function(){return null},m=function(){return hp(function(S,E){return E.from},l)},g=function(){return!Object.values(l).filter(AP).length},x=function(S){f||(f=S);var E=S-f,_=E/n.dt;l=NPe(n,l,_),i(Ln(Ln(Ln({},e),t),m())),f=S,g()||(u=requestAnimationFrame(h))},w=function(S){d||(d=S);var E=(S-d)/r,_=hp(function(C,O){return Zb.apply(void 0,X6(O).concat([n(E)]))},o);if(i(Ln(Ln(Ln({},e),t),_)),E<1)u=requestAnimationFrame(h);else{var A=hp(function(C,O){return Zb.apply(void 0,X6(O).concat([n(1)]))},o);i(Ln(Ln(Ln({},e),t),A))}};return h=n.isStepper?x:w,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(u)}}});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)}var MPe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function RPe(e,t){if(e==null)return{};var n=kPe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kPe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function lj(e){return $Pe(e)||LPe(e)||IPe(e)||DPe()}function DPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
428
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IPe(e,t){if(e){if(typeof e=="string")return CP(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 CP(e,t)}}function LPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $Pe(e){if(Array.isArray(e))return CP(e)}function CP(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 Q6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Si(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q6(Object(n),!0).forEach(function(r){ip(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ip(e,t,n){return t=qQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qPe(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,qQ(r.key),r)}}function zPe(e,t,n){return t&&qPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qQ(e){var t=VPe(e,"string");return Wf(t)==="symbol"?t:String(t)}function VPe(e,t){if(Wf(e)!=="object"||e===null)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)}function FPe(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&&TP(e,t)}function TP(e,t){return TP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},TP(e,t)}function UPe(e){var t=HPe();return function(){var r=Qb(e),i;if(t){var a=Qb(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return OP(this,i)}}function OP(e,t){if(t&&(Wf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jP(e)}function jP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HPe(){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 Qb(e){return Qb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qb(e)}var yo=(function(e){FPe(n,e);var t=UPe(n);function n(r,i){var a;BPe(this,n),a=t.call(this,r,i);var o=a.props,l=o.isActive,u=o.attributeName,f=o.from,d=o.to,h=o.steps,m=o.children,g=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(jP(a)),a.changeStyle=a.changeStyle.bind(jP(a)),!l||g<=0)return a.state={style:{}},typeof m=="function"&&(a.state={style:d}),OP(a);if(h&&h.length)a.state={style:h[0].style};else if(f){if(typeof m=="function")return a.state={style:f},OP(a);a.state={style:u?ip({},u,f):f}}else a.state={style:{}};return a}return zPe(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,l=a.canBegin,u=a.attributeName,f=a.shouldReAnimate,d=a.to,h=a.from,m=this.state.style;if(l){if(!o){var g={style:u?ip({},u,d):d};this.state&&m&&(u&&m[u]!==d||!u&&m!==d)&&this.setState(g);return}if(!(ZNe(i.to,d)&&i.canBegin&&i.isActive)){var x=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=x||f?h:i.to;if(this.state&&m){var y={style:u?ip({},u,w):w};(u&&m[u]!==w||!u&&m!==w)&&this.setState(y)}this.runAnimation(Si(Si({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,l=i.to,u=i.duration,f=i.easing,d=i.begin,h=i.onAnimationEnd,m=i.onAnimationStart,g=PPe(o,l,xPe(f),u,this.changeStyle),x=function(){a.stopJSAnimation=g()};this.manager.start([m,d,x,u,h])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,u=i.onAnimationStart,f=o[0],d=f.style,h=f.duration,m=h===void 0?0:h,g=function(w,y,S){if(S===0)return w;var E=y.duration,_=y.easing,A=_===void 0?"ease":_,C=y.style,O=y.properties,P=y.onAnimationEnd,M=S>0?o[S-1]:y,R=O||Object.keys(C);if(typeof A=="function"||A==="spring")return[].concat(lj(w),[a.runJSAnimation.bind(a,{from:M.style,to:C,duration:E,easing:A}),E]);var $=W6(R,E,A),I=Si(Si(Si({},M.style),C),{},{transition:$});return[].concat(lj(w),[I,E,P]).filter(lPe)};return this.manager.start([u].concat(lj(o.reduce(g,[d,Math.max(m,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=iPe());var a=i.begin,o=i.duration,l=i.attributeName,u=i.to,f=i.easing,d=i.onAnimationStart,h=i.onAnimationEnd,m=i.steps,g=i.children,x=this.manager;if(this.unSubscribe=x.subscribe(this.handleStyleChange),typeof f=="function"||typeof g=="function"||f==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var w=l?ip({},l,u):u,y=W6(Object.keys(w),o,f);x.start([d,a,Si(Si({},w),{},{transition:y}),o,h])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=RPe(i,MPe),f=j.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!l||f===0||o<=0)return a;var h=function(g){var x=g.props,w=x.style,y=w===void 0?{}:w,S=x.className,E=j.cloneElement(g,Si(Si({},u),{},{style:Si(Si({},y),d),className:S}));return E};return f===1?h(j.Children.only(a)):ie.createElement("div",null,j.Children.map(a,function(m){return h(m)}))}}]),n})(j.PureComponent);yo.displayName="Animate";yo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};yo.propTypes={from:xt.oneOfType([xt.object,xt.string]),to:xt.oneOfType([xt.object,xt.string]),attributeName:xt.string,duration:xt.number,begin:xt.number,easing:xt.oneOfType([xt.string,xt.func]),steps:xt.arrayOf(xt.shape({duration:xt.number.isRequired,style:xt.object.isRequired,easing:xt.oneOfType([xt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),xt.func]),properties:xt.arrayOf("string"),onAnimationEnd:xt.func})),children:xt.oneOfType([xt.node,xt.func]),isActive:xt.bool,canBegin:xt.bool,onAnimationEnd:xt.func,shouldReAnimate:xt.bool,onAnimationStart:xt.func,onAnimationReStart:xt.func};function um(e){"@babel/helpers - typeof";return um=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},um(e)}function Jb(){return Jb=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},Jb.apply(this,arguments)}function GPe(e,t){return XPe(e)||YPe(e,t)||KPe(e,t)||WPe()}function WPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
429
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KPe(e,t){if(e){if(typeof e=="string")return J6(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 J6(e,t)}}function J6(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 YPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function XPe(e){if(Array.isArray(e))return e}function eH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eH(Object(n),!0).forEach(function(r){ZPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZPe(e,t,n){return t=QPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QPe(e){var t=JPe(e,"string");return um(t)=="symbol"?t:t+""}function JPe(e,t){if(um(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(um(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nH=function(t,n,r,i,a){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),l=i>=0?1:-1,u=r>=0?1:-1,f=i>=0&&r>=0||i<0&&r<0?1:0,d;if(o>0&&a instanceof Array){for(var h=[0,0,0,0],m=0,g=4;m<g;m++)h[m]=a[m]>o?o:a[m];d="M".concat(t,",").concat(n+l*h[0]),h[0]>0&&(d+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(f,",").concat(t+u*h[0],",").concat(n)),d+="L ".concat(t+r-u*h[1],",").concat(n),h[1]>0&&(d+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(f,`,
|
|
430
|
+
`).concat(t+r,",").concat(n+l*h[1])),d+="L ".concat(t+r,",").concat(n+i-l*h[2]),h[2]>0&&(d+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(f,`,
|
|
431
|
+
`).concat(t+r-u*h[2],",").concat(n+i)),d+="L ".concat(t+u*h[3],",").concat(n+i),h[3]>0&&(d+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(f,`,
|
|
432
|
+
`).concat(t,",").concat(n+i-l*h[3])),d+="Z"}else if(o>0&&a===+a&&a>0){var x=Math.min(o,a);d="M ".concat(t,",").concat(n+l*x,`
|
|
433
|
+
A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(t+u*x,",").concat(n,`
|
|
434
|
+
L `).concat(t+r-u*x,",").concat(n,`
|
|
435
|
+
A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(t+r,",").concat(n+l*x,`
|
|
436
|
+
L `).concat(t+r,",").concat(n+i-l*x,`
|
|
437
|
+
A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(t+r-u*x,",").concat(n+i,`
|
|
438
|
+
L `).concat(t+u*x,",").concat(n+i,`
|
|
439
|
+
A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(t,",").concat(n+i-l*x," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},eMe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,l=n.width,u=n.height;if(Math.abs(l)>0&&Math.abs(u)>0){var f=Math.min(a,a+l),d=Math.max(a,a+l),h=Math.min(o,o+u),m=Math.max(o,o+u);return r>=f&&r<=d&&i>=h&&i<=m}return!1},tMe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},U2=function(t){var n=tH(tH({},tMe),t),r=j.useRef(),i=j.useState(-1),a=GPe(i,2),o=a[0],l=a[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&l(A)}catch{}},[]);var u=n.x,f=n.y,d=n.width,h=n.height,m=n.radius,g=n.className,x=n.animationEasing,w=n.animationDuration,y=n.animationBegin,S=n.isAnimationActive,E=n.isUpdateAnimationActive;if(u!==+u||f!==+f||d!==+d||h!==+h||d===0||h===0)return null;var _=ut("recharts-rectangle",g);return E?ie.createElement(yo,{canBegin:o>0,from:{width:d,height:h,x:u,y:f},to:{width:d,height:h,x:u,y:f},duration:w,animationEasing:x,isActive:E},function(A){var C=A.width,O=A.height,P=A.x,M=A.y;return ie.createElement(yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:w,isActive:S,easing:x},ie.createElement("path",Jb({},et(n,!0),{className:_,d:nH(P,M,C,O,m),ref:r})))}):ie.createElement("path",Jb({},et(n,!0),{className:_,d:nH(u,f,d,h,m)}))};function NP(){return NP=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},NP.apply(this,arguments)}var H2=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=ut("recharts-dot",a);return n===+n&&r===+r&&i===+i?j.createElement("circle",NP({},et(t,!1),Sb(t),{className:o,cx:n,cy:r,r:i})):null};function cm(e){"@babel/helpers - typeof";return cm=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},cm(e)}var nMe=["x","y","top","left","width","height","className"];function PP(){return PP=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},PP.apply(this,arguments)}function rH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rMe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rH(Object(n),!0).forEach(function(r){iMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iMe(e,t,n){return t=aMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aMe(e){var t=oMe(e,"string");return cm(t)=="symbol"?t:t+""}function oMe(e,t){if(cm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sMe(e,t){if(e==null)return{};var n=lMe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lMe(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 uMe=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},cMe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,u=t.left,f=u===void 0?0:u,d=t.width,h=d===void 0?0:d,m=t.height,g=m===void 0?0:m,x=t.className,w=sMe(t,nMe),y=rMe({x:r,y:a,top:l,left:f,width:h,height:g},w);return!Se(r)||!Se(a)||!Se(h)||!Se(g)||!Se(l)||!Se(f)?null:ie.createElement("path",PP({},et(y,!0),{className:ut("recharts-cross",x),d:uMe(r,a,h,g,l,f)}))},fMe=AX();const dMe=yt(fMe);var uj,iH;function hMe(){if(iH)return uj;iH=1;var e=So(),t=pi(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return uj=r,uj}var pMe=hMe();const mMe=yt(pMe);function fm(e){"@babel/helpers - typeof";return fm=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},fm(e)}function e0(){return e0=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},e0.apply(this,arguments)}function gMe(e,t){return xMe(e)||bMe(e,t)||yMe(e,t)||vMe()}function vMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
440
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yMe(e,t){if(e){if(typeof e=="string")return aH(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 aH(e,t)}}function aH(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 bMe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function xMe(e){if(Array.isArray(e))return e}function oH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oH(Object(n),!0).forEach(function(r){wMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wMe(e,t,n){return t=SMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SMe(e){var t=_Me(e,"string");return fm(t)=="symbol"?t:t+""}function _Me(e,t){if(fm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lH=function(t,n,r,i,a){var o=r-i,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-o/2,",").concat(n+a),l+="L ".concat(t+r-o/2-i,",").concat(n+a),l+="L ".concat(t,",").concat(n," Z"),l},EMe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},AMe=function(t){var n=sH(sH({},EMe),t),r=j.useRef(),i=j.useState(-1),a=gMe(i,2),o=a[0],l=a[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&l(_)}catch{}},[]);var u=n.x,f=n.y,d=n.upperWidth,h=n.lowerWidth,m=n.height,g=n.className,x=n.animationEasing,w=n.animationDuration,y=n.animationBegin,S=n.isUpdateAnimationActive;if(u!==+u||f!==+f||d!==+d||h!==+h||m!==+m||d===0&&h===0||m===0)return null;var E=ut("recharts-trapezoid",g);return S?ie.createElement(yo,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:m,x:u,y:f},to:{upperWidth:d,lowerWidth:h,height:m,x:u,y:f},duration:w,animationEasing:x,isActive:S},function(_){var A=_.upperWidth,C=_.lowerWidth,O=_.height,P=_.x,M=_.y;return ie.createElement(yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:w,easing:x},ie.createElement("path",e0({},et(n,!0),{className:E,d:lH(P,M,A,C,O),ref:r})))}):ie.createElement("g",null,ie.createElement("path",e0({},et(n,!0),{className:E,d:lH(u,f,d,h,m)})))},CMe=["option","shapeType","propTransformer","activeClassName","isActive"];function dm(e){"@babel/helpers - typeof";return dm=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},dm(e)}function TMe(e,t){if(e==null)return{};var n=OMe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OMe(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 uH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function t0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uH(Object(n),!0).forEach(function(r){jMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jMe(e,t,n){return t=NMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NMe(e){var t=PMe(e,"string");return dm(t)=="symbol"?t:t+""}function PMe(e,t){if(dm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MMe(e,t){return t0(t0({},t),e)}function RMe(e,t){return e==="symbols"}function cH(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return ie.createElement(U2,n);case"trapezoid":return ie.createElement(AMe,n);case"sector":return ie.createElement(RQ,n);case"symbols":if(RMe(t))return ie.createElement(y2,n);break;default:return null}}function kMe(e){return j.isValidElement(e)?e.props:e}function DMe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?MMe:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,u=TMe(e,CMe),f;if(j.isValidElement(t))f=j.cloneElement(t,t0(t0({},u),kMe(t)));else if(Xe(t))f=t(u);else if(dMe(t)&&!mMe(t)){var d=i(t,u);f=ie.createElement(cH,{shapeType:n,elementProps:d})}else{var h=u;f=ie.createElement(cH,{shapeType:n,elementProps:h})}return l?ie.createElement(Jt,{className:o},f):f}function zx(e,t){return t!=null&&"trapezoids"in e.props}function Vx(e,t){return t!=null&&"sectors"in e.props}function hm(e,t){return t!=null&&"points"in e.props}function IMe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function LMe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function $Me(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function BMe(e,t){var n;return zx(e,t)?n=IMe:Vx(e,t)?n=LMe:hm(e,t)&&(n=$Me),n}function qMe(e,t){var n;return zx(e,t)?n="trapezoids":Vx(e,t)?n="sectors":hm(e,t)&&(n="points"),n}function zMe(e,t){if(zx(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(Vx(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 hm(e,t)?t.payload:{}}function VMe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=qMe(n,t),a=zMe(n,t),o=r.filter(function(u,f){var d=Xp(a,u),h=n.props[i].filter(function(x){var w=BMe(n,t);return w(x,t)}),m=n.props[i].indexOf(h[h.length-1]),g=f===m;return d&&g}),l=r.indexOf(o[o.length-1]);return l}var FMe=NX();const n0=yt(FMe);function pm(e){"@babel/helpers - typeof";return pm=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},pm(e)}function fH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fH(Object(n),!0).forEach(function(r){zQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zQ(e,t,n){return t=UMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UMe(e){var t=HMe(e,"string");return pm(t)=="symbol"?t:t+""}function HMe(e,t){if(pm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GMe=["Webkit","Moz","O","ms"],WMe=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=GMe.reduce(function(a,o){return dH(dH({},a),{},zQ({},o+r,n))},{});return i[t]=n,i};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 r0(){return r0=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},r0.apply(this,arguments)}function hH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hH(Object(n),!0).forEach(function(r){Rr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pH(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,FQ(r.key),r)}}function YMe(e,t,n){return t&&pH(e.prototype,t),n&&pH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function XMe(e,t,n){return t=i0(t),ZMe(e,VQ()?Reflect.construct(t,n||[],i0(e).constructor):t.apply(e,n))}function ZMe(e,t){if(t&&(Kf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return QMe(e)}function QMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function VQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(VQ=function(){return!!e})()}function i0(e){return i0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},i0(e)}function JMe(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&&MP(e,t)}function MP(e,t){return MP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},MP(e,t)}function Rr(e,t,n){return t=FQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FQ(e){var t=eRe(e,"string");return Kf(t)=="symbol"?t:t+""}function eRe(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 String(e)}var tRe=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var u=n.length,f=cp().domain(n0(0,u)).range([a,a+o-l]),d=f.domain().map(function(h){return f(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(r),endX:f(i),scale:f,scaleValues:d}},mH=function(t){return t.changedTouches&&!!t.changedTouches.length},Yf=(function(e){function t(n){var r;return KMe(this,t),r=XMe(this,t,[n]),Rr(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Rr(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Rr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),r.detachDragEndListener()}),Rr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Rr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Rr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Rr(r,"handleSlideDragStart",function(i){var a=mH(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return JMe(t,e),YMe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,l=this.props,u=l.gap,f=l.data,d=f.length-1,h=Math.min(i,a),m=Math.max(i,a),g=t.getIndexInRange(o,h),x=t.getIndexInRange(o,m);return{startIndex:g-g%u,endIndex:x===d?d:x-x%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,u=Ur(a[r],l,r);return Xe(o)?o(u,r):u}},{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 i=this.state,a=i.slideMoveStartX,o=i.startX,l=i.endX,u=this.props,f=u.x,d=u.width,h=u.travellerWidth,m=u.startIndex,g=u.endIndex,x=u.onChange,w=r.pageX-a;w>0?w=Math.min(w,f+d-h-l,f+d-h-o):w<0&&(w=Math.max(w,f-o,f-l));var y=this.getIndex({startX:o+w,endX:l+w});(y.startIndex!==m||y.endIndex!==g)&&x&&x(y),this.setState({startX:o+w,endX:l+w,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=mH(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,u=i.startX,f=this.state[o],d=this.props,h=d.x,m=d.width,g=d.travellerWidth,x=d.onChange,w=d.gap,y=d.data,S={startX:this.state.startX,endX:this.state.endX},E=r.pageX-a;E>0?E=Math.min(E,h+m-g-f):E<0&&(E=Math.max(E,h-f)),S[o]=f+E;var _=this.getIndex(S),A=_.startIndex,C=_.endIndex,O=function(){var M=y.length-1;return o==="startX"&&(l>u?A%w===0:C%w===0)||l<u&&C===M||o==="endX"&&(l>u?C%w===0:A%w===0)||l>u&&C===M};this.setState(Rr(Rr({},o,f+E),"brushMoveStartX",r.pageX),function(){x&&O()&&x(_)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,l=o.scaleValues,u=o.startX,f=o.endX,d=this.state[i],h=l.indexOf(d);if(h!==-1){var m=h+r;if(!(m===-1||m>=l.length)){var g=l[m];i==="startX"&&g>=f||i==="endX"&&g<=u||this.setState(Rr({},i,g),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.fill,f=r.stroke;return ie.createElement("rect",{stroke:f,fill:u,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.data,f=r.children,d=r.padding,h=j.Children.only(f);return h?ie.cloneElement(h,{x:i,y:a,width:o,height:l,margin:d,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,l=this,u=this.props,f=u.y,d=u.travellerWidth,h=u.height,m=u.traveller,g=u.ariaLabel,x=u.data,w=u.startIndex,y=u.endIndex,S=Math.max(r,this.props.x),E=cj(cj({},et(this.props,!1)),{},{x:S,y:f,width:d,height:h}),_=g||"Min value: ".concat((a=x[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=x[y])===null||o===void 0?void 0:o.name);return ie.createElement(Jt,{tabIndex:0,role:"slider","aria-label":_,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(C){["ArrowLeft","ArrowRight"].includes(C.key)&&(C.preventDefault(),C.stopPropagation(),l.handleTravellerMoveKeyboard(C.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,E))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,l=a.height,u=a.stroke,f=a.travellerWidth,d=Math.min(r,i)+f,h=Math.max(Math.abs(i-r)-f,0);return ie.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:d,y:o,width:h,height:l})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,l=r.height,u=r.travellerWidth,f=r.stroke,d=this.state,h=d.startX,m=d.endX,g=5,x={pointerEvents:"none",fill:f};return ie.createElement(Jt,{className:"recharts-brush-texts"},ie.createElement(kb,r0({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,m)-g,y:o+l/2},x),this.getTextOfTick(i)),ie.createElement(kb,r0({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,m)+u+g,y:o+l/2},x),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,l=r.x,u=r.y,f=r.width,d=r.height,h=r.alwaysShowText,m=this.state,g=m.startX,x=m.endX,w=m.isTextActive,y=m.isSlideMoving,S=m.isTravellerMoving,E=m.isTravellerFocused;if(!i||!i.length||!Se(l)||!Se(u)||!Se(f)||!Se(d)||f<=0||d<=0)return null;var _=ut("recharts-brush",a),A=ie.Children.count(o)===1,C=WMe("userSelect","none");return ie.createElement(Jt,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:C},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(g,x),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(x,"endX"),(w||y||S||E||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,l=r.height,u=r.stroke,f=Math.floor(a+l/2)-1;return ie.createElement(ie.Fragment,null,ie.createElement("rect",{x:i,y:a,width:o,height:l,fill:u,stroke:"none"}),ie.createElement("line",{x1:i+1,y1:f,x2:i+o-1,y2:f,fill:"none",stroke:"#fff"}),ie.createElement("line",{x1:i+1,y1:f+2,x2:i+o-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return ie.isValidElement(r)?a=ie.cloneElement(r,i):Xe(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,l=r.x,u=r.travellerWidth,f=r.updateId,d=r.startIndex,h=r.endIndex;if(a!==i.prevData||f!==i.prevUpdateId)return cj({prevData:a,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:o},a&&a.length?tRe({data:a,width:o,x:l,travellerWidth:u,startIndex:d,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([l,l+o-u]);var m=i.scale.domain().map(function(g){return i.scale(g)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,l=a-1;l-o>1;){var u=Math.floor((o+l)/2);r[u]>i?l=u:o=u}return i>=r[l]?l:o}}])})(j.PureComponent);Rr(Yf,"displayName","Brush");Rr(Yf,"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 fj,gH;function nRe(){if(gH)return fj;gH=1;var e=Sd();function t(n,r){var i;return e(n,function(a,o,l){return i=r(a,o,l),!i}),!!i}return fj=t,fj}var dj,vH;function rRe(){if(vH)return dj;vH=1;var e=UY(),t=mi(),n=nRe(),r=on(),i=Ed();function a(o,l,u){var f=r(o)?e:n;return u&&i(o,l,u)&&(l=void 0),f(o,t(l,3))}return dj=a,dj}var iRe=rRe();const aRe=yt(iRe);var fa=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},oRe=SX();const sRe=yt(oRe);var hj,yH;function lRe(){if(yH)return hj;yH=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return hj=e,hj}var pj,bH;function uRe(){if(bH)return pj;bH=1;var e=Sd();function t(n,r){var i=!0;return e(n,function(a,o,l){return i=!!r(a,o,l),i}),i}return pj=t,pj}var mj,xH;function cRe(){if(xH)return mj;xH=1;var e=lRe(),t=uRe(),n=mi(),r=on(),i=Ed();function a(o,l,u){var f=r(o)?e:t;return u&&i(o,l,u)&&(l=void 0),f(o,n(l,3))}return mj=a,mj}var fRe=cRe();const UQ=yt(fRe);var dRe=["x","y"];function mm(e){"@babel/helpers - typeof";return mm=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},mm(e)}function RP(){return RP=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},RP.apply(this,arguments)}function wH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wH(Object(n),!0).forEach(function(r){hRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hRe(e,t,n){return t=pRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pRe(e){var t=mRe(e,"string");return mm(t)=="symbol"?t:t+""}function mRe(e,t){if(mm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gRe(e,t){if(e==null)return{};var n=vRe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vRe(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 yRe(e,t){var n=e.x,r=e.y,i=gRe(e,dRe),a="".concat(n),o=parseInt(a,10),l="".concat(r),u=parseInt(l,10),f="".concat(t.height||i.height),d=parseInt(f,10),h="".concat(t.width||i.width),m=parseInt(h,10);return Kh(Kh(Kh(Kh(Kh({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:d,width:m,name:t.name,radius:t.radius})}function SH(e){return ie.createElement(DMe,RP({shapeType:"rectangle",propTransformer:yRe,activeClassName:"recharts-active-bar"},e))}var bRe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=Se(r)||xSe(r);return a?t(r,i):(a||Tu(),n)}},xRe=["value","background"],HQ;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 wRe(e,t){if(e==null)return{};var n=SRe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SRe(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 a0(){return a0=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},a0.apply(this,arguments)}function _H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_H(Object(n),!0).forEach(function(r){Ps(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_H(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EH(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,WQ(r.key),r)}}function ERe(e,t,n){return t&&EH(e.prototype,t),n&&EH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ARe(e,t,n){return t=o0(t),CRe(e,GQ()?Reflect.construct(t,n||[],o0(e).constructor):t.apply(e,n))}function CRe(e,t){if(t&&(Xf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TRe(e)}function TRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GQ=function(){return!!e})()}function o0(e){return o0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},o0(e)}function ORe(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&&kP(e,t)}function kP(e,t){return kP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kP(e,t)}function Ps(e,t,n){return t=WQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WQ(e){var t=jRe(e,"string");return Xf(t)=="symbol"?t:t+""}function jRe(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 String(e)}var Ys=(function(e){function t(){var n;_Re(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=ARe(this,t,[].concat(i)),Ps(n,"state",{isAnimationFinished:!1}),Ps(n,"id",Qm("recharts-bar-")),Ps(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),Ps(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return ORe(t,e),ERe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,l=a.dataKey,u=a.activeIndex,f=a.activeBar,d=et(this.props,!1);return r&&r.map(function(h,m){var g=m===u,x=g?f:o,w=pn(pn(pn({},d),h),{},{isActive:g,option:x,index:m,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return ie.createElement(Jt,a0({className:"recharts-bar-rectangle"},_b(i.props,h,m),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(m)}),ie.createElement(SH,w))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,l=i.isAnimationActive,u=i.animationBegin,f=i.animationDuration,d=i.animationEasing,h=i.animationId,m=this.state.prevData;return ie.createElement(yo,{begin:u,duration:f,isActive:l,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var x=g.t,w=a.map(function(y,S){var E=m&&m[S];if(E){var _=ii(E.x,y.x),A=ii(E.y,y.y),C=ii(E.width,y.width),O=ii(E.height,y.height);return pn(pn({},y),{},{x:_(x),y:A(x),width:C(x),height:O(x)})}if(o==="horizontal"){var P=ii(0,y.height),M=P(x);return pn(pn({},y),{},{y:y.y+y.height-M,height:M})}var R=ii(0,y.width),$=R(x);return pn(pn({},y),{},{width:$})});return ie.createElement(Jt,null,r.renderRectanglesStatically(w))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Xp(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,l=i.activeIndex,u=et(this.props.background,!1);return a.map(function(f,d){f.value;var h=f.background,m=wRe(f,xRe);if(!h)return null;var g=pn(pn(pn(pn(pn({},m),{},{fill:"#eee"},h),u),_b(r.props,f,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:d,className:"recharts-bar-background-rectangle"});return ie.createElement(SH,a0({key:"background-bar-".concat(d),option:r.props.background,isActive:d===l},g))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,l=a.xAxis,u=a.yAxis,f=a.layout,d=a.children,h=Ii(d,qx);if(!h)return null;var m=f==="vertical"?o[0].height/2:o[0].width/2,g=function(y,S){var E=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:E,errorVal:Ur(y,S)}},x={clipPath:r?"url(#clipPath-".concat(i,")"):null};return ie.createElement(Jt,x,h.map(function(w){return ie.cloneElement(w,{key:"error-bar-".concat(i,"-").concat(w.props.dataKey),data:o,xAxis:l,yAxis:u,layout:f,offset:m,dataPointFormatter:g})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,l=r.xAxis,u=r.yAxis,f=r.left,d=r.top,h=r.width,m=r.height,g=r.isAnimationActive,x=r.background,w=r.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,S=ut("recharts-bar",o),E=l&&l.allowDataOverflow,_=u&&u.allowDataOverflow,A=E||_,C=ot(w)?this.id:w;return ie.createElement(Jt,{className:S},E||_?ie.createElement("defs",null,ie.createElement("clipPath",{id:"clipPath-".concat(C)},ie.createElement("rect",{x:E?f:f-h/2,y:_?d:d-m/2,width:E?h:h*2,height:_?m:m*2}))):null,ie.createElement(Jt,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(C,")"):null},x?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,C),(!g||y)&&qs.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(j.PureComponent);HQ=Ys;Ps(Ys,"displayName","Bar");Ps(Ys,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Td.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Ps(Ys,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,l=e.xAxisTicks,u=e.yAxisTicks,f=e.stackedData,d=e.dataStartIndex,h=e.displayedData,m=e.offset,g=QOe(r,n);if(!g)return null;var x=t.layout,w=n.type.defaultProps,y=w!==void 0?pn(pn({},w),n.props):n.props,S=y.dataKey,E=y.children,_=y.minPointSize,A=x==="horizontal"?o:a,C=f?A.scale.domain():null,O=oje({numericAxis:A}),P=Ii(E,jZ),M=h.map(function(R,$){var I,k,V,D,q,L;f?I=JOe(f[d+$],C):(I=Ur(R,S),Array.isArray(I)||(I=[O,I]));var z=bRe(_,HQ.defaultProps.minPointSize)(I[1],$);if(x==="horizontal"){var H,Y=[o.scale(I[0]),o.scale(I[1])],Z=Y[0],U=Y[1];k=b6({axis:a,ticks:l,bandSize:i,offset:g.offset,entry:R,index:$}),V=(H=U??Z)!==null&&H!==void 0?H:void 0,D=g.size;var F=Z-U;if(q=Number.isNaN(F)?0:F,L={x:k,y:o.y,width:D,height:o.height},Math.abs(z)>0&&Math.abs(q)<Math.abs(z)){var X=ki(q||z)*(Math.abs(z)-Math.abs(q));V-=X,q+=X}}else{var K=[a.scale(I[0]),a.scale(I[1])],G=K[0],Q=K[1];if(k=G,V=b6({axis:o,ticks:u,bandSize:i,offset:g.offset,entry:R,index:$}),D=Q-G,q=g.size,L={x:a.x,y:V,width:a.width,height:q},Math.abs(z)>0&&Math.abs(D)<Math.abs(z)){var J=ki(D||z)*(Math.abs(z)-Math.abs(D));D+=J}}return pn(pn(pn({},R),{},{x:k,y:V,width:D,height:q,value:f?I:I[1],payload:R,background:L},P&&P[$]&&P[$].props),{},{tooltipPayload:[NQ(n,R)],tooltipPosition:{x:k+D/2,y:V+q/2}})});return pn({data:M,layout:x},m)});function gm(e){"@babel/helpers - typeof";return gm=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},gm(e)}function NRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AH(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,KQ(r.key),r)}}function PRe(e,t,n){return t&&AH(e.prototype,t),n&&AH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ji(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CH(Object(n),!0).forEach(function(r){Fx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fx(e,t,n){return t=KQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KQ(e){var t=MRe(e,"string");return gm(t)=="symbol"?t:t+""}function MRe(e,t){if(gm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YQ=function(t,n,r,i,a){var o=t.width,l=t.height,u=t.layout,f=t.children,d=Object.keys(n),h={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},m=!!kr(f,Ys);return d.reduce(function(g,x){var w=n[x],y=w.orientation,S=w.domain,E=w.padding,_=E===void 0?{}:E,A=w.mirror,C=w.reversed,O="".concat(y).concat(A?"Mirror":""),P,M,R,$,I;if(w.type==="number"&&(w.padding==="gap"||w.padding==="no-gap")){var k=S[1]-S[0],V=1/0,D=w.categoricalDomain.sort(_Se);if(D.forEach(function(K,G){G>0&&(V=Math.min((K||0)-(D[G-1]||0),V))}),Number.isFinite(V)){var q=V/k,L=w.layout==="vertical"?r.height:r.width;if(w.padding==="gap"&&(P=q*L/2),w.padding==="no-gap"){var z=Au(t.barCategoryGap,q*L),H=q*L/2;P=H-z-(H-z)/L*z}}}i==="xAxis"?M=[r.left+(_.left||0)+(P||0),r.left+r.width-(_.right||0)-(P||0)]:i==="yAxis"?M=u==="horizontal"?[r.top+r.height-(_.bottom||0),r.top+(_.top||0)]:[r.top+(_.top||0)+(P||0),r.top+r.height-(_.bottom||0)-(P||0)]:M=w.range,C&&(M=[M[1],M[0]]);var Y=XOe(w,a,m),Z=Y.scale,U=Y.realScaleType;Z.domain(S).range(M),ZOe(Z);var F=aje(Z,ji(ji({},w),{},{realScaleType:U}));i==="xAxis"?(I=y==="top"&&!A||y==="bottom"&&A,R=r.left,$=h[O]-I*w.height):i==="yAxis"&&(I=y==="left"&&!A||y==="right"&&A,R=h[O]-I*w.width,$=r.top);var X=ji(ji(ji({},w),F),{},{realScaleType:U,x:R,y:$,scale:Z,width:i==="xAxis"?r.width:w.width,height:i==="yAxis"?r.height:w.height});return X.bandSize=Gb(X,F),!w.hide&&i==="xAxis"?h[O]+=(I?-1:1)*X.height:w.hide||(h[O]+=(I?-1:1)*X.width),ji(ji({},g),{},Fx({},x,X))},{})},XQ=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},RRe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return XQ({x:n,y:r},{x:i,y:a})},ZQ=(function(){function e(t){NRe(this,e),this.scale=t}return PRe(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]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();Fx(ZQ,"EPS",1e-4);var G2=function(t){var n=Object.keys(t).reduce(function(r,i){return ji(ji({},r),{},Fx({},i,ZQ.create(t[i])))},{});return ji(ji({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return sRe(i,function(u,f){return n[f].apply(u,{bandAware:o,position:l})})},isInRange:function(i){return UQ(i,function(a,o){return n[o].isInRange(a)})}})};function kRe(e){return(e%180+180)%180}var DRe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=kRe(i),o=a*Math.PI/180,l=Math.atan(r/n),u=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(u)},IRe=bX();const LRe=yt(IRe);var $Re=YY();const BRe=yt($Re);var qRe=BRe(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("")}),W2=j.createContext(void 0),K2=j.createContext(void 0),QQ=j.createContext(void 0),JQ=j.createContext({}),eJ=j.createContext(void 0),tJ=j.createContext(0),nJ=j.createContext(0),TH=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,l=t.children,u=t.width,f=t.height,d=qRe(a);return ie.createElement(W2.Provider,{value:r},ie.createElement(K2.Provider,{value:i},ie.createElement(JQ.Provider,{value:a},ie.createElement(QQ.Provider,{value:d},ie.createElement(eJ.Provider,{value:o},ie.createElement(tJ.Provider,{value:f},ie.createElement(nJ.Provider,{value:u},l)))))))},zRe=function(){return j.useContext(eJ)},rJ=function(t){var n=j.useContext(W2);n==null&&Tu();var r=n[t];return r==null&&Tu(),r},VRe=function(){var t=j.useContext(W2);return gs(t)},FRe=function(){var t=j.useContext(K2),n=LRe(t,function(r){return UQ(r.domain,Number.isFinite)});return n||gs(t)},iJ=function(t){var n=j.useContext(K2);n==null&&Tu();var r=n[t];return r==null&&Tu(),r},URe=function(){var t=j.useContext(QQ);return t},HRe=function(){return j.useContext(JQ)},Y2=function(){return j.useContext(nJ)},X2=function(){return j.useContext(tJ)};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 GRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WRe(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,oJ(r.key),r)}}function KRe(e,t,n){return t&&WRe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function YRe(e,t,n){return t=s0(t),XRe(e,aJ()?Reflect.construct(t,n||[],s0(e).constructor):t.apply(e,n))}function XRe(e,t){if(t&&(Zf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZRe(e)}function ZRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aJ=function(){return!!e})()}function s0(e){return s0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},s0(e)}function QRe(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&&DP(e,t)}function DP(e,t){return DP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},DP(e,t)}function OH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OH(Object(n),!0).forEach(function(r){Z2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Z2(e,t,n){return t=oJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oJ(e){var t=JRe(e,"string");return Zf(t)=="symbol"?t:t+""}function JRe(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 String(e)}function e2e(e,t){return i2e(e)||r2e(e,t)||n2e(e,t)||t2e()}function t2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
441
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n2e(e,t){if(e){if(typeof e=="string")return NH(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 NH(e,t)}}function NH(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 r2e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function i2e(e){if(Array.isArray(e))return e}function IP(){return IP=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},IP.apply(this,arguments)}var a2e=function(t,n){var r;return ie.isValidElement(t)?r=ie.cloneElement(t,n):Xe(t)?r=t(n):r=ie.createElement("line",IP({},n,{className:"recharts-reference-line-line"})),r},o2e=function(t,n,r,i,a,o,l,u,f){var d=a.x,h=a.y,m=a.width,g=a.height;if(r){var x=f.y,w=t.y.apply(x,{position:o});if(fa(f,"discard")&&!t.y.isInRange(w))return null;var y=[{x:d+m,y:w},{x:d,y:w}];return u==="left"?y.reverse():y}if(n){var S=f.x,E=t.x.apply(S,{position:o});if(fa(f,"discard")&&!t.x.isInRange(E))return null;var _=[{x:E,y:h+g},{x:E,y:h}];return l==="top"?_.reverse():_}if(i){var A=f.segment,C=A.map(function(O){return t.apply(O,{position:o})});return fa(f,"discard")&&aRe(C,function(O){return!t.isInRange(O)})?null:C}return null};function s2e(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,l=e.className,u=e.alwaysShow,f=zRe(),d=rJ(i),h=iJ(a),m=URe();if(!f||!m)return null;so(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var g=G2({x:d.scale,y:h.scale}),x=Cn(t),w=Cn(n),y=r&&r.length===2,S=o2e(g,x,w,y,m,e.position,d.orientation,h.orientation,e);if(!S)return null;var E=e2e(S,2),_=E[0],A=_.x,C=_.y,O=E[1],P=O.x,M=O.y,R=fa(e,"hidden")?"url(#".concat(f,")"):void 0,$=jH(jH({clipPath:R},et(e,!0)),{},{x1:A,y1:C,x2:P,y2:M});return ie.createElement(Jt,{className:ut("recharts-reference-line",l)},a2e(o,$),Kn.renderCallByParent(e,RRe({x1:A,y1:C,x2:P,y2:M})))}var Q2=(function(e){function t(){return GRe(this,t),YRe(this,t,arguments)}return QRe(t,e),KRe(t,[{key:"render",value:function(){return ie.createElement(s2e,this.props)}}])})(ie.Component);Z2(Q2,"displayName","ReferenceLine");Z2(Q2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function LP(){return LP=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},LP.apply(this,arguments)}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 PH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PH(Object(n),!0).forEach(function(r){Ux(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u2e(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,lJ(r.key),r)}}function c2e(e,t,n){return t&&u2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function f2e(e,t,n){return t=l0(t),d2e(e,sJ()?Reflect.construct(t,n||[],l0(e).constructor):t.apply(e,n))}function d2e(e,t){if(t&&(Qf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h2e(e)}function h2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sJ=function(){return!!e})()}function l0(e){return l0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},l0(e)}function p2e(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,i){return r.__proto__=i,r},$P(e,t)}function Ux(e,t,n){return t=lJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lJ(e){var t=m2e(e,"string");return Qf(t)=="symbol"?t:t+""}function m2e(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 g2e=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=G2({x:i.scale,y:a.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return fa(t,"discard")&&!o.isInRange(l)?null:l},Hx=(function(e){function t(){return l2e(this,t),f2e(this,t,arguments)}return p2e(t,e),c2e(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,l=r.alwaysShow,u=r.clipPathId,f=Cn(i),d=Cn(a);if(so(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!d)return null;var h=g2e(this.props);if(!h)return null;var m=h.x,g=h.y,x=this.props,w=x.shape,y=x.className,S=fa(this.props,"hidden")?"url(#".concat(u,")"):void 0,E=MH(MH({clipPath:S},et(this.props,!0)),{},{cx:m,cy:g});return ie.createElement(Jt,{className:ut("recharts-reference-dot",y)},t.renderDot(w,E),Kn.renderCallByParent(this.props,{x:m-o,y:g-o,width:2*o,height:2*o}))}}])})(ie.Component);Ux(Hx,"displayName","ReferenceDot");Ux(Hx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Ux(Hx,"renderDot",function(e,t){var n;return ie.isValidElement(e)?n=ie.cloneElement(e,t):Xe(e)?n=e(t):n=ie.createElement(H2,LP({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function BP(){return BP=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},BP.apply(this,arguments)}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 RH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RH(Object(n),!0).forEach(function(r){Gx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function v2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y2e(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,cJ(r.key),r)}}function b2e(e,t,n){return t&&y2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function x2e(e,t,n){return t=u0(t),w2e(e,uJ()?Reflect.construct(t,n||[],u0(e).constructor):t.apply(e,n))}function w2e(e,t){if(t&&(Jf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return S2e(e)}function S2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uJ=function(){return!!e})()}function u0(e){return u0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},u0(e)}function _2e(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&&qP(e,t)}function qP(e,t){return qP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qP(e,t)}function Gx(e,t,n){return t=cJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cJ(e){var t=E2e(e,"string");return Jf(t)=="symbol"?t:t+""}function E2e(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 String(e)}var A2e=function(t,n,r,i,a){var o=a.x1,l=a.x2,u=a.y1,f=a.y2,d=a.xAxis,h=a.yAxis;if(!d||!h)return null;var m=G2({x:d.scale,y:h.scale}),g={x:t?m.x.apply(o,{position:"start"}):m.x.rangeMin,y:r?m.y.apply(u,{position:"start"}):m.y.rangeMin},x={x:n?m.x.apply(l,{position:"end"}):m.x.rangeMax,y:i?m.y.apply(f,{position:"end"}):m.y.rangeMax};return fa(a,"discard")&&(!m.isInRange(g)||!m.isInRange(x))?null:XQ(g,x)},Wx=(function(e){function t(){return v2e(this,t),x2e(this,t,arguments)}return _2e(t,e),b2e(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,l=r.y2,u=r.className,f=r.alwaysShow,d=r.clipPathId;so(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Cn(i),m=Cn(a),g=Cn(o),x=Cn(l),w=this.props.shape;if(!h&&!m&&!g&&!x&&!w)return null;var y=A2e(h,m,g,x,this.props);if(!y&&!w)return null;var S=fa(this.props,"hidden")?"url(#".concat(d,")"):void 0;return ie.createElement(Jt,{className:ut("recharts-reference-area",u)},t.renderRect(w,kH(kH({clipPath:S},et(this.props,!0)),y)),Kn.renderCallByParent(this.props,y))}}])})(ie.Component);Gx(Wx,"displayName","ReferenceArea");Gx(Wx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Gx(Wx,"renderRect",function(e,t){var n;return ie.isValidElement(e)?n=ie.cloneElement(e,t):Xe(e)?n=e(t):n=ie.createElement(U2,BP({},t,{className:"recharts-reference-area-rect"})),n});function fJ(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function C2e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return DRe(r,n)}function T2e(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,l=e.height;return t===1?{start:r?i:a,end:r?i+o:a+l}:{start:r?i+o:a+l,end:r?i:a}}function c0(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function O2e(e,t){return fJ(e,t+1)}function j2e(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,l=t.end,u=0,f=1,d=o,h=function(){var x=r==null?void 0:r[u];if(x===void 0)return{v:fJ(r,f)};var w=u,y,S=function(){return y===void 0&&(y=n(x,w)),y},E=x.coordinate,_=u===0||c0(e,E,S,d,l);_||(u=0,d=o,f+=1),_&&(d=E+e*(S()/2+i),u+=f)},m;f<=a.length;)if(m=h(),m)return m.v;return[]}function vm(e){"@babel/helpers - typeof";return vm=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},vm(e)}function DH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DH(Object(n),!0).forEach(function(r){N2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function N2e(e,t,n){return t=P2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P2e(e){var t=M2e(e,"string");return vm(t)=="symbol"?t:t+""}function M2e(e,t){if(vm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function R2e(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,l=t.start,u=t.end,f=function(m){var g=a[m],x,w=function(){return x===void 0&&(x=n(g,m)),x};if(m===o-1){var y=e*(g.coordinate+e*w()/2-u);a[m]=g=Wn(Wn({},g),{},{tickCoord:y>0?g.coordinate-y*e:g.coordinate})}else a[m]=g=Wn(Wn({},g),{},{tickCoord:g.coordinate});var S=c0(e,g.tickCoord,w,l,u);S&&(u=g.tickCoord-e*(w()/2+i),a[m]=Wn(Wn({},g),{},{isShow:!0}))},d=o-1;d>=0;d--)f(d);return a}function k2e(e,t,n,r,i,a){var o=(r||[]).slice(),l=o.length,u=t.start,f=t.end;if(a){var d=r[l-1],h=n(d,l-1),m=e*(d.coordinate+e*h/2-f);o[l-1]=d=Wn(Wn({},d),{},{tickCoord:m>0?d.coordinate-m*e:d.coordinate});var g=c0(e,d.tickCoord,function(){return h},u,f);g&&(f=d.tickCoord-e*(h/2+i),o[l-1]=Wn(Wn({},d),{},{isShow:!0}))}for(var x=a?l-1:l,w=function(E){var _=o[E],A,C=function(){return A===void 0&&(A=n(_,E)),A};if(E===0){var O=e*(_.coordinate-e*C()/2-u);o[E]=_=Wn(Wn({},_),{},{tickCoord:O<0?_.coordinate-O*e:_.coordinate})}else o[E]=_=Wn(Wn({},_),{},{tickCoord:_.coordinate});var P=c0(e,_.tickCoord,C,u,f);P&&(u=_.tickCoord+e*(C()/2+i),o[E]=Wn(Wn({},_),{},{isShow:!0}))},y=0;y<x;y++)w(y);return o}function J2(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,l=e.orientation,u=e.interval,f=e.tickFormatter,d=e.unit,h=e.angle;if(!i||!i.length||!r)return[];if(Se(u)||Td.isSsr)return O2e(i,typeof u=="number"&&Se(u)?u:0);var m=[],g=l==="top"||l==="bottom"?"width":"height",x=d&&g==="width"?up(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},w=function(_,A){var C=Xe(f)?f(_.value,A):_.value;return g==="width"?C2e(up(C,{fontSize:t,letterSpacing:n}),x,h):up(C,{fontSize:t,letterSpacing:n})[g]},y=i.length>=2?ki(i[1].coordinate-i[0].coordinate):1,S=T2e(a,y,g);return u==="equidistantPreserveStart"?j2e(y,S,w,i,o):(u==="preserveStart"||u==="preserveStartEnd"?m=k2e(y,S,w,i,o,u==="preserveStartEnd"):m=R2e(y,S,w,i,o),m.filter(function(E){return E.isShow}))}var D2e=["viewBox"],I2e=["viewBox"],L2e=["ticks"];function ed(e){"@babel/helpers - typeof";return ed=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},ed(e)}function Hc(){return Hc=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},Hc.apply(this,arguments)}function IH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IH(Object(n),!0).forEach(function(r){ek(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gj(e,t){if(e==null)return{};var n=$2e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $2e(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 B2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LH(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,hJ(r.key),r)}}function q2e(e,t,n){return t&&LH(e.prototype,t),n&&LH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function z2e(e,t,n){return t=f0(t),V2e(e,dJ()?Reflect.construct(t,n||[],f0(e).constructor):t.apply(e,n))}function V2e(e,t){if(t&&(ed(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return F2e(e)}function F2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dJ=function(){return!!e})()}function f0(e){return f0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},f0(e)}function U2e(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&&zP(e,t)}function zP(e,t){return zP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zP(e,t)}function ek(e,t,n){return t=hJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hJ(e){var t=H2e(e,"string");return ed(t)=="symbol"?t:t+""}function H2e(e,t){if(ed(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ed(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Nd=(function(e){function t(n){var r;return B2e(this,t),r=z2e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return U2e(t,e),q2e(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=gj(r,D2e),l=this.props,u=l.viewBox,f=gj(l,I2e);return!rf(a,u)||!rf(o,f)||!rf(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,l=i.width,u=i.height,f=i.orientation,d=i.tickSize,h=i.mirror,m=i.tickMargin,g,x,w,y,S,E,_=h?-1:1,A=r.tickSize||d,C=Se(r.tickCoord)?r.tickCoord:r.coordinate;switch(f){case"top":g=x=r.coordinate,y=o+ +!h*u,w=y-_*A,E=w-_*m,S=C;break;case"left":w=y=r.coordinate,x=a+ +!h*l,g=x-_*A,S=g-_*m,E=C;break;case"right":w=y=r.coordinate,x=a+ +h*l,g=x+_*A,S=g+_*m,E=C;break;default:g=x=r.coordinate,y=o+ +h*u,w=y+_*A,E=w+_*m,S=C;break}return{line:{x1:g,y1:w,x2:x,y2:y},tick:{x:S,y:E}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.orientation,f=r.mirror,d=r.axisLine,h=Sn(Sn(Sn({},et(this.props,!1)),et(d,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var m=+(u==="top"&&!f||u==="bottom"&&f);h=Sn(Sn({},h),{},{x1:i,y1:a+m*l,x2:i+o,y2:a+m*l})}else{var g=+(u==="left"&&!f||u==="right"&&f);h=Sn(Sn({},h),{},{x1:i+g*o,y1:a,x2:i+g*o,y2:a+l})}return ie.createElement("line",Hc({},h,{className:ut("recharts-cartesian-axis-line",li(d,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,l=this.props,u=l.tickLine,f=l.stroke,d=l.tick,h=l.tickFormatter,m=l.unit,g=J2(Sn(Sn({},this.props),{},{ticks:r}),i,a),x=this.getTickTextAnchor(),w=this.getTickVerticalAnchor(),y=et(this.props,!1),S=et(d,!1),E=Sn(Sn({},y),{},{fill:"none"},et(u,!1)),_=g.map(function(A,C){var O=o.getTickLineCoord(A),P=O.line,M=O.tick,R=Sn(Sn(Sn(Sn({textAnchor:x,verticalAnchor:w},y),{},{stroke:"none",fill:f},S),M),{},{index:C,payload:A,visibleTicksCount:g.length,tickFormatter:h});return ie.createElement(Jt,Hc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},_b(o.props,A,C)),u&&ie.createElement("line",Hc({},E,P,{className:ut("recharts-cartesian-axis-tick-line",li(u,"className"))})),d&&t.renderTickItem(d,R,"".concat(Xe(h)?h(A.value,C):A.value).concat(m||"")))});return ie.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,l=i.height,u=i.ticksGenerator,f=i.className,d=i.hide;if(d)return null;var h=this.props,m=h.ticks,g=gj(h,L2e),x=m;return Xe(u)&&(x=m&&m.length>0?u(this.props):u(g)),o<=0||l<=0||!x||!x.length?null:ie.createElement(Jt,{className:ut("recharts-cartesian-axis",f),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(x,this.state.fontSize,this.state.letterSpacing),Kn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,l=ut(i.className,"recharts-cartesian-axis-tick-value");return ie.isValidElement(r)?o=ie.cloneElement(r,Sn(Sn({},i),{},{className:l})):Xe(r)?o=r(Sn(Sn({},i),{},{className:l})):o=ie.createElement(kb,Hc({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(j.Component);ek(Nd,"displayName","CartesianAxis");ek(Nd,"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 G2e=["x1","y1","x2","y2","key"],W2e=["offset"];function Ou(e){"@babel/helpers - typeof";return Ou=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(e)}function $H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$H(Object(n),!0).forEach(function(r){K2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$H(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K2e(e,t,n){return t=Y2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y2e(e){var t=X2e(e,"string");return Ou(t)=="symbol"?t:t+""}function X2e(e,t){if(Ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hl(){return Hl=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},Hl.apply(this,arguments)}function BH(e,t){if(e==null)return{};var n=Z2e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z2e(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 Q2e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,o=t.width,l=t.height,u=t.ry;return ie.createElement("rect",{x:i,y:a,ry:u,width:o,height:l,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function pJ(e,t){var n;if(ie.isValidElement(e))n=ie.cloneElement(e,t);else if(Xe(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,u=BH(t,G2e),f=et(u,!1);f.offset;var d=BH(f,W2e);n=ie.createElement("line",Hl({},d,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:l}))}return n}function J2e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,u){var f=Yn(Yn({},e),{},{x1:t,y1:l,x2:t+n,y2:l,key:"line-".concat(u),index:u});return pJ(i,f)});return ie.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function eke(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,u){var f=Yn(Yn({},e),{},{x1:l,y1:t,x2:l,y2:t+n,key:"line-".concat(u),index:u});return pJ(i,f)});return ie.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function tke(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,u=e.horizontal,f=u===void 0?!0:u;if(!f||!t||!t.length)return null;var d=l.map(function(m){return Math.round(m+i-i)}).sort(function(m,g){return m-g});i!==d[0]&&d.unshift(0);var h=d.map(function(m,g){var x=!d[g+1],w=x?i+o-m:d[g+1]-m;if(w<=0)return null;var y=g%t.length;return ie.createElement("rect",{key:"react-".concat(g),y:m,x:r,height:w,width:a,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return ie.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function nke(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,u=e.height,f=e.verticalPoints;if(!n||!r||!r.length)return null;var d=f.map(function(m){return Math.round(m+a-a)}).sort(function(m,g){return m-g});a!==d[0]&&d.unshift(0);var h=d.map(function(m,g){var x=!d[g+1],w=x?a+l-m:d[g+1]-m;if(w<=0)return null;var y=g%r.length;return ie.createElement("rect",{key:"react-".concat(g),x:m,y:o,width:w,height:u,stroke:"none",fill:r[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return ie.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var rke=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return OQ(J2(Yn(Yn(Yn({},Nd.defaultProps),r),{},{ticks:ro(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},ike=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return OQ(J2(Yn(Yn(Yn({},Nd.defaultProps),r),{},{ticks:ro(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},Dc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function VP(e){var t,n,r,i,a,o,l=Y2(),u=X2(),f=HRe(),d=Yn(Yn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Dc.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Dc.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Dc.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Dc.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Dc.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Dc.verticalFill,x:Se(e.x)?e.x:f.left,y:Se(e.y)?e.y:f.top,width:Se(e.width)?e.width:f.width,height:Se(e.height)?e.height:f.height}),h=d.x,m=d.y,g=d.width,x=d.height,w=d.syncWithTicks,y=d.horizontalValues,S=d.verticalValues,E=VRe(),_=FRe();if(!Se(g)||g<=0||!Se(x)||x<=0||!Se(h)||h!==+h||!Se(m)||m!==+m)return null;var A=d.verticalCoordinatesGenerator||rke,C=d.horizontalCoordinatesGenerator||ike,O=d.horizontalPoints,P=d.verticalPoints;if((!O||!O.length)&&Xe(C)){var M=y&&y.length,R=C({yAxis:_?Yn(Yn({},_),{},{ticks:M?y:_.ticks}):void 0,width:l,height:u,offset:f},M?!0:w);so(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ou(R),"]")),Array.isArray(R)&&(O=R)}if((!P||!P.length)&&Xe(A)){var $=S&&S.length,I=A({xAxis:E?Yn(Yn({},E),{},{ticks:$?S:E.ticks}):void 0,width:l,height:u,offset:f},$?!0:w);so(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ou(I),"]")),Array.isArray(I)&&(P=I)}return ie.createElement("g",{className:"recharts-cartesian-grid"},ie.createElement(Q2e,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),ie.createElement(J2e,Hl({},d,{offset:f,horizontalPoints:O,xAxis:E,yAxis:_})),ie.createElement(eke,Hl({},d,{offset:f,verticalPoints:P,xAxis:E,yAxis:_})),ie.createElement(tke,Hl({},d,{horizontalPoints:O})),ie.createElement(nke,Hl({},d,{verticalPoints:P})))}VP.displayName="CartesianGrid";var ake=["layout","type","stroke","connectNulls","isRange","ref"],oke=["key"],mJ;function td(e){"@babel/helpers - typeof";return td=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},td(e)}function gJ(e,t){if(e==null)return{};var n=ske(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ske(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 Gl(){return Gl=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},Gl.apply(this,arguments)}function qH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function us(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qH(Object(n),!0).forEach(function(r){sa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zH(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,yJ(r.key),r)}}function uke(e,t,n){return t&&zH(e.prototype,t),n&&zH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cke(e,t,n){return t=d0(t),fke(e,vJ()?Reflect.construct(t,n||[],d0(e).constructor):t.apply(e,n))}function fke(e,t){if(t&&(td(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dke(e)}function dke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vJ=function(){return!!e})()}function d0(e){return d0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},d0(e)}function hke(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&&FP(e,t)}function FP(e,t){return FP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},FP(e,t)}function sa(e,t,n){return t=yJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yJ(e){var t=pke(e,"string");return td(t)=="symbol"?t:t+""}function pke(e,t){if(td(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(td(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bo=(function(e){function t(){var n;lke(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=cke(this,t,[].concat(i)),sa(n,"state",{isAnimationFinished:!0}),sa(n,"id",Qm("recharts-area-")),sa(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Xe(o)&&o()}),sa(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Xe(o)&&o()}),n}return hke(t,e),uke(t,[{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(o&&!l)return null;var u=this.props,f=u.dot,d=u.points,h=u.dataKey,m=et(this.props,!1),g=et(f,!0),x=d.map(function(y,S){var E=us(us(us({key:"dot-".concat(S),r:3},m),g),{},{index:S,cx:y.x,cy:y.y,dataKey:h,value:y.value,payload:y.payload,points:d});return t.renderDotItem(f,E)}),w={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return ie.createElement(Jt,Gl({className:"recharts-area-dots"},w),x)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,l=i.strokeWidth,u=o[0].x,f=o[o.length-1].x,d=r*Math.abs(u-f),h=Ns(o.map(function(m){return m.y||0}));return Se(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(Ns(a.map(function(m){return m.y||0})),h)),Se(h)?ie.createElement("rect",{x:u<f?u:u-d,y:0,width:d,height:Math.floor(h+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,l=i.strokeWidth,u=o[0].y,f=o[o.length-1].y,d=r*Math.abs(u-f),h=Ns(o.map(function(m){return m.x||0}));return Se(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(Ns(a.map(function(m){return m.x||0})),h)),Se(h)?ie.createElement("rect",{x:0,y:u<f?u:u-d,width:h+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,a,o){var l=this.props,u=l.layout,f=l.type,d=l.stroke,h=l.connectNulls,m=l.isRange;l.ref;var g=gJ(l,ake);return ie.createElement(Jt,{clipPath:a?"url(#clipPath-".concat(o,")"):null},ie.createElement(dp,Gl({},et(g,!0),{points:r,connectNulls:h,type:f,baseLine:i,layout:u,stroke:"none",className:"recharts-area-area"})),d!=="none"&&ie.createElement(dp,Gl({},et(this.props,!1),{className:"recharts-area-curve",layout:u,type:f,connectNulls:h,fill:"none",points:r})),d!=="none"&&m&&ie.createElement(dp,Gl({},et(this.props,!1),{className:"recharts-area-curve",layout:u,type:f,connectNulls:h,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var a=this,o=this.props,l=o.points,u=o.baseLine,f=o.isAnimationActive,d=o.animationBegin,h=o.animationDuration,m=o.animationEasing,g=o.animationId,x=this.state,w=x.prevPoints,y=x.prevBaseLine;return ie.createElement(yo,{begin:d,duration:h,isActive:f,easing:m,from:{t:0},to:{t:1},key:"area-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var E=S.t;if(w){var _=w.length/l.length,A=l.map(function(M,R){var $=Math.floor(R*_);if(w[$]){var I=w[$],k=ii(I.x,M.x),V=ii(I.y,M.y);return us(us({},M),{},{x:k(E),y:V(E)})}return M}),C;if(Se(u)&&typeof u=="number"){var O=ii(y,u);C=O(E)}else if(ot(u)||Cd(u)){var P=ii(y,0);C=P(E)}else C=u.map(function(M,R){var $=Math.floor(R*_);if(y[$]){var I=y[$],k=ii(I.x,M.x),V=ii(I.y,M.y);return us(us({},M),{},{x:k(E),y:V(E)})}return M});return a.renderAreaStatically(A,C,r,i)}return ie.createElement(Jt,null,ie.createElement("defs",null,ie.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(E))),ie.createElement(Jt,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(l,u,r,i)))})}},{key:"renderArea",value:function(r,i){var a=this.props,o=a.points,l=a.baseLine,u=a.isAnimationActive,f=this.state,d=f.prevPoints,h=f.prevBaseLine,m=f.totalLength;return u&&o&&o.length&&(!d&&m>0||!Xp(d,o)||!Xp(h,l))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,l,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,l=i.points,u=i.className,f=i.top,d=i.left,h=i.xAxis,m=i.yAxis,g=i.width,x=i.height,w=i.isAnimationActive,y=i.id;if(a||!l||!l.length)return null;var S=this.state.isAnimationFinished,E=l.length===1,_=ut("recharts-area",u),A=h&&h.allowDataOverflow,C=m&&m.allowDataOverflow,O=A||C,P=ot(y)?this.id:y,M=(r=et(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},R=M.r,$=R===void 0?3:R,I=M.strokeWidth,k=I===void 0?2:I,V=MSe(o)?o:{},D=V.clipDot,q=D===void 0?!0:D,L=$*2+k;return ie.createElement(Jt,{className:_},A||C?ie.createElement("defs",null,ie.createElement("clipPath",{id:"clipPath-".concat(P)},ie.createElement("rect",{x:A?d:d-g/2,y:C?f:f-x/2,width:A?g:g*2,height:C?x:x*2})),!q&&ie.createElement("clipPath",{id:"clipPath-dots-".concat(P)},ie.createElement("rect",{x:d-L/2,y:f-L/2,width:g+L,height:x+L}))):null,E?null:this.renderArea(O,P),(o||E)&&this.renderDots(O,q,P),(!w||S)&&qs.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(j.PureComponent);mJ=bo;sa(bo,"displayName","Area");sa(bo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Td.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});sa(bo,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,l=o??a;if(Se(l)&&typeof l=="number")return l;var u=i==="horizontal"?r:n,f=u.scale.domain();if(u.type==="number"){var d=Math.max(f[0],f[1]),h=Math.min(f[0],f[1]);return l==="dataMin"?h:l==="dataMax"||d<0?d:Math.max(Math.min(f[0],f[1]),0)}return l==="dataMin"?f[0]:l==="dataMax"?f[1]:f[0]});sa(bo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,u=e.dataKey,f=e.stackedData,d=e.dataStartIndex,h=e.displayedData,m=e.offset,g=t.layout,x=f&&f.length,w=mJ.getBaseValue(t,n,r,i),y=g==="horizontal",S=!1,E=h.map(function(A,C){var O;x?O=f[d+C]:(O=Ur(A,u),Array.isArray(O)?S=!0:O=[w,O]);var P=O[1]==null||x&&Ur(A,u)==null;return y?{x:y6({axis:r,ticks:a,bandSize:l,entry:A,index:C}),y:P?null:i.scale(O[1]),value:O,payload:A}:{x:P?null:r.scale(O[1]),y:y6({axis:i,ticks:o,bandSize:l,entry:A,index:C}),value:O,payload:A}}),_;return x||S?_=E.map(function(A){var C=Array.isArray(A.value)?A.value[0]:null;return y?{x:A.x,y:C!=null&&A.y!=null?i.scale(C):null}:{x:C!=null?r.scale(C):null,y:A.y}}):_=y?i.scale(w):r.scale(w),us({points:E,baseLine:_,layout:g,isRange:S},m)});sa(bo,"renderDotItem",function(e,t){var n;if(ie.isValidElement(e))n=ie.cloneElement(e,t);else if(Xe(e))n=e(t);else{var r=ut("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=gJ(t,oke);n=ie.createElement(H2,Gl({},a,{key:i,className:r}))}return n});function nd(e){"@babel/helpers - typeof";return nd=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},nd(e)}function mke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gke(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,wJ(r.key),r)}}function vke(e,t,n){return t&&gke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yke(e,t,n){return t=h0(t),bke(e,bJ()?Reflect.construct(t,n||[],h0(e).constructor):t.apply(e,n))}function bke(e,t){if(t&&(nd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xke(e)}function xke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bJ=function(){return!!e})()}function h0(e){return h0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},h0(e)}function wke(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&&UP(e,t)}function UP(e,t){return UP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UP(e,t)}function xJ(e,t,n){return t=wJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wJ(e){var t=Ske(e,"string");return nd(t)=="symbol"?t:t+""}function Ske(e,t){if(nd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function HP(){return HP=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},HP.apply(this,arguments)}function _ke(e){var t=e.xAxisId,n=Y2(),r=X2(),i=rJ(t);return i==null?null:j.createElement(Nd,HP({},i,{className:ut("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return ro(o,!0)}}))}var rd=(function(e){function t(){return mke(this,t),yke(this,t,arguments)}return wke(t,e),vke(t,[{key:"render",value:function(){return j.createElement(_ke,this.props)}}])})(j.Component);xJ(rd,"displayName","XAxis");xJ(rd,"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 id(e){"@babel/helpers - typeof";return id=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},id(e)}function Eke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ake(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,EJ(r.key),r)}}function Cke(e,t,n){return t&&Ake(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tke(e,t,n){return t=p0(t),Oke(e,SJ()?Reflect.construct(t,n||[],p0(e).constructor):t.apply(e,n))}function Oke(e,t){if(t&&(id(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jke(e)}function jke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function SJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(SJ=function(){return!!e})()}function p0(e){return p0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},p0(e)}function Nke(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&&GP(e,t)}function GP(e,t){return GP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},GP(e,t)}function _J(e,t,n){return t=EJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EJ(e){var t=Pke(e,"string");return id(t)=="symbol"?t:t+""}function Pke(e,t){if(id(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(id(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function WP(){return WP=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},WP.apply(this,arguments)}var Mke=function(t){var n=t.yAxisId,r=Y2(),i=X2(),a=iJ(n);return a==null?null:j.createElement(Nd,WP({},a,{className:ut("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(l){return ro(l,!0)}}))},ad=(function(e){function t(){return Eke(this,t),Tke(this,t,arguments)}return Nke(t,e),Cke(t,[{key:"render",value:function(){return j.createElement(Mke,this.props)}}])})(j.Component);_J(ad,"displayName","YAxis");_J(ad,"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 VH(e){return Ike(e)||Dke(e)||kke(e)||Rke()}function Rke(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
442
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kke(e,t){if(e){if(typeof e=="string")return KP(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 KP(e,t)}}function Dke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ike(e){if(Array.isArray(e))return KP(e)}function KP(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 YP=function(t,n,r,i,a){var o=Ii(t,Q2),l=Ii(t,Hx),u=[].concat(VH(o),VH(l)),f=Ii(t,Wx),d="".concat(i,"Id"),h=i[0],m=n;if(u.length&&(m=u.reduce(function(w,y){if(y.props[d]===r&&fa(y.props,"extendDomain")&&Se(y.props[h])){var S=y.props[h];return[Math.min(w[0],S),Math.max(w[1],S)]}return w},m)),f.length){var g="".concat(h,"1"),x="".concat(h,"2");m=f.reduce(function(w,y){if(y.props[d]===r&&fa(y.props,"extendDomain")&&Se(y.props[g])&&Se(y.props[x])){var S=y.props[g],E=y.props[x];return[Math.min(w[0],S,E),Math.max(w[1],S,E)]}return w},m)}return a&&a.length&&(m=a.reduce(function(w,y){return Se(y)?[Math.min(w[0],y),Math.max(w[1],y)]:w},m)),m},vj={exports:{}},FH;function Lke(){return FH||(FH=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(u,f,d){this.fn=u,this.context=f,this.once=d||!1}function a(u,f,d,h,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new i(d,h||u,m),x=n?n+f:f;return u._events[x]?u._events[x].fn?u._events[x]=[u._events[x],g]:u._events[x].push(g):(u._events[x]=g,u._eventsCount++),u}function o(u,f){--u._eventsCount===0?u._events=new r:delete u._events[f]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],d,h;if(this._eventsCount===0)return f;for(h in d=this._events)t.call(d,h)&&f.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(d)):f},l.prototype.listeners=function(f){var d=n?n+f:f,h=this._events[d];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,g=h.length,x=new Array(g);m<g;m++)x[m]=h[m].fn;return x},l.prototype.listenerCount=function(f){var d=n?n+f:f,h=this._events[d];return h?h.fn?1:h.length:0},l.prototype.emit=function(f,d,h,m,g,x){var w=n?n+f:f;if(!this._events[w])return!1;var y=this._events[w],S=arguments.length,E,_;if(y.fn){switch(y.once&&this.removeListener(f,y.fn,void 0,!0),S){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,d),!0;case 3:return y.fn.call(y.context,d,h),!0;case 4:return y.fn.call(y.context,d,h,m),!0;case 5:return y.fn.call(y.context,d,h,m,g),!0;case 6:return y.fn.call(y.context,d,h,m,g,x),!0}for(_=1,E=new Array(S-1);_<S;_++)E[_-1]=arguments[_];y.fn.apply(y.context,E)}else{var A=y.length,C;for(_=0;_<A;_++)switch(y[_].once&&this.removeListener(f,y[_].fn,void 0,!0),S){case 1:y[_].fn.call(y[_].context);break;case 2:y[_].fn.call(y[_].context,d);break;case 3:y[_].fn.call(y[_].context,d,h);break;case 4:y[_].fn.call(y[_].context,d,h,m);break;default:if(!E)for(C=1,E=new Array(S-1);C<S;C++)E[C-1]=arguments[C];y[_].fn.apply(y[_].context,E)}}return!0},l.prototype.on=function(f,d,h){return a(this,f,d,h,!1)},l.prototype.once=function(f,d,h){return a(this,f,d,h,!0)},l.prototype.removeListener=function(f,d,h,m){var g=n?n+f:f;if(!this._events[g])return this;if(!d)return o(this,g),this;var x=this._events[g];if(x.fn)x.fn===d&&(!m||x.once)&&(!h||x.context===h)&&o(this,g);else{for(var w=0,y=[],S=x.length;w<S;w++)(x[w].fn!==d||m&&!x[w].once||h&&x[w].context!==h)&&y.push(x[w]);y.length?this._events[g]=y.length===1?y[0]:y:o(this,g)}return this},l.prototype.removeAllListeners=function(f){var d;return f?(d=n?n+f:f,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(vj)),vj.exports}var $ke=Lke();const Bke=yt($ke);var yj=new Bke,bj="recharts.syncMouseEvents";function ym(e){"@babel/helpers - typeof";return ym=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},ym(e)}function qke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zke(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,AJ(r.key),r)}}function Vke(e,t,n){return t&&zke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xj(e,t,n){return t=AJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AJ(e){var t=Fke(e,"string");return ym(t)=="symbol"?t:t+""}function Fke(e,t){if(ym(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ym(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Uke=(function(){function e(){qke(this,e),xj(this,"activeIndex",0),xj(this,"coordinateList",[]),xj(this,"layout","horizontal")}return Vke(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,l=o===void 0?null:o,u=n.layout,f=u===void 0?null:u,d=n.offset,h=d===void 0?null:d,m=n.mouseHandlerCallback,g=m===void 0?null:m;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=f??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=g??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 i=this.container.getBoundingClientRect(),a=i.x,o=i.y,l=i.height,u=this.coordinateList[this.activeIndex].coordinate,f=((n=window)===null||n===void 0?void 0:n.scrollX)||0,d=((r=window)===null||r===void 0?void 0:r.scrollY)||0,h=a+u+f,m=o+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:h,pageY:m})}}}])})();function Hke(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&Se(r)&&Se(i))return!0}return!1}function Gke(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function CJ(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=Bn(t,n,r,i),l=Bn(t,n,r,a);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function Wke(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,u=t.cy,f=t.innerRadius,d=t.outerRadius,h=t.angle,m=Bn(l,u,f,h),g=Bn(l,u,d,h);r=m.x,i=m.y,a=g.x,o=g.y}else return CJ(t);return[{x:r,y:i},{x:a,y:o}]}function bm(e){"@babel/helpers - typeof";return bm=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},bm(e)}function UH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UH(Object(n),!0).forEach(function(r){Kke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kke(e,t,n){return t=Yke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yke(e){var t=Xke(e,"string");return bm(t)=="symbol"?t:t+""}function Xke(e,t){if(bm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zke(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,l=e.activePayload,u=e.offset,f=e.activeTooltipIndex,d=e.tooltipAxisBandSize,h=e.layout,m=e.chartName,g=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!g||!a||!o||m!=="ScatterChart"&&i!=="axis")return null;var x,w=dp;if(m==="ScatterChart")x=o,w=cMe;else if(m==="BarChart")x=Gke(h,o,u,d),w=U2;else if(h==="radial"){var y=CJ(o),S=y.cx,E=y.cy,_=y.radius,A=y.startAngle,C=y.endAngle;x={cx:S,cy:E,startAngle:A,endAngle:C,innerRadius:_,outerRadius:_},w=RQ}else x={points:Wke(h,o,u)},w=dp;var O=sy(sy(sy(sy({stroke:"#ccc",pointerEvents:"none"},u),x),et(g,!1)),{},{payload:l,payloadIndex:f,className:ut("recharts-tooltip-cursor",g.className)});return j.isValidElement(g)?j.cloneElement(g,O):j.createElement(w,O)}var Qke=["item"],Jke=["children","className","width","height","style","compact","title","desc"];function od(e){"@babel/helpers - typeof";return od=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},od(e)}function Gc(){return Gc=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},Gc.apply(this,arguments)}function HH(e,t){return nDe(e)||tDe(e,t)||OJ(e,t)||eDe()}function eDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
443
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tDe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function nDe(e){if(Array.isArray(e))return e}function GH(e,t){if(e==null)return{};var n=rDe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rDe(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 iDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aDe(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,jJ(r.key),r)}}function oDe(e,t,n){return t&&aDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sDe(e,t,n){return t=m0(t),lDe(e,TJ()?Reflect.construct(t,n||[],m0(e).constructor):t.apply(e,n))}function lDe(e,t){if(t&&(od(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uDe(e)}function uDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TJ=function(){return!!e})()}function m0(e){return m0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},m0(e)}function cDe(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&&XP(e,t)}function XP(e,t){return XP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},XP(e,t)}function sd(e){return hDe(e)||dDe(e)||OJ(e)||fDe()}function fDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
444
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OJ(e,t){if(e){if(typeof e=="string")return ZP(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 ZP(e,t)}}function dDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hDe(e){if(Array.isArray(e))return ZP(e)}function ZP(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 WH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WH(Object(n),!0).forEach(function(r){Be(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Be(e,t,n){return t=jJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jJ(e){var t=pDe(e,"string");return od(t)=="symbol"?t:t+""}function pDe(e,t){if(od(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(od(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mDe={xAxis:["bottom","top"],yAxis:["left","right"]},gDe={width:"100%",height:"100%"},NJ={x:0,y:0};function ly(e){return e}var vDe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},yDe=function(t,n,r,i){var a=n.find(function(d){return d&&d.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,l=i.radius;return me(me(me({},i),Bn(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var u=a.coordinate,f=i.angle;return me(me(me({},i),Bn(i.cx,i.cy,u,f)),{},{angle:f,radius:u})}return NJ},Kx=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(l,u){var f=u.props.data;return f&&f.length?[].concat(sd(l),sd(f)):l},[]);return o.length>0?o:t&&t.length&&Se(i)&&Se(a)?t.slice(i,a+1):[]};function PJ(e){return e==="number"?[0,"auto"]:void 0}var QP=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,l=Kx(n,t);return r<0||!a||!a.length||r>=l.length?null:a.reduce(function(u,f){var d,h=(d=f.props.data)!==null&&d!==void 0?d:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(o.dataKey&&!o.allowDuplicatedCategory){var g=h===void 0?l:h;m=wb(g,o.dataKey,i)}else m=h&&h[r]||l[r];return m?[].concat(sd(u),[NQ(f,m)]):u},[])},KH=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=vDe(a,r),l=t.orderedTooltipTicks,u=t.tooltipAxis,f=t.tooltipTicks,d=UOe(o,l,f,u);if(d>=0&&f){var h=f[d]&&f[d].value,m=QP(t,n,d,h),g=yDe(r,l,d,a);return{activeTooltipIndex:d,activeLabel:h,activePayload:m,activeCoordinate:g}}return null},bDe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,u=n.dataStartIndex,f=n.dataEndIndex,d=t.layout,h=t.children,m=t.stackOffset,g=TQ(d,a);return r.reduce(function(x,w){var y,S=w.type.defaultProps!==void 0?me(me({},w.type.defaultProps),w.props):w.props,E=S.type,_=S.dataKey,A=S.allowDataOverflow,C=S.allowDuplicatedCategory,O=S.scale,P=S.ticks,M=S.includeHidden,R=S[o];if(x[R])return x;var $=Kx(t.data,{graphicalItems:i.filter(function(F){var X,K=o in F.props?F.props[o]:(X=F.type.defaultProps)===null||X===void 0?void 0:X[o];return K===R}),dataStartIndex:u,dataEndIndex:f}),I=$.length,k,V,D;Hke(S.domain,A,E)&&(k=gP(S.domain,null,A),g&&(E==="number"||O!=="auto")&&(D=fp($,_,"category")));var q=PJ(E);if(!k||k.length===0){var L,z=(L=S.domain)!==null&&L!==void 0?L:q;if(_){if(k=fp($,_,E),E==="category"&&g){var H=SSe(k);C&&H?(V=k,k=n0(0,I)):C||(k=S6(z,k,w).reduce(function(F,X){return F.indexOf(X)>=0?F:[].concat(sd(F),[X])},[]))}else if(E==="category")C?k=k.filter(function(F){return F!==""&&!ot(F)}):k=S6(z,k,w).reduce(function(F,X){return F.indexOf(X)>=0||X===""||ot(X)?F:[].concat(sd(F),[X])},[]);else if(E==="number"){var Y=YOe($,i.filter(function(F){var X,K,G=o in F.props?F.props[o]:(X=F.type.defaultProps)===null||X===void 0?void 0:X[o],Q="hide"in F.props?F.props.hide:(K=F.type.defaultProps)===null||K===void 0?void 0:K.hide;return G===R&&(M||!Q)}),_,a,d);Y&&(k=Y)}g&&(E==="number"||O!=="auto")&&(D=fp($,_,"category"))}else g?k=n0(0,I):l&&l[R]&&l[R].hasStack&&E==="number"?k=m==="expand"?[0,1]:jQ(l[R].stackGroups,u,f):k=CQ($,i.filter(function(F){var X=o in F.props?F.props[o]:F.type.defaultProps[o],K="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return X===R&&(M||!K)}),E,d,!0);if(E==="number")k=YP(h,k,R,a,P),z&&(k=gP(z,k,A));else if(E==="category"&&z){var Z=z,U=k.every(function(F){return Z.indexOf(F)>=0});U&&(k=Z)}}return me(me({},x),{},Be({},R,me(me({},S),{},{axisType:a,domain:k,categoricalDomain:D,duplicateDomain:V,originalDomain:(y=S.domain)!==null&&y!==void 0?y:q,isCategorical:g,layout:d})))},{})},xDe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,u=n.dataStartIndex,f=n.dataEndIndex,d=t.layout,h=t.children,m=Kx(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:f}),g=m.length,x=TQ(d,a),w=-1;return r.reduce(function(y,S){var E=S.type.defaultProps!==void 0?me(me({},S.type.defaultProps),S.props):S.props,_=E[o],A=PJ("number");if(!y[_]){w++;var C;return x?C=n0(0,g):l&&l[_]&&l[_].hasStack?(C=jQ(l[_].stackGroups,u,f),C=YP(h,C,_,a)):(C=gP(A,CQ(m,r.filter(function(O){var P,M,R=o in O.props?O.props[o]:(P=O.type.defaultProps)===null||P===void 0?void 0:P[o],$="hide"in O.props?O.props.hide:(M=O.type.defaultProps)===null||M===void 0?void 0:M.hide;return R===_&&!$}),"number",d),i.defaultProps.allowDataOverflow),C=YP(h,C,_,a)),me(me({},y),{},Be({},_,me(me({axisType:a},i.defaultProps),{},{hide:!0,orientation:li(mDe,"".concat(a,".").concat(w%2),null),domain:C,originalDomain:A,isCategorical:x,layout:d})))}return y},{})},wDe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,u=n.dataStartIndex,f=n.dataEndIndex,d=t.children,h="".concat(i,"Id"),m=Ii(d,a),g={};return m&&m.length?g=bDe(t,{axes:m,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:u,dataEndIndex:f}):o&&o.length&&(g=xDe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:u,dataEndIndex:f})),g},SDe=function(t){var n=gs(t),r=ro(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:x2(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Gb(n,r)}},YH=function(t){var n=t.children,r=t.defaultShowTooltip,i=kr(n,Yf),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},_De=function(t){return!t||!t.length?!1:t.some(function(n){var r=oo(n&&n.type);return r&&r.indexOf("Bar")>=0})},XH=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"}},EDe=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,u=l===void 0?{}:l,f=r.width,d=r.height,h=r.children,m=r.margin||{},g=kr(h,Yf),x=kr(h,$s),w=Object.keys(u).reduce(function(C,O){var P=u[O],M=P.orientation;return!P.mirror&&!P.hide?me(me({},C),{},Be({},M,C[M]+P.width)):C},{left:m.left||0,right:m.right||0}),y=Object.keys(o).reduce(function(C,O){var P=o[O],M=P.orientation;return!P.mirror&&!P.hide?me(me({},C),{},Be({},M,li(C,"".concat(M))+P.height)):C},{top:m.top||0,bottom:m.bottom||0}),S=me(me({},y),w),E=S.bottom;g&&(S.bottom+=g.props.height||Yf.defaultProps.height),x&&n&&(S=WOe(S,i,r,n));var _=f-S.left-S.right,A=d-S.top-S.bottom;return me(me({brushBottom:E},S),{},{width:Math.max(_,0),height:Math.max(A,0)})},ADe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},MJ=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,u=t.axisComponents,f=t.legendContent,d=t.formatAxisMap,h=t.defaultProps,m=function(S,E){var _=E.graphicalItems,A=E.stackGroups,C=E.offset,O=E.updateId,P=E.dataStartIndex,M=E.dataEndIndex,R=S.barSize,$=S.layout,I=S.barGap,k=S.barCategoryGap,V=S.maxBarSize,D=XH($),q=D.numericAxisName,L=D.cateAxisName,z=_De(_),H=[];return _.forEach(function(Y,Z){var U=Kx(S.data,{graphicalItems:[Y],dataStartIndex:P,dataEndIndex:M}),F=Y.type.defaultProps!==void 0?me(me({},Y.type.defaultProps),Y.props):Y.props,X=F.dataKey,K=F.maxBarSize,G=F["".concat(q,"Id")],Q=F["".concat(L,"Id")],J={},re=u.reduce(function(Ut,Pt){var Et=E["".concat(Pt.axisType,"Map")],At=F["".concat(Pt.axisType,"Id")];Et&&Et[At]||Pt.axisType==="zAxis"||Tu();var Ge=Et[At];return me(me({},Ut),{},Be(Be({},Pt.axisType,Ge),"".concat(Pt.axisType,"Ticks"),ro(Ge)))},J),ne=re[L],fe=re["".concat(L,"Ticks")],he=A&&A[G]&&A[G].hasStack&&sje(Y,A[G].stackGroups),oe=oo(Y.type).indexOf("Bar")>=0,ye=Gb(ne,fe),be=[],xe=z&&HOe({barSize:R,stackGroups:A,totalSize:ADe(re,L)});if(oe){var Ae,_e,tt=ot(K)?V:K,nt=(Ae=(_e=Gb(ne,fe,!0))!==null&&_e!==void 0?_e:tt)!==null&&Ae!==void 0?Ae:0;be=GOe({barGap:I,barCategoryGap:k,bandSize:nt!==ye?nt:ye,sizeList:xe[Q],maxBarSize:tt}),nt!==ye&&(be=be.map(function(Ut){return me(me({},Ut),{},{position:me(me({},Ut.position),{},{offset:Ut.position.offset-nt/2})})}))}var Lt=Y&&Y.type&&Y.type.getComposedData;Lt&&H.push({props:me(me({},Lt(me(me({},re),{},{displayedData:U,props:S,dataKey:X,item:Y,bandSize:ye,barPosition:be,offset:C,stackedData:he,layout:$,dataStartIndex:P,dataEndIndex:M}))),{},Be(Be(Be({key:Y.key||"item-".concat(Z)},q,re[q]),L,re[L]),"animationId",O)),childIndex:DSe(Y,S.children),item:Y})}),H},g=function(S,E){var _=S.props,A=S.dataStartIndex,C=S.dataEndIndex,O=S.updateId;if(!zF({props:_}))return null;var P=_.children,M=_.layout,R=_.stackOffset,$=_.data,I=_.reverseStackOrder,k=XH(M),V=k.numericAxisName,D=k.cateAxisName,q=Ii(P,r),L=ije($,q,"".concat(V,"Id"),"".concat(D,"Id"),R,I),z=u.reduce(function(F,X){var K="".concat(X.axisType,"Map");return me(me({},F),{},Be({},K,wDe(_,me(me({},X),{},{graphicalItems:q,stackGroups:X.axisType===V&&L,dataStartIndex:A,dataEndIndex:C}))))},{}),H=EDe(me(me({},z),{},{props:_,graphicalItems:q}),E==null?void 0:E.legendBBox);Object.keys(z).forEach(function(F){z[F]=d(_,z[F],H,F.replace("Map",""),n)});var Y=z["".concat(D,"Map")],Z=SDe(Y),U=m(_,me(me({},z),{},{dataStartIndex:A,dataEndIndex:C,updateId:O,graphicalItems:q,stackGroups:L,offset:H}));return me(me({formattedGraphicalItems:U,graphicalItems:q,offset:H,stackGroups:L},Z),z)},x=(function(y){function S(E){var _,A,C;return iDe(this,S),C=sDe(this,S,[E]),Be(C,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Be(C,"accessibilityManager",new Uke),Be(C,"handleLegendBBoxUpdate",function(O){if(O){var P=C.state,M=P.dataStartIndex,R=P.dataEndIndex,$=P.updateId;C.setState(me({legendBBox:O},g({props:C.props,dataStartIndex:M,dataEndIndex:R,updateId:$},me(me({},C.state),{},{legendBBox:O}))))}}),Be(C,"handleReceiveSyncEvent",function(O,P,M){if(C.props.syncId===O){if(M===C.eventEmitterSymbol&&typeof C.props.syncMethod!="function")return;C.applySyncEvent(P)}}),Be(C,"handleBrushChange",function(O){var P=O.startIndex,M=O.endIndex;if(P!==C.state.dataStartIndex||M!==C.state.dataEndIndex){var R=C.state.updateId;C.setState(function(){return me({dataStartIndex:P,dataEndIndex:M},g({props:C.props,dataStartIndex:P,dataEndIndex:M,updateId:R},C.state))}),C.triggerSyncEvent({dataStartIndex:P,dataEndIndex:M})}}),Be(C,"handleMouseEnter",function(O){var P=C.getMouseInfo(O);if(P){var M=me(me({},P),{},{isTooltipActive:!0});C.setState(M),C.triggerSyncEvent(M);var R=C.props.onMouseEnter;Xe(R)&&R(M,O)}}),Be(C,"triggeredAfterMouseMove",function(O){var P=C.getMouseInfo(O),M=P?me(me({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};C.setState(M),C.triggerSyncEvent(M);var R=C.props.onMouseMove;Xe(R)&&R(M,O)}),Be(C,"handleItemMouseEnter",function(O){C.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),Be(C,"handleItemMouseLeave",function(){C.setState(function(){return{isTooltipActive:!1}})}),Be(C,"handleMouseMove",function(O){O.persist(),C.throttleTriggeredAfterMouseMove(O)}),Be(C,"handleMouseLeave",function(O){C.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};C.setState(P),C.triggerSyncEvent(P);var M=C.props.onMouseLeave;Xe(M)&&M(P,O)}),Be(C,"handleOuterEvent",function(O){var P=kSe(O),M=li(C.props,"".concat(P));if(P&&Xe(M)){var R,$;/.*touch.*/i.test(P)?$=C.getMouseInfo(O.changedTouches[0]):$=C.getMouseInfo(O),M((R=$)!==null&&R!==void 0?R:{},O)}}),Be(C,"handleClick",function(O){var P=C.getMouseInfo(O);if(P){var M=me(me({},P),{},{isTooltipActive:!0});C.setState(M),C.triggerSyncEvent(M);var R=C.props.onClick;Xe(R)&&R(M,O)}}),Be(C,"handleMouseDown",function(O){var P=C.props.onMouseDown;if(Xe(P)){var M=C.getMouseInfo(O);P(M,O)}}),Be(C,"handleMouseUp",function(O){var P=C.props.onMouseUp;if(Xe(P)){var M=C.getMouseInfo(O);P(M,O)}}),Be(C,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&C.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),Be(C,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&C.handleMouseDown(O.changedTouches[0])}),Be(C,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&C.handleMouseUp(O.changedTouches[0])}),Be(C,"handleDoubleClick",function(O){var P=C.props.onDoubleClick;if(Xe(P)){var M=C.getMouseInfo(O);P(M,O)}}),Be(C,"handleContextMenu",function(O){var P=C.props.onContextMenu;if(Xe(P)){var M=C.getMouseInfo(O);P(M,O)}}),Be(C,"triggerSyncEvent",function(O){C.props.syncId!==void 0&&yj.emit(bj,C.props.syncId,O,C.eventEmitterSymbol)}),Be(C,"applySyncEvent",function(O){var P=C.props,M=P.layout,R=P.syncMethod,$=C.state.updateId,I=O.dataStartIndex,k=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)C.setState(me({dataStartIndex:I,dataEndIndex:k},g({props:C.props,dataStartIndex:I,dataEndIndex:k,updateId:$},C.state)));else if(O.activeTooltipIndex!==void 0){var V=O.chartX,D=O.chartY,q=O.activeTooltipIndex,L=C.state,z=L.offset,H=L.tooltipTicks;if(!z)return;if(typeof R=="function")q=R(H,O);else if(R==="value"){q=-1;for(var Y=0;Y<H.length;Y++)if(H[Y].value===O.activeLabel){q=Y;break}}var Z=me(me({},z),{},{x:z.left,y:z.top}),U=Math.min(V,Z.x+Z.width),F=Math.min(D,Z.y+Z.height),X=H[q]&&H[q].value,K=QP(C.state,C.props.data,q),G=H[q]?{x:M==="horizontal"?H[q].coordinate:U,y:M==="horizontal"?F:H[q].coordinate}:NJ;C.setState(me(me({},O),{},{activeLabel:X,activeCoordinate:G,activePayload:K,activeTooltipIndex:q}))}else C.setState(O)}),Be(C,"renderCursor",function(O){var P,M=C.state,R=M.isTooltipActive,$=M.activeCoordinate,I=M.activePayload,k=M.offset,V=M.activeTooltipIndex,D=M.tooltipAxisBandSize,q=C.getTooltipEventType(),L=(P=O.props.active)!==null&&P!==void 0?P:R,z=C.props.layout,H=O.key||"_recharts-cursor";return ie.createElement(Zke,{key:H,activeCoordinate:$,activePayload:I,activeTooltipIndex:V,chartName:n,element:O,isActive:L,layout:z,offset:k,tooltipAxisBandSize:D,tooltipEventType:q})}),Be(C,"renderPolarAxis",function(O,P,M){var R=li(O,"type.axisType"),$=li(C.state,"".concat(R,"Map")),I=O.type.defaultProps,k=I!==void 0?me(me({},I),O.props):O.props,V=$&&$[k["".concat(R,"Id")]];return j.cloneElement(O,me(me({},V),{},{className:ut(R,V.className),key:O.key||"".concat(P,"-").concat(M),ticks:ro(V,!0)}))}),Be(C,"renderPolarGrid",function(O){var P=O.props,M=P.radialLines,R=P.polarAngles,$=P.polarRadius,I=C.state,k=I.radiusAxisMap,V=I.angleAxisMap,D=gs(k),q=gs(V),L=q.cx,z=q.cy,H=q.innerRadius,Y=q.outerRadius;return j.cloneElement(O,{polarAngles:Array.isArray(R)?R:ro(q,!0).map(function(Z){return Z.coordinate}),polarRadius:Array.isArray($)?$:ro(D,!0).map(function(Z){return Z.coordinate}),cx:L,cy:z,innerRadius:H,outerRadius:Y,key:O.key||"polar-grid",radialLines:M})}),Be(C,"renderLegend",function(){var O=C.state.formattedGraphicalItems,P=C.props,M=P.children,R=P.width,$=P.height,I=C.props.margin||{},k=R-(I.left||0)-(I.right||0),V=EQ({children:M,formattedGraphicalItems:O,legendWidth:k,legendContent:f});if(!V)return null;var D=V.item,q=GH(V,Qke);return j.cloneElement(D,me(me({},q),{},{chartWidth:R,chartHeight:$,margin:I,onBBoxUpdate:C.handleLegendBBoxUpdate}))}),Be(C,"renderTooltip",function(){var O,P=C.props,M=P.children,R=P.accessibilityLayer,$=kr(M,Oi);if(!$)return null;var I=C.state,k=I.isTooltipActive,V=I.activeCoordinate,D=I.activePayload,q=I.activeLabel,L=I.offset,z=(O=$.props.active)!==null&&O!==void 0?O:k;return j.cloneElement($,{viewBox:me(me({},L),{},{x:L.left,y:L.top}),active:z,label:q,payload:z?D:[],coordinate:V,accessibilityLayer:R})}),Be(C,"renderBrush",function(O){var P=C.props,M=P.margin,R=P.data,$=C.state,I=$.offset,k=$.dataStartIndex,V=$.dataEndIndex,D=$.updateId;return j.cloneElement(O,{key:O.key||"_recharts-brush",onChange:ry(C.handleBrushChange,O.props.onChange),data:R,x:Se(O.props.x)?O.props.x:I.left,y:Se(O.props.y)?O.props.y:I.top+I.height+I.brushBottom-(M.bottom||0),width:Se(O.props.width)?O.props.width:I.width,startIndex:k,endIndex:V,updateId:"brush-".concat(D)})}),Be(C,"renderReferenceElement",function(O,P,M){if(!O)return null;var R=C,$=R.clipPathId,I=C.state,k=I.xAxisMap,V=I.yAxisMap,D=I.offset,q=O.type.defaultProps||{},L=O.props,z=L.xAxisId,H=z===void 0?q.xAxisId:z,Y=L.yAxisId,Z=Y===void 0?q.yAxisId:Y;return j.cloneElement(O,{key:O.key||"".concat(P,"-").concat(M),xAxis:k[H],yAxis:V[Z],viewBox:{x:D.left,y:D.top,width:D.width,height:D.height},clipPathId:$})}),Be(C,"renderActivePoints",function(O){var P=O.item,M=O.activePoint,R=O.basePoint,$=O.childIndex,I=O.isRange,k=[],V=P.props.key,D=P.item.type.defaultProps!==void 0?me(me({},P.item.type.defaultProps),P.item.props):P.item.props,q=D.activeDot,L=D.dataKey,z=me(me({index:$,dataKey:L,cx:M.x,cy:M.y,r:4,fill:F2(P.item),strokeWidth:2,stroke:"#fff",payload:M.payload,value:M.value},et(q,!1)),Sb(q));return k.push(S.renderActiveDot(q,z,"".concat(V,"-activePoint-").concat($))),R?k.push(S.renderActiveDot(q,me(me({},z),{},{cx:R.x,cy:R.y}),"".concat(V,"-basePoint-").concat($))):I&&k.push(null),k}),Be(C,"renderGraphicChild",function(O,P,M){var R=C.filterFormatItem(O,P,M);if(!R)return null;var $=C.getTooltipEventType(),I=C.state,k=I.isTooltipActive,V=I.tooltipAxis,D=I.activeTooltipIndex,q=I.activeLabel,L=C.props.children,z=kr(L,Oi),H=R.props,Y=H.points,Z=H.isRange,U=H.baseLine,F=R.item.type.defaultProps!==void 0?me(me({},R.item.type.defaultProps),R.item.props):R.item.props,X=F.activeDot,K=F.hide,G=F.activeBar,Q=F.activeShape,J=!!(!K&&k&&z&&(X||G||Q)),re={};$!=="axis"&&z&&z.props.trigger==="click"?re={onClick:ry(C.handleItemMouseEnter,O.props.onClick)}:$!=="axis"&&(re={onMouseLeave:ry(C.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:ry(C.handleItemMouseEnter,O.props.onMouseEnter)});var ne=j.cloneElement(O,me(me({},R.props),re));function fe(Pt){return typeof V.dataKey=="function"?V.dataKey(Pt.payload):null}if(J)if(D>=0){var he,oe;if(V.dataKey&&!V.allowDuplicatedCategory){var ye=typeof V.dataKey=="function"?fe:"payload.".concat(V.dataKey.toString());he=wb(Y,ye,q),oe=Z&&U&&wb(U,ye,q)}else he=Y==null?void 0:Y[D],oe=Z&&U&&U[D];if(Q||G){var be=O.props.activeIndex!==void 0?O.props.activeIndex:D;return[j.cloneElement(O,me(me(me({},R.props),re),{},{activeIndex:be})),null,null]}if(!ot(he))return[ne].concat(sd(C.renderActivePoints({item:R,activePoint:he,basePoint:oe,childIndex:D,isRange:Z})))}else{var xe,Ae=(xe=C.getItemByXY(C.state.activeCoordinate))!==null&&xe!==void 0?xe:{graphicalItem:ne},_e=Ae.graphicalItem,tt=_e.item,nt=tt===void 0?O:tt,Lt=_e.childIndex,Ut=me(me(me({},R.props),re),{},{activeIndex:Lt});return[j.cloneElement(nt,Ut),null,null]}return Z?[ne,null,null]:[ne,null]}),Be(C,"renderCustomized",function(O,P,M){return j.cloneElement(O,me(me({key:"recharts-customized-".concat(M)},C.props),C.state))}),Be(C,"renderMap",{CartesianGrid:{handler:ly,once:!0},ReferenceArea:{handler:C.renderReferenceElement},ReferenceLine:{handler:ly},ReferenceDot:{handler:C.renderReferenceElement},XAxis:{handler:ly},YAxis:{handler:ly},Brush:{handler:C.renderBrush,once:!0},Bar:{handler:C.renderGraphicChild},Line:{handler:C.renderGraphicChild},Area:{handler:C.renderGraphicChild},Radar:{handler:C.renderGraphicChild},RadialBar:{handler:C.renderGraphicChild},Scatter:{handler:C.renderGraphicChild},Pie:{handler:C.renderGraphicChild},Funnel:{handler:C.renderGraphicChild},Tooltip:{handler:C.renderCursor,once:!0},PolarGrid:{handler:C.renderPolarGrid,once:!0},PolarAngleAxis:{handler:C.renderPolarAxis},PolarRadiusAxis:{handler:C.renderPolarAxis},Customized:{handler:C.renderCustomized}}),C.clipPathId="".concat((_=E.id)!==null&&_!==void 0?_:Qm("recharts"),"-clip"),C.throttleTriggeredAfterMouseMove=OZ(C.triggeredAfterMouseMove,(A=E.throttleDelay)!==null&&A!==void 0?A:1e3/60),C.state={},C}return cDe(S,y),oDe(S,[{key:"componentDidMount",value:function(){var _,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var _=this.props,A=_.children,C=_.data,O=_.height,P=_.layout,M=kr(A,Oi);if(M){var R=M.props.defaultIndex;if(!(typeof R!="number"||R<0||R>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[R]&&this.state.tooltipTicks[R].value,I=QP(this.state,C,R,$),k=this.state.tooltipTicks[R].coordinate,V=(this.state.offset.top+O)/2,D=P==="horizontal",q=D?{x:k,y:V}:{y:k,x:V},L=this.state.formattedGraphicalItems.find(function(H){var Y=H.item;return Y.type.name==="Scatter"});L&&(q=me(me({},q),L.props.points[R].tooltipPosition),I=L.props.points[R].tooltipPayload);var z={activeTooltipIndex:R,isTooltipActive:!0,activeLabel:$,activePayload:I,activeCoordinate:q};this.setState(z),this.renderCursor(M),this.accessibilityManager.setIndex(R)}}}},{key:"getSnapshotBeforeUpdate",value:function(_,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.margin){var C,O;this.accessibilityManager.setDetails({offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(_){qN([kr(_.children,Oi)],[kr(this.props.children,Oi)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=kr(this.props.children,Oi);if(_&&typeof _.props.shared=="boolean"){var A=_.props.shared?"axis":"item";return l.indexOf(A)>=0?A:a}return a}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var A=this.container,C=A.getBoundingClientRect(),O=uAe(C),P={chartX:Math.round(_.pageX-O.left),chartY:Math.round(_.pageY-O.top)},M=C.width/A.offsetWidth||1,R=this.inRange(P.chartX,P.chartY,M);if(!R)return null;var $=this.state,I=$.xAxisMap,k=$.yAxisMap,V=this.getTooltipEventType(),D=KH(this.state,this.props.data,this.props.layout,R);if(V!=="axis"&&I&&k){var q=gs(I).scale,L=gs(k).scale,z=q&&q.invert?q.invert(P.chartX):null,H=L&&L.invert?L.invert(P.chartY):null;return me(me({},P),{},{xValue:z,yValue:H},D)}return D?me(me({},P),D):null}},{key:"inRange",value:function(_,A){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,P=_/C,M=A/C;if(O==="horizontal"||O==="vertical"){var R=this.state.offset,$=P>=R.left&&P<=R.left+R.width&&M>=R.top&&M<=R.top+R.height;return $?{x:P,y:M}:null}var I=this.state,k=I.angleAxisMap,V=I.radiusAxisMap;if(k&&V){var D=gs(k);return A6({x:P,y:M},D)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,A=this.getTooltipEventType(),C=kr(_,Oi),O={};C&&A==="axis"&&(C.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var P=Sb(this.props,this.handleOuterEvent);return me(me({},P),O)}},{key:"addListener",value:function(){yj.on(bj,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){yj.removeListener(bj,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,A,C){for(var O=this.state.formattedGraphicalItems,P=0,M=O.length;P<M;P++){var R=O[P];if(R.item===_||R.props.key===_.key||A===oo(R.item.type)&&C===R.childIndex)return R}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,A=this.state.offset,C=A.left,O=A.top,P=A.height,M=A.width;return ie.createElement("defs",null,ie.createElement("clipPath",{id:_},ie.createElement("rect",{x:C,y:O,height:P,width:M})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(A,C){var O=HH(C,2),P=O[0],M=O[1];return me(me({},A),{},Be({},P,M.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(A,C){var O=HH(C,2),P=O[0],M=O[1];return me(me({},A),{},Be({},P,M.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[_])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(_){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[_])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(_){var A=this.state,C=A.formattedGraphicalItems,O=A.activeItem;if(C&&C.length)for(var P=0,M=C.length;P<M;P++){var R=C[P],$=R.props,I=R.item,k=I.type.defaultProps!==void 0?me(me({},I.type.defaultProps),I.props):I.props,V=oo(I.type);if(V==="Bar"){var D=($.data||[]).find(function(H){return eMe(_,H)});if(D)return{graphicalItem:R,payload:D}}else if(V==="RadialBar"){var q=($.data||[]).find(function(H){return A6(_,H)});if(q)return{graphicalItem:R,payload:q}}else if(zx(R,O)||Vx(R,O)||hm(R,O)){var L=VMe({graphicalItem:R,activeTooltipItem:O,itemData:k.data}),z=k.activeIndex===void 0?L:k.activeIndex;return{graphicalItem:me(me({},R),{},{childIndex:z}),payload:hm(R,O)?k.data[L]:R.props.data[L]}}}return null}},{key:"render",value:function(){var _=this;if(!zF(this))return null;var A=this.props,C=A.children,O=A.className,P=A.width,M=A.height,R=A.style,$=A.compact,I=A.title,k=A.desc,V=GH(A,Jke),D=et(V,!1);if($)return ie.createElement(TH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ie.createElement(VN,Gc({},D,{width:P,height:M,title:I,desc:k}),this.renderClipPath(),FF(C,this.renderMap)));if(this.props.accessibilityLayer){var q,L;D.tabIndex=(q=this.props.tabIndex)!==null&&q!==void 0?q:0,D.role=(L=this.props.role)!==null&&L!==void 0?L:"application",D.onKeyDown=function(H){_.accessibilityManager.keyboardEvent(H)},D.onFocus=function(){_.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return ie.createElement(TH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ie.createElement("div",Gc({className:ut("recharts-wrapper",O),style:me({position:"relative",cursor:"default",width:P,height:M},R)},z,{ref:function(Y){_.container=Y}}),ie.createElement(VN,Gc({},D,{width:P,height:M,title:I,desc:k,style:gDe}),this.renderClipPath(),FF(C,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(j.Component);Be(x,"displayName",n),Be(x,"defaultProps",me({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Be(x,"getDerivedStateFromProps",function(y,S){var E=y.dataKey,_=y.data,A=y.children,C=y.width,O=y.height,P=y.layout,M=y.stackOffset,R=y.margin,$=S.dataStartIndex,I=S.dataEndIndex;if(S.updateId===void 0){var k=YH(y);return me(me(me({},k),{},{updateId:0},g(me(me({props:y},k),{},{updateId:0}),S)),{},{prevDataKey:E,prevData:_,prevWidth:C,prevHeight:O,prevLayout:P,prevStackOffset:M,prevMargin:R,prevChildren:A})}if(E!==S.prevDataKey||_!==S.prevData||C!==S.prevWidth||O!==S.prevHeight||P!==S.prevLayout||M!==S.prevStackOffset||!rf(R,S.prevMargin)){var V=YH(y),D={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},q=me(me({},KH(S,_,P)),{},{updateId:S.updateId+1}),L=me(me(me({},V),D),q);return me(me(me({},L),g(me({props:y},L),S)),{},{prevDataKey:E,prevData:_,prevWidth:C,prevHeight:O,prevLayout:P,prevStackOffset:M,prevMargin:R,prevChildren:A})}if(!qN(A,S.prevChildren)){var z,H,Y,Z,U=kr(A,Yf),F=U&&(z=(H=U.props)===null||H===void 0?void 0:H.startIndex)!==null&&z!==void 0?z:$,X=U&&(Y=(Z=U.props)===null||Z===void 0?void 0:Z.endIndex)!==null&&Y!==void 0?Y:I,K=F!==$||X!==I,G=!ot(_),Q=G&&!K?S.updateId:S.updateId+1;return me(me({updateId:Q},g(me(me({props:y},S),{},{updateId:Q,dataStartIndex:F,dataEndIndex:X}),S)),{},{prevChildren:A,dataStartIndex:F,dataEndIndex:X})}return null}),Be(x,"renderActiveDot",function(y,S,E){var _;return j.isValidElement(y)?_=j.cloneElement(y,S):Xe(y)?_=y(S):_=ie.createElement(H2,S),ie.createElement(Jt,{className:"recharts-active-dot",key:E},_)});var w=j.forwardRef(function(S,E){return ie.createElement(x,Gc({},S,{ref:E}))});return w.displayName=x.displayName,w},CDe=MJ({chartName:"BarChart",GraphicalChild:Ys,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:rd},{axisType:"yAxis",AxisComp:ad}],formatAxisMap:YQ}),TDe=MJ({chartName:"AreaChart",GraphicalChild:bo,axisComponents:[{axisType:"xAxis",AxisComp:rd},{axisType:"yAxis",AxisComp:ad}],formatAxisMap:YQ});const RJ=j.createContext(null);function ODe(){const e=j.useContext(RJ);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const JP=j.forwardRef(({config:e,children:t,className:n,style:r,...i},a)=>{const o=j.useMemo(()=>{const l={};for(const[u,f]of Object.entries(e))f.color&&(l[`--color-${u}`]=f.color);return l},[e]);return b.jsx(RJ.Provider,{value:{config:e},children:b.jsx("div",{ref:a,className:Te("flex aspect-video justify-center [&_.recharts-wrapper]:outline-none [&_.recharts-surface]:outline-none [&_*:focus]:outline-none [&_*:focus-visible]:outline-none",n),style:{...o,...r},...i,children:b.jsx(nAe,{width:"100%",height:"100%",children:t})})})});JP.displayName="ChartContainer";const jDe=j.forwardRef(({active:e,payload:t,label:n,hideLabel:r=!1,indicator:i="dot",className:a},o)=>{const{config:l}=ODe();return!e||!(t!=null&&t.length)?null:b.jsxs("div",{ref:o,className:Te("border bg-background px-3 py-2 text-xs shadow-md",a),children:[!r&&n&&b.jsx("div",{className:"mb-1.5 font-medium",children:n}),b.jsx("div",{className:"flex flex-col gap-1",children:t.map((u,f)=>{const d=u.dataKey||u.name,h=l[d],m=u.color||(h==null?void 0:h.color);return b.jsxs("div",{className:"flex items-center gap-2",children:[i==="dot"&&b.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:m}}),i==="line"&&b.jsx("div",{className:"h-0.5 w-3",style:{backgroundColor:m}}),b.jsxs("span",{className:"text-muted-foreground",children:[(h==null?void 0:h.label)||d,":"]}),b.jsx("span",{className:"font-medium",children:u.value})]},f.toString())})})]})});jDe.displayName="ChartTooltipContent";function Ml({className:e,...t}){return b.jsx("div",{className:Te("animate-pulse bg-primary/10",e),...t})}const NDe={completed:{label:"Completed",color:"hsl(var(--chart-completed))"},failed:{label:"Failed",color:"hsl(var(--chart-failed))"}},PDe={duration:{label:"Duration",color:"hsl(var(--chart-duration))"},waitTime:{label:"Wait Time",color:"hsl(var(--chart-wait))"}};function kJ(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function ZH(e){return new Date(e).toLocaleTimeString([],{hour:"numeric"})}function DJ(e){return`${(e*100).toFixed(1)}%`}function MDe({active:e,payload:t,label:n}){return!e||!t||!n?null:b.jsxs("div",{className:" border bg-popover px-3 py-2 text-popover-foreground shadow-md",children:[b.jsx("p",{className:"text-xs font-medium mb-1.5",children:kJ(n)}),b.jsx("div",{className:"space-y-1",children:t.map(r=>b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[b.jsx("span",{className:"h-2 w-2 shrink-0",style:{backgroundColor:r.color}}),b.jsxs("span",{className:"text-muted-foreground",children:[r.name,":"]}),b.jsx("span",{className:"font-medium tabular-nums",children:r.value})]},r.name))})]})}function RDe({active:e,payload:t,label:n}){if(!e||!t||!n)return null;const r=(i,a)=>i==="duration"?"hsl(var(--chart-duration))":i==="waitTime"?"hsl(var(--chart-wait))":a||"hsl(var(--muted-foreground))";return b.jsxs("div",{className:" border bg-popover px-3 py-2 text-popover-foreground shadow-md",children:[b.jsx("p",{className:"text-xs font-medium mb-1.5",children:kJ(n)}),b.jsx("div",{className:"space-y-1",children:t.map(i=>{const a=i.dataKey?r(i.dataKey,i.color):i.color;return b.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[b.jsx("span",{className:"h-2 w-2 shrink-0",style:{backgroundColor:a}}),b.jsxs("span",{className:"text-muted-foreground",children:[i.name,":"]}),b.jsx("span",{className:"font-medium tabular-nums",children:wr(i.value)})]},i.name)})})]})}function kDe({jobs:e}){return e.length===0?b.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No completed jobs in the last 24 hours"}):b.jsx("div",{className:"divide-y divide-border",children:e.map((t,n)=>b.jsxs(VM,{to:"/queues/$queueName/jobs/$jobId",params:{queueName:t.queueName,jobId:t.jobId},className:"flex items-center justify-between px-4 py-2.5",children:[b.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b.jsx("span",{className:"text-xs text-muted-foreground w-5 tabular-nums shrink-0",children:n+1}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("div",{className:"text-sm font-medium truncate",children:t.name}),b.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:t.queueName})]})]}),b.jsx(_u,{variant:"outline",className:"font-mono text-xs shrink-0",children:wr(t.duration)})]},`${t.queueName}-${t.jobId}`))})}function DDe({jobs:e}){return e.length===0?b.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No failed jobs in the last 24 hours"}):b.jsx("div",{className:"divide-y divide-border",children:e.map((t,n)=>b.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",children:[b.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b.jsx("span",{className:"text-xs text-muted-foreground w-5 tabular-nums shrink-0",children:n+1}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("div",{className:"text-sm font-medium truncate",children:t.name}),b.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:t.queueName})]})]}),b.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[b.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[t.failCount,"/",t.totalCount]}),b.jsx(_u,{variant:"outline",className:Te("font-mono text-xs",t.errorRate>.5?"border-status-error/50 text-status-error":t.errorRate>.2?"border-status-warning/50 text-status-warning":""),children:DJ(t.errorRate)})]})]},`${t.queueName}-${t.name}`))})}function IDe(){return b.jsxs("div",{className:"space-y-6",children:[b.jsx("div",{className:"grid grid-cols-4 gap-4",children:["throughput","error-rate","duration","wait-time"].map(e=>b.jsxs("div",{className:" border p-4 space-y-3",children:[b.jsx(Ml,{className:"h-4 w-20"}),b.jsx(Ml,{className:"h-8 w-24"}),b.jsx(Ml,{className:"h-6 w-20"})]},e))}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsxs("div",{className:" border p-4 space-y-3",children:[b.jsx(Ml,{className:"h-4 w-32"}),b.jsx(Ml,{className:"h-48 w-full"})]}),b.jsxs("div",{className:" border p-4 space-y-3",children:[b.jsx(Ml,{className:"h-4 w-32"}),b.jsx(Ml,{className:"h-48 w-full"})]})]})]})}function LDe(){const{data:e,isLoading:t,error:n}=yfe();if(t)return b.jsx(IDe,{});if(n||!e)return b.jsx("div",{className:" border border-destructive/50 bg-destructive/10 p-4",children:b.jsx("p",{className:"text-destructive",children:n instanceof Error?n.message:"Failed to load metrics"})});const{aggregate:r,slowestJobs:i,mostFailingTypes:a}=e,{summary:o,buckets:l}=r,u=Math.floor(l.length/2),f=l.slice(0,u),d=l.slice(u),h=f.reduce((C,O)=>C+O.completed,0),m=d.reduce((C,O)=>C+O.completed,0),g=f.reduce((C,O)=>C+O.failed,0),x=d.reduce((C,O)=>C+O.failed,0),w=l.map(C=>({hour:C.hour,completed:C.completed,failed:C.failed})),y=l.map(C=>({hour:C.hour,duration:C.avgDuration,waitTime:C.avgWaitTime})),S=l.map(C=>C.completed+C.failed),E=l.map(C=>C.completed+C.failed>0?C.failed/(C.completed+C.failed):0),_=l.map(C=>C.avgDuration),A=l.map(C=>C.avgWaitTime);return b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[b.jsx(Zv,{title:"Throughput",value:o.throughputPerHour.toLocaleString(),subtitle:"jobs/hour avg",sparklineData:S,sparklineColor:"default",trend:{current:m+x,previous:h+g,higherIsBetter:!0},icon:b.jsx($ce,{className:"h-4 w-4"})}),b.jsx(Zv,{title:"Error Rate",value:DJ(o.errorRate),subtitle:`${o.totalFailed} failed`,sparklineData:E,sparklineColor:o.errorRate>.1?"danger":"success",trend:{current:x,previous:g,higherIsBetter:!1},icon:b.jsx(q3,{className:"h-4 w-4"})}),b.jsx(Zv,{title:"Avg Duration",value:wr(o.avgDuration),subtitle:"processing time",sparklineData:_,sparklineColor:"default",icon:b.jsx(v7,{className:"h-4 w-4"})}),b.jsx(Zv,{title:"Avg Wait Time",value:wr(o.avgWaitTime),subtitle:"queue delay",sparklineData:A,sparklineColor:o.avgWaitTime>6e4?"warning":"default",icon:b.jsx(Ice,{className:"h-4 w-4"})})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsxs("div",{className:"border border-dashed bg-card p-4",children:[b.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[b.jsx(Ece,{className:"h-4 w-4 text-muted-foreground"}),"Job Throughput"]}),b.jsx(JP,{config:NDe,className:"h-52 w-full",children:b.jsxs(TDe,{data:w,children:[b.jsx(VP,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",strokeOpacity:.5}),b.jsx(rd,{dataKey:"hour",tickFormatter:ZH,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),b.jsx(ad,{tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:32}),b.jsx(Oi,{content:b.jsx(MDe,{})}),b.jsx($s,{verticalAlign:"top",height:32,iconType:"square",iconSize:8,wrapperStyle:{fontSize:12},formatter:C=>b.jsx("span",{style:{color:"hsl(var(--foreground))"},children:C})}),b.jsxs("defs",{children:[b.jsxs("linearGradient",{id:"completedGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[b.jsx("stop",{offset:"0%",stopColor:"var(--color-completed)",stopOpacity:.5}),b.jsx("stop",{offset:"100%",stopColor:"var(--color-completed)",stopOpacity:.05})]}),b.jsxs("pattern",{id:"failedPattern",x:"0",y:"0",width:"6",height:"6",patternUnits:"userSpaceOnUse",children:[b.jsx("rect",{width:"6",height:"6",fill:"var(--color-failed)",fillOpacity:.15}),b.jsx("path",{d:"M0,0 L6,6 M-1,5 L5,11 M-1,-1 L7,7",stroke:"var(--color-failed)",strokeWidth:"1",opacity:"0.4"})]})]}),b.jsx(bo,{type:"monotone",dataKey:"completed",name:"Completed",stackId:"1",stroke:"var(--color-completed)",fill:"url(#completedGradient)",strokeWidth:2,dot:!1,activeDot:{r:4,fill:"var(--color-completed)",stroke:"none"}}),b.jsx(bo,{type:"monotone",dataKey:"failed",name:"Failed",stackId:"1",stroke:"var(--color-failed)",fill:"url(#failedPattern)",strokeWidth:2,dot:!1,activeDot:{r:4,fill:"var(--color-failed)",stroke:"none"}})]})})]}),b.jsxs("div",{className:"border border-dashed bg-card p-4",children:[b.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[b.jsx(si,{className:"h-4 w-4 text-muted-foreground"}),"Processing Time"]}),b.jsx(JP,{config:PDe,className:"h-52 w-full",children:b.jsxs(CDe,{data:y,children:[b.jsx(VP,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",strokeOpacity:.5}),b.jsx(rd,{dataKey:"hour",tickFormatter:ZH,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),b.jsx(ad,{tickFormatter:C=>wr(C),tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:48}),b.jsx(Oi,{content:b.jsx(RDe,{}),cursor:!1}),b.jsx($s,{verticalAlign:"top",height:32,iconType:"square",iconSize:8,wrapperStyle:{fontSize:12},formatter:C=>b.jsx("span",{style:{color:"hsl(var(--foreground))"},children:C})}),b.jsx(Ys,{dataKey:"duration",name:"Duration",fill:"hsl(210, 90%, 50%)",radius:[0,0,0,0],style:{outline:"none"},isAnimationActive:!1}),b.jsx(Ys,{dataKey:"waitTime",name:"Wait Time",fill:"hsl(45, 95%, 50%)",radius:[0,0,0,0],style:{outline:"none"},isAnimationActive:!1})]})})]})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsxs("div",{className:"border border-dashed bg-card",children:[b.jsx("div",{className:"border-b border-dashed px-4 py-3",children:b.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[b.jsx(si,{className:"h-4 w-4 text-muted-foreground"}),"Slowest Jobs"]})}),b.jsx(kDe,{jobs:i})]}),b.jsxs("div",{className:"border border-dashed bg-card",children:[b.jsx("div",{className:"border-b border-dashed px-4 py-3",children:b.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[b.jsx(q3,{className:"h-4 w-4 text-muted-foreground"}),"Most Failing Job Types"]})}),b.jsx(DDe,{jobs:a})]})]})]})}const tk=j.createContext({});function nk(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const $De=typeof window<"u",IJ=$De?j.useLayoutEffect:j.useEffect,Yx=j.createContext(null);function rk(e,t){e.indexOf(t)===-1&&e.push(t)}function g0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ma=(e,t,n)=>n>t?t:n<e?e:n;let ik=()=>{};const Xs={},LJ=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$J=e=>typeof e=="object"&&e!==null,BJ=e=>/^0[^.\s]+$/u.test(e);function qJ(e){let t;return()=>(t===void 0&&(t=e()),t)}const ui=e=>e,ng=(...e)=>e.reduce((t,n)=>r=>n(t(r))),xm=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class ak{constructor(){this.subscriptions=[]}add(t){return rk(this.subscriptions,t),()=>g0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const zr=e=>e*1e3,oi=e=>e/1e3,zJ=(e,t)=>t?e*(1e3/t):0,VJ=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,BDe=1e-7,qDe=12;function zDe(e,t,n,r,i){let a,o,l=0;do o=t+(n-t)/2,a=VJ(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>BDe&&++l<qDe);return o}function rg(e,t,n,r){if(e===t&&n===r)return ui;const i=a=>zDe(a,0,1,e,n);return a=>a===0||a===1?a:VJ(i(a),t,r)}const FJ=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,UJ=e=>t=>1-e(1-t),HJ=rg(.33,1.53,.69,.99),ok=UJ(HJ),GJ=FJ(ok),WJ=e=>e>=1?1:(e*=2)<1?.5*ok(e):.5*(2-Math.pow(2,-10*(e-1))),sk=e=>1-Math.sin(Math.acos(e)),KJ=UJ(sk),YJ=FJ(sk),VDe=rg(.42,0,1,1),FDe=rg(0,0,.58,1),XJ=rg(.42,0,.58,1),UDe=e=>Array.isArray(e)&&typeof e[0]!="number",ZJ=e=>Array.isArray(e)&&typeof e[0]=="number",HDe={linear:ui,easeIn:VDe,easeInOut:XJ,easeOut:FDe,circIn:sk,circInOut:YJ,circOut:KJ,backIn:ok,backInOut:GJ,backOut:HJ,anticipate:WJ},GDe=e=>typeof e=="string",QH=e=>{if(ZJ(e)){ik(e.length===4);const[t,n,r,i]=e;return rg(t,n,r,i)}else if(GDe(e))return HDe[e];return e},uy=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function WDe(e,t){let n=new Set,r=new Set,i=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(d){o.has(d)&&(f.schedule(d),e()),d(l)}const f={schedule:(d,h=!1,m=!1)=>{const x=m&&i?n:r;return h&&o.add(d),x.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(l=d,i){a=!0;return}i=!0;const h=n;n=r,r=h,n.forEach(u),n.clear(),i=!1,a&&(a=!1,f.process(d))}};return f}const KDe=40;function QJ(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=uy.reduce((_,A)=>(_[A]=WDe(a),_),{}),{setup:l,read:u,resolveKeyframes:f,preUpdate:d,update:h,preRender:m,render:g,postRender:x}=o,w=()=>{const _=Xs.useManualTiming,A=_?i.timestamp:performance.now();n=!1,_||(i.delta=r?1e3/60:Math.max(Math.min(A-i.timestamp,KDe),1)),i.timestamp=A,i.isProcessing=!0,l.process(i),u.process(i),f.process(i),d.process(i),h.process(i),m.process(i),g.process(i),x.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(w))},y=()=>{n=!0,r=!0,i.isProcessing||e(w)};return{schedule:uy.reduce((_,A)=>{const C=o[A];return _[A]=(O,P=!1,M=!1)=>(n||y(),C.schedule(O,P,M)),_},{}),cancel:_=>{for(let A=0;A<uy.length;A++)o[uy[A]].cancel(_)},state:i,steps:o}}const{schedule:It,cancel:Zs,state:$n,steps:wj}=QJ(typeof requestAnimationFrame<"u"?requestAnimationFrame:ui,!0);let Oy;function YDe(){Oy=void 0}const ir={now:()=>(Oy===void 0&&ir.set($n.isProcessing||Xs.useManualTiming?$n.timestamp:performance.now()),Oy),set:e=>{Oy=e,queueMicrotask(YDe)}},JJ=e=>t=>typeof t=="string"&&t.startsWith(e),eee=JJ("--"),XDe=JJ("var(--"),lk=e=>XDe(e)?ZDe.test(e.split("/*")[0].trim()):!1,ZDe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function JH(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Pd={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wm={...Pd,transform:e=>ma(0,1,e)},cy={...Pd,default:1},pp=e=>Math.round(e*1e5)/1e5,uk=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function QDe(e){return e==null}const JDe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ck=(e,t)=>n=>!!(typeof n=="string"&&JDe.test(n)&&n.startsWith(e)||t&&!QDe(n)&&Object.prototype.hasOwnProperty.call(n,t)),tee=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,l]=r.match(uk);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},eIe=e=>ma(0,255,e),Sj={...Pd,transform:e=>Math.round(eIe(e))},Wl={test:ck("rgb","red"),parse:tee("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Sj.transform(e)+", "+Sj.transform(t)+", "+Sj.transform(n)+", "+pp(wm.transform(r))+")"};function tIe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const eM={test:ck("#"),parse:tIe,transform:Wl.transform},ig=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wa=ig("deg"),da=ig("%"),Ne=ig("px"),nIe=ig("vh"),rIe=ig("vw"),e8={...da,parse:e=>da.parse(e)/100,transform:e=>da.transform(e*100)},Wc={test:ck("hsl","hue"),parse:tee("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+da.transform(pp(t))+", "+da.transform(pp(n))+", "+pp(wm.transform(r))+")"},gn={test:e=>Wl.test(e)||eM.test(e)||Wc.test(e),parse:e=>Wl.test(e)?Wl.parse(e):Wc.test(e)?Wc.parse(e):eM.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wl.transform(e):Wc.transform(e),getAnimatableNone:e=>{const t=gn.parse(e);return t.alpha=0,gn.transform(t)}},iIe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function aIe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(uk))==null?void 0:t.length)||0)+(((n=e.match(iIe))==null?void 0:n.length)||0)>0}const nee="number",ree="color",oIe="var",sIe="var(",t8="${}",lIe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ld(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(lIe,u=>(gn.test(u)?(r.color.push(a),i.push(ree),n.push(gn.parse(u))):u.startsWith(sIe)?(r.var.push(a),i.push(oIe),n.push(u)):(r.number.push(a),i.push(nee),n.push(parseFloat(u))),++a,t8)).split(t8);return{values:n,split:l,indexes:r,types:i}}function uIe(e){return ld(e).values}function iee({split:e,types:t}){const n=e.length;return r=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){const o=t[a];o===nee?i+=pp(r[a]):o===ree?i+=gn.transform(r[a]):i+=r[a]}return i}}function cIe(e){return iee(ld(e))}const fIe=e=>typeof e=="number"?0:gn.test(e)?gn.getAnimatableNone(e):e,dIe=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:fIe(e);function hIe(e){const t=ld(e);return iee(t)(t.values.map((r,i)=>dIe(r,t.split[i])))}const Li={test:aIe,parse:uIe,createTransformer:cIe,getAnimatableNone:hIe};function _j(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pIe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;i=_j(u,l,e+1/3),a=_j(u,l,e),o=_j(u,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function v0(e,t){return n=>n>0?t:e}const kt=(e,t,n)=>e+(t-e)*n,Ej=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},mIe=[eM,Wl,Wc],gIe=e=>mIe.find(t=>t.test(e));function n8(e){const t=gIe(e);if(!t)return!1;let n=t.parse(e);return t===Wc&&(n=pIe(n)),n}const r8=(e,t)=>{const n=n8(e),r=n8(t);if(!n||!r)return v0(e,t);const i={...n};return a=>(i.red=Ej(n.red,r.red,a),i.green=Ej(n.green,r.green,a),i.blue=Ej(n.blue,r.blue,a),i.alpha=kt(n.alpha,r.alpha,a),Wl.transform(i))},tM=new Set(["none","hidden"]);function vIe(e,t){return tM.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function yIe(e,t){return n=>kt(e,t,n)}function fk(e){return typeof e=="number"?yIe:typeof e=="string"?lk(e)?v0:gn.test(e)?r8:wIe:Array.isArray(e)?aee:typeof e=="object"?gn.test(e)?r8:bIe:v0}function aee(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>fk(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function bIe(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=fk(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function xIe(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][r[a]],l=e.values[o]??0;n[i]=l,r[a]++}return n}const wIe=(e,t)=>{const n=Li.createTransformer(t),r=ld(e),i=ld(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?tM.has(e)&&!i.values.length||tM.has(t)&&!r.values.length?vIe(e,t):ng(aee(xIe(r,i),i.values),n):v0(e,t)};function oee(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?kt(e,t,n):fk(e)(e,t)}const SIe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>It.update(t,n),stop:()=>Zs(t),now:()=>$n.isProcessing?$n.timestamp:ir.now()}},see=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},y0=2e4;function dk(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<y0;)t+=n,r=e.next(t);return t>=y0?1/0:t}function _Ie(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(dk(r),y0);return{type:"keyframes",ease:a=>r.next(i*a).value/t,duration:oi(i)}}const rn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function nM(e,t){return e*Math.sqrt(1-t*t)}const EIe=12;function AIe(e,t,n){let r=n;for(let i=1;i<EIe;i++)r=r-e(r)/t(r);return r}const Aj=.001;function CIe({duration:e=rn.duration,bounce:t=rn.bounce,velocity:n=rn.velocity,mass:r=rn.mass}){let i,a,o=1-t;o=ma(rn.minDamping,rn.maxDamping,o),e=ma(rn.minDuration,rn.maxDuration,oi(e)),o<1?(i=f=>{const d=f*o,h=d*e,m=d-n,g=nM(f,o),x=Math.exp(-h);return Aj-m/g*x},a=f=>{const h=f*o*e,m=h*n+n,g=Math.pow(o,2)*Math.pow(f,2)*e,x=Math.exp(-h),w=nM(Math.pow(f,2),o);return(-i(f)+Aj>0?-1:1)*((m-g)*x)/w}):(i=f=>{const d=Math.exp(-f*e),h=(f-n)*e+1;return-Aj+d*h},a=f=>{const d=Math.exp(-f*e),h=(n-f)*(e*e);return d*h});const l=5/e,u=AIe(i,a,l);if(e=zr(e),isNaN(u))return{stiffness:rn.stiffness,damping:rn.damping,duration:e};{const f=Math.pow(u,2)*r;return{stiffness:f,damping:o*2*Math.sqrt(r*f),duration:e}}}const TIe=["duration","bounce"],OIe=["stiffness","damping","mass"];function i8(e,t){return t.some(n=>e[n]!==void 0)}function jIe(e){let t={velocity:rn.velocity,stiffness:rn.stiffness,damping:rn.damping,mass:rn.mass,isResolvedFromDuration:!1,...e};if(!i8(e,OIe)&&i8(e,TIe))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ma(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:rn.mass,stiffness:i,damping:a}}else{const n=CIe({...e,velocity:0});t={...t,...n,mass:rn.mass},t.isResolvedFromDuration=!0}return t}function b0(e=rn.visualDuration,t=rn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:f,mass:d,duration:h,velocity:m,isResolvedFromDuration:g}=jIe({...n,velocity:-oi(n.velocity||0)}),x=m||0,w=f/(2*Math.sqrt(u*d)),y=o-a,S=oi(Math.sqrt(u/d)),E=Math.abs(y)<5;r||(r=E?rn.restSpeed.granular:rn.restSpeed.default),i||(i=E?rn.restDelta.granular:rn.restDelta.default);let _,A,C,O,P,M;if(w<1)C=nM(S,w),O=(x+w*S*y)/C,_=$=>{const I=Math.exp(-w*S*$);return o-I*(O*Math.sin(C*$)+y*Math.cos(C*$))},P=w*S*O+y*C,M=w*S*y-O*C,A=$=>Math.exp(-w*S*$)*(P*Math.sin(C*$)+M*Math.cos(C*$));else if(w===1){_=I=>o-Math.exp(-S*I)*(y+(x+S*y)*I);const $=x+S*y;A=I=>Math.exp(-S*I)*(S*$*I-x)}else{const $=S*Math.sqrt(w*w-1);_=D=>{const q=Math.exp(-w*S*D),L=Math.min($*D,300);return o-q*((x+w*S*y)*Math.sinh(L)+$*y*Math.cosh(L))/$};const I=(x+w*S*y)/$,k=w*S*I-y*$,V=w*S*y-I*$;A=D=>{const q=Math.exp(-w*S*D),L=Math.min($*D,300);return q*(k*Math.sinh(L)+V*Math.cosh(L))}}const R={calculatedDuration:g&&h||null,velocity:$=>zr(A($)),next:$=>{if(!g&&w<1){const k=Math.exp(-w*S*$),V=Math.sin(C*$),D=Math.cos(C*$),q=o-k*(O*V+y*D),L=zr(k*(P*V+M*D));return l.done=Math.abs(L)<=r&&Math.abs(o-q)<=i,l.value=l.done?o:q,l}const I=_($);if(g)l.done=$>=h;else{const k=zr(A($));l.done=Math.abs(k)<=r&&Math.abs(o-I)<=i}return l.value=l.done?o:I,l},toString:()=>{const $=Math.min(dk(R),y0),I=see(k=>R.next($*k).value,$,30);return $+"ms "+I},toTransition:()=>{}};return R}b0.applyToOptions=e=>{const t=_Ie(e,100,b0);return e.ease=t.ease,e.duration=zr(t.duration),e.type="keyframes",e};const NIe=5;function lee(e,t,n){const r=Math.max(t-NIe,0);return zJ(n-e(r),t-r)}function rM({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:u,restDelta:f=.5,restSpeed:d}){const h=e[0],m={done:!1,value:h},g=M=>l!==void 0&&M<l||u!==void 0&&M>u,x=M=>l===void 0?u:u===void 0||Math.abs(l-M)<Math.abs(u-M)?l:u;let w=n*t;const y=h+w,S=o===void 0?y:o(y);S!==y&&(w=S-h);const E=M=>-w*Math.exp(-M/r),_=M=>S+E(M),A=M=>{const R=E(M),$=_(M);m.done=Math.abs(R)<=f,m.value=m.done?S:$};let C,O;const P=M=>{g(m.value)&&(C=M,O=b0({keyframes:[m.value,x(m.value)],velocity:lee(_,M,m.value),damping:i,stiffness:a,restDelta:f,restSpeed:d}))};return P(0),{calculatedDuration:null,next:M=>{let R=!1;return!O&&C===void 0&&(R=!0,A(M),P(M)),C!==void 0&&M>=C?O.next(M-C):(!R&&A(M),m)}}}function PIe(e,t,n){const r=[],i=n||Xs.mix||oee,a=e.length-1;for(let o=0;o<a;o++){let l=i(e[o],e[o+1]);if(t){const u=Array.isArray(t)?t[o]||ui:t;l=ng(u,l)}r.push(l)}return r}function MIe(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(ik(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=PIe(t,r,i),u=l.length,f=d=>{if(o&&d<e[0])return t[0];let h=0;if(u>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const m=xm(e[h],e[h+1],d);return l[h](m)};return n?d=>f(ma(e[0],e[a-1],d)):f}function RIe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=xm(0,t,r);e.push(kt(n,1,i))}}function kIe(e){const t=[0];return RIe(t,e.length-1),t}function DIe(e,t){return e.map(n=>n*t)}function IIe(e,t){return e.map(()=>t||XJ).splice(0,e.length-1)}function mp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=UDe(r)?r.map(QH):QH(r),a={done:!1,value:t[0]},o=DIe(n&&n.length===t.length?n:kIe(t),e),l=MIe(o,t,{ease:Array.isArray(i)?i:IIe(t,i)});return{calculatedDuration:e,next:u=>(a.value=l(u),a.done=u>=e,a)}}const LIe=e=>e!==null;function Xx(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(LIe),l=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||r===void 0?a[l]:r}const $Ie={decay:rM,inertia:rM,tween:mp,keyframes:mp,spring:b0};function uee(e){typeof e.type=="string"&&(e.type=$Ie[e.type])}class hk{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const BIe=e=>e/100;class x0 extends hk{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==ir.now()&&this.tick(ir.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;uee(t);const{type:n=mp,repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:l}=t;const u=n||mp;u!==mp&&typeof l[0]!="number"&&(this.mixKeyframes=ng(BIe,oee(l[0],l[1])),l=[0,100]);const f=u({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=dk(f));const{calculatedDuration:d}=f;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:d,repeat:h,repeatType:m,repeatDelay:g,type:x,onUpdate:w,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-f*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?S<0:S>i;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let _=this.currentTime,A=r;if(h){const M=Math.min(this.currentTime,i)/l;let R=Math.floor(M),$=M%1;!$&&M>=1&&($=1),$===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(m==="reverse"?($=1-$,g&&($-=g/l)):m==="mirror"&&(A=o)),_=ma(0,1,$)*l}let C;E?(this.delayState.value=d[0],C=this.delayState):C=A.next(_),a&&!E&&(C.value=a(C.value));let{done:O}=C;!E&&u!==null&&(O=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return P&&x!==rM&&(C.value=Xx(d,this.options,y,this.speed)),w&&w(C.value),P&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return oi(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+oi(t)}get time(){return oi(this.currentTime)}set time(t){t=zr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return lee(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(ir.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=oi(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=SIe,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(a=(i=this.options).onPlay)==null||a.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ir.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function qIe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Kl=e=>e*180/Math.PI,iM=e=>{const t=Kl(Math.atan2(e[1],e[0]));return aM(t)},zIe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:iM,rotateZ:iM,skewX:e=>Kl(Math.atan(e[1])),skewY:e=>Kl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},aM=e=>(e=e%360,e<0&&(e+=360),e),a8=iM,o8=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),s8=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),VIe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:o8,scaleY:s8,scale:e=>(o8(e)+s8(e))/2,rotateX:e=>aM(Kl(Math.atan2(e[6],e[5]))),rotateY:e=>aM(Kl(Math.atan2(-e[2],e[0]))),rotateZ:a8,rotate:a8,skewX:e=>Kl(Math.atan(e[4])),skewY:e=>Kl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function oM(e){return e.includes("scale")?1:0}function sM(e,t){if(!e||e==="none")return oM(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=VIe,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=zIe,i=l}if(!i)return oM(t);const a=r[t],o=i[1].split(",").map(UIe);return typeof a=="function"?a(o):o[a]}const FIe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sM(n,t)};function UIe(e){return parseFloat(e.trim())}const Md=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rd=new Set([...Md,"pathRotation"]),l8=e=>e===Pd||e===Ne,HIe=new Set(["x","y","z"]),GIe=Md.filter(e=>!HIe.has(e));function WIe(e){const t=[];return GIe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ms={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>sM(t,"x"),y:(e,{transform:t})=>sM(t,"y")};Ms.translateX=Ms.x;Ms.translateY=Ms.y;const cu=new Set;let lM=!1,uM=!1,cM=!1;function cee(){if(uM){const e=Array.from(cu).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=WIe(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var l;(l=r.getValue(a))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}uM=!1,lM=!1,cu.forEach(e=>e.complete(cM)),cu.clear()}function fee(){cu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(uM=!0)})}function KIe(){cM=!0,fee(),cee(),cM=!1}class pk{constructor(t,n,r,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(cu.add(this),lM||(lM=!0,It.read(fee),It.resolveKeyframes(cee))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}qIe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),cu.delete(this)}cancel(){this.state==="scheduled"&&(cu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const YIe=e=>e.startsWith("--");function dee(e,t,n){YIe(t)?e.style.setProperty(t,n):e.style[t]=n}const XIe={};function hee(e,t){const n=qJ(e);return()=>XIe[t]??n()}const ZIe=hee(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),pee=hee(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ap=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,u8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ap([0,.65,.55,1]),circOut:ap([.55,0,1,.45]),backIn:ap([.31,.01,.66,-.59]),backOut:ap([.33,1.53,.69,.99])};function mee(e,t){if(e)return typeof e=="function"?pee()?see(e,t):"ease-out":ZJ(e)?ap(e):Array.isArray(e)?e.map(n=>mee(n,t)||u8.easeOut):u8[e]}function QIe(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:u}={},f=void 0){const d={[t]:n};u&&(d.offset=u);const h=mee(l,i);Array.isArray(h)&&(d.easing=h);const m={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return f&&(m.pseudoElement=f),e.animate(d,m)}function gee(e){return typeof e=="function"&&"applyToOptions"in e}function JIe({type:e,...t}){return gee(e)&&pee()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class vee extends hk{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,ik(typeof t.type!="string");const f=JIe(t);this.animation=QIe(n,r,i,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=Xx(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),dee(n,r,d),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return oi(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+oi(t)}get time(){return oi(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=zr(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:i}){var a;return this.allowFlatten&&((a=this.animation.effect)==null||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&ZIe()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),ui):i(this)}}const yee={anticipate:WJ,backInOut:GJ,circInOut:YJ};function eLe(e){return e in yee}function tLe(e){typeof e.ease=="string"&&eLe(e.ease)&&(e.ease=yee[e.ease])}const Cj=10;class nLe extends vee{constructor(t){tLe(t),uee(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:a,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new x0({...o,autoplay:!1}),u=Math.max(Cj,ir.now()-this.startTime),f=ma(0,Cj,u-Cj),d=l.sample(u).value,{name:h}=this.options;a&&h&&dee(a,h,d),n.setWithVelocity(l.sample(Math.max(0,u-f)).value,d,f),l.stop()}}const c8=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Li.test(e)||e==="0")&&!e.startsWith("url("));function rLe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function iLe(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=c8(i,t),l=c8(a,t);return!o||!l?!1:rLe(e)||(n==="spring"||gee(n))&&r}function fM(e){e.duration=0,e.type="keyframes"}const bee=new Set(["opacity","clipPath","filter","transform"]),aLe=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function oLe(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&aLe.test(e[t]))return!0;return!1}const sLe=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),lLe=qJ(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function uLe(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:d}=t.owner.getProps();return lLe()&&n&&(bee.has(n)||sLe.has(n)&&oLe(l))&&(n!=="transform"||!d)&&!f&&!r&&i!=="mirror"&&a!==0&&o!=="inertia"}const cLe=40;class fLe extends hk{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:l,name:u,motionValue:f,element:d,...h}){var x;super(),this.stop=()=>{var w,y;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=ir.now();const m={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,name:u,motionValue:f,element:d,...h},g=(d==null?void 0:d.KeyframeResolver)||pk;this.keyframeResolver=new g(l,(w,y,S)=>this.onKeyframesResolved(w,y,m,!S),u,f,d),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,r,i){var S,E;this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:u,isHandoff:f,onUpdate:d}=r;this.resolvedAt=ir.now();let h=!0;iLe(t,a,o,l)||(h=!1,(Xs.instantAnimations||!u)&&(d==null||d(Xx(t,r,n))),t[0]=t[t.length-1],fM(r),r.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>cLe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},x=h&&!f&&uLe(g),w=(E=(S=g.motionValue)==null?void 0:S.owner)==null?void 0:E.current;let y;if(x)try{y=new nLe({...g,element:w})}catch{y=new x0(g)}else y=new x0(g);y.finished.then(()=>{this.notifyFinished()}).catch(ui),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),KIe()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function xee(e,t,n,r=0,i=1){const a=Array.from(e).sort((f,d)=>f.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(a,o):i===1?a*r:l-a*r}const f8=30,dLe=e=>!isNaN(parseFloat(e));class hLe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var a;const i=ir.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ir.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=dLe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new ak);const r=this.events[t].add(n);return t==="change"?()=>{r(),It.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ir.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>f8)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,f8);return zJ(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ud(e,t){return new hLe(e,t)}function wee(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function mk(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?wee(n,e):n}const pLe={type:"spring",stiffness:500,damping:25,restSpeed:10},mLe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),gLe={type:"keyframes",duration:.8},vLe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},yLe=(e,{keyframes:t})=>t.length>2?gLe:Rd.has(e)?e.startsWith("scale")?mLe(t[1]):pLe:vLe,bLe=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function xLe(e){for(const t in e)if(!bLe.has(t))return!0;return!1}const gk=(e,t,n,r={},i,a)=>o=>{const l=mk(r,e)||{},u=l.delay||r.delay||0;let{elapsed:f=0}=r;f=f-zr(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};xLe(l)||Object.assign(d,yLe(e,d)),d.duration&&(d.duration=zr(d.duration)),d.repeatDelay&&(d.repeatDelay=zr(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(fM(d),d.delay===0&&(h=!0)),(Xs.instantAnimations||Xs.skipAnimations||i!=null&&i.shouldSkipAnimations||l.skipAnimations)&&(h=!0,fM(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const m=Xx(d.keyframes,l);if(m!==void 0){It.update(()=>{d.onUpdate(m),d.onComplete()});return}}return l.isSync?new x0(d):new fLe(d)},wLe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function SLe(e){const t=wLe.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function See(e,t,n=1){const[r,i]=SLe(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return LJ(o)?parseFloat(o):o}return lk(i)?See(i,t,n+1):i}function d8(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function vk(e,t,n,r){if(typeof t=="function"){const[i,a]=d8(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=d8(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function fu(e,t,n){const r=e.getProps();return vk(r,t,n!==void 0?n:r.custom,e)}const _ee=new Set(["width","height","top","left","right","bottom",...Md]),dM=e=>Array.isArray(e);function _Le(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ud(n))}function ELe(e){return dM(e)?e[e.length-1]||0:e}function ALe(e,t){const n=fu(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const l=ELe(a[o]);_Le(e,o,l)}}const qn=e=>!!(e&&e.getVelocity);function CLe(e){return!!(qn(e)&&e.add)}function hM(e,t){const n=e.getValue("willChange");if(CLe(n))return n.add(t);if(!n&&Xs.WillChange){const r=new Xs.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function yk(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const TLe="framerAppearId",Eee="data-"+yk(TLe);function Aee(e){return e.props[Eee]}function OLe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Cee(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...l}=t;const u=e.getDefaultTransition();a=a?wee(a,u):u;const f=a==null?void 0:a.reduceMotion,d=a==null?void 0:a.skipAnimations;r&&(a=r);const h=[],m=i&&e.animationState&&e.animationState.getState()[i],g=a==null?void 0:a.path;g&&g.animateVisualElement(e,l,a,n,h);for(const x in l){const w=e.getValue(x,e.latestValues[x]??null),y=l[x];if(y===void 0||m&&OLe(m,x))continue;const S={delay:n,...mk(a||{},x)};d&&(S.skipAnimations=!0);const E=w.get();if(E!==void 0&&!w.isAnimating()&&!Array.isArray(y)&&y===E&&!S.velocity){It.update(()=>w.set(y));continue}let _=!1;if(window.MotionHandoffAnimation){const O=Aee(e);if(O){const P=window.MotionHandoffAnimation(O,x,It);P!==null&&(S.startTime=P,_=!0)}}hM(e,x);const A=f??e.shouldReduceMotion;w.start(gk(x,w,y,A&&_ee.has(x)?{type:!1}:S,e,_));const C=w.animation;C&&h.push(C)}if(o){const x=()=>It.update(()=>{o&&ALe(e,o)});h.length?Promise.all(h).then(x):x()}return h}function pM(e,t,n={}){var u;const r=fu(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(Cee(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:m}=i;return jLe(e,t,f,d,h,m,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[f,d]=l==="beforeChildren"?[a,o]:[o,a];return f().then(()=>d())}else return Promise.all([a(),o(n.delay)])}function jLe(e,t,n=0,r=0,i=0,a=1,o){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push(pM(u,t,{...o,delay:n+(typeof r=="function"?0:r)+xee(e.variantChildren,u,r,i,a)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function NLe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>pM(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=pM(e,t,n);else{const i=typeof t=="function"?fu(e,t,n.custom):t;r=Promise.all(Cee(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const PLe={test:e=>e==="auto",parse:e=>e},Tee=e=>t=>t.test(e),Oee=[Pd,Ne,da,Wa,rIe,nIe,PLe],h8=e=>Oee.find(Tee(e));function MLe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||BJ(e):!0}const RLe=new Set(["brightness","contrast","saturate","opacity"]);function kLe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(uk)||[];if(!r)return e;const i=n.replace(r,"");let a=RLe.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const DLe=/\b([a-z-]*)\(.*?\)/gu,mM={...Li,getAnimatableNone:e=>{const t=e.match(DLe);return t?t.map(kLe).join(" "):e}},gM={...Li,getAnimatableNone:e=>{const t=Li.parse(e);return Li.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},p8={...Pd,transform:Math.round},ILe={rotate:Wa,pathRotation:Wa,rotateX:Wa,rotateY:Wa,rotateZ:Wa,scale:cy,scaleX:cy,scaleY:cy,scaleZ:cy,skew:Wa,skewX:Wa,skewY:Wa,distance:Ne,translateX:Ne,translateY:Ne,translateZ:Ne,x:Ne,y:Ne,z:Ne,perspective:Ne,transformPerspective:Ne,opacity:wm,originX:e8,originY:e8,originZ:Ne},w0={borderWidth:Ne,borderTopWidth:Ne,borderRightWidth:Ne,borderBottomWidth:Ne,borderLeftWidth:Ne,borderRadius:Ne,borderTopLeftRadius:Ne,borderTopRightRadius:Ne,borderBottomRightRadius:Ne,borderBottomLeftRadius:Ne,width:Ne,maxWidth:Ne,height:Ne,maxHeight:Ne,top:Ne,right:Ne,bottom:Ne,left:Ne,inset:Ne,insetBlock:Ne,insetBlockStart:Ne,insetBlockEnd:Ne,insetInline:Ne,insetInlineStart:Ne,insetInlineEnd:Ne,padding:Ne,paddingTop:Ne,paddingRight:Ne,paddingBottom:Ne,paddingLeft:Ne,paddingBlock:Ne,paddingBlockStart:Ne,paddingBlockEnd:Ne,paddingInline:Ne,paddingInlineStart:Ne,paddingInlineEnd:Ne,margin:Ne,marginTop:Ne,marginRight:Ne,marginBottom:Ne,marginLeft:Ne,marginBlock:Ne,marginBlockStart:Ne,marginBlockEnd:Ne,marginInline:Ne,marginInlineStart:Ne,marginInlineEnd:Ne,fontSize:Ne,backgroundPositionX:Ne,backgroundPositionY:Ne,...ILe,zIndex:p8,fillOpacity:wm,strokeOpacity:wm,numOctaves:p8},LLe={...w0,color:gn,backgroundColor:gn,outlineColor:gn,fill:gn,stroke:gn,borderColor:gn,borderTopColor:gn,borderRightColor:gn,borderBottomColor:gn,borderLeftColor:gn,filter:mM,WebkitFilter:mM,mask:gM,WebkitMask:gM},jee=e=>LLe[e],$Le=new Set([mM,gM]);function Nee(e,t){let n=jee(e);return $Le.has(n)||(n=Li),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const BLe=new Set(["auto","none","0"]);function qLe(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!BLe.has(a)&&ld(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=Nee(n,i)}class zLe extends pk{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),lk(h))){const m=See(h,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!_ee.has(r)||t.length!==2)return;const[i,a]=t,o=h8(i),l=h8(a),u=JH(i),f=JH(a);if(u!==f&&Ms[r]){this.needsMeasurement=!0;return}if(o!==l)if(l8(o)&&l8(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Ms[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||MLe(t[i]))&&r.push(i);r.length&&qLe(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ms[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=r.length-1,o=r[a];r[a]=Ms[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([u,f])=>{t.getValue(u).set(f)}),this.resolveNoneKeyframes()}}function Pee(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const vM=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function jy(e){return $J(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:bk}=QJ(queueMicrotask,!1),Ei={x:!1,y:!1};function Mee(){return Ei.x||Ei.y}function VLe(e){return e==="x"||e==="y"?Ei[e]?null:(Ei[e]=!0,()=>{Ei[e]=!1}):Ei.x||Ei.y?null:(Ei.x=Ei.y=!0,()=>{Ei.x=Ei.y=!1})}function Ree(e,t){const n=Pee(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function FLe(e){return!(e.pointerType==="touch"||Mee())}function ULe(e,t,n={}){const[r,i,a]=Ree(e,n);return r.forEach(o=>{let l=!1,u=!1,f;const d=()=>{o.removeEventListener("pointerleave",x)},h=y=>{f&&(f(y),f=void 0),d()},m=y=>{l=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),u&&(u=!1,h(y))},g=()=>{l=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},x=y=>{if(y.pointerType!=="touch"){if(l){u=!0;return}h(y)}},w=y=>{if(!FLe(y))return;u=!1;const S=t(o,y);typeof S=="function"&&(f=S,o.addEventListener("pointerleave",x,i))};o.addEventListener("pointerenter",w,i),o.addEventListener("pointerdown",g,i)}),a}const kee=(e,t)=>t?e===t?!0:kee(e,t.parentElement):!1,xk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,HLe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function GLe(e){return HLe.has(e.tagName)||e.isContentEditable===!0}const WLe=new Set(["INPUT","SELECT","TEXTAREA"]);function KLe(e){return WLe.has(e.tagName)||e.isContentEditable===!0}const Ny=new WeakSet;function m8(e){return t=>{t.key==="Enter"&&e(t)}}function Tj(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const YLe=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=m8(()=>{if(Ny.has(n))return;Tj(n,"down");const i=m8(()=>{Tj(n,"up")}),a=()=>Tj(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function g8(e){return xk(e)&&!Mee()}const v8=new WeakSet;function XLe(e,t,n={}){const[r,i,a]=Ree(e,n),o=l=>{const u=l.currentTarget;if(!g8(l)||v8.has(l))return;Ny.add(u),n.stopPropagation&&v8.add(l);const f=t(u,l),d=(g,x)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),Ny.has(u)&&Ny.delete(u),g8(g)&&typeof f=="function"&&f(g,{success:x})},h=g=>{d(g,u===window||u===document||n.useGlobalTarget||kee(u,g.target))},m=g=>{d(g,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",m,i)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),jy(l)&&(l.addEventListener("focus",f=>YLe(f,i)),!GLe(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function wk(e){return $J(e)&&"ownerSVGElement"in e}const Py=new WeakMap;let cs;const Dee=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:wk(r)&&"getBBox"in r?r.getBBox()[t]:r[n],ZLe=Dee("inline","width","offsetWidth"),QLe=Dee("block","height","offsetHeight");function JLe({target:e,borderBoxSize:t}){var n;(n=Py.get(e))==null||n.forEach(r=>{r(e,{get width(){return ZLe(e,t)},get height(){return QLe(e,t)}})})}function e$e(e){e.forEach(JLe)}function t$e(){typeof ResizeObserver>"u"||(cs=new ResizeObserver(e$e))}function n$e(e,t){cs||t$e();const n=Pee(e);return n.forEach(r=>{let i=Py.get(r);i||(i=new Set,Py.set(r,i)),i.add(t),cs==null||cs.observe(r)}),()=>{n.forEach(r=>{const i=Py.get(r);i==null||i.delete(t),i!=null&&i.size||cs==null||cs.unobserve(r)})}}const My=new Set;let Kc;function r$e(){Kc=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};My.forEach(t=>t(e))},window.addEventListener("resize",Kc)}function i$e(e){return My.add(e),Kc||r$e(),()=>{My.delete(e),!My.size&&typeof Kc=="function"&&(window.removeEventListener("resize",Kc),Kc=void 0)}}function y8(e,t){return typeof e=="function"?i$e(e):n$e(e,t)}function a$e(e){return wk(e)&&e.tagName==="svg"}const o$e=[...Oee,gn,Li],s$e=e=>o$e.find(Tee(e)),b8=()=>({translate:0,scale:1,origin:0,originPoint:0}),Yc=()=>({x:b8(),y:b8()}),x8=()=>({min:0,max:0}),En=()=>({x:x8(),y:x8()}),l$e=new WeakMap;function Zx(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Sm(e){return typeof e=="string"||Array.isArray(e)}const Sk=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_k=["initial",...Sk];function Qx(e){return Zx(e.animate)||_k.some(t=>Sm(e[t]))}function Iee(e){return!!(Qx(e)||e.variants)}function u$e(e,t,n){for(const r in t){const i=t[r],a=n[r];if(qn(i))e.addValue(r,i);else if(qn(a))e.addValue(r,ud(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,ud(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const yM={current:null},Lee={current:!1},c$e=typeof window<"u";function f$e(){if(Lee.current=!0,!!c$e)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yM.current=e.matches;e.addEventListener("change",t),t()}else yM.current=!1}const w8=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let S0={};function $ee(e){S0=e}function d$e(){return S0}class h$e{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:o,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=pk,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=ir.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,It.render(this.render,!1,!0))};const{latestValues:f,renderState:d}=l;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Qx(n),this.isVariantNode=Iee(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in m){const x=m[g];f[g]!==void 0&&qn(x)&&x.set(f[g])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,l$e.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((i,a)=>this.bindToMotionValue(a,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Lee.current||f$e(),this.shouldReduceMotion=yM.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Zs(this.notifyUpdate),Zs(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&bee.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:u,ease:f,duration:d}=n.accelerate,h=new vee({element:this.current,name:t,keyframes:l,times:u,ease:f,duration:zr(d)}),m=o(h);this.valueSubscriptions.set(t,()=>{m(),h.cancel()});return}const r=Rd.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&It.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in S0){const n=S0[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):En()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<w8.length;r++){const i=w8[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=u$e(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ud(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(LJ(r)||BJ(r))?r=parseFloat(r):!s$e(r)&&Li.test(n)&&(r=Nee(t,n)),this.setBaseTarget(t,qn(r)?r.get():r)),qn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=vk(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!qn(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new ak),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){bk.render(this.render)}}class Bee extends h$e{constructor(){super(...arguments),this.KeyframeResolver=zLe}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class il{constructor(t){this.isMounted=!1,this.node=t}update(){}}function qee({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function p$e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function m$e(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Oj(e){return e===void 0||e===1}function bM({scale:e,scaleX:t,scaleY:n}){return!Oj(e)||!Oj(t)||!Oj(n)}function $l(e){return bM(e)||zee(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zee(e){return S8(e.x)||S8(e.y)}function S8(e){return e&&e!=="0%"}function _0(e,t,n){const r=e-n,i=t*r;return n+i}function _8(e,t,n,r,i){return i!==void 0&&(e=_0(e,i,r)),_0(e,n,r)+t}function xM(e,t=0,n=1,r,i){e.min=_8(e.min,t,n,r,i),e.max=_8(e.max,t,n,r,i)}function Vee(e,{x:t,y:n}){xM(e.x,t.translate,t.scale,t.originPoint),xM(e.y,n.translate,n.scale,n.originPoint)}const E8=.999999999999,A8=1.0000000000001;function g$e(e,t,n,r=!1){var l;const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let u=0;u<i;u++){a=n[u],o=a.projectionDelta;const{visualElement:f}=a.options;f&&f.props.style&&f.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(ra(e.x,-a.scroll.offset.x),ra(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Vee(e,o)),r&&$l(a.latestValues)&&Ry(e,a.latestValues,(l=a.layout)==null?void 0:l.layoutBox))}t.x<A8&&t.x>E8&&(t.x=1),t.y<A8&&t.y>E8&&(t.y=1)}function ra(e,t){e.min+=t,e.max+=t}function C8(e,t,n,r,i=.5){const a=kt(e.min,e.max,i);xM(e,t,n,a,r)}function T8(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Ry(e,t,n){const r=n??e;C8(e.x,T8(t.x,r.x),t.scaleX,t.scale,t.originX),C8(e.y,T8(t.y,r.y),t.scaleY,t.scale,t.originY)}function Fee(e,t){return qee(m$e(e.getBoundingClientRect(),t))}function v$e(e,t,n){const r=Fee(e,n),{scroll:i}=t;return i&&(ra(r.x,i.offset.x),ra(r.y,i.offset.y)),r}const y$e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},b$e=Md.length;function x$e(e,t,n){let r="",i=!0;for(let o=0;o<b$e;o++){const l=Md[o],u=e[l];if(u===void 0)continue;let f=!0;if(typeof u=="number")f=u===(l.startsWith("scale")?1:0);else{const d=parseFloat(u);f=l.startsWith("scale")?d===1:d===0}if(!f||n){const d=vM(u,w0[l]);if(!f){i=!1;const h=y$e[l]||l;r+=`${h}(${d}) `}n&&(t[l]=d)}}const a=e.pathRotation;return a&&(i=!1,r+=`rotate(${vM(a,w0.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function Ek(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,l=!1;for(const u in t){const f=t[u];if(Rd.has(u)){o=!0;continue}else if(eee(u)){i[u]=f;continue}else{const d=vM(f,w0[u]);u.startsWith("origin")?(l=!0,a[u]=d):r[u]=d}}if(t.transform||(o||n?r.transform=x$e(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:d=0}=a;r.transformOrigin=`${u} ${f} ${d}`}}function Uee(e,{style:t,vars:n},r,i){const a=e.style;let o;for(o in t)a[o]=t[o];i==null||i.applyProjectionStyles(a,r);for(o in n)a.setProperty(o,n[o])}function O8(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yh={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ne.test(e))e=parseFloat(e);else return e;const n=O8(e,t.target.x),r=O8(e,t.target.y);return`${n}% ${r}%`}},w$e={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Li.parse(e);if(i.length>5)return r;const a=Li.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=u;const f=kt(l,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=f),typeof i[3+o]=="number"&&(i[3+o]/=f),a(i)}},wM={borderRadius:{...Yh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yh,borderTopRightRadius:Yh,borderBottomLeftRadius:Yh,borderBottomRightRadius:Yh,boxShadow:w$e};function Hee(e,{layout:t,layoutId:n}){return Rd.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wM[e]||e==="opacity")}function Ak(e,t,n){var o;const r=e.style,i=t==null?void 0:t.style,a={};if(!r)return a;for(const l in r)(qn(r[l])||i&&qn(i[l])||Hee(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(a[l]=r[l]);return a}function S$e(e){return window.getComputedStyle(e)}class _$e extends Bee{constructor(){super(...arguments),this.type="html",this.renderInstance=Uee}readValueFromInstance(t,n){var r;if(Rd.has(n))return(r=this.projection)!=null&&r.isProjecting?oM(n):FIe(t,n);{const i=S$e(t),a=(eee(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Fee(t,n)}build(t,n,r){Ek(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ak(t,n,r)}}const E$e={offset:"stroke-dashoffset",array:"stroke-dasharray"},A$e={offset:"strokeDashoffset",array:"strokeDasharray"};function C$e(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?E$e:A$e;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}const T$e=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Gee(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...l},u,f,d){if(Ek(e,l,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m}=e;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const g of T$e)h[g]!==void 0&&(m[g]=h[g],delete h[g]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&C$e(h,i,a,o,!1)}const Wee=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Kee=e=>typeof e=="string"&&e.toLowerCase()==="svg";function O$e(e,t,n,r){Uee(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Wee.has(i)?i:yk(i),t.attrs[i])}function Yee(e,t,n){const r=Ak(e,t,n);for(const i in e)if(qn(e[i])||qn(t[i])){const a=Md.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}class j$e extends Bee{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=En}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Rd.has(n)){const r=jee(n);return r&&r.default||0}return n=Wee.has(n)?n:yk(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Yee(t,n,r)}build(t,n,r){Gee(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){O$e(t,n,r,i)}mount(t){this.isSVGTag=Kee(t.tagName),super.mount(t)}}const N$e=_k.length;function Xee(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Xee(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<N$e;n++){const r=_k[n],i=e.props[r];(Sm(i)||i===!1)&&(t[r]=i)}return t}function Zee(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const P$e=[...Sk].reverse(),M$e=Sk.length;function R$e(e){return t=>Promise.all(t.map(({animation:n,options:r})=>NLe(e,n,r)))}function k$e(e){let t=R$e(e),n=j8(),r=!0,i=!1;const a=f=>(d,h)=>{var g;const m=fu(e,h,f==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(m){const{transition:x,transitionEnd:w,...y}=m;d={...d,...y,...w}}return d};function o(f){t=f(e)}function l(f){const{props:d}=e,h=Xee(e.parent)||{},m=[],g=new Set;let x={},w=1/0;for(let S=0;S<M$e;S++){const E=P$e[S],_=n[E],A=d[E]!==void 0?d[E]:h[E],C=Sm(A),O=E===f?_.isActive:null;O===!1&&(w=S);let P=A===h[E]&&A!==d[E]&&C;if(P&&(r||i)&&e.manuallyAnimateOnMount&&(P=!1),_.protectedKeys={...x},!_.isActive&&O===null||!A&&!_.prevProp||Zx(A)||typeof A=="boolean")continue;if(E==="exit"&&_.isActive&&O!==!0){_.prevResolvedValues&&(x={...x,..._.prevResolvedValues});continue}const M=D$e(_.prevProp,A);let R=M||E===f&&_.isActive&&!P&&C||S>w&&C,$=!1;const I=Array.isArray(A)?A:[A];let k=I.reduce(a(E),{});O===!1&&(k={});const{prevResolvedValues:V={}}=_,D={...V,...k},q=H=>{R=!0,g.has(H)&&($=!0,g.delete(H)),_.needsAnimating[H]=!0;const Y=e.getValue(H);Y&&(Y.liveStyle=!1)};for(const H in D){const Y=k[H],Z=V[H];if(x.hasOwnProperty(H))continue;let U=!1;dM(Y)&&dM(Z)?U=!Zee(Y,Z)||M:U=Y!==Z,U?Y!=null?q(H):g.add(H):Y!==void 0&&g.has(H)?q(H):_.protectedKeys[H]=!0}_.prevProp=A,_.prevResolvedValues=k,_.isActive&&(x={...x,...k}),(r||i)&&e.blockInitialAnimation&&(R=!1);const L=P&&M;R&&(!L||$)&&m.push(...I.map(H=>{const Y={type:E};if(typeof H=="string"&&(r||i)&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:Z}=e,U=fu(Z,H);if(Z.enteringChildren&&U){const{delayChildren:F}=U.transition||{};Y.delay=xee(Z.enteringChildren,e,F)}}return{animation:H,options:Y}}))}if(g.size){const S={};if(typeof d.initial!="boolean"){const E=fu(e,Array.isArray(d.initial)?d.initial[0]:d.initial);E&&E.transition&&(S.transition=E.transition)}g.forEach(E=>{const _=e.getBaseTarget(E),A=e.getValue(E);A&&(A.liveStyle=!0),S[E]=_??null}),m.push({animation:S})}let y=!!m.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,i=!1,y?t(m):Promise.resolve()}function u(f,d){var m;if(n[f].isActive===d)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(g=>{var x;return(x=g.animationState)==null?void 0:x.setActive(f,d)}),n[f].isActive=d;const h=l(f);for(const g in n)n[g].protectedKeys={};return h}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=j8(),i=!0}}}function D$e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Zee(t,e):!1}function Rl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function j8(){return{animate:Rl(!0),whileInView:Rl(),whileHover:Rl(),whileTap:Rl(),whileDrag:Rl(),whileFocus:Rl(),exit:Rl()}}function SM(e,t){e.min=t.min,e.max=t.max}function _i(e,t){SM(e.x,t.x),SM(e.y,t.y)}function N8(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Qee=1e-4,I$e=1-Qee,L$e=1+Qee,Jee=.01,$$e=0-Jee,B$e=0+Jee;function ar(e){return e.max-e.min}function q$e(e,t,n){return Math.abs(e-t)<=n}function P8(e,t,n,r=.5){e.origin=r,e.originPoint=kt(t.min,t.max,e.origin),e.scale=ar(n)/ar(t),e.translate=kt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=I$e&&e.scale<=L$e||isNaN(e.scale))&&(e.scale=1),(e.translate>=$$e&&e.translate<=B$e||isNaN(e.translate))&&(e.translate=0)}function gp(e,t,n,r){P8(e.x,t.x,n.x,r?r.originX:void 0),P8(e.y,t.y,n.y,r?r.originY:void 0)}function M8(e,t,n,r=0){const i=r?kt(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+ar(t)}function z$e(e,t,n,r){M8(e.x,t.x,n.x,r==null?void 0:r.x),M8(e.y,t.y,n.y,r==null?void 0:r.y)}function R8(e,t,n,r=0){const i=r?kt(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+ar(t)}function E0(e,t,n,r){R8(e.x,t.x,n.x,r==null?void 0:r.x),R8(e.y,t.y,n.y,r==null?void 0:r.y)}function k8(e,t,n,r,i){return e-=t,e=_0(e,1/n,r),i!==void 0&&(e=_0(e,1/i,r)),e}function V$e(e,t=0,n=1,r=.5,i,a=e,o=e){if(da.test(t)&&(t=parseFloat(t),t=kt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=kt(a.min,a.max,r);e===a&&(l-=t),e.min=k8(e.min,t,n,l,i),e.max=k8(e.max,t,n,l,i)}function D8(e,t,[n,r,i],a,o){V$e(e,t[n],t[r],t[i],t.scale,a,o)}const F$e=["x","scaleX","originX"],U$e=["y","scaleY","originY"];function I8(e,t,n,r){D8(e.x,t,F$e,n?n.x:void 0,r?r.x:void 0),D8(e.y,t,U$e,n?n.y:void 0,r?r.y:void 0)}function L8(e){return e.translate===0&&e.scale===1}function ete(e){return L8(e.x)&&L8(e.y)}function $8(e,t){return e.min===t.min&&e.max===t.max}function H$e(e,t){return $8(e.x,t.x)&&$8(e.y,t.y)}function B8(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tte(e,t){return B8(e.x,t.x)&&B8(e.y,t.y)}function q8(e){return ar(e.x)/ar(e.y)}function z8(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Qi(e){return[e("x"),e("y")]}function G$e(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:d,pathRotation:h,rotateX:m,rotateY:g,skewX:x,skewY:w}=n;f&&(r=`perspective(${f}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotate(${h}deg) `),m&&(r+=`rotateX(${m}deg) `),g&&(r+=`rotateY(${g}deg) `),x&&(r+=`skewX(${x}deg) `),w&&(r+=`skewY(${w}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const nte=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],W$e=nte.length,V8=e=>typeof e=="string"?parseFloat(e):e,F8=e=>typeof e=="number"||Ne.test(e);function K$e(e,t,n,r,i,a){i?(e.opacity=kt(0,n.opacity??1,Y$e(r)),e.opacityExit=kt(t.opacity??1,0,X$e(r))):a&&(e.opacity=kt(t.opacity??1,n.opacity??1,r));for(let o=0;o<W$e;o++){const l=nte[o];let u=U8(t,l),f=U8(n,l);if(u===void 0&&f===void 0)continue;u||(u=0),f||(f=0),u===0||f===0||F8(u)===F8(f)?(e[l]=Math.max(kt(V8(u),V8(f),r),0),(da.test(f)||da.test(u))&&(e[l]+="%")):e[l]=f}(t.rotate||n.rotate)&&(e.rotate=kt(t.rotate||0,n.rotate||0,r))}function U8(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Y$e=rte(0,.5,KJ),X$e=rte(.5,.95,ui);function rte(e,t,n){return r=>r<e?0:r>t?1:n(xm(e,t,r))}function Z$e(e,t,n){const r=qn(e)?e:ud(e);return r.start(gk("",r,t,n)),r.animation}function _m(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Q$e=(e,t)=>e.depth-t.depth;class J$e{constructor(){this.children=[],this.isDirty=!1}add(t){rk(this.children,t),this.isDirty=!0}remove(t){g0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Q$e),this.isDirty=!1,this.children.forEach(t)}}function e3e(e,t){const n=ir.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Zs(r),e(a-t))};return It.setup(r,!0),()=>Zs(r)}function ky(e){return qn(e)?e.get():e}class t3e{constructor(){this.members=[]}add(t){rk(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(g0(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(g0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:a}=r.options,{layoutDependency:o}=t.options;(a===void 0||a!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,a,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(i=t.resumingFrom)==null?void 0:(a=i.options).onExitComplete)==null||o.call(a)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const Dy={hasAnimatedSinceResize:!0,hasEverUpdated:!1},jj=["","X","Y","Z"],n3e=1e3;let r3e=0;function Nj(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ite(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Aee(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",It,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ite(r)}function ate({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=r3e++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(o3e),this.nodes.forEach(d3e),this.nodes.forEach(h3e),this.nodes.forEach(s3e)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new J$e)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ak),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const u=this.eventHandlers.get(o);u&&u.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=wk(o)&&!a$e(o),this.instance=o;const{layoutId:l,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const m=()=>this.root.updateBlockedByResize=!1;It.read(()=>{h=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==h&&(h=g,this.root.updateBlockedByResize=!0,d&&d(),d=e3e(m,250),Dy.hasAnimatedSinceResize&&(Dy.hasAnimatedSinceResize=!1,this.nodes.forEach(W8)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||y3e,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=f.getProps(),S=!this.targetLayout||!tte(this.targetLayout,g),E=!h&&m;if(this.options.layoutRoot||this.resumeFrom||E||h&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...mk(x,"layout"),onPlay:w,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(d,E,_.path)}else h||W8(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Zs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(p3e),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ite(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(u3e),this.nodes.forEach(H8);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(G8);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(c3e),this.nodes.forEach(f3e),this.nodes.forEach(i3e),this.nodes.forEach(a3e)):this.nodes.forEach(G8),this.clearAllSnapshots();const l=ir.now();$n.delta=ma(0,1e3/60,l-$n.timestamp),$n.timestamp=l,$n.isProcessing=!0,wj.update.process($n),wj.preRender.process($n),wj.render.process($n),$n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,bk.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(l3e),this.sharedNodes.forEach(m3e)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,It.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){It.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ar(this.snapshot.measuredBox.x)&&!ar(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=En()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!ete(this.projectionDelta),u=this.getTransformTemplate(),f=u?u(this.latestValues,""):void 0,d=f!==this.prevTransformTemplateValue;o&&this.instance&&(l||$l(this.latestValues)||d)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return o&&(u=this.removeTransform(u)),b3e(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:o}=this.options;if(!o)return En();const l=o.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(x3e))){const{scroll:d}=this.root;d&&(ra(l.x,d.offset.x),ra(l.y,d.offset.y))}return l}removeElementScroll(o){var u;const l=En();if(_i(l,o),(u=this.scroll)!=null&&u.wasRoot)return l;for(let f=0;f<this.path.length;f++){const d=this.path[f],{scroll:h,options:m}=d;d!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&_i(l,o),ra(l.x,h.offset.x),ra(l.y,h.offset.y))}return l}applyTransform(o,l=!1,u){var d,h;const f=u||En();_i(f,o);for(let m=0;m<this.path.length;m++){const g=this.path[m];!l&&g.options.layoutScroll&&g.scroll&&g!==g.root&&(ra(f.x,-g.scroll.offset.x),ra(f.y,-g.scroll.offset.y)),$l(g.latestValues)&&Ry(f,g.latestValues,(d=g.layout)==null?void 0:d.layoutBox)}return $l(this.latestValues)&&Ry(f,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),f}removeTransform(o){var u;const l=En();_i(l,o);for(let f=0;f<this.path.length;f++){const d=this.path[f];if(!$l(d.latestValues))continue;let h;d.instance&&(bM(d.latestValues)&&d.updateSnapshot(),h=En(),_i(h,d.measurePageBox())),I8(l,d.latestValues,(u=d.snapshot)==null?void 0:u.layoutBox,h)}return $l(this.latestValues)&&I8(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var g;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=$n.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=En(),this.targetWithTransforms=En()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),z$e(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):_i(this.target,this.layout.layoutBox),Vee(this.target,this.targetDelta)):_i(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||bM(this.parent.latestValues)||zee(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,l,u){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=En(),this.relativeTargetOrigin=En(),E0(this.relativeTargetOrigin,l,u,this.options.layoutAnchor||void 0),_i(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===$n.timestamp&&(u=!1),u)return;const{layout:f,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||d))return;_i(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;g$e(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=En());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(N8(this.prevProjectionDelta.x,this.projectionDelta.x),N8(this.prevProjectionDelta.y,this.projectionDelta.y)),gp(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!z8(this.projectionDelta.x,this.prevProjectionDelta.x)||!z8(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Yc(),this.projectionDelta=Yc(),this.projectionDeltaWithTransform=Yc()}setAnimationOrigin(o,l=!1,u){const f=this.snapshot,d=f?f.latestValues:{},h={...this.latestValues},m=Yc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const g=En(),x=f?f.source:void 0,w=this.layout?this.layout.source:void 0,y=x!==w,S=this.getStack(),E=!S||S.members.length<=1,_=!!(y&&!E&&this.options.crossfade===!0&&!this.path.some(v3e));this.animationProgress=0;let A;const C=u==null?void 0:u.interpolateProjection(o);this.mixTargetDelta=O=>{const P=O/1e3,M=C==null?void 0:C(P);M?(m.x.translate=M.x,m.x.scale=kt(o.x.scale,1,P),m.x.origin=o.x.origin,m.x.originPoint=o.x.originPoint,m.y.translate=M.y,m.y.scale=kt(o.y.scale,1,P),m.y.origin=o.y.origin,m.y.originPoint=o.y.originPoint):(K8(m.x,o.x,P),K8(m.y,o.y,P)),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(E0(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),g3e(this.relativeTarget,this.relativeTargetOrigin,g,P),A&&H$e(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=En()),_i(A,this.relativeTarget)),y&&(this.animationValues=h,K$e(h,d,this.latestValues,P,_,E)),M&&M.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=M.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=P},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,u,f;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(f=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||f.stop(),this.pendingAnimation&&(Zs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=It.update(()=>{Dy.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ud(0)),this.motionValue.jump(0,!1),this.currentAnimation=Z$e(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(n3e),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:u,layout:f,latestValues:d}=o;if(!(!l||!u||!f)){if(this!==o&&this.layout&&f&&ote(this.options.animationType,this.layout.layoutBox,f.layoutBox)){u=this.target||En();const h=ar(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+h;const m=ar(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+m}_i(l,u),Ry(l,d),gp(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new t3e),this.sharedNodes.get(o).add(l);const f=l.options.initialPromotionConfig;l.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:u}={}){const f=this.getStack();f&&f.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const f={};u.z&&Nj("z",o,f,this.animationValues);for(let d=0;d<jj.length;d++)Nj(`rotate${jj[d]}`,o,f,this.animationValues),Nj(`skew${jj[d]}`,o,f,this.animationValues);o.render();for(const d in f)o.setStaticValue(d,f[d]),this.animationValues&&(this.animationValues[d]=f[d]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ky(l==null?void 0:l.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ky(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!$l(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=f.animationValues||f.latestValues;this.applyTransformsToTarget();let h=G$e(this.projectionDeltaWithTransform,this.treeScale,d);u&&(h=u(d,h)),o.transform=h;const{x:m,y:g}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,f.animationValues?o.opacity=f===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const x in wM){if(d[x]===void 0)continue;const{correct:w,applyTo:y,isCSSVariable:S}=wM[x],E=h==="none"?d[x]:w(d[x],f);if(y){const _=y.length;for(let A=0;A<_;A++)o[y[A]]=E}else S?this.options.visualElement.renderState.vars[x]=E:o[x]=E}this.options.layoutId&&(o.pointerEvents=f===this?ky(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(H8),this.root.sharedNodes.clear()}}}function i3e(e){e.updateLayout()}function a3e(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;if(a==="size")Qi(h=>{const m=o?t.measuredBox[h]:t.layoutBox[h],g=ar(m);m.min=r[h].min,m.max=m.min+g});else if(a==="x"||a==="y"){const h=a==="x"?"y":"x";SM(o?t.measuredBox[h]:t.layoutBox[h],r[h])}else ote(a,t.layoutBox,r)&&Qi(h=>{const m=o?t.measuredBox[h]:t.layoutBox[h],g=ar(r[h]);m.max=m.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const l=Yc();gp(l,r,t.layoutBox);const u=Yc();o?gp(u,e.applyTransform(i,!0),t.measuredBox):gp(u,r,t.layoutBox);const f=!ete(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:g}=h;if(m&&g){const x=e.options.layoutAnchor||void 0,w=En();E0(w,t.layoutBox,m.layoutBox,x);const y=En();E0(y,r,g.layoutBox,x),tte(w,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=w,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function o3e(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function s3e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function l3e(e){e.clearSnapshot()}function H8(e){e.clearMeasurements()}function u3e(e){e.isLayoutDirty=!0,e.updateLayout()}function G8(e){e.isLayoutDirty=!1}function c3e(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function f3e(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function W8(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function d3e(e){e.resolveTargetDelta()}function h3e(e){e.calcProjection()}function p3e(e){e.resetSkewAndRotation()}function m3e(e){e.removeLeadSnapshot()}function K8(e,t,n){e.translate=kt(t.translate,0,n),e.scale=kt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Y8(e,t,n,r){e.min=kt(t.min,n.min,r),e.max=kt(t.max,n.max,r)}function g3e(e,t,n,r){Y8(e.x,t.x,n.x,r),Y8(e.y,t.y,n.y,r)}function v3e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const y3e={duration:.45,ease:[.4,0,.1,1]},X8=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Z8=X8("applewebkit/")&&!X8("chrome/")?Math.round:ui;function Q8(e){e.min=Z8(e.min),e.max=Z8(e.max)}function b3e(e){Q8(e.x),Q8(e.y)}function ote(e,t,n){return e==="position"||e==="preserve-aspect"&&!q$e(q8(t),q8(n),.2)}function x3e(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const w3e=ate({attachResizeListener:(e,t)=>_m(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Pj={current:void 0},ste=ate({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Pj.current){const e=new w3e({});e.mount(window),e.setOptions({layoutScroll:!0}),Pj.current=e}return Pj.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Ck=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function J8(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function S3e(...e){return t=>{let n=!1;const r=e.map(i=>{const a=J8(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():J8(e[i],null)}}}}function _3e(...e){return j.useCallback(S3e(...e),e)}class E3e extends j.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(jy(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=jy(r)&&r.offsetWidth||0,a=jy(r)&&r.offsetHeight||0,o=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(o.height),l.width=parseFloat(o.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=i-l.width-l.left,l.bottom=a-l.height-l.top,l.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function A3e({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){var m;const o=j.useId(),l=j.useRef(null),u=j.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:f}=j.useContext(Ck),d=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),h=_3e(l,d);return j.useInsertionEffect(()=>{const{width:g,height:x,top:w,left:y,right:S,bottom:E,direction:_}=u.current;if(t||a===!1||!l.current||!g||!x)return;const A=_==="rtl",C=n==="left"?A?`right: ${S}`:`left: ${y}`:A?`left: ${y}`:`right: ${S}`,O=r==="bottom"?`bottom: ${E}`:`top: ${w}`;l.current.dataset.motionPopId=o;const P=document.createElement("style");f&&(P.nonce=f);const M=i??document.head;return M.appendChild(P),P.sheet&&P.sheet.insertRule(`
|
|
445
|
+
[data-motion-pop-id="${o}"] {
|
|
446
|
+
position: absolute !important;
|
|
447
|
+
width: ${g}px !important;
|
|
448
|
+
height: ${x}px !important;
|
|
449
|
+
${C}px !important;
|
|
450
|
+
${O}px !important;
|
|
451
|
+
}
|
|
452
|
+
`),()=>{var R;(R=l.current)==null||R.removeAttribute("data-motion-pop-id"),M.contains(P)&&M.removeChild(P)}},[t]),b.jsx(E3e,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:a===!1?e:j.cloneElement(e,{ref:h})})}const C3e=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:u,root:f})=>{const d=nk(T3e),h=j.useId();let m=!0,g=j.useMemo(()=>(m=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:x=>{d.set(x,!0);for(const w of d.values())if(!w)return;r&&r()},register:x=>(d.set(x,!1),()=>d.delete(x))}),[n,d,r]);return a&&m&&(g={...g}),j.useMemo(()=>{d.forEach((x,w)=>d.set(w,!1))},[n]),j.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=b.jsx(A3e,{pop:o==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:f,children:e}),b.jsx(Yx.Provider,{value:g,children:e})};function T3e(){return new Map}function lte(e=!0){const t=j.useContext(Yx);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=j.useId();j.useEffect(()=>{if(e)return i(a)},[e]);const o=j.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const fy=e=>e.key||"";function e9(e){const t=[];return j.Children.forEach(e,n=>{j.isValidElement(n)&&t.push(n)}),t}const O3e=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:l="left",anchorY:u="top",root:f})=>{const[d,h]=lte(o),m=j.useMemo(()=>e9(e),[e]),g=o&&!d?[]:m.map(fy),x=j.useRef(!0),w=j.useRef(m),y=nk(()=>new Map),S=j.useRef(new Set),[E,_]=j.useState(m),[A,C]=j.useState(m);IJ(()=>{x.current=!1,w.current=m;for(let M=0;M<A.length;M++){const R=fy(A[M]);g.includes(R)?(y.delete(R),S.current.delete(R)):y.get(R)!==!0&&y.set(R,!1)}},[A,g.length,g.join("-")]);const O=[];if(m!==E){let M=[...m];for(let R=0;R<A.length;R++){const $=A[R],I=fy($);g.includes(I)||(M.splice(R,0,$),O.push($))}return a==="wait"&&O.length&&(M=O),C(e9(M)),_(m),null}const{forceRender:P}=j.useContext(tk);return b.jsx(b.Fragment,{children:A.map(M=>{const R=fy(M),$=o&&!d?!1:m===A||g.includes(R),I=()=>{if(S.current.has(R))return;if(y.has(R))S.current.add(R),y.set(R,!0);else return;let k=!0;y.forEach(V=>{V||(k=!1)}),k&&(P==null||P(),C(w.current),o&&(h==null||h()),r&&r())};return b.jsx(C3e,{isPresent:$,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:f,onExitComplete:$?void 0:I,anchorX:l,anchorY:u,children:M},R)})})},ute=j.createContext({strict:!1}),t9={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let n9=!1;function j3e(){if(n9)return;const e={};for(const t in t9)e[t]={isEnabled:n=>t9[t].some(r=>!!n[r])};$ee(e),n9=!0}function cte(){return j3e(),d$e()}function N3e(e){const t=cte();for(const n in e)t[n]={...t[n],...e[n]};$ee(t)}const P3e=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function A0(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||P3e.has(e)}let fte=e=>!A0(e);function M3e(e){typeof e=="function"&&(fte=t=>t.startsWith("on")?!A0(t):e(t))}try{M3e(require("@emotion/is-prop-valid").default)}catch{}function R3e(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||qn(e[i])||(fte(i)||n===!0&&A0(i)||!t&&!A0(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Jx=j.createContext({});function k3e(e,t){if(Qx(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Sm(n)?n:void 0,animate:Sm(r)?r:void 0}}return e.inherit!==!1?t:{}}function D3e(e){const{initial:t,animate:n}=k3e(e,j.useContext(Jx));return j.useMemo(()=>({initial:t,animate:n}),[r9(t),r9(n)])}function r9(e){return Array.isArray(e)?e.join(" "):e}const Tk=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function dte(e,t,n){for(const r in t)!qn(t[r])&&!Hee(r,n)&&(e[r]=t[r])}function I3e({transformTemplate:e},t){return j.useMemo(()=>{const n=Tk();return Ek(n,t,e),Object.assign({},n.vars,n.style)},[t])}function L3e(e,t){const n=e.style||{},r={};return dte(r,n,e),Object.assign(r,I3e(e,t)),r}function $3e(e,t){const n={},r=L3e(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const hte=()=>({...Tk(),attrs:{}});function B3e(e,t,n,r){const i=j.useMemo(()=>{const a=hte();return Gee(a,t,Kee(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};dte(a,e.style,e),i.style={...a,...i.style}}return i}const q3e=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ok(e){return typeof e!="string"||e.includes("-")?!1:!!(q3e.indexOf(e)>-1||/[A-Z]/u.test(e))}function z3e(e,t,n,{latestValues:r},i,a=!1,o){const u=(o??Ok(e)?B3e:$3e)(t,r,i,e),f=R3e(t,typeof e=="string",a),d=e!==j.Fragment?{...f,...u,ref:n}:{},{children:h}=t,m=j.useMemo(()=>qn(h)?h.get():h,[h]);return j.createElement(e,{...d,children:m})}function V3e({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:F3e(n,r,i,e),renderState:t()}}function F3e(e,t,n,r){const i={},a=r(e,{});for(const m in a)i[m]=ky(a[m]);let{initial:o,animate:l}=e;const u=Qx(e),f=Iee(e);t&&f&&!u&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?l:o;if(h&&typeof h!="boolean"&&!Zx(h)){const m=Array.isArray(h)?h:[h];for(let g=0;g<m.length;g++){const x=vk(e,m[g]);if(x){const{transitionEnd:w,transition:y,...S}=x;for(const E in S){let _=S[E];if(Array.isArray(_)){const A=d?_.length-1:0;_=_[A]}_!==null&&(i[E]=_)}for(const E in w)i[E]=w[E]}}}return i}const pte=e=>(t,n)=>{const r=j.useContext(Jx),i=j.useContext(Yx),a=()=>V3e(e,t,r,i);return n?a():nk(a)},U3e=pte({scrapeMotionValuesFromProps:Ak,createRenderState:Tk}),H3e=pte({scrapeMotionValuesFromProps:Yee,createRenderState:hte}),G3e=Symbol.for("motionComponentSymbol");function W3e(e,t,n){const r=j.useRef(n);j.useInsertionEffect(()=>{r.current=n});const i=j.useRef(null);return j.useCallback(a=>{var l;a&&((l=e.onMount)==null||l.call(e,a)),t&&(a?t.mount(a):t.unmount());const o=r.current;if(typeof o=="function")if(a){const u=o(a);typeof u=="function"&&(i.current=u)}else i.current?(i.current(),i.current=null):o(a);else o&&(o.current=a)},[t])}const mte=j.createContext({});function zc(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function K3e(e,t,n,r,i,a){var _,A;const{visualElement:o}=j.useContext(Jx),l=j.useContext(ute),u=j.useContext(Yx),f=j.useContext(Ck),d=f.reducedMotion,h=f.skipAnimations,m=j.useRef(null),g=j.useRef(!1);r=r||l.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:a}),g.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const x=m.current,w=j.useContext(mte);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&Y3e(m.current,n,i,w);const y=j.useRef(!1);j.useInsertionEffect(()=>{x&&y.current&&x.update(n,u)});const S=n[Eee],E=j.useRef(!!S&&typeof window<"u"&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,S))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,S)));return IJ(()=>{g.current=!0,x&&(y.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),E.current&&x.animationState&&x.animationState.animateChanges())}),j.useEffect(()=>{x&&(!E.current&&x.animationState&&x.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,S)}),E.current=!1),x.enteringChildren=void 0)}),x}function Y3e(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:f,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:gte(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||l&&zc(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:f,layoutAnchor:d})}function gte(e){if(e)return e.options.allowProjection!==!1?e.projection:gte(e.parent)}function Mj(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&N3e(r);const a=n?n==="svg":Ok(e),o=a?H3e:U3e;function l(f,d){let h;const m={...j.useContext(Ck),...f,layoutId:X3e(f)},{isStatic:g}=m,x=D3e(f),w=o(f,g);if(!g&&typeof window<"u"){Z3e();const y=Q3e(m);h=y.MeasureLayout,x.visualElement=K3e(e,w,m,i,y.ProjectionNode,a)}return b.jsxs(Jx.Provider,{value:x,children:[h&&x.visualElement?b.jsx(h,{visualElement:x.visualElement,...m}):null,z3e(e,f,W3e(w,x.visualElement,d),w,g,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=j.forwardRef(l);return u[G3e]=e,u}function X3e({layoutId:e}){const t=j.useContext(tk).id;return t&&e!==void 0?t+"-"+e:e}function Z3e(e,t){j.useContext(ute).strict}function Q3e(e){const t=cte(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function J3e(e,t){if(typeof Proxy>"u")return Mj;const n=new Map,r=(a,o)=>Mj(a,o,e,t),i=(a,o)=>r(a,o);return new Proxy(i,{get:(a,o)=>o==="create"?r:(n.has(o)||n.set(o,Mj(o,void 0,e,t)),n.get(o))})}const eBe=(e,t)=>t.isSVG??Ok(e)?new j$e(t):new _$e(t,{allowProjection:e!==j.Fragment});class tBe extends il{constructor(t){super(t),t.animationState||(t.animationState=k$e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Zx(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let nBe=0;class rBe extends il{constructor(){super(...arguments),this.id=nBe++,this.isExitComplete=!1}update(){var a;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:l}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const u=fu(this.node,o,l);if(u){const{transition:f,transitionEnd:d,...h}=u;for(const m in h)(a=this.node.getValue(m))==null||a.jump(h[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const iBe={animation:{Feature:tBe},exit:{Feature:rBe}};function ag(e){return{point:{x:e.pageX,y:e.pageY}}}const aBe=e=>t=>xk(t)&&e(t,ag(t));function vp(e,t,n,r){return _m(e,t,aBe(n),r)}const vte=({current:e})=>e?e.ownerDocument.defaultView:null,i9=(e,t)=>Math.abs(e-t);function oBe(e,t){const n=i9(e.x,t.x),r=i9(e.y,t.y);return Math.sqrt(n**2+r**2)}const a9=new Set(["auto","scroll"]);class yte{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=g=>{this.handleScroll(g.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=dy(this.lastRawMoveEventInfo,this.transformPagePoint));const g=Rj(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,w=oBe(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!w)return;const{point:y}=g,{timestamp:S}=$n;this.history.push({...y,timestamp:S});const{onStart:E,onMove:_}=this.handlers;x||(E&&E(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,g)},this.handlePointerMove=(g,x)=>{this.lastMoveEvent=g,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=dy(x,this.transformPagePoint),It.update(this.updatePoint,!0)},this.handlePointerUp=(g,x)=>{this.end();const{onEnd:w,onSessionEnd:y,resumeAnimation:S}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=Rj(g.type==="pointercancel"?this.lastMoveEventInfo:dy(x,this.transformPagePoint),this.history);this.startEvent&&w&&w(g,E),y&&y(g,E)},!xk(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const u=ag(t),f=dy(u,this.transformPagePoint),{point:d}=f,{timestamp:h}=$n;this.history=[{...d,timestamp:h}];const{onSessionStart:m}=n;m&&m(t,Rj(f,this.history)),this.removeListeners=ng(vp(this.contextWindow,"pointermove",this.handlePointerMove),vp(this.contextWindow,"pointerup",this.handlePointerUp),vp(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(a9.has(r.overflowX)||a9.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:i.x-n.x,y:i.y-n.y};a.x===0&&a.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,i),It.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Zs(this.updatePoint)}}function dy(e,t){return t?{point:t(e.point)}:e}function o9(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rj({point:e},t){return{point:e,delta:o9(e,bte(t)),offset:o9(e,sBe(t)),velocity:lBe(t,.1)}}function sBe(e){return e[0]}function bte(e){return e[e.length-1]}function lBe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=bte(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>zr(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>zr(t)*2&&(r=e[1]);const a=oi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function uBe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?kt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?kt(n,e,r.max):Math.min(e,n)),e}function s9(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function cBe(e,{top:t,left:n,bottom:r,right:i}){return{x:s9(e.x,n,i),y:s9(e.y,t,r)}}function l9(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function fBe(e,t){return{x:l9(e.x,t.x),y:l9(e.y,t.y)}}function dBe(e,t){let n=.5;const r=ar(e),i=ar(t);return i>r?n=xm(t.min,t.max-r,e.min):r>i&&(n=xm(e.min,e.max-i,t.min)),ma(0,1,n)}function hBe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const _M=.35;function pBe(e=_M){return e===!1?e=0:e===!0&&(e=_M),{x:u9(e,"left","right"),y:u9(e,"top","bottom")}}function u9(e,t,n){return{min:c9(e,t),max:c9(e,n)}}function c9(e,t){return typeof e=="number"?e:e[t]||0}const mBe=new WeakMap;class gBe{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=En(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=h=>{n&&this.snapToCursor(ag(h).point),this.stopAnimation()},o=(h,m)=>{const{drag:g,dragPropagation:x,onDragStart:w}=this.getProps();if(g&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=VLe(g),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qi(S=>{let E=this.getAxisMotionValue(S).get()||0;if(da.test(E)){const{projection:_}=this.visualElement;if(_&&_.layout){const A=_.layout.layoutBox[S];A&&(E=ar(A)*(parseFloat(E)/100))}}this.originPoint[S]=E}),w&&It.update(()=>w(h,m),!1,!0),hM(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:x,onDirectionLock:w,onDrag:y}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:S}=m;if(x&&this.currentDirection===null){this.currentDirection=yBe(S),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,S),this.updateAxis("y",m.point,S),this.visualElement.render(),y&&It.update(()=>y(h,m),!1,!0)},u=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new yte(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:u,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:vte(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&It.postRender(()=>l(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!hy(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=uBe(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&zc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=cBe(r.layoutBox,t):this.constraints=!1,this.elastic=pBe(n),i!==this.constraints&&!zc(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Qi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=hBe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!zc(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const a=v$e(r,i.root,this.visualElement.getTransformPagePoint());let o=fBe(i.layout.layoutBox,a);if(n){const l=n(p$e(o));this.hasMutatedConstraints=!!l,l&&(o=qee(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},f=Qi(d=>{if(!hy(d,n,this.currentDirection))return;let h=u&&u[d]||{};(o===!0||o===d)&&(h={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,x={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(d,x)});return Promise.all(f).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return hM(this.visualElement,t),r.start(gk(t,r,0,n,this.visualElement,!1))}stopAnimation(){Qi(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Qi(n=>{const{drag:r}=this.getProps();if(!hy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n],u=a.get()||0;a.set(t[n]-kt(o,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!zc(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Qi(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const u=l.get();i[o]=dBe({min:u,max:u},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Qi(o=>{if(!hy(o,t,null))return;const l=this.getAxisMotionValue(o),{min:u,max:f}=this.constraints[o];l.set(kt(u,f,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;mBe.set(this.visualElement,this);const t=this.visualElement.current,n=vp(t,"pointerdown",f=>{const{drag:d,dragListener:h=!0}=this.getProps(),m=f.target,g=m!==t&&KLe(m);d&&h&&!g&&this.start(f)});let r;const i=()=>{const{dragConstraints:f}=this.getProps();zc(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),r||(r=vBe(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),It.read(i);const l=_m(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:d})=>{this.isDragging&&d&&(Qi(h=>{const m=this.getAxisMotionValue(h);m&&(this.originPoint[h]+=f[h].translate,m.set(m.get()+f[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),o(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=_M,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function f9(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function vBe(e,t,n){const r=y8(e,f9(n)),i=y8(t,f9(n));return()=>{r(),i()}}function hy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yBe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class bBe extends il{constructor(t){super(t),this.removeGroupControls=ui,this.removeListeners=ui,this.controls=new gBe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ui}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const kj=e=>(t,n)=>{e&&It.update(()=>e(t,n),!1,!0)};class xBe extends il{constructor(){super(...arguments),this.removePointerDownListener=ui}onPointerDown(t){this.session=new yte(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:vte(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:kj(t),onStart:kj(n),onMove:kj(r),onEnd:(a,o)=>{delete this.session,i&&It.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=vp(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Dj=!1;class wBe extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),Dj&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Dy.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Dj=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||It.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),bk.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Dj=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function xte(e){const[t,n]=lte(),r=j.useContext(tk);return b.jsx(wBe,{...e,layoutGroup:r,switchLayoutGroup:j.useContext(mte),isPresent:t,safeToRemove:n})}const SBe={pan:{Feature:xBe},drag:{Feature:bBe,ProjectionNode:ste,MeasureLayout:xte}};function d9(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&It.postRender(()=>a(t,ag(t)))}class _Be extends il{mount(){const{current:t}=this.node;t&&(this.unmount=ULe(t,(n,r)=>(d9(this.node,r,"Start"),i=>d9(this.node,i,"End"))))}unmount(){}}class EBe extends il{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ng(_m(this.node.current,"focus",()=>this.onFocus()),_m(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function h9(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&It.postRender(()=>a(t,ag(t)))}class ABe extends il{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=XLe(t,(i,a)=>(h9(this.node,a,"Start"),(o,{success:l})=>h9(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const EM=new WeakMap,Ij=new WeakMap,CBe=e=>{const t=EM.get(e.target);t&&t(e)},TBe=e=>{e.forEach(CBe)};function OBe({root:e,...t}){const n=e||document;Ij.has(n)||Ij.set(n,{});const r=Ij.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(TBe,{root:e,...t})),r[i]}function jBe(e,t,n){const r=OBe(t);return EM.set(e,n),r.observe(e),()=>{EM.delete(e),r.unobserve(e)}}const NBe={some:0,all:1};class PBe extends il{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var u;(u=this.stopObserver)==null||u.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:NBe[i]},l=f=>{const{isIntersecting:d}=f;if(this.isInView===d||(this.isInView=d,a&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:m}=this.node.getProps(),g=d?h:m;g&&g(f)};this.stopObserver=jBe(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(MBe(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function MBe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const RBe={inView:{Feature:PBe},tap:{Feature:ABe},focus:{Feature:EBe},hover:{Feature:_Be}},kBe={layout:{ProjectionNode:ste,MeasureLayout:xte}},DBe={...iBe,...RBe,...SBe,...kBe},p9=J3e(DBe,eBe);function IBe({children:e,container:t}){const[n,r]=j.useState(!1);return j.useEffect(()=>(r(!0),()=>r(!1)),[]),n?Ru.createPortal(e,t||document.body):null}function wte({selection:e,onClear:t,onRetry:n,onDelete:r,onPromote:i,isRetrying:a,isDeleting:o,isPromoting:l,className:u}){const f=a||o||l,d=e.some(x=>x.status==="failed"),h=e.some(x=>x.status==="delayed"),m=e.filter(x=>x.status==="failed").length,g=e.filter(x=>x.status==="delayed").length;return b.jsx(O3e,{children:e.length>0&&b.jsx(IBe,{children:b.jsx(p9.div,{className:Te("fixed bottom-6 left-0 right-0 z-50 flex justify-center pointer-events-none",u),initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},transition:{duration:.2,ease:"easeOut"},children:b.jsxs("div",{className:"relative pointer-events-auto min-w-[400px] h-12",children:[b.jsx(p9.div,{className:"absolute inset-0 backdrop-blur-xl bg-background/70 shadow-lg border border-border/50",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15}}),b.jsxs("div",{className:"relative h-12 flex items-center justify-between px-4",children:[b.jsxs("span",{className:"text-xs text-foreground",children:[e.length," selected"]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(tr,{variant:"ghost",size:"sm",onClick:t,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:"Deselect all"}),i&&h||n&&d||r?b.jsx(US,{className:"h-3 w-3 text-muted-foreground/50"}):null,i&&h&&b.jsxs(b.Fragment,{children:[b.jsxs(tr,{variant:"ghost",size:"sm",onClick:i,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[l?b.jsx(sp,{className:"mr-1 h-3 w-3 animate-spin"}):b.jsx(v7,{className:"mr-1 h-3 w-3"}),"Promote",g<e.length&&` (${g})`]}),n&&d||r?b.jsx(US,{className:"h-3 w-3 text-muted-foreground/50"}):null]}),n&&d&&b.jsxs(b.Fragment,{children:[b.jsxs(tr,{variant:"ghost",size:"sm",onClick:n,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[a?b.jsx(sp,{className:"mr-1 h-3 w-3 animate-spin"}):b.jsx(lR,{className:"mr-1 h-3 w-3"}),"Retry",m<e.length&&` (${m})`]}),r?b.jsx(US,{className:"h-3 w-3 text-muted-foreground/50"}):null]}),r&&b.jsxs(tr,{variant:"ghost",size:"sm",onClick:r,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[o?b.jsx(sp,{className:"mr-1 h-3 w-3 animate-spin"}):b.jsx(g7,{className:"mr-1 h-3 w-3"}),"Delete"]})]})]})]})})})})}function C0(e,t){const n=j.useMemo(()=>LBe(e),[e]),r=j.useCallback((i,a)=>{t(i&&a?`${i}:${a}`:void 0)},[t]);return{currentSort:n,handleSort:r,sortString:e}}function Pn({field:e,label:t,currentSort:n,onSort:r,className:i}){const a=(n==null?void 0:n.field)===e,o=a?n.direction:void 0,l=()=>{a?o==="desc"?r(e,"asc"):r(void 0,void 0):r(e,"desc")};return b.jsxs("button",{type:"button",onClick:l,className:Te("flex items-center gap-1 text-left font-medium transition-colors hover:text-foreground",a?"text-foreground":"text-muted-foreground",i),children:[t,b.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center",children:a?o==="asc"?b.jsx(c7,{className:"h-3 w-3"}):b.jsx(u7,{className:"h-3 w-3"}):b.jsx(Cce,{className:"h-3 w-3 opacity-50"})})]})}function LBe(e){if(!e)return;const[t,n]=e.split(":");if(t)return{field:t,direction:n==="asc"?"asc":"desc"}}function Ste(e){const t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ew="Checkbox",[$Be]=va(ew),[BBe,jk]=$Be(ew);function qBe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:l,onCheckedChange:u,required:f,value:d="on",internal_do_not_use_render:h}=e,[m,g]=Hs({prop:n,defaultProp:i??!1,onChange:u,caller:ew}),[x,w]=j.useState(null),[y,S]=j.useState(null),E=j.useRef(!1),_=x?!!o||!!x.closest("form"):!0,A={checked:m,disabled:a,setChecked:g,control:x,setControl:w,name:l,form:o,value:d,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:zs(i)?!1:i,isFormControl:_,bubbleInput:y,setBubbleInput:S};return b.jsx(BBe,{scope:t,...A,children:zBe(h)?h(A):r})}var _te="CheckboxTrigger",Ete=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:a,value:o,disabled:l,checked:u,required:f,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:x}=jk(_te,e),w=ft(i,d),y=j.useRef(u);return j.useEffect(()=>{const S=a==null?void 0:a.form;if(S){const E=()=>h(y.current);return S.addEventListener("reset",E),()=>S.removeEventListener("reset",E)}},[a,h]),b.jsx(He.button,{type:"button",role:"checkbox","aria-checked":zs(u)?"mixed":u,"aria-required":f,"data-state":Nte(u),"data-disabled":l?"":void 0,disabled:l,value:o,...r,ref:w,onKeyDown:ke(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:ke(n,S=>{h(E=>zs(E)?!0:!E),x&&g&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})})});Ete.displayName=_te;var Ate=j.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:l,value:u,onCheckedChange:f,form:d,...h}=e;return b.jsx(qBe,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:l,required:o,onCheckedChange:f,name:r,form:d,value:u,internal_do_not_use_render:({isFormControl:m})=>b.jsxs(b.Fragment,{children:[b.jsx(Ete,{...h,ref:t,__scopeCheckbox:n}),m&&b.jsx(jte,{__scopeCheckbox:n})]})})});Ate.displayName=ew;var Cte="CheckboxIndicator",Tte=j.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=jk(Cte,n);return b.jsx(Er,{present:r||zs(a.checked)||a.checked===!0,children:b.jsx(He.span,{"data-state":Nte(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});Tte.displayName=Cte;var Ote="CheckboxBubbleInput",jte=j.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:l,disabled:u,name:f,value:d,form:h,bubbleInput:m,setBubbleInput:g}=jk(Ote,e),x=ft(n,g),w=Ste(a),y=PG(r);j.useEffect(()=>{const E=m;if(!E)return;const _=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(_,"checked").set,O=!i.current;if(w!==a&&C){const P=new Event("click",{bubbles:O});E.indeterminate=zs(a),C.call(E,zs(a)?!1:a),E.dispatchEvent(P)}},[m,w,a,i]);const S=j.useRef(zs(a)?!1:a);return b.jsx(He.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??S.current,required:l,disabled:u,name:f,value:d,form:h,...t,tabIndex:-1,ref:x,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});jte.displayName=Ote;function zBe(e){return typeof e=="function"}function zs(e){return e==="indeterminate"}function Nte(e){return zs(e)?"indeterminate":e?"checked":"unchecked"}function tw({className:e,indeterminate:t,checked:n,...r}){return b.jsx(Ate,{"data-slot":"checkbox",checked:t?"indeterminate":n,className:Te("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:b.jsx(Tte,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:t?b.jsx(d7,{className:"size-3.5"}):b.jsx(Im,{className:"size-3.5"})})})}const VBe=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"waiting",label:"Waiting"},{value:"waiting-children",label:"Waiting Children"},{value:"prioritized",label:"Prioritized"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"delayed",label:"Delayed"}];function FBe({queueName:e,search:t,onSearchChange:n,onJobSelect:r}){var F;sr();const[i,a]=j.useState(new Map),{data:o=[]}=pR(),l=o.find(X=>X.name===e),u=(l==null?void 0:l.isPaused)??!1,f=Nfe(),d=Pfe(),h=f.isPending||d.isPending,m=()=>{u?d.mutate(e):f.mutate(e)},g=z7(),x=V7(),w=F7(),y=t.status==="all"?void 0:t.status,{currentSort:S,handleSort:E}=C0(t.sort,X=>n({...t,sort:X})),{data:_,isLoading:A,error:C,fetchNextPage:O,hasNextPage:P,isFetchingNextPage:M,isRefetching:R}=xfe(e,y,t.sort),$=j.useMemo(()=>(_==null?void 0:_.pages.flatMap(X=>X.data))??[],[_]);(F=_==null?void 0:_.pages[0])==null||F.total;const I=mR(),k=X=>{n({...t,status:X})};A||R||I.isPending;const V=X=>i.has(X),D=X=>{a(K=>{const G=new Map(K);return G.has(X.id)?G.delete(X.id):G.set(X.id,{queueName:e,jobId:X.id,status:X.status}),G})},q=()=>{const X=new Map;for(const K of $)X.set(K.id,{queueName:e,jobId:K.id,status:K.status});a(X)},L=()=>a(new Map),z=$.length>0&&i.size===$.length,H=i.size>0&&i.size<$.length,Y=async()=>{const X=Array.from(i.values()).filter(K=>K.status==="failed");X.length>0&&await g.mutateAsync({jobs:X}),L()},Z=async()=>{const X=Array.from(i.values());await x.mutateAsync({jobs:X}),L()},U=async()=>{const X=Array.from(i.values()).filter(K=>K.status==="delayed");X.length>0&&await w.mutateAsync({jobs:X}),L()};return b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx(d2,{value:t.status||"all",onValueChange:k,children:b.jsx(Ax,{children:VBe.map(X=>b.jsx(Qa,{value:X.value,children:X.label},X.value))})}),u&&b.jsx(_u,{variant:"secondary",className:"bg-amber-500/10 text-amber-600",children:"Paused"})]}),b.jsx("div",{className:"flex items-center gap-2",children:b.jsx(tr,{variant:u?"default":"outline",size:"sm",onClick:m,disabled:h,children:u?b.jsxs(b.Fragment,{children:[b.jsx(eb,{className:"mr-2 h-4 w-4"}),"Resume"]}):b.jsxs(b.Fragment,{children:[b.jsx(p7,{className:"mr-2 h-4 w-4"}),"Pause"]})})})]}),A&&$.length===0?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[b.jsx("div",{className:"col-span-5",children:"Job"}),b.jsx("div",{className:"col-span-2",children:"Status"}),b.jsx("div",{className:"col-span-2",children:"Queued"}),b.jsx("div",{className:"col-span-2",children:"Started"}),b.jsx("div",{className:"col-span-1"})]}),b.jsx("div",{className:"divide-y divide-border/50",children:[...Array(15)].map((X,K)=>b.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[b.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[b.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),b.jsxs("div",{className:"space-y-1.5",children:[b.jsx("div",{className:"h-4 w-28 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-3 w-20 animate-pulse rounded bg-muted"})]})]}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),b.jsx("div",{className:"col-span-1 flex justify-end",children:b.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"})})]},K.toString()))})]}):C?b.jsx(Di,{icon:mu,title:"Failed to load jobs",description:C.message}):$.length===0?b.jsx(Di,{icon:mu,title:"No jobs found",description:y?`No ${y} jobs in this queue`:"This queue is empty"}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[b.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[b.jsx(tw,{checked:z,indeterminate:H,onCheckedChange:X=>{X?q():L()}}),b.jsx(Pn,{field:"name",label:"Job",currentSort:S,onSort:E})]}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"status",label:"Status",currentSort:S,onSort:E})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"timestamp",label:"Queued",currentSort:S,onSort:E})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"processedOn",label:"Started",currentSort:S,onSort:E})}),b.jsx("div",{className:"col-span-1"})]}),b.jsx("div",{className:"divide-y divide-border/50",children:$.map(X=>b.jsx(UBe,{job:X,selected:V(X.id),onSelect:()=>D(X),onClick:()=>r(X.id)},X.id))}),P&&b.jsx("div",{className:"flex justify-center pt-4",children:b.jsx(tr,{variant:"outline",onClick:()=>O(),disabled:M,children:M?b.jsxs(b.Fragment,{children:[b.jsx(q0,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):"Load more"})}),b.jsx("div",{className:"flex items-center justify-between pt-2 text-sm text-muted-foreground",children:b.jsxs("span",{children:["Showing ",$.length," jobs"]})})]}),b.jsx(wte,{selection:Array.from(i.values()),onClear:L,onRetry:Y,onDelete:Z,onPromote:U,isRetrying:g.isPending,isDeleting:x.isPending,isPromoting:w.isPending})]})}function UBe({job:e,selected:t,onSelect:n,onClick:r}){const i=a=>{a.stopPropagation(),n()};return b.jsxs("button",{type:"button",onClick:r,className:"group grid w-full grid-cols-12 items-center gap-4 py-3 text-left text-sm cursor-default",children:[b.jsxs("div",{className:"col-span-5 flex min-w-0 items-center gap-3",children:[b.jsx("div",{onClick:i,onKeyDown:a=>a.stopPropagation(),children:b.jsx(tw,{checked:t})}),b.jsx(mu,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),b.jsxs("div",{className:"min-w-0",children:[b.jsx("div",{className:"truncate font-medium",children:e.name}),b.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:Ky(e.id,24)})]})]}),b.jsx("div",{className:"col-span-2",children:b.jsx(Xm,{status:e.status,duration:e.duration})}),b.jsx("div",{className:"col-span-2 text-muted-foreground",children:b.jsx(Su,{timestamp:e.timestamp})}),b.jsx("div",{className:"col-span-2 text-muted-foreground",children:e.processedOn?b.jsx(Su,{timestamp:e.processedOn}):b.jsx("span",{children:"-"})}),b.jsx("div",{className:"col-span-1 flex justify-end",children:b.jsx(Of,{className:"h-4 w-4 text-muted-foreground"})})]})}function HBe({search:e,onSearchChange:t,onJobSelect:n,onQueueSelect:r}){sr();const[i,a]=j.useState(new Map),o=z7(),l=V7(),u=F7(),{currentSort:f,handleSort:d}=C0(e.sort,G=>t({...e,sort:G})),h=j.useMemo(()=>gR(e.q??""),[e.q]),m=j.useMemo(()=>{if(e.from&&e.to)return{start:e.from,end:e.to}},[e.from,e.to]),g=j.useMemo(()=>{const G=e.status??"all";if(G!=="all"||Object.keys(h.tags).length>0||h.text||m)return{status:G!=="all"?G:void 0,tags:Object.keys(h.tags).length>0?h.tags:void 0,text:h.text||void 0,timeRange:m}},[e.status,h,m]),{data:x,isLoading:w,error:y,fetchNextPage:S,hasNextPage:E,isFetchingNextPage:_,isRefetching:A}=Sfe(e.sort,g),C=j.useMemo(()=>(x==null?void 0:x.pages.flatMap(G=>G.data))??[],[x]),O=C,P=(G,Q)=>{t({...e,q:G||void 0,status:Q??e.status})},M=G=>{t({...e,from:G==null?void 0:G.start,to:G==null?void 0:G.end})},R=mR();w||A||R.isPending;const $=(G,Q)=>`${G}:${Q}`,I=(G,Q)=>i.has($(G,Q)),k=G=>{const Q=$(G.queueName,G.id);a(J=>{const re=new Map(J);return re.has(Q)?re.delete(Q):re.set(Q,{queueName:G.queueName,jobId:G.id,status:G.status}),re})},V=()=>{const G=new Map;for(const Q of O){const J=$(Q.queueName,Q.id);G.set(J,{queueName:Q.queueName,jobId:Q.id,status:Q.status})}a(G)},D=()=>a(new Map),q=O.length>0&&i.size===O.length,L=i.size>0&&i.size<O.length,z=async()=>{const G=Array.from(i.values()).filter(Q=>Q.status==="failed");G.length>0&&await o.mutateAsync({jobs:G}),D()},H=async()=>{const G=Array.from(i.values());await l.mutateAsync({jobs:G}),D()},Y=async()=>{const G=Array.from(i.values()).filter(Q=>Q.status==="delayed");G.length>0&&await u.mutateAsync({jobs:G}),D()},{data:Z}=bfe(),U=j.useMemo(()=>{if(!Z){const Q=Date.now(),J=14400*1e3,re=new Date(Q);return re.setHours(0,0,0,0),re.setDate(re.getDate()-6),{buckets:[],startTime:re.getTime(),endTime:Q,bucketSize:J}}return{buckets:Z.buckets.map(Q=>{const J=new Date(Q.time);return{time:Q.time,label:J.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric",hour:"numeric"}),dayLabel:J.toLocaleDateString([],{weekday:"short"}),success:Q.completed,error:Q.failed}}),startTime:Z.startTime,endTime:Z.endTime,bucketSize:Z.bucketSize}},[Z]),F=(Z==null?void 0:Z.totalCompleted)??0,X=(Z==null?void 0:Z.totalFailed)??0,K=j.useRef(null);return j.useEffect(()=>{const G=K.current;if(!G||!E)return;const Q=new IntersectionObserver(J=>{J[0].isIntersecting&&E&&!_&&S()},{rootMargin:"100px"});return Q.observe(G),()=>Q.disconnect()},[E,_,S]),b.jsxs("div",{className:"h-full overflow-auto",children:[b.jsx("div",{className:"py-4",children:b.jsx(WBe,{data:U,selection:m??null,onSelectionChange:M,totalSuccess:F,totalError:X})}),b.jsxs("div",{className:"sticky top-0 z-20 bg-background",children:[b.jsx("div",{className:"border-b border-dashed pb-3",children:b.jsx($fe,{value:e.q??"",status:e.status,onChange:P})}),b.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[b.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[b.jsx(tw,{checked:q,indeterminate:L,onCheckedChange:G=>{G?V():D()}}),b.jsx(Pn,{field:"name",label:"Job",currentSort:f,onSort:d})]}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"queueName",label:"Queue",currentSort:f,onSort:d})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"status",label:"Status",currentSort:f,onSort:d})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"timestamp",label:"Time",currentSort:f,onSort:d})}),b.jsx("div",{className:"col-span-1",children:b.jsx(Pn,{field:"duration",label:"Duration",currentSort:f,onSort:d})})]})]}),w&&C.length===0?b.jsx("div",{className:"divide-y divide-border/50",children:[...Array(15)].map((G,Q)=>b.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[b.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[b.jsx("div",{className:"h-4 w-4 animate-pulse bg-muted"}),b.jsx("div",{className:"h-2 w-2 animate-pulse bg-muted"}),b.jsx("div",{className:"h-4 w-32 animate-pulse bg-muted"})]}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-4 w-16 animate-pulse bg-muted"})}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-4 w-24 animate-pulse bg-muted"})}),b.jsx("div",{className:"col-span-1",children:b.jsx("div",{className:"h-4 w-12 animate-pulse bg-muted"})})]},Q.toString()))}):y?b.jsx("div",{className:"flex h-64 items-center justify-center",children:b.jsx(Di,{icon:mu,title:"Failed to load runs",description:y.message})}):O.length===0?b.jsx("div",{className:"flex h-64 items-center justify-center",children:b.jsx(Di,{icon:mu,title:"No runs found",description:h.text?`No results for "${h.text}"`:e.status&&e.status!=="all"?`No ${e.status} runs`:"No job runs yet"})}):b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"divide-y divide-border/50",children:O.map(G=>b.jsx(GBe,{run:G,selected:I(G.queueName,G.id),onSelect:()=>k(G),onClick:()=>n(G.queueName,G.id),onQueueClick:r},`${G.queueName}-${G.id}`))}),E&&b.jsx("div",{ref:K,className:"flex items-center justify-center py-4",children:_&&b.jsx(q0,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),b.jsxs("div",{className:"px-6 py-3 text-xs text-muted-foreground",children:["Showing ",O.length," runs"]})]}),b.jsx(wte,{selection:Array.from(i.values()),onClear:D,onRetry:z,onDelete:H,onPromote:Y,isRetrying:o.isPending,isDeleting:l.isPending,isPromoting:u.isPending})]})}function GBe({run:e,selected:t,onSelect:n,onClick:r,onQueueClick:i}){const a=e.tags&&Object.keys(e.tags).length>0,o=u=>{u.stopPropagation(),n()},l=u=>{u.stopPropagation(),i(e.queueName)};return b.jsxs("div",{className:"group grid w-full grid-cols-12 items-center gap-4 py-3 text-left text-sm cursor-pointer",onClick:r,children:[b.jsxs("div",{className:"col-span-5 flex min-w-0 items-center gap-3",children:[b.jsx("div",{onClick:o,onKeyDown:u=>u.stopPropagation(),children:b.jsx(tw,{checked:t})}),b.jsx(R1e,{status:e.status}),b.jsxs("div",{className:"min-w-0",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"truncate font-medium",children:e.name}),a&&b.jsxs("div",{className:"flex items-center gap-1",children:[Object.entries(e.tags).slice(0,2).map(([u,f])=>b.jsxs(Tp,{children:[b.jsx(Op,{asChild:!0,children:b.jsxs("span",{className:"inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:[u,":",Ky(String(f),8)]})}),b.jsx(Sf,{children:b.jsxs("span",{className:"font-mono",children:[u,": ",String(f)]})})]},u)),Object.keys(e.tags).length>2&&b.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",Object.keys(e.tags).length-2]})]})]}),b.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:Ky(e.id,24)})]})]}),b.jsx("div",{className:"col-span-2",children:b.jsx("button",{type:"button",onClick:l,className:"truncate font-mono text-xs text-primary hover:underline",children:e.queueName})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Xm,{status:e.status})}),b.jsx("div",{className:"col-span-2 text-muted-foreground",children:e.processedOn?b.jsx(Su,{timestamp:e.processedOn}):b.jsx(Su,{timestamp:e.timestamp})}),b.jsxs("div",{className:"col-span-1 flex items-center justify-between",children:[b.jsx("span",{className:"font-mono text-muted-foreground",children:e.duration?wr(e.duration):"-"}),b.jsx(Of,{className:"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})]})}function WBe({data:e,selection:t,onSelectionChange:n,totalSuccess:r,totalError:i}){const a=j.useRef(null),[o,l]=j.useState(!1),[u,f]=j.useState(null),[d,h]=j.useState(null),m=Math.max(...e.buckets.map(A=>A.success+A.error),1),g=A=>{if(!a.current)return e.startTime;const C=a.current.getBoundingClientRect(),P=Math.max(0,Math.min(A-C.left,C.width))/C.width;return e.startTime+P*(e.endTime-e.startTime)},x=A=>{if(A.button!==0)return;const C=g(A.clientX);l(!0),f(C),h(C)},w=A=>{if(!o||u===null)return;const C=g(A.clientX);h(C)},y=()=>{if(o&&u!==null&&d!==null){const A=Math.min(u,d),C=Math.max(u,d);C-A>1e3&&n({start:A,end:C})}l(!1),f(null),h(null)},S=()=>{o&&y()},E=A=>{const C=new Date(A),O=new Date;return C.toDateString()===O.toDateString()?"Today":C.toLocaleDateString([],{weekday:"short"})},_=A=>{const C=e.endTime-e.startTime,O=(A.start-e.startTime)/C*100,P=(A.end-A.start)/C*100;return{left:`${O}%`,width:`${P}%`}};return b.jsxs("div",{className:"border border-dashed p-4",children:[b.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Activity"}),b.jsx("span",{className:"text-xs text-muted-foreground",children:"Last 7 days"})]}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("div",{className:"h-2 w-2 bg-chart-1"}),b.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:[r," completed"]})]}),b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsx("div",{className:"h-2 w-2 bg-chart-failed"}),b.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:[i," failed"]})]}),b.jsx("div",{className:"h-6",children:t&&b.jsxs(tr,{variant:"ghost",size:"sm",onClick:()=>n(null),className:"h-6 gap-1 px-2 text-xs",children:[b.jsx(tb,{className:"h-3 w-3"}),"Clear"]})})]})]}),b.jsxs("div",{ref:a,className:"relative h-12 cursor-crosshair select-none",onMouseDown:x,onMouseMove:w,onMouseUp:y,onMouseLeave:S,children:[e.buckets.map((A,C)=>{const O=A.success+A.error,P=A.success>0?Math.max(A.success/m*100,8):0,M=A.error>0?Math.max(A.error/m*100,8):0,R=O>0,$=e.endTime-e.startTime,I=(A.time-e.startTime)/$*100;return b.jsxs(Tp,{children:[b.jsx(Op,{asChild:!0,children:b.jsx("div",{className:"absolute bottom-0 flex h-full w-[3px] flex-col justify-end",style:{left:`${I}%`},children:R?b.jsxs(b.Fragment,{children:[A.error>0&&b.jsx("div",{className:"w-full bg-chart-failed",style:{height:`${M}%`}}),A.success>0&&b.jsx("div",{className:"w-full bg-chart-1",style:{height:`${P}%`}})]}):b.jsx("div",{className:"h-px w-full bg-muted/30"})})}),b.jsxs(Sf,{side:"top",className:"text-xs",children:[b.jsx("div",{className:"font-medium text-foreground",children:A.label}),O>0?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"text-muted-foreground",children:[O," ",O===1?"run":"runs"]}),A.success>0&&b.jsxs("div",{className:"text-chart-1",children:[A.success," completed"]}),A.error>0&&b.jsxs("div",{className:"text-chart-failed",children:[A.error," failed"]})]}):b.jsx("div",{className:"text-muted-foreground",children:"No activity"})]})]},C.toString())}),b.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-px bg-border"}),o&&u!==null&&d!==null&&b.jsx("div",{className:"pointer-events-none absolute bottom-0 top-0 border-x border-ring bg-ring/10",style:_({start:Math.min(u,d),end:Math.max(u,d)})}),t&&!o&&b.jsx("div",{className:"pointer-events-none absolute bottom-0 top-0 border-x-2 border-ring bg-ring/20",style:_(t)})]}),b.jsx("div",{className:"mt-2 flex justify-between text-[10px] text-muted-foreground",children:Array.from({length:7}).map((A,C)=>{const O=e.startTime+C*24*60*60*1e3;return b.jsx("span",{children:E(O)},C.toString())})})]})}function KBe({search:e,onSearchChange:t}){sr();const{currentSort:n,handleSort:r}=C0(e.repeatableSort,y=>t({...e,repeatableSort:y})),{currentSort:i,handleSort:a}=C0(e.delayedSort,y=>t({...e,delayedSort:y})),{data:o=[],isLoading:l,error:u,isRefetching:f}=_fe(e.repeatableSort),{data:d=[],isLoading:h,error:m,isRefetching:g}=Efe(e.delayedSort),x=mR();l||h||f||g||x.isPending;const w=u||m;return l||h?b.jsxs("div",{className:"space-y-6",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("div",{className:"h-7 w-32 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-9 w-9 animate-pulse rounded bg-muted"})]}),b.jsxs("div",{className:"space-y-4",children:[b.jsxs("div",{className:"flex gap-2",children:[b.jsx("div",{className:"h-9 w-32 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-9 w-28 animate-pulse rounded bg-muted"})]}),b.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[b.jsx("div",{className:"col-span-3",children:"Name"}),b.jsx("div",{className:"col-span-2",children:"Queue"}),b.jsx("div",{className:"col-span-3",children:"Pattern"}),b.jsx("div",{className:"col-span-2",children:"Next Run"}),b.jsx("div",{className:"col-span-2",children:"Timezone"})]}),b.jsx("div",{className:"divide-y divide-border/50",children:[...Array(10)].map((y,S)=>b.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[b.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[b.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),b.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})]}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-3 w-16 animate-pulse rounded bg-muted"})}),b.jsx("div",{className:"col-span-3",children:b.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),b.jsx("div",{className:"col-span-2",children:b.jsx("div",{className:"h-3 w-16 animate-pulse rounded bg-muted"})})]},`pulse-${S.toString()}`))})]})]}):w?b.jsx(Di,{icon:md,title:"Failed to load schedulers",description:w.message}):b.jsx("div",{className:"space-y-6",children:b.jsxs(d2,{value:e.tab||"repeatable",onValueChange:y=>t({...e,tab:y}),children:[b.jsxs(Ax,{children:[b.jsxs(Qa,{value:"repeatable",children:["Repeatable (",o.length,")"]}),b.jsxs(Qa,{value:"delayed",children:["Delayed (",d.length,")"]})]}),b.jsx(ms,{value:"repeatable",className:"mt-4",children:o.length===0?b.jsx(Di,{icon:si,title:"No repeatable jobs",description:"No cron or repeating jobs are configured"}):b.jsxs("div",{className:"divide-y divide-border/50",children:[b.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[b.jsx("div",{className:"col-span-3",children:b.jsx(Pn,{field:"name",label:"Name",currentSort:n,onSort:r})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"queueName",label:"Queue",currentSort:n,onSort:r})}),b.jsx("div",{className:"col-span-3",children:b.jsx(Pn,{field:"pattern",label:"Pattern",currentSort:n,onSort:r})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"next",label:"Next Run",currentSort:n,onSort:r})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"tz",label:"Timezone",currentSort:n,onSort:r})})]}),o.map(y=>b.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3 text-sm",children:[b.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[b.jsx(si,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),b.jsx("span",{className:"truncate font-medium",children:y.name})]}),b.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:y.queueName}),b.jsx("div",{className:"col-span-3 font-mono text-xs",children:y.pattern||(y.every?`every ${wr(y.every)}`:"-")}),b.jsx("div",{className:"col-span-2 text-muted-foreground",children:y.next?b.jsx(Su,{timestamp:y.next}):"-"}),b.jsx("div",{className:"col-span-2 text-xs text-muted-foreground",children:y.tz||"UTC"})]},y.key))]})}),b.jsx(ms,{value:"delayed",className:"mt-4",children:d.length===0?b.jsx(Di,{icon:B3,title:"No delayed jobs",description:"No jobs are scheduled for future execution"}):b.jsxs("div",{className:"divide-y divide-border/50",children:[b.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[b.jsx("div",{className:"col-span-3",children:b.jsx(Pn,{field:"name",label:"Name",currentSort:i,onSort:a})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"queueName",label:"Queue",currentSort:i,onSort:a})}),b.jsx("div",{className:"col-span-2",children:"Job ID"}),b.jsx("div",{className:"col-span-3",children:b.jsx(Pn,{field:"processAt",label:"Executes At",currentSort:i,onSort:a})}),b.jsx("div",{className:"col-span-2",children:b.jsx(Pn,{field:"delay",label:"Delay",currentSort:i,onSort:a})})]}),d.map(y=>b.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3 text-sm",children:[b.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[b.jsx(B3,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),b.jsx("span",{className:"truncate font-medium",children:y.name})]}),b.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:y.queueName}),b.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:y.id}),b.jsx("div",{className:"col-span-3 text-muted-foreground",children:b.jsx(Su,{timestamp:y.processAt})}),b.jsx("div",{className:"col-span-2 text-muted-foreground",children:wr(y.delay)})]},`${y.queueName}-${y.id}`))]})})]})})}var YBe=[" ","Enter","ArrowUp","ArrowDown"],XBe=[" ","Enter"],ju="Select",[nw,rw,ZBe]=DX(ju),[kd]=va(ju,[ZBe,hd]),iw=hd(),[QBe,al]=kd(ju),[JBe,eqe]=kd(ju),Pte=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:l,onValueChange:u,dir:f,name:d,autoComplete:h,disabled:m,required:g,form:x}=e,w=iw(t),[y,S]=j.useState(null),[E,_]=j.useState(null),[A,C]=j.useState(!1),O=U0(f),[P,M]=Hs({prop:r,defaultProp:i??!1,onChange:a,caller:ju}),[R,$]=Hs({prop:o,defaultProp:l,onChange:u,caller:ju}),I=j.useRef(null),k=y?x||!!y.closest("form"):!0,[V,D]=j.useState(new Set),q=Array.from(V).map(L=>L.props.value).join(";");return b.jsx(ZM,{...w,children:b.jsxs(QBe,{required:g,scope:t,trigger:y,onTriggerChange:S,valueNode:E,onValueNodeChange:_,valueNodeHasChildren:A,onValueNodeHasChildrenChange:C,contentId:or(),value:R,onValueChange:$,open:P,onOpenChange:M,dir:O,triggerPointerDownPosRef:I,disabled:m,children:[b.jsx(nw.Provider,{scope:t,children:b.jsx(JBe,{scope:e.__scopeSelect,onNativeOptionAdd:j.useCallback(L=>{D(z=>new Set(z).add(L))},[]),onNativeOptionRemove:j.useCallback(L=>{D(z=>{const H=new Set(z);return H.delete(L),H})},[]),children:n})}),k?b.jsxs(tne,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:h,value:R,onChange:L=>$(L.target.value),disabled:m,form:x,children:[R===void 0?b.jsx("option",{value:""}):null,Array.from(V)]},q):null]})})};Pte.displayName=ju;var Mte="SelectTrigger",Rte=j.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=iw(n),o=al(Mte,n),l=o.disabled||r,u=ft(t,o.onTriggerChange),f=rw(n),d=j.useRef("touch"),[h,m,g]=rne(w=>{const y=f().filter(_=>!_.disabled),S=y.find(_=>_.value===o.value),E=ine(y,w,S);E!==void 0&&o.onValueChange(E.value)}),x=w=>{l||(o.onOpenChange(!0),g()),w&&(o.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return b.jsx(QM,{asChild:!0,...a,children:b.jsx(He.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":nne(o.value)?"":void 0,...i,ref:u,onClick:ke(i.onClick,w=>{w.currentTarget.focus(),d.current!=="mouse"&&x(w)}),onPointerDown:ke(i.onPointerDown,w=>{d.current=w.pointerType;const y=w.target;y.hasPointerCapture(w.pointerId)&&y.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(x(w),w.preventDefault())}),onKeyDown:ke(i.onKeyDown,w=>{const y=h.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&m(w.key),!(y&&w.key===" ")&&YBe.includes(w.key)&&(x(),w.preventDefault())})})})});Rte.displayName=Mte;var kte="SelectValue",Dte=j.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...l}=e,u=al(kte,n),{onValueNodeHasChildrenChange:f}=u,d=a!==void 0,h=ft(t,u.onValueNodeChange);return zn(()=>{f(d)},[f,d]),b.jsx(He.span,{...l,ref:h,style:{pointerEvents:"none"},children:nne(u.value)?b.jsx(b.Fragment,{children:o}):a})});Dte.displayName=kte;var tqe="SelectIcon",Ite=j.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return b.jsx(He.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});Ite.displayName=tqe;var nqe="SelectPortal",Lte=e=>b.jsx(Rm,{asChild:!0,...e});Lte.displayName=nqe;var Nu="SelectContent",$te=j.forwardRef((e,t)=>{const n=al(Nu,e.__scopeSelect),[r,i]=j.useState();if(zn(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?Ru.createPortal(b.jsx(Bte,{scope:e.__scopeSelect,children:b.jsx(nw.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),a):null}return b.jsx(qte,{...e,ref:t})});$te.displayName=Nu;var Ai=10,[Bte,ol]=kd(Nu),rqe="SelectContentImpl",iqe=Ep("SelectContent.RemoveScroll"),qte=j.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:u,align:f,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:x,hideWhenDetached:w,avoidCollisions:y,...S}=e,E=al(Nu,n),[_,A]=j.useState(null),[C,O]=j.useState(null),P=ft(t,J=>A(J)),[M,R]=j.useState(null),[$,I]=j.useState(null),k=rw(n),[V,D]=j.useState(!1),q=j.useRef(!1);j.useEffect(()=>{if(_)return tW(_)},[_]),G7();const L=j.useCallback(J=>{const[re,...ne]=k().map(oe=>oe.ref.current),[fe]=ne.slice(-1),he=document.activeElement;for(const oe of J)if(oe===he||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===re&&C&&(C.scrollTop=0),oe===fe&&C&&(C.scrollTop=C.scrollHeight),oe==null||oe.focus(),document.activeElement!==he))return},[k,C]),z=j.useCallback(()=>L([M,_]),[L,M,_]);j.useEffect(()=>{V&&z()},[V,z]);const{onOpenChange:H,triggerPointerDownPosRef:Y}=E;j.useEffect(()=>{if(_){let J={x:0,y:0};const re=fe=>{var he,oe;J={x:Math.abs(Math.round(fe.pageX)-(((he=Y.current)==null?void 0:he.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((oe=Y.current)==null?void 0:oe.y)??0))}},ne=fe=>{J.x<=10&&J.y<=10?fe.preventDefault():_.contains(fe.target)||H(!1),document.removeEventListener("pointermove",re),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",ne,{capture:!0})}}},[_,H,Y]),j.useEffect(()=>{const J=()=>H(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[H]);const[Z,U]=rne(J=>{const re=k().filter(he=>!he.disabled),ne=re.find(he=>he.ref.current===document.activeElement),fe=ine(re,J,ne);fe&&setTimeout(()=>fe.ref.current.focus())}),F=j.useCallback((J,re,ne)=>{const fe=!q.current&&!ne;(E.value!==void 0&&E.value===re||fe)&&(R(J),fe&&(q.current=!0))},[E.value]),X=j.useCallback(()=>_==null?void 0:_.focus(),[_]),K=j.useCallback((J,re,ne)=>{const fe=!q.current&&!ne;(E.value!==void 0&&E.value===re||fe)&&I(J)},[E.value]),G=r==="popper"?AM:zte,Q=G===AM?{side:l,sideOffset:u,align:f,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:x,hideWhenDetached:w,avoidCollisions:y}:{};return b.jsx(Bte,{scope:n,content:_,viewport:C,onViewportChange:O,itemRefCallback:F,selectedItem:M,onItemLeave:X,itemTextRefCallback:K,focusSelectedItem:z,selectedItemText:$,position:r,isPositioned:V,searchRef:Z,children:b.jsx(yR,{as:iqe,allowPinchZoom:!0,children:b.jsx(vR,{asChild:!0,trapped:E.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:ke(i,J=>{var re;(re=E.trigger)==null||re.focus({preventScroll:!0}),J.preventDefault()}),children:b.jsx(Pm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:b.jsx(G,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:J=>J.preventDefault(),...S,...Q,onPlaced:()=>D(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:ke(S.onKeyDown,J=>{const re=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!re&&J.key.length===1&&U(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let fe=k().filter(he=>!he.disabled).map(he=>he.ref.current);if(["ArrowUp","End"].includes(J.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const he=J.target,oe=fe.indexOf(he);fe=fe.slice(oe+1)}setTimeout(()=>L(fe)),J.preventDefault()}})})})})})})});qte.displayName=rqe;var aqe="SelectItemAlignedPosition",zte=j.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=al(Nu,n),o=ol(Nu,n),[l,u]=j.useState(null),[f,d]=j.useState(null),h=ft(t,P=>d(P)),m=rw(n),g=j.useRef(!1),x=j.useRef(!0),{viewport:w,selectedItem:y,selectedItemText:S,focusSelectedItem:E}=o,_=j.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&f&&w&&y&&S){const P=a.trigger.getBoundingClientRect(),M=f.getBoundingClientRect(),R=a.valueNode.getBoundingClientRect(),$=S.getBoundingClientRect();if(a.dir!=="rtl"){const he=$.left-M.left,oe=R.left-he,ye=P.left-oe,be=P.width+ye,xe=Math.max(be,M.width),Ae=window.innerWidth-Ai,_e=vN(oe,[Ai,Math.max(Ai,Ae-xe)]);l.style.minWidth=be+"px",l.style.left=_e+"px"}else{const he=M.right-$.right,oe=window.innerWidth-R.right-he,ye=window.innerWidth-P.right-oe,be=P.width+ye,xe=Math.max(be,M.width),Ae=window.innerWidth-Ai,_e=vN(oe,[Ai,Math.max(Ai,Ae-xe)]);l.style.minWidth=be+"px",l.style.right=_e+"px"}const I=m(),k=window.innerHeight-Ai*2,V=w.scrollHeight,D=window.getComputedStyle(f),q=parseInt(D.borderTopWidth,10),L=parseInt(D.paddingTop,10),z=parseInt(D.borderBottomWidth,10),H=parseInt(D.paddingBottom,10),Y=q+L+V+H+z,Z=Math.min(y.offsetHeight*5,Y),U=window.getComputedStyle(w),F=parseInt(U.paddingTop,10),X=parseInt(U.paddingBottom,10),K=P.top+P.height/2-Ai,G=k-K,Q=y.offsetHeight/2,J=y.offsetTop+Q,re=q+L+J,ne=Y-re;if(re<=K){const he=I.length>0&&y===I[I.length-1].ref.current;l.style.bottom="0px";const oe=f.clientHeight-w.offsetTop-w.offsetHeight,ye=Math.max(G,Q+(he?X:0)+oe+z),be=re+ye;l.style.height=be+"px"}else{const he=I.length>0&&y===I[0].ref.current;l.style.top="0px";const ye=Math.max(K,q+w.offsetTop+(he?F:0)+Q)+ne;l.style.height=ye+"px",w.scrollTop=re-K+w.offsetTop}l.style.margin=`${Ai}px 0`,l.style.minHeight=Z+"px",l.style.maxHeight=k+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[m,a.trigger,a.valueNode,l,f,w,y,S,a.dir,r]);zn(()=>_(),[_]);const[A,C]=j.useState();zn(()=>{f&&C(window.getComputedStyle(f).zIndex)},[f]);const O=j.useCallback(P=>{P&&x.current===!0&&(_(),E==null||E(),x.current=!1)},[_,E]);return b.jsx(sqe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:O,children:b.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:b.jsx(He.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});zte.displayName=aqe;var oqe="SelectPopperPosition",AM=j.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ai,...a}=e,o=iw(n);return b.jsx(JM,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});AM.displayName=oqe;var[sqe,Nk]=kd(Nu,{}),CM="SelectViewport",Vte=j.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=ol(CM,n),o=Nk(CM,n),l=ft(t,a.onViewportChange),u=j.useRef(0);return b.jsxs(b.Fragment,{children:[b.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}),b.jsx(nw.Slot,{scope:n,children:b.jsx(He.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ke(i.onScroll,f=>{const d=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&h){const g=Math.abs(u.current-d.scrollTop);if(g>0){const x=window.innerHeight-Ai*2,w=parseFloat(h.style.minHeight),y=parseFloat(h.style.height),S=Math.max(w,y);if(S<x){const E=S+g,_=Math.min(x,E),A=E-_;h.style.height=_+"px",h.style.bottom==="0px"&&(d.scrollTop=A>0?A:0,h.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})});Vte.displayName=CM;var Fte="SelectGroup",[lqe,uqe]=kd(Fte),cqe=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=or();return b.jsx(lqe,{scope:n,id:i,children:b.jsx(He.div,{role:"group","aria-labelledby":i,...r,ref:t})})});cqe.displayName=Fte;var Ute="SelectLabel",Hte=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=uqe(Ute,n);return b.jsx(He.div,{id:i.id,...r,ref:t})});Hte.displayName=Ute;var T0="SelectItem",[fqe,Gte]=kd(T0),Wte=j.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,l=al(T0,n),u=ol(T0,n),f=l.value===r,[d,h]=j.useState(a??""),[m,g]=j.useState(!1),x=ft(t,E=>{var _;return(_=u.itemRefCallback)==null?void 0:_.call(u,E,r,i)}),w=or(),y=j.useRef("touch"),S=()=>{i||(l.onValueChange(r),l.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 b.jsx(fqe,{scope:n,value:r,disabled:i,textId:w,isSelected:f,onItemTextChange:j.useCallback(E=>{h(_=>_||((E==null?void 0:E.textContent)??"").trim())},[]),children:b.jsx(nw.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:b.jsx(He.div,{role:"option","aria-labelledby":w,"data-highlighted":m?"":void 0,"aria-selected":f&&m,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:x,onFocus:ke(o.onFocus,()=>g(!0)),onBlur:ke(o.onBlur,()=>g(!1)),onClick:ke(o.onClick,()=>{y.current!=="mouse"&&S()}),onPointerUp:ke(o.onPointerUp,()=>{y.current==="mouse"&&S()}),onPointerDown:ke(o.onPointerDown,E=>{y.current=E.pointerType}),onPointerMove:ke(o.onPointerMove,E=>{var _;y.current=E.pointerType,i?(_=u.onItemLeave)==null||_.call(u):y.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ke(o.onPointerLeave,E=>{var _;E.currentTarget===document.activeElement&&((_=u.onItemLeave)==null||_.call(u))}),onKeyDown:ke(o.onKeyDown,E=>{var A;((A=u.searchRef)==null?void 0:A.current)!==""&&E.key===" "||(XBe.includes(E.key)&&S(),E.key===" "&&E.preventDefault())})})})})});Wte.displayName=T0;var op="SelectItemText",Kte=j.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=al(op,n),l=ol(op,n),u=Gte(op,n),f=eqe(op,n),[d,h]=j.useState(null),m=ft(t,S=>h(S),u.onItemTextChange,S=>{var E;return(E=l.itemTextRefCallback)==null?void 0:E.call(l,S,u.value,u.disabled)}),g=d==null?void 0:d.textContent,x=j.useMemo(()=>b.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:w,onNativeOptionRemove:y}=f;return zn(()=>(w(x),()=>y(x)),[w,y,x]),b.jsxs(b.Fragment,{children:[b.jsx(He.span,{id:u.textId,...a,ref:m}),u.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ru.createPortal(a.children,o.valueNode):null]})});Kte.displayName=op;var Yte="SelectItemIndicator",Xte=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Gte(Yte,n).isSelected?b.jsx(He.span,{"aria-hidden":!0,...r,ref:t}):null});Xte.displayName=Yte;var TM="SelectScrollUpButton",Zte=j.forwardRef((e,t)=>{const n=ol(TM,e.__scopeSelect),r=Nk(TM,e.__scopeSelect),[i,a]=j.useState(!1),o=ft(t,r.onScrollButtonChange);return zn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const f=u.scrollTop>0;a(f)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?b.jsx(Jte,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});Zte.displayName=TM;var OM="SelectScrollDownButton",Qte=j.forwardRef((e,t)=>{const n=ol(OM,e.__scopeSelect),r=Nk(OM,e.__scopeSelect),[i,a]=j.useState(!1),o=ft(t,r.onScrollButtonChange);return zn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const f=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<f;a(d)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?b.jsx(Jte,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});Qte.displayName=OM;var Jte=j.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=ol("SelectScrollButton",n),o=j.useRef(null),l=rw(n),u=j.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return j.useEffect(()=>()=>u(),[u]),zn(()=>{var d;const f=l().find(h=>h.ref.current===document.activeElement);(d=f==null?void 0:f.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),b.jsx(He.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ke(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ke(i.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ke(i.onPointerLeave,()=>{u()})})}),dqe="SelectSeparator",ene=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(He.div,{"aria-hidden":!0,...r,ref:t})});ene.displayName=dqe;var jM="SelectArrow",hqe=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=iw(n),a=al(jM,n),o=ol(jM,n);return a.open&&o.position==="popper"?b.jsx(eR,{...i,...r,ref:t}):null});hqe.displayName=jM;var pqe="SelectBubbleInput",tne=j.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=j.useRef(null),a=ft(r,i),o=Ste(t);return j.useEffect(()=>{const l=i.current;if(!l)return;const u=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(o!==t&&d){const h=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(h)}},[o,t]),b.jsx(He.select,{...n,style:{...zG,...n.style},ref:a,defaultValue:t})});tne.displayName=pqe;function nne(e){return e===""||e===void 0}function rne(e){const t=nr(e),n=j.useRef(""),r=j.useRef(0),i=j.useCallback(o=>{const l=n.current+o;t(l),(function u(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),a=j.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return j.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function ine(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=mqe(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==n));const u=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function mqe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gqe=Pte,ane=Rte,vqe=Dte,yqe=Ite,bqe=Lte,one=$te,xqe=Vte,sne=Hte,lne=Wte,wqe=Kte,Sqe=Xte,une=Zte,cne=Qte,fne=ene;const _qe=gqe,Eqe=vqe,dne=j.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(ane,{ref:r,className:Te("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,b.jsx(yqe,{asChild:!0,children:b.jsx($0,{className:"h-4 w-4 opacity-50"})})]}));dne.displayName=ane.displayName;const hne=j.forwardRef(({className:e,...t},n)=>b.jsx(une,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(Oce,{className:"h-4 w-4"})}));hne.displayName=une.displayName;const pne=j.forwardRef(({className:e,...t},n)=>b.jsx(cne,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx($0,{className:"h-4 w-4"})}));pne.displayName=cne.displayName;const mne=j.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>b.jsx(bqe,{children:b.jsxs(one,{ref:i,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden 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",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:[b.jsx(hne,{}),b.jsx(xqe,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(pne,{})]})}));mne.displayName=one.displayName;const Aqe=j.forwardRef(({className:e,...t},n)=>b.jsx(sne,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));Aqe.displayName=sne.displayName;const gne=j.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(lne,{ref:r,className:Te("relative flex w-full cursor-default select-none items-center py-1.5 pl-2 pr-8 text-sm outline-none focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(Sqe,{children:b.jsx(Im,{className:"h-4 w-4"})})}),b.jsx(wqe,{children:t})]}));gne.displayName=lne.displayName;const Cqe=j.forwardRef(({className:e,...t},n)=>b.jsx(fne,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));Cqe.displayName=fne.displayName;function Tqe({queues:e,readonly:t,prefill:n}){const r=jfe(),[i,a]=j.useState((n==null?void 0:n.queue)||e[0]||""),[o,l]=j.useState((n==null?void 0:n.jobName)||"test-job"),[u,f]=j.useState((n==null?void 0:n.payload)||`{
|
|
453
|
+
"message": "Hello from Workbench"
|
|
454
|
+
}`),[d,h]=j.useState(""),[m,g]=j.useState(null);j.useEffect(()=>{n!=null&&n.queue&&a(n.queue),n!=null&&n.jobName&&l(n.jobName),n!=null&&n.payload&&f(n.payload)},[n==null?void 0:n.queue,n==null?void 0:n.jobName,n==null?void 0:n.payload]);const x=async w=>{if(w.preventDefault(),!i||!o){g({success:!1,message:"Queue and job name are required"});return}let y;try{y=JSON.parse(u)}catch{g({success:!1,message:"Invalid JSON payload"});return}g(null),r.mutate({queueName:i,name:o,data:y,delay:d?Number(d)*1e3:void 0},{onSuccess:S=>{g({success:!0,message:`Job enqueued with ID: ${S.id}`})},onError:S=>{g({success:!1,message:S.message})}})};return t?b.jsxs("div",{className:"flex h-[400px] flex-col items-center justify-center text-center",children:[b.jsx(oR,{className:"mb-4 h-12 w-12 text-muted-foreground"}),b.jsx("h2",{className:"mb-2 text-lg font-medium",children:"Test Mode Disabled"}),b.jsx("p",{className:"max-w-md text-muted-foreground",children:"The dashboard is in readonly mode. Job testing is disabled."})]}):b.jsxs("div",{className:"max-w-2xl",children:[b.jsx("div",{className:"mb-6",children:b.jsx("p",{className:"text-sm text-muted-foreground",children:"Manually enqueue a job for testing purposes"})}),b.jsxs("form",{onSubmit:x,className:"space-y-6",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsx("label",{htmlFor:"queue",className:"text-sm font-medium",children:"Queue"}),b.jsxs(_qe,{value:i,onValueChange:a,children:[b.jsx(dne,{children:b.jsx(Eqe,{placeholder:"Select a queue"})}),b.jsx(mne,{children:e.map(w=>b.jsx(gne,{value:w,children:w},w))})]})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("label",{htmlFor:"jobName",className:"text-sm font-medium",children:"Job Name"}),b.jsx("input",{type:"text",value:o,onChange:w=>l(w.target.value),className:"h-9 w-full border bg-background px-3 text-sm focus:outline-none",placeholder:"my-job-name"})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("label",{htmlFor:"delay",className:"text-sm font-medium",children:"Delay (seconds)"}),b.jsx("input",{type:"number",value:d,onChange:w=>h(w.target.value),className:"h-9 w-full border bg-background px-3 text-sm focus:outline-none",placeholder:"0",min:"0"}),b.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional delay before the job is processed"})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx("label",{htmlFor:"payload",className:"text-sm font-medium",children:"Payload (JSON)"}),b.jsx("textarea",{value:u,onChange:w=>f(w.target.value),className:"h-48 w-full resize-none border bg-background px-3 py-2 font-mono text-sm focus:outline-none",placeholder:'{ "key": "value" }'})]}),b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsx(tr,{type:"submit",disabled:r.isPending,children:r.isPending?b.jsx(b.Fragment,{children:"Processing..."}):b.jsx(b.Fragment,{children:"Enqueue Job"})}),m&&b.jsxs("div",{className:Te("flex items-center gap-2 text-sm",m.success?"text-success":"text-destructive"),children:[m.success?b.jsx(jce,{className:"h-4 w-4"}):b.jsx(md,{className:"h-4 w-4"}),m.message]})]})]})]})}const vne=j.createContext(null);function Oqe(){const e=j.useContext(vne);if(!e)throw new Error("useSearchContext must be used within SearchContextProvider");return e}const jqe=Dm({status:L0(["all","active","waiting","waiting-children","prioritized","completed","failed","delayed"]).optional().catch("all"),q:Is().optional().catch(""),from:$3().optional(),to:$3().optional(),sort:Is().optional()}),Nqe=Dm({status:L0(["all","active","waiting","waiting-children","prioritized","completed","failed","delayed"]).optional().catch("all"),sort:Is().optional()}),Pqe=Dm({tab:L0(["repeatable","delayed"]).optional().catch("repeatable"),repeatableSort:Is().optional(),delayedSort:Is().optional()}),Mqe=Dm({tab:L0(["payload","output","error","retries","timeline"]).optional()}),Rqe=Dm({queue:Is().optional(),jobName:Is().optional(),payload:Is().optional()});function kqe(){const{data:e,isLoading:t}=$m();gfe();const{data:n=[]}=pR(),r=zi(),i=j.useMemo(()=>new Set(n.filter(y=>y.isPaused).map(y=>y.name)),[n]),a=use(),[o,l]=j.useState(!1),[u,f]=j.useState(""),[d,h]=j.useState(()=>{if(typeof window<"u"){const y=localStorage.getItem("workbench:theme");return y?y==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches}return!1}),{activeNav:m,activeQueue:g}=j.useMemo(()=>{const y=a.pathname;return y==="/"||y===""?{activeNav:"runs",activeQueue:void 0}:y==="/metrics"?{activeNav:"metrics",activeQueue:void 0}:y==="/schedulers"?{activeNav:"schedulers",activeQueue:void 0}:y==="/flows"||y.startsWith("/flows/")?{activeNav:"flows",activeQueue:void 0}:y==="/test"?{activeNav:"test",activeQueue:void 0}:y.startsWith("/queues/")?{activeNav:"queues",activeQueue:y.split("/")[2]}:{activeNav:"runs",activeQueue:void 0}},[a.pathname]);if(j.useEffect(()=>{document.documentElement.classList.add("no-transitions"),document.documentElement.classList.toggle("dark",d),localStorage.setItem("workbench:theme",d?"dark":"light"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")})})},[d]),j.useEffect(()=>{const y=S=>{if((S.metaKey||S.ctrlKey)&&S.key==="k"){S.preventDefault(),l(!0);return}o||(S.key==="r"&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),window.location.reload()),S.key==="t"&&(S.metaKey||S.ctrlKey)&&S.shiftKey&&(S.preventDefault(),h(!d)))};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[o,d]),t||!e)return b.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:b.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading..."})});const x=y=>{switch(y){case"runs":r({to:"/"});break;case"metrics":r({to:"/metrics"});break;case"schedulers":r({to:"/schedulers"});break;case"flows":r({to:"/flows"});break;case"test":r({to:"/test"});break}},w=y=>{r({to:"/queues/$queueName",params:{queueName:y}})};return b.jsxs("div",{className:"flex h-screen bg-background",children:[b.jsx(Ife,{queues:e.queues,pausedQueues:i,activeNav:m,activeQueue:g,onNavSelect:x,onQueueSelect:w,isDark:d,onToggleTheme:()=>h(!d)}),b.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:b.jsx(vne.Provider,{value:{searchQuery:u,setSearchQuery:f,setCommandOpen:l},children:b.jsx(mG,{})})}),b.jsx(Che,{open:o,onOpenChange:l,queues:e.queues,searchQuery:u,onSearchQueryChange:f,isDark:d,onToggleTheme:()=>h(!d),onSelectQueue:y=>{r({to:"/queues/$queueName",params:{queueName:y}}),l(!1)},onSelectJob:(y,S)=>{r({to:"/queues/$queueName/jobs/$jobId",params:{queueName:y,jobId:S}}),l(!1)},onNavigate:y=>{r({to:y}),l(!1)}})]})}function sl({title:e,subtitle:t,children:n}){const r=Oqe();return b.jsxs(b.Fragment,{children:[b.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-2 border-b border-border px-6",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("h1",{className:"text-lg font-semibold",children:e}),t&&b.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:t})]}),b.jsx(Ohe,{value:r.searchQuery,onValueChange:r.setSearchQuery,onFocus:()=>r.setCommandOpen(!0)})]}),b.jsx("main",{className:"flex-1 overflow-auto p-6",children:n})]})}function Dqe(){const e=zi(),t=Mu({from:"/"});return b.jsx(sl,{title:"Runs",children:b.jsx(HBe,{search:t,onSearchChange:n=>{e({to:"/",search:n,replace:!0})},onJobSelect:(n,r)=>e({to:"/queues/$queueName/jobs/$jobId",params:{queueName:n,jobId:r}}),onQueueSelect:n=>e({to:"/queues/$queueName",params:{queueName:n}})})})}function Iqe(){const e=zi(),t=Mu({from:"/schedulers"});return b.jsx(sl,{title:"Schedulers",children:b.jsx(KBe,{search:t,onSearchChange:n=>{e({to:"/schedulers",search:n,replace:!0})}})})}function Lqe(){return b.jsx(sl,{title:"Metrics",children:b.jsx(LDe,{})})}function $qe(){const e=zi();return b.jsx(sl,{title:"Flows",children:b.jsx(D1e,{onFlowSelect:(t,n)=>e({to:"/flows/$queueName/$jobId",params:{queueName:t,jobId:n}})})})}function Bqe(){const{queueName:e,jobId:t}=Nm({from:"/flows/$queueName/$jobId"});return b.jsx(sl,{title:"Flow Details",subtitle:t,children:b.jsx(k1e,{queueName:e,jobId:t})})}function qqe(){const{data:e}=$m(),t=Mu({from:"/test"});return b.jsx(sl,{title:"Test",children:b.jsx(Tqe,{queues:(e==null?void 0:e.queues)||[],readonly:e==null?void 0:e.readonly,prefill:t})})}function zqe(){const{queueName:e}=Nm({from:"/queues/$queueName"}),t=zi(),n=Mu({from:"/queues/$queueName"});return b.jsx(sl,{title:e,children:b.jsx(FBe,{queueName:e,search:n,onSearchChange:r=>{t({to:"/queues/$queueName",params:{queueName:e},search:r,replace:!0})},onJobSelect:r=>t({to:"/queues/$queueName/jobs/$jobId",params:{queueName:e,jobId:r}})})})}function Vqe(){const{queueName:e,jobId:t}=Nm({from:"/queues/$queueName/jobs/$jobId"}),{data:n}=$m(),r=zi(),i=Mu({from:"/queues/$queueName/jobs/$jobId"});return b.jsx(sl,{title:"Job Details",subtitle:t,children:b.jsx(eSe,{queueName:e,jobId:t,readonly:n==null?void 0:n.readonly,search:i,onSearchChange:a=>{r({to:"/queues/$queueName/jobs/$jobId",params:{queueName:e,jobId:t},search:a,replace:!0})},onBack:()=>r({to:"/queues/$queueName",params:{queueName:e}}),onClone:(a,o,l)=>r({to:"/test",search:{queue:a,jobName:o,payload:l}})})})}const Ao=Koe({component:kqe}),Fqe=Qs({getParentRoute:()=>Ao,path:"/",component:Dqe,validateSearch:jqe}),Uqe=Qs({getParentRoute:()=>Ao,path:"/metrics",component:Lqe}),Hqe=Qs({getParentRoute:()=>Ao,path:"/schedulers",component:Iqe,validateSearch:Pqe}),Gqe=Qs({getParentRoute:()=>Ao,path:"/flows",component:$qe}),Wqe=Qs({getParentRoute:()=>Ao,path:"/flows/$queueName/$jobId",component:Bqe}),Kqe=Qs({getParentRoute:()=>Ao,path:"/test",component:qqe,validateSearch:Rqe}),Yqe=Qs({getParentRoute:()=>Ao,path:"/queues/$queueName",component:zqe,validateSearch:Nqe}),Xqe=Qs({getParentRoute:()=>Ao,path:"/queues/$queueName/jobs/$jobId",component:Vqe,validateSearch:Mqe}),Zqe=Ao.addChildren([Fqe,Uqe,Hqe,Gqe,Wqe,Kqe,Yqe,Xqe]);function Qqe(e){return ase({routeTree:Zqe,basepath:e})}const Jqe=new oae({defaultOptions:{queries:{staleTime:1e3*5,refetchOnWindowFocus:!0,retry:1}}});function e4e(){if(typeof document<"u"){const e=document.querySelector("base");if(e!=null&&e.href)return new URL(e.href).pathname.replace(/\/$/,"")||"/"}return"/"}const t4e=Qqe(e4e());function n4e(){return b.jsx(sae,{client:Jqe,children:b.jsx(Kue,{delayDuration:0,children:b.jsx(lse,{router:t4e})})})}Rie.createRoot(document.getElementById("root")).render(b.jsx(ie.StrictMode,{children:b.jsx(n4e,{})}));
|