@maydotinc/q-studio 0.1.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,475 +0,0 @@
1
- var l$=e=>{throw TypeError(e)};var SS=(e,t,n)=>t.has(e)||l$("Cannot "+n);var te=(e,t,n)=>(SS(e,t,"read from private field"),n?n.call(e):t.get(e)),ke=(e,t,n)=>t.has(e)?l$("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ae=(e,t,n,r)=>(SS(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ke=(e,t,n)=>(SS(e,t,"access private method"),n);var Mv=(e,t,n,r)=>({set _(i){Ae(e,t,i,n)},get _(){return te(e,t,r)}});function xie(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 Rv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _S={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 u$;function wie(){if(u$)return jh;u$=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 c$;function Sie(){return c$||(c$=1,_S.exports=wie()),_S.exports}var y=Sie(),ES={exports:{}},qe={};/**
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 f$;function _ie(){if(f$)return qe;f$=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 w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,b={};function S(U,F,X){this.props=U,this.context=F,this.refs=b,this.updater=X||w}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=b,this.updater=X||w}var A=_.prototype=new E;A.constructor=_,x(A,S.prototype),A.isPureReactComponent=!0;var T=Array.isArray;function O(){}var M={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function P(U,F,X){var W=X.ref;return{$$typeof:e,type:U,key:F,ref:W!==void 0?W:null,props:X}}function $(U,F){return P(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,W,G){var Z=typeof U;(Z==="undefined"||Z==="boolean")&&(U=null);var J=!1;if(U===null)J=!0;else switch(Z){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,W,G)}}if(J)return G=G(U),J=W===""?"."+D(U,0):W,T(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=W===""?".":W+":";if(T(U))for(var ne=0;ne<U.length;ne++)W=U[ne],Z=re+D(W,ne),J+=L(W,F,X,Z,G);else if(ne=g(U),typeof ne=="function")for(U=ne.call(U),ne=0;!(W=U.next()).done;)W=W.value,Z=re+D(W,ne++),J+=L(W,F,X,Z,G);else if(Z==="object"){if(typeof U.then=="function")return L(q(U),F,X,W,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 W=[],G=0;return L(U,W,"","",function(Z){return F.call(X,Z,G++)}),W}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)},Q={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 qe.Activity=h,qe.Children=Q,qe.Component=S,qe.Fragment=n,qe.Profiler=i,qe.PureComponent=_,qe.StrictMode=r,qe.Suspense=u,qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,qe.__COMPILER_RUNTIME={__proto__:null,c:function(U){return M.H.useMemoCache(U)}},qe.cache=function(U){return function(){return U.apply(null,arguments)}},qe.cacheSignal=function(){return null},qe.cloneElement=function(U,F,X){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var W=x({},U.props),G=U.key;if(F!=null)for(Z in F.key!==void 0&&(G=""+F.key),F)!R.call(F,Z)||Z==="key"||Z==="__self"||Z==="__source"||Z==="ref"&&F.ref===void 0||(W[Z]=F[Z]);var Z=arguments.length-2;if(Z===1)W.children=X;else if(1<Z){for(var J=Array(Z),re=0;re<Z;re++)J[re]=arguments[re+2];W.children=J}return P(U.type,G,W)},qe.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},qe.createElement=function(U,F,X){var W,G={},Z=null;if(F!=null)for(W in F.key!==void 0&&(Z=""+F.key),F)R.call(F,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(G[W]=F[W]);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(W in J=U.defaultProps,J)G[W]===void 0&&(G[W]=J[W]);return P(U,Z,G)},qe.createRef=function(){return{current:null}},qe.forwardRef=function(U){return{$$typeof:l,render:U}},qe.isValidElement=I,qe.lazy=function(U){return{$$typeof:d,_payload:{_status:-1,_result:U},_init:H}},qe.memo=function(U,F){return{$$typeof:f,type:U,compare:F===void 0?null:F}},qe.startTransition=function(U){var F=M.T,X={};M.T=X;try{var W=U(),G=M.S;G!==null&&G(X,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(O,Y)}catch(Z){Y(Z)}finally{F!==null&&X.types!==null&&(F.types=X.types),M.T=F}},qe.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},qe.use=function(U){return M.H.use(U)},qe.useActionState=function(U,F,X){return M.H.useActionState(U,F,X)},qe.useCallback=function(U,F){return M.H.useCallback(U,F)},qe.useContext=function(U){return M.H.useContext(U)},qe.useDebugValue=function(){},qe.useDeferredValue=function(U,F){return M.H.useDeferredValue(U,F)},qe.useEffect=function(U,F){return M.H.useEffect(U,F)},qe.useEffectEvent=function(U){return M.H.useEffectEvent(U)},qe.useId=function(){return M.H.useId()},qe.useImperativeHandle=function(U,F,X){return M.H.useImperativeHandle(U,F,X)},qe.useInsertionEffect=function(U,F){return M.H.useInsertionEffect(U,F)},qe.useLayoutEffect=function(U,F){return M.H.useLayoutEffect(U,F)},qe.useMemo=function(U,F){return M.H.useMemo(U,F)},qe.useOptimistic=function(U,F){return M.H.useOptimistic(U,F)},qe.useReducer=function(U,F,X){return M.H.useReducer(U,F,X)},qe.useRef=function(U){return M.H.useRef(U)},qe.useState=function(U){return M.H.useState(U)},qe.useSyncExternalStore=function(U,F,X){return M.H.useSyncExternalStore(U,F,X)},qe.useTransition=function(){return M.H.useTransition()},qe.version="19.2.6",qe}var d$;function jm(){return d$||(d$=1,ES.exports=_ie()),ES.exports}var N=jm();const ie=vt(N),kR=xie({__proto__:null,default:ie},[N]);var AS={exports:{}},Nh={},TS={exports:{}},CS={};/**
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 h$;function Eie(){return h$||(h$=1,(function(e){function t(L,z){var H=L.length;L.push(z);e:for(;0<H;){var Y=H-1>>>1,Q=L[Y];if(0<i(Q,z))L[Y]=z,L[H]=Q,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,Q=L.length,U=Q>>>1;Y<U;){var F=2*(Y+1)-1,X=L[F],W=F+1,G=L[W];if(0>i(X,H))W<Q&&0>i(G,X)?(L[Y]=G,L[W]=H,Y=W):(L[Y]=X,L[F]=H,Y=F);else if(W<Q&&0>i(G,H))L[Y]=G,L[W]=H,Y=W;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,w=!1,x=!1,b=!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 T(L){if(x=!1,A(L),!w)if(n(u)!==null)w=!0,O||(O=!0,k());else{var z=n(f);z!==null&&q(T,z.startTime-L)}}var O=!1,M=-1,R=5,P=-1;function $(){return b?!0:!(e.unstable_now()-P<R)}function I(){if(b=!1,O){var L=e.unstable_now();P=L;var z=!0;try{e:{w=!1,x&&(x=!1,E(M),M=-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 Q=Y(h.expirationTime<=L);if(L=e.unstable_now(),typeof Q=="function"){h.callback=Q,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(T,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){M=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"):R=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(){b=!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 Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=H+Q,L={id:d++,callback:z,priorityLevel:L,startTime:H,expirationTime:Q,sortIndex:-1},H>Y?(L.sortIndex=H,t(f,L),n(u)===null&&L===n(f)&&(x?(E(M),M=-1):x=!0,q(T,H-Y))):(L.sortIndex=Q,t(u,L),w||g||(w=!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}}}})(CS)),CS}var p$;function Aie(){return p$||(p$=1,TS.exports=Eie()),TS.exports}var OS={exports:{}},Gn={};/**
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 m$;function Tie(){if(m$)return Gn;m$=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 Gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Gn.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)},Gn.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()}},Gn.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))},Gn.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Gn.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})}},Gn.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)},Gn.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})}},Gn.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)},Gn.requestFormReset=function(u){r.d.r(u)},Gn.unstable_batchedUpdates=function(u,f){return u(f)},Gn.useFormState=function(u,f,d){return o.H.useFormState(u,f,d)},Gn.useFormStatus=function(){return o.H.useHostTransitionStatus()},Gn.version="19.2.6",Gn}var g$;function T9(){if(g$)return OS.exports;g$=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(),OS.exports=Tie(),OS.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 v$;function Cie(){if(v$)return Nh;v$=1;var e=Aie(),t=jm(),n=T9();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 C=p.return;if(C===null)break;var j=C.alternate;if(j===null){if(v=C.return,v!==null){p=v;continue}break}if(C.child===j.child){for(j=C.child;j;){if(j===p)return u(C),s;if(j===v)return u(C),c;j=j.sibling}throw Error(r(188))}if(p.return!==v.return)p=C,v=j;else{for(var B=!1,K=C.child;K;){if(K===p){B=!0,p=C,v=j;break}if(K===v){B=!0,v=C,p=j;break}K=K.sibling}if(!B){for(K=j.child;K;){if(K===p){B=!0,p=j,v=C;break}if(K===v){B=!0,v=j,p=C;break}K=K.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"),w=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),b=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"),T=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),P=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 x:return"Fragment";case S:return"Profiler";case b:return"StrictMode";case T:return"Suspense";case O:return"SuspenseList";case P:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case w: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 M:return c=s.displayName||null,c!==null?c:D(s.type)||"Memo";case R: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=[],Q=-1;function U(s){return{current:s}}function F(s){0>Q||(s.current=Y[Q],Y[Q]=null,Q--)}function X(s,c){Q++,Y[Q]=s.current,s.current=c}var W=U(null),G=U(null),Z=U(null),J=U(null);function re(s,c){switch(X(Z,c),X(G,s),X(W,null),c.nodeType){case 9:case 11:s=(s=c.documentElement)&&(s=s.namespaceURI)?ML(s):0;break;default:if(s=c.tagName,c=c.namespaceURI)c=ML(c),s=RL(c,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}F(W),X(W,s)}function ne(){F(W),F(G),F(Z)}function fe(s){s.memoizedState!==null&&X(J,s);var c=W.current,p=RL(c,s.type);c!==p&&(X(G,s),X(W,p))}function he(s){G.current===s&&(F(W),F(G)),J.current===s&&(F(J),Ah._currentValue=H)}var oe,ye;function xe(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 we=!1;function Te(s,c){if(!s||we)return"";we=!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 C=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=v.DetermineComponentFrameRoot(),B=j[0],K=j[1];if(B&&K){var ee=B.split(`
44
- `),ue=K.split(`
45
- `);for(C=v=0;v<ee.length&&!ee[v].includes("DetermineComponentFrameRoot");)v++;for(;C<ue.length&&!ue[C].includes("DetermineComponentFrameRoot");)C++;if(v===ee.length||C===ue.length)for(v=ee.length-1,C=ue.length-1;1<=v&&0<=C&&ee[v]!==ue[C];)C--;for(;1<=v&&0<=C;v--,C--)if(ee[v]!==ue[C]){if(v!==1||C!==1)do if(v--,C--,0>C||ee[v]!==ue[C]){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<=C);break}}}finally{we=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?xe(p):""}function Ee(s,c){switch(s.tag){case 26:case 27:case 5:return xe(s.type);case 16:return xe("Lazy");case 13:return s.child!==c&&c!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return Te(s.type,!1);case 11:return Te(s.type.render,!1);case 1:return Te(s.type,!0);case 31:return xe("Activity");default:return""}}function tt(s){try{var c="",p=null;do c+=Ee(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,It=e.unstable_scheduleCallback,Ht=e.unstable_cancelCallback,Mt=e.unstable_shouldYield,Et=e.unstable_requestPaint,At=e.unstable_now,He=e.unstable_getCurrentPriorityLevel,Lt=e.unstable_ImmediatePriority,bn=e.unstable_UserBlockingPriority,Fn=e.unstable_NormalPriority,Vu=e.unstable_LowPriority,Sa=e.unstable_IdlePriority,Dd=e.log,Fu=e.unstable_setDisableYieldValue,Un=null,Zt=null;function Ki(s){if(typeof Dd=="function"&&Fu(s),Zt&&typeof Zt.setStrictMode=="function")try{Zt.setStrictMode(Un,s)}catch{}}var Jn=Math.clz32?Math.clz32:cw,lw=Math.log,uw=Math.LN2;function cw(s){return s>>>=0,s===0?32:31-(lw(s)/uw|0)|0}var Uu=256,Hu=262144,Gu=4194304;function _a(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 Ku(s,c,p){var v=s.pendingLanes;if(v===0)return 0;var C=0,j=s.suspendedLanes,B=s.pingedLanes;s=s.warmLanes;var K=v&134217727;return K!==0?(v=K&~j,v!==0?C=_a(v):(B&=K,B!==0?C=_a(B):p||(p=K&~s,p!==0&&(C=_a(p))))):(K=v&~j,K!==0?C=_a(K):B!==0?C=_a(B):p||(p=v&~s,p!==0&&(C=_a(p)))),C===0?0:c!==0&&c!==C&&(c&j)===0&&(j=C&-C,p=c&-c,j>=p||j===32&&(p&4194048)!==0)?c:C}function cl(s,c){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&c)===0}function fw(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 lg(){var s=Gu;return Gu<<=1,(Gu&62914560)===0&&(Gu=4194304),s}function Id(s){for(var c=[],p=0;31>p;p++)c.push(s);return c}function fl(s,c){s.pendingLanes|=c,c!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function dw(s,c,p,v,C,j){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 K=s.entanglements,ee=s.expirationTimes,ue=s.hiddenUpdates;for(p=B&~p;0<p;){var pe=31-Jn(p),ve=1<<pe;K[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&&ug(s,v,0),j!==0&&C===0&&s.tag!==0&&(s.suspendedLanes|=j&~(B&~c))}function ug(s,c,p){s.pendingLanes|=c,s.suspendedLanes&=~c;var v=31-Jn(c);s.entangledLanes|=c,s.entanglements[v]=s.entanglements[v]|1073741824|p&261930}function cg(s,c){var p=s.entangledLanes|=c;for(s=s.entanglements;p;){var v=31-Jn(p),C=1<<v;C&c|s[v]&c&&(s[v]|=c),p&=~C}}function fg(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 dg(){var s=z.p;return s!==0?s:(s=window.event,s===void 0?32:t$(s.type))}function hg(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,Hn="__reactProps$"+Wi,Ea="__reactContainer$"+Wi,Wu="__reactEvents$"+Wi,pg="__reactListeners$"+Wi,hw="__reactHandles$"+Wi,mg="__reactResources$"+Wi,dl="__reactMarker$"+Wi;function Bd(s){delete s[xn],delete s[Hn],delete s[Wu],delete s[pg],delete s[hw]}function No(s){var c=s[xn];if(c)return c;for(var p=s.parentNode;p;){if(c=p[Ea]||p[xn]){if(p=c.alternate,c.child!==null||p!==null&&p.child!==null)for(s=BL(s);s!==null;){if(p=s[xn])return p;s=BL(s)}return c}s=p,p=s.parentNode}return null}function Mo(s){if(s=s[xn]||s[Ea]){var c=s.tag;if(c===5||c===6||c===13||c===31||c===26||c===27||c===3)return s}return null}function Ro(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s.stateNode;throw Error(r(33))}function Po(s){var c=s[mg];return c||(c=s[mg]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function un(s){s[dl]=!0}var gg=new Set,vg={};function Aa(s,c){ko(s,c),ko(s+"Capture",c)}function ko(s,c){for(vg[s]=c,s=0;s<c.length;s++)gg.add(c[s])}var pw=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={},yg={};function mw(s){return nt.call(yg,s)?!0:nt.call(qd,s)?!1:pw.test(s)?yg[s]=!0:(qd[s]=!0,!1)}function Yu(s,c,p){if(mw(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 Xu(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 bi(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 bg(s){var c=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function gw(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 C=v.get,j=v.set;return Object.defineProperty(s,c,{configurable:!0,get:function(){return C.call(this)},set:function(B){p=""+B,j.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 Do(s){if(!s._valueTracker){var c=bg(s)?"checked":"value";s._valueTracker=gw(s,c,""+s[c])}}function xg(s){if(!s)return!1;var c=s._valueTracker;if(!c)return!0;var p=c.getValue(),v="";return s&&(v=bg(s)?s.checked?"true":"false":s.value),s=v,s!==p?(c.setValue(s),!0):!1}function hl(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 vw=/[\n"\\]/g;function cr(s){return s.replace(vw,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function pl(s,c,p,v,C,j,B,K){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"),C==null&&j!=null&&(s.defaultChecked=!!j),C!=null&&(s.checked=C&&typeof C!="function"&&typeof C!="symbol"),K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?s.name=""+ur(K):s.removeAttribute("name")}function wg(s,c,p,v,C,j,B,K){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(s.type=j),c!=null||p!=null){if(!(j!=="submit"&&j!=="reset"||c!=null)){Do(s);return}p=p!=null?""+ur(p):"",c=c!=null?""+ur(c):p,K||c===s.value||(s.value=c),s.defaultValue=c}v=v??C,v=typeof v!="function"&&typeof v!="symbol"&&!!v,s.checked=K?s.checked:!!v,s.defaultChecked=!!v,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(s.name=B),Do(s)}function zd(s,c,p){c==="number"&&hl(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function Ta(s,c,p,v){if(s=s.options,c){c={};for(var C=0;C<p.length;C++)c["$"+p[C]]=!0;for(p=0;p<s.length;p++)C=c.hasOwnProperty("$"+s[p].value),s[p].selected!==C&&(s[p].selected=C),C&&v&&(s[p].defaultSelected=!0)}else{for(p=""+ur(p),c=null,C=0;C<s.length;C++){if(s[C].value===p){s[C].selected=!0,v&&(s[C].defaultSelected=!0);return}c!==null||s[C].disabled||(c=s[C])}c!==null&&(c.selected=!0)}}function Tk(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 Ck(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),Do(s)}function Qu(s,c){if(c){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=c;return}}s.textContent=c}var mne=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 Ok(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||mne.has(c)?c==="float"?s.cssFloat=p:s[c]=(""+p).trim():s[c]=p+"px"}function jk(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 C in c)v=c[C],c.hasOwnProperty(C)&&p[C]!==v&&Ok(s,C,v)}else for(var j in c)c.hasOwnProperty(j)&&Ok(s,j,c[j])}function yw(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 gne=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"]]),vne=/^[\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 Sg(s){return vne.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Ca(){}var bw=null;function xw(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Zu=null,Ju=null;function Nk(s){var c=Mo(s);if(c&&(s=c.stateNode)){var p=s[Hn]||null;e:switch(s=c.stateNode,c.type){case"input":if(pl(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 C=v[Hn]||null;if(!C)throw Error(r(90));pl(v,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(c=0;c<p.length;c++)v=p[c],v.form===s.form&&xg(v)}break e;case"textarea":Tk(s,p.value,p.defaultValue);break e;case"select":c=p.value,c!=null&&Ta(s,!!p.multiple,c,!1)}}}var ww=!1;function Mk(s,c,p){if(ww)return s(c,p);ww=!0;try{var v=s(c);return v}finally{if(ww=!1,(Zu!==null||Ju!==null)&&(uv(),Zu&&(c=Zu,s=Ju,Ju=Zu=null,Nk(c),s)))for(c=0;c<s.length;c++)Nk(s[c])}}function Vd(s,c){var p=s.stateNode;if(p===null)return null;var v=p[Hn]||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 Oa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sw=!1;if(Oa)try{var Fd={};Object.defineProperty(Fd,"passive",{get:function(){Sw=!0}}),window.addEventListener("test",Fd,Fd),window.removeEventListener("test",Fd,Fd)}catch{Sw=!1}var Io=null,_w=null,_g=null;function Rk(){if(_g)return _g;var s,c=_w,p=c.length,v,C="value"in Io?Io.value:Io.textContent,j=C.length;for(s=0;s<p&&c[s]===C[s];s++);var B=p-s;for(v=1;v<=B&&c[p-v]===C[j-v];v++);return _g=C.slice(s,1<v?1-v:void 0)}function Eg(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 Ag(){return!0}function Pk(){return!1}function fr(s){function c(p,v,C,j,B){this._reactName=p,this._targetInst=C,this.type=v,this.nativeEvent=j,this.target=B,this.currentTarget=null;for(var K in s)s.hasOwnProperty(K)&&(p=s[K],this[K]=p?p(j):j[K]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?Ag:Pk,this.isPropagationStopped=Pk,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=Ag)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=Ag)},persist:function(){},isPersistent:Ag}),c}var ml={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tg=fr(ml),Ud=h({},ml,{view:0,detail:0}),yne=fr(Ud),Ew,Aw,Hd,Cg=h({},Ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cw,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"?(Ew=s.screenX-Hd.screenX,Aw=s.screenY-Hd.screenY):Aw=Ew=0,Hd=s),Ew)},movementY:function(s){return"movementY"in s?s.movementY:Aw}}),kk=fr(Cg),bne=h({},Cg,{dataTransfer:0}),xne=fr(bne),wne=h({},Ud,{relatedTarget:0}),Tw=fr(wne),Sne=h({},ml,{animationName:0,elapsedTime:0,pseudoElement:0}),_ne=fr(Sne),Ene=h({},ml,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),Ane=fr(Ene),Tne=h({},ml,{data:0}),Dk=fr(Tne),Cne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},One={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"},jne={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nne(s){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(s):(s=jne[s])?!!c[s]:!1}function Cw(){return Nne}var Mne=h({},Ud,{key:function(s){if(s.key){var c=Cne[s.key]||s.key;if(c!=="Unidentified")return c}return s.type==="keypress"?(s=Eg(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?One[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cw,charCode:function(s){return s.type==="keypress"?Eg(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Eg(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Rne=fr(Mne),Pne=h({},Cg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ik=fr(Pne),kne=h({},Ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cw}),Dne=fr(kne),Ine=h({},ml,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lne=fr(Ine),$ne=h({},Cg,{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}),Bne=fr($ne),qne=h({},ml,{newState:0,oldState:0}),zne=fr(qne),Vne=[9,13,27,32],Ow=Oa&&"CompositionEvent"in window,Gd=null;Oa&&"documentMode"in document&&(Gd=document.documentMode);var Fne=Oa&&"TextEvent"in window&&!Gd,Lk=Oa&&(!Ow||Gd&&8<Gd&&11>=Gd),$k=" ",Bk=!1;function qk(s,c){switch(s){case"keyup":return Vne.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zk(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var ec=!1;function Une(s,c){switch(s){case"compositionend":return zk(c);case"keypress":return c.which!==32?null:(Bk=!0,$k);case"textInput":return s=c.data,s===$k&&Bk?null:s;default:return null}}function Hne(s,c){if(ec)return s==="compositionend"||!Ow&&qk(s,c)?(s=Rk(),_g=_w=Io=null,ec=!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 Lk&&c.locale!=="ko"?null:c.data;default:return null}}var Gne={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 Vk(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c==="input"?!!Gne[s.type]:c==="textarea"}function Fk(s,c,p,v){Zu?Ju?Ju.push(v):Ju=[v]:Zu=v,c=gv(c,"onChange"),0<c.length&&(p=new Tg("onChange","change",null,p,v),s.push({event:p,listeners:c}))}var Kd=null,Wd=null;function Kne(s){AL(s,0)}function Og(s){var c=Ro(s);if(xg(c))return s}function Uk(s,c){if(s==="change")return c}var Hk=!1;if(Oa){var jw;if(Oa){var Nw="oninput"in document;if(!Nw){var Gk=document.createElement("div");Gk.setAttribute("oninput","return;"),Nw=typeof Gk.oninput=="function"}jw=Nw}else jw=!1;Hk=jw&&(!document.documentMode||9<document.documentMode)}function Kk(){Kd&&(Kd.detachEvent("onpropertychange",Wk),Wd=Kd=null)}function Wk(s){if(s.propertyName==="value"&&Og(Wd)){var c=[];Fk(c,Wd,s,xw(s)),Mk(Kne,c)}}function Wne(s,c,p){s==="focusin"?(Kk(),Kd=c,Wd=p,Kd.attachEvent("onpropertychange",Wk)):s==="focusout"&&Kk()}function Yne(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Og(Wd)}function Xne(s,c){if(s==="click")return Og(c)}function Qne(s,c){if(s==="input"||s==="change")return Og(c)}function Zne(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var Ar=typeof Object.is=="function"?Object.is:Zne;function Yd(s,c){if(Ar(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 C=p[v];if(!nt.call(c,C)||!Ar(s[C],c[C]))return!1}return!0}function Yk(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Xk(s,c){var p=Yk(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=Yk(p)}}function Qk(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?Qk(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function Zk(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var c=hl(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=hl(s.document)}return c}function Mw(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 Jne=Oa&&"documentMode"in document&&11>=document.documentMode,tc=null,Rw=null,Xd=null,Pw=!1;function Jk(s,c,p){var v=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Pw||tc==null||tc!==hl(v)||(v=tc,"selectionStart"in v&&Mw(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=gv(Rw,"onSelect"),0<v.length&&(c=new Tg("onSelect","select",null,c,p),s.push({event:c,listeners:v}),c.target=tc)))}function gl(s,c){var p={};return p[s.toLowerCase()]=c.toLowerCase(),p["Webkit"+s]="webkit"+c,p["Moz"+s]="moz"+c,p}var nc={animationend:gl("Animation","AnimationEnd"),animationiteration:gl("Animation","AnimationIteration"),animationstart:gl("Animation","AnimationStart"),transitionrun:gl("Transition","TransitionRun"),transitionstart:gl("Transition","TransitionStart"),transitioncancel:gl("Transition","TransitionCancel"),transitionend:gl("Transition","TransitionEnd")},kw={},eD={};Oa&&(eD=document.createElement("div").style,"AnimationEvent"in window||(delete nc.animationend.animation,delete nc.animationiteration.animation,delete nc.animationstart.animation),"TransitionEvent"in window||delete nc.transitionend.transition);function vl(s){if(kw[s])return kw[s];if(!nc[s])return s;var c=nc[s],p;for(p in c)if(c.hasOwnProperty(p)&&p in eD)return kw[s]=c[p];return s}var tD=vl("animationend"),nD=vl("animationiteration"),rD=vl("animationstart"),ere=vl("transitionrun"),tre=vl("transitionstart"),nre=vl("transitioncancel"),iD=vl("transitionend"),aD=new Map,Dw="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(" ");Dw.push("scrollEnd");function xi(s,c){aD.set(s,c),Aa(c,[s])}var jg=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)},Kr=[],rc=0,Iw=0;function Ng(){for(var s=rc,c=Iw=rc=0;c<s;){var p=Kr[c];Kr[c++]=null;var v=Kr[c];Kr[c++]=null;var C=Kr[c];Kr[c++]=null;var j=Kr[c];if(Kr[c++]=null,v!==null&&C!==null){var B=v.pending;B===null?C.next=C:(C.next=B.next,B.next=C),v.pending=C}j!==0&&oD(p,C,j)}}function Mg(s,c,p,v){Kr[rc++]=s,Kr[rc++]=c,Kr[rc++]=p,Kr[rc++]=v,Iw|=v,s.lanes|=v,s=s.alternate,s!==null&&(s.lanes|=v)}function Lw(s,c,p,v){return Mg(s,c,p,v),Rg(s)}function yl(s,c){return Mg(s,null,null,c),Rg(s)}function oD(s,c,p){s.lanes|=p;var v=s.alternate;v!==null&&(v.lanes|=p);for(var C=!1,j=s.return;j!==null;)j.childLanes|=p,v=j.alternate,v!==null&&(v.childLanes|=p),j.tag===22&&(s=j.stateNode,s===null||s._visibility&1||(C=!0)),s=j,j=j.return;return s.tag===3?(j=s.stateNode,C&&c!==null&&(C=31-Jn(p),s=j.hiddenUpdates,v=s[C],v===null?s[C]=[c]:v.push(c),c.lane=p|536870912),j):null}function Rg(s){if(50<yh)throw yh=0,G1=null,Error(r(185));for(var c=s.return;c!==null;)s=c,c=s.return;return s.tag===3?s.stateNode:null}var ic={};function rre(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 rre(s,c,p,v)}function $w(s){return s=s.prototype,!(!s||!s.isReactComponent)}function ja(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 sD(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,C,j){var B=0;if(v=s,typeof s=="function")$w(s)&&(B=1);else if(typeof s=="string")B=lie(s,p,W.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case P:return s=Tr(31,p,c,C),s.elementType=P,s.lanes=j,s;case x:return bl(p.children,C,j,c);case b:B=8,C|=24;break;case S:return s=Tr(12,p,c,C|2),s.elementType=S,s.lanes=j,s;case T:return s=Tr(13,p,c,C),s.elementType=T,s.lanes=j,s;case O:return s=Tr(19,p,c,C),s.elementType=O,s.lanes=j,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 M:B=14;break e;case R: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,C),c.elementType=s,c.type=v,c.lanes=j,c}function bl(s,c,p,v){return s=Tr(7,s,v,c),s.lanes=p,s}function Bw(s,c,p){return s=Tr(6,s,null,c),s.lanes=p,s}function lD(s){var c=Tr(18,null,null,0);return c.stateNode=s,c}function qw(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 uD=new WeakMap;function Wr(s,c){if(typeof s=="object"&&s!==null){var p=uD.get(s);return p!==void 0?p:(c={value:s,source:c,stack:tt(c)},uD.set(s,c),c)}return{value:s,source:c,stack:tt(c)}}var ac=[],oc=0,kg=null,Qd=0,Yr=[],Xr=0,Lo=null,Yi=1,Xi="";function Na(s,c){ac[oc++]=Qd,ac[oc++]=kg,kg=s,Qd=c}function cD(s,c,p){Yr[Xr++]=Yi,Yr[Xr++]=Xi,Yr[Xr++]=Lo,Lo=s;var v=Yi;s=Xi;var C=32-Jn(v)-1;v&=~(1<<C),p+=1;var j=32-Jn(c)+C;if(30<j){var B=C-C%5;j=(v&(1<<B)-1).toString(32),v>>=B,C-=B,Yi=1<<32-Jn(c)+C|p<<C|v,Xi=j+s}else Yi=1<<j|p<<C|v,Xi=s}function zw(s){s.return!==null&&(Na(s,1),cD(s,1,0))}function Vw(s){for(;s===kg;)kg=ac[--oc],ac[oc]=null,Qd=ac[--oc],ac[oc]=null;for(;s===Lo;)Lo=Yr[--Xr],Yr[Xr]=null,Xi=Yr[--Xr],Yr[Xr]=null,Yi=Yr[--Xr],Yr[Xr]=null}function fD(s,c){Yr[Xr++]=Yi,Yr[Xr++]=Xi,Yr[Xr++]=Lo,Yi=c.id,Xi=c.overflow,Lo=s}var Dn=null,qt=null,st=!1,$o=null,Qr=!1,Fw=Error(r(519));function Bo(s){var c=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zd(Wr(c,s)),Fw}function dD(s){var c=s.stateNode,p=s.type,v=s.memoizedProps;switch(c[xn]=s,c[Hn]=v,p){case"dialog":Ze("cancel",c),Ze("close",c);break;case"iframe":case"object":case"embed":Ze("load",c);break;case"video":case"audio":for(p=0;p<xh.length;p++)Ze(xh[p],c);break;case"source":Ze("error",c);break;case"img":case"image":case"link":Ze("error",c),Ze("load",c);break;case"details":Ze("toggle",c);break;case"input":Ze("invalid",c),wg(c,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":Ze("invalid",c);break;case"textarea":Ze("invalid",c),Ck(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||jL(c.textContent,p)?(v.popover!=null&&(Ze("beforetoggle",c),Ze("toggle",c)),v.onScroll!=null&&Ze("scroll",c),v.onScrollEnd!=null&&Ze("scrollend",c),v.onClick!=null&&(c.onclick=Ca),c=!0):c=!1,c||Bo(s,!0)}function hD(s){for(Dn=s.return;Dn;)switch(Dn.tag){case 5:case 31:case 13:Qr=!1;return;case 27:case 3:Qr=!0;return;default:Dn=Dn.return}}function sc(s){if(s!==Dn)return!1;if(!st)return hD(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")||sS(s.type,s.memoizedProps)),p=!p),p&&qt&&Bo(s),hD(s),c===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));qt=$L(s)}else if(c===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));qt=$L(s)}else c===27?(c=qt,Jo(s.type)?(s=dS,dS=null,qt=s):qt=c):qt=Dn?Jr(s.stateNode.nextSibling):null;return!0}function xl(){qt=Dn=null,st=!1}function Uw(){var s=$o;return s!==null&&(mr===null?mr=s:mr.push.apply(mr,s),$o=null),s}function Zd(s){$o===null?$o=[s]:$o.push(s)}var Hw=U(null),wl=null,Ma=null;function qo(s,c,p){X(Hw,c._currentValue),c._currentValue=p}function Ra(s){s._currentValue=Hw.current,F(Hw)}function Gw(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 Kw(s,c,p,v){var C=s.child;for(C!==null&&(C.return=s);C!==null;){var j=C.dependencies;if(j!==null){var B=C.child;j=j.firstContext;e:for(;j!==null;){var K=j;j=C;for(var ee=0;ee<c.length;ee++)if(K.context===c[ee]){j.lanes|=p,K=j.alternate,K!==null&&(K.lanes|=p),Gw(j.return,p,s),v||(B=null);break e}j=K.next}}else if(C.tag===18){if(B=C.return,B===null)throw Error(r(341));B.lanes|=p,j=B.alternate,j!==null&&(j.lanes|=p),Gw(B,p,s),B=null}else B=C.child;if(B!==null)B.return=C;else for(B=C;B!==null;){if(B===s){B=null;break}if(C=B.sibling,C!==null){C.return=B.return,B=C;break}B=B.return}C=B}}function lc(s,c,p,v){s=null;for(var C=c,j=!1;C!==null;){if(!j){if((C.flags&524288)!==0)j=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var B=C.alternate;if(B===null)throw Error(r(387));if(B=B.memoizedProps,B!==null){var K=C.type;Ar(C.pendingProps.value,B.value)||(s!==null?s.push(K):s=[K])}}else if(C===J.current){if(B=C.alternate,B===null)throw Error(r(387));B.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(s!==null?s.push(Ah):s=[Ah])}C=C.return}s!==null&&Kw(c,s,p,v),c.flags|=262144}function Dg(s){for(s=s.firstContext;s!==null;){if(!Ar(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Sl(s){wl=s,Ma=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function In(s){return pD(wl,s)}function Ig(s,c){return wl===null&&Sl(s),pD(s,c)}function pD(s,c){var p=c._currentValue;if(c={context:c,memoizedValue:p,next:null},Ma===null){if(s===null)throw Error(r(308));Ma=c,s.dependencies={lanes:0,firstContext:c},s.flags|=524288}else Ma=Ma.next=c;return p}var ire=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()})}},are=e.unstable_scheduleCallback,ore=e.unstable_NormalPriority,cn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ww(){return{controller:new ire,data:new Map,refCount:0}}function Jd(s){s.refCount--,s.refCount===0&&are(ore,function(){s.controller.abort()})}var eh=null,Yw=0,uc=0,cc=null;function sre(s,c){if(eh===null){var p=eh=[];Yw=0,uc=Z1(),cc={status:"pending",value:void 0,then:function(v){p.push(v)}}}return Yw++,c.then(mD,mD),c}function mD(){if(--Yw===0&&eh!==null){cc!==null&&(cc.status="fulfilled");var s=eh;eh=null,uc=0,cc=null;for(var c=0;c<s.length;c++)(0,s[c])()}}function lre(s,c){var p=[],v={status:"pending",value:null,reason:null,then:function(C){p.push(C)}};return s.then(function(){v.status="fulfilled",v.value=c;for(var C=0;C<p.length;C++)(0,p[C])(c)},function(C){for(v.status="rejected",v.reason=C,C=0;C<p.length;C++)(0,p[C])(void 0)}),v}var gD=L.S;L.S=function(s,c){JI=At(),typeof c=="object"&&c!==null&&typeof c.then=="function"&&sre(s,c),gD!==null&&gD(s,c)};var _l=U(null);function Xw(){var s=_l.current;return s!==null?s:Rt.pooledCache}function Lg(s,c){c===null?X(_l,_l.current):X(_l,c.pool)}function vD(){var s=Xw();return s===null?null:{parent:cn._currentValue,pool:s}}var fc=Error(r(460)),Qw=Error(r(474)),$g=Error(r(542)),Bg={then:function(){}};function yD(s){return s=s.status,s==="fulfilled"||s==="rejected"}function bD(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,wD(s),s;default:if(typeof c.status=="string")c.then(Ca,Ca);else{if(s=Rt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=c,s.status="pending",s.then(function(v){if(c.status==="pending"){var C=c;C.status="fulfilled",C.value=v}},function(v){if(c.status==="pending"){var C=c;C.status="rejected",C.reason=v}})}switch(c.status){case"fulfilled":return c.value;case"rejected":throw s=c.reason,wD(s),s}throw Al=c,fc}}function El(s){try{var c=s._init;return c(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(Al=p,fc):p}}var Al=null;function xD(){if(Al===null)throw Error(r(459));var s=Al;return Al=null,s}function wD(s){if(s===fc||s===$g)throw Error(r(483))}var dc=null,th=0;function qg(s){var c=th;return th+=1,dc===null&&(dc=[]),bD(dc,s,c)}function nh(s,c){c=c.props.ref,s.ref=c!==void 0?c:null}function zg(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 SD(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 C(se,ae){return se=ja(se,ae),se.index=0,se.sibling=null,se}function j(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 K(se,ae,le,ge){return ae===null||ae.tag!==6?(ae=Bw(le,se.mode,ge),ae.return=se,ae):(ae=C(ae,le),ae.return=se,ae)}function ee(se,ae,le,ge){var Ie=le.type;return Ie===x?pe(se,ae,le.props.children,ge,le.key):ae!==null&&(ae.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===R&&El(Ie)===ae.type)?(ae=C(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=qw(le,se.mode,ge),ae.return=se,ae):(ae=C(ae,le.children||[]),ae.return=se,ae)}function pe(se,ae,le,ge,Ie){return ae===null||ae.tag!==7?(ae=bl(le,se.mode,ge,Ie),ae.return=se,ae):(ae=C(ae,le),ae.return=se,ae)}function ve(se,ae,le){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=Bw(""+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 w:return ae=qw(ae,se.mode,le),ae.return=se,ae;case R:return ae=El(ae),ve(se,ae,le)}if(q(ae)||k(ae))return ae=bl(ae,se.mode,le,null),ae.return=se,ae;if(typeof ae.then=="function")return ve(se,qg(ae),le);if(ae.$$typeof===_)return ve(se,Ig(se,ae),le);zg(se,ae)}return null}function ce(se,ae,le,ge){var Ie=ae!==null?ae.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Ie!==null?null:K(se,ae,""+le,ge);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case g:return le.key===Ie?ee(se,ae,le,ge):null;case w:return le.key===Ie?ue(se,ae,le,ge):null;case R:return le=El(le),ce(se,ae,le,ge)}if(q(le)||k(le))return Ie!==null?null:pe(se,ae,le,ge,null);if(typeof le.then=="function")return ce(se,ae,qg(le),ge);if(le.$$typeof===_)return ce(se,ae,Ig(se,le),ge);zg(se,le)}return null}function de(se,ae,le,ge,Ie){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return se=se.get(le)||null,K(ae,se,""+ge,Ie);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,Ie);case w:return se=se.get(ge.key===null?le:ge.key)||null,ue(ae,se,ge,Ie);case R:return ge=El(ge),de(se,ae,le,ge,Ie)}if(q(ge)||k(ge))return se=se.get(le)||null,pe(ae,se,ge,Ie,null);if(typeof ge.then=="function")return de(se,ae,le,qg(ge),Ie);if(ge.$$typeof===_)return de(se,ae,le,Ig(ae,ge),Ie);zg(ae,ge)}return null}function je(se,ae,le,ge){for(var Ie=null,dt=null,Re=ae,Ge=ae=0,it=null;Re!==null&&Ge<le.length;Ge++){Re.index>Ge?(it=Re,Re=null):it=Re.sibling;var ht=ce(se,Re,le[Ge],ge);if(ht===null){Re===null&&(Re=it);break}s&&Re&&ht.alternate===null&&c(se,Re),ae=j(ht,ae,Ge),dt===null?Ie=ht:dt.sibling=ht,dt=ht,Re=it}if(Ge===le.length)return p(se,Re),st&&Na(se,Ge),Ie;if(Re===null){for(;Ge<le.length;Ge++)Re=ve(se,le[Ge],ge),Re!==null&&(ae=j(Re,ae,Ge),dt===null?Ie=Re:dt.sibling=Re,dt=Re);return st&&Na(se,Ge),Ie}for(Re=v(Re);Ge<le.length;Ge++)it=de(Re,se,Ge,le[Ge],ge),it!==null&&(s&&it.alternate!==null&&Re.delete(it.key===null?Ge:it.key),ae=j(it,ae,Ge),dt===null?Ie=it:dt.sibling=it,dt=it);return s&&Re.forEach(function(is){return c(se,is)}),st&&Na(se,Ge),Ie}function Le(se,ae,le,ge){if(le==null)throw Error(r(151));for(var Ie=null,dt=null,Re=ae,Ge=ae=0,it=null,ht=le.next();Re!==null&&!ht.done;Ge++,ht=le.next()){Re.index>Ge?(it=Re,Re=null):it=Re.sibling;var is=ce(se,Re,ht.value,ge);if(is===null){Re===null&&(Re=it);break}s&&Re&&is.alternate===null&&c(se,Re),ae=j(is,ae,Ge),dt===null?Ie=is:dt.sibling=is,dt=is,Re=it}if(ht.done)return p(se,Re),st&&Na(se,Ge),Ie;if(Re===null){for(;!ht.done;Ge++,ht=le.next())ht=ve(se,ht.value,ge),ht!==null&&(ae=j(ht,ae,Ge),dt===null?Ie=ht:dt.sibling=ht,dt=ht);return st&&Na(se,Ge),Ie}for(Re=v(Re);!ht.done;Ge++,ht=le.next())ht=de(Re,se,Ge,ht.value,ge),ht!==null&&(s&&ht.alternate!==null&&Re.delete(ht.key===null?Ge:ht.key),ae=j(ht,ae,Ge),dt===null?Ie=ht:dt.sibling=ht,dt=ht);return s&&Re.forEach(function(bie){return c(se,bie)}),st&&Na(se,Ge),Ie}function Ot(se,ae,le,ge){if(typeof le=="object"&&le!==null&&le.type===x&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case g:e:{for(var Ie=le.key;ae!==null;){if(ae.key===Ie){if(Ie=le.type,Ie===x){if(ae.tag===7){p(se,ae.sibling),ge=C(ae,le.props.children),ge.return=se,se=ge;break e}}else if(ae.elementType===Ie||typeof Ie=="object"&&Ie!==null&&Ie.$$typeof===R&&El(Ie)===ae.type){p(se,ae.sibling),ge=C(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===x?(ge=bl(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 w:e:{for(Ie=le.key;ae!==null;){if(ae.key===Ie)if(ae.tag===4&&ae.stateNode.containerInfo===le.containerInfo&&ae.stateNode.implementation===le.implementation){p(se,ae.sibling),ge=C(ae,le.children||[]),ge.return=se,se=ge;break e}else{p(se,ae);break}else c(se,ae);ae=ae.sibling}ge=qw(le,se.mode,ge),ge.return=se,se=ge}return B(se);case R:return le=El(le),Ot(se,ae,le,ge)}if(q(le))return je(se,ae,le,ge);if(k(le)){if(Ie=k(le),typeof Ie!="function")throw Error(r(150));return le=Ie.call(le),Le(se,ae,le,ge)}if(typeof le.then=="function")return Ot(se,ae,qg(le),ge);if(le.$$typeof===_)return Ot(se,ae,Ig(se,le),ge);zg(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=C(ae,le),ge.return=se,se=ge):(p(se,ae),ge=Bw(le,se.mode,ge),ge.return=se,se=ge),B(se)):p(se,ae)}return function(se,ae,le,ge){try{th=0;var Ie=Ot(se,ae,le,ge);return dc=null,Ie}catch(Re){if(Re===fc||Re===$g)throw Re;var dt=Tr(29,Re,null,se.mode);return dt.lanes=ge,dt.return=se,dt}finally{}}}var Tl=SD(!0),_D=SD(!1),zo=!1;function Zw(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jw(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 Vo(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Fo(s,c,p){var v=s.updateQueue;if(v===null)return null;if(v=v.shared,(gt&2)!==0){var C=v.pending;return C===null?c.next=c:(c.next=C.next,C.next=c),v.pending=c,c=Rg(s),oD(s,null,p),c}return Mg(s,v,c,p),Rg(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,cg(s,p)}}function e1(s,c){var p=s.updateQueue,v=s.alternate;if(v!==null&&(v=v.updateQueue,p===v)){var C=null,j=null;if(p=p.firstBaseUpdate,p!==null){do{var B={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};j===null?C=j=B:j=j.next=B,p=p.next}while(p!==null);j===null?C=j=c:j=j.next=c}else C=j=c;p={baseState:v.baseState,firstBaseUpdate:C,lastBaseUpdate:j,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 t1=!1;function ih(){if(t1){var s=cc;if(s!==null)throw s}}function ah(s,c,p,v){t1=!1;var C=s.updateQueue;zo=!1;var j=C.firstBaseUpdate,B=C.lastBaseUpdate,K=C.shared.pending;if(K!==null){C.shared.pending=null;var ee=K,ue=ee.next;ee.next=null,B===null?j=ue:B.next=ue,B=ee;var pe=s.alternate;pe!==null&&(pe=pe.updateQueue,K=pe.lastBaseUpdate,K!==B&&(K===null?pe.firstBaseUpdate=ue:K.next=ue,pe.lastBaseUpdate=ee))}if(j!==null){var ve=C.baseState;B=0,pe=ue=ee=null,K=j;do{var ce=K.lane&-536870913,de=ce!==K.lane;if(de?(rt&ce)===ce:(v&ce)===ce){ce!==0&&ce===uc&&(t1=!0),pe!==null&&(pe=pe.next={lane:0,tag:K.tag,payload:K.payload,callback:null,next:null});e:{var je=s,Le=K;ce=c;var Ot=p;switch(Le.tag){case 1:if(je=Le.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=Le.payload,ce=typeof je=="function"?je.call(Ot,ve,ce):je,ce==null)break e;ve=h({},ve,ce);break e;case 2:zo=!0}}ce=K.callback,ce!==null&&(s.flags|=64,de&&(s.flags|=8192),de=C.callbacks,de===null?C.callbacks=[ce]:de.push(ce))}else de={lane:ce,tag:K.tag,payload:K.payload,callback:K.callback,next:null},pe===null?(ue=pe=de,ee=ve):pe=pe.next=de,B|=ce;if(K=K.next,K===null){if(K=C.shared.pending,K===null)break;de=K,K=de.next,de.next=null,C.lastBaseUpdate=de,C.shared.pending=null}}while(!0);pe===null&&(ee=ve),C.baseState=ee,C.firstBaseUpdate=ue,C.lastBaseUpdate=pe,j===null&&(C.shared.lanes=0),Wo|=B,s.lanes=B,s.memoizedState=ve}}function ED(s,c){if(typeof s!="function")throw Error(r(191,s));s.call(c)}function AD(s,c){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)ED(p[s],c)}var hc=U(null),Vg=U(0);function TD(s,c){s=za,X(Vg,s),X(hc,c),za=s|c.baseLanes}function n1(){X(Vg,za),X(hc,hc.current)}function r1(){za=Vg.current,F(hc),F(Vg)}var Cr=U(null),Zr=null;function Uo(s){var c=s.alternate;X(sn,sn.current&1),X(Cr,s),Zr===null&&(c===null||hc.current!==null||c.memoizedState!==null)&&(Zr=s)}function i1(s){X(sn,sn.current),X(Cr,s),Zr===null&&(Zr=s)}function CD(s){s.tag===22?(X(sn,sn.current),X(Cr,s),Zr===null&&(Zr=s)):Ho()}function Ho(){X(sn,sn.current),X(Cr,Cr.current)}function Or(s){F(Cr),Zr===s&&(Zr=null),F(sn)}var sn=U(0);function Fg(s){for(var c=s;c!==null;){if(c.tag===13){var p=c.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||cS(p)||fS(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 Pa=0,Fe=null,Tt=null,fn=null,Ug=!1,pc=!1,Cl=!1,Hg=0,oh=0,mc=null,ure=0;function en(){throw Error(r(321))}function a1(s,c){if(c===null)return!1;for(var p=0;p<c.length&&p<s.length;p++)if(!Ar(s[p],c[p]))return!1;return!0}function o1(s,c,p,v,C,j){return Pa=j,Fe=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,L.H=s===null||s.memoizedState===null?cI:w1,Cl=!1,j=p(v,C),Cl=!1,pc&&(j=jD(c,p,v,C)),OD(s),j}function OD(s){L.H=uh;var c=Tt!==null&&Tt.next!==null;if(Pa=0,fn=Tt=Fe=null,Ug=!1,oh=0,mc=null,c)throw Error(r(300));s===null||dn||(s=s.dependencies,s!==null&&Dg(s)&&(dn=!0))}function jD(s,c,p,v){Fe=s;var C=0;do{if(pc&&(mc=null),oh=0,pc=!1,25<=C)throw Error(r(301));if(C+=1,fn=Tt=null,s.updateQueue!=null){var j=s.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}L.H=fI,j=c(p,v)}while(pc);return j}function cre(){var s=L.H,c=s.useState()[0];return c=typeof c.then=="function"?sh(c):c,s=s.useState()[0],(Tt!==null?Tt.memoizedState:null)!==s&&(Fe.flags|=1024),c}function s1(){var s=Hg!==0;return Hg=0,s}function l1(s,c,p){c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~p}function u1(s){if(Ug){for(s=s.memoizedState;s!==null;){var c=s.queue;c!==null&&(c.pending=null),s=s.next}Ug=!1}Pa=0,fn=Tt=Fe=null,pc=!1,oh=Hg=0,mc=null}function er(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fn===null?Fe.memoizedState=fn=s:fn=fn.next=s,fn}function ln(){if(Tt===null){var s=Fe.alternate;s=s!==null?s.memoizedState:null}else s=Tt.next;var c=fn===null?Fe.memoizedState:fn.next;if(c!==null)fn=c,Tt=s;else{if(s===null)throw Fe.alternate===null?Error(r(467)):Error(r(310));Tt=s,s={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},fn===null?Fe.memoizedState=fn=s:fn=fn.next=s}return fn}function Gg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sh(s){var c=oh;return oh+=1,mc===null&&(mc=[]),s=bD(mc,s,c),c=Fe,(fn===null?c.memoizedState:fn.next)===null&&(c=c.alternate,L.H=c===null||c.memoizedState===null?cI:w1),s}function Kg(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return sh(s);if(s.$$typeof===_)return In(s)}throw Error(r(438,String(s)))}function c1(s){var c=null,p=Fe.updateQueue;if(p!==null&&(c=p.memoCache),c==null){var v=Fe.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(c={data:v.data.map(function(C){return C.slice()}),index:0})))}if(c==null&&(c={data:[],index:0}),p===null&&(p=Gg(),Fe.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 ka(s,c){return typeof c=="function"?c(s):c}function Wg(s){var c=ln();return f1(c,Tt,s)}function f1(s,c,p){var v=s.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=p;var C=s.baseQueue,j=v.pending;if(j!==null){if(C!==null){var B=C.next;C.next=j.next,j.next=B}c.baseQueue=C=j,v.pending=null}if(j=s.baseState,C===null)s.memoizedState=j;else{c=C.next;var K=B=null,ee=null,ue=c,pe=!1;do{var ve=ue.lane&-536870913;if(ve!==ue.lane?(rt&ve)===ve:(Pa&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===uc&&(pe=!0);else if((Pa&ce)===ce){ue=ue.next,ce===uc&&(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?(K=ee=ve,B=j):ee=ee.next=ve,Fe.lanes|=ce,Wo|=ce;ve=ue.action,Cl&&p(j,ve),j=ue.hasEagerState?ue.eagerState:p(j,ve)}else ce={lane:ve,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},ee===null?(K=ee=ce,B=j):ee=ee.next=ce,Fe.lanes|=ve,Wo|=ve;ue=ue.next}while(ue!==null&&ue!==c);if(ee===null?B=j:ee.next=K,!Ar(j,s.memoizedState)&&(dn=!0,pe&&(p=cc,p!==null)))throw p;s.memoizedState=j,s.baseState=B,s.baseQueue=ee,v.lastRenderedState=j}return C===null&&(v.lanes=0),[s.memoizedState,v.dispatch]}function d1(s){var c=ln(),p=c.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=s;var v=p.dispatch,C=p.pending,j=c.memoizedState;if(C!==null){p.pending=null;var B=C=C.next;do j=s(j,B.action),B=B.next;while(B!==C);Ar(j,c.memoizedState)||(dn=!0),c.memoizedState=j,c.baseQueue===null&&(c.baseState=j),p.lastRenderedState=j}return[j,v]}function ND(s,c,p){var v=Fe,C=ln(),j=st;if(j){if(p===void 0)throw Error(r(407));p=p()}else p=c();var B=!Ar((Tt||C).memoizedState,p);if(B&&(C.memoizedState=p,dn=!0),C=C.queue,m1(PD.bind(null,v,C,s),[s]),C.getSnapshot!==c||B||fn!==null&&fn.memoizedState.tag&1){if(v.flags|=2048,gc(9,{destroy:void 0},RD.bind(null,v,C,p,c),null),Rt===null)throw Error(r(349));j||(Pa&127)!==0||MD(v,c,p)}return p}function MD(s,c,p){s.flags|=16384,s={getSnapshot:c,value:p},c=Fe.updateQueue,c===null?(c=Gg(),Fe.updateQueue=c,c.stores=[s]):(p=c.stores,p===null?c.stores=[s]:p.push(s))}function RD(s,c,p,v){c.value=p,c.getSnapshot=v,kD(c)&&DD(s)}function PD(s,c,p){return p(function(){kD(c)&&DD(s)})}function kD(s){var c=s.getSnapshot;s=s.value;try{var p=c();return!Ar(s,p)}catch{return!0}}function DD(s){var c=yl(s,2);c!==null&&gr(c,s,2)}function h1(s){var c=er();if(typeof s=="function"){var p=s;if(s=p(),Cl){Ki(!0);try{p()}finally{Ki(!1)}}}return c.memoizedState=c.baseState=s,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:s},c}function ID(s,c,p,v){return s.baseState=p,f1(s,Tt,typeof v=="function"?v:ka)}function fre(s,c,p,v,C){if(Qg(s))throw Error(r(485));if(s=c.action,s!==null){var j={payload:C,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){j.listeners.push(B)}};L.T!==null?p(!0):j.isTransition=!1,v(j),p=c.pending,p===null?(j.next=c.pending=j,LD(c,j)):(j.next=p.next,c.pending=p.next=j)}}function LD(s,c){var p=c.action,v=c.payload,C=s.state;if(c.isTransition){var j=L.T,B={};L.T=B;try{var K=p(C,v),ee=L.S;ee!==null&&ee(B,K),$D(s,c,K)}catch(ue){p1(s,c,ue)}finally{j!==null&&B.types!==null&&(j.types=B.types),L.T=j}}else try{j=p(C,v),$D(s,c,j)}catch(ue){p1(s,c,ue)}}function $D(s,c,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(v){BD(s,c,v)},function(v){return p1(s,c,v)}):BD(s,c,p)}function BD(s,c,p){c.status="fulfilled",c.value=p,qD(c),s.state=p,c=s.pending,c!==null&&(p=c.next,p===c?s.pending=null:(p=p.next,c.next=p,LD(s,p)))}function p1(s,c,p){var v=s.pending;if(s.pending=null,v!==null){v=v.next;do c.status="rejected",c.reason=p,qD(c),c=c.next;while(c!==v)}s.action=null}function qD(s){s=s.listeners;for(var c=0;c<s.length;c++)(0,s[c])()}function zD(s,c){return c}function VD(s,c){if(st){var p=Rt.formState;if(p!==null){e:{var v=Fe;if(st){if(qt){t:{for(var C=qt,j=Qr;C.nodeType!==8;){if(!j){C=null;break t}if(C=Jr(C.nextSibling),C===null){C=null;break t}}j=C.data,C=j==="F!"||j==="F"?C:null}if(C){qt=Jr(C.nextSibling),v=C.data==="F!";break e}}Bo(v)}v=!1}v&&(c=p[0])}}return p=er(),p.memoizedState=p.baseState=c,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zD,lastRenderedState:c},p.queue=v,p=sI.bind(null,Fe,v),v.dispatch=p,v=h1(!1),j=x1.bind(null,Fe,!1,v.queue),v=er(),C={state:c,dispatch:null,action:s,pending:null},v.queue=C,p=fre.bind(null,Fe,C,j,p),C.dispatch=p,v.memoizedState=s,[c,p,!1]}function FD(s){var c=ln();return UD(c,Tt,s)}function UD(s,c,p){if(c=f1(s,c,zD)[0],s=Wg(ka)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var v=sh(c)}catch(B){throw B===fc?$g:B}else v=c;c=ln();var C=c.queue,j=C.dispatch;return p!==c.memoizedState&&(Fe.flags|=2048,gc(9,{destroy:void 0},dre.bind(null,C,p),null)),[v,j,s]}function dre(s,c){s.action=c}function HD(s){var c=ln(),p=Tt;if(p!==null)return UD(c,p,s);ln(),c=c.memoizedState,p=ln();var v=p.queue.dispatch;return p.memoizedState=s,[c,v,!1]}function gc(s,c,p,v){return s={tag:s,create:p,deps:v,inst:c,next:null},c=Fe.updateQueue,c===null&&(c=Gg(),Fe.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 GD(){return ln().memoizedState}function Yg(s,c,p,v){var C=er();Fe.flags|=s,C.memoizedState=gc(1|c,{destroy:void 0},p,v===void 0?null:v)}function Xg(s,c,p,v){var C=ln();v=v===void 0?null:v;var j=C.memoizedState.inst;Tt!==null&&v!==null&&a1(v,Tt.memoizedState.deps)?C.memoizedState=gc(c,j,p,v):(Fe.flags|=s,C.memoizedState=gc(1|c,j,p,v))}function KD(s,c){Yg(8390656,8,s,c)}function m1(s,c){Xg(2048,8,s,c)}function hre(s){Fe.flags|=4;var c=Fe.updateQueue;if(c===null)c=Gg(),Fe.updateQueue=c,c.events=[s];else{var p=c.events;p===null?c.events=[s]:p.push(s)}}function WD(s){var c=ln().memoizedState;return hre({ref:c,nextImpl:s}),function(){if((gt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}function YD(s,c){return Xg(4,2,s,c)}function XD(s,c){return Xg(4,4,s,c)}function QD(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 ZD(s,c,p){p=p!=null?p.concat([s]):null,Xg(4,4,QD.bind(null,c,s),p)}function g1(){}function JD(s,c){var p=ln();c=c===void 0?null:c;var v=p.memoizedState;return c!==null&&a1(c,v[1])?v[0]:(p.memoizedState=[s,c],s)}function eI(s,c){var p=ln();c=c===void 0?null:c;var v=p.memoizedState;if(c!==null&&a1(c,v[1]))return v[0];if(v=s(),Cl){Ki(!0);try{s()}finally{Ki(!1)}}return p.memoizedState=[v,c],v}function v1(s,c,p){return p===void 0||(Pa&1073741824)!==0&&(rt&261930)===0?s.memoizedState=c:(s.memoizedState=p,s=tL(),Fe.lanes|=s,Wo|=s,p)}function tI(s,c,p,v){return Ar(p,c)?p:hc.current!==null?(s=v1(s,p,v),Ar(s,c)||(dn=!0),s):(Pa&42)===0||(Pa&1073741824)!==0&&(rt&261930)===0?(dn=!0,s.memoizedState=p):(s=tL(),Fe.lanes|=s,Wo|=s,c)}function nI(s,c,p,v,C){var j=z.p;z.p=j!==0&&8>j?j:8;var B=L.T,K={};L.T=K,x1(s,!1,c,p);try{var ee=C(),ue=L.S;if(ue!==null&&ue(K,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var pe=lre(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=j,B!==null&&K.types!==null&&(B.types=K.types),L.T=B}}function pre(){}function y1(s,c,p,v){if(s.tag!==5)throw Error(r(476));var C=rI(s).queue;nI(s,C,c,H,p===null?pre:function(){return iI(s),p(v)})}function rI(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:ka,lastRenderedState:H},next:null};var p={};return c.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ka,lastRenderedState:p},next:null},s.memoizedState=c,s=s.alternate,s!==null&&(s.memoizedState=c),c}function iI(s){var c=rI(s);c.next===null&&(c=s.alternate.memoizedState),lh(s,c.next.queue,{},Mr())}function b1(){return In(Ah)}function aI(){return ln().memoizedState}function oI(){return ln().memoizedState}function mre(s){for(var c=s.return;c!==null;){switch(c.tag){case 24:case 3:var p=Mr();s=Vo(p);var v=Fo(c,s,p);v!==null&&(gr(v,c,p),rh(v,c,p)),c={cache:Ww()},s.payload=c;return}c=c.return}}function gre(s,c,p){var v=Mr();p={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Qg(s)?lI(c,p):(p=Lw(s,c,p,v),p!==null&&(gr(p,s,v),uI(p,c,v)))}function sI(s,c,p){var v=Mr();lh(s,c,p,v)}function lh(s,c,p,v){var C={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Qg(s))lI(c,C);else{var j=s.alternate;if(s.lanes===0&&(j===null||j.lanes===0)&&(j=c.lastRenderedReducer,j!==null))try{var B=c.lastRenderedState,K=j(B,p);if(C.hasEagerState=!0,C.eagerState=K,Ar(K,B))return Mg(s,c,C,0),Rt===null&&Ng(),!1}catch{}finally{}if(p=Lw(s,c,C,v),p!==null)return gr(p,s,v),uI(p,c,v),!0}return!1}function x1(s,c,p,v){if(v={lane:2,revertLane:Z1(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},Qg(s)){if(c)throw Error(r(479))}else c=Lw(s,p,v,2),c!==null&&gr(c,s,2)}function Qg(s){var c=s.alternate;return s===Fe||c!==null&&c===Fe}function lI(s,c){pc=Ug=!0;var p=s.pending;p===null?c.next=c:(c.next=p.next,p.next=c),s.pending=c}function uI(s,c,p){if((p&4194048)!==0){var v=c.lanes;v&=s.pendingLanes,p|=v,c.lanes=p,cg(s,p)}}var uh={readContext:In,use:Kg,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 cI={readContext:In,use:Kg,useCallback:function(s,c){return er().memoizedState=[s,c===void 0?null:c],s},useContext:In,useEffect:KD,useImperativeHandle:function(s,c,p){p=p!=null?p.concat([s]):null,Yg(4194308,4,QD.bind(null,c,s),p)},useLayoutEffect:function(s,c){return Yg(4194308,4,s,c)},useInsertionEffect:function(s,c){Yg(4,2,s,c)},useMemo:function(s,c){var p=er();c=c===void 0?null:c;var v=s();if(Cl){Ki(!0);try{s()}finally{Ki(!1)}}return p.memoizedState=[v,c],v},useReducer:function(s,c,p){var v=er();if(p!==void 0){var C=p(c);if(Cl){Ki(!0);try{p(c)}finally{Ki(!1)}}}else C=c;return v.memoizedState=v.baseState=C,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:C},v.queue=s,s=s.dispatch=gre.bind(null,Fe,s),[v.memoizedState,s]},useRef:function(s){var c=er();return s={current:s},c.memoizedState=s},useState:function(s){s=h1(s);var c=s.queue,p=sI.bind(null,Fe,c);return c.dispatch=p,[s.memoizedState,p]},useDebugValue:g1,useDeferredValue:function(s,c){var p=er();return v1(p,s,c)},useTransition:function(){var s=h1(!1);return s=nI.bind(null,Fe,s.queue,!0,!1),er().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,c,p){var v=Fe,C=er();if(st){if(p===void 0)throw Error(r(407));p=p()}else{if(p=c(),Rt===null)throw Error(r(349));(rt&127)!==0||MD(v,c,p)}C.memoizedState=p;var j={value:p,getSnapshot:c};return C.queue=j,KD(PD.bind(null,v,j,s),[s]),v.flags|=2048,gc(9,{destroy:void 0},RD.bind(null,v,j,p,c),null),p},useId:function(){var s=er(),c=Rt.identifierPrefix;if(st){var p=Xi,v=Yi;p=(v&~(1<<32-Jn(v)-1)).toString(32)+p,c="_"+c+"R_"+p,p=Hg++,0<p&&(c+="H"+p.toString(32)),c+="_"}else p=ure++,c="_"+c+"r_"+p.toString(32)+"_";return s.memoizedState=c},useHostTransitionStatus:b1,useFormState:VD,useActionState:VD,useOptimistic:function(s){var c=er();c.memoizedState=c.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=p,c=x1.bind(null,Fe,!0,p),p.dispatch=c,[s,c]},useMemoCache:c1,useCacheRefresh:function(){return er().memoizedState=mre.bind(null,Fe)},useEffectEvent:function(s){var c=er(),p={impl:s};return c.memoizedState=p,function(){if((gt&2)!==0)throw Error(r(440));return p.impl.apply(void 0,arguments)}}},w1={readContext:In,use:Kg,useCallback:JD,useContext:In,useEffect:m1,useImperativeHandle:ZD,useInsertionEffect:YD,useLayoutEffect:XD,useMemo:eI,useReducer:Wg,useRef:GD,useState:function(){return Wg(ka)},useDebugValue:g1,useDeferredValue:function(s,c){var p=ln();return tI(p,Tt.memoizedState,s,c)},useTransition:function(){var s=Wg(ka)[0],c=ln().memoizedState;return[typeof s=="boolean"?s:sh(s),c]},useSyncExternalStore:ND,useId:aI,useHostTransitionStatus:b1,useFormState:FD,useActionState:FD,useOptimistic:function(s,c){var p=ln();return ID(p,Tt,s,c)},useMemoCache:c1,useCacheRefresh:oI};w1.useEffectEvent=WD;var fI={readContext:In,use:Kg,useCallback:JD,useContext:In,useEffect:m1,useImperativeHandle:ZD,useInsertionEffect:YD,useLayoutEffect:XD,useMemo:eI,useReducer:d1,useRef:GD,useState:function(){return d1(ka)},useDebugValue:g1,useDeferredValue:function(s,c){var p=ln();return Tt===null?v1(p,s,c):tI(p,Tt.memoizedState,s,c)},useTransition:function(){var s=d1(ka)[0],c=ln().memoizedState;return[typeof s=="boolean"?s:sh(s),c]},useSyncExternalStore:ND,useId:aI,useHostTransitionStatus:b1,useFormState:HD,useActionState:HD,useOptimistic:function(s,c){var p=ln();return Tt!==null?ID(p,Tt,s,c):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:c1,useCacheRefresh:oI};fI.useEffectEvent=WD;function S1(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 _1={enqueueSetState:function(s,c,p){s=s._reactInternals;var v=Mr(),C=Vo(v);C.payload=c,p!=null&&(C.callback=p),c=Fo(s,C,v),c!==null&&(gr(c,s,v),rh(c,s,v))},enqueueReplaceState:function(s,c,p){s=s._reactInternals;var v=Mr(),C=Vo(v);C.tag=1,C.payload=c,p!=null&&(C.callback=p),c=Fo(s,C,v),c!==null&&(gr(c,s,v),rh(c,s,v))},enqueueForceUpdate:function(s,c){s=s._reactInternals;var p=Mr(),v=Vo(p);v.tag=2,c!=null&&(v.callback=c),c=Fo(s,v,p),c!==null&&(gr(c,s,p),rh(c,s,p))}};function dI(s,c,p,v,C,j,B){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(v,j,B):c.prototype&&c.prototype.isPureReactComponent?!Yd(p,v)||!Yd(C,j):!0}function hI(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&&_1.enqueueReplaceState(c,c.state,null)}function Ol(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 C in s)p[C]===void 0&&(p[C]=s[C])}return p}function pI(s){jg(s)}function mI(s){console.error(s)}function gI(s){jg(s)}function Zg(s,c){try{var p=s.onUncaughtError;p(c.value,{componentStack:c.stack})}catch(v){setTimeout(function(){throw v})}}function vI(s,c,p){try{var v=s.onCaughtError;v(p.value,{componentStack:p.stack,errorBoundary:c.tag===1?c.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function E1(s,c,p){return p=Vo(p),p.tag=3,p.payload={element:null},p.callback=function(){Zg(s,c)},p}function yI(s){return s=Vo(s),s.tag=3,s}function bI(s,c,p,v){var C=p.type.getDerivedStateFromError;if(typeof C=="function"){var j=v.value;s.payload=function(){return C(j)},s.callback=function(){vI(c,p,v)}}var B=p.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(s.callback=function(){vI(c,p,v),typeof C!="function"&&(Yo===null?Yo=new Set([this]):Yo.add(this));var K=v.stack;this.componentDidCatch(v.value,{componentStack:K!==null?K:""})})}function vre(s,c,p,v,C){if(p.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(c=p.alternate,c!==null&&lc(c,p,C,!0),p=Cr.current,p!==null){switch(p.tag){case 31:case 13:return Zr===null?cv():p.alternate===null&&tn===0&&(tn=3),p.flags&=-257,p.flags|=65536,p.lanes=C,v===Bg?p.flags|=16384:(c=p.updateQueue,c===null?p.updateQueue=new Set([v]):c.add(v),Y1(s,v,C)),!1;case 22:return p.flags|=65536,v===Bg?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)),Y1(s,v,C)),!1}throw Error(r(435,p.tag))}return Y1(s,v,C),cv(),!1}if(st)return c=Cr.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=C,v!==Fw&&(s=Error(r(422),{cause:v}),Zd(Wr(s,p)))):(v!==Fw&&(c=Error(r(423),{cause:v}),Zd(Wr(c,p))),s=s.current.alternate,s.flags|=65536,C&=-C,s.lanes|=C,v=Wr(v,p),C=E1(s.stateNode,v,C),e1(s,C),tn!==4&&(tn=2)),!1;var j=Error(r(520),{cause:v});if(j=Wr(j,p),vh===null?vh=[j]:vh.push(j),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=C&-C,p.lanes|=s,s=E1(p.stateNode,v,s),e1(p,s),!1;case 1:if(c=p.type,j=p.stateNode,(p.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(Yo===null||!Yo.has(j))))return p.flags|=65536,C&=-C,p.lanes|=C,C=yI(C),bI(C,s,p,v),e1(p,C),!1}p=p.return}while(p!==null);return!1}var A1=Error(r(461)),dn=!1;function Ln(s,c,p,v){c.child=s===null?_D(c,null,p,v):Tl(c,s.child,p,v)}function xI(s,c,p,v,C){p=p.render;var j=c.ref;if("ref"in v){var B={};for(var K in v)K!=="ref"&&(B[K]=v[K])}else B=v;return Sl(c),v=o1(s,c,p,B,j,C),K=s1(),s!==null&&!dn?(l1(s,c,C),Da(s,c,C)):(st&&K&&zw(c),c.flags|=1,Ln(s,c,v,C),c.child)}function wI(s,c,p,v,C){if(s===null){var j=p.type;return typeof j=="function"&&!$w(j)&&j.defaultProps===void 0&&p.compare===null?(c.tag=15,c.type=j,SI(s,c,j,v,C)):(s=Pg(p.type,null,v,c,c.mode,C),s.ref=c.ref,s.return=c,c.child=s)}if(j=s.child,!P1(s,C)){var B=j.memoizedProps;if(p=p.compare,p=p!==null?p:Yd,p(B,v)&&s.ref===c.ref)return Da(s,c,C)}return c.flags|=1,s=ja(j,v),s.ref=c.ref,s.return=c,c.child=s}function SI(s,c,p,v,C){if(s!==null){var j=s.memoizedProps;if(Yd(j,v)&&s.ref===c.ref)if(dn=!1,c.pendingProps=v=j,P1(s,C))(s.flags&131072)!==0&&(dn=!0);else return c.lanes=s.lanes,Da(s,c,C)}return T1(s,c,p,v,C)}function _I(s,c,p,v){var C=v.children,j=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(j=j!==null?j.baseLanes|p:p,s!==null){for(v=c.child=s.child,C=0;v!==null;)C=C|v.lanes|v.childLanes,v=v.sibling;v=C&~j}else v=0,c.child=null;return EI(s,c,j,p,v)}if((p&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},s!==null&&Lg(c,j!==null?j.cachePool:null),j!==null?TD(c,j):n1(),CD(c);else return v=c.lanes=536870912,EI(s,c,j!==null?j.baseLanes|p:p,p,v)}else j!==null?(Lg(c,j.cachePool),TD(c,j),Ho(),c.memoizedState=null):(s!==null&&Lg(c,null),n1(),Ho());return Ln(s,c,C,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 EI(s,c,p,v,C){var j=Xw();return j=j===null?null:{parent:cn._currentValue,pool:j},c.memoizedState={baseLanes:p,cachePool:j},s!==null&&Lg(c,null),n1(),CD(c),s!==null&&lc(s,c,v,!0),c.childLanes=C,null}function Jg(s,c){return c=tv({mode:c.mode,children:c.children},s.mode),c.ref=s.ref,s.child=c,c.return=s,c}function AI(s,c,p){return Tl(c,s.child,null,p),s=Jg(c,c.pendingProps),s.flags|=2,Or(c),c.memoizedState=null,s}function yre(s,c,p){var v=c.pendingProps,C=(c.flags&128)!==0;if(c.flags&=-129,s===null){if(st){if(v.mode==="hidden")return s=Jg(c,v),c.lanes=536870912,ch(null,s);if(i1(c),(s=qt)?(s=LL(s,Qr),s=s!==null&&s.data==="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:Lo!==null?{id:Yi,overflow:Xi}:null,retryLane:536870912,hydrationErrors:null},p=lD(s),p.return=c,c.child=p,Dn=c,qt=null)):s=null,s===null)throw Bo(c);return c.lanes=536870912,null}return Jg(c,v)}var j=s.memoizedState;if(j!==null){var B=j.dehydrated;if(i1(c),C)if(c.flags&256)c.flags&=-257,c=AI(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||lc(s,c,p,!1),C=(p&s.childLanes)!==0,dn||C){if(v=Rt,v!==null&&(B=fg(v,p),B!==0&&B!==j.retryLane))throw j.retryLane=B,yl(s,B),gr(v,s,B),A1;cv(),c=AI(s,c,p)}else s=j.treeContext,qt=Jr(B.nextSibling),Dn=c,st=!0,$o=null,Qr=!1,s!==null&&fD(c,s),c=Jg(c,v),c.flags|=4096;return c}return s=ja(s.child,{mode:v.mode,children:v.children}),s.ref=c.ref,c.child=s,s.return=c,s}function ev(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 T1(s,c,p,v,C){return Sl(c),p=o1(s,c,p,v,void 0,C),v=s1(),s!==null&&!dn?(l1(s,c,C),Da(s,c,C)):(st&&v&&zw(c),c.flags|=1,Ln(s,c,p,C),c.child)}function TI(s,c,p,v,C,j){return Sl(c),c.updateQueue=null,p=jD(c,v,p,C),OD(s),v=s1(),s!==null&&!dn?(l1(s,c,j),Da(s,c,j)):(st&&v&&zw(c),c.flags|=1,Ln(s,c,p,j),c.child)}function CI(s,c,p,v,C){if(Sl(c),c.stateNode===null){var j=ic,B=p.contextType;typeof B=="object"&&B!==null&&(j=In(B)),j=new p(v,j),c.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=_1,c.stateNode=j,j._reactInternals=c,j=c.stateNode,j.props=v,j.state=c.memoizedState,j.refs={},Zw(c),B=p.contextType,j.context=typeof B=="object"&&B!==null?In(B):ic,j.state=c.memoizedState,B=p.getDerivedStateFromProps,typeof B=="function"&&(S1(c,p,B,v),j.state=c.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(B=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),B!==j.state&&_1.enqueueReplaceState(j,j.state,null),ah(c,v,j,C),ih(),j.state=c.memoizedState),typeof j.componentDidMount=="function"&&(c.flags|=4194308),v=!0}else if(s===null){j=c.stateNode;var K=c.memoizedProps,ee=Ol(p,K);j.props=ee;var ue=j.context,pe=p.contextType;B=ic,typeof pe=="object"&&pe!==null&&(B=In(pe));var ve=p.getDerivedStateFromProps;pe=typeof ve=="function"||typeof j.getSnapshotBeforeUpdate=="function",K=c.pendingProps!==K,pe||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(K||ue!==B)&&hI(c,j,v,B),zo=!1;var ce=c.memoizedState;j.state=ce,ah(c,v,j,C),ih(),ue=c.memoizedState,K||ce!==ue||zo?(typeof ve=="function"&&(S1(c,p,ve,v),ue=c.memoizedState),(ee=zo||dI(c,p,ee,v,ce,ue,B))?(pe||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(c.flags|=4194308)):(typeof j.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=v,c.memoizedState=ue),j.props=v,j.state=ue,j.context=B,v=ee):(typeof j.componentDidMount=="function"&&(c.flags|=4194308),v=!1)}else{j=c.stateNode,Jw(s,c),B=c.memoizedProps,pe=Ol(p,B),j.props=pe,ve=c.pendingProps,ce=j.context,ue=p.contextType,ee=ic,typeof ue=="object"&&ue!==null&&(ee=In(ue)),K=p.getDerivedStateFromProps,(ue=typeof K=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(B!==ve||ce!==ee)&&hI(c,j,v,ee),zo=!1,ce=c.memoizedState,j.state=ce,ah(c,v,j,C),ih();var de=c.memoizedState;B!==ve||ce!==de||zo||s!==null&&s.dependencies!==null&&Dg(s.dependencies)?(typeof K=="function"&&(S1(c,p,K,v),de=c.memoizedState),(pe=zo||dI(c,p,pe,v,ce,de,ee)||s!==null&&s.dependencies!==null&&Dg(s.dependencies))?(ue||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(v,de,ee),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(v,de,ee)),typeof j.componentDidUpdate=="function"&&(c.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof j.componentDidUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=1024),c.memoizedProps=v,c.memoizedState=de),j.props=v,j.state=de,j.context=ee,v=pe):(typeof j.componentDidUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=1024),v=!1)}return j=v,ev(s,c),v=(c.flags&128)!==0,j||v?(j=c.stateNode,p=v&&typeof p.getDerivedStateFromError!="function"?null:j.render(),c.flags|=1,s!==null&&v?(c.child=Tl(c,s.child,null,C),c.child=Tl(c,null,p,C)):Ln(s,c,p,C),c.memoizedState=j.state,s=c.child):s=Da(s,c,C),s}function OI(s,c,p,v){return xl(),c.flags|=256,Ln(s,c,p,v),c.child}var C1={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function O1(s){return{baseLanes:s,cachePool:vD()}}function j1(s,c,p){return s=s!==null?s.childLanes&~p:0,c&&(s|=Nr),s}function jI(s,c,p){var v=c.pendingProps,C=!1,j=(c.flags&128)!==0,B;if((B=j)||(B=s!==null&&s.memoizedState===null?!1:(sn.current&2)!==0),B&&(C=!0,c.flags&=-129),B=(c.flags&32)!==0,c.flags&=-33,s===null){if(st){if(C?Uo(c):Ho(),(s=qt)?(s=LL(s,Qr),s=s!==null&&s.data!=="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:Lo!==null?{id:Yi,overflow:Xi}:null,retryLane:536870912,hydrationErrors:null},p=lD(s),p.return=c,c.child=p,Dn=c,qt=null)):s=null,s===null)throw Bo(c);return fS(s)?c.lanes=32:c.lanes=536870912,null}var K=v.children;return v=v.fallback,C?(Ho(),C=c.mode,K=tv({mode:"hidden",children:K},C),v=bl(v,C,p,null),K.return=c,v.return=c,K.sibling=v,c.child=K,v=c.child,v.memoizedState=O1(p),v.childLanes=j1(s,B,p),c.memoizedState=C1,ch(null,v)):(Uo(c),N1(c,K))}var ee=s.memoizedState;if(ee!==null&&(K=ee.dehydrated,K!==null)){if(j)c.flags&256?(Uo(c),c.flags&=-257,c=M1(s,c,p)):c.memoizedState!==null?(Ho(),c.child=s.child,c.flags|=128,c=null):(Ho(),K=v.fallback,C=c.mode,v=tv({mode:"visible",children:v.children},C),K=bl(K,C,p,null),K.flags|=2,v.return=c,K.return=c,v.sibling=K,c.child=v,Tl(c,s.child,null,p),v=c.child,v.memoizedState=O1(p),v.childLanes=j1(s,B,p),c.memoizedState=C1,c=ch(null,v));else if(Uo(c),fS(K)){if(B=K.nextSibling&&K.nextSibling.dataset,B)var ue=B.dgst;B=ue,v=Error(r(419)),v.stack="",v.digest=B,Zd({value:v,source:null,stack:null}),c=M1(s,c,p)}else if(dn||lc(s,c,p,!1),B=(p&s.childLanes)!==0,dn||B){if(B=Rt,B!==null&&(v=fg(B,p),v!==0&&v!==ee.retryLane))throw ee.retryLane=v,yl(s,v),gr(B,s,v),A1;cS(K)||cv(),c=M1(s,c,p)}else cS(K)?(c.flags|=192,c.child=s.child,c=null):(s=ee.treeContext,qt=Jr(K.nextSibling),Dn=c,st=!0,$o=null,Qr=!1,s!==null&&fD(c,s),c=N1(c,v.children),c.flags|=4096);return c}return C?(Ho(),K=v.fallback,C=c.mode,ee=s.child,ue=ee.sibling,v=ja(ee,{mode:"hidden",children:v.children}),v.subtreeFlags=ee.subtreeFlags&65011712,ue!==null?K=ja(ue,K):(K=bl(K,C,p,null),K.flags|=2),K.return=c,v.return=c,v.sibling=K,c.child=v,ch(null,v),v=c.child,K=s.child.memoizedState,K===null?K=O1(p):(C=K.cachePool,C!==null?(ee=cn._currentValue,C=C.parent!==ee?{parent:ee,pool:ee}:C):C=vD(),K={baseLanes:K.baseLanes|p,cachePool:C}),v.memoizedState=K,v.childLanes=j1(s,B,p),c.memoizedState=C1,ch(s.child,v)):(Uo(c),p=s.child,s=p.sibling,p=ja(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 N1(s,c){return c=tv({mode:"visible",children:c},s.mode),c.return=s,s.child=c}function tv(s,c){return s=Tr(22,s,null,c),s.lanes=0,s}function M1(s,c,p){return Tl(c,s.child,null,p),s=N1(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function NI(s,c,p){s.lanes|=c;var v=s.alternate;v!==null&&(v.lanes|=c),Gw(s.return,c,p)}function R1(s,c,p,v,C,j){var B=s.memoizedState;B===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:v,tail:p,tailMode:C,treeForkCount:j}:(B.isBackwards=c,B.rendering=null,B.renderingStartTime=0,B.last=v,B.tail=p,B.tailMode=C,B.treeForkCount=j)}function MI(s,c,p){var v=c.pendingProps,C=v.revealOrder,j=v.tail;v=v.children;var B=sn.current,K=(B&2)!==0;if(K?(B=B&1|2,c.flags|=128):B&=1,X(sn,B),Ln(s,c,v,p),v=st?Qd:0,!K&&s!==null&&(s.flags&128)!==0)e:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&NI(s,p,c);else if(s.tag===19)NI(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(C){case"forwards":for(p=c.child,C=null;p!==null;)s=p.alternate,s!==null&&Fg(s)===null&&(C=p),p=p.sibling;p=C,p===null?(C=c.child,c.child=null):(C=p.sibling,p.sibling=null),R1(c,!1,C,p,j,v);break;case"backwards":case"unstable_legacy-backwards":for(p=null,C=c.child,c.child=null;C!==null;){if(s=C.alternate,s!==null&&Fg(s)===null){c.child=C;break}s=C.sibling,C.sibling=p,p=C,C=s}R1(c,!0,p,null,j,v);break;case"together":R1(c,!1,null,null,void 0,v);break;default:c.memoizedState=null}return c.child}function Da(s,c,p){if(s!==null&&(c.dependencies=s.dependencies),Wo|=c.lanes,(p&c.childLanes)===0)if(s!==null){if(lc(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=ja(s,s.pendingProps),c.child=p,p.return=c;s.sibling!==null;)s=s.sibling,p=p.sibling=ja(s,s.pendingProps),p.return=c;p.sibling=null}return c.child}function P1(s,c){return(s.lanes&c)!==0?!0:(s=s.dependencies,!!(s!==null&&Dg(s)))}function bre(s,c,p){switch(c.tag){case 3:re(c,c.stateNode.containerInfo),qo(c,cn,s.memoizedState.cache),xl();break;case 27:case 5:fe(c);break;case 4:re(c,c.stateNode.containerInfo);break;case 10:qo(c,c.type,c.memoizedProps.value);break;case 31:if(c.memoizedState!==null)return c.flags|=128,i1(c),null;break;case 13:var v=c.memoizedState;if(v!==null)return v.dehydrated!==null?(Uo(c),c.flags|=128,null):(p&c.child.childLanes)!==0?jI(s,c,p):(Uo(c),s=Da(s,c,p),s!==null?s.sibling:null);Uo(c);break;case 19:var C=(s.flags&128)!==0;if(v=(p&c.childLanes)!==0,v||(lc(s,c,p,!1),v=(p&c.childLanes)!==0),C){if(v)return MI(s,c,p);c.flags|=128}if(C=c.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),X(sn,sn.current),v)break;return null;case 22:return c.lanes=0,_I(s,c,p,c.pendingProps);case 24:qo(c,cn,s.memoizedState.cache)}return Da(s,c,p)}function RI(s,c,p){if(s!==null)if(s.memoizedProps!==c.pendingProps)dn=!0;else{if(!P1(s,p)&&(c.flags&128)===0)return dn=!1,bre(s,c,p);dn=(s.flags&131072)!==0}else dn=!1,st&&(c.flags&1048576)!==0&&cD(c,Qd,c.index);switch(c.lanes=0,c.tag){case 16:e:{var v=c.pendingProps;if(s=El(c.elementType),c.type=s,typeof s=="function")$w(s)?(v=Ol(s,v),c.tag=1,c=CI(null,c,s,v,p)):(c.tag=0,c=T1(null,c,s,v,p));else{if(s!=null){var C=s.$$typeof;if(C===A){c.tag=11,c=xI(null,c,s,v,p);break e}else if(C===M){c.tag=14,c=wI(null,c,s,v,p);break e}}throw c=D(s)||s,Error(r(306,c,""))}}return c;case 0:return T1(s,c,c.type,c.pendingProps,p);case 1:return v=c.type,C=Ol(v,c.pendingProps),CI(s,c,v,C,p);case 3:e:{if(re(c,c.stateNode.containerInfo),s===null)throw Error(r(387));v=c.pendingProps;var j=c.memoizedState;C=j.element,Jw(s,c),ah(c,v,null,p);var B=c.memoizedState;if(v=B.cache,qo(c,cn,v),v!==j.cache&&Kw(c,[cn],p,!0),ih(),v=B.element,j.isDehydrated)if(j={element:v,isDehydrated:!1,cache:B.cache},c.updateQueue.baseState=j,c.memoizedState=j,c.flags&256){c=OI(s,c,v,p);break e}else if(v!==C){C=Wr(Error(r(424)),c),Zd(C),c=OI(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=Jr(s.firstChild),Dn=c,st=!0,$o=null,Qr=!0,p=_D(c,null,v,p),c.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(xl(),v===C){c=Da(s,c,p);break e}Ln(s,c,v,p)}c=c.child}return c;case 26:return ev(s,c),s===null?(p=FL(c.type,null,c.pendingProps,null))?c.memoizedState=p:st||(p=c.type,s=c.pendingProps,v=vv(Z.current).createElement(p),v[xn]=c,v[Hn]=s,$n(v,p,s),un(v),c.stateNode=v):c.memoizedState=FL(c.type,s.memoizedProps,c.pendingProps,s.memoizedState),null;case 27:return fe(c),s===null&&st&&(v=c.stateNode=qL(c.type,c.pendingProps,Z.current),Dn=c,Qr=!0,C=qt,Jo(c.type)?(dS=C,qt=Jr(v.firstChild)):qt=C),Ln(s,c,c.pendingProps.children,p),ev(s,c),s===null&&(c.flags|=4194304),c.child;case 5:return s===null&&st&&((C=v=qt)&&(v=Yre(v,c.type,c.pendingProps,Qr),v!==null?(c.stateNode=v,Dn=c,qt=Jr(v.firstChild),Qr=!1,C=!0):C=!1),C||Bo(c)),fe(c),C=c.type,j=c.pendingProps,B=s!==null?s.memoizedProps:null,v=j.children,sS(C,j)?v=null:B!==null&&sS(C,B)&&(c.flags|=32),c.memoizedState!==null&&(C=o1(s,c,cre,null,null,p),Ah._currentValue=C),ev(s,c),Ln(s,c,v,p),c.child;case 6:return s===null&&st&&((s=p=qt)&&(p=Xre(p,c.pendingProps,Qr),p!==null?(c.stateNode=p,Dn=c,qt=null,s=!0):s=!1),s||Bo(c)),null;case 13:return jI(s,c,p);case 4:return re(c,c.stateNode.containerInfo),v=c.pendingProps,s===null?c.child=Tl(c,null,v,p):Ln(s,c,v,p),c.child;case 11:return xI(s,c,c.type,c.pendingProps,p);case 7:return Ln(s,c,c.pendingProps,p),c.child;case 8:return Ln(s,c,c.pendingProps.children,p),c.child;case 12:return Ln(s,c,c.pendingProps.children,p),c.child;case 10:return v=c.pendingProps,qo(c,c.type,v.value),Ln(s,c,v.children,p),c.child;case 9:return C=c.type._context,v=c.pendingProps.children,Sl(c),C=In(C),v=v(C),c.flags|=1,Ln(s,c,v,p),c.child;case 14:return wI(s,c,c.type,c.pendingProps,p);case 15:return SI(s,c,c.type,c.pendingProps,p);case 19:return MI(s,c,p);case 31:return yre(s,c,p);case 22:return _I(s,c,p,c.pendingProps);case 24:return Sl(c),v=In(cn),s===null?(C=Xw(),C===null&&(C=Rt,j=Ww(),C.pooledCache=j,j.refCount++,j!==null&&(C.pooledCacheLanes|=p),C=j),c.memoizedState={parent:v,cache:C},Zw(c),qo(c,cn,C)):((s.lanes&p)!==0&&(Jw(s,c),ah(c,null,null,p),ih()),C=s.memoizedState,j=c.memoizedState,C.parent!==v?(C={parent:v,cache:v},c.memoizedState=C,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=C),qo(c,cn,v)):(v=j.cache,qo(c,cn,v),v!==C.cache&&Kw(c,[cn],p,!0))),Ln(s,c,c.pendingProps.children,p),c.child;case 29:throw c.pendingProps}throw Error(r(156,c.tag))}function Ia(s){s.flags|=4}function k1(s,c,p,v,C){if((c=(s.mode&32)!==0)&&(c=!1),c){if(s.flags|=16777216,(C&335544128)===C)if(s.stateNode.complete)s.flags|=8192;else if(aL())s.flags|=8192;else throw Al=Bg,Qw}else s.flags&=-16777217}function PI(s,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!WL(c))if(aL())s.flags|=8192;else throw Al=Bg,Qw}function nv(s,c){c!==null&&(s.flags|=4),s.flags&16384&&(c=s.tag!==22?lg():536870912,s.lanes|=c,xc|=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 C=s.child;C!==null;)p|=C.lanes|C.childLanes,v|=C.subtreeFlags&65011712,v|=C.flags&65011712,C.return=s,C=C.sibling;else for(C=s.child;C!==null;)p|=C.lanes|C.childLanes,v|=C.subtreeFlags,v|=C.flags,C.return=s,C=C.sibling;return s.subtreeFlags|=v,s.childLanes=p,c}function xre(s,c,p){var v=c.pendingProps;switch(Vw(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),Ra(cn),ne(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(sc(c)?Ia(c):s===null||s.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,Uw())),zt(c),null;case 26:var C=c.type,j=c.memoizedState;return s===null?(Ia(c),j!==null?(zt(c),PI(c,j)):(zt(c),k1(c,C,null,v,p))):j?j!==s.memoizedState?(Ia(c),zt(c),PI(c,j)):(zt(c),c.flags&=-16777217):(s=s.memoizedProps,s!==v&&Ia(c),zt(c),k1(c,C,s,v,p)),null;case 27:if(he(c),p=Z.current,C=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&Ia(c);else{if(!v){if(c.stateNode===null)throw Error(r(166));return zt(c),null}s=W.current,sc(c)?dD(c):(s=qL(C,v,p),c.stateNode=s,Ia(c))}return zt(c),null;case 5:if(he(c),C=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&Ia(c);else{if(!v){if(c.stateNode===null)throw Error(r(166));return zt(c),null}if(j=W.current,sc(c))dD(c);else{var B=vv(Z.current);switch(j){case 1:j=B.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:j=B.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":j=B.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":j=B.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":j=B.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof v.is=="string"?B.createElement("select",{is:v.is}):B.createElement("select"),v.multiple?j.multiple=!0:v.size&&(j.size=v.size);break;default:j=typeof v.is=="string"?B.createElement(C,{is:v.is}):B.createElement(C)}}j[xn]=c,j[Hn]=v;e:for(B=c.child;B!==null;){if(B.tag===5||B.tag===6)j.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=j;e:switch($n(j,C,v),C){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&Ia(c)}}return zt(c),k1(c,c.type,s===null?null:s.memoizedProps,c.pendingProps,p),null;case 6:if(s&&c.stateNode!=null)s.memoizedProps!==v&&Ia(c);else{if(typeof v!="string"&&c.stateNode===null)throw Error(r(166));if(s=Z.current,sc(c)){if(s=c.stateNode,p=c.memoizedProps,v=null,C=Dn,C!==null)switch(C.tag){case 27:case 5:v=C.memoizedProps}s[xn]=c,s=!!(s.nodeValue===p||v!==null&&v.suppressHydrationWarning===!0||jL(s.nodeValue,p)),s||Bo(c,!0)}else s=vv(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=sc(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 xl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;zt(c),s=!1}else p=Uw(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),s=!0;if(!s)return c.flags&256?(Or(c),c):(Or(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(C=sc(c),v!==null&&v.dehydrated!==null){if(s===null){if(!C)throw Error(r(318));if(C=c.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(r(317));C[xn]=c}else xl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;zt(c),C=!1}else C=Uw(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=C),C=!0;if(!C)return c.flags&256?(Or(c),c):(Or(c),null)}return Or(c),(c.flags&128)!==0?(c.lanes=p,c):(p=v!==null,s=s!==null&&s.memoizedState!==null,p&&(v=c.child,C=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(C=v.alternate.memoizedState.cachePool.pool),j=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(j=v.memoizedState.cachePool.pool),j!==C&&(v.flags|=2048)),p!==s&&p&&(c.child.flags|=8192),nv(c,c.updateQueue),zt(c),null);case 4:return ne(),s===null&&nS(c.stateNode.containerInfo),zt(c),null;case 10:return Ra(c.type),zt(c),null;case 19:if(F(sn),v=c.memoizedState,v===null)return zt(c),null;if(C=(c.flags&128)!==0,j=v.rendering,j===null)if(C)fh(v,!1);else{if(tn!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(j=Fg(s),j!==null){for(c.flags|=128,fh(v,!1),s=j.updateQueue,c.updateQueue=s,nv(c,s),c.subtreeFlags=0,s=p,p=c.child;p!==null;)sD(p,s),p=p.sibling;return X(sn,sn.current&1|2),st&&Na(c,v.treeForkCount),c.child}s=s.sibling}v.tail!==null&&At()>sv&&(c.flags|=128,C=!0,fh(v,!1),c.lanes=4194304)}else{if(!C)if(s=Fg(j),s!==null){if(c.flags|=128,C=!0,s=s.updateQueue,c.updateQueue=s,nv(c,s),fh(v,!0),v.tail===null&&v.tailMode==="hidden"&&!j.alternate&&!st)return zt(c),null}else 2*At()-v.renderingStartTime>sv&&p!==536870912&&(c.flags|=128,C=!0,fh(v,!1),c.lanes=4194304);v.isBackwards?(j.sibling=c.child,c.child=j):(s=v.last,s!==null?s.sibling=j:c.child=j,v.last=j)}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,C?p&1|2:p&1),st&&Na(c,v.treeForkCount),s):(zt(c),null);case 22:case 23:return Or(c),r1(),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&&nv(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(_l),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),c.memoizedState.cache!==p&&(c.flags|=2048),Ra(cn),zt(c),null;case 25:return null;case 30:return null}throw Error(r(156,c.tag))}function wre(s,c){switch(Vw(c),c.tag){case 1:return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return Ra(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(Or(c),c.alternate===null)throw Error(r(340));xl()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 13:if(Or(c),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(r(340));xl()}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 Ra(c.type),null;case 22:case 23:return Or(c),r1(),s!==null&&F(_l),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 24:return Ra(cn),null;case 25:return null;default:return null}}function kI(s,c){switch(Vw(c),c.tag){case 3:Ra(cn),ne();break;case 26:case 27:case 5:he(c);break;case 4:ne();break;case 31:c.memoizedState!==null&&Or(c);break;case 13:Or(c);break;case 19:F(sn);break;case 10:Ra(c.type);break;case 22:case 23:Or(c),r1(),s!==null&&F(_l);break;case 24:Ra(cn)}}function dh(s,c){try{var p=c.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var C=v.next;p=C;do{if((p.tag&s)===s){v=void 0;var j=p.create,B=p.inst;v=j(),B.destroy=v}p=p.next}while(p!==C)}}catch(K){St(c,c.return,K)}}function Go(s,c,p){try{var v=c.updateQueue,C=v!==null?v.lastEffect:null;if(C!==null){var j=C.next;v=j;do{if((v.tag&s)===s){var B=v.inst,K=B.destroy;if(K!==void 0){B.destroy=void 0,C=c;var ee=p,ue=K;try{ue()}catch(pe){St(C,ee,pe)}}}v=v.next}while(v!==j)}}catch(pe){St(c,c.return,pe)}}function DI(s){var c=s.updateQueue;if(c!==null){var p=s.stateNode;try{AD(c,p)}catch(v){St(s,s.return,v)}}}function II(s,c,p){p.props=Ol(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(v){St(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(C){St(s,c,C)}}function Qi(s,c){var p=s.ref,v=s.refCleanup;if(p!==null)if(typeof v=="function")try{v()}catch(C){St(s,c,C)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(C){St(s,c,C)}else p.current=null}function LI(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(C){St(s,s.return,C)}}function D1(s,c,p){try{var v=s.stateNode;Fre(v,s.type,p,c),v[Hn]=c}catch(C){St(s,s.return,C)}}function $I(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Jo(s.type)||s.tag===4}function I1(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||$I(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&&Jo(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 L1(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&&Jo(s.type)&&(p=s.stateNode,c=null),s=s.child,s!==null))for(L1(s,c,p),s=s.sibling;s!==null;)L1(s,c,p),s=s.sibling}function rv(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&&Jo(s.type)&&(p=s.stateNode),s=s.child,s!==null))for(rv(s,c,p),s=s.sibling;s!==null;)rv(s,c,p),s=s.sibling}function BI(s){var c=s.stateNode,p=s.memoizedProps;try{for(var v=s.type,C=c.attributes;C.length;)c.removeAttributeNode(C[0]);$n(c,v,p),c[xn]=s,c[Hn]=p}catch(j){St(s,s.return,j)}}var La=!1,hn=!1,$1=!1,qI=typeof WeakSet=="function"?WeakSet:Set,jn=null;function Sre(s,c){if(s=s.containerInfo,aS=Ev,s=Zk(s),Mw(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 C=v.anchorOffset,j=v.focusNode;v=v.focusOffset;try{p.nodeType,j.nodeType}catch{p=null;break e}var B=0,K=-1,ee=-1,ue=0,pe=0,ve=s,ce=null;t:for(;;){for(var de;ve!==p||C!==0&&ve.nodeType!==3||(K=B+C),ve!==j||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===C&&(K=B),ce===j&&++pe===v&&(ee=B),(de=ve.nextSibling)!==null)break;ve=ce,ce=ve.parentNode}ve=de}p=K===-1||ee===-1?null:{start:K,end:ee}}else p=null}p=p||{start:0,end:0}}else p=null;for(oS={focusedElem:s,selectionRange:p},Ev=!1,jn=c;jn!==null;)if(c=jn,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,jn=s;else for(;jn!==null;){switch(c=jn,j=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++)C=s[p],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&j!==null){s=void 0,p=c,C=j.memoizedProps,j=j.memoizedState,v=p.stateNode;try{var je=Ol(p.type,C);s=v.getSnapshotBeforeUpdate(je,j),v.__reactInternalSnapshotBeforeUpdate=s}catch(Le){St(p,p.return,Le)}}break;case 3:if((s&1024)!==0){if(s=c.stateNode.containerInfo,p=s.nodeType,p===9)uS(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":uS(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,jn=s;break}jn=c.return}}function zI(s,c,p){var v=p.flags;switch(p.tag){case 0:case 11:case 15:Ba(s,p),v&4&&dh(5,p);break;case 1:if(Ba(s,p),v&4)if(s=p.stateNode,c===null)try{s.componentDidMount()}catch(B){St(p,p.return,B)}else{var C=Ol(p.type,c.memoizedProps);c=c.memoizedState;try{s.componentDidUpdate(C,c,s.__reactInternalSnapshotBeforeUpdate)}catch(B){St(p,p.return,B)}}v&64&&DI(p),v&512&&hh(p,p.return);break;case 3:if(Ba(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{AD(s,c)}catch(B){St(p,p.return,B)}}break;case 27:c===null&&v&4&&BI(p);case 26:case 5:Ba(s,p),c===null&&v&4&&LI(p),v&512&&hh(p,p.return);break;case 12:Ba(s,p);break;case 31:Ba(s,p),v&4&&UI(s,p);break;case 13:Ba(s,p),v&4&&HI(s,p),v&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=Mre.bind(null,p),Qre(s,p))));break;case 22:if(v=p.memoizedState!==null||La,!v){c=c!==null&&c.memoizedState!==null||hn,C=La;var j=hn;La=v,(hn=c)&&!j?qa(s,p,(p.subtreeFlags&8772)!==0):Ba(s,p),La=C,hn=j}break;case 30:break;default:Ba(s,p)}}function VI(s){var c=s.alternate;c!==null&&(s.alternate=null,VI(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 Gt=null,dr=!1;function $a(s,c,p){for(p=p.child;p!==null;)FI(s,c,p),p=p.sibling}function FI(s,c,p){if(Zt&&typeof Zt.onCommitFiberUnmount=="function")try{Zt.onCommitFiberUnmount(Un,p)}catch{}switch(p.tag){case 26:hn||Qi(p,c),$a(s,c,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:hn||Qi(p,c);var v=Gt,C=dr;Jo(p.type)&&(Gt=p.stateNode,dr=!1),$a(s,c,p),Sh(p.stateNode),Gt=v,dr=C;break;case 5:hn||Qi(p,c);case 6:if(v=Gt,C=dr,Gt=null,$a(s,c,p),Gt=v,dr=C,Gt!==null)if(dr)try{(Gt.nodeType===9?Gt.body:Gt.nodeName==="HTML"?Gt.ownerDocument.body:Gt).removeChild(p.stateNode)}catch(j){St(p,c,j)}else try{Gt.removeChild(p.stateNode)}catch(j){St(p,c,j)}break;case 18:Gt!==null&&(dr?(s=Gt,DL(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),Oc(s)):DL(Gt,p.stateNode));break;case 4:v=Gt,C=dr,Gt=p.stateNode.containerInfo,dr=!0,$a(s,c,p),Gt=v,dr=C;break;case 0:case 11:case 14:case 15:Go(2,p,c),hn||Go(4,p,c),$a(s,c,p);break;case 1:hn||(Qi(p,c),v=p.stateNode,typeof v.componentWillUnmount=="function"&&II(p,c,v)),$a(s,c,p);break;case 21:$a(s,c,p);break;case 22:hn=(v=hn)||p.memoizedState!==null,$a(s,c,p),hn=v;break;default:$a(s,c,p)}}function UI(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Oc(s)}catch(p){St(c,c.return,p)}}}function HI(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Oc(s)}catch(p){St(c,c.return,p)}}function _re(s){switch(s.tag){case 31:case 13:case 19:var c=s.stateNode;return c===null&&(c=s.stateNode=new qI),c;case 22:return s=s.stateNode,c=s._retryCache,c===null&&(c=s._retryCache=new qI),c;default:throw Error(r(435,s.tag))}}function iv(s,c){var p=_re(s);c.forEach(function(v){if(!p.has(v)){p.add(v);var C=Rre.bind(null,s,v);v.then(C,C)}})}function hr(s,c){var p=c.deletions;if(p!==null)for(var v=0;v<p.length;v++){var C=p[v],j=s,B=c,K=B;e:for(;K!==null;){switch(K.tag){case 27:if(Jo(K.type)){Gt=K.stateNode,dr=!1;break e}break;case 5:Gt=K.stateNode,dr=!1;break e;case 3:case 4:Gt=K.stateNode.containerInfo,dr=!0;break e}K=K.return}if(Gt===null)throw Error(r(160));FI(j,B,C),Gt=null,dr=!1,j=C.alternate,j!==null&&(j.return=null),C.return=null}if(c.subtreeFlags&13886)for(c=c.child;c!==null;)GI(c,s),c=c.sibling}var wi=null;function GI(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&&(Go(3,s,s.return),dh(3,s),Go(5,s,s.return));break;case 1:hr(c,s),pr(s),v&512&&(hn||p===null||Qi(p,p.return)),v&64&&La&&(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 C=wi;if(hr(c,s),pr(s),v&512&&(hn||p===null||Qi(p,p.return)),v&4){var j=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,C=C.ownerDocument||C;t:switch(v){case"title":j=C.getElementsByTagName("title")[0],(!j||j[dl]||j[xn]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=C.createElement(v),C.head.insertBefore(j,C.querySelector("head > title"))),$n(j,v,p),j[xn]=s,un(j),v=j;break e;case"link":var B=GL("link","href",C).get(v+(p.href||""));if(B){for(var K=0;K<B.length;K++)if(j=B[K],j.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&j.getAttribute("rel")===(p.rel==null?null:p.rel)&&j.getAttribute("title")===(p.title==null?null:p.title)&&j.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){B.splice(K,1);break t}}j=C.createElement(v),$n(j,v,p),C.head.appendChild(j);break;case"meta":if(B=GL("meta","content",C).get(v+(p.content||""))){for(K=0;K<B.length;K++)if(j=B[K],j.getAttribute("content")===(p.content==null?null:""+p.content)&&j.getAttribute("name")===(p.name==null?null:p.name)&&j.getAttribute("property")===(p.property==null?null:p.property)&&j.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&j.getAttribute("charset")===(p.charSet==null?null:p.charSet)){B.splice(K,1);break t}}j=C.createElement(v),$n(j,v,p),C.head.appendChild(j);break;default:throw Error(r(468,v))}j[xn]=s,un(j),v=j}s.stateNode=v}else KL(C,s.type,s.stateNode);else s.stateNode=HL(C,v,s.memoizedProps);else j!==v?(j===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):j.count--,v===null?KL(C,s.type,s.stateNode):HL(C,v,s.memoizedProps)):v===null&&s.stateNode!==null&&D1(s,s.memoizedProps,p.memoizedProps)}break;case 27:hr(c,s),pr(s),v&512&&(hn||p===null||Qi(p,p.return)),p!==null&&v&4&&D1(s,s.memoizedProps,p.memoizedProps);break;case 5:if(hr(c,s),pr(s),v&512&&(hn||p===null||Qi(p,p.return)),s.flags&32){C=s.stateNode;try{Qu(C,"")}catch(je){St(s,s.return,je)}}v&4&&s.stateNode!=null&&(C=s.memoizedProps,D1(s,C,p!==null?p.memoizedProps:C)),v&1024&&($1=!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){St(s,s.return,je)}}break;case 3:if(xv=null,C=wi,wi=yv(c.containerInfo),hr(c,s),wi=C,pr(s),v&4&&p!==null&&p.memoizedState.isDehydrated)try{Oc(c.containerInfo)}catch(je){St(s,s.return,je)}$1&&($1=!1,KI(s));break;case 4:v=wi,wi=yv(s.stateNode.containerInfo),hr(c,s),pr(s),wi=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,iv(s,v)));break;case 13:hr(c,s),pr(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(ov=At()),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,iv(s,v)));break;case 22:C=s.memoizedState!==null;var ee=p!==null&&p.memoizedState!==null,ue=La,pe=hn;if(La=ue||C,hn=pe||ee,hr(c,s),hn=pe,La=ue,pr(s),v&8192)e:for(c=s.stateNode,c._visibility=C?c._visibility&-2:c._visibility|1,C&&(p===null||ee||La||hn||jl(s)),p=null,c=s;;){if(c.tag===5||c.tag===26){if(p===null){ee=p=c;try{if(j=ee.stateNode,C)B=j.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{K=ee.stateNode;var ve=ee.memoizedProps.style,ce=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;K.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(je){St(ee,ee.return,je)}}}else if(c.tag===6){if(p===null){ee=c;try{ee.stateNode.nodeValue=C?"":ee.memoizedProps}catch(je){St(ee,ee.return,je)}}}else if(c.tag===18){if(p===null){ee=c;try{var de=ee.stateNode;C?IL(de,!0):IL(ee.stateNode,!1)}catch(je){St(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,iv(s,p))));break;case 19:hr(c,s),pr(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,iv(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($I(v)){p=v;break}v=v.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var C=p.stateNode,j=I1(s);rv(s,j,C);break;case 5:var B=p.stateNode;p.flags&32&&(Qu(B,""),p.flags&=-33);var K=I1(s);rv(s,K,B);break;case 3:case 4:var ee=p.stateNode.containerInfo,ue=I1(s);L1(s,ue,ee);break;default:throw Error(r(161))}}catch(pe){St(s,s.return,pe)}s.flags&=-3}c&4096&&(s.flags&=-4097)}function KI(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var c=s;KI(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),s=s.sibling}}function Ba(s,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)zI(s,c.alternate,c),c=c.sibling}function jl(s){for(s=s.child;s!==null;){var c=s;switch(c.tag){case 0:case 11:case 14:case 15:Go(4,c,c.return),jl(c);break;case 1:Qi(c,c.return);var p=c.stateNode;typeof p.componentWillUnmount=="function"&&II(c,c.return,p),jl(c);break;case 27:Sh(c.stateNode);case 26:case 5:Qi(c,c.return),jl(c);break;case 22:c.memoizedState===null&&jl(c);break;case 30:jl(c);break;default:jl(c)}s=s.sibling}}function qa(s,c,p){for(p=p&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var v=c.alternate,C=s,j=c,B=j.flags;switch(j.tag){case 0:case 11:case 15:qa(C,j,p),dh(4,j);break;case 1:if(qa(C,j,p),v=j,C=v.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(ue){St(v,v.return,ue)}if(v=j,C=v.updateQueue,C!==null){var K=v.stateNode;try{var ee=C.shared.hiddenCallbacks;if(ee!==null)for(C.shared.hiddenCallbacks=null,C=0;C<ee.length;C++)ED(ee[C],K)}catch(ue){St(v,v.return,ue)}}p&&B&64&&DI(j),hh(j,j.return);break;case 27:BI(j);case 26:case 5:qa(C,j,p),p&&v===null&&B&4&&LI(j),hh(j,j.return);break;case 12:qa(C,j,p);break;case 31:qa(C,j,p),p&&B&4&&UI(C,j);break;case 13:qa(C,j,p),p&&B&4&&HI(C,j);break;case 22:j.memoizedState===null&&qa(C,j,p),hh(j,j.return);break;case 30:break;default:qa(C,j,p)}c=c.sibling}}function B1(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 q1(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 Si(s,c,p,v){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)WI(s,c,p,v),c=c.sibling}function WI(s,c,p,v){var C=c.flags;switch(c.tag){case 0:case 11:case 15:Si(s,c,p,v),C&2048&&dh(9,c);break;case 1:Si(s,c,p,v);break;case 3:Si(s,c,p,v),C&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(C&2048){Si(s,c,p,v),s=c.stateNode;try{var j=c.memoizedProps,B=j.id,K=j.onPostCommit;typeof K=="function"&&K(B,c.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(ee){St(c,c.return,ee)}}else Si(s,c,p,v);break;case 31:Si(s,c,p,v);break;case 13:Si(s,c,p,v);break;case 23:break;case 22:j=c.stateNode,B=c.alternate,c.memoizedState!==null?j._visibility&2?Si(s,c,p,v):ph(s,c):j._visibility&2?Si(s,c,p,v):(j._visibility|=2,vc(s,c,p,v,(c.subtreeFlags&10256)!==0||!1)),C&2048&&B1(B,c);break;case 24:Si(s,c,p,v),C&2048&&q1(c.alternate,c);break;default:Si(s,c,p,v)}}function vc(s,c,p,v,C){for(C=C&&((c.subtreeFlags&10256)!==0||!1),c=c.child;c!==null;){var j=s,B=c,K=p,ee=v,ue=B.flags;switch(B.tag){case 0:case 11:case 15:vc(j,B,K,ee,C),dh(8,B);break;case 23:break;case 22:var pe=B.stateNode;B.memoizedState!==null?pe._visibility&2?vc(j,B,K,ee,C):ph(j,B):(pe._visibility|=2,vc(j,B,K,ee,C)),C&&ue&2048&&B1(B.alternate,B);break;case 24:vc(j,B,K,ee,C),C&&ue&2048&&q1(B.alternate,B);break;default:vc(j,B,K,ee,C)}c=c.sibling}}function ph(s,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var p=s,v=c,C=v.flags;switch(v.tag){case 22:ph(p,v),C&2048&&B1(v.alternate,v);break;case 24:ph(p,v),C&2048&&q1(v.alternate,v);break;default:ph(p,v)}c=c.sibling}}var mh=8192;function yc(s,c,p){if(s.subtreeFlags&mh)for(s=s.child;s!==null;)YI(s,c,p),s=s.sibling}function YI(s,c,p){switch(s.tag){case 26:yc(s,c,p),s.flags&mh&&s.memoizedState!==null&&uie(p,wi,s.memoizedState,s.memoizedProps);break;case 5:yc(s,c,p);break;case 3:case 4:var v=wi;wi=yv(s.stateNode.containerInfo),yc(s,c,p),wi=v;break;case 22:s.memoizedState===null&&(v=s.alternate,v!==null&&v.memoizedState!==null?(v=mh,mh=16777216,yc(s,c,p),mh=v):yc(s,c,p));break;default:yc(s,c,p)}}function XI(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];jn=v,ZI(v,s)}XI(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)QI(s),s=s.sibling}function QI(s){switch(s.tag){case 0:case 11:case 15:gh(s),s.flags&2048&&Go(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,av(s)):gh(s);break;default:gh(s)}}function av(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];jn=v,ZI(v,s)}XI(s)}for(s=s.child;s!==null;){switch(c=s,c.tag){case 0:case 11:case 15:Go(8,c,c.return),av(c);break;case 22:p=c.stateNode,p._visibility&2&&(p._visibility&=-3,av(c));break;default:av(c)}s=s.sibling}}function ZI(s,c){for(;jn!==null;){var p=jn;switch(p.tag){case 0:case 11:case 15:Go(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,jn=v;else e:for(p=s;jn!==null;){v=jn;var C=v.sibling,j=v.return;if(VI(v),v===p){jn=null;break e}if(C!==null){C.return=j,jn=C;break e}jn=j}}}var Ere={getCacheForType:function(s){var c=In(cn),p=c.data.get(s);return p===void 0&&(p=s(),c.data.set(s,p)),p},cacheSignal:function(){return In(cn).controller.signal}},Are=typeof WeakMap=="function"?WeakMap:Map,gt=0,Rt=null,Qe=null,rt=0,wt=0,jr=null,Ko=!1,bc=!1,z1=!1,za=0,tn=0,Wo=0,Nl=0,V1=0,Nr=0,xc=0,vh=null,mr=null,F1=!1,ov=0,JI=0,sv=1/0,lv=null,Yo=null,wn=0,Xo=null,wc=null,Va=0,U1=0,H1=null,eL=null,yh=0,G1=null;function Mr(){return(gt&2)!==0&&rt!==0?rt&-rt:L.T!==null?Z1():dg()}function tL(){if(Nr===0)if((rt&536870912)===0||st){var s=Hu;Hu<<=1,(Hu&3932160)===0&&(Hu=262144),Nr=s}else Nr=536870912;return s=Cr.current,s!==null&&(s.flags|=32),Nr}function gr(s,c,p){(s===Rt&&(wt===2||wt===9)||s.cancelPendingCommit!==null)&&(Sc(s,0),Qo(s,rt,Nr,!1)),fl(s,p),((gt&2)===0||s!==Rt)&&(s===Rt&&((gt&2)===0&&(Nl|=p),tn===4&&Qo(s,rt,Nr,!1)),Zi(s))}function nL(s,c,p){if((gt&6)!==0)throw Error(r(327));var v=!p&&(c&127)===0&&(c&s.expiredLanes)===0||cl(s,c),C=v?Ore(s,c):W1(s,c,!0),j=v;do{if(C===0){bc&&!v&&Qo(s,c,0,!1);break}else{if(p=s.current.alternate,j&&!Tre(p)){C=W1(s,c,!1),j=!1;continue}if(C===2){if(j=c,s.errorRecoveryDisabledLanes&j)var B=0;else B=s.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){c=B;e:{var K=s;C=vh;var ee=K.current.memoizedState.isDehydrated;if(ee&&(Sc(K,B).flags|=256),B=W1(K,B,!1),B!==2){if(z1&&!ee){K.errorRecoveryDisabledLanes|=j,Nl|=j,C=4;break e}j=mr,mr=C,j!==null&&(mr===null?mr=j:mr.push.apply(mr,j))}C=B}if(j=!1,C!==2)continue}}if(C===1){Sc(s,0),Qo(s,c,0,!0);break}e:{switch(v=s,j=C,j){case 0:case 1:throw Error(r(345));case 4:if((c&4194048)!==c)break;case 6:Qo(v,c,Nr,!Ko);break e;case 2:mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((c&62914560)===c&&(C=ov+300-At(),10<C)){if(Qo(v,c,Nr,!Ko),Ku(v,0,!0)!==0)break e;Va=c,v.timeoutHandle=PL(rL.bind(null,v,p,mr,lv,F1,c,Nr,Nl,xc,Ko,j,"Throttled",-0,0),C);break e}rL(v,p,mr,lv,F1,c,Nr,Nl,xc,Ko,j,null,-0,0)}}break}while(!0);Zi(s)}function rL(s,c,p,v,C,j,B,K,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},YI(c,j,ve);var je=(j&62914560)===j?ov-At():(j&4194048)===j?JI-At():0;if(je=cie(ve,je),je!==null){Va=j,s.cancelPendingCommit=je(fL.bind(null,s,c,j,p,v,C,B,K,ee,pe,ve,null,ce,de)),Qo(s,j,B,!ue);return}}fL(s,c,j,p,v,C,B,K,ee)}function Tre(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 C=p[v],j=C.getSnapshot;C=C.value;try{if(!Ar(j(),C))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 Qo(s,c,p,v){c&=~V1,c&=~Nl,s.suspendedLanes|=c,s.pingedLanes&=~c,v&&(s.warmLanes|=c),v=s.expirationTimes;for(var C=c;0<C;){var j=31-Jn(C),B=1<<j;v[j]=-1,C&=~B}p!==0&&ug(s,p,c)}function uv(){return(gt&6)===0?(bh(0),!1):!0}function K1(){if(Qe!==null){if(wt===0)var s=Qe.return;else s=Qe,Ma=wl=null,u1(s),dc=null,th=0,s=Qe;for(;s!==null;)kI(s.alternate,s),s=s.return;Qe=null}}function Sc(s,c){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,Gre(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),Va=0,K1(),Rt=s,Qe=p=ja(s.current,null),rt=c,wt=0,jr=null,Ko=!1,bc=cl(s,c),z1=!1,xc=Nr=V1=Nl=Wo=tn=0,mr=vh=null,F1=!1,(c&8)!==0&&(c|=c&32);var v=s.entangledLanes;if(v!==0)for(s=s.entanglements,v&=c;0<v;){var C=31-Jn(v),j=1<<C;c|=s[C],v&=~j}return za=c,Ng(),p}function iL(s,c){Fe=null,L.H=uh,c===fc||c===$g?(c=xD(),wt=3):c===Qw?(c=xD(),wt=4):wt=c===A1?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,jr=c,Qe===null&&(tn=1,Zg(s,Wr(c,s.current)))}function aL(){var s=Cr.current;return s===null?!0:(rt&4194048)===rt?Zr===null:(rt&62914560)===rt||(rt&536870912)!==0?s===Zr:!1}function oL(){var s=L.H;return L.H=uh,s===null?uh:s}function sL(){var s=L.A;return L.A=Ere,s}function cv(){tn=4,Ko||(rt&4194048)!==rt&&Cr.current!==null||(bc=!0),(Wo&134217727)===0&&(Nl&134217727)===0||Rt===null||Qo(Rt,rt,Nr,!1)}function W1(s,c,p){var v=gt;gt|=2;var C=oL(),j=sL();(Rt!==s||rt!==c)&&(lv=null,Sc(s,c)),c=!1;var B=tn;e:do try{if(wt!==0&&Qe!==null){var K=Qe,ee=jr;switch(wt){case 8:K1(),B=6;break e;case 3:case 2:case 9:case 6:Cr.current===null&&(c=!0);var ue=wt;if(wt=0,jr=null,_c(s,K,ee,ue),p&&bc){B=0;break e}break;default:ue=wt,wt=0,jr=null,_c(s,K,ee,ue)}}Cre(),B=tn;break}catch(pe){iL(s,pe)}while(!0);return c&&s.shellSuspendCounter++,Ma=wl=null,gt=v,L.H=C,L.A=j,Qe===null&&(Rt=null,rt=0,Ng()),B}function Cre(){for(;Qe!==null;)lL(Qe)}function Ore(s,c){var p=gt;gt|=2;var v=oL(),C=sL();Rt!==s||rt!==c?(lv=null,sv=At()+500,Sc(s,c)):bc=cl(s,c);e:do try{if(wt!==0&&Qe!==null){c=Qe;var j=jr;t:switch(wt){case 1:wt=0,jr=null,_c(s,c,j,1);break;case 2:case 9:if(yD(j)){wt=0,jr=null,uL(c);break}c=function(){wt!==2&&wt!==9||Rt!==s||(wt=7),Zi(s)},j.then(c,c);break e;case 3:wt=7;break e;case 4:wt=5;break e;case 7:yD(j)?(wt=0,jr=null,uL(c)):(wt=0,jr=null,_c(s,c,j,7));break;case 5:var B=null;switch(Qe.tag){case 26:B=Qe.memoizedState;case 5:case 27:var K=Qe;if(B?WL(B):K.stateNode.complete){wt=0,jr=null;var ee=K.sibling;if(ee!==null)Qe=ee;else{var ue=K.return;ue!==null?(Qe=ue,fv(ue)):Qe=null}break t}}wt=0,jr=null,_c(s,c,j,5);break;case 6:wt=0,jr=null,_c(s,c,j,6);break;case 8:K1(),tn=6;break e;default:throw Error(r(462))}}jre();break}catch(pe){iL(s,pe)}while(!0);return Ma=wl=null,L.H=v,L.A=C,gt=p,Qe!==null?0:(Rt=null,rt=0,Ng(),tn)}function jre(){for(;Qe!==null&&!Mt();)lL(Qe)}function lL(s){var c=RI(s.alternate,s,za);s.memoizedProps=s.pendingProps,c===null?fv(s):Qe=c}function uL(s){var c=s,p=c.alternate;switch(c.tag){case 15:case 0:c=TI(p,c,c.pendingProps,c.type,void 0,rt);break;case 11:c=TI(p,c,c.pendingProps,c.type.render,c.ref,rt);break;case 5:u1(c);default:kI(p,c),c=Qe=sD(c,za),c=RI(p,c,za)}s.memoizedProps=s.pendingProps,c===null?fv(s):Qe=c}function _c(s,c,p,v){Ma=wl=null,u1(c),dc=null,th=0;var C=c.return;try{if(vre(s,C,c,p,rt)){tn=1,Zg(s,Wr(p,s.current)),Qe=null;return}}catch(j){if(C!==null)throw Qe=C,j;tn=1,Zg(s,Wr(p,s.current)),Qe=null;return}c.flags&32768?(st||v===1?s=!0:bc||(rt&536870912)!==0?s=!1:(Ko=s=!0,(v===2||v===9||v===3||v===6)&&(v=Cr.current,v!==null&&v.tag===13&&(v.flags|=16384))),cL(c,s)):fv(c)}function fv(s){var c=s;do{if((c.flags&32768)!==0){cL(c,Ko);return}s=c.return;var p=xre(c.alternate,c,za);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 cL(s,c){do{var p=wre(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 fL(s,c,p,v,C,j,B,K,ee){s.cancelPendingCommit=null;do dv();while(wn!==0);if((gt&6)!==0)throw Error(r(327));if(c!==null){if(c===s.current)throw Error(r(177));if(j=c.lanes|c.childLanes,j|=Iw,dw(s,p,j,B,K,ee),s===Rt&&(Qe=Rt=null,rt=0),wc=c,Xo=s,Va=p,U1=j,H1=C,eL=v,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,Pre(Fn,function(){return gL(),null})):(s.callbackNode=null,s.callbackPriority=0),v=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||v){v=L.T,L.T=null,C=z.p,z.p=2,B=gt,gt|=4;try{Sre(s,c,p)}finally{gt=B,z.p=C,L.T=v}}wn=1,dL(),hL(),pL()}}function dL(){if(wn===1){wn=0;var s=Xo,c=wc,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 C=gt;gt|=4;try{GI(c,s);var j=oS,B=Zk(s.containerInfo),K=j.focusedElem,ee=j.selectionRange;if(B!==K&&K&&K.ownerDocument&&Qk(K.ownerDocument.documentElement,K)){if(ee!==null&&Mw(K)){var ue=ee.start,pe=ee.end;if(pe===void 0&&(pe=ue),"selectionStart"in K)K.selectionStart=ue,K.selectionEnd=Math.min(pe,K.value.length);else{var ve=K.ownerDocument||document,ce=ve&&ve.defaultView||window;if(ce.getSelection){var de=ce.getSelection(),je=K.textContent.length,Le=Math.min(ee.start,je),Ot=ee.end===void 0?Le:Math.min(ee.end,je);!de.extend&&Le>Ot&&(B=Ot,Ot=Le,Le=B);var se=Xk(K,Le),ae=Xk(K,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(),Le>Ot?(de.addRange(le),de.extend(ae.node,ae.offset)):(le.setEnd(ae.node,ae.offset),de.addRange(le))}}}}for(ve=[],de=K;de=de.parentNode;)de.nodeType===1&&ve.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof K.focus=="function"&&K.focus(),K=0;K<ve.length;K++){var ge=ve[K];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}Ev=!!aS,oS=aS=null}finally{gt=C,z.p=v,L.T=p}}s.current=c,wn=2}}function hL(){if(wn===2){wn=0;var s=Xo,c=wc,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 C=gt;gt|=4;try{zI(s,c.alternate,c)}finally{gt=C,z.p=v,L.T=p}}wn=3}}function pL(){if(wn===4||wn===3){wn=0,Et();var s=Xo,c=wc,p=Va,v=eL;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?wn=5:(wn=0,wc=Xo=null,mL(s,s.pendingLanes));var C=s.pendingLanes;if(C===0&&(Yo=null),$d(p),c=c.stateNode,Zt&&typeof Zt.onCommitFiberRoot=="function")try{Zt.onCommitFiberRoot(Un,c,void 0,(c.current.flags&128)===128)}catch{}if(v!==null){c=L.T,C=z.p,z.p=2,L.T=null;try{for(var j=s.onRecoverableError,B=0;B<v.length;B++){var K=v[B];j(K.value,{componentStack:K.stack})}}finally{L.T=c,z.p=C}}(Va&3)!==0&&dv(),Zi(s),C=s.pendingLanes,(p&261930)!==0&&(C&42)!==0?s===G1?yh++:(yh=0,G1=s):yh=0,bh(0)}}function mL(s,c){(s.pooledCacheLanes&=c)===0&&(c=s.pooledCache,c!=null&&(s.pooledCache=null,Jd(c)))}function dv(){return dL(),hL(),pL(),gL()}function gL(){if(wn!==5)return!1;var s=Xo,c=U1;U1=0;var p=$d(Va),v=L.T,C=z.p;try{z.p=32>p?32:p,L.T=null,p=H1,H1=null;var j=Xo,B=Va;if(wn=0,wc=Xo=null,Va=0,(gt&6)!==0)throw Error(r(331));var K=gt;if(gt|=4,QI(j.current),WI(j,j.current,B,p),gt=K,bh(0,!1),Zt&&typeof Zt.onPostCommitFiberRoot=="function")try{Zt.onPostCommitFiberRoot(Un,j)}catch{}return!0}finally{z.p=C,L.T=v,mL(s,c)}}function vL(s,c,p){c=Wr(p,c),c=E1(s.stateNode,c,2),s=Fo(s,c,2),s!==null&&(fl(s,2),Zi(s))}function St(s,c,p){if(s.tag===3)vL(s,s,p);else for(;c!==null;){if(c.tag===3){vL(c,s,p);break}else if(c.tag===1){var v=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Yo===null||!Yo.has(v))){s=Wr(p,s),p=yI(2),v=Fo(c,p,2),v!==null&&(bI(p,v,c,s),fl(v,2),Zi(v));break}}c=c.return}}function Y1(s,c,p){var v=s.pingCache;if(v===null){v=s.pingCache=new Are;var C=new Set;v.set(c,C)}else C=v.get(c),C===void 0&&(C=new Set,v.set(c,C));C.has(p)||(z1=!0,C.add(p),s=Nre.bind(null,s,c,p),c.then(s,s))}function Nre(s,c,p){var v=s.pingCache;v!==null&&v.delete(c),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,Rt===s&&(rt&p)===p&&(tn===4||tn===3&&(rt&62914560)===rt&&300>At()-ov?(gt&2)===0&&Sc(s,0):V1|=p,xc===rt&&(xc=0)),Zi(s)}function yL(s,c){c===0&&(c=lg()),s=yl(s,c),s!==null&&(fl(s,c),Zi(s))}function Mre(s){var c=s.memoizedState,p=0;c!==null&&(p=c.retryLane),yL(s,p)}function Rre(s,c){var p=0;switch(s.tag){case 31:case 13:var v=s.stateNode,C=s.memoizedState;C!==null&&(p=C.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),yL(s,p)}function Pre(s,c){return It(s,c)}var hv=null,Ec=null,X1=!1,pv=!1,Q1=!1,Zo=0;function Zi(s){s!==Ec&&s.next===null&&(Ec===null?hv=Ec=s:Ec=Ec.next=s),pv=!0,X1||(X1=!0,Dre())}function bh(s,c){if(!Q1&&pv){Q1=!0;do for(var p=!1,v=hv;v!==null;){if(s!==0){var C=v.pendingLanes;if(C===0)var j=0;else{var B=v.suspendedLanes,K=v.pingedLanes;j=(1<<31-Jn(42|s)+1)-1,j&=C&~(B&~K),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(p=!0,SL(v,j))}else j=rt,j=Ku(v,v===Rt?j:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(j&3)===0||cl(v,j)||(p=!0,SL(v,j));v=v.next}while(p);Q1=!1}}function kre(){bL()}function bL(){pv=X1=!1;var s=0;Zo!==0&&Hre()&&(s=Zo);for(var c=At(),p=null,v=hv;v!==null;){var C=v.next,j=xL(v,c);j===0?(v.next=null,p===null?hv=C:p.next=C,C===null&&(Ec=p)):(p=v,(s!==0||(j&3)!==0)&&(pv=!0)),v=C}wn!==0&&wn!==5||bh(s),Zo!==0&&(Zo=0)}function xL(s,c){for(var p=s.suspendedLanes,v=s.pingedLanes,C=s.expirationTimes,j=s.pendingLanes&-62914561;0<j;){var B=31-Jn(j),K=1<<B,ee=C[B];ee===-1?((K&p)===0||(K&v)!==0)&&(C[B]=fw(K,c)):ee<=c&&(s.expiredLanes|=K),j&=~K}if(c=Rt,p=rt,p=Ku(s,s===c?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v=s.callbackNode,p===0||s===c&&(wt===2||wt===9)||s.cancelPendingCommit!==null)return v!==null&&v!==null&&Ht(v),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||cl(s,p)){if(c=p&-p,c===s.callbackPriority)return c;switch(v!==null&&Ht(v),$d(p)){case 2:case 8:p=bn;break;case 32:p=Fn;break;case 268435456:p=Sa;break;default:p=Fn}return v=wL.bind(null,s),p=It(p,v),s.callbackPriority=c,s.callbackNode=p,c}return v!==null&&v!==null&&Ht(v),s.callbackPriority=2,s.callbackNode=null,2}function wL(s,c){if(wn!==0&&wn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(dv()&&s.callbackNode!==p)return null;var v=rt;return v=Ku(s,s===Rt?v:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v===0?null:(nL(s,v,c),xL(s,At()),s.callbackNode!=null&&s.callbackNode===p?wL.bind(null,s):null)}function SL(s,c){if(dv())return null;nL(s,c,!0)}function Dre(){Kre(function(){(gt&6)!==0?It(Lt,kre):bL()})}function Z1(){if(Zo===0){var s=uc;s===0&&(s=Uu,Uu<<=1,(Uu&261888)===0&&(Uu=256)),Zo=s}return Zo}function _L(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:Sg(""+s)}function EL(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 Ire(s,c,p,v,C){if(c==="submit"&&p&&p.stateNode===C){var j=_L((C[Hn]||null).action),B=v.submitter;B&&(c=(c=B[Hn]||null)?_L(c.formAction):B.getAttribute("formAction"),c!==null&&(j=c,B=null));var K=new Tg("action","action",null,v,C);s.push({event:K,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(Zo!==0){var ee=B?EL(C,B):new FormData(C);y1(p,{pending:!0,data:ee,method:C.method,action:j},null,ee)}}else typeof j=="function"&&(K.preventDefault(),ee=B?EL(C,B):new FormData(C),y1(p,{pending:!0,data:ee,method:C.method,action:j},j,ee))},currentTarget:C}]})}}for(var J1=0;J1<Dw.length;J1++){var eS=Dw[J1],Lre=eS.toLowerCase(),$re=eS[0].toUpperCase()+eS.slice(1);xi(Lre,"on"+$re)}xi(tD,"onAnimationEnd"),xi(nD,"onAnimationIteration"),xi(rD,"onAnimationStart"),xi("dblclick","onDoubleClick"),xi("focusin","onFocus"),xi("focusout","onBlur"),xi(ere,"onTransitionRun"),xi(tre,"onTransitionStart"),xi(nre,"onTransitionCancel"),xi(iD,"onTransitionEnd"),ko("onMouseEnter",["mouseout","mouseover"]),ko("onMouseLeave",["mouseout","mouseover"]),ko("onPointerEnter",["pointerout","pointerover"]),ko("onPointerLeave",["pointerout","pointerover"]),Aa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Aa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Aa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Aa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Aa("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(" "),Bre=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xh));function AL(s,c){c=(c&4)!==0;for(var p=0;p<s.length;p++){var v=s[p],C=v.event;v=v.listeners;e:{var j=void 0;if(c)for(var B=v.length-1;0<=B;B--){var K=v[B],ee=K.instance,ue=K.currentTarget;if(K=K.listener,ee!==j&&C.isPropagationStopped())break e;j=K,C.currentTarget=ue;try{j(C)}catch(pe){jg(pe)}C.currentTarget=null,j=ee}else for(B=0;B<v.length;B++){if(K=v[B],ee=K.instance,ue=K.currentTarget,K=K.listener,ee!==j&&C.isPropagationStopped())break e;j=K,C.currentTarget=ue;try{j(C)}catch(pe){jg(pe)}C.currentTarget=null,j=ee}}}}function Ze(s,c){var p=c[Wu];p===void 0&&(p=c[Wu]=new Set);var v=s+"__bubble";p.has(v)||(TL(c,s,2,!1),p.add(v))}function tS(s,c,p){var v=0;c&&(v|=4),TL(p,s,v,c)}var mv="_reactListening"+Math.random().toString(36).slice(2);function nS(s){if(!s[mv]){s[mv]=!0,gg.forEach(function(p){p!=="selectionchange"&&(Bre.has(p)||tS(p,!1,s),tS(p,!0,s))});var c=s.nodeType===9?s:s.ownerDocument;c===null||c[mv]||(c[mv]=!0,tS("selectionchange",!1,c))}}function TL(s,c,p,v){switch(t$(c)){case 2:var C=hie;break;case 8:C=pie;break;default:C=vS}p=C.bind(null,c,p,s),C=void 0,!Sw||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(C=!0),v?C!==void 0?s.addEventListener(c,p,{capture:!0,passive:C}):s.addEventListener(c,p,!0):C!==void 0?s.addEventListener(c,p,{passive:C}):s.addEventListener(c,p,!1)}function rS(s,c,p,v,C){var j=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 K=v.stateNode.containerInfo;if(K===C)break;if(B===4)for(B=v.return;B!==null;){var ee=B.tag;if((ee===3||ee===4)&&B.stateNode.containerInfo===C)return;B=B.return}for(;K!==null;){if(B=No(K),B===null)return;if(ee=B.tag,ee===5||ee===6||ee===26||ee===27){v=j=B;continue e}K=K.parentNode}}v=v.return}Mk(function(){var ue=j,pe=xw(p),ve=[];e:{var ce=aD.get(s);if(ce!==void 0){var de=Tg,je=s;switch(s){case"keypress":if(Eg(p)===0)break e;case"keydown":case"keyup":de=Rne;break;case"focusin":je="focus",de=Tw;break;case"focusout":je="blur",de=Tw;break;case"beforeblur":case"afterblur":de=Tw;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=kk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=xne;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=Dne;break;case tD:case nD:case rD:de=_ne;break;case iD:de=Lne;break;case"scroll":case"scrollend":de=yne;break;case"wheel":de=Bne;break;case"copy":case"cut":case"paste":de=Ane;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=Ik;break;case"toggle":case"beforetoggle":de=zne}var Le=(c&4)!==0,Ot=!Le&&(s==="scroll"||s==="scrollend"),se=Le?ce!==null?ce+"Capture":null:ce;Le=[];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&&Le.push(wh(ae,ge,le))),Ot)break;ae=ae.return}0<Le.length&&(ce=new de(ce,je,null,p,pe),ve.push({event:ce,listeners:Le}))}}if((c&7)===0){e:{if(ce=s==="mouseover"||s==="pointerover",de=s==="mouseout"||s==="pointerout",ce&&p!==bw&&(je=p.relatedTarget||p.fromElement)&&(No(je)||je[Ea]))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?No(je):null,je!==null&&(Ot=a(je),Le=je.tag,je!==Ot||Le!==5&&Le!==27&&Le!==6)&&(je=null)):(de=null,je=ue),de!==je)){if(Le=kk,ge="onMouseLeave",se="onMouseEnter",ae="mouse",(s==="pointerout"||s==="pointerover")&&(Le=Ik,ge="onPointerLeave",se="onPointerEnter",ae="pointer"),Ot=de==null?ce:Ro(de),le=je==null?ce:Ro(je),ce=new Le(ge,ae+"leave",de,p,pe),ce.target=Ot,ce.relatedTarget=le,ge=null,No(pe)===ue&&(Le=new Le(se,ae+"enter",je,p,pe),Le.target=le,Le.relatedTarget=Ot,ge=Le),Ot=ge,de&&je)t:{for(Le=qre,se=de,ae=je,le=0,ge=se;ge;ge=Le(ge))le++;ge=0;for(var Ie=ae;Ie;Ie=Le(Ie))ge++;for(;0<le-ge;)se=Le(se),le--;for(;0<ge-le;)ae=Le(ae),ge--;for(;le--;){if(se===ae||ae!==null&&se===ae.alternate){Le=se;break t}se=Le(se),ae=Le(ae)}Le=null}else Le=null;de!==null&&CL(ve,ce,de,Le,!1),je!==null&&Ot!==null&&CL(ve,Ot,je,Le,!0)}}e:{if(ce=ue?Ro(ue):window,de=ce.nodeName&&ce.nodeName.toLowerCase(),de==="select"||de==="input"&&ce.type==="file")var dt=Uk;else if(Vk(ce))if(Hk)dt=Qne;else{dt=Yne;var Re=Wne}else de=ce.nodeName,!de||de.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?ue&&yw(ue.elementType)&&(dt=Uk):dt=Xne;if(dt&&(dt=dt(s,ue))){Fk(ve,dt,p,pe);break e}Re&&Re(s,ce,ue),s==="focusout"&&ue&&ce.type==="number"&&ue.memoizedProps.value!=null&&zd(ce,"number",ce.value)}switch(Re=ue?Ro(ue):window,s){case"focusin":(Vk(Re)||Re.contentEditable==="true")&&(tc=Re,Rw=ue,Xd=null);break;case"focusout":Xd=Rw=tc=null;break;case"mousedown":Pw=!0;break;case"contextmenu":case"mouseup":case"dragend":Pw=!1,Jk(ve,p,pe);break;case"selectionchange":if(Jne)break;case"keydown":case"keyup":Jk(ve,p,pe)}var Ge;if(Ow)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 ec?qk(s,p)&&(it="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(it="onCompositionStart");it&&(Lk&&p.locale!=="ko"&&(ec||it!=="onCompositionStart"?it==="onCompositionEnd"&&ec&&(Ge=Rk()):(Io=pe,_w="value"in Io?Io.value:Io.textContent,ec=!0)),Re=gv(ue,it),0<Re.length&&(it=new Dk(it,s,null,p,pe),ve.push({event:it,listeners:Re}),Ge?it.data=Ge:(Ge=zk(p),Ge!==null&&(it.data=Ge)))),(Ge=Fne?Une(s,p):Hne(s,p))&&(it=gv(ue,"onBeforeInput"),0<it.length&&(Re=new Dk("onBeforeInput","beforeinput",null,p,pe),ve.push({event:Re,listeners:it}),Re.data=Ge)),Ire(ve,s,ue,p,pe)}AL(ve,c)})}function wh(s,c,p){return{instance:s,listener:c,currentTarget:p}}function gv(s,c){for(var p=c+"Capture",v=[];s!==null;){var C=s,j=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||j===null||(C=Vd(s,p),C!=null&&v.unshift(wh(s,C,j)),C=Vd(s,c),C!=null&&v.push(wh(s,C,j))),s.tag===3)return v;s=s.return}return[]}function qre(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function CL(s,c,p,v,C){for(var j=c._reactName,B=[];p!==null&&p!==v;){var K=p,ee=K.alternate,ue=K.stateNode;if(K=K.tag,ee!==null&&ee===v)break;K!==5&&K!==26&&K!==27||ue===null||(ee=ue,C?(ue=Vd(p,j),ue!=null&&B.unshift(wh(p,ue,ee))):C||(ue=Vd(p,j),ue!=null&&B.push(wh(p,ue,ee)))),p=p.return}B.length!==0&&s.push({event:c,listeners:B})}var zre=/\r\n?/g,Vre=/\u0000|\uFFFD/g;function OL(s){return(typeof s=="string"?s:""+s).replace(zre,`
49
- `).replace(Vre,"")}function jL(s,c){return c=OL(c),OL(s)===c}function Ct(s,c,p,v,C,j){switch(p){case"children":typeof v=="string"?c==="body"||c==="textarea"&&v===""||Qu(s,v):(typeof v=="number"||typeof v=="bigint")&&c!=="body"&&Qu(s,""+v);break;case"className":Xu(s,"class",v);break;case"tabIndex":Xu(s,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":Xu(s,p,v);break;case"style":jk(s,v,j);break;case"data":if(c!=="object"){Xu(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=Sg(""+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 j=="function"&&(p==="formAction"?(c!=="input"&&Ct(s,c,"name",C.name,C,null),Ct(s,c,"formEncType",C.formEncType,C,null),Ct(s,c,"formMethod",C.formMethod,C,null),Ct(s,c,"formTarget",C.formTarget,C,null)):(Ct(s,c,"encType",C.encType,C,null),Ct(s,c,"method",C.method,C,null),Ct(s,c,"target",C.target,C,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){s.removeAttribute(p);break}v=Sg(""+v),s.setAttribute(p,v);break;case"onClick":v!=null&&(s.onclick=Ca);break;case"onScroll":v!=null&&Ze("scroll",s);break;case"onScrollEnd":v!=null&&Ze("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(C.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=Sg(""+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":Ze("beforetoggle",s),Ze("toggle",s),Yu(s,"popover",v);break;case"xlinkActuate":bi(s,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":bi(s,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":bi(s,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":bi(s,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":bi(s,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":bi(s,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":bi(s,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":bi(s,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":bi(s,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":Yu(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=gne.get(p)||p,Yu(s,p,v))}}function iS(s,c,p,v,C,j){switch(p){case"style":jk(s,v,j);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(p=v.__html,p!=null){if(C.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"children":typeof v=="string"?Qu(s,v):(typeof v=="number"||typeof v=="bigint")&&Qu(s,""+v);break;case"onScroll":v!=null&&Ze("scroll",s);break;case"onScrollEnd":v!=null&&Ze("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(!vg.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(C=p.endsWith("Capture"),c=p.slice(2,C?p.length-7:void 0),j=s[Hn]||null,j=j!=null?j[p]:null,typeof j=="function"&&s.removeEventListener(c,j,C),typeof v=="function")){typeof j!="function"&&j!==null&&(p in s?s[p]=null:s.hasAttribute(p)&&s.removeAttribute(p)),s.addEventListener(c,v,C);break e}p in s?s[p]=v:v===!0?s.setAttribute(p,""):Yu(s,p,v)}}}function $n(s,c,p){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",s),Ze("load",s);var v=!1,C=!1,j;for(j in p)if(p.hasOwnProperty(j)){var B=p[j];if(B!=null)switch(j){case"src":v=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:Ct(s,c,j,B,p,null)}}C&&Ct(s,c,"srcSet",p.srcSet,p,null),v&&Ct(s,c,"src",p.src,p,null);return;case"input":Ze("invalid",s);var K=j=B=C=null,ee=null,ue=null;for(v in p)if(p.hasOwnProperty(v)){var pe=p[v];if(pe!=null)switch(v){case"name":C=pe;break;case"type":B=pe;break;case"checked":ee=pe;break;case"defaultChecked":ue=pe;break;case"value":j=pe;break;case"defaultValue":K=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,c));break;default:Ct(s,c,v,pe,p,null)}}wg(s,j,K,ee,ue,B,C,!1);return;case"select":Ze("invalid",s),v=B=j=null;for(C in p)if(p.hasOwnProperty(C)&&(K=p[C],K!=null))switch(C){case"value":j=K;break;case"defaultValue":B=K;break;case"multiple":v=K;default:Ct(s,c,C,K,p,null)}c=j,p=B,s.multiple=!!v,c!=null?Ta(s,!!v,c,!1):p!=null&&Ta(s,!!v,p,!0);return;case"textarea":Ze("invalid",s),j=C=v=null;for(B in p)if(p.hasOwnProperty(B)&&(K=p[B],K!=null))switch(B){case"value":v=K;break;case"defaultValue":C=K;break;case"children":j=K;break;case"dangerouslySetInnerHTML":if(K!=null)throw Error(r(91));break;default:Ct(s,c,B,K,p,null)}Ck(s,v,C,j);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:Ct(s,c,ee,v,p,null)}return;case"dialog":Ze("beforetoggle",s),Ze("toggle",s),Ze("cancel",s),Ze("close",s);break;case"iframe":case"object":Ze("load",s);break;case"video":case"audio":for(v=0;v<xh.length;v++)Ze(xh[v],s);break;case"image":Ze("error",s),Ze("load",s);break;case"details":Ze("toggle",s);break;case"embed":case"source":case"link":Ze("error",s),Ze("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:Ct(s,c,ue,v,p,null)}return;default:if(yw(c)){for(pe in p)p.hasOwnProperty(pe)&&(v=p[pe],v!==void 0&&iS(s,c,pe,v,p,void 0));return}}for(K in p)p.hasOwnProperty(K)&&(v=p[K],v!=null&&Ct(s,c,K,v,p,null))}function Fre(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 C=null,j=null,B=null,K=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)||Ct(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":j=de;break;case"name":C=de;break;case"checked":ue=de;break;case"defaultChecked":pe=de;break;case"value":B=de;break;case"defaultValue":K=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,c));break;default:de!==ve&&Ct(s,c,ce,de,v,ve)}}pl(s,B,K,ee,ue,pe,j,C);return;case"select":de=B=K=ce=null;for(j in p)if(ee=p[j],p.hasOwnProperty(j)&&ee!=null)switch(j){case"value":break;case"multiple":de=ee;default:v.hasOwnProperty(j)||Ct(s,c,j,null,v,ee)}for(C in v)if(j=v[C],ee=p[C],v.hasOwnProperty(C)&&(j!=null||ee!=null))switch(C){case"value":ce=j;break;case"defaultValue":K=j;break;case"multiple":B=j;default:j!==ee&&Ct(s,c,C,j,v,ee)}c=K,p=B,v=de,ce!=null?Ta(s,!!p,ce,!1):!!v!=!!p&&(c!=null?Ta(s,!!p,c,!0):Ta(s,!!p,p?[]:"",!1));return;case"textarea":de=ce=null;for(K in p)if(C=p[K],p.hasOwnProperty(K)&&C!=null&&!v.hasOwnProperty(K))switch(K){case"value":break;case"children":break;default:Ct(s,c,K,null,v,C)}for(B in v)if(C=v[B],j=p[B],v.hasOwnProperty(B)&&(C!=null||j!=null))switch(B){case"value":ce=C;break;case"defaultValue":de=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(r(91));break;default:C!==j&&Ct(s,c,B,C,v,j)}Tk(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:Ct(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:Ct(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 Le in p)ce=p[Le],p.hasOwnProperty(Le)&&ce!=null&&!v.hasOwnProperty(Le)&&Ct(s,c,Le,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:Ct(s,c,ue,ce,v,de)}return;default:if(yw(c)){for(var Ot in p)ce=p[Ot],p.hasOwnProperty(Ot)&&ce!==void 0&&!v.hasOwnProperty(Ot)&&iS(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||iS(s,c,pe,ce,v,de);return}}for(var se in p)ce=p[se],p.hasOwnProperty(se)&&ce!=null&&!v.hasOwnProperty(se)&&Ct(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||Ct(s,c,ve,ce,v,de)}function NL(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ure(){if(typeof performance.getEntriesByType=="function"){for(var s=0,c=0,p=performance.getEntriesByType("resource"),v=0;v<p.length;v++){var C=p[v],j=C.transferSize,B=C.initiatorType,K=C.duration;if(j&&K&&NL(B)){for(B=0,K=C.responseEnd,v+=1;v<p.length;v++){var ee=p[v],ue=ee.startTime;if(ue>K)break;var pe=ee.transferSize,ve=ee.initiatorType;pe&&NL(ve)&&(ee=ee.responseEnd,B+=pe*(ee<K?1:(K-ue)/(ee-ue)))}if(--v,c+=8*(j+B)/(C.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 aS=null,oS=null;function vv(s){return s.nodeType===9?s:s.ownerDocument}function ML(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 RL(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 sS(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 lS=null;function Hre(){var s=window.event;return s&&s.type==="popstate"?s===lS?!1:(lS=s,!0):(lS=null,!1)}var PL=typeof setTimeout=="function"?setTimeout:void 0,Gre=typeof clearTimeout=="function"?clearTimeout:void 0,kL=typeof Promise=="function"?Promise:void 0,Kre=typeof queueMicrotask=="function"?queueMicrotask:typeof kL<"u"?function(s){return kL.resolve(null).then(s).catch(Wre)}:PL;function Wre(s){setTimeout(function(){throw s})}function Jo(s){return s==="head"}function DL(s,c){var p=c,v=0;do{var C=p.nextSibling;if(s.removeChild(p),C&&C.nodeType===8)if(p=C.data,p==="/$"||p==="/&"){if(v===0){s.removeChild(C),Oc(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 j=p.firstChild;j;){var B=j.nextSibling,K=j.nodeName;j[dl]||K==="SCRIPT"||K==="STYLE"||K==="LINK"&&j.rel.toLowerCase()==="stylesheet"||p.removeChild(j),j=B}}else p==="body"&&Sh(s.ownerDocument.body);p=C}while(p);Oc(c)}function IL(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 uS(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":uS(p),Bd(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function Yre(s,c,p,v){for(;s.nodeType===1;){var C=p;if(s.nodeName.toLowerCase()!==c.toLowerCase()){if(!v&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(v){if(!s[dl])switch(c){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(j=s.getAttribute("rel"),j==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(j!==C.rel||s.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||s.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||s.getAttribute("title")!==(C.title==null?null:C.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(j=s.getAttribute("src"),(j!==(C.src==null?null:C.src)||s.getAttribute("type")!==(C.type==null?null:C.type)||s.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&j&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(c==="input"&&s.type==="hidden"){var j=C.name==null?null:""+C.name;if(C.type==="hidden"&&s.getAttribute("name")===j)return s}else return s;if(s=Jr(s.nextSibling),s===null)break}return null}function Xre(s,c,p){if(c==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!p||(s=Jr(s.nextSibling),s===null))return null;return s}function LL(s,c){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!c||(s=Jr(s.nextSibling),s===null))return null;return s}function cS(s){return s.data==="$?"||s.data==="$~"}function fS(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function Qre(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 Jr(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 dS=null;function $L(s){s=s.nextSibling;for(var c=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"||p==="/&"){if(c===0)return Jr(s.nextSibling);c--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||c++}s=s.nextSibling}return null}function BL(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 qL(s,c,p){switch(c=vv(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 ei=new Map,zL=new Set;function yv(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Fa=z.d;z.d={f:Zre,r:Jre,D:eie,C:tie,L:nie,m:rie,X:aie,S:iie,M:oie};function Zre(){var s=Fa.f(),c=uv();return s||c}function Jre(s){var c=Mo(s);c!==null&&c.tag===5&&c.type==="form"?iI(c):Fa.r(s)}var Ac=typeof document>"u"?null:document;function VL(s,c,p){var v=Ac;if(v&&typeof c=="string"&&c){var C=cr(c);C='link[rel="'+s+'"][href="'+C+'"]',typeof p=="string"&&(C+='[crossorigin="'+p+'"]'),zL.has(C)||(zL.add(C),s={rel:s,crossOrigin:p,href:c},v.querySelector(C)===null&&(c=v.createElement("link"),$n(c,"link",s),un(c),v.head.appendChild(c)))}}function eie(s){Fa.D(s),VL("dns-prefetch",s,null)}function tie(s,c){Fa.C(s,c),VL("preconnect",s,c)}function nie(s,c,p){Fa.L(s,c,p);var v=Ac;if(v&&s&&c){var C='link[rel="preload"][as="'+cr(c)+'"]';c==="image"&&p&&p.imageSrcSet?(C+='[imagesrcset="'+cr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(C+='[imagesizes="'+cr(p.imageSizes)+'"]')):C+='[href="'+cr(s)+'"]';var j=C;switch(c){case"style":j=Tc(s);break;case"script":j=Cc(s)}ei.has(j)||(s=h({rel:"preload",href:c==="image"&&p&&p.imageSrcSet?void 0:s,as:c},p),ei.set(j,s),v.querySelector(C)!==null||c==="style"&&v.querySelector(_h(j))||c==="script"&&v.querySelector(Eh(j))||(c=v.createElement("link"),$n(c,"link",s),un(c),v.head.appendChild(c)))}}function rie(s,c){Fa.m(s,c);var p=Ac;if(p&&s){var v=c&&typeof c.as=="string"?c.as:"script",C='link[rel="modulepreload"][as="'+cr(v)+'"][href="'+cr(s)+'"]',j=C;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=Cc(s)}if(!ei.has(j)&&(s=h({rel:"modulepreload",href:s},c),ei.set(j,s),p.querySelector(C)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(Eh(j)))return}v=p.createElement("link"),$n(v,"link",s),un(v),p.head.appendChild(v)}}}function iie(s,c,p){Fa.S(s,c,p);var v=Ac;if(v&&s){var C=Po(v).hoistableStyles,j=Tc(s);c=c||"default";var B=C.get(j);if(!B){var K={loading:0,preload:null};if(B=v.querySelector(_h(j)))K.loading=5;else{s=h({rel:"stylesheet",href:s,"data-precedence":c},p),(p=ei.get(j))&&hS(s,p);var ee=B=v.createElement("link");un(ee),$n(ee,"link",s),ee._p=new Promise(function(ue,pe){ee.onload=ue,ee.onerror=pe}),ee.addEventListener("load",function(){K.loading|=1}),ee.addEventListener("error",function(){K.loading|=2}),K.loading|=4,bv(B,c,v)}B={type:"stylesheet",instance:B,count:1,state:K},C.set(j,B)}}}function aie(s,c){Fa.X(s,c);var p=Ac;if(p&&s){var v=Po(p).hoistableScripts,C=Cc(s),j=v.get(C);j||(j=p.querySelector(Eh(C)),j||(s=h({src:s,async:!0},c),(c=ei.get(C))&&pS(s,c),j=p.createElement("script"),un(j),$n(j,"link",s),p.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},v.set(C,j))}}function oie(s,c){Fa.M(s,c);var p=Ac;if(p&&s){var v=Po(p).hoistableScripts,C=Cc(s),j=v.get(C);j||(j=p.querySelector(Eh(C)),j||(s=h({src:s,async:!0,type:"module"},c),(c=ei.get(C))&&pS(s,c),j=p.createElement("script"),un(j),$n(j,"link",s),p.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},v.set(C,j))}}function FL(s,c,p,v){var C=(C=Z.current)?yv(C):null;if(!C)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(c=Tc(p.href),p=Po(C).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=Tc(p.href);var j=Po(C).hoistableStyles,B=j.get(s);if(B||(C=C.ownerDocument||C,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(s,B),(j=C.querySelector(_h(s)))&&!j._p&&(B.instance=j,B.state.loading=5),ei.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},ei.set(s,p),j||sie(C,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=Cc(p),p=Po(C).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 Tc(s){return'href="'+cr(s)+'"'}function _h(s){return'link[rel="stylesheet"]['+s+"]"}function UL(s){return h({},s,{"data-precedence":s.precedence,precedence:null})}function sie(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}),$n(c,"link",p),un(c),s.head.appendChild(c))}function Cc(s){return'[src="'+cr(s)+'"]'}function Eh(s){return"script[async]"+s}function HL(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 C=h({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return v=(s.ownerDocument||s).createElement("style"),un(v),$n(v,"style",C),bv(v,p.precedence,s),c.instance=v;case"stylesheet":C=Tc(p.href);var j=s.querySelector(_h(C));if(j)return c.state.loading|=4,c.instance=j,un(j),j;v=UL(p),(C=ei.get(C))&&hS(v,C),j=(s.ownerDocument||s).createElement("link"),un(j);var B=j;return B._p=new Promise(function(K,ee){B.onload=K,B.onerror=ee}),$n(j,"link",v),c.state.loading|=4,bv(j,p.precedence,s),c.instance=j;case"script":return j=Cc(p.src),(C=s.querySelector(Eh(j)))?(c.instance=C,un(C),C):(v=p,(C=ei.get(j))&&(v=h({},p),pS(v,C)),s=s.ownerDocument||s,C=s.createElement("script"),un(C),$n(C,"link",v),s.head.appendChild(C),c.instance=C);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,bv(v,p.precedence,s));return c.instance}function bv(s,c,p){for(var v=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=v.length?v[v.length-1]:null,j=C,B=0;B<v.length;B++){var K=v[B];if(K.dataset.precedence===c)j=K;else if(j!==C)break}j?j.parentNode.insertBefore(s,j.nextSibling):(c=p.nodeType===9?p.head:p,c.insertBefore(s,c.firstChild))}function hS(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.title==null&&(s.title=c.title)}function pS(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.integrity==null&&(s.integrity=c.integrity)}var xv=null;function GL(s,c,p){if(xv===null){var v=new Map,C=xv=new Map;C.set(p,v)}else C=xv,v=C.get(p),v||(v=new Map,C.set(p,v));if(v.has(s))return v;for(v.set(s,null),p=p.getElementsByTagName(s),C=0;C<p.length;C++){var j=p[C];if(!(j[dl]||j[xn]||s==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var B=j.getAttribute(c)||"";B=s+B;var K=v.get(B);K?K.push(j):v.set(B,[j])}}return v}function KL(s,c,p){s=s.ownerDocument||s,s.head.insertBefore(p,c==="title"?s.querySelector("head > title"):null)}function lie(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 WL(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function uie(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 C=Tc(v.href),j=c.querySelector(_h(C));if(j){c=j._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(s.count++,s=wv.bind(s),c.then(s,s)),p.state.loading|=4,p.instance=j,un(j);return}j=c.ownerDocument||c,v=UL(v),(C=ei.get(C))&&hS(v,C),j=j.createElement("link"),un(j);var B=j;B._p=new Promise(function(K,ee){B.onload=K,B.onerror=ee}),$n(j,"link",v),p.instance=j}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(p,c),(c=p.state.preload)&&(p.state.loading&3)===0&&(s.count++,p=wv.bind(s),c.addEventListener("load",p),c.addEventListener("error",p))}}var mS=0;function cie(s,c){return s.stylesheets&&s.count===0&&_v(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var v=setTimeout(function(){if(s.stylesheets&&_v(s,s.stylesheets),s.unsuspend){var j=s.unsuspend;s.unsuspend=null,j()}},6e4+c);0<s.imgBytes&&mS===0&&(mS=62500*Ure());var C=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&_v(s,s.stylesheets),s.unsuspend)){var j=s.unsuspend;s.unsuspend=null,j()}},(s.imgBytes>mS?50:800)+c);return s.unsuspend=p,function(){s.unsuspend=null,clearTimeout(v),clearTimeout(C)}}:null}function wv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_v(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Sv=null;function _v(s,c){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Sv=new Map,c.forEach(fie,s),Sv=null,wv.call(s))}function fie(s,c){if(!(c.state.loading&4)){var p=Sv.get(s);if(p)var v=p.get(null);else{p=new Map,Sv.set(s,p);for(var C=s.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<C.length;j++){var B=C[j];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(p.set(B.dataset.precedence,B),v=B)}v&&p.set(null,v)}C=c.instance,B=C.getAttribute("data-precedence"),j=p.get(B)||v,j===v&&p.set(null,C),p.set(B,C),this.count++,v=wv.bind(this),C.addEventListener("load",v),C.addEventListener("error",v),j?j.parentNode.insertBefore(C,j.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(C,s.firstChild)),c.state.loading|=4}}var Ah={$$typeof:_,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function die(s,c,p,v,C,j,B,K,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=C,this.onCaughtError=j,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function YL(s,c,p,v,C,j,B,K,ee,ue,pe,ve){return s=new die(s,c,p,B,ee,ue,pe,ve,K),c=1,j===!0&&(c|=24),j=Tr(3,null,null,c),s.current=j,j.stateNode=s,c=Ww(),c.refCount++,s.pooledCache=c,c.refCount++,j.memoizedState={element:v,isDehydrated:p,cache:c},Zw(j),s}function XL(s){return s?(s=ic,s):ic}function QL(s,c,p,v,C,j){C=XL(C),v.context===null?v.context=C:v.pendingContext=C,v=Vo(c),v.payload={element:p},j=j===void 0?null:j,j!==null&&(v.callback=j),p=Fo(s,v,c),p!==null&&(gr(p,s,c),rh(p,s,c))}function ZL(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<c?p:c}}function gS(s,c){ZL(s,c),(s=s.alternate)&&ZL(s,c)}function JL(s){if(s.tag===13||s.tag===31){var c=yl(s,67108864);c!==null&&gr(c,s,67108864),gS(s,67108864)}}function e$(s){if(s.tag===13||s.tag===31){var c=Mr();c=Ld(c);var p=yl(s,c);p!==null&&gr(p,s,c),gS(s,c)}}var Ev=!0;function hie(s,c,p,v){var C=L.T;L.T=null;var j=z.p;try{z.p=2,vS(s,c,p,v)}finally{z.p=j,L.T=C}}function pie(s,c,p,v){var C=L.T;L.T=null;var j=z.p;try{z.p=8,vS(s,c,p,v)}finally{z.p=j,L.T=C}}function vS(s,c,p,v){if(Ev){var C=yS(v);if(C===null)rS(s,c,v,Av,p),n$(s,v);else if(gie(C,s,c,p,v))v.stopPropagation();else if(n$(s,v),c&4&&-1<mie.indexOf(s)){for(;C!==null;){var j=Mo(C);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var B=_a(j.pendingLanes);if(B!==0){var K=j;for(K.pendingLanes|=2,K.entangledLanes|=2;B;){var ee=1<<31-Jn(B);K.entanglements[1]|=ee,B&=~ee}Zi(j),(gt&6)===0&&(sv=At()+500,bh(0))}}break;case 31:case 13:K=yl(j,2),K!==null&&gr(K,j,2),uv(),gS(j,2)}if(j=yS(v),j===null&&rS(s,c,v,Av,p),j===C)break;C=j}C!==null&&v.stopPropagation()}else rS(s,c,v,null,p)}}function yS(s){return s=xw(s),bS(s)}var Av=null;function bS(s){if(Av=null,s=No(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 Av=s,null}function t$(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(He()){case Lt:return 2;case bn:return 8;case Fn:case Vu:return 32;case Sa:return 268435456;default:return 32}default:return 32}}var xS=!1,es=null,ts=null,ns=null,Th=new Map,Ch=new Map,rs=[],mie="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 n$(s,c){switch(s){case"focusin":case"focusout":es=null;break;case"dragenter":case"dragleave":ts=null;break;case"mouseover":case"mouseout":ns=null;break;case"pointerover":case"pointerout":Th.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ch.delete(c.pointerId)}}function Oh(s,c,p,v,C,j){return s===null||s.nativeEvent!==j?(s={blockedOn:c,domEventName:p,eventSystemFlags:v,nativeEvent:j,targetContainers:[C]},c!==null&&(c=Mo(c),c!==null&&JL(c)),s):(s.eventSystemFlags|=v,c=s.targetContainers,C!==null&&c.indexOf(C)===-1&&c.push(C),s)}function gie(s,c,p,v,C){switch(c){case"focusin":return es=Oh(es,s,c,p,v,C),!0;case"dragenter":return ts=Oh(ts,s,c,p,v,C),!0;case"mouseover":return ns=Oh(ns,s,c,p,v,C),!0;case"pointerover":var j=C.pointerId;return Th.set(j,Oh(Th.get(j)||null,s,c,p,v,C)),!0;case"gotpointercapture":return j=C.pointerId,Ch.set(j,Oh(Ch.get(j)||null,s,c,p,v,C)),!0}return!1}function r$(s){var c=No(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,hg(s.priority,function(){e$(p)});return}}else if(c===31){if(c=l(p),c!==null){s.blockedOn=c,hg(s.priority,function(){e$(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 Tv(s){if(s.blockedOn!==null)return!1;for(var c=s.targetContainers;0<c.length;){var p=yS(s.nativeEvent);if(p===null){p=s.nativeEvent;var v=new p.constructor(p.type,p);bw=v,p.target.dispatchEvent(v),bw=null}else return c=Mo(p),c!==null&&JL(c),s.blockedOn=p,!1;c.shift()}return!0}function i$(s,c,p){Tv(s)&&p.delete(c)}function vie(){xS=!1,es!==null&&Tv(es)&&(es=null),ts!==null&&Tv(ts)&&(ts=null),ns!==null&&Tv(ns)&&(ns=null),Th.forEach(i$),Ch.forEach(i$)}function Cv(s,c){s.blockedOn===c&&(s.blockedOn=null,xS||(xS=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,vie)))}var Ov=null;function a$(s){Ov!==s&&(Ov=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ov===s&&(Ov=null);for(var c=0;c<s.length;c+=3){var p=s[c],v=s[c+1],C=s[c+2];if(typeof v!="function"){if(bS(v||p)===null)continue;break}var j=Mo(p);j!==null&&(s.splice(c,3),c-=3,y1(j,{pending:!0,data:C,method:p.method,action:v},v,C))}}))}function Oc(s){function c(ee){return Cv(ee,s)}es!==null&&Cv(es,s),ts!==null&&Cv(ts,s),ns!==null&&Cv(ns,s),Th.forEach(c),Ch.forEach(c);for(var p=0;p<rs.length;p++){var v=rs[p];v.blockedOn===s&&(v.blockedOn=null)}for(;0<rs.length&&(p=rs[0],p.blockedOn===null);)r$(p),p.blockedOn===null&&rs.shift();if(p=(s.ownerDocument||s).$$reactFormReplay,p!=null)for(v=0;v<p.length;v+=3){var C=p[v],j=p[v+1],B=C[Hn]||null;if(typeof j=="function")B||a$(p);else if(B){var K=null;if(j&&j.hasAttribute("formAction")){if(C=j,B=j[Hn]||null)K=B.formAction;else if(bS(C)!==null)continue}else K=B.action;typeof K=="function"?p[v+1]=K:(p.splice(v,3),v-=3),a$(p)}}}function o$(){function s(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(B){return C=B})},focusReset:"manual",scroll:"manual"})}function c(){C!==null&&(C(),C=null),v||setTimeout(p,20)}function p(){if(!v&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,C=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),C!==null&&(C(),C=null)}}}function wS(s){this._internalRoot=s}jv.prototype.render=wS.prototype.render=function(s){var c=this._internalRoot;if(c===null)throw Error(r(409));var p=c.current,v=Mr();QL(p,v,s,c,null,null)},jv.prototype.unmount=wS.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var c=s.containerInfo;QL(s.current,2,null,s,null,null),uv(),c[Ea]=null}};function jv(s){this._internalRoot=s}jv.prototype.unstable_scheduleHydration=function(s){if(s){var c=dg();s={blockedOn:null,target:s,priority:c};for(var p=0;p<rs.length&&c!==0&&c<rs[p].priority;p++);rs.splice(p,0,s),p===0&&r$(s)}};var s$=t.version;if(s$!=="19.2.6")throw Error(r(527,s$,"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 yie={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nv.isDisabled&&Nv.supportsFiber)try{Un=Nv.inject(yie),Zt=Nv}catch{}}return Nh.createRoot=function(s,c){if(!i(s))throw Error(r(299));var p=!1,v="",C=pI,j=mI,B=gI;return c!=null&&(c.unstable_strictMode===!0&&(p=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(C=c.onUncaughtError),c.onCaughtError!==void 0&&(j=c.onCaughtError),c.onRecoverableError!==void 0&&(B=c.onRecoverableError)),c=YL(s,1,!1,null,null,p,v,null,C,j,B,o$),s[Ea]=c.current,nS(s),new wS(c)},Nh.hydrateRoot=function(s,c,p){if(!i(s))throw Error(r(299));var v=!1,C="",j=pI,B=mI,K=gI,ee=null;return p!=null&&(p.unstable_strictMode===!0&&(v=!0),p.identifierPrefix!==void 0&&(C=p.identifierPrefix),p.onUncaughtError!==void 0&&(j=p.onUncaughtError),p.onCaughtError!==void 0&&(B=p.onCaughtError),p.onRecoverableError!==void 0&&(K=p.onRecoverableError),p.formState!==void 0&&(ee=p.formState)),c=YL(s,1,!0,c,p??null,v,C,ee,j,B,K,o$),c.context=XL(null),p=c.current,v=Mr(),v=Ld(v),C=Vo(v),C.callback=null,Fo(p,C,v),p=v,c.current.lanes=p,fl(c,p),Zi(c),s[Ea]=c.current,nS(s),new jv(c)},Nh.version="19.2.6",Nh}var y$;function Oie(){if(y$)return AS.exports;y$=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=Cie(),AS.exports}var jie=Oie();const Nie=vt(jie);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(){}},Xl,xs,lf,m9,Mie=(m9=class extends cd{constructor(){super();ke(this,Xl);ke(this,xs);ke(this,lf);Ae(this,lf,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){te(this,xs)||this.setEventListener(te(this,lf))}onUnsubscribe(){var t;this.hasListeners()||((t=te(this,xs))==null||t.call(this),Ae(this,xs,void 0))}setEventListener(t){var n;Ae(this,lf,t),(n=te(this,xs))==null||n.call(this),Ae(this,xs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){te(this,Xl)!==t&&(Ae(this,Xl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof te(this,Xl)=="boolean"?te(this,Xl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Xl=new WeakMap,xs=new WeakMap,lf=new WeakMap,m9),DR=new Mie,Rie={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ws,PR,g9,Pie=(g9=class{constructor(){ke(this,ws,Rie);ke(this,PR,!1)}setTimeoutProvider(e){Ae(this,ws,e)}setTimeout(e,t){return te(this,ws).setTimeout(e,t)}clearTimeout(e){te(this,ws).clearTimeout(e)}setInterval(e,t){return te(this,ws).setInterval(e,t)}clearInterval(e){te(this,ws).clearInterval(e)}},ws=new WeakMap,PR=new WeakMap,g9),ql=new Pie;function kie(e){setTimeout(e,0)}var Die=typeof window>"u"||"Deno"in globalThis;function nr(){}function Iie(e,t){return typeof e=="function"?e(t):e}function qj(e){return typeof e=="number"&&e>=0&&e!==1/0}function C9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Is(e,t){return typeof e=="function"?e(t):e}function Dr(e,t){return typeof e=="function"?e(t):e}function b$(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==IR(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 x$(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(hu(t.options.mutationKey)!==hu(a))return!1}else if(!yp(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function IR(e,t){return((t==null?void 0:t.queryKeyHashFn)||hu)(e)}function hu(e){return JSON.stringify(e,(t,n)=>zj(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 Lie=Object.prototype.hasOwnProperty;function O9(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=w$(e)&&w$(t);if(!r&&!(zj(e)&&zj(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:Lie.call(e,h))&&f++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){u[h]=g;continue}const w=O9(m,g,n+1);u[h]=w,w===m&&f++}return a===l&&f===a?e:u}function By(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 w$(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zj(e){if(!S$(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!S$(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function S$(e){return Object.prototype.toString.call(e)==="[object Object]"}function $ie(e){return new Promise(t=>{ql.setTimeout(t,e)})}function Vj(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?O9(e,t):t}function Bie(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function qie(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var LR=Symbol();function j9(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===LR?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $R(e,t){return typeof e=="function"?e(...t):!!e}function zie(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=()=>Die;return{isServer(){return e()},setIsServer(t){e=t}}})();function Fj(){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 Vie=kie;function Fie(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=Vie;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=Fie(),uf,Ss,cf,v9,Uie=(v9=class extends cd{constructor(){super();ke(this,uf,!0);ke(this,Ss);ke(this,cf);Ae(this,cf,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,Ss)||this.setEventListener(te(this,cf))}onUnsubscribe(){var t;this.hasListeners()||((t=te(this,Ss))==null||t.call(this),Ae(this,Ss,void 0))}setEventListener(t){var n;Ae(this,cf,t),(n=te(this,Ss))==null||n.call(this),Ae(this,Ss,t(this.setOnline.bind(this)))}setOnline(t){te(this,uf)!==t&&(Ae(this,uf,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return te(this,uf)}},uf=new WeakMap,Ss=new WeakMap,cf=new WeakMap,v9),qy=new Uie;function Hie(e){return Math.min(1e3*2**e,3e4)}function N9(e){return(e??"online")==="online"?qy.isOnline():!0}var Uj=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function M9(e){let t=!1,n=0,r;const i=Fj(),a=()=>i.status!=="pending",o=x=>{var b;if(!a()){const S=new Uj(x);m(S),(b=e.onCancel)==null||b.call(e,S)}},l=()=>{t=!0},u=()=>{t=!1},f=()=>DR.isFocused()&&(e.networkMode==="always"||qy.isOnline())&&e.canRun(),d=()=>N9(e.networkMode)&&e.canRun(),h=x=>{a()||(r==null||r(),i.resolve(x))},m=x=>{a()||(r==null||r(),i.reject(x))},g=()=>new Promise(x=>{var b;r=S=>{(a()||f())&&x(S)},(b=e.onPause)==null||b.call(e)}).then(()=>{var x;r=void 0,a()||(x=e.onContinue)==null||x.call(e)}),w=()=>{if(a())return;let x;const b=n===0?e.initialPromise:void 0;try{x=b??e.fn()}catch(S){x=Promise.reject(S)}Promise.resolve(x).then(h).catch(S=>{var O;if(a())return;const E=e.retry??(bp.isServer()?0:3),_=e.retryDelay??Hie,A=typeof _=="function"?_(n,S):_,T=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,S);if(t||!T){m(S);return}n++,(O=e.onFail)==null||O.call(e,n,S),$ie(A).then(()=>f()?void 0:g()).then(()=>{t?m(S):w()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:u,canStart:d,start:()=>(d()?w():g().then(w),i)}}var Ql,y9,R9=(y9=class{constructor(){ke(this,Ql)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qj(this.gcTime)&&Ae(this,Ql,ql.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(bp.isServer()?1/0:300*1e3))}clearGcTimeout(){te(this,Ql)!==void 0&&(ql.clearTimeout(te(this,Ql)),Ae(this,Ql,void 0))}},Ql=new WeakMap,y9);function Gie(e){return{onFetch:(t,n)=>{var d,h,m,g,w;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=((w=t.state.data)==null?void 0:w.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const f=async()=>{let x=!1;const b=_=>{zie(_,()=>t.signal,()=>x=!0)},S=j9(t.options,t.fetchOptions),E=async(_,A,T)=>{if(x)return Promise.reject(t.signal.reason);if(A==null&&_.pages.length)return Promise.resolve(_);const M=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:A,direction:T?"backward":"forward",meta:t.options.meta};return b(I),I})(),R=await S(M),{maxPages:P}=t.options,$=T?qie:Bie;return{pages:$(_.pages,R,P),pageParams:$(_.pageParams,A,P)}};if(i&&a.length){const _=i==="backward",A=_?P9:Hj,T={pages:a,pageParams:o},O=A(r,T);l=await E(T,O,_)}else{const _=e??a.length;do{const A=u===0?o[0]??r.initialPageParam:Hj(r,l);if(u>0&&A==null)break;l=await E(l,A),u++}while(u<_)}return l};t.options.persister?t.fetchFn=()=>{var x,b;return(b=(x=t.options).persister)==null?void 0:b.call(x,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function Hj(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 P9(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 Kie(e,t){return t?Hj(e,t)!=null:!1}function Wie(e,t){return!t||!e.getPreviousPageParam?!1:P9(e,t)!=null}var ff,Zl,df,ii,Jl,Nn,Em,eu,kr,k9,Ka,b9,Yie=(b9=class extends R9{constructor(t){super();ke(this,kr);ke(this,ff);ke(this,Zl);ke(this,df);ke(this,ii);ke(this,Jl);ke(this,Nn);ke(this,Em);ke(this,eu);Ae(this,eu,!1),Ae(this,Em,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ae(this,Jl,t.client),Ae(this,ii,te(this,Jl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ae(this,Zl,E$(this.options)),this.state=t.state??te(this,Zl),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return te(this,ff)}get promise(){var t;return(t=te(this,Nn))==null?void 0:t.promise}setOptions(t){if(this.options={...te(this,Em),...t},t!=null&&t._type&&Ae(this,ff,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=E$(this.options);n.data!==void 0&&(this.setState(_$(n.data,n.dataUpdatedAt)),Ae(this,Zl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&te(this,ii).remove(this)}setData(t,n){const r=Vj(this.state.data,t,this.options);return Ke(this,kr,Ka).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,kr,Ka).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=te(this,Nn))==null?void 0:r.promise;return(i=te(this,Nn))==null||i.cancel(t),n?n.then(nr).catch(nr):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=>Dr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===LR||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Is(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:!C9(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=te(this,Nn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=te(this,Nn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),te(this,ii).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,Nn)&&(te(this,eu)||Ke(this,kr,k9).call(this)?te(this,Nn).cancel({revert:!0}):te(this,Nn).cancelRetry()),this.scheduleGc()),te(this,ii).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,kr,Ka).call(this,{type:"invalidate"})}async fetch(t,n){var f,d,h,m,g,w,x,b,S,E,_;if(this.state.fetchStatus!=="idle"&&((f=te(this,Nn))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(te(this,Nn))return te(this,Nn).continueRetry(),te(this,Nn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(T=>T.options.queryFn);A&&this.setOptions(A.options)}const r=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(Ae(this,eu,!0),r.signal)})},a=()=>{const A=j9(this.options,n),O=(()=>{const M={client:te(this,Jl),queryKey:this.queryKey,meta:this.meta};return i(M),M})();return Ae(this,eu,!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,Jl),state:this.state,fetchFn:a};return i(A),A})(),u=te(this,ff)==="infinite"?Gie(this.options.pages):this.options.behavior;u==null||u.onFetch(l,this),Ae(this,df,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Ke(this,kr,Ka).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),Ae(this,Nn,M9({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:A=>{A instanceof Uj&&A.revert&&this.setState({...te(this,df),fetchStatus:"idle"}),r.abort()},onFail:(A,T)=>{Ke(this,kr,Ka).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{Ke(this,kr,Ka).call(this,{type:"pause"})},onContinue:()=>{Ke(this,kr,Ka).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const A=await te(this,Nn).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(g=(m=te(this,ii).config).onSuccess)==null||g.call(m,A,this),(x=(w=te(this,ii).config).onSettled)==null||x.call(w,A,this.state.error,this),A}catch(A){if(A instanceof Uj){if(A.silent)return te(this,Nn).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ke(this,kr,Ka).call(this,{type:"error",error:A}),(S=(b=te(this,ii).config).onError)==null||S.call(b,A,this),(_=(E=te(this,ii).config).onSettled)==null||_.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},ff=new WeakMap,Zl=new WeakMap,df=new WeakMap,ii=new WeakMap,Jl=new WeakMap,Nn=new WeakMap,Em=new WeakMap,eu=new WeakMap,kr=new WeakSet,k9=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ka=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,..._$(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ae(this,df,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,ii).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 _$(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function E$(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,tr,tu,hf,Ya,_s,Tm,pf,mf,nu,ru,Es,gf,xt,Xh,Gj,Kj,Wj,Yj,Xj,Qj,Zj,L9,x9,I9=(x9=class extends cd{constructor(t,n){super();ke(this,xt);ke(this,vr);ke(this,lt);ke(this,Am);ke(this,tr);ke(this,tu);ke(this,hf);ke(this,Ya);ke(this,_s);ke(this,Tm);ke(this,pf);ke(this,mf);ke(this,nu);ke(this,ru);ke(this,Es);ke(this,gf,new Set);this.options=n,Ae(this,vr,t),Ae(this,_s,null),Ae(this,Ya,Fj()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(te(this,lt).addObserver(this),A$(te(this,lt),this.options)?Ke(this,xt,Xh).call(this):this.updateResult(),Ke(this,xt,Yj).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Jj(te(this,lt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Jj(te(this,lt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,xt,Xj).call(this),Ke(this,xt,Qj).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 Dr(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,xt,Zj).call(this),te(this,lt).setOptions(this.options),n._defaulted&&!By(this.options,n)&&te(this,vr).getQueryCache().notify({type:"observerOptionsUpdated",query:te(this,lt),observer:this});const i=this.hasListeners();i&&T$(te(this,lt),r,this.options,n)&&Ke(this,xt,Xh).call(this),this.updateResult(),i&&(te(this,lt)!==r||Dr(this.options.enabled,te(this,lt))!==Dr(n.enabled,te(this,lt))||Is(this.options.staleTime,te(this,lt))!==Is(n.staleTime,te(this,lt)))&&Ke(this,xt,Gj).call(this);const a=Ke(this,xt,Kj).call(this);i&&(te(this,lt)!==r||Dr(this.options.enabled,te(this,lt))!==Dr(n.enabled,te(this,lt))||a!==te(this,Es))&&Ke(this,xt,Wj).call(this,a)}getOptimisticResult(t){const n=te(this,vr).getQueryCache().build(te(this,vr),t),r=this.createResult(n,t);return Qie(this,r)&&(Ae(this,tr,r),Ae(this,hf,this.options),Ae(this,tu,te(this,lt).state)),r}getCurrentResult(){return te(this,tr)}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,Ya).status==="pending"&&te(this,Ya).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){te(this,gf).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,xt,Xh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),te(this,tr)))}createResult(t,n){var P;const r=te(this,lt),i=this.options,a=te(this,tr),o=te(this,tu),l=te(this,hf),f=t!==r?t.state:te(this,Am),{state:d}=t;let h={...d},m=!1,g;if(n._optimisticResults){const $=this.hasListeners(),I=!$&&A$(t,n),k=$&&T$(t,r,n,i);(I||k)&&(h={...h,...D9(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:w,errorUpdatedAt:x,status:b}=h;g=h.data;let S=!1;if(n.placeholderData!==void 0&&g===void 0&&b==="pending"){let $;a!=null&&a.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?($=a.data,S=!0):$=typeof n.placeholderData=="function"?n.placeholderData((P=te(this,mf))==null?void 0:P.state.data,te(this,mf)):n.placeholderData,$!==void 0&&(b="success",g=Vj(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,Tm))g=te(this,pf);else try{Ae(this,Tm,n.select),g=n.select(g),g=Vj(a==null?void 0:a.data,g,n),Ae(this,pf,g),Ae(this,_s,null)}catch($){Ae(this,_s,$)}te(this,_s)&&(w=te(this,_s),g=te(this,pf),x=Date.now(),b="error");const E=h.fetchStatus==="fetching",_=b==="pending",A=b==="error",T=_&&E,O=g!==void 0,R={status:b,fetchStatus:h.fetchStatus,isPending:_,isSuccess:b==="success",isError:A,isInitialLoading:T,isLoading:T,data:g,dataUpdatedAt:h.dataUpdatedAt,error:w,errorUpdatedAt:x,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:BR(t,n),refetch:this.refetch,promise:te(this,Ya),isEnabled:Dr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=R.data!==void 0,I=R.status==="error"&&!$,k=q=>{I?q.reject(R.error):$&&q.resolve(R.data)},V=()=>{const q=Ae(this,Ya,R.promise=Fj());k(q)},D=te(this,Ya);switch(D.status){case"pending":t.queryHash===r.queryHash&&k(D);break;case"fulfilled":(I||R.data!==D.value)&&V();break;case"rejected":(!I||R.error!==D.reason)&&V();break}}return R}updateResult(){const t=te(this,tr),n=this.createResult(te(this,lt),this.options);if(Ae(this,tu,te(this,lt).state),Ae(this,hf,this.options),te(this,tu).data!==void 0&&Ae(this,mf,te(this,lt)),By(n,t))return;Ae(this,tr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!te(this,gf).size)return!0;const o=new Set(a??te(this,gf));return this.options.throwOnError&&o.add("error"),Object.keys(te(this,tr)).some(l=>{const u=l;return te(this,tr)[u]!==t[u]&&o.has(u)})};Ke(this,xt,L9).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,xt,Yj).call(this)}},vr=new WeakMap,lt=new WeakMap,Am=new WeakMap,tr=new WeakMap,tu=new WeakMap,hf=new WeakMap,Ya=new WeakMap,_s=new WeakMap,Tm=new WeakMap,pf=new WeakMap,mf=new WeakMap,nu=new WeakMap,ru=new WeakMap,Es=new WeakMap,gf=new WeakMap,xt=new WeakSet,Xh=function(t){Ke(this,xt,Zj).call(this);let n=te(this,lt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(nr)),n},Gj=function(){Ke(this,xt,Xj).call(this);const t=Is(this.options.staleTime,te(this,lt));if(bp.isServer()||te(this,tr).isStale||!qj(t))return;const r=C9(te(this,tr).dataUpdatedAt,t)+1;Ae(this,nu,ql.setTimeout(()=>{te(this,tr).isStale||this.updateResult()},r))},Kj=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(te(this,lt)):this.options.refetchInterval)??!1},Wj=function(t){Ke(this,xt,Qj).call(this),Ae(this,Es,t),!(bp.isServer()||Dr(this.options.enabled,te(this,lt))===!1||!qj(te(this,Es))||te(this,Es)===0)&&Ae(this,ru,ql.setInterval(()=>{(this.options.refetchIntervalInBackground||DR.isFocused())&&Ke(this,xt,Xh).call(this)},te(this,Es)))},Yj=function(){Ke(this,xt,Gj).call(this),Ke(this,xt,Wj).call(this,Ke(this,xt,Kj).call(this))},Xj=function(){te(this,nu)!==void 0&&(ql.clearTimeout(te(this,nu)),Ae(this,nu,void 0))},Qj=function(){te(this,ru)!==void 0&&(ql.clearInterval(te(this,ru)),Ae(this,ru,void 0))},Zj=function(){const t=te(this,vr).getQueryCache().build(te(this,vr),this.options);if(t===te(this,lt))return;const n=te(this,lt);Ae(this,lt,t),Ae(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,tr))}),te(this,vr).getQueryCache().notify({query:te(this,lt),type:"observerResultsUpdated"})})},x9);function Xie(e,t){return Dr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Dr(t.retryOnMount,e)===!1)}function A$(e,t){return Xie(e,t)||e.state.data!==void 0&&Jj(e,t,t.refetchOnMount)}function Jj(e,t,n){if(Dr(t.enabled,e)!==!1&&Is(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&BR(e,t)}return!1}function T$(e,t,n,r){return(e!==t||Dr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&BR(e,n)}function BR(e,t){return Dr(t.enabled,e)!==!1&&e.isStaleByTime(Is(t.staleTime,e))}function Qie(e,t){return!By(e.getCurrentResult(),t)}var Zie=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 w,x;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:l}=r,u=(x=(w=n.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:x.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:Kie(t,n.data),hasPreviousPage:Wie(t,n.data),isFetchNextPageError:f,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:m,isRefetchError:l&&!f&&!h,isRefetching:a&&!d&&!m}}},Cm,ta,Kn,iu,na,us,w9,Jie=(w9=class extends R9{constructor(t){super();ke(this,na);ke(this,Cm);ke(this,ta);ke(this,Kn);ke(this,iu);Ae(this,Cm,t.client),this.mutationId=t.mutationId,Ae(this,Kn,t.mutationCache),Ae(this,ta,[]),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,ta).includes(t)||(te(this,ta).push(t),this.clearGcTimeout(),te(this,Kn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ae(this,ta,te(this,ta).filter(n=>n!==t)),this.scheduleGc(),te(this,Kn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){te(this,ta).length||(this.state.status==="pending"?this.scheduleGc():te(this,Kn).remove(this))}continue(){var t;return((t=te(this,iu))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,u,f,d,h,m,g,w,x,b,S,E,_,A,T,O,M;const n=()=>{Ke(this,na,us).call(this,{type:"continue"})},r={client:te(this,Cm),meta:this.options.meta,mutationKey:this.options.mutationKey};Ae(this,iu,M9({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,P)=>{Ke(this,na,us).call(this,{type:"failed",failureCount:R,error:P})},onPause:()=>{Ke(this,na,us).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>te(this,Kn).canRun(this)}));const i=this.state.status==="pending",a=!te(this,iu).canStart();try{if(i)n();else{Ke(this,na,us).call(this,{type:"pending",variables:t,isPaused:a}),te(this,Kn).config.onMutate&&await te(this,Kn).config.onMutate(t,this,r);const P=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,r));P!==this.state.context&&Ke(this,na,us).call(this,{type:"pending",context:P,variables:t,isPaused:a})}const R=await te(this,iu).start();return await((f=(u=te(this,Kn).config).onSuccess)==null?void 0:f.call(u,R,t,this.state.context,this,r)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,R,t,this.state.context,r)),await((g=(m=te(this,Kn).config).onSettled)==null?void 0:g.call(m,R,null,this.state.variables,this.state.context,this,r)),await((x=(w=this.options).onSettled)==null?void 0:x.call(w,R,null,t,this.state.context,r)),Ke(this,na,us).call(this,{type:"success",data:R}),R}catch(R){try{await((S=(b=te(this,Kn).config).onError)==null?void 0:S.call(b,R,t,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((_=(E=this.options).onError)==null?void 0:_.call(E,R,t,this.state.context,r))}catch(P){Promise.reject(P)}try{await((T=(A=te(this,Kn).config).onSettled)==null?void 0:T.call(A,void 0,R,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((M=(O=this.options).onSettled)==null?void 0:M.call(O,void 0,R,t,this.state.context,r))}catch(P){Promise.reject(P)}throw Ke(this,na,us).call(this,{type:"error",error:R}),R}finally{te(this,Kn).runNext(this)}}},Cm=new WeakMap,ta=new WeakMap,Kn=new WeakMap,iu=new WeakMap,na=new WeakSet,us=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,ta).forEach(r=>{r.onMutationUpdate(t)}),te(this,Kn).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 Xa,Ci,Om,S9,eae=(S9=class extends cd{constructor(t={}){super();ke(this,Xa);ke(this,Ci);ke(this,Om);this.config=t,Ae(this,Xa,new Set),Ae(this,Ci,new Map),Ae(this,Om,0)}build(t,n,r){const i=new Jie({client:t,mutationCache:this,mutationId:++Mv(this,Om)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){te(this,Xa).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,Xa).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,Xa).forEach(t=>{this.notify({type:"removed",mutation:t})}),te(this,Xa).clear(),te(this,Ci).clear()})}getAll(){return Array.from(te(this,Xa))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>x$(n,r))}findAll(t={}){return this.getAll().filter(n=>x$(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(nr))))}},Xa=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 Qa,As,yr,Za,uo,vy,eN,_9,tae=(_9=class extends cd{constructor(n,r){super();ke(this,uo);ke(this,Qa);ke(this,As);ke(this,yr);ke(this,Za);Ae(this,Qa,n),this.setOptions(r),this.bindMethods(),Ke(this,uo,vy).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,Qa).defaultMutationOptions(n),By(this.options,r)||te(this,Qa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:te(this,yr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&hu(r.mutationKey)!==hu(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,vy).call(this),Ke(this,uo,eN).call(this,n)}getCurrentResult(){return te(this,As)}reset(){var n;(n=te(this,yr))==null||n.removeObserver(this),Ae(this,yr,void 0),Ke(this,uo,vy).call(this),Ke(this,uo,eN).call(this)}mutate(n,r){var i;return Ae(this,Za,r),(i=te(this,yr))==null||i.removeObserver(this),Ae(this,yr,te(this,Qa).getMutationCache().build(te(this,Qa),this.options)),te(this,yr).addObserver(this),te(this,yr).execute(n)}},Qa=new WeakMap,As=new WeakMap,yr=new WeakMap,Za=new WeakMap,uo=new WeakSet,vy=function(){var r;const n=((r=te(this,yr))==null?void 0:r.state)??$9();Ae(this,As,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},eN=function(n){An.batch(()=>{var r,i,a,o,l,u,f,d;if(te(this,Za)&&this.hasListeners()){const h=te(this,As).variables,m=te(this,As).context,g={client:te(this,Qa),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(w){Promise.reject(w)}try{(o=(a=te(this,Za)).onSettled)==null||o.call(a,n.data,null,h,m,g)}catch(w){Promise.reject(w)}}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(w){Promise.reject(w)}try{(d=(f=te(this,Za)).onSettled)==null||d.call(f,void 0,n.error,h,m,g)}catch(w){Promise.reject(w)}}}this.listeners.forEach(h=>{h(te(this,As))})})},_9),ra,E9,nae=(E9=class extends cd{constructor(t={}){super();ke(this,ra);this.config=t,Ae(this,ra,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??IR(i,n);let o=this.get(a);return o||(o=new Yie({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){te(this,ra).has(t.queryHash)||(te(this,ra).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=te(this,ra).get(t.queryHash);n&&(t.destroy(),n===t&&te(this,ra).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){An.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return te(this,ra).get(t)}getAll(){return[...te(this,ra).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>b$(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>b$(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()})})}},ra=new WeakMap,E9),nn,Ts,Cs,vf,yf,Os,bf,xf,A9,rae=(A9=class{constructor(e={}){ke(this,nn);ke(this,Ts);ke(this,Cs);ke(this,vf);ke(this,yf);ke(this,Os);ke(this,bf);ke(this,xf);Ae(this,nn,e.queryCache||new nae),Ae(this,Ts,e.mutationCache||new eae),Ae(this,Cs,e.defaultOptions||{}),Ae(this,vf,new Map),Ae(this,yf,new Map),Ae(this,Os,0)}mount(){Mv(this,Os)._++,te(this,Os)===1&&(Ae(this,bf,DR.subscribe(async e=>{e&&(await this.resumePausedMutations(),te(this,nn).onFocus())})),Ae(this,xf,qy.subscribe(async e=>{e&&(await this.resumePausedMutations(),te(this,nn).onOnline())})))}unmount(){var e,t;Mv(this,Os)._--,te(this,Os)===0&&((e=te(this,bf))==null||e.call(this),Ae(this,bf,void 0),(t=te(this,xf))==null||t.call(this),Ae(this,xf,void 0))}isFetching(e){return te(this,nn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return te(this,Ts).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(Is(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=Iie(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(nr).catch(nr)}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(nr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(nr)}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(Is(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(nr).catch(nr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(nr).catch(nr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return qy.isOnline()?te(this,Ts).resumePausedMutations():Promise.resolve()}getQueryCache(){return te(this,nn)}getMutationCache(){return te(this,Ts)}getDefaultOptions(){return te(this,Cs)}setDefaultOptions(e){Ae(this,Cs,e)}setQueryDefaults(e,t){te(this,vf).set(hu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...te(this,vf).values()],n={};return t.forEach(r=>{yp(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){te(this,yf).set(hu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...te(this,yf).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,Cs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=IR(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===LR&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...te(this,Cs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){te(this,nn).clear(),te(this,Ts).clear()}},nn=new WeakMap,Ts=new WeakMap,Cs=new WeakMap,vf=new WeakMap,yf=new WeakMap,Os=new WeakMap,bf=new WeakMap,xf=new WeakMap,A9),B9=N.createContext(void 0),sr=e=>{const t=N.useContext(B9);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},iae=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(B9.Provider,{value:e,children:t})),q9=N.createContext(!1),aae=()=>N.useContext(q9);q9.Provider;function oae(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var sae=N.createContext(oae()),lae=()=>N.useContext(sae),uae=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?$R(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},cae=e=>{N.useEffect(()=>{e.clearReset()},[e])},fae=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||$R(n,[e.error,r])),dae=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))}},hae=(e,t)=>e.isLoading&&e.isFetching&&!t,pae=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,C$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function z9(e,t,n){var g,w,x,b;const r=aae(),i=lae(),a=sr(),o=a.defaultQueryOptions(e);(w=(g=a.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||w.call(g,o);const l=a.getQueryCache().get(o.queryHash),u=e.subscribed!==!1;o._optimisticResults=r?"isRestoring":u?"optimistic":void 0,dae(o),uae(o,i,l),cae(i);const f=!a.getQueryCache().get(o.queryHash),[d]=N.useState(()=>new t(a,o)),h=d.getOptimisticResult(o),m=!r&&u;if(N.useSyncExternalStore(N.useCallback(S=>{const E=m?d.subscribe(An.batchCalls(S)):nr;return d.updateResult(),E},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),N.useEffect(()=>{d.setOptions(o)},[o,d]),pae(o,h))throw C$(o,d,i);if(fae({result:h,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw h.error;if((b=(x=a.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||b.call(x,o,h),o.experimental_prefetchInRender&&!bp.isServer()&&hae(h,r)){const S=f?C$(o,d,i):l==null?void 0:l.promise;S==null||S.catch(nr).finally(()=>{d.updateResult()})}return o.notifyOnChangeProps?h:d.trackResult(h)}function Hr(e,t){return z9(e,I9)}function ya(e,t){const n=sr(),[r]=N.useState(()=>new tae(n,e));N.useEffect(()=>{r.setOptions(e)},[r,e]);const i=N.useSyncExternalStore(N.useCallback(o=>r.subscribe(An.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=N.useCallback((o,l)=>{r.mutate(o,l).catch(nr)},[r]);if(i.error&&$R(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function V9(e,t){return z9(e,Zie)}var Qh=typeof window<"u"?N.useLayoutEffect:N.useEffect;function jS(e){const t=N.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function mae(e,t,n={},r={}){N.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 gae(e){const t=N.useRef(null);return N.useImperativeHandle(e,()=>t.current,[]),t}const F9=!1;function xp(e){return e[e.length-1]}function vae(e){return typeof e=="function"}function zl(e,t){return vae(e)?e(t):e}const U9=Object.prototype.hasOwnProperty,O$=Object.prototype.propertyIsEnumerable;function H9(e){for(const t in e)if(U9.call(e,t))return!0;return!1}const yae=()=>Object.create(null),Ml=(e,t)=>js(e,t,yae);function js(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,a=M$(e)&&M$(i);if(!a&&!(zy(e)&&zy(i)))return i;const o=a?e:j$(e);if(!o)return i;const l=a?i:j$(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],w=e[g],x=i[g];if(w===x){d[g]=w,(a?m<u:U9.call(e,g))&&h++;continue}if(w===null||x===null||typeof w!="object"||typeof x!="object"){d[g]=x;continue}const b=js(w,x,n,r+1);d[g]=b,b===w&&h++}return u===f&&h===u?e:d}function j$(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!O$.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(!O$.call(e,i))return!1;r.push(i)}return r}function zy(e){if(!N$(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!N$(n)||!n.hasOwnProperty("isPrototypeOf"))}function N$(e){return Object.prototype.toString.call(e)==="[object Object]"}function M$(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function au(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(!au(e[r],t[r],n))return!1;return!0}if(zy(e)&&zy(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)&&!au(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||!au(e[o],t[o],n)))return!1;return i===a}return!1}function wf(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 bae(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function R$(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 bae(t)}const xae=["http:","https:","mailto:","tel:"];function Vy(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Mh(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+=R$(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+R$(n?e.slice(n):e);let a=!1;return r.startsWith("//")&&(a=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:a}}function wae(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Sae(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 Ns=4,G9=5;function _ae(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 K9(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=_ae(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,w,x,b,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,T=((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 M=K9(E,l,t);let R;const P=l,$=M[5];switch(l=$+1,a++,M[0]){case 0:{const I=E.substring(M[2],M[3]);if(A){const k=(m=i.static)==null?void 0:m.get(I);if(k)R=k;else{i.static??(i.static=new Map);const V=Vl(n.fullPath??n.from);V.parent=i,V.depth=a,R=V,i.static.set(I,V)}}else{const k=I.toLowerCase(),V=(g=i.staticInsensitive)==null?void 0:g.get(k);if(V)R=V;else{i.staticInsensitive??(i.staticInsensitive=new Map);const D=Vl(n.fullPath??n.from);D.parent=i,D.depth=a,R=D,i.staticInsensitive.set(k,D)}}break}case 1:{const I=E.substring(P,M[1]),k=E.substring(M[4],$),V=A&&!!(I||k),D=I?V?I:I.toLowerCase():void 0,q=k?V?k:k.toLowerCase():void 0,L=!T&&((w=i.dynamic)==null?void 0:w.find(z=>!z.parse&&z.caseSensitive===V&&z.prefix===D&&z.suffix===q));if(L)R=L;else{const z=MS(1,n.fullPath??n.from,V,D,q);R=z,z.depth=a,z.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(z)}break}case 3:{const I=E.substring(P,M[1]),k=E.substring(M[4],$),V=A&&!!(I||k),D=I?V?I:I.toLowerCase():void 0,q=k?V?k:k.toLowerCase():void 0,L=!T&&((x=i.optional)==null?void 0:x.find(z=>!z.parse&&z.caseSensitive===V&&z.prefix===D&&z.suffix===q));if(L)R=L;else{const z=MS(3,n.fullPath??n.from,V,D,q);R=z,z.parent=i,z.depth=a,i.optional??(i.optional=[]),i.optional.push(z)}break}case 2:{const I=E.substring(P,M[1]),k=E.substring(M[4],$),V=A&&!!(I||k),D=I?V?I:I.toLowerCase():void 0,q=k?V?k:k.toLowerCase():void 0,L=MS(2,n.fullPath??n.from,V,D,q);R=L,L.parent=i,L.depth=a,i.wildcard??(i.wildcard=[]),i.wildcard.push(L)}}i=R}if(T&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const M=Vl(n.fullPath??n.from);M.kind=G9,M.parent=i,a++,M.depth=a,i.pathless??(i.pathless=[]),i.pathless.push(M),i=M}const O=(n.path||!n.children)&&!n.isRoot;if(O&&E.endsWith("/")){const M=Vl(n.fullPath??n.from);M.kind=Ns,M.parent=i,a++,M.depth=a,i.index=M,i=M}i.parse=T??null,i.priority=((S=(b=n.options)==null?void 0:b.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 NS(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 ms(e){var t,n,r;if(e.pathless)for(const i of e.pathless)ms(i);if(e.static)for(const i of e.static.values())ms(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())ms(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(NS);for(const i of e.dynamic)ms(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(NS);for(const i of e.optional)ms(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(NS);for(const i of e.wildcard)ms(i)}}function Vl(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 MS(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 Eae(e,t){const n=Vl("/"),r=new Uint16Array(6);for(const i of e)O0(!1,r,i,1,n,0);ms(n),t.masksTree=n,t.flatCache=Sp(1e3)}function Aae(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=qR(e,t.masksTree);return t.flatCache.set(e,r),r}function Tae(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=Vl("/"),O0(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),qR(r,o,n)}function Cae(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=qR(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 Oae(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function jae(e,t=!1,n){const r=Vl(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=Oae(u.fullPath);(!o[f]||u.fullPath.endsWith("/"))&&(o[f]=u)}l++}),ms(r),{processedTree:{segmentTree:r,singleCache:Sp(1e3),matchCache:Sp(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function qR(e,t,n=!1){const r=e.split("/"),i=Mae(e,r,t,n);if(!i)return null;const[a]=W9(e,r,i);return{route:i.node.route,rawParams:a}}function W9(e,t,n){var d,h,m,g,w,x,b,S,E,_;const r=Nae(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===Ns)break;if(A.kind===G9){f--,o--,u--;continue}const T=t[o],O=u;if(T&&(u+=T.length),A.kind===1){i??(i=n.node.fullPath.split("/"));const M=i[f],R=((w=A.prefix)==null?void 0:w.length)??0;if(M.charCodeAt(R)===123){const P=((x=A.suffix)==null?void 0:x.length)??0,$=M.substring(R+2,M.length-P-1),I=T.substring(R,T.length-P);a[$]=decodeURIComponent(I)}else{const P=M.substring(1);a[P]=decodeURIComponent(T)}}else if(A.kind===3){if(n.skipped&1<<l){o--,u=O-1;continue}i??(i=n.node.fullPath.split("/"));const M=i[f],R=((b=A.prefix)==null?void 0:b.length)??0,P=((S=A.suffix)==null?void 0:S.length)??0,$=M.substring(R+3,M.length-P-1),I=A.suffix||A.prefix?T.substring(R,T.length-P):T;I&&(a[$]=decodeURIComponent(I))}else if(A.kind===2){const M=A,R=e.substring(O+(((E=M.prefix)==null?void 0:E.length)??0),e.length-(((_=M.suffix)==null?void 0:_.length)??0)),P=decodeURIComponent(R);a["*"]=P,a._splat=P;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 Nae(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Mae(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:w,statics:x,dynamics:b,optionals:S}=d;let{extract:E,rawParams:_}=d;if(h.kind===2&&h.route&&!Dv(f,d))continue;if(h.parse){if(!P$(e,t,d))continue;_=d.rawParams,E=d.extract}r&&h.route&&h.kind!==Ns&&Dv(u,d)&&(u=d);const A=m===o;if(A&&(h.route&&(!a||h.kind===Ns||h.kind===2)&&Dv(f,d)&&(f=d),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const T=A?void 0:t[m];let O;if(A&&h.index){const M={node:h.index,index:m,skipped:g,depth:w+1,statics:x,dynamics:b,optionals:S,extract:E,rawParams:_};let R=!0;if(h.index.parse&&(P$(e,t,M)||(R=!1)),R){if(!b&&!S&&!g&&Rae(x,o))return M;Dv(f,M)&&(f=M)}}if(h.wildcard)for(let M=h.wildcard.length-1;M>=0;M--){const R=h.wildcard[M],{prefix:P,suffix:$}=R;if(!(P&&(A||!(R.caseSensitive?T:O??(O=T.toLowerCase())).startsWith(P)))){if($){if(A)continue;const I=t.slice(m).join("/").slice(-$.length);if((R.caseSensitive?I:I.toLowerCase())!==$)continue}l.push({node:R,index:o,skipped:g,depth:w+1,statics:x,dynamics:b,optionals:S,extract:E,rawParams:_})}}if(h.optional){const M=g|1<<w,R=w+1;for(let P=h.optional.length-1;P>=0;P--){const $=h.optional[P];l.push({node:$,index:m,skipped:M,depth:R,statics:x,dynamics:b,optionals:S,extract:E,rawParams:_})}if(!A)for(let P=h.optional.length-1;P>=0;P--){const $=h.optional[P],{prefix:I,suffix:k}=$;if(I||k){const V=$.caseSensitive?T:O??(O=T.toLowerCase());if(I&&!V.startsWith(I)||k&&!V.endsWith(k))continue}l.push({node:$,index:m+1,skipped:g,depth:R,statics:x,dynamics:b,optionals:S+kv(o,m),extract:E,rawParams:_})}}if(!A&&h.dynamic&&T)for(let M=h.dynamic.length-1;M>=0;M--){const R=h.dynamic[M],{prefix:P,suffix:$}=R;if(P||$){const I=R.caseSensitive?T:O??(O=T.toLowerCase());if(P&&!I.startsWith(P)||$&&!I.endsWith($))continue}l.push({node:R,index:m+1,skipped:g,depth:w+1,statics:x,dynamics:b+kv(o,m),optionals:S,extract:E,rawParams:_})}if(!A&&h.staticInsensitive){const M=h.staticInsensitive.get(O??(O=T.toLowerCase()));M&&l.push({node:M,index:m+1,skipped:g,depth:w+1,statics:x+kv(o,m),dynamics:b,optionals:S,extract:E,rawParams:_})}if(!A&&h.static){const M=h.static.get(T);M&&l.push({node:M,index:m+1,skipped:g,depth:w+1,statics:x+kv(o,m),dynamics:b,optionals:S,extract:E,rawParams:_})}if(h.pathless){const M=w+1;for(let R=h.pathless.length-1;R>=0;R--){const P=h.pathless[R];l.push({node:P,index:m,skipped:g,depth:M,statics:x,dynamics:b,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 kv(e,t){return 2**(e-t-1)}function Rae(e,t){return e===2**(t-1)-1}function P$(e,t,n){let r,i;try{[r,i]=W9(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 Dv(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===Ns)>(e.node.kind===Ns)||t.node.kind===Ns==(e.node.kind===Ns)&&t.depth>e.depth))):!0}function yy(e){return zR(e.filter(t=>t!==void 0).join("/"))}function zR(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 Q9(e){return Ja(X9(e))}function Fy(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Pae(e,t,n){return Fy(e,n)===Fy(t,n)}function kae({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=zR(l.join("/"))||"/";return o&&r&&r.set(o,u),u}function Dae(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 RS(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=>D$(i,n)).join("/"):D$(r,n)}function k$({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=K9(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 w=e.substring(d,u[1]),x=e.substring(u[4],h);if(!g){i=!0,(w||x)&&(f+="/"+w+x);continue}const b=RS("_splat",t,n);f+="/"+w+b+x;continue}if(m===1){const g=e.substring(u[2],u[3]);!i&&!(g in t)&&(i=!0),a[g]=t[g];const w=e.substring(d,u[1]),x=e.substring(u[4],h),b=RS(g,t,n)??"undefined";f+="/"+w+b+x;continue}if(m===3){const g=e.substring(u[2],u[3]),w=t[g];if(w==null)continue;a[g]=w;const x=e.substring(d,u[1]),b=e.substring(u[4],h),S=RS(g,t,n)??"";f+="/"+x+S+b;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:a,interpolatedPath:f||"/",isMissingParams:i}}function D$(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function Qn(e){return(e==null?void 0:e.isNotFound)===!0}function Iae(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 PS(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Lae(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]=PS(i):Array.isArray(a)?a.push(PS(i)):n[r]=[a,PS(i)]}return n}const $ae=qae(JSON.parse),Bae=zae(JSON.stringify,JSON.parse);function qae(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Lae(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function zae(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=Iae(i,r);return a?`?${a}`:""}}const ou="__root__";function Vae(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 tN=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Fae=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)),su=(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},I$=(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},Ms=(e,t,n)=>{var r,i,a;if(!(!br(n)&&!Qn(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":Qn(n)?"notFound":o.status==="pending"?"success":o.status,context:su(e,t.index),isFetching:!1,error:n})),Qn(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},Z9=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},L$=(e,t,n)=>{const r=su(e,n);e.updateMatch(t,i=>({...i,context:r}))},Rh=(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),Ms(e,e.router.getMatch(i),n);try{(u=(l=o.options).onError)==null||u.call(l,n)}catch(f){n=f,Ms(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)&&!Qn(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(()=>{tN(e)},i);r._nonReactive.pendingTimeout=o}},Uae=(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")&&Ms(e,a,a.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Hae=(e,t,n,r)=>{const i=e.router.getMatch(t);let a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=wf(()=>{a==null||a.resolve(),a=void 0});const{paramsError:o,searchError:l}=i;o&&Rh(e,n,o,"PARSE_PARAMS"),l&&Rh(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,T=>({...T,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{d(),h()});return}i._nonReactive.beforeLoadPromise=wf();const m={...su(e,n,!1),...i.__routeContext},{search:g,params:w,cause:x}=i,b=j0(e,t),S={search:g,abortController:u,params:w,preload:b,context:m,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:b?"preload":x,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},E=A=>{if(A===void 0){e.router.batch(()=>{d(),h()});return}(br(A)||Qn(A))&&(d(),Rh(e,n,A,"BEFORE_LOAD")),e.router.batch(()=>{d(),e.updateMatch(t,T=>({...T,__beforeLoadContext:A})),h()})};let _;try{if(_=r.options.beforeLoad(S),wp(_))return d(),_.catch(A=>{Rh(e,n,A,"BEFORE_LOAD")}).then(E)}catch(A){d(),Rh(e,n,A,"BEFORE_LOAD")}E(_)},Gae=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>l(),o=()=>Hae(e,n,t,i),l=()=>{if(Z9(e,n))return;const u=Uae(e,n,i);return wp(u)?u.then(o):o()};return a()},Kae=(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=su(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}},$$=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)),w=!!m&&wp(g);if((w||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||d._nonReactive.minPendingPromise)&&e.updateMatch(n,b=>({...b,isFetching:"loader"})),m){const b=w?await g:g;Ms(e,e.router.getMatch(n),b),b!==void 0&&e.updateMatch(n,S=>({...S,loaderData:b}))}i._lazyPromise&&await i._lazyPromise;const x=d._nonReactive.minPendingPromise;x&&await x,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,b=>({...b,error:void 0,context:su(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,w=>({...w,status:w.status==="pending"?"success":w.status,isFetching:!1,context:su(e,r)}));return}const g=d._nonReactive.minPendingPromise;g&&await g,Qn(h)&&await((l=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:l.call(o)),Ms(e,e.router.getMatch(n),h);try{(f=(u=i.options).onError)==null||f.call(u,h)}catch(w){m=w,Ms(e,e.router.getMatch(n),w)}!br(m)&&!Qn(m)&&await _p(i,["errorComponent"]),e.updateMatch(n,w=>({...w,error:m,context:su(e,r),status:"error",isFetching:!1}))}}catch(d){const h=e.router.getMatch(n);h&&(h._nonReactive.loaderPromise=void 0),Ms(e,h,d)}},Wae=async(e,t,n)=>{var g,w,x,b;async function r(S,E,_,A,T){const O=Date.now()-E.updatedAt,M=S?T.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:T.options.staleTime??e.router.options.defaultStaleTime??0,R=T.options.shouldReload,P=typeof R=="function"?R(eG(e,t,i,n,T)):R,{status:$,invalid:I}=A,k=O>=M&&(!!e.forceStaleReload||A.cause==="enter"||_!==void 0&&_!==A.id);o=$==="success"&&(I||(P??k)),S&&T.options.preload===!1||(o&&!e.sync&&d?(l=!0,(async()=>{var V,D;try{await $$(e,t,i,n,T);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 $$(e,t,i,n,T):L$(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(Z9(e,i)){if(!e.router.getMatch(i))return e.matches[n];L$(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:(w=e.router.stores.matches.get().find(T=>T.routeId===a))==null?void 0:w.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 T=e.router.getMatch(i),O=T._nonReactive.error||T.error;O&&Ms(e,T,O),T.status==="pending"&&await r(A,S,_,T,u)}else{const T=A&&!e.router.stores.matchStores.has(i),O=e.router.getMatch(i);O._nonReactive.loaderPromise=wf(),T!==O.preload&&e.updateMatch(i,M=>({...M,preload:T})),await r(A,S,_,O,u)}}const h=e.router.getMatch(i);l||((x=h._nonReactive.loaderPromise)==null||x.resolve(),(b=h._nonReactive.loadPromise)==null||b.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 B$(e){var m,g;const t=e,n=[];Fae(t.router)&&tN(t);let r;for(let w=0;w<t.matches.length;w++){try{const x=Gae(t,w);wp(x)&&await x}catch(x){if(br(x))throw x;if(Qn(x))r=x;else if(!t.preload)throw x;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?I$(t,r):void 0,o=r&&t.preload?0:a!==void 0?Math.min(a+1,i):i;let l,u;for(let w=0;w<o;w++)n.push(Wae(t,n,w));try{await Promise.all(n)}catch{const w=await Promise.allSettled(n);for(const x of w){if(x.status!=="rejected")continue;const b=x.reason;if(br(b))throw b;Qn(b)?l??(l=b):u??(u=b)}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 w=I$(t,f);w===void 0&&io();const x=t.matches[w],b=t.router.looseRoutesById[x.routeId],S=(m=t.router.options)==null?void 0:m.defaultNotFoundComponent;!b.options.notFoundComponent&&S&&(b.options.notFoundComponent=S),f.routeId=x.routeId;const E=x.routeId===t.router.routeTree.id;t.updateMatch(x.id,_=>({..._,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),d=w,await _p(b,["notFoundComponent"])}else if(!t.preload){const w=t.matches[0];w.globalNotFound||(g=t.router.getMatch(w.id))!=null&&g.globalNotFound&&t.updateMatch(w.id,x=>({...x,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const w=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await _p(w,["errorComponent"])}for(let w=0;w<=d;w++){const{id:x,routeId:b}=t.matches[w],S=t.router.looseRoutesById[b];try{const E=Kae(t,x,S);if(E){const _=await E;t.updateMatch(x,A=>({...A,..._}))}}catch(E){console.error(`Error executing head for route ${b}:`,E)}}const h=tN(t);if(wp(h)&&await h,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function q$(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=by){!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===by?(()=>{if(e._componentsPromise===void 0){const r=q$(e,by);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():q$(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function tG(e){var t;for(const n of by)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const by=["component","errorComponent","pendingComponent","notFoundComponent"];function Yae(e){return{input:({url:t})=>{for(const n of e)t=nN(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=nG(e[n],t);return t}}}function Xae(e){const t=Q9(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=yy(["/",t,a.pathname]),a)}}function nN(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 Qae(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),w=n(e.resolvedLocation),x=n(e.statusCode),b=n(e.redirect),S=n([]),E=n([]),_=n([]),A=r(()=>kS(o,S.get())),T=r(()=>kS(l,E.get())),O=r(()=>kS(u,_.get())),M=r(()=>S.get()[0]),R=r(()=>S.get().some(z=>{var H;return((H=o.get(z))==null?void 0:H.get().status)==="pending"})),P=r(()=>{var z;return{locationHref:g.get().href,resolvedLocationHref:(z=w.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:w.get(),statusCode:x.get(),redirect:b.get()})),I=Sp(64);function k(z){let H=I.get(z);return H||(H=r(()=>{const Y=S.get();for(const Q of Y){const U=o.get(Q);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:w,statusCode:x,redirect:b,matchesId:S,pendingIds:E,cachedIds:_,matches:A,pendingMatches:T,cachedMatches:O,firstId:M,hasPending:R,matchRouteDeps:P,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){DS(z,o,S,n,i)}function q(z){DS(z,l,E,n,i)}function L(z){DS(z,u,_,n,i)}return V}function kS(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function DS(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)}Sae(n.get(),a)||n.set(a)})}var Ls="__TSR_index",z$="popstate",V$="beforeunload";function Zae(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 w=Uy(u.path,u.state);if(await g.blockerFn({currentLocation:t,nextLocation:w,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[Ls];l=F$(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[Ls];l=F$(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[Ls]!==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 F$(e,t){t||(t={});const n=VR();return{...t,key:n,__TSR_key:n,[Ls]:e}}function Jae(e){var R,P;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=(()=>Uy(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((R=t.history.state)!=null&&R.__TSR_key)&&!((P=t.history.state)!=null&&P.key)){const $=VR();t.history.replaceState({[Ls]:0,key:$,__TSR_key:$},"")}let f=u(),d,h=!1,m=!1,g=!1,w=!1;const x=()=>f;let b,S;const E=()=>{b&&(M._ignoreSubscribers=!0,(b.isPush?t.history.pushState:t.history.replaceState)(b.state,"",b.href),M._ignoreSubscribers=!1,b=void 0,S=void 0,d=void 0)},_=($,I,k)=>{const V=l(I);S||(d=f),f=Uy(I,k),b={href:V,state:k,isPush:(b==null?void 0:b.isPush)||$==="push"},S||(S=Promise.resolve().then(()=>E()))},A=$=>{f=u(),M.notify({type:$})},T=async()=>{if(m){m=!1;return}const $=u(),I=$.state[Ls]-f.state[Ls],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),M.notify(L);return}}}f=u(),M.notify(L)},O=$=>{if(w){w=!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=""},M=Zae({getLocation:x,getLength:()=>t.history.length,pushState:($,I)=>_("push",$,I),replaceState:($,I)=>_("replace",$,I),back:$=>($&&(g=!0),w=!0,t.history.back()),forward:$=>{$&&(g=!0),w=!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(V$,O,{capture:!0}),t.removeEventListener(z$,T)},onBlocked:()=>{d&&f!==d&&(f=d)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(V$,O,{capture:!0}),t.addEventListener(z$,T),t.history.pushState=function(...$){const I=n.apply(t.history,$);return M._ignoreSubscribers||A("PUSH"),I},t.history.replaceState=function(...$){const I=r.apply(t.history,$);return M._ignoreSubscribers||A("REPLACE"),I},M}function eoe(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Uy(e,t){const n=eoe(e),r=n.indexOf("#"),i=n.indexOf("?"),a=VR();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||{[Ls]:0,key:a,__TSR_key:a}}}function VR(){return(Math.random()+1).toString(36).substring(7)}function Zc(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 rN=new WeakMap;var toe=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=Dae(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Jae()),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=Qae(roe(this.latestLocation),h),poe(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=Q9(u);m&&m!=="/"&&h.push(Xae({basepath:u})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:Yae(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=jae(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&Eae(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:Mh(u).path,external:!1,searchStr:E,search:Ml(r==null?void 0:r.search,S),hash:Mh(d.slice(1)).path,state:js(r==null?void 0:r.state,m)}}const g=new URL(h,this.origin),w=nN(this.rewrite,g),x=this.options.parseSearch(w.search),b=this.options.stringifySearch(x);return w.search=b,{href:w.href.replace(w.origin,""),publicHref:h,pathname:Mh(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:b,search:Ml(r==null?void 0:r.search,x),hash:Mh(w.hash.slice(1)).path,state:js(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)=>kae({base:n,to:r.includes("//")?zR(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=>ioe({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,w=a.params===!1||a.params===null?Object.create(null):(a.params??!0)===!0?h:Object.assign(h,zl(a.params,h)),x=this.routesByPath[Ja(g)];let b;if(x)b=this.getRouteBranch(x);else if(g.includes("$"))b=[];else{const V=this.getMatchedRoutes(g);b=V.matchedRoutes,this.options.notFoundRoute&&(!V.foundRoute||V.foundRoute.path!=="/"&&V.routeParams["**"])&&(b=[...b,this.options.notFoundRoute])}if(b.length&&H9(w))for(const V of b){const D=((I=V.options.params)==null?void 0:I.stringify)??V.options.stringifyParams;if(D)try{Object.assign(w,D(w))}catch{}}const S=n.leaveParams?g:Mh(k$({path:g,params:w,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let E=d;if(n._includeValidateSearch&&((k=this.options.search)!=null&&k.strict)){const V={};b.forEach(D=>{if(D.options.validateSearch)try{Object.assign(V,xy(D.options.validateSearch,{...V,...E}))}catch{}}),E=V}E=aoe({search:E,dest:a,destRoutes:b,_includeValidateSearch:n._includeValidateSearch}),E=Ml(d,E);const _=this.options.stringifySearch(E),A=a.hash===!0?o.hash:a.hash?zl(a.hash,o.hash):void 0,T=A?`#${A}`:"";let O=a.state===!0?o.state:a.state?zl(a.state,o.state):{};O=js(o.state,O);const M=`${S}${_}${T}`;let R,P,$=!1;if(this.rewrite){const V=new URL(M,this.origin),D=nG(this.rewrite,V);R=V.href.replace(V.origin,""),D.origin!==this.origin?(P=D.href,$=!0):P=D.pathname+D.search+D.hash}else R=wae(M),P=R;return{publicHref:P,href:R,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=Aae(l.pathname,this.processedTree);if(d){Object.assign(f,d.rawParams);const{from:h,params:m,...g}=d.route,w=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,zl(m,f));o={from:n.from,...g,params:w},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=au(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=wf(()=>{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=Uy(l,{__TSR_index:n?h:h+1}),g=new URL(m.pathname,this.origin);u.to=nN(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(Vy(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?rN.set(this.latestLocation,r):rN.delete(this.latestLocation);const m=this.latestLocation,g=Zc(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await B$({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 w=null,x=null,b=null,S=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),T=A.length,O=this.stores.matches.get();w=T?O.filter(P=>!this.stores.pendingMatchStores.has(P.id)):null;const M=new Set;for(const P of this.stores.pendingMatchStores.values())P.routeId&&M.add(P.routeId);const R=new Set;for(const P of this.stores.matchStores.values())P.routeId&&R.add(P.routeId);x=T?O.filter(P=>!M.has(P.routeId)):null,b=T?A.filter(P=>!R.has(P.routeId)):null,S=T?A.filter(P=>R.has(P.routeId)):O,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),T&&(this.stores.setMatches(A),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...w.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[A,T]of[[x,"onLeave"],[b,"onEnter"],[S,"onStay"]])if(A)for(const O of A)(_=(E=this.looseRoutesById[O.routeId].options)[T])==null||_.call(E,O)})})}})}catch(m){br(m)?(i=m,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Qn(m)&&(a=m);const g=i?i.status:a?404:this.stores.matches.get().some(w=>w.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(Zc(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&&Vy(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 B$({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});Qn(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=Tae(a.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!l||n.params&&!au(l.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?au(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??Bae,parseSearch:e.parseSearch??$ae,protocolAllowlist:e.protocolAllowlist??xae}),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?soe(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],w=u[m-1];let x,b,S;{const D=(w==null?void 0:w.search)??e.search,q=(w==null?void 0:w._strictSearch)??void 0;try{const L=xy(g.options.validateSearch,{...D})??void 0;x={...D,...L},b={...q,...L},S=void 0}catch(L){let z=L;if(L instanceof Hy||(z=new Hy(L.message,{cause:L})),t!=null&&t.throwOnError)throw z;x=D,b={},S=z}}const E=((h=(d=g.options).loaderDeps)==null?void 0:h.call(d,{search:x}))??"",_=E?JSON.stringify(E):"",{interpolatedPath:A,usedParams:T}=k$({path:g.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),O=g.id+A+_,M=this.getMatch(O),R=f.get(g.id),P=(M==null?void 0:M._strictParams)??T;let $;if(!M)try{U$(g,P)}catch(D){if(Qn(D)||br(D)?$=D:$=new noe(D.message,{cause:D}),t!=null&&t.throwOnError)throw $}Object.assign(i,P);const I=R?"stay":"enter";let k;if(M)k={...M,cause:I,params:(R==null?void 0:R.params)??i,_strictParams:P,search:Ml(R?R.search:M.search,x),_strictSearch:b};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:(R==null?void 0:R.params)??i,_strictParams:P,pathname:A,updatedAt:Date.now(),search:R?Ml(R.search,x):x,_strictSearch:b,searchError:void 0,status:D,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:wf()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:I,loaderDeps:R?js(R.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(w);k.context={...V,...k.__routeContext,...k.__beforeLoadContext},u[m]=k}for(let m=0;m<u.length;m++){const g=u[m],w=this.looseRoutesById[g.routeId],x=this.getMatch(g.id),b=f.get(g.routeId);if(g.params=b?Ml(b.params,i):i,!x){const S=u[m-1],E=this.getParentContext(S);if(w.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:w.id};g.__routeContext=w.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,xy(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{U$(h,d)}catch{}u=d}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:u}}},Hy=class extends Error{},noe=class extends Error{};function roe(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function xy(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Hy("Async validation not supported");if(n.issues)throw new Hy(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 ioe({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=Ja(e);let a;const o=Cae(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 aoe({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return ooe(n)(e,t,r??!1)}function ooe(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,...xy(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:zl(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 soe(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 ou}function U$(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 loe(){try{return sessionStorage}catch{return}}const uoe="tsr-scroll-restoration-v1_3",Jc=loe();function coe(){try{return JSON.parse((Jc==null?void 0:Jc.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function foe(){try{Jc==null||Jc.setItem(uoe,JSON.stringify(cs))}catch{}}const cs=coe(),H$="data-scroll-restoration-id",doe=e=>e.state.__TSR_key||e.href;function hoe(e){const t=e.getAttribute(H$);if(t)return`[${H$}="${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 Iv=!1;const $c="window";function iN(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function G$(e){const t=[];for(const n of e){if(n===$c)continue;const r=iN(n);r&&t.push(r)}return t}function poe(e,t){if(e.options.scrollRestoration&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,Iv=!1;const n=e.options.getScrollRestorationKey||doe,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(!(Iv||!e.isScrollRestoring))if(l.target===document)i($c,scrollX,scrollY);else{const u=l.target;i(u,u.scrollLeft,u.scrollTop)}},o=l=>{if(!e.isScrollRestoring)return;const u=cs[l]||(cs[l]={});for(const[f,d]of r)f===$c?u[$c]=d:f.isConnected&&(u[hoe(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())),foe()}),e.subscribe("onRendered",l=>{var w;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 x=cs[g];if(x){let b=cs[m];for(const S in x){if(S===$c){if(d)continue}else{const E=iN(S);if(!E||d&&f&&(h??(h=G$(f)),h.includes(E)))continue}b||(b=cs[m]={}),b[S]??(b[S]=x[S])}}}Iv=!0;try{const x=l.toLocation.hash,b=l.toLocation.state.__hashScrollIntoViewOptions??!0;let S=!1;if(d){const E=rN.get(l.toLocation),_=x&&b&&(E==="PUSH"||E==="REPLACE"),A=e.isScrollRestoring?cs[m]:void 0;if(A)for(const T in A){const{scrollX:O,scrollY:M}=A[T];if(T===$c){if(_)continue;scrollTo({top:M,left:O,behavior:u}),S=!0}else{const R=iN(T);R&&(R.scrollLeft=O,R.scrollTop=M)}}if(!S&&!x){const T={top:0,left:0,behavior:u};if(scrollTo(T),f){h??(h=G$(f));for(const O of h)O.scrollTo(T)}}}!S&&x&&b&&((w=document.getElementById(x))==null||w.scrollIntoView(b))}finally{Iv=!1}})}const moe="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=ou:this.parentRoute||io();let i=r?ou:n==null?void 0:n.path;i&&i!=="/"&&(i=X9(i));const a=(n==null?void 0:n.id)||i;let o=r?ou:yy([this.parentRoute.id==="__root__"?"":this.parentRoute.id,a]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=yy(["/",o]));const l=o==="__root__"?"/":yy([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=>Vae({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.")}},goe=class extends rG{constructor(e){super(e)}};function FR(e){const t=e.errorComponent??UR;return y.jsx(voe,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?N.createElement(t,{error:n,reset:r}):e.children})}var voe=class extends N.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 UR({error:e}){const[t,n]=N.useState(!1);return y.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[y.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[y.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),y.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"})]}),y.jsx("div",{style:{height:".25rem"}}),t?y.jsx("div",{children:y.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?y.jsx("code",{children:e.message}):null})}):null]})}function yoe({children:e,fallback:t=null}){return iG()?y.jsx(ie.Fragment,{children:e}):y.jsx(ie.Fragment,{children:t})}function iG(){return ie.useSyncExternalStore(boe,()=>!0,()=>!1)}function boe(){return()=>{}}var aG=N.createContext(null);function Gr(e){return N.useContext(aG)}var N0=N.createContext(void 0),xoe=N.createContext(void 0),Kt=(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))(Kt||{});function woe({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 w=f.subsTail;if(w!==void 0&&w.version===h&&w.sub===d)return;const x=d.depsTail=f.subsTail={version:h,dep:f,sub:d,prevDep:m,nextDep:g,prevSub:w,nextSub:void 0};g!==void 0&&(g.prevDep=x),m!==void 0?m.nextDep=x:d.deps=x,w!==void 0?w.nextSub=x:f.subs=x}function i(f,d=f.sub){const h=f.dep,m=f.prevDep,g=f.nextDep,w=f.nextSub,x=f.prevSub;return g!==void 0?g.prevDep=m:d.depsTail=m,m!==void 0?m.nextDep=g:d.deps=g,w!==void 0?w.prevSub=x:h.subsTail=x,x!==void 0?x.nextSub=w:(h.subs=w)===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 w=m.subs;if(w!==void 0){const x=(f=w).nextSub;x!==void 0&&(h={value:d,prev:h},d=x);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 w=f.dep,x=w.flags;if(d.flags&16)g=!0;else if((x&17)===17){if(e(w)){const b=w.subs;b.nextSub!==void 0&&l(b),g=!0}}else if((x&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(h={value:f,prev:h}),f=w.deps,d=w,++m;continue}if(!g){const b=f.nextDep;if(b!==void 0){f=b;continue}}for(;m--;){const b=d.subs,S=b.nextSub!==void 0;if(S?(f=h.value,h=h.prev):f=b,g){if(e(d)){S&&l(b),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 Soe(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 aN=[];let wy=0;const{link:K$,unlink:_oe,propagate:Eoe,checkDirty:oG,shallowPropagate:W$}=woe({update(e){return e._update()},notify(e){aN[oN++]=e,e.flags&=~Kt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Kt.Mutable|Kt.Dirty,Gy(e))}});let Lv=0,oN=0,ea,sN=0;function sG(e){try{++sN,e()}finally{--sN||lG()}}function Gy(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=_oe(n,e)}function lG(){if(!(sN>0)){for(;Lv<oN;){const e=aN[Lv];aN[Lv++]=void 0,e.notify()}Lv=0,oN=0}}function Y$(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?Kt.None:Kt.Mutable,get(){return ea!==void 0&&K$(i,ea,wy),i._snapshot},subscribe(a){const o=Soe(a),l={current:!1},u=Aoe(()=>{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=ea,l=(t==null?void 0:t.compare)??Object.is;if(n)ea=i,++wy,i.depsTail=void 0;else if(a===void 0)return!1;n&&(i.flags=Kt.Mutable|Kt.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{ea=o,n&&(i.flags&=~Kt.RecursedCheck),Gy(i)}}};return n?(i.flags=Kt.Mutable|Kt.Dirty,i.get=function(){const a=i.flags;if(a&Kt.Dirty||a&Kt.Pending&&oG(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&W$(o)}}else a&Kt.Pending&&(i.flags=a&~Kt.Pending);return ea!==void 0&&K$(i,ea,wy),i._snapshot}):i.set=function(a){if(i._update(a)){const o=i.subs;o!==void 0&&(Eoe(o),W$(o),lG())}},i}function Aoe(e){const t=()=>{const r=ea;ea=n,++wy,n.depsTail=void 0,n.flags=Kt.Watching|Kt.RecursedCheck;try{return e()}finally{ea=r,n.flags&=~Kt.RecursedCheck,Gy(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Kt.Watching|Kt.RecursedCheck,notify(){const r=this.flags;r&Kt.Dirty||r&Kt.Pending&&oG(this.deps,this)?t():this.flags=Kt.Watching},stop(){this.flags=Kt.None,this.depsTail=void 0,Gy(this)}};return t(),n}var IS={exports:{}},LS={},$S={exports:{}},BS={};/**
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 X$;function Toe(){if(X$)return BS;X$=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(),w=r({inst:{value:g,getSnapshot:m}}),x=w[0].inst,b=w[1];return a(function(){x.value=g,x.getSnapshot=m,u(x)&&b({inst:x})},[h,g,m]),i(function(){return u(x)&&b({inst:x}),h(function(){u(x)&&b({inst:x})})},[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 BS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,BS}var Q$;function Coe(){return Q$||(Q$=1,$S.exports=Toe()),$S.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 Z$;function Ooe(){if(Z$)return LS;Z$=1;var e=jm(),t=Coe();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 LS.useSyncExternalStoreWithSelector=function(f,d,h,m,g){var w=a(null);if(w.current===null){var x={hasValue:!1,value:null};w.current=x}else x=w.current;w=l(function(){function S(O){if(!E){if(E=!0,_=O,O=m(O),g!==void 0&&x.hasValue){var M=x.value;if(g(M,O))return A=M}return A=O}if(M=A,r(_,O))return M;var R=m(O);return g!==void 0&&g(M,R)?(_=O,M):(_=O,A=R)}var E=!1,_,A,T=h===void 0?null:h;return[function(){return S(d())},T===null?void 0:function(){return S(T())}]},[d,h,m,g]);var b=i(f,w[0],w[1]);return o(function(){x.hasValue=!0,x.value=b},[b]),u(b),b},LS}var J$;function joe(){return J$||(J$=1,IS.exports=Ooe()),IS.exports}var uG=joe();const Noe=vt(uG);function Moe(e,t){return e===t}function _r(e,t,n=Moe){const r=N.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:l}=e.subscribe(o);return l},[e]),i=N.useCallback(()=>e==null?void 0:e.get(),[e]);return uG.useSyncExternalStoreWithSelector(r,i,i,t,n)}var Roe={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Pu(e){const t=Gr(),n=N.useContext(e.from?xoe:N0),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=N.useRef(void 0);return _r(i??Roe,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=js(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 ku(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 hi(e){const t=Gr();return N.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 Du=T9();const Poe=vt(Du);function koe(e,t){const n=Gr(),r=gae(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:l,preload:u,preloadDelay:f,preloadIntentProximity:d,hashScrollIntoView:h,replace:m,startTransition:g,resetScroll:w,viewTransition:x,children:b,target:S,disabled:E,style:_,className:A,onClick:T,onBlur:O,onFocus:M,onMouseEnter:R,onMouseLeave:P,onTouchStart:$,ignoreBlocker:I,params:k,search:V,hash:D,state:q,mask:L,reloadDocument:z,unsafeRelative:H,from:Y,_fromLocation:Q,...U}=e,F=iG(),X=N.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),W=_r(n.stores.location,He=>He,(He,Lt)=>He.href===Lt.href),G=N.useMemo(()=>{const He={_fromLocation:W,...X};return n.buildLocation(He)},[n,W,X]),Z=G.maskedLocation?G.maskedLocation.publicHref:G.publicHref,J=G.maskedLocation?G.maskedLocation.external:G.external,re=N.useMemo(()=>qoe(Z,J,n.history,E),[E,J,Z,n.history]),ne=N.useMemo(()=>{if(re!=null&&re.external)return Vy(re.href,n.protocolAllowlist)?void 0:re.href;if(!zoe(l)&&!(typeof l!="string"||l.indexOf(":")===-1))try{return new URL(l),Vy(l,n.protocolAllowlist)?void 0:l}catch{}},[l,re,n.protocolAllowlist]),fe=N.useMemo(()=>{if(ne)return!1;if(o!=null&&o.exact){if(!Pae(W.pathname,G.pathname,n.basepath))return!1}else{const He=Fy(W.pathname,n.basepath),Lt=Fy(G.pathname,n.basepath);if(!(He.startsWith(Lt)&&(He.length===Lt.length||He[Lt.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!au(W.search,G.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?F&&W.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,W,ne,F,G.hash,G.pathname,G.search,n.basepath]),he=fe?zl(i,{})??Doe:qS,oe=fe?qS:zl(a,{})??qS,ye=[A,he.className,oe.className].filter(Boolean).join(" "),xe=(_||he.style||oe.style)&&{..._,...he.style,...oe.style},[we,Te]=N.useState(!1),Ee=N.useRef(!1),tt=e.reloadDocument||ne?!1:u??n.options.defaultPreload,nt=f??n.options.defaultPreloadDelay??0,It=N.useCallback(()=>{n.preloadRoute({...X,_builtLocation:G}).catch(He=>{console.warn(He),console.warn(moe)})},[n,X,G]);mae(r,N.useCallback(He=>{He!=null&&He.isIntersecting&&It()},[It]),Boe,{disabled:!!E||tt!=="viewport"}),N.useEffect(()=>{Ee.current||!E&&tt==="render"&&(It(),Ee.current=!0)},[E,It,tt]);const Ht=He=>{const Lt=He.currentTarget.getAttribute("target"),bn=S!==void 0?S:Lt;if(!E&&!Voe(He)&&!He.defaultPrevented&&(!bn||bn==="_self")&&He.button===0){He.preventDefault(),Du.flushSync(()=>{Te(!0)});const Fn=n.subscribe("onResolved",()=>{Fn(),Te(!1)});n.navigate({...X,replace:m,resetScroll:w,hashScrollIntoView:h,startTransition:g,viewTransition:x,ignoreBlocker:I})}};if(ne)return{...U,ref:r,href:ne,...b&&{children:b},...S&&{target:S},...E&&{disabled:E},..._&&{style:_},...A&&{className:A},...T&&{onClick:T},...O&&{onBlur:O},...M&&{onFocus:M},...R&&{onMouseEnter:R},...P&&{onMouseLeave:P},...$&&{onTouchStart:$}};const Mt=He=>{if(E||tt!=="intent")return;if(!nt){It();return}const Lt=He.currentTarget;if(Ph.has(Lt))return;const bn=setTimeout(()=>{Ph.delete(Lt),It()},nt);Ph.set(Lt,bn)},Et=He=>{E||tt!=="intent"||It()},At=He=>{if(E||!tt||!nt)return;const Lt=He.currentTarget,bn=Ph.get(Lt);bn&&(clearTimeout(bn),Ph.delete(Lt))};return{...U,...he,...oe,href:re==null?void 0:re.href,ref:r,onClick:jc([T,Ht]),onBlur:jc([O,At]),onFocus:jc([M,Mt]),onMouseEnter:jc([R,Mt]),onMouseLeave:jc([P,At]),onTouchStart:jc([$,Et]),disabled:!!E,target:S,...xe&&{style:xe},...ye&&{className:ye},...E&&Ioe,...fe&&Loe,...F&&we&&$oe}}var qS={},Doe={className:"active"},Ioe={role:"link","aria-disabled":!0},Loe={"data-status":"active","aria-current":"page"},$oe={"data-transitioning":"transitioning"},Ph=new WeakMap,Boe={rootMargin:"100px"},jc=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function qoe(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function zoe(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var HR=N.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...a}=koe(r,t),o=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;if(!n){const{disabled:l,...u}=a;return N.createElement("a",u,o)}return N.createElement(n,a,o)});function Voe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Foe=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=>ku({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=()=>hi({from:this.fullPath}),this.Link=ie.forwardRef((t,n)=>y.jsx(HR,{ref:n,from:this.fullPath,...t}))}};function So(e){return new Foe(e)}var Uoe=class extends goe{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=>ku({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=()=>hi({from:this.fullPath}),this.Link=ie.forwardRef((t,n)=>y.jsx(HR,{ref:n,from:this.fullPath,...t}))}};function Hoe(e){return new Uoe(e)}function Goe(e){const t=Gr(),n=`not-found-${_r(t.stores.location,r=>r.pathname)}-${_r(t.stores.status,r=>r)}`;return y.jsx(FR,{getResetKey:()=>n,onCatch:(r,i)=>{var a;if(Qn(r))(a=e.onCatch)==null||a.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(Qn(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function Koe(){return y.jsx("p",{children:"Not Found"})}function Bc(e){return y.jsx(y.Fragment,{children:e.children})}function hG(e,t,n){return t.options.notFoundComponent?y.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?y.jsx(e.options.defaultNotFoundComponent,{...n}):y.jsx(Koe,{})}function Woe(e){return null}function Yoe(){return Woe(Gr()),null}var pG=N.memo(function({matchId:t}){const n=Gr(),r=n.stores.matchStores.get(t);r||io();const i=_r(n.stores.loadedAt,o=>o),a=_r(r,o=>o);return y.jsx(Xoe,{router:n,matchId:t,resetKey:i,matchState:N.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 Xoe({router:e,matchId:t,resetKey:n,matchState:r}){var w,x;const i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?y.jsx(a,{}):null,l=i.options.errorComponent??e.options.defaultErrorComponent,u=i.options.onCatch??e.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((w=e.options.notFoundRoute)==null?void 0:w.options.component):i.options.notFoundComponent,d=r.ssr===!1||r.ssr==="data-only",h=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??a??(((x=i.options.errorComponent)==null?void 0:x.preload)||d))?N.Suspense:Bc,m=l?FR:Bc,g=f?Goe:Bc;return y.jsxs(i.isRoot?i.options.shellComponent??Bc:Bc,{children:[y.jsx(N0.Provider,{value:t,children:y.jsx(h,{fallback:o,children:y.jsx(m,{getResetKey:()=>n,errorComponent:l||UR,onCatch:(b,S)=>{if(Qn(b))throw b.routeId??(b.routeId=r.routeId),b;u==null||u(b,S)},children:y.jsx(g,{fallback:b=>{if(b.routeId??(b.routeId=r.routeId),!f||b.routeId&&b.routeId!==r.routeId||!b.routeId&&!i.isRoot)throw b;return N.createElement(f,b)},children:d||r._displayPending?y.jsx(yoe,{fallback:o,children:y.jsx(e3,{matchId:t})}):y.jsx(e3,{matchId:t})})})})}),r.parentRouteId===ou?y.jsxs(y.Fragment,{children:[y.jsx(Qoe,{resetKey:n}),e.options.scrollRestoration&&F9?y.jsx(Yoe,{}):null]}):null]})}function Qoe({resetKey:e}){const t=Gr(),n=N.useRef(void 0);return Qh(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Zc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var e3=N.memo(function({matchId:t}){const n=Gr(),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=N.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=N.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?y.jsx(d,{},u):y.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=wf();h._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw r(a,"loadPromise")}if(a.status==="notFound")return Qn(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=N.memo(function(){const t=Gr(),n=N.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?y.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||io(),hG(t,o,void 0);if(!a)return null;const u=y.jsx(pG,{matchId:a});return r===ou?y.jsx(N.Suspense,{fallback:l,children:u}):u});function Zoe(){const e=Gr(),t=N.useRef({router:e,mounted:!1}),[n,r]=N.useState(!1),i=_r(e.stores.isLoading,h=>h),a=_r(e.stores.hasPending,h=>h),o=jS(i),l=i||n||a,u=jS(l),f=i||a,d=jS(f);return e.startTransition=h=>{r(!0),N.startTransition(()=>{h(),r(!1)})},N.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]),Qh(()=>{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]),Qh(()=>{o&&!i&&e.emit({type:"onLoad",...Zc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Qh(()=>{d&&!f&&e.emit({type:"onBeforeRouteMount",...Zc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,d,e]),Qh(()=>{if(u&&!l){const h=Zc(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 Joe(){const e=Gr(),t=e.routesById[ou].options.pendingComponent??e.options.defaultPendingComponent,n=t?y.jsx(t,{}):null,r=y.jsxs(typeof document<"u"&&e.ssr?Bc:N.Suspense,{fallback:n,children:[y.jsx(Zoe,{}),y.jsx(ese,{})]});return e.options.InnerWrap?y.jsx(e.options.InnerWrap,{children:r}):r}function ese(){const e=Gr(),t=_r(e.stores.firstId,i=>i),n=_r(e.stores.loadedAt,i=>i),r=t?y.jsx(pG,{matchId:t}):null;return y.jsx(N0.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:y.jsx(FR,{getResetKey:()=>n,errorComponent:UR,onCatch:void 0,children:r})})}var tse=e=>({createMutableStore:Y$,createReadonlyStore:Y$,batch:sG}),nse=e=>new rse(e),rse=class extends toe{constructor(e){super(e,tse)}};function ise({router:e,children:t,...n}){H9(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=y.jsx(aG.Provider,{value:e,children:t});return e.options.Wrap?y.jsx(e.options.Wrap,{children:r}):r}function ase({router:e,...t}){return y.jsx(ise,{router:e,...t,children:y.jsx(Joe,{})})}function ose(e){const t=Gr(),n=N.useRef(void 0);return _r(t.stores.location,r=>{const i=r;if(t.options.defaultStructuralSharing){const a=js(n.current,i);return n.current=a,a}return i})}function Ue(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 t3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Hs(...e){return t=>{let n=!1;const r=e.map(i=>{const a=t3(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():t3(e[i],null)}}}}function Bt(...e){return N.useCallback(Hs(...e),e)}function sse(e,t){const n=N.createContext(t),r=a=>{const{children:o,...l}=a,u=N.useMemo(()=>l,Object.values(l));return y.jsx(n.Provider,{value:u,children:o})};r.displayName=e+"Provider";function i(a){const o=N.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 tl(e,t=[]){let n=[];function r(a,o){const l=N.createContext(o),u=n.length;n=[...n,o];const f=h=>{var S;const{scope:m,children:g,...w}=h,x=((S=m==null?void 0:m[e])==null?void 0:S[u])||l,b=N.useMemo(()=>w,Object.values(w));return y.jsx(x.Provider,{value:b,children:g})};f.displayName=a+"Provider";function d(h,m){var x;const g=((x=m==null?void 0:m[e])==null?void 0:x[u])||l,w=N.useContext(g);if(w)return w;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=>N.createContext(o));return function(l){const u=(l==null?void 0:l[e])||a;return N.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return i.scopeName=e,[r,lse(i,...t)]}function lse(...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 N.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Ep(e){const t=use(e),n=N.forwardRef((r,i)=>{const{children:a,...o}=r,l=N.Children.toArray(a),u=l.find(fse);if(u){const f=u.props.children,d=l.map(h=>h===u?N.Children.count(f)>1?N.Children.only(null):N.isValidElement(f)?f.props.children:null:h);return y.jsx(t,{...o,ref:i,children:N.isValidElement(f)?N.cloneElement(f,void 0,d):null})}return y.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function use(e){const t=N.forwardRef((n,r)=>{const{children:i,...a}=n;if(N.isValidElement(i)){const o=hse(i),l=dse(a,i.props);return i.type!==N.Fragment&&(l.ref=r?Hs(r,o):o),N.cloneElement(i,l)}return N.Children.count(i)>1?N.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gG=Symbol("radix.slottable");function cse(e){const t=({children:n})=>y.jsx(y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=gG,t}function fse(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gG}function dse(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 hse(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 pse=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ot=pse.reduce((e,t)=>{const n=Ep(`Primitive.${t}`),r=N.forwardRef((i,a)=>{const{asChild:o,...l}=i,u=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(u,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mse(e,t){e&&Du.flushSync(()=>e.dispatchEvent(t))}function Gs(e){const t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function gse(e,t=globalThis==null?void 0:globalThis.document){const n=Gs(e);N.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 vse="DismissableLayer",lN="dismissableLayer.update",yse="dismissableLayer.pointerDownOutside",bse="dismissableLayer.focusOutside",n3,vG=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),M0=N.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...u}=e,f=N.useContext(vG),[d,h]=N.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=N.useState({}),w=Bt(t,M=>h(M)),x=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=x.indexOf(b),E=d?x.indexOf(d):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,A=E>=S,T=Sse(M=>{const R=M.target,P=[...f.branches].some($=>$.contains(R));!A||P||(i==null||i(M),o==null||o(M),M.defaultPrevented||l==null||l())},m),O=_se(M=>{const R=M.target;[...f.branches].some($=>$.contains(R))||(a==null||a(M),o==null||o(M),M.defaultPrevented||l==null||l())},m);return gse(M=>{E===f.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&l&&(M.preventDefault(),l()))},m),N.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(n3=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),r3(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=n3)}},[d,m,n,f]),N.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),r3())},[d,f]),N.useEffect(()=>{const M=()=>g({});return document.addEventListener(lN,M),()=>document.removeEventListener(lN,M)},[]),y.jsx(ot.div,{...u,ref:w,style:{pointerEvents:_?A?"auto":"none":void 0,...e.style},onFocusCapture:Ue(e.onFocusCapture,O.onFocusCapture),onBlurCapture:Ue(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:Ue(e.onPointerDownCapture,T.onPointerDownCapture)})});M0.displayName=vse;var xse="DismissableLayerBranch",wse=N.forwardRef((e,t)=>{const n=N.useContext(vG),r=N.useRef(null),i=Bt(t,r);return N.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),y.jsx(ot.div,{...e,ref:i})});wse.displayName=xse;function Sse(e,t=globalThis==null?void 0:globalThis.document){const n=Gs(e),r=N.useRef(!1),i=N.useRef(()=>{});return N.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let u=function(){yG(yse,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 _se(e,t=globalThis==null?void 0:globalThis.document){const n=Gs(e),r=N.useRef(!1);return N.useEffect(()=>{const i=a=>{a.target&&!r.current&&yG(bse,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 r3(){const e=new CustomEvent(lN);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?mse(i,a):i.dispatchEvent(a)}var Zn=globalThis!=null&&globalThis.document?N.useLayoutEffect:()=>{},Ese=kR[" useId ".trim().toString()]||(()=>{}),Ase=0;function or(e){const[t,n]=N.useState(Ese());return Zn(()=>{n(r=>r??String(Ase++))},[e]),e||(t?`radix-${t}`:"")}const Tse=["top","right","bottom","left"],Ks=Math.min,Ir=Math.max,Ky=Math.round,$v=Math.floor,ca=e=>({x:e,y:e}),Cse={left:"right",right:"left",bottom:"top",top:"bottom"};function uN(e,t,n){return Ir(e,Ks(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 GR(e){return e==="x"?"y":"x"}function KR(e){return e==="y"?"height":"width"}function sa(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function WR(e){return GR(sa(e))}function Ose(e,t,n){n===void 0&&(n=!1);const r=fd(e),i=WR(e),a=KR(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Wy(o)),[o,Wy(o)]}function jse(e){const t=Wy(e);return[cN(e),t,cN(t)]}function cN(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const i3=["left","right"],a3=["right","left"],Nse=["top","bottom"],Mse=["bottom","top"];function Rse(e,t,n){switch(e){case"top":case"bottom":return n?t?a3:i3:t?i3:a3;case"left":case"right":return t?Nse:Mse;default:return[]}}function Pse(e,t,n,r){const i=fd(e);let a=Rse(fo(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(cN)))),a}function Wy(e){const t=fo(e);return Cse[t]+e.slice(t.length)}function kse(e){return{top:0,right:0,bottom:0,left:0,...e}}function bG(e){return typeof e!="number"?kse(e):{top:e,right:e,bottom:e,left:e}}function Yy(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 o3(e,t,n){let{reference:r,floating:i}=e;const a=sa(t),o=WR(t),l=KR(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 Dse(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),w=bG(g),b=l[m?h==="floating"?"reference":"floating":h],S=Yy(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(b)))==null||n?b:b.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},T=Yy(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:_,strategy:u}):E);return{top:(S.top-T.top+w.top)/A.y,bottom:(T.bottom-S.bottom+w.bottom)/A.y,left:(S.left-T.left+w.left)/A.x,right:(T.right-S.right+w.right)/A.x}}const Ise=50,Lse=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,l=o.detectOverflow?o:{...o,detectOverflow:Dse},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}=o3(f,r,u),m=r,g=0;const w={};for(let x=0;x<a.length;x++){const b=a[x];if(!b)continue;const{name:S,fn:E}=b,{x:_,y:A,data:T,reset:O}=await E({x:d,y:h,initialPlacement:r,placement:m,strategy:i,middlewareData:w,rects:f,platform:l,elements:{reference:e,floating:t}});d=_??d,h=A??h,w[S]={...w[S],...T},O&&g<Ise&&(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}=o3(f,m,u)),x=-1)}return{x:d,y:h,placement:m,strategy:i,middlewareData:w}},$se=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=WR(i),w=KR(g),x=await o.getDimensions(f),b=g==="y",S=b?"top":"left",E=b?"bottom":"right",_=b?"clientHeight":"clientWidth",A=a.reference[w]+a.reference[g]-m[g]-a.floating[w],T=m[g]-a.reference[g],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let M=O?O[_]:0;(!M||!await(o.isElement==null?void 0:o.isElement(O)))&&(M=l.floating[_]||a.floating[w]);const R=A/2-T/2,P=M/2-x[w]/2-1,$=Ks(h[S],P),I=Ks(h[E],P),k=$,V=M-x[w]-I,D=M/2-x[w]/2+R,q=uN(k,D,V),L=!u.arrow&&fd(i)!=null&&D!==q&&a.reference[w]/2-(D<k?$:I)-x[w]/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}}}),Bse=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:w="none",flipAlignment:x=!0,...b}=co(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=fo(i),E=sa(l),_=fo(l)===l,A=await(u.isRTL==null?void 0:u.isRTL(f.floating)),T=m||(_||!x?[Wy(l)]:jse(l)),O=w!=="none";!m&&O&&T.push(...Pse(l,x,w,A));const M=[l,...T],R=await u.detectOverflow(t,b),P=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&P.push(R[S]),h){const D=Ose(i,o,A);P.push(R[D[0]],R[D[1]])}if($=[...$,{placement:i,overflows:P}],!P.every(D=>D<=0)){var I,k;const D=(((I=a.flip)==null?void 0:I.index)||0)+1,q=M[D];if(q&&(!(h==="alignment"?E!==sa(q):!1)||$.every(H=>sa(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=sa(H.placement);return Y===E||Y==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(Y=>Y>0).reduce((Y,Q)=>Y+Q,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 s3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function l3(e){return Tse.some(t=>e[t]>=0)}const qse=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=s3(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:l3(l)}}}case"escaped":{const o=await r.detectOverflow(t,{...a,altBoundary:!0}),l=s3(o,n.floating);return{data:{escapedOffsets:l,escaped:l3(l)}}}default:return{}}}}},xG=new Set(["left","top"]);async function zse(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=sa(n)==="y",f=xG.has(o)?-1:1,d=a&&u?-1:1,h=co(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof w=="number"&&(g=l==="end"?w*-1:w),u?{x:g*d,y:m*f}:{x:m*f,y:g*d}}const Vse=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 zse(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}}}}},Fse=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=sa(fo(i)),g=GR(m);let w=d[g],x=d[m];if(o){const S=g==="y"?"top":"left",E=g==="y"?"bottom":"right",_=w+h[S],A=w-h[E];w=uN(_,w,A)}if(l){const S=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=x+h[S],A=x-h[E];x=uN(_,x,A)}const b=u.fn({...t,[g]:w,[m]:x});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[g]:o,[m]:l}}}}}},Use=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=sa(i),m=GR(h);let g=d[m],w=d[h];const x=co(l,t),b=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const _=m==="y"?"height":"width",A=a.reference[m]-a.floating[_]+b.mainAxis,T=a.reference[m]+a.reference[_]-b.mainAxis;g<A?g=A:g>T&&(g=T)}if(f){var S,E;const _=m==="y"?"width":"height",A=xG.has(fo(i)),T=a.reference[h]-a.floating[_]+(A&&((S=o.offset)==null?void 0:S[h])||0)+(A?0:b.crossAxis),O=a.reference[h]+a.reference[_]+(A?0:((E=o.offset)==null?void 0:E[h])||0)-(A?b.crossAxis:0);w<T?w=T:w>O&&(w=O)}return{[m]:g,[h]:w}}}},Hse=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=sa(i)==="y",{width:w,height:x}=a.floating;let b,S;h==="top"||h==="bottom"?(b=h,S=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(S=h,b=m==="end"?"top":"bottom");const E=x-d.top-d.bottom,_=w-d.left-d.right,A=Ks(x-d[b],E),T=Ks(w-d[S],_),O=!t.middlewareData.shift;let M=A,R=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=E),O&&!m){const $=Ir(d.left,0),I=Ir(d.right,0),k=Ir(d.top,0),V=Ir(d.bottom,0);g?R=w-2*($!==0||I!==0?$+I:Ir(d.left,d.right)):M=x-2*(k!==0||V!==0?k+V:Ir(d.top,d.bottom))}await u({...t,availableWidth:R,availableHeight:M});const P=await o.getDimensions(l.floating);return w!==P.width||x!==P.height?{reset:{rects:!0}}:{}}}};function R0(){return typeof window<"u"}function dd(e){return wG(e)?(e.nodeName||"").toLowerCase():"#document"}function Br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ba(e){var t;return(t=(wG(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wG(e){return R0()?e instanceof Node||e instanceof Br(e).Node:!1}function qi(e){return R0()?e instanceof Element||e instanceof Br(e).Element:!1}function _o(e){return R0()?e instanceof HTMLElement||e instanceof Br(e).HTMLElement:!1}function u3(e){return!R0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Br(e).ShadowRoot}function Mm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=zi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function Gse(e){return/^(table|td|th)$/.test(dd(e))}function P0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Kse=/transform|translate|scale|rotate|perspective|filter/,Wse=/paint|layout|strict|content/,Rl=e=>!!e&&e!=="none";let zS;function YR(e){const t=qi(e)?zi(e):e;return Rl(t.transform)||Rl(t.translate)||Rl(t.scale)||Rl(t.rotate)||Rl(t.perspective)||!XR()&&(Rl(t.backdropFilter)||Rl(t.filter))||Kse.test(t.willChange||"")||Wse.test(t.contain||"")}function Yse(e){let t=Ws(e);for(;_o(t)&&!Sf(t);){if(YR(t))return t;if(P0(t))return null;t=Ws(t)}return null}function XR(){return zS==null&&(zS=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zS}function Sf(e){return/^(html|body|#document)$/.test(dd(e))}function zi(e){return Br(e).getComputedStyle(e)}function k0(e){return qi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ws(e){if(dd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||u3(e)&&e.host||ba(e);return u3(t)?t.host:t}function SG(e){const t=Ws(e);return Sf(t)?e.ownerDocument?e.ownerDocument.body:e.body:_o(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=Br(i);if(a){const l=fN(o);return t.concat(o,o.visualViewport||[],Mm(i)?i:[],l&&n?Ap(l):[])}else return t.concat(i,Ap(i,[],n))}function fN(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function _G(e){const t=zi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=_o(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,l=Ky(n)!==a||Ky(r)!==o;return l&&(n=a,r=o),{width:n,height:r,$:l}}function QR(e){return qi(e)?e:e.contextElement}function ef(e){const t=QR(e);if(!_o(t))return ca(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=_G(t);let o=(a?Ky(n.width):n.width)/r,l=(a?Ky(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Xse=ca(0);function EG(e){const t=Br(e);return!XR()||!t.visualViewport?Xse:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qse(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Br(e)?!1:t}function pu(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=QR(e);let o=ca(1);t&&(r?qi(r)&&(o=ef(r)):o=ef(e));const l=Qse(a,n,r)?EG(a):ca(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=Br(a),g=r&&qi(r)?Br(r):r;let w=m,x=fN(w);for(;x&&r&&g!==w;){const b=ef(x),S=x.getBoundingClientRect(),E=zi(x),_=S.left+(x.clientLeft+parseFloat(E.paddingLeft))*b.x,A=S.top+(x.clientTop+parseFloat(E.paddingTop))*b.y;u*=b.x,f*=b.y,d*=b.x,h*=b.y,u+=_,f+=A,w=Br(x),x=fN(w)}}return Yy({width:d,height:h,x:u,y:f})}function D0(e,t){const n=k0(e).scrollLeft;return t?t.left+n:pu(ba(e)).left+n}function AG(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-D0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Zse(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ba(r),l=t?P0(t.floating):!1;if(r===o||l&&a)return n;let u={scrollLeft:0,scrollTop:0},f=ca(1);const d=ca(0),h=_o(r);if((h||!h&&!a)&&((dd(r)!=="body"||Mm(o))&&(u=k0(r)),h)){const g=pu(r);f=ef(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const m=o&&!h&&!a?AG(o,u):ca(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 Jse(e){return Array.from(e.getClientRects())}function ele(e){const t=ba(e),n=k0(e),r=e.ownerDocument.body,i=Ir(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ir(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+D0(e);const l=-n.scrollTop;return zi(r).direction==="rtl"&&(o+=Ir(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:l}}const c3=25;function tle(e,t){const n=Br(e),r=ba(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=XR();(!d||d&&t==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}const f=D0(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,w=Math.abs(r.clientWidth-h.clientWidth-g);w<=c3&&(a-=w)}else f<=c3&&(a+=f);return{width:a,height:o,x:l,y:u}}function nle(e,t){const n=pu(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=_o(e)?ef(e):ca(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 f3(e,t,n){let r;if(t==="viewport")r=tle(e,n);else if(t==="document")r=ele(ba(e));else if(qi(t))r=nle(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 Yy(r)}function TG(e,t){const n=Ws(e);return n===t||!qi(n)||Sf(n)?!1:zi(n).position==="fixed"||TG(n,t)}function rle(e,t){const n=t.get(e);if(n)return n;let r=Ap(e,[],!1).filter(l=>qi(l)&&dd(l)!=="body"),i=null;const a=zi(e).position==="fixed";let o=a?Ws(e):e;for(;qi(o)&&!Sf(o);){const l=zi(o),u=YR(o);!u&&l.position==="fixed"&&(i=null),(a?!u&&!i:!u&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Mm(o)&&!u&&TG(e,o))?r=r.filter(d=>d!==o):i=l,o=Ws(o)}return t.set(e,r),r}function ile(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?P0(t)?[]:rle(t,this._c):[].concat(n),r],l=f3(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=f3(t,o[m],i);u=Ir(g.top,u),f=Ks(g.right,f),d=Ks(g.bottom,d),h=Ir(g.left,h)}return{width:f-h,height:d-u,x:h,y:u}}function ale(e){const{width:t,height:n}=_G(e);return{width:t,height:n}}function ole(e,t,n){const r=_o(t),i=ba(t),a=n==="fixed",o=pu(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=ca(0);function f(){u.x=D0(i)}if(r||!r&&!a)if((dd(t)!=="body"||Mm(i))&&(l=k0(t)),r){const g=pu(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):ca(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 VS(e){return zi(e).position==="static"}function d3(e,t){if(!_o(e)||zi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ba(e)===n&&(n=n.ownerDocument.body),n}function CG(e,t){const n=Br(e);if(P0(e))return n;if(!_o(e)){let i=Ws(e);for(;i&&!Sf(i);){if(qi(i)&&!VS(i))return i;i=Ws(i)}return n}let r=d3(e,t);for(;r&&Gse(r)&&VS(r);)r=d3(r,t);return r&&Sf(r)&&VS(r)&&!YR(r)?n:r||Yse(e)||n}const sle=async function(e){const t=this.getOffsetParent||CG,n=this.getDimensions,r=await n(e.floating);return{reference:ole(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function lle(e){return zi(e).direction==="rtl"}const ule={convertOffsetParentRelativeRectToViewportRelativeRect:Zse,getDocumentElement:ba,getClippingRect:ile,getOffsetParent:CG,getElementRects:sle,getClientRects:Jse,getDimensions:ale,getScale:ef,isElement:qi,isRTL:lle};function OG(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cle(e,t){let n=null,r;const i=ba(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 w=$v(h),x=$v(i.clientWidth-(d+m)),b=$v(i.clientHeight-(h+g)),S=$v(d),_={rootMargin:-w+"px "+-x+"px "+-b+"px "+-S+"px",threshold:Ir(0,Ks(1,u))||1};let A=!0;function T(O){const M=O[0].intersectionRatio;if(M!==u){if(!A)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!OG(f,e.getBoundingClientRect())&&o(),A=!1}try{n=new IntersectionObserver(T,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,_)}n.observe(e)}return o(!0),a}function fle(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=QR(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?cle(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 w,x=u?pu(e):null;u&&b();function b(){const S=pu(e);x&&!OG(x,S)&&n(),x=S,w=requestAnimationFrame(b)}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(w)}}const dle=Vse,hle=Fse,ple=Bse,mle=Hse,gle=qse,h3=$se,vle=Use,yle=(e,t,n)=>{const r=new Map,i={platform:ule,...n},a={...i.platform,_c:r};return Lse(e,t,{...i,platform:a})};var ble=typeof document<"u",xle=function(){},Sy=ble?N.useLayoutEffect:xle;function Xy(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(!Xy(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)&&!Xy(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 p3(e,t){const n=jG(e);return Math.round(t*n)/n}function FS(e){const t=N.useRef(e);return Sy(()=>{t.current=e}),t}function wle(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]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=N.useState(r);Xy(m,r)||g(r);const[w,x]=N.useState(null),[b,S]=N.useState(null),E=N.useCallback(H=>{H!==O.current&&(O.current=H,x(H))},[]),_=N.useCallback(H=>{H!==M.current&&(M.current=H,S(H))},[]),A=a||w,T=o||b,O=N.useRef(null),M=N.useRef(null),R=N.useRef(d),P=u!=null,$=FS(u),I=FS(i),k=FS(f),V=N.useCallback(()=>{if(!O.current||!M.current)return;const H={placement:t,strategy:n,middleware:m};I.current&&(H.platform=I.current),yle(O.current,M.current,H).then(Y=>{const Q={...Y,isPositioned:k.current!==!1};D.current&&!Xy(R.current,Q)&&(R.current=Q,Du.flushSync(()=>{h(Q)}))})},[m,t,n,I,k]);Sy(()=>{f===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,h(H=>({...H,isPositioned:!1})))},[f]);const D=N.useRef(!1);Sy(()=>(D.current=!0,()=>{D.current=!1}),[]),Sy(()=>{if(A&&(O.current=A),T&&(M.current=T),A&&T){if($.current)return $.current(A,T,V);V()}},[A,T,V,$,P]);const q=N.useMemo(()=>({reference:O,floating:M,setReference:E,setFloating:_}),[E,_]),L=N.useMemo(()=>({reference:A,floating:T}),[A,T]),z=N.useMemo(()=>{const H={position:n,left:0,top:0};if(!L.floating)return H;const Y=p3(L.floating,d.x),Q=p3(L.floating,d.y);return l?{...H,transform:"translate("+Y+"px, "+Q+"px)",...jG(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:Y,top:Q}},[n,l,L.floating,d.x,d.y]);return N.useMemo(()=>({...d,update:V,refs:q,elements:L,floatingStyles:z}),[d,V,q,L,z])}const Sle=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?h3({element:r.current,padding:i}).fn(n):{}:r?h3({element:r,padding:i}).fn(n):{}}}},_le=(e,t)=>{const n=dle(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ele=(e,t)=>{const n=hle(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ale=(e,t)=>({fn:vle(e).fn,options:[e,t]}),Tle=(e,t)=>{const n=ple(e);return{name:n.name,fn:n.fn,options:[e,t]}},Cle=(e,t)=>{const n=mle(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ole=(e,t)=>{const n=gle(e);return{name:n.name,fn:n.fn,options:[e,t]}},jle=(e,t)=>{const n=Sle(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Nle="Arrow",NG=N.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return y.jsx(ot.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});NG.displayName=Nle;var Mle=NG;function MG(e){const[t,n]=N.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 ZR="Popper",[RG,I0]=tl(ZR),[Rle,PG]=RG(ZR),kG=e=>{const{__scopePopper:t,children:n}=e,[r,i]=N.useState(null);return y.jsx(Rle,{scope:t,anchor:r,onAnchorChange:i,children:n})};kG.displayName=ZR;var DG="PopperAnchor",IG=N.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=PG(DG,n),o=N.useRef(null),l=Bt(t,o),u=N.useRef(null);return N.useEffect(()=>{const f=u.current;u.current=(r==null?void 0:r.current)||o.current,f!==u.current&&a.onAnchorChange(u.current)}),r?null:y.jsx(ot.div,{...i,ref:l})});IG.displayName=DG;var JR="PopperContent",[Ple,kle]=RG(JR),LG=N.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:w,...x}=e,b=PG(JR,n),[S,E]=N.useState(null),_=Bt(t,ye=>E(ye)),[A,T]=N.useState(null),O=MG(A),M=(O==null?void 0:O.width)??0,R=(O==null?void 0:O.height)??0,P=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(Ile),altBoundary:k},{refs:D,floatingStyles:q,placement:L,isPositioned:z,middlewareData:H}=wle({strategy:"fixed",placement:P,whileElementsMounted:(...ye)=>fle(...ye,{animationFrame:g==="always"}),elements:{reference:b.anchor},middleware:[_le({mainAxis:i+R,alignmentAxis:o}),u&&Ele({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?Ale():void 0,...V}),u&&Tle({...V}),Cle({...V,apply:({elements:ye,rects:xe,availableWidth:we,availableHeight:Te})=>{const{width:Ee,height:tt}=xe.reference,nt=ye.floating.style;nt.setProperty("--radix-popper-available-width",`${we}px`),nt.setProperty("--radix-popper-available-height",`${Te}px`),nt.setProperty("--radix-popper-anchor-width",`${Ee}px`),nt.setProperty("--radix-popper-anchor-height",`${tt}px`)}}),A&&jle({element:A,padding:l}),Lle({arrowWidth:M,arrowHeight:R}),m&&Ole({strategy:"referenceHidden",...V})]}),[Y,Q]=qG(L),U=Gs(w);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,W=((ne=H.arrow)==null?void 0:ne.centerOffset)!==0,[G,Z]=N.useState();return Zn(()=>{S&&Z(window.getComputedStyle(S).zIndex)},[S]),y.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:y.jsx(Ple,{scope:n,placedSide:Y,onArrowChange:T,arrowX:F,arrowY:X,shouldHideArrow:W,children:y.jsx(ot.div,{"data-side":Y,"data-align":Q,...x,ref:_,style:{...x.style,animation:z?void 0:"none"}})})})});LG.displayName=JR;var $G="PopperArrow",Dle={top:"bottom",right:"left",bottom:"top",left:"right"},BG=N.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=kle($G,r),o=Dle[a.placedSide];return y.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:y.jsx(Mle,{...i,ref:n,style:{...i.style,display:"block"}})})});BG.displayName=$G;function Ile(e){return e!==null}var Lle=e=>({name:"transformOrigin",options:e,fn(t){var b,S,E;const{placement:n,rects:r,middlewareData:i}=t,o=((b=i.arrow)==null?void 0:b.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 w="",x="";return f==="bottom"?(w=o?h:`${m}px`,x=`${-u}px`):f==="top"?(w=o?h:`${m}px`,x=`${r.floating.height+u}px`):f==="right"?(w=`${-u}px`,x=o?h:`${g}px`):f==="left"&&(w=`${r.floating.width+u}px`,x=o?h:`${g}px`),{data:{x:w,y:x}}}});function qG(e){const[t,n="center"]=e.split("-");return[t,n]}var zG=kG,VG=IG,FG=LG,UG=BG,$le="Portal",L0=N.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,a]=N.useState(!1);Zn(()=>a(!0),[]);const o=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Poe.createPortal(y.jsx(ot.div,{...r,ref:t}),o):null});L0.displayName=$le;function Ble(e,t){return N.useReducer((n,r)=>t[n][r]??n,e)}var nl=e=>{const{present:t,children:n}=e,r=qle(t),i=typeof n=="function"?n({present:r.isPresent}):N.Children.only(n),a=Bt(r.ref,zle(i));return typeof n=="function"||r.isPresent?N.cloneElement(i,{ref:a}):null};nl.displayName="Presence";function qle(e){const[t,n]=N.useState(),r=N.useRef(null),i=N.useRef(e),a=N.useRef("none"),o=e?"mounted":"unmounted",[l,u]=Ble(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const f=Bv(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=Bv(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 x=Bv(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&x&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",f=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=g=>{g.target===t&&(a.current=Bv(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:N.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Bv(e){return(e==null?void 0:e.animationName)||"none"}function zle(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 Vle=kR[" useInsertionEffect ".trim().toString()]||Zn;function mu({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=Fle({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:i;{const d=N.useRef(e!==void 0);N.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=N.useCallback(d=>{var h;if(l){const m=Ule(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 Fle({defaultProp:e,onChange:t}){const[n,r]=N.useState(e),i=N.useRef(n),a=N.useRef(t);return Vle(()=>{a.current=t},[t]),N.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function Ule(e){return typeof e=="function"}var HG=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"}),Hle="VisuallyHidden",GG=N.forwardRef((e,t)=>y.jsx(ot.span,{...e,ref:t,style:{...HG,...e.style}}));GG.displayName=Hle;var Gle=GG,[$0]=tl("Tooltip",[I0]),B0=I0(),KG="TooltipProvider",Kle=700,dN="tooltip.open",[Wle,eP]=$0(KG),WG=e=>{const{__scopeTooltip:t,delayDuration:n=Kle,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=N.useRef(!0),l=N.useRef(!1),u=N.useRef(0);return N.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),y.jsx(Wle,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:N.useCallback(()=>{window.clearTimeout(u.current),o.current=!1},[]),onClose:N.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:N.useCallback(f=>{l.current=f},[]),disableHoverableContent:i,children:a})};WG.displayName=KG;var Tp="Tooltip",[Yle,Rm]=$0(Tp),YG=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:l}=e,u=eP(Tp,e.__scopeTooltip),f=B0(t),[d,h]=N.useState(null),m=or(),g=N.useRef(0),w=o??u.disableHoverableContent,x=l??u.delayDuration,b=N.useRef(!1),[S,E]=mu({prop:r,defaultProp:i??!1,onChange:M=>{M?(u.onOpen(),document.dispatchEvent(new CustomEvent(dN))):u.onClose(),a==null||a(M)},caller:Tp}),_=N.useMemo(()=>S?b.current?"delayed-open":"instant-open":"closed",[S]),A=N.useCallback(()=>{window.clearTimeout(g.current),g.current=0,b.current=!1,E(!0)},[E]),T=N.useCallback(()=>{window.clearTimeout(g.current),g.current=0,E(!1)},[E]),O=N.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{b.current=!0,E(!0),g.current=0},x)},[x,E]);return N.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),y.jsx(zG,{...f,children:y.jsx(Yle,{scope:t,contentId:m,open:S,stateAttribute:_,trigger:d,onTriggerChange:h,onTriggerEnter:N.useCallback(()=>{u.isOpenDelayedRef.current?O():A()},[u.isOpenDelayedRef,O,A]),onTriggerLeave:N.useCallback(()=>{w?T():(window.clearTimeout(g.current),g.current=0)},[T,w]),onOpen:A,onClose:T,disableHoverableContent:w,children:n})})};YG.displayName=Tp;var hN="TooltipTrigger",XG=N.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Rm(hN,n),a=eP(hN,n),o=B0(n),l=N.useRef(null),u=Bt(t,l,i.onTriggerChange),f=N.useRef(!1),d=N.useRef(!1),h=N.useCallback(()=>f.current=!1,[]);return N.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),y.jsx(VG,{asChild:!0,...o,children:y.jsx(ot.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Ue(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Ue(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Ue(e.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Ue(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:Ue(e.onBlur,i.onClose),onClick:Ue(e.onClick,i.onClose)})})});XG.displayName=hN;var tP="TooltipPortal",[Xle,Qle]=$0(tP,{forceMount:void 0}),QG=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Rm(tP,t);return y.jsx(Xle,{scope:t,forceMount:n,children:y.jsx(nl,{present:n||a.open,children:y.jsx(L0,{asChild:!0,container:i,children:r})})})};QG.displayName=tP;var _f="TooltipContent",ZG=N.forwardRef((e,t)=>{const n=Qle(_f,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=Rm(_f,e.__scopeTooltip);return y.jsx(nl,{present:r||o.open,children:o.disableHoverableContent?y.jsx(JG,{side:i,...a,ref:t}):y.jsx(Zle,{side:i,...a,ref:t})})}),Zle=N.forwardRef((e,t)=>{const n=Rm(_f,e.__scopeTooltip),r=eP(_f,e.__scopeTooltip),i=N.useRef(null),a=Bt(t,i),[o,l]=N.useState(null),{trigger:u,onClose:f}=n,d=i.current,{onPointerInTransitChange:h}=r,m=N.useCallback(()=>{l(null),h(!1)},[h]),g=N.useCallback((w,x)=>{const b=w.currentTarget,S={x:w.clientX,y:w.clientY},E=rue(S,b.getBoundingClientRect()),_=iue(S,E),A=aue(x.getBoundingClientRect()),T=sue([..._,...A]);l(T),h(!0)},[h]);return N.useEffect(()=>()=>m(),[m]),N.useEffect(()=>{if(u&&d){const w=b=>g(b,d),x=b=>g(b,u);return u.addEventListener("pointerleave",w),d.addEventListener("pointerleave",x),()=>{u.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",x)}}},[u,d,g,m]),N.useEffect(()=>{if(o){const w=x=>{const b=x.target,S={x:x.clientX,y:x.clientY},E=(u==null?void 0:u.contains(b))||(d==null?void 0:d.contains(b)),_=!oue(S,o);E?m():_&&(m(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,d,o,f,m]),y.jsx(JG,{...e,ref:a})}),[Jle,eue]=$0(Tp,{isInside:!1}),tue=cse("TooltipContent"),JG=N.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,u=Rm(_f,n),f=B0(n),{onClose:d}=u;return N.useEffect(()=>(document.addEventListener(dN,d),()=>document.removeEventListener(dN,d)),[d]),N.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]),y.jsx(M0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:y.jsxs(FG,{"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:[y.jsx(tue,{children:r}),y.jsx(Jle,{scope:n,isInside:!0,children:y.jsx(Gle,{id:u.contentId,role:"tooltip",children:i||r})})]})})});ZG.displayName=_f;var e7="TooltipArrow",nue=N.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=B0(n);return eue(e7,n).isInside?null:y.jsx(UG,{...i,...r,ref:t})});nue.displayName=e7;function rue(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 iue(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 aue(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 oue(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 sue(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),lue(t)}function lue(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 uue=WG,cue=YG,fue=XG,due=QG,t7=ZG;function n7(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=n7(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=n7(e))&&(r&&(r+=" "),r+=t);return r}const nP="-",hue=e=>{const t=mue(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(nP);return l[0]===""&&l.length!==1&&l.shift(),r7(l,t)||pue(o)},getConflictingClassGroupIds:(o,l)=>{const u=n[o]||[];return l&&r[o]?[...u,...r[o]]:u}}},r7=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?r7(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(nP);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},m3=/^\[(.+)\]$/,pue=e=>{if(m3.test(e)){const t=m3.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},mue=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vue(Object.entries(e.classGroups),n).forEach(([a,o])=>{pN(o,r,a,t)}),r},pN=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:g3(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(gue(i)){pN(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{pN(o,g3(t,a),n,r)})})},g3=(e,t)=>{let n=e;return t.split(nP).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},gue=e=>e.isThemeGetter,vue=(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,yue=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)}}},i7="!",bue=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 b=0;b<l.length;b++){let S=l[b];if(f===0){if(S===i&&(r||l.slice(b,b+a)===t)){u.push(l.slice(d,b)),d=b+a;continue}if(S==="/"){h=b;continue}}S==="["?f++:S==="]"&&f--}const m=u.length===0?l:l.substring(d),g=m.startsWith(i7),w=g?m.substring(1):m,x=h&&h>d?h-d:void 0;return{modifiers:u,hasImportantModifier:g,baseClassName:w,maybePostfixModifierPosition:x}};return n?l=>n({className:l,parseClassName:o}):o},xue=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},wue=e=>({cache:yue(e.cacheSize),parseClassName:bue(e),...hue(e)}),Sue=/\s+/,_ue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Sue);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 w=!!g,x=r(w?m.substring(0,g):m);if(!x){if(!w){l=f+(l.length>0?" "+l:l);continue}if(x=r(m),!x){l=f+(l.length>0?" "+l:l);continue}w=!1}const b=xue(d).join(":"),S=h?b+i7:b,E=S+x;if(a.includes(E))continue;a.push(E);const _=i(x,w);for(let A=0;A<_.length;++A){const T=_[A];a.push(S+T)}l=f+(l.length>0?" "+l:l)}return l};function Eue(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=a7(t))&&(r&&(r+=" "),r+=n);return r}const a7=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=a7(e[r]))&&(n&&(n+=" "),n+=t);return n};function Aue(e,...t){let n,r,i,a=o;function o(u){const f=t.reduce((d,h)=>h(d),e());return n=wue(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=_ue(u,n);return i(u,d),d}return function(){return a(Eue.apply(null,arguments))}}const Vt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},o7=/^\[(?:([a-z-]+):)?(.+)\]$/i,Tue=/^\d+\/\d+$/,Cue=new Set(["px","full","screen"]),Oue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jue=/\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$/,Nue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Mue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ua=e=>tf(e)||Cue.has(e)||Tue.test(e),as=e=>hd(e,"length",que),tf=e=>!!e&&!Number.isNaN(Number(e)),US=e=>hd(e,"number",tf),kh=e=>!!e&&Number.isInteger(Number(e)),Pue=e=>e.endsWith("%")&&tf(e.slice(0,-1)),We=e=>o7.test(e),os=e=>Oue.test(e),kue=new Set(["length","size","percentage"]),Due=e=>hd(e,kue,s7),Iue=e=>hd(e,"position",s7),Lue=new Set(["image","url"]),$ue=e=>hd(e,Lue,Vue),Bue=e=>hd(e,"",zue),Dh=()=>!0,hd=(e,t,n)=>{const r=o7.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},que=e=>jue.test(e)&&!Nue.test(e),s7=()=>!1,zue=e=>Mue.test(e),Vue=e=>Rue.test(e),Fue=()=>{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"),w=Vt("gradientColorStopPositions"),x=Vt("inset"),b=Vt("margin"),S=Vt("opacity"),E=Vt("padding"),_=Vt("saturate"),A=Vt("scale"),T=Vt("sepia"),O=Vt("skew"),M=Vt("space"),R=Vt("translate"),P=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",We,t],k=()=>[We,t],V=()=>["",Ua,as],D=()=>["auto",tf,We],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",We],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[tf,We];return{cacheSize:500,separator:":",theme:{colors:[Dh],spacing:[Ua,as],blur:["none","",os,We],brightness:U(),borderColor:[e],borderRadius:["none","","full",os,We],borderSpacing:k(),borderWidth:V(),contrast:U(),grayscale:Y(),hueRotate:U(),invert:Y(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Pue,as],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",We]}],container:["container"],columns:[{columns:[os]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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(),We]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",kh,We]}],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",We]}],grow:[{grow:Y()}],shrink:[{shrink:Y()}],order:[{order:["first","last","none",kh,We]}],"grid-cols":[{"grid-cols":[Dh]}],"col-start-end":[{col:["auto",{span:["full",kh,We]},We]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[Dh]}],"row-start-end":[{row:["auto",{span:[kh,We]},We]}],"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",We]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",We]}],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:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",We,t]}],"min-w":[{"min-w":[We,t,"min","max","fit"]}],"max-w":[{"max-w":[We,t,"none","full","min","max","fit","prose",{screen:[os]},os]}],h:[{h:[We,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[We,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[We,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[We,t,"auto","min","max","fit"]}],"font-size":[{text:["base",os,as]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",US]}],"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",We]}],"line-clamp":[{"line-clamp":["none",tf,US]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ua,We]}],"list-image":[{"list-image":["none",We]}],"list-style-type":[{list:["none","disc","decimal",We]}],"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",Ua,as]}],"underline-offset":[{"underline-offset":["auto",Ua,We]}],"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",We]}],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",We]}],"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(),Iue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Due]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$ue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"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":[Ua,We]}],"outline-w":[{outline:[Ua,as]}],"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":[Ua,as]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",os,Bue]}],"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",os,We]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[_]}],sepia:[{sepia:[T]}],"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":[T]}],"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",We]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",We]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",We]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[kh,We]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"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",We]}],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",We]}],"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",We]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ua,as,US]}],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"]}}},Uue=Aue(Fue);function be(...e){return Uue(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 Qy(e,t){return e.length<=t?e:`${e.slice(0,t)}...`}function l7(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 _y(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}const u7=uue,q0=cue,z0=fue,Pm=N.forwardRef(({className:e,sideOffset:t=4,...n},r)=>y.jsx(due,{children:y.jsx(t7,{ref:r,sideOffset:t,className:be("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})}));Pm.displayName=t7.displayName;var pt;(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})(pt||(pt={}));var v3;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(v3||(v3={}));const Me=pt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),gs=e=>{switch(typeof e){case"undefined":return Me.undefined;case"string":return Me.string;case"number":return Number.isNaN(e)?Me.nan:Me.number;case"boolean":return Me.boolean;case"function":return Me.function;case"bigint":return Me.bigint;case"symbol":return Me.symbol;case"object":return Array.isArray(e)?Me.array:e===null?Me.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Me.promise:typeof Map<"u"&&e instanceof Map?Me.map:typeof Set<"u"&&e instanceof Set?Me.set:typeof Date<"u"&&e instanceof Date?Me.date:Me.object;default:return Me.unknown}},Se=pt.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,pt.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 mN=(e,t)=>{let n;switch(e.code){case Se.invalid_type:e.received===Me.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,pt.jsonStringifyReplacer)}`;break;case Se.unrecognized_keys:n=`Unrecognized key(s) in object: ${pt.joinValues(e.keys,", ")}`;break;case Se.invalid_union:n="Invalid input";break;case Se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${pt.joinValues(e.options)}`;break;case Se.invalid_enum_value:n=`Invalid enum value. Expected ${pt.joinValues(e.options)}, received '${e.received}'`;break;case Se.invalid_arguments:n="Invalid function arguments";break;case Se.invalid_return_type:n="Invalid function return type";break;case Se.invalid_date:n="Invalid date";break;case Se.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}"`:pt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Se.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 Se.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 Se.custom:n="Invalid input";break;case Se.invalid_intersection_types:n="Intersection results could not be merged";break;case Se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Se.not_finite:n="Number must be finite";break;default:n=t.defaultError,pt.assertNever(e)}return{message:n}};let Hue=mN;function Gue(){return Hue}const Kue=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=Gue(),r=Kue({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mN?void 0:mN].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 ze;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 ze;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 ze=Object.freeze({status:"aborted"}),Zh=e=>({status:"dirty",value:e}),pi=e=>({status:"valid",value:e}),y3=e=>e.status==="aborted",b3=e=>e.status==="dirty",Ef=e=>e.status==="valid",Zy=e=>typeof Promise<"u"&&e instanceof Promise;var Pe;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Pe||(Pe={}));class Ys{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 x3=(e,t)=>{if(Ef(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 Xe(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 ft{get description(){return this._def.description}_getType(t){return gs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:gs(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:gs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Zy(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:gs(t)},i=this._parseSync({data:t,path:r.path,parent:r});return x3(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:gs(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return Ef(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=>Ef(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:gs(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Zy(i)?i:Promise.resolve(i));return x3(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:Se.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:Ve.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 $s.create(this,this._def)}nullable(){return Of.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fa.create(this)}promise(){return nb.create(this,this._def)}or(t){return eb.create([this,t],this._def)}and(t){return tb.create(this,t,this._def)}transform(t){return new Cf({...Xe(this._def),schema:this,typeName:Ve.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new vN({...Xe(this._def),innerType:this,defaultValue:n,typeName:Ve.ZodDefault})}brand(){return new gce({typeName:Ve.ZodBranded,type:this,...Xe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new yN({...Xe(this._def),innerType:this,catchValue:n,typeName:Ve.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return rP.create(this,t)}readonly(){return bN.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Wue=/^c[^\s-]{8,}$/i,Yue=/^[0-9a-z]+$/,Xue=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Que=/^[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,Zue=/^[a-z0-9_-]{21}$/i,Jue=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ece=/^[-+]?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)?)??$/,tce=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,nce="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let HS;const rce=/^(?:(?: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])$/,ice=/^(?:(?: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])$/,ace=/^(([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]))$/,oce=/^(([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])$/,sce=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,lce=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,c7="((\\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])))",uce=new RegExp(`^${c7}$`);function f7(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 cce(e){return new RegExp(`^${f7(e)}$`)}function fce(e){let t=`${c7}T${f7(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 dce(e,t){return!!((t==="v4"||!t)&&rce.test(e)||(t==="v6"||!t)&&ace.test(e))}function hce(e,t){if(!Jue.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 pce(e,t){return!!((t==="v4"||!t)&&ice.test(e)||(t==="v6"||!t)&&oce.test(e))}class Rs extends ft{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Me.string){const a=this._getOrReturnCtx(t);return Ce(a,{code:Se.invalid_type,expected:Me.string,received:a.parsedType}),ze}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:Se.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:Se.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:Se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&Ce(i,{code:Se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")tce.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"email",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")HS||(HS=new RegExp(nce,"u")),HS.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"emoji",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")Que.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"uuid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")Zue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"nanoid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")Wue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"cuid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Yue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"cuid2",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")Xue.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"ulid",code:Se.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:Se.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:Se.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:Se.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:Se.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:Se.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?fce(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?uce.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?cce(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{code:Se.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?ece.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"duration",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?dce(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"ip",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?hce(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"jwt",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?pce(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"cidr",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?sce.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"base64",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?lce.test(t.data)||(i=this._getOrReturnCtx(t,i),Ce(i,{validation:"base64url",code:Se.invalid_string,message:a.message}),r.dirty()):pt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:Se.invalid_string,...Pe.errToObj(r)})}_addCheck(t){return new Rs({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Pe.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Pe.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Pe.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Pe.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Pe.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Pe.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Pe.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Pe.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Pe.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Pe.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Pe.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Pe.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Pe.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,...Pe.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,...Pe.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Pe.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Pe.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Pe.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Pe.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Pe.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Pe.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Pe.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Pe.errToObj(n)})}nonempty(t){return this.min(1,Pe.errToObj(t))}trim(){return new Rs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Rs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Rs({...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}}Rs.create=e=>new Rs({checks:[],typeName:Ve.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Xe(e)});function mce(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 Af extends ft{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)!==Me.number){const a=this._getOrReturnCtx(t);return Ce(a,{code:Se.invalid_type,expected:Me.number,received:a.parsedType}),ze}let r;const i=new Vr;for(const a of this._def.checks)a.kind==="int"?pt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.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:Se.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:Se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?mce(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),Ce(r,{code:Se.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:Se.not_finite,message:a.message}),i.dirty()):pt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pe.toString(n))}setLimit(t,n,r,i){return new Af({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pe.toString(i)}]})}_addCheck(t){return new Af({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Pe.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pe.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Pe.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pe.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pe.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"&&pt.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)}}Af.create=e=>new Af({checks:[],typeName:Ve.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Xe(e)});class Cp extends ft{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)!==Me.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:Se.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:Se.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:Se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):pt.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Ce(n,{code:Se.invalid_type,expected:Me.bigint,received:n.parsedType}),ze}gte(t,n){return this.setLimit("min",t,!0,Pe.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pe.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pe.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pe.toString(n))}setLimit(t,n,r,i){return new Cp({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pe.toString(i)}]})}_addCheck(t){return new Cp({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pe.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pe.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pe.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}}Cp.create=e=>new Cp({checks:[],typeName:Ve.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Xe(e)});class w3 extends ft{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Me.boolean){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Me.boolean,received:r.parsedType}),ze}return pi(t.data)}}w3.create=e=>new w3({typeName:Ve.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Xe(e)});class Jy extends ft{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Me.date){const a=this._getOrReturnCtx(t);return Ce(a,{code:Se.invalid_type,expected:Me.date,received:a.parsedType}),ze}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Ce(a,{code:Se.invalid_date}),ze}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:Se.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:Se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):pt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Jy({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Pe.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Pe.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}}Jy.create=e=>new Jy({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ve.ZodDate,...Xe(e)});class S3 extends ft{_parse(t){if(this._getType(t)!==Me.symbol){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Me.symbol,received:r.parsedType}),ze}return pi(t.data)}}S3.create=e=>new S3({typeName:Ve.ZodSymbol,...Xe(e)});class _3 extends ft{_parse(t){if(this._getType(t)!==Me.undefined){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Me.undefined,received:r.parsedType}),ze}return pi(t.data)}}_3.create=e=>new _3({typeName:Ve.ZodUndefined,...Xe(e)});class E3 extends ft{_parse(t){if(this._getType(t)!==Me.null){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Me.null,received:r.parsedType}),ze}return pi(t.data)}}E3.create=e=>new E3({typeName:Ve.ZodNull,...Xe(e)});class A3 extends ft{constructor(){super(...arguments),this._any=!0}_parse(t){return pi(t.data)}}A3.create=e=>new A3({typeName:Ve.ZodAny,...Xe(e)});class T3 extends ft{constructor(){super(...arguments),this._unknown=!0}_parse(t){return pi(t.data)}}T3.create=e=>new T3({typeName:Ve.ZodUnknown,...Xe(e)});class Xs extends ft{_parse(t){const n=this._getOrReturnCtx(t);return Ce(n,{code:Se.invalid_type,expected:Me.never,received:n.parsedType}),ze}}Xs.create=e=>new Xs({typeName:Ve.ZodNever,...Xe(e)});class C3 extends ft{_parse(t){if(this._getType(t)!==Me.undefined){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Me.void,received:r.parsedType}),ze}return pi(t.data)}}C3.create=e=>new C3({typeName:Ve.ZodVoid,...Xe(e)});class fa extends ft{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Me.array)return Ce(n,{code:Se.invalid_type,expected:Me.array,received:n.parsedType}),ze;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?Se.too_big:Se.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:Se.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:Se.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 Ys(n,o,n.path,l)))).then(o=>Vr.mergeArray(r,o));const a=[...n.data].map((o,l)=>i.type._parseSync(new Ys(n,o,n.path,l)));return Vr.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new fa({...this._def,minLength:{value:t,message:Pe.toString(n)}})}max(t,n){return new fa({...this._def,maxLength:{value:t,message:Pe.toString(n)}})}length(t,n){return new fa({...this._def,exactLength:{value:t,message:Pe.toString(n)}})}nonempty(t){return this.min(1,t)}}fa.create=(e,t)=>new fa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ve.ZodArray,...Xe(t)});function qc(e){if(e instanceof mn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=$s.create(qc(r))}return new mn({...e._def,shape:()=>t})}else return e instanceof fa?new fa({...e._def,type:qc(e.element)}):e instanceof $s?$s.create(qc(e.unwrap())):e instanceof Of?Of.create(qc(e.unwrap())):e instanceof gu?gu.create(e.items.map(t=>qc(t))):e}class mn extends ft{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=pt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Me.object){const f=this._getOrReturnCtx(t);return Ce(f,{code:Se.invalid_type,expected:Me.object,received:f.parsedType}),ze}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Xs&&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 Ys(i,h,i.path,f)),alwaysSet:f in i.data})}if(this._def.catchall instanceof Xs){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:Se.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 Ys(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 Pe.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:Pe.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:Ve.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 pt.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 pt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new mn({...this._def,shape:()=>n})}deepPartial(){return qc(this)}partial(t){const n={};for(const r of pt.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 pt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof $s;)a=a._def.innerType;n[r]=a}return new mn({...this._def,shape:()=>n})}keyof(){return d7(pt.objectKeys(this.shape))}}mn.create=(e,t)=>new mn({shape:()=>e,unknownKeys:"strip",catchall:Xs.create(),typeName:Ve.ZodObject,...Xe(t)});mn.strictCreate=(e,t)=>new mn({shape:()=>e,unknownKeys:"strict",catchall:Xs.create(),typeName:Ve.ZodObject,...Xe(t)});mn.lazycreate=(e,t)=>new mn({shape:e,unknownKeys:"strip",catchall:Xs.create(),typeName:Ve.ZodObject,...Xe(t)});class eb extends ft{_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:Se.invalid_union,unionErrors:o}),ze}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:Se.invalid_union,unionErrors:l}),ze}}get options(){return this._def.options}}eb.create=(e,t)=>new eb({options:e,typeName:Ve.ZodUnion,...Xe(t)});function gN(e,t){const n=gs(e),r=gs(t);if(e===t)return{valid:!0,data:e};if(n===Me.object&&r===Me.object){const i=pt.objectKeys(t),a=pt.objectKeys(e).filter(l=>i.indexOf(l)!==-1),o={...e,...t};for(const l of a){const u=gN(e[l],t[l]);if(!u.valid)return{valid:!1};o[l]=u.data}return{valid:!0,data:o}}else if(n===Me.array&&r===Me.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=gN(o,l);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===Me.date&&r===Me.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class tb extends ft{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(y3(a)||y3(o))return ze;const l=gN(a.value,o.value);return l.valid?((b3(a)||b3(o))&&n.dirty(),{status:n.value,value:l.data}):(Ce(r,{code:Se.invalid_intersection_types}),ze)};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}))}}tb.create=(e,t,n)=>new tb({left:e,right:t,typeName:Ve.ZodIntersection,...Xe(n)});class gu extends ft{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Me.array)return Ce(r,{code:Se.invalid_type,expected:Me.array,received:r.parsedType}),ze;if(r.data.length<this._def.items.length)return Ce(r,{code:Se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ze;!this._def.rest&&r.data.length>this._def.items.length&&(Ce(r,{code:Se.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 Ys(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 gu({...this._def,rest:t})}}gu.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new gu({items:e,typeName:Ve.ZodTuple,rest:null,...Xe(t)})};class O3 extends ft{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!==Me.map)return Ce(r,{code:Se.invalid_type,expected:Me.map,received:r.parsedType}),ze;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([l,u],f)=>({key:i._parse(new Ys(r,l,r.path,[f,"key"])),value:a._parse(new Ys(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 ze;(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 ze;(f.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(f.value,d.value)}return{status:n.value,value:l}}}}O3.create=(e,t,n)=>new O3({valueType:t,keyType:e,typeName:Ve.ZodMap,...Xe(n)});class Op extends ft{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Me.set)return Ce(r,{code:Se.invalid_type,expected:Me.set,received:r.parsedType}),ze;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Ce(r,{code:Se.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:Se.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 ze;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 Ys(r,u,r.path,f)));return r.common.async?Promise.all(l).then(u=>o(u)):o(l)}min(t,n){return new Op({...this._def,minSize:{value:t,message:Pe.toString(n)}})}max(t,n){return new Op({...this._def,maxSize:{value:t,message:Pe.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Op.create=(e,t)=>new Op({valueType:e,minSize:null,maxSize:null,typeName:Ve.ZodSet,...Xe(t)});class j3 extends ft{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})}}j3.create=(e,t)=>new j3({getter:e,typeName:Ve.ZodLazy,...Xe(t)});class N3 extends ft{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Ce(n,{received:n.data,code:Se.invalid_literal,expected:this._def.value}),ze}return{status:"valid",value:t.data}}get value(){return this._def.value}}N3.create=(e,t)=>new N3({value:e,typeName:Ve.ZodLiteral,...Xe(t)});function d7(e,t){return new Tf({values:e,typeName:Ve.ZodEnum,...Xe(t)})}class Tf extends ft{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Ce(n,{expected:pt.joinValues(r),received:n.parsedType,code:Se.invalid_type}),ze}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:Se.invalid_enum_value,options:r}),ze}return pi(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 Tf.create(t,{...this._def,...n})}exclude(t,n=this._def){return Tf.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Tf.create=d7;class M3 extends ft{_parse(t){const n=pt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Me.string&&r.parsedType!==Me.number){const i=pt.objectValues(n);return Ce(r,{expected:pt.joinValues(i),received:r.parsedType,code:Se.invalid_type}),ze}if(this._cache||(this._cache=new Set(pt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=pt.objectValues(n);return Ce(r,{received:r.data,code:Se.invalid_enum_value,options:i}),ze}return pi(t.data)}get enum(){return this._def.values}}M3.create=(e,t)=>new M3({values:e,typeName:Ve.ZodNativeEnum,...Xe(t)});class nb extends ft{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Me.promise&&n.common.async===!1)return Ce(n,{code:Se.invalid_type,expected:Me.promise,received:n.parsedType}),ze;const r=n.parsedType===Me.promise?n.data:Promise.resolve(n.data);return pi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}nb.create=(e,t)=>new nb({type:e,typeName:Ve.ZodPromise,...Xe(t)});class Cf extends ft{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ve.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 ze;const u=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return u.status==="aborted"?ze:u.status==="dirty"||n.value==="dirty"?Zh(u.value):u});{if(n.value==="aborted")return ze;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?ze:l.status==="dirty"||n.value==="dirty"?Zh(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"?ze:(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"?ze:(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(!Ef(o))return ze;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=>Ef(o)?Promise.resolve(i.transform(o.value,a)).then(l=>({status:n.value,value:l})):ze);pt.assertNever(i)}}Cf.create=(e,t,n)=>new Cf({schema:e,typeName:Ve.ZodEffects,effect:t,...Xe(n)});Cf.createWithPreprocess=(e,t,n)=>new Cf({schema:t,effect:{type:"preprocess",transform:e},typeName:Ve.ZodEffects,...Xe(n)});class $s extends ft{_parse(t){return this._getType(t)===Me.undefined?pi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$s.create=(e,t)=>new $s({innerType:e,typeName:Ve.ZodOptional,...Xe(t)});class Of extends ft{_parse(t){return this._getType(t)===Me.null?pi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Of.create=(e,t)=>new Of({innerType:e,typeName:Ve.ZodNullable,...Xe(t)});class vN extends ft{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Me.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}vN.create=(e,t)=>new vN({innerType:e,typeName:Ve.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Xe(t)});class yN extends ft{_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 Zy(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}}yN.create=(e,t)=>new yN({innerType:e,typeName:Ve.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Xe(t)});class R3 extends ft{_parse(t){if(this._getType(t)!==Me.nan){const r=this._getOrReturnCtx(t);return Ce(r,{code:Se.invalid_type,expected:Me.nan,received:r.parsedType}),ze}return{status:"valid",value:t.data}}}R3.create=e=>new R3({typeName:Ve.ZodNaN,...Xe(e)});class gce extends ft{_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 rP extends ft{_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"?ze:a.status==="dirty"?(n.dirty(),Zh(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"?ze: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 rP({in:t,out:n,typeName:Ve.ZodPipeline})}}class bN extends ft{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Ef(i)&&(i.value=Object.freeze(i.value)),i);return Zy(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}bN.create=(e,t)=>new bN({innerType:e,typeName:Ve.ZodReadonly,...Xe(t)});var Ve;(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"})(Ve||(Ve={}));const Bs=Rs.create,P3=Af.create;Xs.create;fa.create;const km=mn.create;eb.create;tb.create;gu.create;const V0=Tf.create;nb.create;$s.create;Of.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 vce=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),h7=(...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 yce={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 bce=N.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},u)=>N.createElement("svg",{ref:u,...yce,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:h7("lucide",i),...l},[...o.map(([f,d])=>N.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 Be=(e,t)=>{const n=N.forwardRef(({className:r,...i},a)=>N.createElement(bce,{ref:a,iconNode:t,className:h7(`lucide-${vce(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 p7=Be("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 m7=Be("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 xce=Be("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 wce=Be("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 g7=Be("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 Sce=Be("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 v7=Be("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 pd=Be("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 F0=Be("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 jf=Be("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 _ce=Be("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 po=Be("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 iP=Be("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 Dm=Be("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 U0=Be("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 k3=Be("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 Li=Be("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 Ece=Be("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 H0=Be("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 Ace=Be("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 GS=Be("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 Tce=Be("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 Cce=Be("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 vu=Be("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 aP=Be("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 xN=Be("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
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 Oce=Be("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"}]]);/**
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 jce=Be("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"}]]);/**
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 Nce=Be("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"}]]);/**
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 D3=Be("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
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 Mce=Be("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
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 oP=Be("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"}]]);/**
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 sp=Be("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 y7=Be("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
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 b7=Be("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
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 yu=Be("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"}]]);/**
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 Rce=Be("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
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 Pce=Be("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
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 x7=Be("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"}]]);/**
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 rb=Be("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
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 Im=Be("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"}]]);/**
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 sP=Be("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"}]]);/**
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 jp=Be("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 w7=Be("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"}]]);/**
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 I3=Be("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"}]]);/**
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 S7=Be("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"}]]);/**
316
- * @license lucide-react v0.468.0 - ISC
317
- *
318
- * This source code is licensed under the ISC license.
319
- * See the LICENSE file in the root directory of this source tree.
320
- */const kce=Be("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"}]]);/**
321
- * @license lucide-react v0.468.0 - ISC
322
- *
323
- * This source code is licensed under the ISC license.
324
- * See the LICENSE file in the root directory of this source tree.
325
- */const L3=Be("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"}]]);/**
326
- * @license lucide-react v0.468.0 - ISC
327
- *
328
- * This source code is licensed under the ISC license.
329
- * See the LICENSE file in the root directory of this source tree.
330
- */const Np=Be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
331
- * @license lucide-react v0.468.0 - ISC
332
- *
333
- * This source code is licensed under the ISC license.
334
- * See the LICENSE file in the root directory of this source tree.
335
- */const _7=Be("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 Dce=Symbol.for("react.lazy"),ib=kR[" use ".trim().toString()];function Ice(e){return typeof e=="object"&&e!==null&&"then"in e}function E7(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Dce&&"_payload"in e&&Ice(e._payload)}function A7(e){const t=Lce(e),n=N.forwardRef((r,i)=>{let{children:a,...o}=r;E7(a)&&typeof ib=="function"&&(a=ib(a._payload));const l=N.Children.toArray(a),u=l.find(Bce);if(u){const f=u.props.children,d=l.map(h=>h===u?N.Children.count(f)>1?N.Children.only(null):N.isValidElement(f)?f.props.children:null:h);return y.jsx(t,{...o,ref:i,children:N.isValidElement(f)?N.cloneElement(f,void 0,d):null})}return y.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var md=A7("Slot");function Lce(e){const t=N.forwardRef((n,r)=>{let{children:i,...a}=n;if(E7(i)&&typeof ib=="function"&&(i=ib(i._payload)),N.isValidElement(i)){const o=zce(i),l=qce(a,i.props);return i.type!==N.Fragment&&(l.ref=r?Hs(r,o):o),N.cloneElement(i,l)}return N.Children.count(i)>1?N.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $ce=Symbol("radix.slottable");function Bce(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$ce}function qce(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 zce(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)}const $3=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,B3=ut,G0=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return B3(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=$3(d)||$3(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(w=>{let[x,b]=w;return Array.isArray(b)?b.includes({...a,...l}[x]):{...a,...l}[x]===b})?[...f,h,m]:f},[]);return B3(e,o,u,n==null?void 0:n.class,n==null?void 0:n.className)},Vce=G0("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"}}),Tn=N.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?md:"button";return y.jsx(o,{className:be(Vce({variant:t,size:n,className:e})),ref:a,...i})});Tn.displayName="Button";const lP=N.forwardRef(({className:e,type:t,...n},r)=>y.jsx("input",{type:t,className:be("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}));lP.displayName="Input";var Fce=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Eo=Fce.reduce((e,t)=>{const n=A7(`Primitive.${t}`),r=N.forwardRef((i,a)=>{const{asChild:o,...l}=i,u=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(u,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Uce="Separator",q3="horizontal",Hce=["horizontal","vertical"],T7=N.forwardRef((e,t)=>{const{decorative:n,orientation:r=q3,...i}=e,a=Gce(r)?r:q3,l=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return y.jsx(Eo.div,{"data-orientation":a,...l,...i,ref:t})});T7.displayName=Uce;function Gce(e){return Hce.includes(e)}var C7=T7;const O7=N.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},i)=>y.jsx(C7,{ref:i,decorative:n,orientation:t,className:be("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));O7.displayName=C7.displayName;const Kce=768;function Wce(){const[e,t]=N.useState(!1);return N.useEffect(()=>{const n=()=>{t(window.innerWidth<Kce)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}var KS="focusScope.autoFocusOnMount",WS="focusScope.autoFocusOnUnmount",z3={bubbles:!1,cancelable:!0},Yce="FocusScope",uP=N.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,u]=N.useState(null),f=Gs(i),d=Gs(a),h=N.useRef(null),m=Bt(t,x=>u(x)),g=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(r){let x=function(_){if(g.paused||!l)return;const A=_.target;l.contains(A)?h.current=A:fs(h.current,{select:!0})},b=function(_){if(g.paused||!l)return;const A=_.relatedTarget;A!==null&&(l.contains(A)||fs(h.current,{select:!0}))},S=function(_){if(document.activeElement===document.body)for(const T of _)T.removedNodes.length>0&&fs(l)};document.addEventListener("focusin",x),document.addEventListener("focusout",b);const E=new MutationObserver(S);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",b),E.disconnect()}}},[r,l,g.paused]),N.useEffect(()=>{if(l){F3.add(g);const x=document.activeElement;if(!l.contains(x)){const S=new CustomEvent(KS,z3);l.addEventListener(KS,f),l.dispatchEvent(S),S.defaultPrevented||(Xce(tfe(j7(l)),{select:!0}),document.activeElement===x&&fs(l))}return()=>{l.removeEventListener(KS,f),setTimeout(()=>{const S=new CustomEvent(WS,z3);l.addEventListener(WS,d),l.dispatchEvent(S),S.defaultPrevented||fs(x??document.body,{select:!0}),l.removeEventListener(WS,d),F3.remove(g)},0)}}},[l,f,d,g]);const w=N.useCallback(x=>{if(!n&&!r||g.paused)return;const b=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,S=document.activeElement;if(b&&S){const E=x.currentTarget,[_,A]=Qce(E);_&&A?!x.shiftKey&&S===A?(x.preventDefault(),n&&fs(_,{select:!0})):x.shiftKey&&S===_&&(x.preventDefault(),n&&fs(A,{select:!0})):S===E&&x.preventDefault()}},[n,r,g.paused]);return y.jsx(ot.div,{tabIndex:-1,...o,ref:m,onKeyDown:w})});uP.displayName=Yce;function Xce(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fs(r,{select:t}),document.activeElement!==n)return}function Qce(e){const t=j7(e),n=V3(t,e),r=V3(t.reverse(),e);return[n,r]}function j7(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 V3(e,t){for(const n of e)if(!Zce(n,{upTo:t}))return n}function Zce(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 Jce(e){return e instanceof HTMLInputElement&&"select"in e}function fs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Jce(e)&&t&&e.select()}}var F3=efe();function efe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=U3(e,t),e.unshift(t)},remove(t){var n;e=U3(e,t),(n=e[0])==null||n.resume()}}}function U3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function tfe(e){return e.filter(t=>t.tagName!=="A")}var YS=0;function N7(){N.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??H3()),document.body.insertAdjacentElement("beforeend",e[1]??H3()),YS++,()=>{YS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),YS--}},[])}function H3(){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 oa=function(){return oa=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},oa.apply(this,arguments)};function M7(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 nfe(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 Ey="right-scroll-bar-position",Ay="width-before-scroll-bar",rfe="with-scroll-bars-hidden",ife="--removed-body-scroll-bar-size";function XS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function afe(e,t){var n=N.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 ofe=typeof window<"u"?N.useLayoutEffect:N.useEffect,G3=new WeakMap;function sfe(e,t){var n=afe(null,function(r){return e.forEach(function(i){return XS(i,r)})});return ofe(function(){var r=G3.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(l){a.has(l)||XS(l,null)}),a.forEach(function(l){i.has(l)||XS(l,o)})}G3.set(n,e)},[e]),n}function lfe(e){return e}function ufe(e,t){t===void 0&&(t=lfe);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 cfe(e){e===void 0&&(e={});var t=ufe(null);return t.options=oa({async:!0,ssr:!1},e),t}var R7=function(e){var t=e.sideCar,n=M7(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 N.createElement(r,oa({},n))};R7.isSideCarExport=!0;function ffe(e,t){return e.useMedium(t),R7}var P7=cfe(),QS=function(){},K0=N.forwardRef(function(e,t){var n=N.useRef(null),r=N.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,w=e.noIsolation,x=e.inert,b=e.allowPinchZoom,S=e.as,E=S===void 0?"div":S,_=e.gapMode,A=M7(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=m,O=sfe([n,t]),M=oa(oa({},A),i);return N.createElement(N.Fragment,null,d&&N.createElement(T,{sideCar:P7,removeScrollBar:f,shards:h,noRelative:g,noIsolation:w,inert:x,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:_}),o?N.cloneElement(N.Children.only(l),oa(oa({},M),{ref:O})):N.createElement(E,oa({},M,{className:u,ref:O}),l))});K0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};K0.classNames={fullWidth:Ay,zeroRight:Ey};var dfe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hfe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=dfe();return t&&e.setAttribute("nonce",t),e}function pfe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mfe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gfe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hfe())&&(pfe(t,n),mfe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vfe=function(){var e=gfe();return function(t,n){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},k7=function(){var e=vfe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},yfe={left:0,top:0,right:0,gap:0},ZS=function(e){return parseInt(e||"",10)||0},bfe=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[ZS(n),ZS(r),ZS(i)]},xfe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yfe;var t=bfe(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])}},wfe=k7(),nf="data-scroll-locked",Sfe=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
336
- .`.concat(rfe,` {
337
- overflow: hidden `).concat(r,`;
338
- padding-right: `).concat(l,"px ").concat(r,`;
339
- }
340
- body[`).concat(nf,`] {
341
- overflow: hidden `).concat(r,`;
342
- overscroll-behavior: contain;
343
- `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
344
- padding-left: `.concat(i,`px;
345
- padding-top: `).concat(a,`px;
346
- padding-right: `).concat(o,`px;
347
- margin-left:0;
348
- margin-top:0;
349
- margin-right: `).concat(l,"px ").concat(r,`;
350
- `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
351
- }
352
-
353
- .`).concat(Ey,` {
354
- right: `).concat(l,"px ").concat(r,`;
355
- }
356
-
357
- .`).concat(Ay,` {
358
- margin-right: `).concat(l,"px ").concat(r,`;
359
- }
360
-
361
- .`).concat(Ey," .").concat(Ey,` {
362
- right: 0 `).concat(r,`;
363
- }
364
-
365
- .`).concat(Ay," .").concat(Ay,` {
366
- margin-right: 0 `).concat(r,`;
367
- }
368
-
369
- body[`).concat(nf,`] {
370
- `).concat(ife,": ").concat(l,`px;
371
- }
372
- `)},K3=function(){var e=parseInt(document.body.getAttribute(nf)||"0",10);return isFinite(e)?e:0},_fe=function(){N.useEffect(function(){return document.body.setAttribute(nf,(K3()+1).toString()),function(){var e=K3()-1;e<=0?document.body.removeAttribute(nf):document.body.setAttribute(nf,e.toString())}},[])},Efe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;_fe();var a=N.useMemo(function(){return xfe(i)},[i]);return N.createElement(wfe,{styles:Sfe(a,!t,i,n?"":"!important")})},wN=!1;if(typeof window<"u")try{var qv=Object.defineProperty({},"passive",{get:function(){return wN=!0,!0}});window.addEventListener("test",qv,qv),window.removeEventListener("test",qv,qv)}catch{wN=!1}var Nc=wN?{passive:!1}:!1,Afe=function(e){return e.tagName==="TEXTAREA"},D7=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Afe(e)&&n[t]==="visible")},Tfe=function(e){return D7(e,"overflowY")},Cfe=function(e){return D7(e,"overflowX")},W3=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=I7(e,r);if(i){var a=L7(e,r),o=a[1],l=a[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ofe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},jfe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},I7=function(e,t){return e==="v"?Tfe(t):Cfe(t)},L7=function(e,t){return e==="v"?Ofe(t):jfe(t)},Nfe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Mfe=function(e,t,n,r,i){var a=Nfe(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=L7(e,l),w=g[0],x=g[1],b=g[2],S=x-b-a*w;(w||S)&&I7(e,l)&&(h+=S,m+=w);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},zv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Y3=function(e){return[e.deltaX,e.deltaY]},X3=function(e){return e&&"current"in e?e.current:e},Rfe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pfe=function(e){return`
373
- .block-interactivity-`.concat(e,` {pointer-events: none;}
374
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
375
- `)},kfe=0,Mc=[];function Dfe(e){var t=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),i=N.useState(kfe++)[0],a=N.useState(k7)[0],o=N.useRef(e);N.useEffect(function(){o.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=nfe([e.lockRef.current],(e.shards||[]).map(X3),!0).filter(Boolean);return x.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=N.useCallback(function(x,b){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!o.current.allowPinchZoom;var S=zv(x),E=n.current,_="deltaX"in x?x.deltaX:E[0]-S[0],A="deltaY"in x?x.deltaY:E[1]-S[1],T,O=x.target,M=Math.abs(_)>Math.abs(A)?"h":"v";if("touches"in x&&M==="h"&&O.type==="range")return!1;var R=window.getSelection(),P=R&&R.anchorNode,$=P?P===O||P.contains(O):!1;if($)return!1;var I=W3(M,O);if(!I)return!0;if(I?T=M:(T=M==="v"?"h":"v",I=W3(M,O)),!I)return!1;if(!r.current&&"changedTouches"in x&&(_||A)&&(r.current=T),!T)return!0;var k=r.current||T;return Mfe(k,b,x,k==="h"?_:A)},[]),u=N.useCallback(function(x){var b=x;if(!(!Mc.length||Mc[Mc.length-1]!==a)){var S="deltaY"in b?Y3(b):zv(b),E=t.current.filter(function(T){return T.name===b.type&&(T.target===b.target||b.target===T.shadowParent)&&Rfe(T.delta,S)})[0];if(E&&E.should){b.cancelable&&b.preventDefault();return}if(!E){var _=(o.current.shards||[]).map(X3).filter(Boolean).filter(function(T){return T.contains(b.target)}),A=_.length>0?l(b,_[0]):!o.current.noIsolation;A&&b.cancelable&&b.preventDefault()}}},[]),f=N.useCallback(function(x,b,S,E){var _={name:x,delta:b,target:S,should:E,shadowParent:Ife(S)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(A){return A!==_})},1)},[]),d=N.useCallback(function(x){n.current=zv(x),r.current=void 0},[]),h=N.useCallback(function(x){f(x.type,Y3(x),x.target,l(x,e.lockRef.current))},[]),m=N.useCallback(function(x){f(x.type,zv(x),x.target,l(x,e.lockRef.current))},[]);N.useEffect(function(){return Mc.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Nc),document.addEventListener("touchmove",u,Nc),document.addEventListener("touchstart",d,Nc),function(){Mc=Mc.filter(function(x){return x!==a}),document.removeEventListener("wheel",u,Nc),document.removeEventListener("touchmove",u,Nc),document.removeEventListener("touchstart",d,Nc)}},[]);var g=e.removeScrollBar,w=e.inert;return N.createElement(N.Fragment,null,w?N.createElement(a,{styles:Pfe(i)}):null,g?N.createElement(Efe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ife(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Lfe=ffe(P7,Dfe);var cP=N.forwardRef(function(e,t){return N.createElement(K0,oa({},e,{ref:t,sideCar:Lfe}))});cP.classNames=K0.classNames;var $fe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Rc=new WeakMap,Vv=new WeakMap,Fv={},JS=0,$7=function(e){return e&&(e.host||$7(e.parentNode))},Bfe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=$7(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})},qfe=function(e,t,n,r){var i=Bfe(t,Array.isArray(e)?e:[e]);Fv[n]||(Fv[n]=new WeakMap);var a=Fv[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),w=g!==null&&g!=="false",x=(Rc.get(m)||0)+1,b=(a.get(m)||0)+1;Rc.set(m,x),a.set(m,b),o.push(m),x===1&&w&&Vv.set(m,!0),b===1&&m.setAttribute(n,"true"),w||m.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return d(t),l.clear(),JS++,function(){o.forEach(function(h){var m=Rc.get(h)-1,g=a.get(h)-1;Rc.set(h,m),a.set(h,g),m||(Vv.has(h)||h.removeAttribute(r),Vv.delete(h)),g||h.removeAttribute(n)}),JS--,JS||(Rc=new WeakMap,Rc=new WeakMap,Vv=new WeakMap,Fv={})}},B7=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=$fe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),qfe(r,i,n,"aria-hidden")):function(){return null}},W0="Dialog",[q7]=tl(W0),[zfe,Fi]=q7(W0),z7=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=N.useRef(null),u=N.useRef(null),[f,d]=mu({prop:r,defaultProp:i??!1,onChange:a,caller:W0});return y.jsx(zfe,{scope:t,triggerRef:l,contentRef:u,contentId:or(),titleId:or(),descriptionId:or(),open:f,onOpenChange:d,onOpenToggle:N.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};z7.displayName=W0;var V7="DialogTrigger",Vfe=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fi(V7,n),a=Bt(t,i.triggerRef);return y.jsx(ot.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":hP(i.open),...r,ref:a,onClick:Ue(e.onClick,i.onOpenToggle)})});Vfe.displayName=V7;var fP="DialogPortal",[Ffe,F7]=q7(fP,{forceMount:void 0}),U7=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Fi(fP,t);return y.jsx(Ffe,{scope:t,forceMount:n,children:N.Children.map(r,o=>y.jsx(nl,{present:n||a.open,children:y.jsx(L0,{asChild:!0,container:i,children:o})}))})};U7.displayName=fP;var ab="DialogOverlay",H7=N.forwardRef((e,t)=>{const n=F7(ab,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Fi(ab,e.__scopeDialog);return a.modal?y.jsx(nl,{present:r||a.open,children:y.jsx(Hfe,{...i,ref:t})}):null});H7.displayName=ab;var Ufe=Ep("DialogOverlay.RemoveScroll"),Hfe=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fi(ab,n);return y.jsx(cP,{as:Ufe,allowPinchZoom:!0,shards:[i.contentRef],children:y.jsx(ot.div,{"data-state":hP(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),bu="DialogContent",G7=N.forwardRef((e,t)=>{const n=F7(bu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Fi(bu,e.__scopeDialog);return y.jsx(nl,{present:r||a.open,children:a.modal?y.jsx(Gfe,{...i,ref:t}):y.jsx(Kfe,{...i,ref:t})})});G7.displayName=bu;var Gfe=N.forwardRef((e,t)=>{const n=Fi(bu,e.__scopeDialog),r=N.useRef(null),i=Bt(t,n.contentRef,r);return N.useEffect(()=>{const a=r.current;if(a)return B7(a)},[]),y.jsx(K7,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ue(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ue(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:Ue(e.onFocusOutside,a=>a.preventDefault())})}),Kfe=N.forwardRef((e,t)=>{const n=Fi(bu,e.__scopeDialog),r=N.useRef(!1),i=N.useRef(!1);return y.jsx(K7,{...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()}})}),K7=N.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=Fi(bu,n),u=N.useRef(null),f=Bt(t,u);return N7(),y.jsxs(y.Fragment,{children:[y.jsx(uP,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:y.jsx(M0,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":hP(l.open),...o,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(Wfe,{titleId:l.titleId}),y.jsx(Xfe,{contentRef:u,descriptionId:l.descriptionId})]})]})}),dP="DialogTitle",W7=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fi(dP,n);return y.jsx(ot.h2,{id:i.titleId,...r,ref:t})});W7.displayName=dP;var Y7="DialogDescription",X7=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fi(Y7,n);return y.jsx(ot.p,{id:i.descriptionId,...r,ref:t})});X7.displayName=Y7;var Q7="DialogClose",Z7=N.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Fi(Q7,n);return y.jsx(ot.button,{type:"button",...r,ref:t,onClick:Ue(e.onClick,()=>i.onOpenChange(!1))})});Z7.displayName=Q7;function hP(e){return e?"open":"closed"}var J7="DialogTitleWarning",[u4e,eK]=sse(J7,{contentName:bu,titleName:dP,docsSlug:"dialog"}),Wfe=({titleId:e})=>{const t=eK(J7),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
376
-
377
- If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
378
-
379
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return N.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Yfe="DialogDescriptionWarning",Xfe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${eK(Yfe).contentName}}.`;return N.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},pP=z7,mP=U7,Lm=H7,$m=G7,Y0=W7,X0=X7,tK=Z7;const Qfe=pP,Zfe=mP,nK=N.forwardRef(({className:e,...t},n)=>y.jsx(Lm,{className:be("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));nK.displayName=Lm.displayName;const Jfe=G0("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),rK=N.forwardRef(({side:e="right",className:t,children:n,...r},i)=>y.jsxs(Zfe,{children:[y.jsx(nK,{}),y.jsxs($m,{ref:i,className:be(Jfe({side:e}),t),...r,children:[y.jsxs(tK,{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-secondary",children:[y.jsx(Np,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));rK.displayName=$m.displayName;const ede=N.forwardRef(({className:e,...t},n)=>y.jsx(Y0,{ref:n,className:be("text-lg font-semibold text-foreground",e),...t}));ede.displayName=Y0.displayName;const tde=N.forwardRef(({className:e,...t},n)=>y.jsx(X0,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));tde.displayName=X0.displayName;function Mn({className:e,...t}){return y.jsx("div",{className:be("animate-pulse bg-primary/10",e),...t})}const nde="sidebar_state",rde=3600*24*7,ide="16rem",ade="18rem",ode="3rem",sde="b",iK=N.createContext(null);function Bm(){const e=N.useContext(iK);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const aK=N.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:i,children:a,...o},l)=>{const u=Wce(),[f,d]=N.useState(!1),[h,m]=N.useState(e),g=t??h,w=N.useCallback(E=>{const _=typeof E=="function"?E(g):E;n?n(_):m(_),document.cookie=`${nde}=${_}; path=/; max-age=${rde}`},[n,g]),x=N.useCallback(()=>u?d(E=>!E):w(E=>!E),[u,w,d]);N.useEffect(()=>{const E=_=>{_.key===sde&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),x())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[x]);const b=g?"expanded":"collapsed",S=N.useMemo(()=>({state:b,open:g,setOpen:w,isMobile:u,openMobile:f,setOpenMobile:d,toggleSidebar:x}),[b,g,w,u,f,d,x]);return y.jsx(iK.Provider,{value:S,children:y.jsx(u7,{delayDuration:0,children:y.jsx("div",{style:{"--sidebar-width":ide,"--sidebar-width-icon":ode,...i},className:be("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:l,...o,children:a})})})});aK.displayName="SidebarProvider";const lde=N.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:i,...a},o)=>{const{isMobile:l,state:u,openMobile:f,setOpenMobile:d}=Bm();return n==="none"?y.jsx("div",{className:be("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:o,...a,children:i}):l?y.jsx(Qfe,{open:f,onOpenChange:d,...a,children:y.jsx(rK,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":ade},side:e,children:y.jsx("div",{className:"flex h-full w-full flex-col",children:i})})}):y.jsxs("div",{ref:o,className:"group peer hidden md:block text-sidebar-foreground","data-state":u,"data-collapsible":u==="collapsed"?n:"","data-variant":t,"data-side":e,children:[y.jsx("div",{className:be("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),y.jsx("div",{className:be("duration-200 fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...a,children:y.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]: group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:i})})]})});lde.displayName="Sidebar";const ude=N.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:i}=Bm();return y.jsxs(Tn,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:be("h-7 w-7",e),onClick:a=>{t==null||t(a),i()},...n,children:[y.jsx(Pce,{}),y.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});ude.displayName="SidebarTrigger";const oK=N.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=Bm();return y.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:be("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});oK.displayName="SidebarRail";const cde=N.forwardRef(({className:e,...t},n)=>y.jsx("main",{ref:n,className:be("relative flex min-h-svh flex-1 flex-col bg-background","peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]: md:peer-data-[variant=inset]:shadow",e),...t}));cde.displayName="SidebarInset";const fde=N.forwardRef(({className:e,...t},n)=>y.jsx(lP,{ref:n,"data-sidebar":"input",className:be("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));fde.displayName="SidebarInput";const sK=N.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,"data-sidebar":"header",className:be("flex flex-col gap-2 p-2",e),...t}));sK.displayName="SidebarHeader";const lK=N.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,"data-sidebar":"footer",className:be("flex flex-col gap-2 p-2",e),...t}));lK.displayName="SidebarFooter";const uK=N.forwardRef(({className:e,...t},n)=>y.jsx(O7,{ref:n,"data-sidebar":"separator",className:be("mx-2 w-auto bg-sidebar-border",e),...t}));uK.displayName="SidebarSeparator";const cK=N.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,"data-sidebar":"content",className:be("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));cK.displayName="SidebarContent";const fK=N.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,"data-sidebar":"group",className:be("relative flex w-full min-w-0 flex-col p-2",e),...t}));fK.displayName="SidebarGroup";const dK=N.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const i=t?md:"div";return y.jsx(i,{ref:r,"data-sidebar":"group-label",className:be("duration-200 flex h-8 shrink-0 items-center px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});dK.displayName="SidebarGroupLabel";const dde=N.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const i=t?md:"button";return y.jsx(i,{ref:r,"data-sidebar":"group-action",className:be("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});dde.displayName="SidebarGroupAction";const hK=N.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,"data-sidebar":"group-content",className:be("w-full text-sm",e),...t}));hK.displayName="SidebarGroupContent";const ob=N.forwardRef(({className:e,...t},n)=>y.jsx("ul",{ref:n,"data-sidebar":"menu",className:be("flex w-full min-w-0 flex-col gap-1",e),...t}));ob.displayName="SidebarMenu";const Mp=N.forwardRef(({className:e,...t},n)=>y.jsx("li",{ref:n,"data-sidebar":"menu-item",className:be("group/menu-item relative",e),...t}));Mp.displayName="SidebarMenuItem";const hde=G0("peer/menu-button flex w-full items-center gap-2 overflow-hidden p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),gP=N.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:i,className:a,...o},l)=>{const u=e?md:"button",{isMobile:f,state:d}=Bm(),h=y.jsx(u,{ref:l,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:be(hde({variant:n,size:r}),a),...o});return i?(typeof i=="string"&&(i={children:i}),y.jsxs(q0,{children:[y.jsx(z0,{asChild:!0,children:h}),y.jsx(Pm,{side:"right",align:"center",hidden:d!=="collapsed"||f,...i})]})):h});gP.displayName="SidebarMenuButton";const pde=N.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>{const a=t?md:"button";return y.jsx(a,{ref:i,"data-sidebar":"menu-action",className:be("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});pde.displayName="SidebarMenuAction";const mde=N.forwardRef(({className:e,...t},n)=>y.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:be("absolute right-1 flex h-5 min-w-5 items-center justify-center px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));mde.displayName="SidebarMenuBadge";const gde=N.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const i=N.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return y.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:be(" h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&y.jsx(Mn,{className:"size-4 ","data-sidebar":"menu-skeleton-icon"}),y.jsx(Mn,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});gde.displayName="SidebarMenuSkeleton";const vde=N.forwardRef(({className:e,...t},n)=>y.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:be("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));vde.displayName="SidebarMenuSub";const yde=N.forwardRef(({...e},t)=>y.jsx("li",{ref:t,...e}));yde.displayName="SidebarMenuSubItem";const bde=N.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...i},a)=>{const o=e?md:"a";return y.jsx(o,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:be("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...i})});bde.displayName="SidebarMenuSubButton";const jt="./api",xde=6e4,Ih=12e4;async function _t(e,t){const{timeout:n=xde,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 d=await u.json().catch(()=>({}));throw new Error(d.error||`HTTP ${u.status}`)}if(!(u.headers.get("content-type")??"").includes("application/json"))throw new Error(`Expected JSON response from ${e}`);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 Ut={async refresh(){return _t(`${jt}/refresh`,{method:"POST"})},async getOverview(e){return _t(`${jt}/overview`,{signal:e,timeout:Ih})},async getCounts(e){return _t(`${jt}/counts`,{signal:e})},async getQueueNames(e){return _t(`${jt}/queue-names`,{signal:e})},async getQueues(e){return _t(`${jt}/queues`,{signal:e})},async getMetrics(e){return _t(`${jt}/metrics`,{signal:e,timeout:Ih})},async getActivityStats(e){return _t(`${jt}/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 _t(`${jt}/queues/${encodeURIComponent(e)}/jobs${r?`?${r}`:""}`)},async getJob(e,t){return _t(`${jt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},async getJobLogs(e,t,n){const r=new URLSearchParams;(n==null?void 0:n.start)!==void 0&&r.set("start",String(n.start)),(n==null?void 0:n.end)!==void 0&&r.set("end",String(n.end)),(n==null?void 0:n.asc)!==void 0&&r.set("asc",String(n.asc));const i=r.toString();return _t(`${jt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/logs${i?`?${i}`:""}`)},async retryJob(e,t){await _t(`${jt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/retry`,{method:"POST"})},async removeJob(e,t){await _t(`${jt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/remove`,{method:"POST"})},async promoteJob(e,t){await _t(`${jt}/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)),_t(`${jt}/search?${n.toString()}`)},async cleanJobs(e,t,n){return _t(`${jt}/queues/${encodeURIComponent(e)}/clean`,{method:"POST",body:JSON.stringify({status:t,grace:n})})},async getConfig(){return _t("./config")},async getTagValues(e,t){const n=new URLSearchParams;t&&n.set("limit",String(t));const r=n.toString();return _t(`${jt}/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 _t(`${jt}/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 _t(`${jt}/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){return _t(`${jt}/test`,{method:"POST",body:JSON.stringify(e)})},async cleanQueue(e,t,n){return _t(`${jt}/queues/${encodeURIComponent(e)}/clean`,{method:"POST",body:JSON.stringify({status:t,grace:n})})},async bulkRetry(e){return _t(`${jt}/bulk/retry`,{method:"POST",body:JSON.stringify({jobs:e})})},async bulkDelete(e){return _t(`${jt}/bulk/delete`,{method:"POST",body:JSON.stringify({jobs:e})})},async bulkPromote(e){return _t(`${jt}/bulk/promote`,{method:"POST",body:JSON.stringify({jobs:e})})},async pauseQueue(e){return _t(`${jt}/queues/${encodeURIComponent(e)}/pause`,{method:"POST"})},async resumeQueue(e){return _t(`${jt}/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 _t(`${jt}/flows${r?`?${r}`:""}`,{signal:t,timeout:Ih})},async getFlow(e,t){return _t(`${jt}/flows/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},async createFlow(e){return _t(`${jt}/flows`,{method:"POST",body:JSON.stringify(e)})}},et={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],jobLogs:(e,t)=>["job-logs",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 gd(){return Hr({queryKey:et.config,queryFn:()=>Ut.getConfig(),staleTime:Number.POSITIVE_INFINITY})}function wde(){return Hr({queryKey:et.queueNames,queryFn:({signal:e})=>Ut.getQueueNames(e),staleTime:6e4})}function Q0(){return Hr({queryKey:et.queues,queryFn:({signal:e})=>Ut.getQueues(e),refetchInterval:5e3})}function Sde(e){const{data:t}=Q0();return N.useMemo(()=>t==null?void 0:t.find(n=>n.name===e),[t,e])}function _de(){return Hr({queryKey:et.metrics,queryFn:({signal:e})=>Ut.getMetrics(e),refetchInterval:3e4})}function Ede(){return Hr({queryKey:et.activity,queryFn:({signal:e})=>Ut.getActivityStats(e),refetchInterval:3e4})}function Ade(e,t,n){return V9({queryKey:et.jobs(e,t,n),queryFn:({pageParam:r})=>Ut.getJobs(e,{status:t,limit:50,cursor:r,sort:n}),getNextPageParam:r=>r.cursor,initialPageParam:void 0,refetchInterval:5e3})}function Tde(e,t){return Hr({queryKey:et.job(e,t),queryFn:()=>Ut.getJob(e,t),refetchInterval:5e3})}function Cde(e,t,n=!0){return Hr({queryKey:et.jobLogs(e,t),queryFn:()=>Ut.getJobLogs(e,t,{start:0,end:999}),enabled:n,refetchInterval:n?5e3:!1})}function Ode(e,t){return V9({queryKey:et.runs(e,t),queryFn:({pageParam:n,signal:r})=>Ut.getRuns({limit:30,cursor:n,sort:e,...t},r),getNextPageParam:n=>n.cursor,initialPageParam:void 0,refetchInterval:5e3,staleTime:3e3})}function jde(e){return Hr({queryKey:et.schedulers.repeatable(e),queryFn:()=>Ut.getRepeatableSchedulers(e),refetchInterval:5e3})}function Nde(e){return Hr({queryKey:et.schedulers.delayed(e),queryFn:()=>Ut.getDelayedSchedulers(e),refetchInterval:5e3})}function Mde(e){return Hr({queryKey:et.search(e),queryFn:()=>Ut.search(e),enabled:e.trim().length>0,staleTime:1e3*30})}function pK(e,t=!0){return Hr({queryKey:et.tagValues(e),queryFn:()=>Ut.getTagValues(e),enabled:t&&e.length>0,staleTime:1e3*60})}function vP(){const e=sr();return ya({mutationFn:()=>Ut.refresh(),onSuccess:()=>{e.invalidateQueries()}})}function Rde(){const e=sr();return ya({mutationFn:({queueName:t,jobId:n})=>Ut.retryJob(t,n),onSuccess:(t,{queueName:n,jobId:r})=>{e.invalidateQueries({queryKey:et.job(n,r)}),e.invalidateQueries({queryKey:et.jobsAll(n)}),e.invalidateQueries({queryKey:et.runsAll})}})}function Pde(){const e=sr();return ya({mutationFn:({queueName:t,jobId:n})=>Ut.removeJob(t,n),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:et.jobsAll(n)}),e.invalidateQueries({queryKey:et.runsAll}),e.invalidateQueries({queryKey:et.queues})}})}function kde(){const e=sr();return ya({mutationFn:({queueName:t,jobId:n})=>Ut.promoteJob(t,n),onSuccess:(t,{queueName:n,jobId:r})=>{e.invalidateQueries({queryKey:et.job(n,r)}),e.invalidateQueries({queryKey:et.jobsAll(n)}),e.invalidateQueries({queryKey:et.runsAll}),e.invalidateQueries({queryKey:et.schedulers.all})}})}function Dde(){const e=sr();return ya({mutationFn:t=>Ut.testJob(t),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:et.jobsAll(n)}),e.invalidateQueries({queryKey:et.runsAll}),e.invalidateQueries({queryKey:et.queues})}})}function mK(){const e=sr();return ya({mutationFn:({jobs:t})=>Ut.bulkRetry(t),onSuccess:()=>{e.invalidateQueries({queryKey:et.runsAll}),e.invalidateQueries({queryKey:et.queues})}})}function gK(){const e=sr();return ya({mutationFn:({jobs:t})=>Ut.bulkDelete(t),onSuccess:()=>{e.invalidateQueries({queryKey:et.runsAll}),e.invalidateQueries({queryKey:et.queues})}})}function vK(){const e=sr();return ya({mutationFn:({jobs:t})=>Ut.bulkPromote(t),onSuccess:()=>{e.invalidateQueries({queryKey:et.runsAll}),e.invalidateQueries({queryKey:et.queues}),e.invalidateQueries({queryKey:et.schedulers.all})}})}function Ide(){const e=sr();return ya({mutationFn:t=>Ut.pauseQueue(t),onSuccess:()=>{e.invalidateQueries({queryKey:et.queues})}})}function Lde(){const e=sr();return ya({mutationFn:t=>Ut.resumeQueue(t),onSuccess:()=>{e.invalidateQueries({queryKey:et.queues})}})}function $de(){return Hr({queryKey:et.flows,queryFn:({signal:e})=>Ut.getFlows(void 0,e),refetchInterval:5e3})}function Bde(e,t){return Hr({queryKey:et.flow(e,t),queryFn:()=>Ut.getFlow(e,t),enabled:!!e&&!!t,retry:!1,refetchInterval:5e3})}const qde=[{id:"runs",title:"Runs",icon:rb},{id:"metrics",title:"Metrics",icon:v7},{id:"schedulers",title:"Schedulers",icon:Li},{id:"flows",title:"Flows",icon:yu},{id:"test",title:"Test",icon:aP}];function zde({queues:e,queueGroups:t=[],pausedQueues:n=new Set,activeNav:r,activeQueue:i,onNavSelect:a,onQueueSelect:o,isDark:l,onToggleTheme:u,title:f="Workbench"}){const{setOpen:d,state:h}=Bm(),m=N.useMemo(()=>Ude(e,t),[e,t]);return y.jsxs("aside",{className:be("group peer relative flex h-screen shrink-0 flex-col border-r border-sidebar-border bg-sidebar text-sidebar-foreground transition-[width] duration-200 ease-linear",h==="collapsed"?"w-12":"w-64"),"data-state":h,"data-collapsible":h==="collapsed"?"icon":"","data-variant":"sidebar","data-side":"left",children:[y.jsxs(sK,{className:"h-14 flex-row items-center gap-2 border-b border-sidebar-border",children:[y.jsx(ob,{children:y.jsx(Mp,{children:y.jsxs(gP,{size:"lg",tooltip:f,onClick:()=>a("runs"),className:"h-10",children:[y.jsx("img",{src:"https://cdn-may.com/assets/may-square-512x512.png",alt:"May",className:"size-8"}),y.jsxs("span",{className:"grid min-w-0 flex-1 leading-tight group-data-[collapsible=icon]:hidden",children:[y.jsx("span",{className:"truncate text-sm font-semibold",children:"May/BarberFlow"}),y.jsx("span",{className:"truncate text-xs text-muted-foreground",children:"BullMQ Dashboard"})]})]})})}),y.jsx("div",{className:"group-data-[collapsible=icon]:hidden",children:y.jsx("button",{type:"button",onClick:()=>d(!1),className:"flex size-8 shrink-0 items-center justify-center text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",title:"Collapse sidebar",children:y.jsx(Rce,{className:"size-4"})})})]}),y.jsxs(cK,{children:[y.jsx(Q3,{label:"Monitor",children:qde.map(g=>y.jsx(e_,{icon:g.icon,label:g.title,active:r===g.id,onClick:()=>a(g.id)},g.id))}),y.jsx(uK,{}),y.jsxs(Q3,{label:"Queues",children:[y.jsx(e_,{icon:oP,label:"All Queues",active:r==="queues"&&!i,onClick:()=>a("queues")}),m.map(g=>y.jsx(Vde,{group:g,activeQueue:i,pausedQueues:n,onQueueSelect:o},g.name))]})]}),y.jsx(lK,{className:"border-t border-sidebar-border",children:y.jsx(ob,{children:y.jsx(e_,{icon:l?w7:b7,label:l?"Light mode":"Dark mode",onClick:u})})}),y.jsx(oK,{})]})}function Q3({label:e,children:t}){return y.jsxs(fK,{children:[y.jsx(dK,{children:e}),y.jsx(hK,{children:y.jsx(ob,{children:t})})]})}function e_({icon:e,label:t,active:n,onClick:r}){return y.jsx(Mp,{children:y.jsxs(gP,{type:"button",onClick:r,isActive:n,tooltip:t,className:"h-9",children:[y.jsx(e,{className:"size-4 shrink-0"}),y.jsx("span",{children:t})]})})}function Vde({group:e,activeQueue:t,pausedQueues:n,onQueueSelect:r}){return y.jsxs(y.Fragment,{children:[y.jsx(Mp,{className:"group-data-[collapsible=icon]:hidden",children:y.jsxs("div",{className:"flex h-8 items-center gap-2 px-2 text-sm font-medium",children:[y.jsx(xN,{className:"size-4 shrink-0 text-muted-foreground"}),y.jsx("span",{className:"truncate",children:e.name})]})}),y.jsx(Mp,{className:"group-data-[collapsible=icon]:hidden",children:y.jsx("div",{className:"ml-4 border-l border-sidebar-border pl-2",children:e.queues.map(i=>y.jsx(Fde,{queue:i,active:t===i,paused:n.has(i),onClick:()=>r(i)},i))})})]})}function Fde({queue:e,active:t,paused:n,onClick:r}){const i=Sde(e),a=(i==null?void 0:i.counts.active)||0,o=(i==null?void 0:i.counts.failed)||0;return y.jsxs("button",{type:"button",onClick:r,className:be("flex min-h-8 w-full min-w-0 items-center gap-2 px-2 py-1.5 text-left text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",t&&"bg-sidebar-accent text-sidebar-accent-foreground"),children:[y.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:e}),y.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[a>0&&y.jsx("span",{className:"font-mono text-[10px] text-chart-2",children:a}),o>0&&y.jsx("span",{className:"font-mono text-[10px] text-destructive",children:o}),n&&y.jsx("span",{className:"size-1.5 bg-amber-500"}),!n&&a===0&&o===0&&y.jsx(iP,{className:"size-3 text-muted-foreground"})]})]})}function Ude(e,t){const n=new Set(e),r=new Set,i=t.map(o=>{const l=o.queues.filter(u=>n.has(u));for(const u of l)r.add(u);return{name:o.name,queues:l}}).filter(o=>o.queues.length>0),a=e.filter(o=>!r.has(o));return a.length>0&&i.push({name:"Ungrouped",queues:a}),i}const Z3=[{value:"all",label:"All statuses"},{value:"active",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"waiting",label:"Queued"},{value:"delayed",label:"Delayed"}];function yP(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 Hde(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 Gde({value:e,status:t,onChange:n,className:r}){const{data:i}=gd(),[a,o]=N.useState(e),[l,u]=N.useState(!1),[f,d]=N.useState(0),h=N.useRef(null),m=N.useRef(null),g=(i==null?void 0:i.tags)??[],w="Search runs...",{currentToken:x,tokenType:b,tokenPrefix:S}=N.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 Q=z.slice(0,H),U=z.slice(H+1);return{currentToken:z,tokenType:"value",tokenPrefix:{key:Q,valuePrefix:U}}}return{currentToken:z,tokenType:"key",tokenPrefix:null}},[a]),E=b==="value"?S==null?void 0:S.key:void 0,{data:_}=pK(E??"",!!E),A=(_==null?void 0:_.values)??[],T=N.useMemo(()=>{const D=[];if(b==="key"&&x){const q=x.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 Z3)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(b==="value"&&S){const{key:q,valuePrefix:L}=S,z=L.toLowerCase();if(q==="status")for(const H of Z3)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(!x){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)},[x,b,S,g,A,a]),O=N.useMemo(()=>yP(a),[a]),M=D=>{o(D.target.value),u(!0),d(0)},R=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 Q,U=t;if(D.type==="status")U=D.value.replace("status:",""),Q=L.slice(0,Y)+z.trimStart();else if(D.type==="key")Q=L.slice(0,Y)+D.value+z;else{const W=(S==null?void 0:S.key)??"";Q=`${L.slice(0,Y)}${W}:${D.value}${z.startsWith(" ")?z:` ${z.trimStart()}`}`}o(Q.trim()),u(!1),n(Q.trim(),U),(X=h.current)==null||X.focus()},P=D=>{if(!l||T.length===0){D.key==="Enter"&&(D.preventDefault(),n(a,t));return}switch(D.key){case"ArrowDown":D.preventDefault(),d(q=>(q+1)%T.length);break;case"ArrowUp":D.preventDefault(),d(q=>(q-1+T.length)%T.length);break;case"Enter":case"Tab":D.preventDefault(),R(T[f]);break;case"Escape":u(!1);break}},$=D=>{const q={...O};delete q.tags[D];const L=Hde(q);o(L),n(L,t)},I=()=>{n(a,"all")};N.useEffect(()=>{e!==a&&o(e)},[e]),N.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 y.jsxs("div",{className:be("space-y-2",r),children:[y.jsxs("div",{ref:m,className:"relative",children:[y.jsxs("div",{className:"relative",children:[y.jsx(jp,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),y.jsx("input",{ref:h,type:"text",value:a,onChange:M,onKeyDown:P,onFocus:()=>u(!0),placeholder:w,className:"h-9 w-full border bg-transparent pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:outline-none"})]}),l&&y.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:[y.jsxs("button",{type:"button",onClick:V,className:be("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:[y.jsx("span",{children:"Confirm search"}),y.jsx("span",{className:"text-muted-foreground",children:"↵"})]}),T.length>0&&y.jsx("div",{className:"flex flex-wrap gap-2 p-3",children:T.map((D,q)=>y.jsx("button",{type:"button",onClick:()=>R(D),className:be(" 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&&y.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t&&t!=="all"&&y.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:[y.jsxs("span",{className:"font-mono",children:["status:",t]}),y.jsx(Np,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]}),Object.entries(O.tags).map(([D,q])=>y.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:[y.jsxs("span",{className:"font-mono",children:[D,":",q.length>16?`${q.slice(0,16)}...`:q]}),y.jsx(Np,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},D)),y.jsx("button",{type:"button",onClick:()=>{o(""),n("","all")},className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]})]})}var J3=1,Kde=.9,Wde=.8,Yde=.17,t_=.1,n_=.999,Xde=.9999,Qde=.99,Zde=/[\\\/_+.#"@\[\(\{&]/,Jde=/[\\\/_+.#"@\[\(\{&]/g,ehe=/[\s-]/,yK=/[\s-]/g;function SN(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?J3:Qde;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,w;f>=0;)h=SN(e,t,n,r,f+1,a+1,o),h>d&&(f===i?h*=J3:Zde.test(e.charAt(f-1))?(h*=Wde,g=e.slice(i,f-1).match(Jde),g&&i>0&&(h*=Math.pow(n_,g.length))):ehe.test(e.charAt(f-1))?(h*=Kde,w=e.slice(i,f-1).match(yK),w&&i>0&&(h*=Math.pow(n_,w.length))):(h*=Yde,i>0&&(h*=Math.pow(n_,f-i))),e.charAt(f)!==t.charAt(a)&&(h*=Xde)),(h<t_&&n.charAt(f-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(f-1)!==r.charAt(a))&&(m=SN(e,t,n,r,f+1,a+2,o),m*t_>h&&(h=m*t_)),h>d&&(d=h),f=n.indexOf(u,f+1);return o[l]=d,d}function eB(e){return e.toLowerCase().replace(yK," ")}function the(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,SN(e,t,eB(e),eB(t),0,0,{})}var Lh='[cmdk-group=""]',r_='[cmdk-group-items=""]',nhe='[cmdk-group-heading=""]',bK='[cmdk-item=""]',tB=`${bK}:not([aria-disabled="true"])`,_N="cmdk-item-select",zc="data-value",rhe=(e,t,n)=>the(e,t,n),xK=N.createContext(void 0),qm=()=>N.useContext(xK),wK=N.createContext(void 0),bP=()=>N.useContext(wK),SK=N.createContext(void 0),_K=N.forwardRef((e,t)=>{let n=Vc(()=>{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=Vc(()=>new Set),i=Vc(()=>new Map),a=Vc(()=>new Map),o=Vc(()=>new Set),l=EK(e),{label:u,children:f,value:d,onValueChange:h,filter:m,shouldFilter:g,loop:w,disablePointerSelection:x=!1,vimBindings:b=!0,...S}=e,E=or(),_=or(),A=or(),T=N.useRef(null),O=phe();xu(()=>{if(d!==void 0){let F=d.trim();n.current.value=F,M.emit()}},[d]),xu(()=>{O(6,V)},[]);let M=N.useMemo(()=>({subscribe:F=>(o.current.add(F),()=>o.current.delete(F)),snapshot:()=>n.current,setState:(F,X,W)=>{var G,Z,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,M.emit()}),W||O(5,V),((Z=l.current)==null?void 0:Z.value)!==void 0){let ne=X??"";(re=(J=l.current).onValueChange)==null||re.call(J,ne);return}}M.emit()}},emit:()=>{o.current.forEach(F=>F())}}),[]),R=N.useMemo(()=>({value:(F,X,W)=>{var G;X!==((G=a.current.get(F))==null?void 0:G.value)&&(a.current.set(F,{value:X,keywords:W}),n.current.filtered.items.set(F,P(X,W)),O(2,()=>{$(),M.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(),M.emit()}),()=>{a.current.delete(F),r.current.delete(F),n.current.filtered.items.delete(F);let W=D();O(4,()=>{k(),(W==null?void 0:W.getAttribute("id"))===F&&I(),M.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:T}),[]);function P(F,X){var W,G;let Z=(G=(W=l.current)==null?void 0:W.filter)!=null?G:rhe;return F?Z(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 Z=i.current.get(G),J=0;Z.forEach(re=>{let ne=F.get(re);J=Math.max(ne,J)}),X.push([G,J])});let W=T.current;q().sort((G,Z)=>{var J,re;let ne=G.getAttribute("id"),fe=Z.getAttribute("id");return((J=F.get(fe))!=null?J:0)-((re=F.get(ne))!=null?re:0)}).forEach(G=>{let Z=G.closest(r_);Z?Z.appendChild(G.parentElement===Z?G:G.closest(`${r_} > *`)):W.appendChild(G.parentElement===W?G:G.closest(`${r_} > *`))}),X.sort((G,Z)=>Z[1]-G[1]).forEach(G=>{var Z;let J=(Z=T.current)==null?void 0:Z.querySelector(`${Lh}[${zc}="${encodeURIComponent(G[0])}"]`);J==null||J.parentElement.appendChild(J)})}function I(){let F=q().find(W=>W.getAttribute("aria-disabled")!=="true"),X=F==null?void 0:F.getAttribute(zc);M.setState("value",X||void 0)}function k(){var F,X,W,G;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Z=0;for(let J of r.current){let re=(X=(F=a.current.get(J))==null?void 0:F.value)!=null?X:"",ne=(G=(W=a.current.get(J))==null?void 0:W.keywords)!=null?G:[],fe=P(re,ne);n.current.filtered.items.set(J,fe),fe>0&&Z++}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=Z}function V(){var F,X,W;let G=D();G&&(((F=G.parentElement)==null?void 0:F.firstChild)===G&&((W=(X=G.closest(Lh))==null?void 0:X.querySelector(nhe))==null||W.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function D(){var F;return(F=T.current)==null?void 0:F.querySelector(`${bK}[aria-selected="true"]`)}function q(){var F;return Array.from(((F=T.current)==null?void 0:F.querySelectorAll(tB))||[])}function L(F){let X=q()[F];X&&M.setState("value",X.getAttribute(zc))}function z(F){var X;let W=D(),G=q(),Z=G.findIndex(re=>re===W),J=G[Z+F];(X=l.current)!=null&&X.loop&&(J=Z+F<0?G[G.length-1]:Z+F===G.length?G[0]:G[Z+F]),J&&M.setState("value",J.getAttribute(zc))}function H(F){let X=D(),W=X==null?void 0:X.closest(Lh),G;for(;W&&!G;)W=F>0?dhe(W,Lh):hhe(W,Lh),G=W==null?void 0:W.querySelector(tB);G?M.setState("value",G.getAttribute(zc)):z(F)}let Y=()=>L(q().length-1),Q=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 N.createElement(Eo.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:F=>{var X;(X=S.onKeyDown)==null||X.call(S,F);let W=F.nativeEvent.isComposing||F.keyCode===229;if(!(F.defaultPrevented||W))switch(F.key){case"n":case"j":{b&&F.ctrlKey&&Q(F);break}case"ArrowDown":{Q(F);break}case"p":case"k":{b&&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 Z=new Event(_N);G.dispatchEvent(Z)}}}}},N.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:ghe},u),Z0(e,F=>N.createElement(wK.Provider,{value:M},N.createElement(xK.Provider,{value:R},F))))}),ihe=N.forwardRef((e,t)=>{var n,r;let i=or(),a=N.useRef(null),o=N.useContext(SK),l=qm(),u=EK(e),f=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;xu(()=>{if(!f)return l.item(i,o==null?void 0:o.id)},[f]);let d=AK(i,a,[e.value,e.children,a],e.keywords),h=bP(),m=Qs(O=>O.value&&O.value===d.current),g=Qs(O=>f||l.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);N.useEffect(()=>{let O=a.current;if(!(!O||e.disabled))return O.addEventListener(_N,w),()=>O.removeEventListener(_N,w)},[g,e.onSelect,e.disabled]);function w(){var O,M;x(),(M=(O=u.current).onSelect)==null||M.call(O,d.current)}function x(){h.setState("value",d.current,!0)}if(!g)return null;let{disabled:b,value:S,onSelect:E,forceMount:_,keywords:A,...T}=e;return N.createElement(Eo.div,{ref:Hs(a,t),...T,id:i,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!m,"data-disabled":!!b,"data-selected":!!m,onPointerMove:b||l.getDisablePointerSelection()?void 0:x,onClick:b?void 0:w},e.children)}),ahe=N.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=or(),l=N.useRef(null),u=N.useRef(null),f=or(),d=qm(),h=Qs(g=>i||d.filter()===!1?!0:g.search?g.filtered.groups.has(o):!0);xu(()=>d.group(o),[]),AK(o,l,[e.value,e.heading,u]);let m=N.useMemo(()=>({id:o,forceMount:i}),[i]);return N.createElement(Eo.div,{ref:Hs(l,t),...a,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&N.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),Z0(e,g=>N.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},N.createElement(SK.Provider,{value:m},g))))}),ohe=N.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=N.useRef(null),a=Qs(o=>!o.search);return!n&&!a?null:N.createElement(Eo.div,{ref:Hs(i,t),...r,"cmdk-separator":"",role:"separator"})}),she=N.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=bP(),o=Qs(f=>f.search),l=Qs(f=>f.selectedItemId),u=qm();return N.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),N.createElement(Eo.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)}})}),lhe=N.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=N.useRef(null),o=N.useRef(null),l=Qs(f=>f.selectedItemId),u=qm();return N.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)}}},[]),N.createElement(Eo.div,{ref:Hs(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:u.listId},Z0(e,f=>N.createElement("div",{ref:Hs(o,u.listInnerRef),"cmdk-list-sizer":""},f)))}),uhe=N.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...l}=e;return N.createElement(pP,{open:n,onOpenChange:r},N.createElement(mP,{container:o},N.createElement(Lm,{"cmdk-overlay":"",className:i}),N.createElement($m,{"aria-label":e.label,"cmdk-dialog":"",className:a},N.createElement(_K,{ref:t,...l}))))}),che=N.forwardRef((e,t)=>Qs(n=>n.filtered.count===0)?N.createElement(Eo.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),fhe=N.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return N.createElement(Eo.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Z0(e,o=>N.createElement("div",{"aria-hidden":!0},o)))}),Er=Object.assign(_K,{List:lhe,Item:ihe,Input:she,Group:ahe,Separator:ohe,Dialog:uhe,Empty:che,Loading:fhe});function dhe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function hhe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function EK(e){let t=N.useRef(e);return xu(()=>{t.current=e}),t}var xu=typeof window>"u"?N.useEffect:N.useLayoutEffect;function Vc(e){let t=N.useRef();return t.current===void 0&&(t.current=e()),t}function Qs(e){let t=bP(),n=()=>e(t.snapshot());return N.useSyncExternalStore(t.subscribe,n,n)}function AK(e,t,n,r=[]){let i=N.useRef(),a=qm();return xu(()=>{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(zc,l),i.current=l}),i}var phe=()=>{let[e,t]=N.useState(),n=Vc(()=>new Map);return xu(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function mhe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Z0({asChild:e,children:t},n){return e&&N.isValidElement(t)?N.cloneElement(mhe(t),{ref:t.ref},n(t.props.children)):n(t)}var ghe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const vhe=pP,yhe=mP,TK=N.forwardRef(({className:e,...t},n)=>y.jsx(Lm,{ref:n,className:be("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}));TK.displayName=Lm.displayName;const CK=N.forwardRef(({className:e,children:t,...n},r)=>y.jsxs(yhe,{children:[y.jsx(TK,{}),y.jsxs($m,{ref:r,className:be("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...n,children:[t,y.jsxs(tK,{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:[y.jsx(Np,{className:"h-4 w-4"}),y.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));CK.displayName=$m.displayName;const bhe=N.forwardRef(({className:e,...t},n)=>y.jsx(Y0,{ref:n,className:be("text-lg font-semibold leading-none tracking-tight",e),...t}));bhe.displayName=Y0.displayName;const xhe=N.forwardRef(({className:e,...t},n)=>y.jsx(X0,{ref:n,className:be("text-sm text-muted-foreground",e),...t}));xhe.displayName=X0.displayName;const OK=N.forwardRef(({className:e,...t},n)=>y.jsx(Er,{ref:n,className:be("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}));OK.displayName=Er.displayName;const whe=({children:e,...t})=>y.jsx(vhe,{...t,children:y.jsx(CK,{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:y.jsx(OK,{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})})}),jK=N.forwardRef(({className:e,...t},n)=>y.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[y.jsx(jp,{className:"mr-2 h-4 w-4 shrink-0 text-foreground/60"}),y.jsx(Er.Input,{ref:n,className:be("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})]}));jK.displayName=Er.Input.displayName;const NK=N.forwardRef(({className:e,...t},n)=>y.jsx(Er.List,{ref:n,className:be("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));NK.displayName=Er.List.displayName;const MK=N.forwardRef((e,t)=>y.jsx(Er.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));MK.displayName=Er.Empty.displayName;const Dl=N.forwardRef(({className:e,...t},n)=>y.jsx(Er.Group,{ref:n,className:be("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}));Dl.displayName=Er.Group.displayName;const RK=N.forwardRef(({className:e,...t},n)=>y.jsx(Er.Separator,{ref:n,className:be("-mx-1 h-px bg-border",e),...t}));RK.displayName=Er.Separator.displayName;const ds=N.forwardRef(({className:e,...t},n)=>y.jsx(Er.Item,{ref:n,className:be("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}));ds.displayName=Er.Item.displayName;const nB=[{id:"runs",label:"Runs",path:"/",icon:y.jsx(vu,{className:"h-4 w-4"}),keywords:["runs","jobs","all"]},{id:"metrics",label:"Metrics",path:"/metrics",icon:y.jsx(v7,{className:"h-4 w-4"}),keywords:["metrics","stats","analytics","dashboard"]},{id:"schedulers",label:"Schedulers",path:"/schedulers",icon:y.jsx(Sce,{className:"h-4 w-4"}),keywords:["schedulers","scheduled","cron","repeatable","delayed"]},{id:"flows",label:"Flows",path:"/flows",icon:y.jsx(yu,{className:"h-4 w-4"}),keywords:["flows","workflows","graph"]},{id:"test",label:"Test",path:"/test",icon:y.jsx(aP,{className:"h-4 w-4"}),keywords:["test","testing","try"]}];function She({open:e,onOpenChange:t,queues:n,searchQuery:r,onSearchQueryChange:i,isDark:a,onToggleTheme:o,onSelectQueue:l,onSelectJob:u,onNavigate:f}){const{data:d}=gd(),[h,m]=N.useState(r),g=(d==null?void 0:d.tags)??[];N.useEffect(()=>{e&&m(r)},[e,r]);const w=k=>{m(k),i(k)};N.useMemo(()=>yP(h),[h]);const{currentToken:x,tokenType:b,tokenPrefix:S}=N.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=b==="value"?S==null?void 0:S.key:void 0,{data:_}=pK(E??"",!!E&&g.includes(E??"")),A=(_==null?void 0:_.values)??[],{data:T,isLoading:O}=Mde(h),M=(T==null?void 0:T.results)??[],R=N.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]),P=N.useMemo(()=>{if(!h.trim())return n;const k=h.toLowerCase();return n.filter(V=>V.toLowerCase().includes(k))},[h,n]),$=N.useMemo(()=>b!=="key"||!x?[]:g.filter(k=>k.toLowerCase().startsWith(x.toLowerCase())),[b,x,g]),I=N.useMemo(()=>{if(b!=="value"||!S)return[];const k=S.valuePrefix.toLowerCase();return A.filter(V=>V.value.toLowerCase().startsWith(k)).slice(0,10)},[b,S,A]);return R.length>0||P.length>0||M.length>0||$.length>0||I.length>0,y.jsxs(whe,{open:e,onOpenChange:t,children:[y.jsx(jK,{placeholder:"Search jobs, queues, tags, or navigate...",value:h,onValueChange:w}),y.jsxs(NK,{children:[y.jsx(MK,{children:O?"Searching...":"No results found."}),$.length>0&&y.jsx(Dl,{heading:"Tag Fields",children:$.map(k=>y.jsxs(ds,{value:`tag-key-${k}`,onSelect:()=>{const V=h.replace(x,`${k}:`);w(V)},children:[y.jsx(jp,{className:"mr-2 h-4 w-4"}),y.jsxs("span",{className:"font-mono",children:[k,":"]}),y.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"tag field"})]},k))}),I.length>0&&y.jsx(Dl,{heading:`${S==null?void 0:S.key} values`,children:I.map(k=>{const V=`${S==null?void 0:S.key}:${k.value}`;return y.jsxs(ds,{value:`tag-value-${k.value}`,onSelect:()=>{const q=`${h.slice(0,h.lastIndexOf(x))}${V} `.trim();w(q)},children:[y.jsx(jp,{className:"mr-2 h-4 w-4"}),y.jsx("span",{className:"font-mono",children:V}),k.count>0&&y.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:[k.count," jobs"]})]},k.value)})}),R.length>0&&y.jsx(Dl,{heading:"Navigation",children:R.map(k=>y.jsxs(ds,{value:`nav-${k.id}`,onSelect:()=>{f(k.path),t(!1)},children:[k.icon,y.jsx("span",{children:k.label}),y.jsx(xce,{className:"ml-auto h-4 w-4 text-muted-foreground"})]},k.id))}),P.length>0&&y.jsx(Dl,{heading:"Queues",children:P.map(k=>y.jsxs(ds,{value:`queue-${k}`,onSelect:()=>{l(k),t(!1)},children:[y.jsx(oP,{className:"mr-2 h-4 w-4"}),y.jsx("span",{className:"font-mono",children:k})]},k))}),M.length>0&&y.jsx(Dl,{heading:`Jobs (${M.length})`,children:M.map(k=>y.jsxs(ds,{value:`job-${k.job.id}`,onSelect:()=>{u(k.queue,k.job.id),t(!1)},children:[y.jsx(vu,{className:"mr-2 h-4 w-4"}),y.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"font-medium",children:k.job.name}),y.jsx("span",{className:"text-xs text-muted-foreground",children:l7(k.job.timestamp)})]}),y.jsxs("span",{className:"truncate font-mono text-xs text-muted-foreground",children:[Qy(k.job.id,30)," · ",k.queue]})]}),y.jsx(_he,{status:k.job.status})]},`${k.queue}-${k.job.id}`))}),!h.trim()&&y.jsxs(y.Fragment,{children:[y.jsx(RK,{}),y.jsxs(Dl,{heading:"Actions",children:[y.jsxs(ds,{value:"refresh",onSelect:()=>{window.location.reload()},children:[y.jsx(Im,{className:"mr-2 h-4 w-4"}),y.jsx("span",{children:"Refresh"}),y.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:[y.jsx("span",{className:"text-xs",children:"⌘"}),"R"]})]}),y.jsxs(ds,{value:"theme",onSelect:()=>{o()},children:[a?y.jsx(w7,{className:"mr-2 h-4 w-4"}):y.jsx(b7,{className:"mr-2 h-4 w-4"}),y.jsx("span",{children:"Toggle Theme"}),y.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:[y.jsx("span",{className:"text-xs",children:"⌘"}),"⇧T"]})]})]})]})]})]})}function _he({status:e}){const t={completed:"bg-success",active:"bg-warning",waiting:"bg-muted-foreground",delayed:"bg-muted-foreground",failed:"bg-destructive"};return y.jsx("span",{className:`h-2 w-2 rounded-full ${t[e]||"bg-muted-foreground"}`})}function Ehe({value:e,onValueChange:t,onFocus:n,placeholder:r="Search anything...",className:i}){const a=N.useRef(null),o=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),n==null||n())};return y.jsxs("div",{className:be("relative flex items-center",i),children:[y.jsx(jp,{className:"absolute left-2 h-4 w-4 text-foreground/60 pointer-events-none"}),y.jsx(lP,{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"}),y.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:[y.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 Ahe={value:()=>{}};function J0(){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 Ty(n)}function Ty(e){this._=e}function The(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}})}Ty.prototype=J0.prototype={constructor:Ty,on:function(e,t){var n=this._,r=The(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Che(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 Ty(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 Che(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]=Ahe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var EN="http://www.w3.org/1999/xhtml";const iB={svg:"http://www.w3.org/2000/svg",xhtml:EN,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ex(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 Ohe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===EN&&t.documentElement.namespaceURI===EN?t.createElement(e):t.createElementNS(n,e)}}function jhe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function PK(e){var t=ex(e);return(t.local?jhe:Ohe)(t)}function Nhe(){}function xP(e){return e==null?Nhe:function(){return this.querySelector(e)}}function Mhe(e){typeof e!="function"&&(e=xP(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 Rhe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Phe(){return[]}function kK(e){return e==null?Phe:function(){return this.querySelectorAll(e)}}function khe(e){return function(){return Rhe(e.apply(this,arguments))}}function Dhe(e){typeof e=="function"?e=khe(e):e=kK(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 DK(e){return function(){return this.matches(e)}}function IK(e){return function(t){return t.matches(e)}}var Ihe=Array.prototype.find;function Lhe(e){return function(){return Ihe.call(this.children,e)}}function $he(){return this.firstElementChild}function Bhe(e){return this.select(e==null?$he:Lhe(typeof e=="function"?e:IK(e)))}var qhe=Array.prototype.filter;function zhe(){return Array.from(this.children)}function Vhe(e){return function(){return qhe.call(this.children,e)}}function Fhe(e){return this.selectAll(e==null?zhe:Vhe(typeof e=="function"?e:IK(e)))}function Uhe(e){typeof e!="function"&&(e=DK(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 LK(e){return new Array(e.length)}function Hhe(){return new Fr(this._enter||this._groups.map(LK),this._parents)}function sb(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}sb.prototype={constructor:sb,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 Ghe(e){return function(){return e}}function Khe(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 sb(e,a[o]);for(;o<u;++o)(l=t[o])&&(i[o]=l)}function Whe(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 sb(e,a[l]);for(l=0;l<d;++l)(u=t[l])&&f.get(m[l])===u&&(i[l]=u)}function Yhe(e){return e.__data__}function Xhe(e,t){if(!arguments.length)return Array.from(this,Yhe);var n=t?Whe:Khe,r=this._parents,i=this._groups;typeof e!="function"&&(e=Ghe(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=Qhe(e.call(d,d&&d.__data__,f,r)),w=g.length,x=l[f]=new Array(w),b=o[f]=new Array(w),S=u[f]=new Array(m);n(d,h,x,b,S,g,t);for(var E=0,_=0,A,T;E<w;++E)if(A=x[E]){for(E>=_&&(_=E+1);!(T=b[_])&&++_<w;);A._next=T||null}}return o=new Fr(o,r),o._enter=l,o._exit=u,o}function Qhe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Zhe(){return new Fr(this._exit||this._groups.map(LK),this._parents)}function Jhe(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 epe(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,w=0;w<h;++w)(g=f[w]||d[w])&&(m[w]=g);for(;u<i;++u)l[u]=n[u];return new Fr(l,this._parents)}function tpe(){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 npe(e){e||(e=rpe);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 rpe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ipe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ape(){return Array.from(this)}function ope(){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 spe(){let e=0;for(const t of this)++e;return e}function lpe(){return!this.node()}function upe(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 cpe(e){return function(){this.removeAttribute(e)}}function fpe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dpe(e,t){return function(){this.setAttribute(e,t)}}function hpe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function ppe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function mpe(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 gpe(e,t){var n=ex(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?fpe:cpe:typeof t=="function"?n.local?mpe:ppe:n.local?hpe:dpe)(n,t))}function $K(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function vpe(e){return function(){this.style.removeProperty(e)}}function ype(e,t,n){return function(){this.style.setProperty(e,t,n)}}function bpe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function xpe(e,t,n){return arguments.length>1?this.each((t==null?vpe:typeof t=="function"?bpe:ype)(e,t,n??"")):Nf(this.node(),e)}function Nf(e,t){return e.style.getPropertyValue(t)||$K(e).getComputedStyle(e,null).getPropertyValue(t)}function wpe(e){return function(){delete this[e]}}function Spe(e,t){return function(){this[e]=t}}function _pe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Epe(e,t){return arguments.length>1?this.each((t==null?wpe:typeof t=="function"?_pe:Spe)(e,t)):this.node()[e]}function BK(e){return e.trim().split(/^|\s+/)}function wP(e){return e.classList||new qK(e)}function qK(e){this._node=e,this._names=BK(e.getAttribute("class")||"")}qK.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 zK(e,t){for(var n=wP(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function VK(e,t){for(var n=wP(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Ape(e){return function(){zK(this,e)}}function Tpe(e){return function(){VK(this,e)}}function Cpe(e,t){return function(){(t.apply(this,arguments)?zK:VK)(this,e)}}function Ope(e,t){var n=BK(e+"");if(arguments.length<2){for(var r=wP(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Cpe:t?Ape:Tpe)(n,t))}function jpe(){this.textContent=""}function Npe(e){return function(){this.textContent=e}}function Mpe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Rpe(e){return arguments.length?this.each(e==null?jpe:(typeof e=="function"?Mpe:Npe)(e)):this.node().textContent}function Ppe(){this.innerHTML=""}function kpe(e){return function(){this.innerHTML=e}}function Dpe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ipe(e){return arguments.length?this.each(e==null?Ppe:(typeof e=="function"?Dpe:kpe)(e)):this.node().innerHTML}function Lpe(){this.nextSibling&&this.parentNode.appendChild(this)}function $pe(){return this.each(Lpe)}function Bpe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function qpe(){return this.each(Bpe)}function zpe(e){var t=typeof e=="function"?e:PK(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Vpe(){return null}function Fpe(e,t){var n=typeof e=="function"?e:PK(e),r=t==null?Vpe:typeof t=="function"?t:xP(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Upe(){var e=this.parentNode;e&&e.removeChild(this)}function Hpe(){return this.each(Upe)}function Gpe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Kpe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Wpe(e){return this.select(e?Kpe:Gpe)}function Ype(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Xpe(e){return function(t){e.call(this,t,this.__data__)}}function Qpe(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 Zpe(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 Jpe(e,t,n){return function(){var r=this.__on,i,a=Xpe(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 eme(e,t,n){var r=Qpe(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?Jpe:Zpe,i=0;i<a;++i)this.each(l(r[i],t,n));return this}function FK(e,t,n){var r=$K(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 tme(e,t){return function(){return FK(this,e,t)}}function nme(e,t){return function(){return FK(this,e,t.apply(this,arguments))}}function rme(e,t){return this.each((typeof t=="function"?nme:tme)(e,t))}function*ime(){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 UK=[null];function Fr(e,t){this._groups=e,this._parents=t}function zm(){return new Fr([[document.documentElement]],UK)}function ame(){return this}Fr.prototype=zm.prototype={constructor:Fr,select:Mhe,selectAll:Dhe,selectChild:Bhe,selectChildren:Fhe,filter:Uhe,data:Xhe,enter:Hhe,exit:Zhe,join:Jhe,merge:epe,selection:ame,order:tpe,sort:npe,call:ipe,nodes:ape,node:ope,size:spe,empty:lpe,each:upe,attr:gpe,style:xpe,property:Epe,classed:Ope,text:Rpe,html:Ipe,raise:$pe,lower:qpe,append:zpe,insert:Fpe,remove:Hpe,clone:Wpe,datum:Ype,on:eme,dispatch:rme,[Symbol.iterator]:ime};function Lr(e){return typeof e=="string"?new Fr([[document.querySelector(e)]],[document.documentElement]):new Fr([[e]],UK)}function ome(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Oi(e,t){if(e=ome(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 sme={passive:!1},Rp={capture:!0,passive:!1};function i_(e){e.stopImmediatePropagation()}function rf(e){e.preventDefault(),e.stopImmediatePropagation()}function HK(e){var t=e.document.documentElement,n=Lr(e).on("dragstart.drag",rf,Rp);"onselectstart"in t?n.on("selectstart.drag",rf,Rp):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function GK(e,t){var n=e.document.documentElement,r=Lr(e).on("dragstart.drag",null);t&&(r.on("click.drag",rf,Rp),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 Uv=e=>()=>e;function AN(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}})}AN.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function lme(e){return!e.ctrlKey&&!e.button}function ume(){return this.parentNode}function cme(e,t){return t??{x:e.x,y:e.y}}function fme(){return navigator.maxTouchPoints||"ontouchstart"in this}function KK(){var e=lme,t=ume,n=cme,r=fme,i={},a=J0("start","drag","end"),o=0,l,u,f,d,h=0;function m(A){A.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",S,sme).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(A,T){if(!(d||!e.call(this,A,T))){var O=_(this,t.call(this,A,T),A,T,"mouse");O&&(Lr(A.view).on("mousemove.drag",w,Rp).on("mouseup.drag",x,Rp),HK(A.view),i_(A),f=!1,l=A.clientX,u=A.clientY,O("start",A))}}function w(A){if(rf(A),!f){var T=A.clientX-l,O=A.clientY-u;f=T*T+O*O>h}i.mouse("drag",A)}function x(A){Lr(A.view).on("mousemove.drag mouseup.drag",null),GK(A.view,f),rf(A),i.mouse("end",A)}function b(A,T){if(e.call(this,A,T)){var O=A.changedTouches,M=t.call(this,A,T),R=O.length,P,$;for(P=0;P<R;++P)($=_(this,M,A,T,O[P].identifier,O[P]))&&(i_(A),$("start",A,O[P]))}}function S(A){var T=A.changedTouches,O=T.length,M,R;for(M=0;M<O;++M)(R=i[T[M].identifier])&&(rf(A),R("drag",A,T[M]))}function E(A){var T=A.changedTouches,O=T.length,M,R;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),M=0;M<O;++M)(R=i[T[M].identifier])&&(i_(A),R("end",A,T[M]))}function _(A,T,O,M,R,P){var $=a.copy(),I=Oi(P||O,T),k,V,D;if((D=n.call(A,new AN("beforestart",{sourceEvent:O,target:m,identifier:R,active:o,x:I[0],y:I[1],dx:0,dy:0,dispatch:$}),M))!=null)return k=D.x-I[0]||0,V=D.y-I[1]||0,function q(L,z,H){var Y=I,Q;switch(L){case"start":i[R]=q,Q=o++;break;case"end":delete i[R],--o;case"drag":I=Oi(H||z,T),Q=o;break}$.call(L,A,new AN(L,{sourceEvent:z,subject:D,target:m,identifier:R,active:Q,x:I[0]+k,y:I[1]+V,dx:I[0]-Y[0],dy:I[1]-Y[1],dispatch:$}),M)}}return m.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Uv(!!A),m):e},m.container=function(A){return arguments.length?(t=typeof A=="function"?A:Uv(A),m):t},m.subject=function(A){return arguments.length?(n=typeof A=="function"?A:Uv(A),m):n},m.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Uv(!!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 SP(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function WK(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Vm(){}var Pp=.7,lb=1/Pp,af="\\s*([+-]?\\d+)\\s*",kp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",da="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dme=/^#([0-9a-f]{3,8})$/,hme=new RegExp(`^rgb\\(${af},${af},${af}\\)$`),pme=new RegExp(`^rgb\\(${da},${da},${da}\\)$`),mme=new RegExp(`^rgba\\(${af},${af},${af},${kp}\\)$`),gme=new RegExp(`^rgba\\(${da},${da},${da},${kp}\\)$`),vme=new RegExp(`^hsl\\(${kp},${da},${da}\\)$`),yme=new RegExp(`^hsla\\(${kp},${da},${da},${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};SP(Vm,wu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:oB,formatHex:oB,formatHex8:bme,formatHsl:xme,formatRgb:sB,toString:sB});function oB(){return this.rgb().formatHex()}function bme(){return this.rgb().formatHex8()}function xme(){return YK(this).formatHsl()}function sB(){return this.rgb().formatRgb()}function wu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=dme.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?Hv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Hv(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=hme.exec(e))?new xr(t[1],t[2],t[3],1):(t=pme.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=mme.exec(e))?Hv(t[1],t[2],t[3],t[4]):(t=gme.exec(e))?Hv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=vme.exec(e))?fB(t[1],t[2]/100,t[3]/100,1):(t=yme.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 Hv(e,t,n,r){return r<=0&&(e=t=n=NaN),new xr(e,t,n,r)}function wme(e){return e instanceof Vm||(e=wu(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function TN(e,t,n,r){return arguments.length===1?wme(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}SP(xr,TN,WK(Vm,{brighter(e){return e=e==null?lb:Math.pow(lb,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pp:Math.pow(Pp,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(lu(this.r),lu(this.g),lu(this.b),ub(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:Sme,formatRgb:cB,toString:cB}));function uB(){return`#${Fl(this.r)}${Fl(this.g)}${Fl(this.b)}`}function Sme(){return`#${Fl(this.r)}${Fl(this.g)}${Fl(this.b)}${Fl((isNaN(this.opacity)?1:this.opacity)*255)}`}function cB(){const e=ub(this.opacity);return`${e===1?"rgb(":"rgba("}${lu(this.r)}, ${lu(this.g)}, ${lu(this.b)}${e===1?")":`, ${e})`}`}function ub(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Fl(e){return e=lu(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 YK(e){if(e instanceof Pi)return new Pi(e.h,e.s,e.l,e.opacity);if(e instanceof Vm||(e=wu(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 _me(e,t,n,r){return arguments.length===1?YK(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}SP(Pi,_me,WK(Vm,{brighter(e){return e=e==null?lb:Math.pow(lb,e),new Pi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pp:Math.pow(Pp,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(a_(e>=240?e-240:e+120,i,r),a_(e,i,r),a_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Pi(dB(this.h),Gv(this.s),Gv(this.l),ub(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=ub(this.opacity);return`${e===1?"hsl(":"hsla("}${dB(this.h)}, ${Gv(this.s)*100}%, ${Gv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function dB(e){return e=(e||0)%360,e<0?e+360:e}function Gv(e){return Math.max(0,Math.min(1,e||0))}function a_(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 _P=e=>()=>e;function Eme(e,t){return function(n){return e+n*t}}function Ame(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 Tme(e){return(e=+e)==1?XK:function(t,n){return n-t?Ame(t,n,e):_P(isNaN(t)?n:t)}}function XK(e,t){var n=t-e;return n?Eme(e,n):_P(isNaN(e)?t:e)}const cb=(function e(t){var n=Tme(t);function r(i,a){var o=n((i=TN(i)).r,(a=TN(a)).r),l=n(i.g,a.g),u=n(i.b,a.b),f=XK(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 Cme(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 Ome(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function jme(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 Nme(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Mi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Mme(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 CN=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,o_=new RegExp(CN.source,"g");function Rme(e){return function(){return e}}function Pme(e){return function(t){return e(t)+""}}function QK(e,t){var n=CN.lastIndex=o_.lastIndex=0,r,i,a,o=-1,l=[],u=[];for(e=e+"",t=t+"";(r=CN.exec(e))&&(i=o_.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:Mi(r,i)})),n=o_.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?u[0]?Pme(u[0].x):Rme(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"?_P(t):(n==="number"?Mi:n==="string"?(r=wu(t))?(t=r,cb):QK:t instanceof wu?cb:t instanceof Date?Nme:Ome(t)?Cme:Array.isArray(t)?jme:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Mme:Mi)(e,t)}function EP(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var hB=180/Math.PI,ON={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ZK(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 Kv;function kme(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ON:ZK(t.a,t.b,t.c,t.d,t.e,t.f)}function Dme(e){return e==null||(Kv||(Kv=document.createElementNS("http://www.w3.org/2000/svg","g")),Kv.setAttribute("transform",e),!(e=Kv.transform.baseVal.consolidate()))?ON:(e=e.matrix,ZK(e.a,e.b,e.c,e.d,e.e,e.f))}function JK(e,t,n,r){function i(f){return f.length?f.pop()+" ":""}function a(f,d,h,m,g,w){if(f!==h||d!==m){var x=g.push("translate(",null,t,null,n);w.push({i:x-4,x:Mi(f,h)},{i:x-2,x:Mi(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:Mi(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:Mi(f,d)}):d&&h.push(i(h)+"skewX("+d+r)}function u(f,d,h,m,g,w){if(f!==h||d!==m){var x=g.push(i(g)+"scale(",null,",",null,")");w.push({i:x-4,x:Mi(f,h)},{i:x-2,x:Mi(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 w=-1,x=m.length,b;++w<x;)h[(b=m[w]).i]=b.x(g);return h.join("")}}}var Ime=JK(kme,"px, ","px)","deg)"),Lme=JK(Dme,", ",")",")"),$me=1e-12;function pB(e){return((e=Math.exp(e))+1/e)/2}function Bme(e){return((e=Math.exp(e))-1/e)/2}function qme(e){return((e=Math.exp(2*e))-1)/(e+1)}const Cy=(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,w=h-u,x=g*g+w*w,b,S;if(x<$me)S=Math.log(m/f)/t,b=function(M){return[l+M*g,u+M*w,f*Math.exp(t*M*S)]};else{var E=Math.sqrt(x),_=(m*m-f*f+r*x)/(2*f*n*E),A=(m*m-f*f-r*x)/(2*m*n*E),T=Math.log(Math.sqrt(_*_+1)-_),O=Math.log(Math.sqrt(A*A+1)-A);S=(O-T)/t,b=function(M){var R=M*S,P=pB(T),$=f/(n*E)*(P*qme(t*R+T)-Bme(T));return[l+$*g,u+$*w,f*P/pB(t*R+T)]}}return b.duration=S*1e3*t/Math.SQRT2,b}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 zme(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 Mf=0,Jh=0,$h=0,eW=1e3,fb,ep,db=0,Su=0,tx=0,Dp=typeof performance=="object"&&performance.now?performance:Date,tW=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function AP(){return Su||(tW(Vme),Su=Dp.now()+tx)}function Vme(){Su=0}function hb(){this._call=this._time=this._next=null}hb.prototype=nW.prototype={constructor:hb,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?AP():+n)+(t==null?0:+t),!this._next&&ep!==this&&(ep?ep._next=this:fb=this,ep=this),this._call=e,this._time=n,jN()},stop:function(){this._call&&(this._call=null,this._time=1/0,jN())}};function nW(e,t,n){var r=new hb;return r.restart(e,t,n),r}function Fme(){AP(),++Mf;for(var e=fb,t;e;)(t=Su-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Mf}function mB(){Su=(db=Dp.now())+tx,Mf=Jh=0;try{Fme()}finally{Mf=0,Hme(),Su=0}}function Ume(){var e=Dp.now(),t=e-db;t>eW&&(tx-=t,db=e)}function Hme(){for(var e,t=fb,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:fb=n);ep=e,jN(r)}function jN(e){if(!Mf){Jh&&(Jh=clearTimeout(Jh));var t=e-Su;t>24?(e<1/0&&(Jh=setTimeout(mB,e-Dp.now()-tx)),$h&&($h=clearInterval($h))):($h||(db=Dp.now(),$h=setInterval(Ume,eW)),Mf=1,tW(mB))}}function gB(e,t,n){var r=new hb;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Gme=J0("start","end","cancel","interrupt"),Kme=[],rW=0,vB=1,NN=2,Oy=3,yB=4,MN=5,jy=6;function nx(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Wme(e,n,{name:t,index:r,group:i,on:Gme,tween:Kme,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:rW})}function TP(e,t){var n=Ui(e,t);if(n.state>rW)throw new Error("too late; already scheduled");return n}function xa(e,t){var n=Ui(e,t);if(n.state>Oy)throw new Error("too late; already running");return n}function Ui(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Wme(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=nW(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===Oy)return gB(o);g.state===yB?(g.state=jy,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=jy,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(gB(function(){n.state===Oy&&(n.state=yB,n.timer.restart(l,n.delay,n.time),l(f))}),n.state=NN,n.on.call("start",e,e.__data__,n.index,n.group),n.state===NN){for(n.state=Oy,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=MN,1),h=-1,m=i.length;++h<m;)i[h].call(e,d);n.state===MN&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=jy,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Ny(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>NN&&r.state<MN,r.state=jy,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Yme(e){return this.each(function(){Ny(this,e)})}function Xme(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 Qme(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 Zme(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Ui(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?Xme:Qme)(n,e,t))}function CP(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 Ui(i,r).value[t]}}function iW(e,t){var n;return(typeof t=="number"?Mi:t instanceof wu?cb:(n=wu(t))?(t=n,cb):QK)(e,t)}function Jme(e){return function(){this.removeAttribute(e)}}function ege(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tge(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 nge(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 rge(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 ige(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 age(e,t){var n=ex(e),r=n==="transform"?Lme:iW;return this.attrTween(e,typeof t=="function"?(n.local?ige:rge)(n,r,CP(this,"attr."+e,t)):t==null?(n.local?ege:Jme)(n):(n.local?nge:tge)(n,r,t))}function oge(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function sge(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function lge(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&sge(e,a)),n}return i._value=t,i}function uge(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&oge(e,a)),n}return i._value=t,i}function cge(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=ex(e);return this.tween(n,(r.local?lge:uge)(r,t))}function fge(e,t){return function(){TP(this,e).delay=+t.apply(this,arguments)}}function dge(e,t){return t=+t,function(){TP(this,e).delay=t}}function hge(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?fge:dge)(t,e)):Ui(this.node(),t).delay}function pge(e,t){return function(){xa(this,e).duration=+t.apply(this,arguments)}}function mge(e,t){return t=+t,function(){xa(this,e).duration=t}}function gge(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pge:mge)(t,e)):Ui(this.node(),t).duration}function vge(e,t){if(typeof t!="function")throw new Error;return function(){xa(this,e).ease=t}}function yge(e){var t=this._id;return arguments.length?this.each(vge(t,e)):Ui(this.node(),t).ease}function bge(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;xa(this,e).ease=n}}function xge(e){if(typeof e!="function")throw new Error;return this.each(bge(this._id,e))}function wge(e){typeof e!="function"&&(e=DK(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 mo(r,this._parents,this._name,this._id)}function Sge(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 mo(o,this._parents,this._name,this._id)}function _ge(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 Ege(e,t,n){var r,i,a=_ge(t)?TP:xa;return function(){var o=a(this,e),l=o.on;l!==r&&(i=(r=l).copy()).on(t,n),o.on=i}}function Age(e,t){var n=this._id;return arguments.length<2?Ui(this.node(),n).on.on(e):this.each(Ege(n,e,t))}function Tge(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Cge(){return this.on("end.remove",Tge(this._id))}function Oge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=xP(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,nx(f[m],t,n,m,f,Ui(d,n)));return new mo(a,this._parents,t,n)}function jge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=kK(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,w=Ui(d,n),x=0,b=m.length;x<b;++x)(g=m[x])&&nx(g,t,n,x,m,w);a.push(m),o.push(d)}return new mo(a,o,t,n)}var Nge=zm.prototype.constructor;function Mge(){return new Nge(this._groups,this._parents)}function Rge(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 aW(e){return function(){this.style.removeProperty(e)}}function Pge(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 kge(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 Dge(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=aW(t)):void 0;(f!==n||i!==d)&&(r=(n=f).copy()).on(o,i=d),u.on=r}}function Ige(e,t,n){var r=(e+="")=="transform"?Ime:iW;return t==null?this.styleTween(e,Rge(e,r)).on("end.style."+e,aW(e)):typeof t=="function"?this.styleTween(e,kge(e,r,CP(this,"style."+e,t))).each(Dge(this._id,e)):this.styleTween(e,Pge(e,r,t),n).on("end.style."+e,null)}function Lge(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function $ge(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&Lge(e,o,n)),r}return a._value=t,a}function Bge(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,$ge(e,t,n??""))}function qge(e){return function(){this.textContent=e}}function zge(e){return function(){var t=e(this);this.textContent=t??""}}function Vge(e){return this.tween("text",typeof e=="function"?zge(CP(this,"text",e)):qge(e==null?"":e+""))}function Fge(e){return function(t){this.textContent=e.call(this,t)}}function Uge(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Fge(i)),t}return r._value=e,r}function Hge(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,Uge(e))}function Gge(){for(var e=this._name,t=this._id,n=oW(),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=Ui(u,t);nx(u,e,n,f,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new mo(r,this._parents,e,n)}function Kge(){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 Wge=0;function mo(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function oW(){return++Wge}var Ha=zm.prototype;mo.prototype={constructor:mo,select:Oge,selectAll:jge,selectChild:Ha.selectChild,selectChildren:Ha.selectChildren,filter:wge,merge:Sge,selection:Mge,transition:Gge,call:Ha.call,nodes:Ha.nodes,node:Ha.node,size:Ha.size,empty:Ha.empty,each:Ha.each,on:Age,attr:age,attrTween:cge,style:Ige,styleTween:Bge,text:Vge,textTween:Hge,remove:Cge,tween:Zme,delay:hge,duration:gge,ease:yge,easeVarying:xge,end:Kge,[Symbol.iterator]:Ha[Symbol.iterator]};function Yge(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Xge={time:null,delay:0,duration:250,ease:Yge};function Qge(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 Zge(e){var t,n;e instanceof mo?(t=e._id,e=e._name):(t=oW(),(n=Xge).time=AP(),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])&&nx(u,e,t,f,o,n||Qge(u,t));return new mo(r,this._parents,e,t)}zm.prototype.interrupt=Yme;zm.prototype.transition=Zge;const Wv=e=>()=>e;function Jge(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 rx=new eo(1,0,0);sW.prototype=eo.prototype;function sW(e){for(;!e.__zoom;)if(!(e=e.parentNode))return rx;return e.__zoom}function s_(e){e.stopImmediatePropagation()}function Bh(e){e.preventDefault(),e.stopImmediatePropagation()}function eve(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function tve(){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||rx}function nve(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function rve(){return navigator.maxTouchPoints||"ontouchstart"in this}function ive(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 lW(){var e=eve,t=tve,n=ive,r=nve,i=rve,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,u=Cy,f=J0("start","zoom","end"),d,h,m,g=500,w=150,x=0,b=10;function S(D){D.property("__zoom",bB).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",P).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?T(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,Q=L==null?A(H):typeof L=="function"?L.apply(this,arguments):L,U=Y.invert(Q),F=typeof q=="function"?q.apply(this,arguments):q;return n(_(E(Y,F),Q,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),Q=this.__zoom,U=z==null?A(Y):typeof z=="function"?z.apply(this,arguments):z;return n(rx.translate(U[0],U[1]).scale(Q.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 T(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,Q=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]),W=H.__zoom,G=typeof q=="function"?q.apply(H,Y):q,Z=u(W.invert(F).concat(X/W.k),G.invert(F).concat(X/G.k));return function(J){if(J===1)J=G;else{var re=Z(J),ne=X/re[2];J=new eo(ne,F[0]-re[0]*ne,F[1]-re[1]*ne)}Q.zoom(null,J)}})}function O(D,q,L){return!L&&D.__zooming||new M(D,q)}function M(D,q){this.that=D,this.args=q,this.active=0,this.sourceEvent=null,this.extent=t.apply(D,q),this.taps=0}M.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=Lr(this.that).datum();f.call(D,this.that,new Jge(D,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:f}),q)}};function R(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=Oi(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)],Ny(this),L.start()}Bh(D),L.wheel=setTimeout(Q,w),L.zoom("mouse",n(_(E(z,H),L.mouse[0],L.mouse[1]),L.extent,o));function Q(){L.wheel=null,L.end()}}function P(D,...q){if(m||!e.apply(this,arguments))return;var L=D.currentTarget,z=O(this,q,!0).event(D),H=Lr(D.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",X,!0),Y=Oi(D,L),Q=D.clientX,U=D.clientY;HK(D.view),s_(D),z.mouse=[Y,this.__zoom.invert(Y)],Ny(this),z.start();function F(W){if(Bh(W),!z.moved){var G=W.clientX-Q,Z=W.clientY-U;z.moved=G*G+Z*Z>x}z.event(W).zoom("mouse",n(_(z.that.__zoom,z.mouse[0]=Oi(W,L),z.mouse[1]),z.extent,o))}function X(W){H.on("mousemove.zoom mouseup.zoom",null),GK(W.view,z.moved),Bh(W),z.event(W).end()}}function $(D,...q){if(e.apply(this,arguments)){var L=this.__zoom,z=Oi(D.changedTouches?D.changedTouches[0]:D,this),H=L.invert(z),Y=L.k*(D.shiftKey?.5:2),Q=n(_(E(L,Y),z,H),t.apply(this,q),o);Bh(D),l>0?Lr(this).transition().duration(l).call(T,Q,z,D):Lr(this).call(S.transform,Q,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,Q,U,F;for(s_(D),Q=0;Q<z;++Q)U=L[Q],F=Oi(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)),Ny(this),H.start())}}function k(D,...q){if(this.__zooming){var L=O(this,q).event(D),z=D.changedTouches,H=z.length,Y,Q,U,F;for(Bh(D),Y=0;Y<H;++Y)Q=z[Y],U=Oi(Q,this),L.touch0&&L.touch0[2]===Q.identifier?L.touch0[0]=U:L.touch1&&L.touch1[2]===Q.identifier&&(L.touch1[0]=U);if(Q=L.that.__zoom,L.touch1){var X=L.touch0[0],W=L.touch0[1],G=L.touch1[0],Z=L.touch1[1],J=(J=G[0]-X[0])*J+(J=G[1]-X[1])*J,re=(re=Z[0]-W[0])*re+(re=Z[1]-W[1])*re;Q=E(Q,Math.sqrt(J/re)),U=[(X[0]+G[0])/2,(X[1]+G[1])/2],F=[(W[0]+Z[0])/2,(W[1]+Z[1])/2]}else if(L.touch0)U=L.touch0[0],F=L.touch0[1];else return;L.zoom("touch",n(_(Q,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,Q;for(s_(D),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),Y=0;Y<H;++Y)Q=z[Y],L.touch0&&L.touch0[2]===Q.identifier?delete L.touch0:L.touch1&&L.touch1[2]===Q.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&&(Q=Oi(Q,this),Math.hypot(h[0]-Q[0],h[1]-Q[1])<b)){var U=Lr(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return S.wheelDelta=function(D){return arguments.length?(r=typeof D=="function"?D:Wv(+D),S):r},S.filter=function(D){return arguments.length?(e=typeof D=="function"?D:Wv(!!D),S):e},S.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:Wv(!!D),S):i},S.extent=function(D){return arguments.length?(t=typeof D=="function"?D:Wv([[+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?(x=(D=+D)*D,S):Math.sqrt(x)},S.tapDistance=function(D){return arguments.length?(b=+D,S):b},S}const ma={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]],uW=["Enter"," ","Escape"],cW={"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 Rf;(function(e){e.Strict="strict",e.Loose="loose"})(Rf||(Rf={}));var uu;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(uu||(uu={}));var Lp;(function(e){e.Partial="partial",e.Full="full"})(Lp||(Lp={}));const fW={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ys;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ys||(ys={}));var pb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(pb||(pb={}));var De;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(De||(De={}));const xB={[De.Left]:De.Right,[De.Right]:De.Left,[De.Top]:De.Bottom,[De.Bottom]:De.Top};function dW(e){return e===null?null:e?"valid":"invalid"}const hW=e=>"id"in e&&"source"in e&&"target"in e,ave=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),OP=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Fm=(e,t=[0,0])=>{const{width:n,height:r}=Ao(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},ove=(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):OP(i)?i:t.nodeLookup.get(i.id));const l=o?mb(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return ix(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ax(n)},Um=(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=ix(n,mb(i)),r=!0)}),r?ax(n):{x:0,y:0,width:0,height:0}},jP=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{const l={...Gm(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,w=d.height??f.height??f.initialHeight??null,x=$p(l,kf(f)),b=(g??0)*(w??0),S=a&&x>0;(!f.internals.handleBounds||S||x>=b||f.dragging)&&u.push(f)}return u},sve=(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 lve(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 uve({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);const l=lve(e,o),u=Um(l),f=NP(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 pW({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",ma.error005());else{const g=l.measured.width,w=l.measured.height;g&&w&&(h=[[u,f],[u+g,f+w]])}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)?_u(t,h,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",ma.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 cve({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),w=!g&&m.parentId&&o.find(x=>x.id===m.parentId);(g||w)&&o.push(m)}const l=new Set(t.map(m=>m.id)),u=r.filter(m=>m.deletable!==!1),d=sve(o,u);for(const m of u)l.has(m.id)&&!d.find(w=>w.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 Pf=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),_u=(e={x:0,y:0},t,n)=>({x:Pf(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Pf(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function mW(e,t,n){const{width:r,height:i}=Ao(n),{x:a,y:o}=n.internals.positionAbsolute;return _u(e,[[a,o],[a+r,o+i]],t)}const wB=(e,t,n)=>e<t?Pf(Math.abs(e-t),1,t)/t:e>n?-Pf(Math.abs(e-n),1,t)/t:0,gW=(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]},ix=(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)}),RN=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),ax=({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}=OP(e)?e.internals.positionAbsolute:Fm(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}},mb=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=OP(e)?e.internals.positionAbsolute:Fm(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)}},vW=(e,t)=>ax(ix(RN(e),RN(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=>ki(e.width)&&ki(e.height)&&ki(e.x)&&ki(e.y),ki=e=>!isNaN(e)&&isFinite(e),fve=(e,t)=>{},Hm=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Gm=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{const l={x:(e-n)/i,y:(t-r)/i};return a?Hm(l,o):l},gb=({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 dve(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 hve(e,t,n,r,i,a){const{x:o,y:l}=gb(e,[t,n,r]),{x:u,y:f}=gb({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 NP=(e,t,n,r,i,a)=>{const o=dve(a,t,n),l=(t-o.x)/e.width,u=(n-o.y)/e.height,f=Math.min(l,u),d=Pf(f,r,i),h=e.x+e.width/2,m=e.y+e.height/2,g=t/2-h*d,w=n/2-m*d,x=hve(e,g,w,d,t,n),b={left:Math.min(x.left-o.left,0),top:Math.min(x.top-o.top,0),right:Math.min(x.right-o.right,0),bottom:Math.min(x.bottom-o.bottom,0)};return{x:g-b.left+b.right,y:w-b.top+b.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 Ao(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 yW(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 bW(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 pve(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function mve(e){return{...cW,...e||{}}}function lp(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:a,y:o}=Di(e),l=Gm({x:a-((i==null?void 0:i.left)??0),y:o-((i==null?void 0:i.top)??0)},r),{x:u,y:f}=n?Hm(l,t):l;return{xSnapped:u,ySnapped:f,...l}}const MP=e=>({width:e.offsetWidth,height:e.offsetHeight}),xW=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},gve=["INPUT","SELECT","TEXTAREA"];function wW(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:gve.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const SW=e=>"clientX"in e,Di=(e,t)=>{var a,o;const n=SW(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,...MP(o)}})};function _W({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 Yv(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 De.Left:return[t-Yv(t-r,a),n];case De.Right:return[t+Yv(r-t,a),n];case De.Top:return[t,n-Yv(n-i,a)];case De.Bottom:return[t,n+Yv(i-n,a)]}}function EW({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:i,targetPosition:a=De.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,w]=_W({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,w]}function AW({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 vve({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 yve({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const a=ix(mb(e),mb(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,ax(a))>0}const bve=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,xve=(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)),wve=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||bve;let i;return hW(e)?i={...e}:i={...e,id:r(e)},xve(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function TW({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,a,o,l]=AW({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,l]}const TB={[De.Left]:{x:-1,y:0},[De.Right]:{x:1,y:0},[De.Top]:{x:0,y:-1},[De.Bottom]:{x:0,y:1}},Sve=({source:e,sourcePosition:t=De.Bottom,target:n})=>t===De.Left||t===De.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},CB=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function _ve({source:e,sourcePosition:t=De.Bottom,target:n,targetPosition:r=De.Top,center:i,offset:a,stepPosition:o}){const l=TB[t],u=TB[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=Sve({source:f,sourcePosition:t,target:d}),m=h.x!==0?"x":"y",g=h[m];let w=[],x,b;const S={x:0,y:0},E={x:0,y:0},[,,_,A]=AW({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[m]*u[m]===-1){m==="x"?(x=i.x??f.x+(d.x-f.x)*o,b=i.y??(f.y+d.y)/2):(x=i.x??(f.x+d.x)/2,b=i.y??f.y+(d.y-f.y)*o);const R=[{x,y:f.y},{x,y:d.y}],P=[{x:f.x,y:b},{x:d.x,y:b}];l[m]===g?w=m==="x"?R:P:w=m==="x"?P:R}else{const R=[{x:f.x,y:d.y}],P=[{x:d.x,y:f.y}];if(m==="x"?w=l.x===g?P:R:w=l.y===g?R:P,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))&&(w=m==="x"?R:P)}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-w[0].x),Math.abs(I.x-w[0].x)),V=Math.max(Math.abs($.y-w[0].y),Math.abs(I.y-w[0].y));k>=V?(x=($.x+I.x)/2,b=w[0].y):(x=w[0].x,b=($.y+I.y)/2)}const T={x:f.x+S.x,y:f.y+S.y},O={x:d.x+E.x,y:d.y+E.y};return[[e,...T.x!==w[0].x||T.y!==w[0].y?[T]:[],...w,...O.x!==w[w.length-1].x||O.y!==w[w.length-1].y?[O]:[],n],x,b,_,A]}function Eve(e,t,n,r){const i=Math.min(CB(e,t)/2,CB(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 PN({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:i,targetPosition:a=De.Top,borderRadius:o=5,centerX:l,centerY:u,offset:f=20,stepPosition:d=.5}){const[h,m,g,w,x]=_ve({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:l,y:u},offset:f,stepPosition:d});let b=`M${h[0].x} ${h[0].y}`;for(let S=1;S<h.length-1;S++)b+=Eve(h[S-1],h[S],h[S+1],o);return b+=`L${h[h.length-1].x} ${h[h.length-1].y}`,[b,m,g,w,x]}function OB(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Ave(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===Rf.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",ma.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(a==null?void 0:a.position)||De.Bottom,u=(o==null?void 0:o.position)||De.Top,f=Eu(t,a,l),d=Eu(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 Eu(e,t,n=De.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??Ao(e);if(r)return{x:i+o/2,y:a+l/2};switch((t==null?void 0:t.position)??n){case De.Top:return{x:i+o/2,y:a};case De.Right:return{x:i+o,y:a+l/2};case De.Bottom:return{x:i+o/2,y:a+l};case De.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 kN(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Tve(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=kN(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 CW=1e3,Cve=10,RP={nodeOrigin:[0,0],nodeExtent:Ip,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Ove={...RP,checkEquality:!0};function PP(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function jve(e,t,n){const r=PP(RP,n);for(const i of e.values())if(i.parentId)DP(i,e,t,r);else{const a=Fm(i,r.nodeOrigin),o=Df(i.extent)?i.extent:r.nodeExtent,l=_u(a,o,Ao(i));i.internals.positionAbsolute=l}}function Nve(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 kP(e){return e==="manual"}function DN(e,t,n,r={}){var d,h;const i=PP(Ove,r),a={i:0},o=new Map(t),l=i!=null&&i.elevateNodesOnSelect&&!kP(i.zIndexMode)?CW: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 w=Fm(m,i.nodeOrigin),x=Df(m.extent)?m.extent:i.nodeExtent,b=_u(w,x,Ao(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:b,handleBounds:Nve(m,g),z:OW(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&&DP(g,t,n,r,a),f||(f=m.selected??!1)}return{nodesInitialized:u,hasSelectedNodes:f}}function Mve(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 DP(e,t,n,r,i){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:l,zIndexMode:u}=PP(RP,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}Mve(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*Cve),i&&d.internals.rootParentIndex!==void 0&&(i.i=d.internals.rootParentIndex);const h=a&&!kP(u)?CW:0,{x:m,y:g,z:w}=Rve(e,d,o,l,h,u),{positionAbsolute:x}=e.internals,b=m!==x.x||g!==x.y;(b||w!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:m,y:g}:x,z:w}})}function OW(e,t,n){const r=ki(e.zIndex)?e.zIndex:0;return kP(n)?r:r+(e.selected?t:0)}function Rve(e,t,n,r,i,a){const{x:o,y:l}=t.internals.positionAbsolute,u=Ao(e),f=Fm(e,n),d=Df(e.extent)?_u(f,e.extent,u):f;let h=_u({x:o+d.x,y:l+d.y},r,u);e.extent==="parent"&&(h=mW(h,u,t));const m=OW(e,i,a),g=t.internals.z??0;return{x:h.x,y:h.y,z:g>=m?g+1:m}}function IP(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=vW(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=Ao(u),m=u.origin??r,g=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,w=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,x=Math.max(h.width,Math.round(l.width)),b=Math.max(h.height,Math.round(l.height)),S=(x-h.width)*m[0],E=(b-h.height)*m[1];(g>0||w>0||S||E)&&(i.push({id:f,type:"position",position:{x:u.position.x-g+S,y:u.position.y-w+E}}),(_=n.get(f))==null||_.forEach(A=>{e.some(T=>T.id===A.id)||i.push({id:A.id,type:"position",position:{x:A.position.x+g,y:A.position.y+w}})})),(h.width<l.width||h.height<l.height||g||w)&&i.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:x+(g?m[0]*g-S:0),height:b+(w?m[1]*w-E:0)}})}),i}function Pve(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 w=t.get(g.id);if(!w)continue;if(w.hidden){t.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),u=!0;continue}const x=MP(g.nodeElement),b=w.measured.width!==x.width||w.measured.height!==x.height;if(!!(x.width&&x.height&&(b||!w.internals.handleBounds||g.force))){const E=g.nodeElement.getBoundingClientRect(),_=Df(w.extent)?w.extent:a;let{positionAbsolute:A}=w.internals;w.parentId&&w.extent==="parent"?A=mW(A,x,t.get(w.parentId)):_&&(A=_u(A,_,x));const T={...w,measured:x,internals:{...w.internals,positionAbsolute:A,handleBounds:{source:EB("source",g.nodeElement,E,h,w.id),target:EB("target",g.nodeElement,E,h,w.id)}}};t.set(w.id,T),w.parentId&&DP(T,t,n,{nodeOrigin:i,zIndexMode:o}),u=!0,b&&(f.push({id:w.id,type:"dimensions",dimensions:x}),w.expandParent&&w.parentId&&m.push({id:w.id,parentId:w.parentId,rect:kf(T,i)}))}}if(m.length>0){const g=IP(m,t,n,i);f.push(...g)}return{changes:f,updatedInternals:u}}async function kve({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 MB(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 jW(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}`;MB("source",u,d,e,i,o),MB("target",u,f,e,a,l),t.set(r.id,r)}}function NW(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:NW(n,t):!1}function RB(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 Dve(e,t,n,r){const i=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!NW(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 l_({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 Ive({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=Hm(a,t);return{x:o.x-a.x,y:o.y-a.y}}function Lve({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,w=!1,x=null;function b({noDragClassName:E,handleSelector:_,domNode:A,isSelectable:T,nodeId:O,nodeClickDistance:M=0}){m=Lr(A);function R({x:k,y:V}){const{nodeLookup:D,nodeExtent:q,snapGrid:L,snapToGrid:z,nodeOrigin:H,onNodeDrag:Y,onSelectionDrag:Q,onError:U,updateNodePositions:F}=t();a={x:k,y:V};let X=!1;const W=l.size>1,G=W&&q?RN(Um(l)):null,Z=W&&z?Ive({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=Z?{x:Math.round(ne.x+Z.x),y:Math.round(ne.y+Z.y)}:Hm(ne,L));let fe=null;if(W&&q&&!re.extent&&G){const{positionAbsolute:ye}=re.internals,xe=ye.x-G.x+q[0][0],we=ye.x+re.measured.width-G.x2+q[1][0],Te=ye.y-G.y+q[0][1],Ee=ye.y+re.measured.height-G.y2+q[1][1];fe=[[xe,Te],[we,Ee]]}const{position:he,positionAbsolute:oe}=pW({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(w=w||X,!!X&&(F(l,!0),x&&(r||Y||!O&&Q))){const[J,re]=l_({nodeId:O,dragItems:l,nodeLookup:D});r==null||r(x,l,J,re),Y==null||Y(x,J,re),O||Q==null||Q(x,re)}}async function P(){if(!d)return;const{transform:k,panBy:V,autoPanSpeed:D,autoPanOnNodeDrag:q}=t();if(!q){u=!1,cancelAnimationFrame(o);return}const[L,z]=gW(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})&&R(a)),o=requestAnimationFrame(P)}function $(k){var W;const{nodeLookup:V,multiSelectionActive:D,nodesDraggable:q,transform:L,snapGrid:z,snapToGrid:H,selectNodesOnDrag:Y,onNodeDragStart:Q,onSelectionDragStart:U,unselectNodesAndEdges:F}=t();h=!0,(!Y||!T)&&!D&&O&&((W=V.get(O))!=null&&W.selected||F()),T&&Y&&O&&(e==null||e(O));const X=lp(k.sourceEvent,{transform:L,snapGrid:z,snapToGrid:H,containerBounds:d});if(a=X,l=Dve(V,q,X,O),l.size>0&&(n||Q||!O&&U)){const[G,Z]=l_({nodeId:O,dragItems:l,nodeLookup:V});n==null||n(k.sourceEvent,l,G,Z),Q==null||Q(k.sourceEvent,G,Z),O||U==null||U(k.sourceEvent,Z)}}const I=KK().clickDistance(M).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,w=!1,x=k.sourceEvent,D===0&&$(k),a=lp(k.sourceEvent,{transform:q,snapGrid:L,snapToGrid:z,containerBounds:d}),f=Di(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(x=k.sourceEvent,(k.sourceEvent.type==="touchmove"&&k.sourceEvent.touches.length>1||O&&!H.has(O))&&(g=!0),!g){if(!u&&V&&h&&(u=!0,P()),!h){const Q=Di(k.sourceEvent,d),U=Q.x-f.x,F=Q.y-f.y;Math.sqrt(U*U+F*F)>z&&$(k)}(a.x!==Y.xSnapped||a.y!==Y.ySnapped)&&l&&h&&(f=Di(k.sourceEvent,d),R(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(w&&(D(l,!1),w=!1),i||q||!O&&L){const[z,H]=l_({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||!RB(V,`.${E}`,A))&&(!_||RB(V,_,A))});m.call(I)}function S(){m==null||m.on(".drag",null)}return{update:b,destroy:S}}function $ve(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 Bve=250;function qve(e,t,n,r){var l,u;let i=[],a=1/0;const o=$ve(e,n,t+Bve);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}=Eu(f,h,h.position,!0),w=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));w>t||(w<a?(i=[{...h,x:m,y:g}],a=w):w===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 MW(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,...Eu(o,u,u.position,!0)}:u}function RW(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function zve(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const PW=()=>!0;function Vve(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:w,onConnect:x,onConnectEnd:b,isValidConnection:S=PW,onReconnectEnd:E,updateConnection:_,getTransform:A,getFromHandle:T,autoPanSpeed:O,dragThreshold:M=1,handleDomNode:R}){const P=xW(e.target);let $=0,I;const{x:k,y:V}=Di(e),D=RW(a,R),q=l==null?void 0:l.getBoundingClientRect();let L=!1;if(!q||!D)return;const z=MW(i,D,r,u,t);if(!z)return;let H=Di(e,q),Y=!1,Q=null,U=!1,F=null;function X(){if(!d||!q)return;const[he,oe]=gW(H,q,O);m({x:he,y:oe}),$=requestAnimationFrame(X)}const W={...z,nodeId:i,type:D,position:z.position},G=u.get(i);let J={inProgress:!0,isValid:null,from:Eu(G,W,De.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:G,to:H,toHandle:null,toPosition:xB[W.position],toNode:null,pointer:H};function re(){L=!0,_(J),w==null||w(e,{nodeId:i,handleId:r,handleType:D})}M===0&&re();function ne(he){if(!L){const{x:Ee,y:tt}=Di(he),nt=Ee-k,It=tt-V;if(!(nt*nt+It*It>M*M))return;re()}if(!T()||!W){fe(he);return}const oe=A();H=Di(he,q),I=qve(Gm(H,oe,!1,[1,1]),n,u,W),Y||(X(),Y=!0);const ye=kW(he,{handle:I,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:S,doc:P,lib:f,flowId:h,nodeLookup:u});F=ye.handleDomNode,Q=ye.connection,U=zve(!!I,ye.isValid);const xe=u.get(i),we=xe?Eu(xe,W,De.Left,!0):J.from,Te={...J,from:we,isValid:U,to:ye.toHandle&&U?gb({x:ye.toHandle.x,y:ye.toHandle.y},oe):H,toHandle:ye.toHandle,toPosition:U&&ye.toHandle?ye.toHandle.position:xB[W.position],toNode:ye.toHandle?u.get(ye.toHandle.nodeId):null,pointer:H};_(Te),J=Te}function fe(he){if(!("touches"in he&&he.touches.length>0)){if(L){(I||F)&&Q&&U&&(x==null||x(Q));const{inProgress:oe,...ye}=J,xe={...ye,toPosition:J.toHandle?J.toPosition:null};b==null||b(he,xe),a&&(E==null||E(he,xe))}g(),cancelAnimationFrame($),Y=!1,U=!1,Q=null,F=null,P.removeEventListener("mousemove",ne),P.removeEventListener("mouseup",fe),P.removeEventListener("touchmove",ne),P.removeEventListener("touchend",fe)}}P.addEventListener("mousemove",ne),P.addEventListener("mouseup",fe),P.addEventListener("touchmove",ne),P.addEventListener("touchend",fe)}function kW(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:l,flowId:u,isValidConnection:f=PW,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:w}=Di(e),x=o.elementFromPoint(g,w),b=x!=null&&x.classList.contains(`${l}-flow__handle`)?x:m,S={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const E=RW(void 0,b),_=b.getAttribute("data-nodeid"),A=b.getAttribute("data-handleid"),T=b.classList.contains("connectable"),O=b.classList.contains("connectableend");if(!_||!E)return S;const M={source:h?_:r,sourceHandle:h?A:i,target:h?r:_,targetHandle:h?i:A};S.connection=M;const P=T&&O&&(n===Rf.Strict?h&&E==="source"||!h&&E==="target":_!==r||A!==i);S.isValid=P&&f(M),S.toHandle=MW(_,E,A,d,n,!0)}return S}const IN={onPointerDown:Vve,isValid:kW};function Fve({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=Lr(e);function a({translateExtent:l,width:u,height:f,zoomStep:d=1,pannable:h=!0,zoomable:m=!0,inversePan:g=!1}){const w=_=>{if(_.sourceEvent.type!=="wheel"||!t)return;const A=n(),T=_.sourceEvent.ctrlKey&&Bp()?10:1,O=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*d,M=A[2]*Math.pow(2,O*T);t.scaleTo(M)};let x=[0,0];const b=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(x=[_.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 T=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],O=[T[0]-x[0],T[1]-x[1]];x=T;const M=r()*Math.max(A[2],Math.log(A[2]))*(g?-1:1),R={x:A[0]-O[0]*M,y:A[1]-O[1]*M},P=[[0,0],[u,f]];t.setViewportConstrained({x:R.x,y:R.y,zoom:A[2]},P,l)},E=lW().on("start",b).on("zoom",h?S:null).on("zoom.wheel",m?w:null);i.call(E,{})}function o(){i.on("zoom",null)}return{update:a,destroy:o,pointer:Oi}}const ox=e=>({x:e.x,y:e.y,zoom:e.k}),u_=({x:e,y:t,zoom:n})=>rx.translate(e,t).scale(n),Uc=(e,t)=>e.target.closest(`.${t}`),DW=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Uve=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,c_=(e,t=0,n=Uve,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},IW=e=>{const t=e.ctrlKey&&Bp()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function Hve({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:u,onPanZoomEnd:f}){return d=>{if(Uc(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(d.ctrlKey&&o){const b=Oi(d),S=IW(d),E=h*Math.pow(2,S);r.scaleTo(n,E,b,d);return}const m=d.deltaMode===1?20:1;let g=i===uu.Vertical?0:d.deltaX*m,w=i===uu.Horizontal?0:d.deltaY*m;!Bp()&&d.shiftKey&&i!==uu.Vertical&&(g=d.deltaY*m,w=0),r.translateBy(n,-(g/h)*a,-(w/h)*a,{internal:!0});const x=ox(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(u==null||u(d,x),e.panScrollTimeout=setTimeout(()=>{f==null||f(d,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(d,x))}}function Gve({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const a=r.type==="wheel",o=!t&&a&&!r.ctrlKey,l=Uc(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),n.call(this,r,i)}}function Kve({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var a,o,l;if((a=r.sourceEvent)!=null&&a.internal)return;const i=ox(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 Wve({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{var o,l;e.usedRightMouseButton=!!(n&&DW(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,ox(a.transform)))}}function Yve({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&&DW(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const u=ox(o.transform);e.prevViewport=u,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,u)},n?150:0)}}}function Xve({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 b;const m=e||t,g=n&&h.ctrlKey,w=h.type==="wheel";if(h.button===1&&h.type==="mousedown"&&(Uc(h,`${f}-flow__node`)||Uc(h,`${f}-flow__edge`)))return!0;if(!r&&!m&&!i&&!a&&!n||o||d&&!w||Uc(h,l)&&w||Uc(h,u)&&(!w||i&&w&&!e)||!n&&h.ctrlKey&&w)return!1;if(!n&&h.type==="touchstart"&&((b=h.touches)==null?void 0:b.length)>1)return h.preventDefault(),!1;if(!m&&!i&&!g&&w||!r&&(h.type==="mousedown"||h.type==="touchstart")||Array.isArray(r)&&!r.includes(h.button)&&h.type==="mousedown")return!1;const x=Array.isArray(r)&&r.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||w)&&x}}function Qve({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=lW().scaleExtent([t,n]).translateExtent(r),m=Lr(e).call(h);E({x:i.x,y:i.y,zoom:Pf(i.zoom,t,n)},[[0,0],[d.width,d.height]],r);const g=m.on("wheel.zoom"),w=m.on("dblclick.zoom");h.wheelDelta(IW);function x(I,k){return m?new Promise(V=>{h==null||h.interpolate((k==null?void 0:k.interpolate)==="linear"?ao:Cy).transform(c_(m,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>V(!0)),I)}):Promise.resolve(!1)}function b({noWheelClassName:I,noPanClassName:k,onPaneContextMenu:V,userSelectionActive:D,panOnScroll:q,panOnDrag:L,panOnScrollMode:z,panOnScrollSpeed:H,preventScrolling:Y,zoomOnPinch:Q,zoomOnScroll:U,zoomOnDoubleClick:F,zoomActivationKeyPressed:X,lib:W,onTransformChange:G,connectionInProgress:Z,paneClickDistance:J,selectionOnDrag:re}){D&&!f.isZoomingOrPanning&&S();const ne=q&&!X&&!D;h.clickDistance(re?1/0:!ki(J)||J<0?0:J);const fe=ne?Hve({zoomPanValues:f,noWheelClassName:I,d3Selection:m,d3Zoom:h,panOnScrollMode:z,panOnScrollSpeed:H,zoomOnPinch:Q,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:l}):Gve({noWheelClassName:I,preventScrolling:Y,d3ZoomHandler:g});if(m.on("wheel.zoom",fe,{passive:!1}),!D){const oe=Kve({zoomPanValues:f,onDraggingChange:u,onPanZoomStart:o});h.on("start",oe);const ye=Wve({zoomPanValues:f,panOnDrag:L,onPaneContextMenu:!!V,onPanZoom:a,onTransformChange:G});h.on("zoom",ye);const xe=Yve({zoomPanValues:f,panOnDrag:L,panOnScroll:q,onPaneContextMenu:V,onPanZoomEnd:l,onDraggingChange:u});h.on("end",xe)}const he=Xve({zoomActivationKeyPressed:X,panOnDrag:L,zoomOnScroll:U,panOnScroll:q,zoomOnDoubleClick:F,zoomOnPinch:Q,userSelectionActive:D,noPanClassName:k,noWheelClassName:I,lib:W,connectionInProgress:Z});h.filter(he),F?m.on("dblclick.zoom",w):m.on("dblclick.zoom",null)}function S(){h.on("zoom",null)}async function E(I,k,V){const D=u_(I),q=h==null?void 0:h.constrain()(D,k,V);return q&&await x(q),new Promise(L=>L(q))}async function _(I,k){const V=u_(I);return await x(V,k),new Promise(D=>D(V))}function A(I){if(m){const k=u_(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 T(){const I=m?sW(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:Cy).scaleTo(c_(m,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>V(!0)),I)}):Promise.resolve(!1)}function M(I,k){return m?new Promise(V=>{h==null||h.interpolate((k==null?void 0:k.interpolate)==="linear"?ao:Cy).scaleBy(c_(m,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>V(!0)),I)}):Promise.resolve(!1)}function R(I){h==null||h.scaleExtent(I)}function P(I){h==null||h.translateExtent(I)}function $(I){const k=!ki(I)||I<0?0:I;h==null||h.clickDistance(k)}return{update:b,destroy:S,setViewport:_,setViewportConstrained:E,getViewport:T,scaleTo:O,scaleBy:M,setScaleExtent:R,setTranslateExtent:P,syncViewport:A,setClickDistance:$}}var If;(function(e){e.Line="line",e.Handle="handle"})(If||(If={}));function Zve({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 PB(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 ss(e,t){return Math.max(0,t-e)}function ls(e,t){return Math.max(0,e-t)}function Xv(e,t,n){return Math.max(0,t-e,e-n)}function kB(e,t){return e?!t:t}function Jve(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:w}=n,{minWidth:x,maxWidth:b,minHeight:S,maxHeight:E}=r,{x:_,y:A,width:T,height:O,aspectRatio:M}=e;let R=Math.floor(d?g-e.pointerX:0),P=Math.floor(h?w-e.pointerY:0);const $=T+(u?-R:R),I=O+(f?-P:P),k=-a[0]*T,V=-a[1]*O;let D=Xv($,x,b),q=Xv(I,S,E);if(o){let H=0,Y=0;u&&R<0?H=ss(_+R+k,o[0][0]):!u&&R>0&&(H=ls(_+$+k,o[1][0])),f&&P<0?Y=ss(A+P+V,o[0][1]):!f&&P>0&&(Y=ls(A+I+V,o[1][1])),D=Math.max(D,H),q=Math.max(q,Y)}if(l){let H=0,Y=0;u&&R>0?H=ls(_+R,l[0][0]):!u&&R<0&&(H=ss(_+$,l[1][0])),f&&P>0?Y=ls(A+P,l[0][1]):!f&&P<0&&(Y=ss(A+I,l[1][1])),D=Math.max(D,H),q=Math.max(q,Y)}if(i){if(d){const H=Xv($/M,S,E)*M;if(D=Math.max(D,H),o){let Y=0;!u&&!f||u&&!f&&m?Y=ls(A+V+$/M,o[1][1])*M:Y=ss(A+V+(u?R:-R)/M,o[0][1])*M,D=Math.max(D,Y)}if(l){let Y=0;!u&&!f||u&&!f&&m?Y=ss(A+$/M,l[1][1])*M:Y=ls(A+(u?R:-R)/M,l[0][1])*M,D=Math.max(D,Y)}}if(h){const H=Xv(I*M,x,b)/M;if(q=Math.max(q,H),o){let Y=0;!u&&!f||f&&!u&&m?Y=ls(_+I*M+k,o[1][0])/M:Y=ss(_+(f?P:-P)*M+k,o[0][0])/M,q=Math.max(q,Y)}if(l){let Y=0;!u&&!f||f&&!u&&m?Y=ss(_+I*M,l[1][0])/M:Y=ls(_+(f?P:-P)*M,l[0][0])/M,q=Math.max(q,Y)}}}P=P+(P<0?q:-q),R=R+(R<0?D:-D),i&&(m?$>I*M?P=(kB(u,f)?-R:R)/M:R=(kB(u,f)?-P:P)*M:d?(P=R/M,f=u):(R=P*M,u=f));const L=u?_+R:_,z=f?A+P:A;return{width:T+(u?-R:R),height:O+(f?-P:P),x:a[0]*R*(u?-1:1)+L,y:a[1]*P*(f?-1:1)+z}}const LW={width:0,height:0,x:0,y:0},eye={...LW,pointerX:0,pointerY:0,aspectRatio:1};function tye(e){return[[0,0],[e.measured.width,e.measured.height]]}function nye(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 rye({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const a=Lr(e);let o={controlDirection:PB("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:w,onResizeEnd:x,shouldResize:b}){let S={...LW},E={...eye};o={boundaries:d,resizeDirection:m,keepAspectRatio:h,controlDirection:PB(f)};let _,A=null,T=[],O,M,R,P=!1;const $=KK().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),M=O&&_.extent==="parent"?tye(O):void 0),T=[],R=void 0;for(const[Q,U]of k)if(U.parentId===t&&(T.push({id:Q,position:{...U.position},extent:U.extent}),U.extent==="parent"||U.expandParent)){const F=nye(U,_,U.origin??L);R?R=[[Math.min(F[0][0],R[0][0]),Math.min(F[0][1],R[0][1])],[Math.max(F[1][0],R[1][0]),Math.max(F[1][1],R[1][1])]]:R=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:Q,height:U}=S,F={},X=_.origin??q,{width:W,height:G,x:Z,y:J}=Jve(E,o.controlDirection,L,o.boundaries,o.keepAspectRatio,X,M,R),re=W!==Q,ne=G!==U,fe=Z!==H&&re,he=J!==Y&&ne;if(!fe&&!he&&!re&&!ne)return;if((fe||he||X[0]===1||X[1]===1)&&(F.x=fe?Z:S.x,F.y=he?J:S.y,S.x=F.x,S.y=F.y,T.length>0)){const we=Z-H,Te=J-Y;for(const Ee of T)Ee.position={x:Ee.position.x-we+X[0]*(W-Q),y:Ee.position.y-Te+X[1]*(G-U)},z.push(Ee)}if((re||ne)&&(F.width=re&&(!o.resizeDirection||o.resizeDirection==="horizontal")?W:S.width,F.height=ne&&(!o.resizeDirection||o.resizeDirection==="vertical")?G:S.height,S.width=F.width,S.height=F.height),O&&_.expandParent){const we=X[0]*(F.width??0);F.x&&F.x<we&&(S.x=we,E.x=E.x-(F.x-we));const Te=X[1]*(F.height??0);F.y&&F.y<Te&&(S.y=Te,E.y=E.y-(F.y-Te))}const oe=Zve({width:S.width,prevWidth:Q,height:S.height,prevHeight:U,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),ye={...S,direction:oe};(b==null?void 0:b(I,ye))!==!1&&(P=!0,w==null||w(I,ye),r(F,z))}).on("end",I=>{P&&(x==null||x(I,{...S}),i==null||i({...S}),P=!1)});a.call($)}function u(){a.on(".drag",null)}return{update:l,destroy:u}}const iye={},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(w=>w(t,g))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(iye?"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},aye=e=>e?DB(e):DB,{useDebugValue:oye}=ie,{useSyncExternalStoreWithSelector:sye}=Noe,lye=e=>e;function $W(e,t=lye,n){const r=sye(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return oye(r),r}const IB=(e,t)=>{const n=aye(e),r=(i,a=t)=>$W(n,i,a);return Object.assign(r,n),r},uye=(e,t)=>e?IB(e,t):IB;function Yt(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 sx=N.createContext(null),cye=sx.Provider,BW=ma.error001();function ct(e,t){const n=N.useContext(sx);if(n===null)throw new Error(BW);return $W(n,e,t)}function Xt(){const e=N.useContext(sx);if(e===null)throw new Error(BW);return N.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const LB={display:"none"},fye={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},qW="react-flow__node-desc",zW="react-flow__edge-desc",dye="react-flow__aria-live",hye=e=>e.ariaLiveMessage,pye=e=>e.ariaLabelConfig;function mye({rfId:e}){const t=ct(hye);return y.jsx("div",{id:`${dye}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:fye,children:t})}function gye({rfId:e,disableKeyboardA11y:t}){const n=ct(pye);return y.jsxs(y.Fragment,{children:[y.jsx("div",{id:`${qW}-${e}`,style:LB,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),y.jsx("div",{id:`${zW}-${e}`,style:LB,children:n["edge.a11yDescription.default"]}),!t&&y.jsx(mye,{rfId:e})]})}const lx=N.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},a)=>{const o=`${e}`.split("-");return y.jsx("div",{className:yn(["react-flow__panel",n,...o]),style:r,ref:a,...i,children:t})});lx.displayName="Panel";function vye({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:y.jsx(lx,{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:y.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const yye=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}},Qv=e=>e.id;function bye(e,t){return Yt(e.selectedNodes.map(Qv),t.selectedNodes.map(Qv))&&Yt(e.selectedEdges.map(Qv),t.selectedEdges.map(Qv))}function xye({onSelectionChange:e}){const t=Xt(),{selectedNodes:n,selectedEdges:r}=ct(yye,bye);return N.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,r,e]),null}const wye=e=>!!e.onSelectionChangeHandlers;function Sye({onSelectionChange:e}){const t=ct(wye);return e||t?y.jsx(xye,{onSelectionChange:e}):null}const LN=typeof window<"u"?N.useLayoutEffect:N.useEffect,VW=[0,0],_ye={x:0,y:0,zoom:1},Eye=["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=[...Eye,"rfId"],Aye=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:VW,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Tye(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:u}=ct(Aye,Yt),f=Xt();LN(()=>(u(e.defaultNodes,e.defaultEdges),()=>{d.current=BB,l()}),[]);const d=N.useRef(BB);return LN(()=>{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:mve(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 Cye(e){var r;const[t,n]=N.useState(e==="system"?null:e);return N.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]=N.useState(!1),i=N.useRef(!1),a=N.useRef(new Set([])),[o,l]=N.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",`
380
- `).replace(`
381
-
382
- `,`
383
- +`).split(`
384
- `)),d=f.reduce((h,m)=>h.concat(...m),[]);return[f,d]}return[[],[]]},[e]);return N.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 b,S;if(i.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!i.current||i.current&&!f)&&wW(g))return!1;const x=FB(g.code,l);if(a.current.add(g[x]),VB(o,a.current,!1)){const E=((S=(b=g.composedPath)==null?void 0:b.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 w=FB(g.code,l);VB(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[w]),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 Oye=()=>{const e=Xt();return N.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=NP(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 Gm(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=gb(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function FW(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)jye(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 jye(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 Nye(e,t){return FW(e,t)}function Mye(e,t){return FW(e,t)}function Il(e,t){return{id:e,type:"select",selected:t}}function Hc(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(Il(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=>ave(e),Rye=e=>hW(e);function UW(e){return N.forwardRef(e)}function KB(e){const[t,n]=N.useState(BigInt(0)),[r]=N.useState(()=>Pye(()=>n(i=>i+BigInt(1))));return LN(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function Pye(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const HW=N.createContext(null);function kye({children:e}){const t=Xt(),n=N.useCallback(l=>{const{nodes:u=[],setNodes:f,hasDefaultNodes:d,onNodesChange:h,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:w}=t.getState();let x=u;for(const S of l)x=typeof S=="function"?S(x):S;let b=UB({items:x,lookup:m});for(const S of w.values())b=S(b);d&&f(x),b.length>0?h==null||h(b):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:S,nodes:E,setNodes:_}=t.getState();S&&_(E)})},[]),r=KB(n),i=N.useCallback(l=>{const{edges:u=[],setEdges:f,hasDefaultEdges:d,onEdgesChange:h,edgeLookup:m}=t.getState();let g=u;for(const w of l)g=typeof w=="function"?w(g):w;d?f(g):h&&h(UB({items:g,lookup:m}))},[]),a=KB(i),o=N.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return y.jsx(HW.Provider,{value:o,children:e})}function Dye(){const e=N.useContext(HW);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Iye=e=>!!e.panZoom;function LP(){const e=Oye(),t=Xt(),n=Dye(),r=ct(Iye),i=N.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(),w=GB(h)?h:m.get(h.id),x=w.parentId?bW(w.position,w.measured,w.parentId,m,g):w.position,b={...w,position:x,width:((S=w.measured)==null?void 0:S.width)??w.width,height:((E=w.measured)==null?void 0:E.height)??w.height};return kf(b)},f=(h,m,g={replace:!1})=>{o(w=>w.map(x=>{if(x.id===h){const b=typeof m=="function"?m(x):m;return g.replace&&GB(b)?b:{...x,...b}}return x}))},d=(h,m,g={replace:!1})=>{l(w=>w.map(x=>{if(x.id===h){const b=typeof m=="function"?m(x):m;return g.replace&&Rye(b)?b:{...x,...b}}return x}))};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(),[w,x,b]=g;return{nodes:h.map(S=>({...S})),edges:m.map(S=>({...S})),viewport:{x:w,y:x,zoom:b}}},deleteElements:async({nodes:h=[],edges:m=[]})=>{const{nodes:g,edges:w,onNodesDelete:x,onEdgesDelete:b,triggerNodeChanges:S,triggerEdgeChanges:E,onDelete:_,onBeforeDelete:A}=t.getState(),{nodes:T,edges:O}=await cve({nodesToRemove:h,edgesToRemove:m,nodes:g,edges:w,onBeforeDelete:A}),M=O.length>0,R=T.length>0;if(M){const P=O.map(HB);b==null||b(O),E(P)}if(R){const P=T.map(HB);x==null||x(T),S(P)}return(R||M)&&(_==null||_({nodes:T,edges:O})),{deletedNodes:T,deletedEdges:O}},getIntersectingNodes:(h,m=!0,g)=>{const w=SB(h),x=w?h:u(h),b=g!==void 0;return x?(g||t.getState().nodes).filter(S=>{const E=t.getState().nodeLookup.get(S.id);if(E&&!w&&(S.id===h.id||!E.internals.positionAbsolute))return!1;const _=kf(b?S:E),A=$p(_,x);return m&&A>0||A>=_.width*_.height||A>=x.width*x.height}):[]},isNodeIntersecting:(h,m,g=!0)=>{const x=SB(h)?h:u(h);if(!x)return!1;const b=$p(x,m);return g&&b>0||b>=m.width*m.height||b>=x.width*x.height},updateNode:f,updateNodeData:(h,m,g={replace:!1})=>{f(h,w=>{const x=typeof m=="function"?m(w):m;return g.replace?{...w,data:x}:{...w,data:{...w.data,...x}}},g)},updateEdge:d,updateEdgeData:(h,m,g={replace:!1})=>{d(h,w=>{const x=typeof m=="function"?m(w):m;return g.replace?{...w,data:x}:{...w,data:{...w.data,...x}}},g)},getNodesBounds:h=>{const{nodeLookup:m,nodeOrigin:g}=t.getState();return ove(h,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:h,id:m,nodeId:g})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${g}-${h}${m?`-${m}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:h,handleId:m,nodeId:g})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${g}${h?m?`-${h}-${m}`:`-${h}`:""}`))==null?void 0:w.values())??[])},fitView:async h=>{const m=t.getState().fitViewResolver??pve();return t.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:m}),n.nodeQueue.push(g=>[...g]),m.promise}}},[]);return N.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const WB=e=>e.selected,Lye=typeof window<"u"?window:void 0;function $ye({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Xt(),{deleteElements:r}=LP(),i=qp(e,{actInsideInputWithModifier:!1}),a=qp(t,{target:Lye});N.useEffect(()=>{if(i){const{edges:o,nodes:l}=n.getState();r({nodes:l.filter(WB),edges:o.filter(WB)}),n.setState({nodesSelectionActive:!1})}},[i]),N.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function Bye(e){const t=Xt();N.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=MP(e.current);(r.height===0||r.width===0)&&((l=(o=t.getState()).onError)==null||l.call(o,"004",ma.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 ux={position:"absolute",width:"100%",height:"100%",top:0,left:0},qye=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function zye({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=uu.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:u,translateExtent:f,minZoom:d,maxZoom:h,zoomActivationKeyCode:m,preventScrolling:g=!0,children:w,noWheelClassName:x,noPanClassName:b,onViewportChange:S,isControlledViewport:E,paneClickDistance:_,selectionOnDrag:A}){const T=Xt(),O=N.useRef(null),{userSelectionActive:M,lib:R,connectionInProgress:P}=ct(qye,Yt),$=qp(m),I=N.useRef();Bye(O);const k=N.useCallback(V=>{S==null||S({x:V[0],y:V[1],zoom:V[2]}),E||T.setState({transform:V})},[S,E]);return N.useEffect(()=>{if(O.current){I.current=Qve({domNode:O.current,minZoom:d,maxZoom:h,translateExtent:f,viewport:u,onDraggingChange:L=>T.setState(z=>z.paneDragging===L?z:{paneDragging:L}),onPanZoomStart:(L,z)=>{const{onViewportChangeStart:H,onMoveStart:Y}=T.getState();Y==null||Y(L,z),H==null||H(z)},onPanZoom:(L,z)=>{const{onViewportChange:H,onMove:Y}=T.getState();Y==null||Y(L,z),H==null||H(z)},onPanZoomEnd:(L,z)=>{const{onViewportChangeEnd:H,onMoveEnd:Y}=T.getState();Y==null||Y(L,z),H==null||H(z)}});const{x:V,y:D,zoom:q}=I.current.getViewport();return T.setState({panZoom:I.current,transform:[V,D,q],domNode:O.current.closest(".react-flow")}),()=>{var L;(L=I.current)==null||L.destroy()}}},[]),N.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:b,userSelectionActive:M,noWheelClassName:x,lib:R,onTransformChange:k,connectionInProgress:P,selectionOnDrag:A,paneClickDistance:_})},[e,t,n,r,i,a,o,l,$,g,b,M,x,R,k,P,A,_]),y.jsx("div",{className:"react-flow__renderer",ref:O,style:ux,children:w})}const Vye=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Fye(){const{userSelectionActive:e,userSelectionRect:t}=ct(Vye,Yt);return e&&t?y.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 f_=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Uye=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Hye({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:w}){const x=Xt(),{userSelectionActive:b,elementsSelectable:S,dragging:E,connectionInProgress:_}=ct(Uye,Yt),A=S&&(e||b),T=N.useRef(null),O=N.useRef(),M=N.useRef(new Set),R=N.useRef(new Set),P=N.useRef(!1),$=H=>{if(P.current||_){P.current=!1;return}u==null||u(H),x.getState().resetSelectedElements(),x.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=>{P.current&&(H.stopPropagation(),P.current=!1)},D=H=>{var G,Z;const{domNode:Y}=x.getState();if(O.current=Y==null?void 0:Y.getBoundingClientRect(),!O.current)return;const Q=H.target===T.current;if(!Q&&!!H.target.closest(".nokey")||!e||!(a&&Q||t)||H.button!==0||!H.isPrimary)return;(Z=(G=H.target)==null?void 0:G.setPointerCapture)==null||Z.call(G,H.pointerId),P.current=!1;const{x:X,y:W}=Di(H.nativeEvent,O.current);x.setState({userSelectionRect:{width:0,height:0,startX:X,startY:W,x:X,y:W}}),Q||(H.stopPropagation(),H.preventDefault())},q=H=>{const{userSelectionRect:Y,transform:Q,nodeLookup:U,edgeLookup:F,connectionLookup:X,triggerNodeChanges:W,triggerEdgeChanges:G,defaultEdgeOptions:Z,resetSelectedElements:J}=x.getState();if(!O.current||!Y)return;const{x:re,y:ne}=Di(H.nativeEvent,O.current),{startX:fe,startY:he}=Y;if(!P.current){const Te=t?0:i;if(Math.hypot(re-fe,ne-he)<=Te)return;J(),o==null||o(H)}P.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=M.current,xe=R.current;M.current=new Set(jP(U,oe,Q,n===Lp.Partial,!0).map(Te=>Te.id)),R.current=new Set;const we=(Z==null?void 0:Z.selectable)??!0;for(const Te of M.current){const Ee=X.get(Te);if(Ee)for(const{edgeId:tt}of Ee.values()){const nt=F.get(tt);nt&&(nt.selectable??we)&&R.current.add(tt)}}if(!_B(ye,M.current)){const Te=Hc(U,M.current,!0);W(Te)}if(!_B(xe,R.current)){const Te=Hc(F,R.current);G(Te)}x.setState({userSelectionRect:oe,userSelectionActive:!0,nodesSelectionActive:!1})},L=H=>{var Y,Q;H.button===0&&((Q=(Y=H.target)==null?void 0:Y.releasePointerCapture)==null||Q.call(Y,H.pointerId),!b&&H.target===T.current&&x.getState().userSelectionRect&&($==null||$(H)),x.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(l==null||l(H),x.setState({nodesSelectionActive:M.current.size>0})))},z=r===!0||Array.isArray(r)&&r.includes(0);return y.jsxs("div",{className:yn(["react-flow__pane",{draggable:z,dragging:E,selection:e}]),onClick:A?void 0:f_($,T),onContextMenu:f_(I,T),onWheel:f_(k,T),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:T,style:ux,children:[w,y.jsx(Fye,{})]})}function $N({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",ma.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 GW({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){const l=Xt(),[u,f]=N.useState(!1),d=N.useRef();return N.useEffect(()=>{d.current=Lve({getStoreItems:()=>l.getState(),onNodeMouseDown:h=>{$N({id:h,store:l,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),N.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 Gye=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function KW(){const e=Xt();return N.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=Gye(o),g=i?a[0]:5,w=i?a[1]:5,x=n.direction.x*g*n.factor,b=n.direction.y*w*n.factor;for(const[,S]of f){if(!m(S))continue;let E={x:S.internals.positionAbsolute.x+x,y:S.internals.positionAbsolute.y+b};i&&(E=Hm(E,a));const{position:_,positionAbsolute:A}=pW({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 $P=N.createContext(null),Kye=$P.Provider;$P.Consumer;const WW=()=>N.useContext($P),Wye=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Yye=(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===Rf.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 Xye({type:e="source",position:t=De.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 w=o||null,x=e==="target",b=Xt(),S=WW(),{connectOnClick:E,noPanClassName:_,rfId:A}=ct(Wye,Yt),{connectingFrom:T,connectingTo:O,clickConnecting:M,isPossibleEndHandle:R,connectionInProcess:P,clickConnectionInProcess:$,valid:I}=ct(Yye(S,w,e),Yt);S||(L=(q=b.getState()).onError)==null||L.call(q,"010",ma.error010());const k=z=>{const{defaultEdgeOptions:H,onConnect:Y,hasDefaultEdges:Q}=b.getState(),U={...H,...z};if(Q){const{edges:F,setEdges:X}=b.getState();X(wve(U,F))}Y==null||Y(U),l==null||l(U)},V=z=>{if(!S)return;const H=SW(z.nativeEvent);if(i&&(H&&z.button===0||!H)){const Y=b.getState();IN.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:x,handleId:w,nodeId:S,flowId:Y.rfId,panBy:Y.panBy,cancelConnection:Y.cancelConnection,onConnectStart:Y.onConnectStart,onConnectEnd:(...Q)=>{var U,F;return(F=(U=b.getState()).onConnectEnd)==null?void 0:F.call(U,...Q)},updateConnection:Y.updateConnection,onConnect:k,isValidConnection:n||((...Q)=>{var U,F;return((F=(U=b.getState()).isValidConnection)==null?void 0:F.call(U,...Q))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.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:Q,connectionMode:U,isValidConnection:F,lib:X,rfId:W,nodeLookup:G,connection:Z}=b.getState();if(!S||!Q&&!i)return;if(!Q){H==null||H(z.nativeEvent,{nodeId:S,handleId:w,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:S,type:e,id:w}});return}const J=xW(z.target),re=n||F,{connection:ne,isValid:fe}=IN.isValid(z.nativeEvent,{handle:{nodeId:S,id:w,type:e},connectionMode:U,fromNodeId:Q.nodeId,fromHandleId:Q.id||null,fromType:Q.type,isValidConnection:re,flowId:W,doc:J,lib:X,nodeLookup:G});fe&&ne&&k(ne);const he=structuredClone(Z);delete he.inProgress,he.toPosition=he.toHandle?he.toHandle.position:null,Y==null||Y(z,he),b.setState({connectionClickStartHandle:null})};return y.jsx("div",{"data-handleid":w,"data-nodeid":S,"data-handlepos":t,"data-id":`${A}-${S}-${w}-${e}`,className:yn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",_,f,{source:!x,target:x,connectable:r,connectablestart:i,connectableend:a,clickconnecting:M,connectingfrom:T,connectingto:O,valid:I,connectionindicator:r&&(!P||R)&&(P||$?a:i)}]),onMouseDown:V,onTouchStart:V,onClick:E?D:void 0,ref:g,...m,children:u})}const Lf=N.memo(UW(Xye));function Qye({data:e,isConnectable:t,sourcePosition:n=De.Bottom}){return y.jsxs(y.Fragment,{children:[e==null?void 0:e.label,y.jsx(Lf,{type:"source",position:n,isConnectable:t})]})}function Zye({data:e,isConnectable:t,targetPosition:n=De.Top,sourcePosition:r=De.Bottom}){return y.jsxs(y.Fragment,{children:[y.jsx(Lf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,y.jsx(Lf,{type:"source",position:r,isConnectable:t})]})}function Jye(){return null}function ebe({data:e,isConnectable:t,targetPosition:n=De.Top}){return y.jsxs(y.Fragment,{children:[y.jsx(Lf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const vb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},YB={input:Qye,default:Zye,output:ebe,group:Jye};function tbe(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 nbe=e=>{const{width:t,height:n,x:r,y:i}=Um(e.nodeLookup,{filter:a=>!!a.selected});return{width:ki(t)?t:null,height:ki(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 rbe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Xt(),{width:i,height:a,transformString:o,userSelectionActive:l}=ct(nbe,Yt),u=KW(),f=N.useRef(null);N.useEffect(()=>{var g;n||(g=f.current)==null||g.focus({preventScroll:!0})},[n]);const d=!l&&i!==null&&a!==null;if(GW({nodeRef:f,disabled:!d}),!d)return null;const h=e?g=>{const w=r.getState().nodes.filter(x=>x.selected);e(g,w)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(vb,g.key)&&(g.preventDefault(),u({direction:vb[g.key],factor:g.shiftKey?4:1}))};return y.jsx("div",{className:yn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:y.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,ibe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function YW({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:w,panActivationKeyCode:x,zoomActivationKeyCode:b,elementsSelectable:S,zoomOnScroll:E,zoomOnPinch:_,panOnScroll:A,panOnScrollSpeed:T,panOnScrollMode:O,zoomOnDoubleClick:M,panOnDrag:R,defaultViewport:P,translateExtent:$,minZoom:I,maxZoom:k,preventScrolling:V,onSelectionContextMenu:D,noWheelClassName:q,noPanClassName:L,disableKeyboardA11y:z,onViewportChange:H,isControlledViewport:Y}){const{nodesSelectionActive:Q,userSelectionActive:U}=ct(ibe,Yt),F=qp(f,{target:XB}),X=qp(x,{target:XB}),W=X||R,G=X||A,Z=d&&W!==!0,J=F||U||Z;return $ye({deleteKeyCode:u,multiSelectionKeyCode:w}),y.jsx(zye,{onPaneContextMenu:a,elementsSelectable:S,zoomOnScroll:E,zoomOnPinch:_,panOnScroll:G,panOnScrollSpeed:T,panOnScrollMode:O,zoomOnDoubleClick:M,panOnDrag:!F&&W,defaultViewport:P,translateExtent:$,minZoom:I,maxZoom:k,zoomActivationKeyCode:b,preventScrolling:V,noWheelClassName:q,noPanClassName:L,onViewportChange:H,isControlledViewport:Y,paneClickDistance:l,selectionOnDrag:Z,children:y.jsxs(Hye,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:W,isSelecting:!!J,selectionMode:h,selectionKeyPressed:F,paneClickDistance:l,selectionOnDrag:Z,children:[e,Q&&y.jsx(rbe,{onSelectionContextMenu:D,noPanClassName:L,disableKeyboardA11y:z})]})})}YW.displayName="FlowRenderer";const abe=N.memo(YW),obe=e=>t=>e?jP(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 sbe(e){return ct(N.useCallback(obe(e),[e]),Yt)}const lbe=e=>e.updateNodeInternals;function ube(){const e=ct(lbe),[t]=N.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 N.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function cbe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Xt(),a=N.useRef(null),o=N.useRef(null),l=N.useRef(e.sourcePosition),u=N.useRef(e.targetPosition),f=N.useRef(t),d=n&&!!e.internals.handleBounds;return N.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]),N.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),N.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 fbe({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:w,rfId:x,nodeTypes:b,nodeClickDistance:S,onError:E}){const{node:_,internals:A,isParent:T}=ct(re=>{const ne=re.nodeLookup.get(e),fe=re.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:fe}},Yt);let O=_.type||"default",M=(b==null?void 0:b[O])||YB[O];M===void 0&&(E==null||E("003",ma.error003(O)),O="default",M=(b==null?void 0:b.default)||YB.default);const R=!!(_.draggable||l&&typeof _.draggable>"u"),P=!!(_.selectable||u&&typeof _.selectable>"u"),$=!!(_.connectable||f&&typeof _.connectable>"u"),I=!!(_.focusable||d&&typeof _.focusable>"u"),k=Xt(),V=yW(_),D=cbe({node:_,nodeType:O,hasDimensions:V,resizeObserver:h}),q=GW({nodeRef:D,disabled:_.hidden||!R,noDragClassName:m,handleSelector:_.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:S}),L=KW();if(_.hidden)return null;const z=Ao(_),H=tbe(_),Y=P||R||t||n||r||i,Q=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,W=o?re=>o(re,{...A.userNode}):void 0,G=re=>{const{selectNodesOnDrag:ne,nodeDragThreshold:fe}=k.getState();P&&(!ne||!R||fe>0)&&$N({id:e,store:k,nodeRef:D}),t&&t(re,{...A.userNode})},Z=re=>{if(!(wW(re.nativeEvent)||w)){if(uW.includes(re.key)&&P){const ne=re.key==="Escape";$N({id:e,store:k,unselect:ne,nodeRef:D})}else if(R&&_.selected&&Object.prototype.hasOwnProperty.call(vb,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:vb[re.key],factor:re.shiftKey?4:1})}}},J=()=>{var xe;if(w||!((xe=D.current)!=null&&xe.matches(":focus-visible")))return;const{transform:re,width:ne,height:fe,autoPanOnNodeFocus:he,setCenter:oe}=k.getState();if(!he)return;jP(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 y.jsx("div",{className:yn(["react-flow__node",`react-flow__node-${O}`,{[g]:R},_.className,{selected:_.selected,selectable:P,parent:T,draggable:R,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:Q,onMouseMove:U,onMouseLeave:F,onContextMenu:X,onClick:G,onDoubleClick:W,onKeyDown:I?Z:void 0,tabIndex:I?0:void 0,onFocus:I?J:void 0,role:_.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${qW}-${x}`,"aria-label":_.ariaLabel,..._.domAttributes,children:y.jsx(Kye,{value:e,children:y.jsx(M,{id:e,data:_.data,type:O,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:_.selected??!1,selectable:P,draggable:R,deletable:_.deletable??!0,isConnectable:$,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:q,dragHandle:_.dragHandle,zIndex:A.z,parentId:_.parentId,...z})})})}var dbe=N.memo(fbe);const hbe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function XW(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=ct(hbe,Yt),o=sbe(e.onlyRenderVisibleElements),l=ube();return y.jsx("div",{className:"react-flow__nodes",style:ux,children:o.map(u=>y.jsx(dbe,{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))})}XW.displayName="NodeRenderer";const pbe=N.memo(XW);function mbe(e){return ct(N.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&&yve({sourceNode:a,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Yt)}const gbe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return y.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},vbe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return y.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},QB={[pb.Arrow]:gbe,[pb.ArrowClosed]:vbe};function ybe(e){const t=Xt();return N.useMemo(()=>{var i,a;return Object.prototype.hasOwnProperty.call(QB,e)?QB[e]:((a=(i=t.getState()).onError)==null||a.call(i,"009",ma.error009(e)),null)},[e])}const bbe=({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=ybe(t);return u?y.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:y.jsx(u,{color:n,strokeWidth:o})}):null},QW=({defaultColor:e,rfId:t})=>{const n=ct(a=>a.edges),r=ct(a=>a.defaultEdgeOptions),i=N.useMemo(()=>Tve(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?y.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:y.jsx("defs",{children:i.map(a=>y.jsx(bbe,{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};QW.displayName="MarkerDefinitions";var xbe=N.memo(QW);function ZW({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]=N.useState({x:1,y:0,width:0,height:0}),g=yn(["react-flow__edge-textwrapper",f]),w=N.useRef(null);return N.useEffect(()=>{if(w.current){const x=w.current.getBBox();m({x:x.x,y:x.y,width:x.width,height:x.height})}},[n]),n?y.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",...d,children:[i&&y.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}),y.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:w,style:r,children:n}),u]}):null}ZW.displayName="EdgeText";const wbe=N.memo(ZW);function cx({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u,interactionWidth:f=20,...d}){return y.jsxs(y.Fragment,{children:[y.jsx("path",{...d,d:e,fill:"none",className:yn(["react-flow__edge-path",d.className])}),f?y.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}):null,r&&ki(t)&&ki(n)?y.jsx(wbe,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u}):null]})}function ZB({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===De.Left||e===De.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function JW({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:i,targetPosition:a=De.Top}){const[o,l]=ZB({pos:n,x1:e,y1:t,x2:r,y2:i}),[u,f]=ZB({pos:a,x1:r,y1:i,x2:e,y2:t}),[d,h,m,g]=_W({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 eY(e){return N.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:w,markerEnd:x,markerStart:b,interactionWidth:S})=>{const[E,_,A]=JW({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l}),T=e.isInternal?void 0:t;return y.jsx(cx,{id:T,path:E,labelX:_,labelY:A,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:w,markerEnd:x,markerStart:b,interactionWidth:S})})}const Sbe=eY({isInternal:!1}),tY=eY({isInternal:!0});Sbe.displayName="SimpleBezierEdge";tY.displayName="SimpleBezierEdgeInternal";function nY(e){return N.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=De.Bottom,targetPosition:w=De.Top,markerEnd:x,markerStart:b,pathOptions:S,interactionWidth:E})=>{const[_,A,T]=PN({sourceX:n,sourceY:r,sourcePosition:g,targetX:i,targetY:a,targetPosition:w,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 y.jsx(cx,{id:O,path:_,labelX:A,labelY:T,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:x,markerStart:b,interactionWidth:E})})}const rY=nY({isInternal:!1}),iY=nY({isInternal:!0});rY.displayName="SmoothStepEdge";iY.displayName="SmoothStepEdgeInternal";function aY(e){return N.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return y.jsx(rY,{...n,id:r,pathOptions:N.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const _be=aY({isInternal:!1}),oY=aY({isInternal:!0});_be.displayName="StepEdge";oY.displayName="StepEdgeInternal";function sY(e){return N.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:w,interactionWidth:x})=>{const[b,S,E]=TW({sourceX:n,sourceY:r,targetX:i,targetY:a}),_=e.isInternal?void 0:t;return y.jsx(cx,{id:_,path:b,labelX:S,labelY:E,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:w,interactionWidth:x})})}const Ebe=sY({isInternal:!1}),lY=sY({isInternal:!0});Ebe.displayName="StraightEdge";lY.displayName="StraightEdgeInternal";function uY(e){return N.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=De.Bottom,targetPosition:l=De.Top,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:w,markerEnd:x,markerStart:b,pathOptions:S,interactionWidth:E})=>{const[_,A,T]=EW({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 y.jsx(cx,{id:O,path:_,labelX:A,labelY:T,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:w,markerEnd:x,markerStart:b,interactionWidth:E})})}const Abe=uY({isInternal:!1}),cY=uY({isInternal:!0});Abe.displayName="BezierEdge";cY.displayName="BezierEdgeInternal";const JB={default:cY,straight:lY,step:oY,smoothstep:iY,simplebezier:tY},eq={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Tbe=(e,t,n)=>n===De.Left?e-t:n===De.Right?e+t:e,Cbe=(e,t,n)=>n===De.Top?e-t:n===De.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 y.jsx("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:yn([tq,`${tq}-${l}`]),cx:Tbe(t,r,e),cy:Cbe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function Obe({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 w=Xt(),x=(A,T)=>{if(A.button!==0)return;const{autoPanOnConnect:O,domNode:M,connectionMode:R,connectionRadius:P,lib:$,onConnectStart:I,cancelConnection:k,nodeLookup:V,rfId:D,panBy:q,updateConnection:L}=w.getState(),z=T.type==="target",H=(U,F)=>{m(!1),h==null||h(U,n,T.type,F)},Y=U=>f==null?void 0:f(n,U),Q=(U,F)=>{m(!0),d==null||d(A,n,T.type),I==null||I(U,F)};IN.onPointerDown(A.nativeEvent,{autoPanOnConnect:O,connectionMode:R,connectionRadius:P,domNode:M,handleId:T.id,nodeId:T.nodeId,nodeLookup:V,isTarget:z,edgeUpdaterType:T.type,lib:$,flowId:D,cancelConnection:k,panBy:q,isValidConnection:(...U)=>{var F,X;return((X=(F=w.getState()).isValidConnection)==null?void 0:X.call(F,...U))??!0},onConnect:Y,onConnectStart:Q,onConnectEnd:(...U)=>{var F,X;return(X=(F=w.getState()).onConnectEnd)==null?void 0:X.call(F,...U)},onReconnectEnd:H,updateConnection:L,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},b=A=>x(A,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),S=A=>x(A,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),E=()=>g(!0),_=()=>g(!1);return y.jsxs(y.Fragment,{children:[(e===!0||e==="source")&&y.jsx(nq,{position:l,centerX:r,centerY:i,radius:t,onMouseDown:b,onMouseEnter:E,onMouseOut:_,type:"source"}),(e===!0||e==="target")&&y.jsx(nq,{position:u,centerX:a,centerY:o,radius:t,onMouseDown:S,onMouseEnter:E,onMouseOut:_,type:"target"})]})}function jbe({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:w,edgeTypes:x,noPanClassName:b,onError:S,disableKeyboardA11y:E}){let _=ct(oe=>oe.edgeLookup.get(e));const A=ct(oe=>oe.defaultEdgeOptions);_=A?{...A,..._}:_;let T=_.type||"default",O=(x==null?void 0:x[T])||JB[T];O===void 0&&(S==null||S("011",ma.error011(T)),T="default",O=(x==null?void 0:x.default)||JB.default);const M=!!(_.focusable||t&&typeof _.focusable>"u"),R=typeof h<"u"&&(_.reconnectable||n&&typeof _.reconnectable>"u"),P=!!(_.selectable||r&&typeof _.selectable>"u"),$=N.useRef(null),[I,k]=N.useState(!1),[V,D]=N.useState(!1),q=Xt(),{zIndex:L,sourceX:z,sourceY:H,targetX:Y,targetY:Q,sourcePosition:U,targetPosition:F}=ct(N.useCallback(oe=>{const ye=oe.nodeLookup.get(_.source),xe=oe.nodeLookup.get(_.target);if(!ye||!xe)return{zIndex:_.zIndex,...eq};const we=Ave({id:e,sourceNode:ye,targetNode:xe,sourceHandle:_.sourceHandle||null,targetHandle:_.targetHandle||null,connectionMode:oe.connectionMode,onError:S});return{zIndex:vve({selected:_.selected,zIndex:_.zIndex,sourceNode:ye,targetNode:xe,elevateOnSelect:oe.elevateEdgesOnSelect,zIndexMode:oe.zIndexMode}),...we||eq}},[_.source,_.target,_.sourceHandle,_.targetHandle,_.selected,_.zIndex]),Yt),X=N.useMemo(()=>_.markerStart?`url('#${kN(_.markerStart,w)}')`:void 0,[_.markerStart,w]),W=N.useMemo(()=>_.markerEnd?`url('#${kN(_.markerEnd,w)}')`:void 0,[_.markerEnd,w]);if(_.hidden||z===null||H===null||Y===null||Q===null)return null;const G=oe=>{var Te;const{addSelectedEdges:ye,unselectNodesAndEdges:xe,multiSelectionActive:we}=q.getState();P&&(q.setState({nodesSelectionActive:!1}),_.selected&&we?(xe({nodes:[],edges:[_]}),(Te=$.current)==null||Te.blur()):ye([e])),i&&i(oe,_)},Z=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&&uW.includes(oe.key)&&P){const{unselectNodesAndEdges:xe,addSelectedEdges:we}=q.getState();oe.key==="Escape"?((ye=$.current)==null||ye.blur(),xe({edges:[_]})):we([e])}};return y.jsx("svg",{style:{zIndex:L},children:y.jsxs("g",{className:yn(["react-flow__edge",`react-flow__edge-${T}`,_.className,b,{selected:_.selected,animated:_.animated,inactive:!P&&!i,updating:I,selectable:P}]),onClick:G,onDoubleClick:Z,onContextMenu:J,onMouseEnter:re,onMouseMove:ne,onMouseLeave:fe,onKeyDown:M?he:void 0,tabIndex:M?0:void 0,role:_.ariaRole??(M?"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":M?`${zW}-${w}`:void 0,ref:$,..._.domAttributes,children:[!V&&y.jsx(O,{id:e,source:_.source,target:_.target,type:_.type,selected:_.selected,animated:_.animated,selectable:P,deletable:_.deletable??!0,label:_.label,labelStyle:_.labelStyle,labelShowBg:_.labelShowBg,labelBgStyle:_.labelBgStyle,labelBgPadding:_.labelBgPadding,labelBgBorderRadius:_.labelBgBorderRadius,sourceX:z,sourceY:H,targetX:Y,targetY:Q,sourcePosition:U,targetPosition:F,data:_.data,style:_.style,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerStart:X,markerEnd:W,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth}),R&&y.jsx(Obe,{edge:_,isReconnectable:R,reconnectRadius:d,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,sourceX:z,sourceY:H,targetX:Y,targetY:Q,sourcePosition:U,targetPosition:F,setUpdateHover:k,setReconnecting:D})]})})}var Nbe=N.memo(jbe);const Mbe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function fY({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:w,disableKeyboardA11y:x}){const{edgesFocusable:b,edgesReconnectable:S,elementsSelectable:E,onError:_}=ct(Mbe,Yt),A=mbe(t);return y.jsxs("div",{className:"react-flow__edges",children:[y.jsx(xbe,{defaultColor:e,rfId:n}),A.map(T=>y.jsx(Nbe,{id:T,edgesFocusable:b,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:w,rfId:n,onError:_,edgeTypes:r,disableKeyboardA11y:x},T))]})}fY.displayName="EdgeRenderer";const Rbe=N.memo(fY),Pbe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function kbe({children:e}){const t=ct(Pbe);return y.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Dbe(e){const t=LP(),n=N.useRef(!1);N.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Ibe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function Lbe(e){const t=ct(Ibe),n=Xt();return N.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function $be(e){return e.connection.inProgress?{...e.connection,to:Gm(e.connection.to,e.transform)}:{...e.connection}}function Bbe(e){return $be}function qbe(e){const t=Bbe();return ct(t,Yt)}const zbe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Vbe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:a,height:o,isValid:l,inProgress:u}=ct(zbe,Yt);return!(a&&i&&u)?null:y.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:y.jsx("g",{className:yn(["react-flow__connection",dW(l)]),children:y.jsx(dY,{style:t,type:n,CustomComponent:r,isValid:l})})})}const dY=({style:e,type:t=ys.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}=qbe();if(!i)return;if(n)return y.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:dW(r),toNode:d,toHandle:h,pointer:g});let w="";const x={sourceX:a.x,sourceY:a.y,sourcePosition:u,targetX:f.x,targetY:f.y,targetPosition:m};switch(t){case ys.Bezier:[w]=EW(x);break;case ys.SimpleBezier:[w]=JW(x);break;case ys.Step:[w]=PN({...x,borderRadius:0});break;case ys.SmoothStep:[w]=PN(x);break;default:[w]=TW(x)}return y.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};dY.displayName="ConnectionLine";const Fbe={};function rq(e=Fbe){N.useRef(e),Xt(),N.useEffect(()=>{},[e])}function Ube(){Xt(),N.useRef(!1),N.useEffect(()=>{},[])}function hY({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:w,connectionLineStyle:x,connectionLineComponent:b,connectionLineContainerStyle:S,selectionKeyCode:E,selectionOnDrag:_,selectionMode:A,multiSelectionKeyCode:T,panActivationKeyCode:O,zoomActivationKeyCode:M,deleteKeyCode:R,onlyRenderVisibleElements:P,elementsSelectable:$,defaultViewport:I,translateExtent:k,minZoom:V,maxZoom:D,preventScrolling:q,defaultMarkerColor:L,zoomOnScroll:z,zoomOnPinch:H,panOnScroll:Y,panOnScrollSpeed:Q,panOnScrollMode:U,zoomOnDoubleClick:F,panOnDrag:X,onPaneClick:W,onPaneMouseEnter:G,onPaneMouseMove:Z,onPaneMouseLeave:J,onPaneScroll:re,onPaneContextMenu:ne,paneClickDistance:fe,nodeClickDistance:he,onEdgeContextMenu:oe,onEdgeMouseEnter:ye,onEdgeMouseMove:xe,onEdgeMouseLeave:we,reconnectRadius:Te,onReconnect:Ee,onReconnectStart:tt,onReconnectEnd:nt,noDragClassName:It,noWheelClassName:Ht,noPanClassName:Mt,disableKeyboardA11y:Et,nodeExtent:At,rfId:He,viewport:Lt,onViewportChange:bn}){return rq(e),rq(t),Ube(),Dbe(n),Lbe(Lt),y.jsx(abe,{onPaneClick:W,onPaneMouseEnter:G,onPaneMouseMove:Z,onPaneMouseLeave:J,onPaneContextMenu:ne,onPaneScroll:re,paneClickDistance:fe,deleteKeyCode:R,selectionKeyCode:E,selectionOnDrag:_,selectionMode:A,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:T,panActivationKeyCode:O,zoomActivationKeyCode:M,elementsSelectable:$,zoomOnScroll:z,zoomOnPinch:H,zoomOnDoubleClick:F,panOnScroll:Y,panOnScrollSpeed:Q,panOnScrollMode:U,panOnDrag:X,defaultViewport:I,translateExtent:k,minZoom:V,maxZoom:D,onSelectionContextMenu:h,preventScrolling:q,noDragClassName:It,noWheelClassName:Ht,noPanClassName:Mt,disableKeyboardA11y:Et,onViewportChange:bn,isControlledViewport:!!Lt,children:y.jsxs(kbe,{children:[y.jsx(Rbe,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:Ee,onReconnectStart:tt,onReconnectEnd:nt,onlyRenderVisibleElements:P,onEdgeContextMenu:oe,onEdgeMouseEnter:ye,onEdgeMouseMove:xe,onEdgeMouseLeave:we,reconnectRadius:Te,defaultMarkerColor:L,noPanClassName:Mt,disableKeyboardA11y:Et,rfId:He}),y.jsx(Vbe,{style:x,type:w,component:b,containerStyle:S}),y.jsx("div",{className:"react-flow__edgelabel-renderer"}),y.jsx(pbe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:f,onNodeContextMenu:d,nodeClickDistance:he,onlyRenderVisibleElements:P,noPanClassName:Mt,noDragClassName:It,disableKeyboardA11y:Et,nodeExtent:At,rfId:He}),y.jsx("div",{className:"react-flow__viewport-portal"})]})})}hY.displayName="GraphView";const Hbe=N.memo(hY),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,w=new Map,x=new Map,b=new Map,S=r??t??[],E=n??e??[],_=d??[0,0],A=h??Ip;jW(x,b,S);const{nodesInitialized:T}=DN(E,g,w,{nodeOrigin:_,nodeExtent:A,zIndexMode:m});let O=[0,0,1];if(o&&i&&a){const M=Um(g,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:R,y:P,zoom:$}=NP(M,i,a,u,f,(l==null?void 0:l.padding)??.1);O=[R,P,$]}return{rfId:"1",width:i??0,height:a??0,transform:O,nodes:E,nodesInitialized:T,nodeLookup:g,parentLookup:w,edges:S,edgeLookup:b,connectionLookup:x,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:Rf.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:{...fW},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:fve,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:cW,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Gbe=({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})=>uye((g,w)=>{async function x(){const{nodeLookup:b,panZoom:S,fitViewOptions:E,fitViewResolver:_,width:A,height:T,minZoom:O,maxZoom:M}=w();S&&(await uve({nodes:b,width:A,height:T,panZoom:S,minZoom:O,maxZoom:M},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:b=>{const{nodeLookup:S,parentLookup:E,nodeOrigin:_,elevateNodesOnSelect:A,fitViewQueued:T,zIndexMode:O,nodesSelectionActive:M}=w(),{nodesInitialized:R,hasSelectedNodes:P}=DN(b,S,E,{nodeOrigin:_,nodeExtent:h,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:O}),$=M&&P;T&&R?(x(),g({nodes:b,nodesInitialized:R,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:$})):g({nodes:b,nodesInitialized:R,nodesSelectionActive:$})},setEdges:b=>{const{connectionLookup:S,edgeLookup:E}=w();jW(S,E,b),g({edges:b})},setDefaultNodesAndEdges:(b,S)=>{if(b){const{setNodes:E}=w();E(b),g({hasDefaultNodes:!0})}if(S){const{setEdges:E}=w();E(S),g({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:S,nodeLookup:E,parentLookup:_,domNode:A,nodeOrigin:T,nodeExtent:O,debug:M,fitViewQueued:R,zIndexMode:P}=w(),{changes:$,updatedInternals:I}=Pve(b,E,_,A,T,O,P);I&&(jve(E,_,{nodeOrigin:T,nodeExtent:O,zIndexMode:P}),R?(x(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),($==null?void 0:$.length)>0&&(M&&console.log("React Flow: trigger node changes",$),S==null||S($)))},updateNodePositions:(b,S=!1)=>{const E=[];let _=[];const{nodeLookup:A,triggerNodeChanges:T,connection:O,updateConnection:M,onNodesChangeMiddlewareMap:R}=w();for(const[P,$]of b){const I=A.get(P),k=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&($!=null&&$.position)),V={id:P,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=Eu(I,O.fromHandle,De.Left,!0);M({...O,from:D})}k&&I.parentId&&E.push({id:P,parentId:I.parentId,rect:{...$.internals.positionAbsolute,width:$.measured.width??0,height:$.measured.height??0}}),_.push(V)}if(E.length>0){const{parentLookup:P,nodeOrigin:$}=w(),I=IP(E,A,P,$);_.push(...I)}for(const P of R.values())_=P(_);T(_)},triggerNodeChanges:b=>{const{onNodesChange:S,setNodes:E,nodes:_,hasDefaultNodes:A,debug:T}=w();if(b!=null&&b.length){if(A){const O=Nye(b,_);E(O)}T&&console.log("React Flow: trigger node changes",b),S==null||S(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:S,setEdges:E,edges:_,hasDefaultEdges:A,debug:T}=w();if(b!=null&&b.length){if(A){const O=Mye(b,_);E(O)}T&&console.log("React Flow: trigger edge changes",b),S==null||S(b)}},addSelectedNodes:b=>{const{multiSelectionActive:S,edgeLookup:E,nodeLookup:_,triggerNodeChanges:A,triggerEdgeChanges:T}=w();if(S){const O=b.map(M=>Il(M,!0));A(O);return}A(Hc(_,new Set([...b]),!0)),T(Hc(E))},addSelectedEdges:b=>{const{multiSelectionActive:S,edgeLookup:E,nodeLookup:_,triggerNodeChanges:A,triggerEdgeChanges:T}=w();if(S){const O=b.map(M=>Il(M,!0));T(O);return}T(Hc(E,new Set([...b]))),A(Hc(_,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:S}={})=>{const{edges:E,nodes:_,nodeLookup:A,triggerNodeChanges:T,triggerEdgeChanges:O}=w(),M=b||_,R=S||E,P=[];for(const I of M){if(!I.selected)continue;const k=A.get(I.id);k&&(k.selected=!1),P.push(Il(I.id,!1))}const $=[];for(const I of R)I.selected&&$.push(Il(I.id,!1));T(P),O($)},setMinZoom:b=>{const{panZoom:S,maxZoom:E}=w();S==null||S.setScaleExtent([b,E]),g({minZoom:b})},setMaxZoom:b=>{const{panZoom:S,minZoom:E}=w();S==null||S.setScaleExtent([E,b]),g({maxZoom:b})},setTranslateExtent:b=>{var S;(S=w().panZoom)==null||S.setTranslateExtent(b),g({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:S,triggerNodeChanges:E,triggerEdgeChanges:_,elementsSelectable:A}=w();if(!A)return;const T=S.reduce((M,R)=>R.selected?[...M,Il(R.id,!1)]:M,[]),O=b.reduce((M,R)=>R.selected?[...M,Il(R.id,!1)]:M,[]);E(T),_(O)},setNodeExtent:b=>{const{nodes:S,nodeLookup:E,parentLookup:_,nodeOrigin:A,elevateNodesOnSelect:T,nodeExtent:O,zIndexMode:M}=w();b[0][0]===O[0][0]&&b[0][1]===O[0][1]&&b[1][0]===O[1][0]&&b[1][1]===O[1][1]||(DN(S,E,_,{nodeOrigin:A,nodeExtent:b,elevateNodesOnSelect:T,checkEquality:!1,zIndexMode:M}),g({nodeExtent:b}))},panBy:b=>{const{transform:S,width:E,height:_,panZoom:A,translateExtent:T}=w();return kve({delta:b,panZoom:A,transform:S,translateExtent:T,width:E,height:_})},setCenter:async(b,S,E)=>{const{width:_,height:A,maxZoom:T,panZoom:O}=w();if(!O)return Promise.resolve(!1);const M=typeof(E==null?void 0:E.zoom)<"u"?E.zoom:T;return await O.setViewport({x:_/2-b*M,y:A/2-S*M,zoom:M},{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:{...fW}})},updateConnection:b=>{g({connection:b})},reset:()=>g({...iq()})}},Object.is);function Kbe({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[w]=N.useState(()=>Gbe({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 y.jsx(cye,{value:w,children:y.jsx(kye,{children:g})})}function Wbe({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 N.useContext(sx)?y.jsx(y.Fragment,{children:e}):y.jsx(Kbe,{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 Ybe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Xbe({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:w,onConnectEnd:x,onClickConnectStart:b,onClickConnectEnd:S,onNodeMouseEnter:E,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:T,onNodeDoubleClick:O,onNodeDragStart:M,onNodeDrag:R,onNodeDragStop:P,onNodesDelete:$,onEdgesDelete:I,onDelete:k,onSelectionChange:V,onSelectionDragStart:D,onSelectionDrag:q,onSelectionDragStop:L,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:Y,onBeforeDelete:Q,connectionMode:U,connectionLineType:F=ys.Bezier,connectionLineStyle:X,connectionLineComponent:W,connectionLineContainerStyle:G,deleteKeyCode:Z="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:xe,onlyRenderVisibleElements:we=!1,selectNodesOnDrag:Te,nodesDraggable:Ee,autoPanOnNodeFocus:tt,nodesConnectable:nt,nodesFocusable:It,nodeOrigin:Ht=VW,edgesFocusable:Mt,edgesReconnectable:Et,elementsSelectable:At=!0,defaultViewport:He=_ye,minZoom:Lt=.5,maxZoom:bn=2,translateExtent:Fn=Ip,preventScrolling:Vu=!0,nodeExtent:Sa,defaultMarkerColor:Dd="#b1b1b7",zoomOnScroll:Fu=!0,zoomOnPinch:Un=!0,panOnScroll:Zt=!1,panOnScrollSpeed:Ki=.5,panOnScrollMode:Jn=uu.Free,zoomOnDoubleClick:lw=!0,panOnDrag:uw=!0,onPaneClick:cw,onPaneMouseEnter:Uu,onPaneMouseMove:Hu,onPaneMouseLeave:Gu,onPaneScroll:_a,onPaneContextMenu:Ku,paneClickDistance:cl=1,nodeClickDistance:fw=0,children:lg,onReconnect:Id,onReconnectStart:fl,onReconnectEnd:dw,onEdgeContextMenu:ug,onEdgeDoubleClick:cg,onEdgeMouseEnter:fg,onEdgeMouseMove:Ld,onEdgeMouseLeave:$d,reconnectRadius:dg=10,onNodesChange:hg,onEdgesChange:Wi,noDragClassName:xn="nodrag",noWheelClassName:Hn="nowheel",noPanClassName:Ea="nopan",fitView:Wu,fitViewOptions:pg,connectOnClick:hw,attributionPosition:mg,proOptions:dl,defaultEdgeOptions:Bd,elevateNodesOnSelect:No=!0,elevateEdgesOnSelect:Mo=!1,disableKeyboardA11y:Ro=!1,autoPanOnConnect:Po,autoPanOnNodeDrag:un,autoPanSpeed:gg,connectionRadius:vg,isValidConnection:Aa,onError:ko,style:pw,id:qd,nodeDragThreshold:yg,connectionDragThreshold:mw,viewport:Yu,onViewportChange:Xu,width:bi,height:ur,colorMode:bg="light",debug:gw,onScroll:Do,ariaLabelConfig:xg,zIndexMode:hl="basic",...vw},cr){const pl=qd||"1",wg=Cye(bg),zd=N.useCallback(Ta=>{Ta.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Do==null||Do(Ta)},[Do]);return y.jsx("div",{"data-testid":"rf__wrapper",...vw,onScroll:zd,style:{...pw,...Ybe},ref:cr,className:yn(["react-flow",i,wg]),id:qd,role:"application",children:y.jsxs(Wbe,{nodes:e,edges:t,width:bi,height:ur,fitView:Wu,fitViewOptions:pg,minZoom:Lt,maxZoom:bn,nodeOrigin:Ht,nodeExtent:Sa,zIndexMode:hl,children:[y.jsx(Tye,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:w,onConnectEnd:x,onClickConnectStart:b,onClickConnectEnd:S,nodesDraggable:Ee,autoPanOnNodeFocus:tt,nodesConnectable:nt,nodesFocusable:It,edgesFocusable:Mt,edgesReconnectable:Et,elementsSelectable:At,elevateNodesOnSelect:No,elevateEdgesOnSelect:Mo,minZoom:Lt,maxZoom:bn,nodeExtent:Sa,onNodesChange:hg,onEdgesChange:Wi,snapToGrid:ye,snapGrid:xe,connectionMode:U,translateExtent:Fn,connectOnClick:hw,defaultEdgeOptions:Bd,fitView:Wu,fitViewOptions:pg,onNodesDelete:$,onEdgesDelete:I,onDelete:k,onNodeDragStart:M,onNodeDrag:R,onNodeDragStop:P,onSelectionDrag:q,onSelectionDragStart:D,onSelectionDragStop:L,onMove:d,onMoveStart:h,onMoveEnd:m,noPanClassName:Ea,nodeOrigin:Ht,rfId:pl,autoPanOnConnect:Po,autoPanOnNodeDrag:un,autoPanSpeed:gg,onError:ko,connectionRadius:vg,isValidConnection:Aa,selectNodesOnDrag:Te,nodeDragThreshold:yg,connectionDragThreshold:mw,onBeforeDelete:Q,debug:gw,ariaLabelConfig:xg,zIndexMode:hl}),y.jsx(Hbe,{onInit:f,onNodeClick:l,onEdgeClick:u,onNodeMouseEnter:E,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:T,onNodeDoubleClick:O,nodeTypes:a,edgeTypes:o,connectionLineType:F,connectionLineStyle:X,connectionLineComponent:W,connectionLineContainerStyle:G,selectionKeyCode:J,selectionOnDrag:re,selectionMode:ne,deleteKeyCode:Z,multiSelectionKeyCode:he,panActivationKeyCode:fe,zoomActivationKeyCode:oe,onlyRenderVisibleElements:we,defaultViewport:He,translateExtent:Fn,minZoom:Lt,maxZoom:bn,preventScrolling:Vu,zoomOnScroll:Fu,zoomOnPinch:Un,zoomOnDoubleClick:lw,panOnScroll:Zt,panOnScrollSpeed:Ki,panOnScrollMode:Jn,panOnDrag:uw,onPaneClick:cw,onPaneMouseEnter:Uu,onPaneMouseMove:Hu,onPaneMouseLeave:Gu,onPaneScroll:_a,onPaneContextMenu:Ku,paneClickDistance:cl,nodeClickDistance:fw,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:Y,onReconnect:Id,onReconnectStart:fl,onReconnectEnd:dw,onEdgeContextMenu:ug,onEdgeDoubleClick:cg,onEdgeMouseEnter:fg,onEdgeMouseMove:Ld,onEdgeMouseLeave:$d,reconnectRadius:dg,defaultMarkerColor:Dd,noDragClassName:xn,noWheelClassName:Hn,noPanClassName:Ea,rfId:pl,disableKeyboardA11y:Ro,nodeExtent:Sa,viewport:Yu,onViewportChange:Xu}),y.jsx(Sye,{onSelectionChange:V}),lg,y.jsx(vye,{proOptions:dl,position:mg}),y.jsx(gye,{rfId:pl,disableKeyboardA11y:Ro})]})})}var Qbe=UW(Xbe);function Zbe({dimensions:e,lineWidth:t,variant:n,className:r}){return y.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 Jbe({radius:e,className:t}){return y.jsx("circle",{cx:e,cy:e,r:e,className:yn(["react-flow__background-pattern","dots",t])})}var qs;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(qs||(qs={}));const e0e={[qs.Dots]:1,[qs.Lines]:1,[qs.Cross]:6},t0e=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function pY({id:e,variant:t=qs.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:l,style:u,className:f,patternClassName:d}){const h=N.useRef(null),{transform:m,patternId:g}=ct(t0e,Yt),w=r||e0e[t],x=t===qs.Dots,b=t===qs.Cross,S=Array.isArray(n)?n:[n,n],E=[S[0]*m[2]||1,S[1]*m[2]||1],_=w*m[2],A=Array.isArray(a)?a:[a,a],T=b?[_,_]:E,O=[A[0]*m[2]||1+T[0]/2,A[1]*m[2]||1+T[1]/2],M=`${g}${e||""}`;return y.jsxs("svg",{className:yn(["react-flow__background",f]),style:{...u,...ux,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:h,"data-testid":"rf__background",children:[y.jsx("pattern",{id:M,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:x?y.jsx(Jbe,{radius:_/2,className:d}):y.jsx(Zbe,{dimensions:T,lineWidth:i,variant:t,className:d})}),y.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${M})`})]})}pY.displayName="Background";N.memo(pY);function n0e(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:y.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function r0e(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:y.jsx("path",{d:"M0 0h32v4.2H0z"})})}function i0e(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:y.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 a0e(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.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 o0e(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.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 Zv({children:e,className:t,...n}){return y.jsx("button",{type:"button",className:yn(["react-flow__controls-button",t]),...n,children:e})}const s0e=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function mY({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 w=Xt(),{isInteractive:x,minZoomReached:b,maxZoomReached:S,ariaLabelConfig:E}=ct(s0e,Yt),{zoomIn:_,zoomOut:A,fitView:T}=LP(),O=()=>{_(),a==null||a()},M=()=>{A(),o==null||o()},R=()=>{T(i),l==null||l()},P=()=>{w.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),u==null||u(!x)},$=m==="horizontal"?"horizontal":"vertical";return y.jsxs(lx,{className:yn(["react-flow__controls",$,f]),position:h,style:e,"data-testid":"rf__controls","aria-label":g??E["controls.ariaLabel"],children:[t&&y.jsxs(y.Fragment,{children:[y.jsx(Zv,{onClick:O,className:"react-flow__controls-zoomin",title:E["controls.zoomIn.ariaLabel"],"aria-label":E["controls.zoomIn.ariaLabel"],disabled:S,children:y.jsx(n0e,{})}),y.jsx(Zv,{onClick:M,className:"react-flow__controls-zoomout",title:E["controls.zoomOut.ariaLabel"],"aria-label":E["controls.zoomOut.ariaLabel"],disabled:b,children:y.jsx(r0e,{})})]}),n&&y.jsx(Zv,{className:"react-flow__controls-fitview",onClick:R,title:E["controls.fitView.ariaLabel"],"aria-label":E["controls.fitView.ariaLabel"],children:y.jsx(i0e,{})}),r&&y.jsx(Zv,{className:"react-flow__controls-interactive",onClick:P,title:E["controls.interactive.ariaLabel"],"aria-label":E["controls.interactive.ariaLabel"],children:x?y.jsx(o0e,{}):y.jsx(a0e,{})}),d]})}mY.displayName="Controls";N.memo(mY);function l0e({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:w,backgroundColor:x}=a||{},b=o||w||x;return y.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:b,stroke:l,strokeWidth:u},shapeRendering:h,onClick:g?S=>g(S,e):void 0})}const u0e=N.memo(l0e),c0e=e=>e.nodes.map(t=>t.id),d_=e=>e instanceof Function?e:()=>e;function f0e({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=u0e,onClick:o}){const l=ct(c0e,Yt),u=d_(t),f=d_(e),d=d_(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return y.jsx(y.Fragment,{children:l.map(m=>y.jsx(h0e,{id:m,nodeColorFunc:u,nodeStrokeColorFunc:f,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:h},m))})}function d0e({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(w=>{const x=w.nodeLookup.get(e);if(!x)return{node:void 0,x:0,y:0,width:0,height:0};const b=x.internals.userNode,{x:S,y:E}=x.internals.positionAbsolute,{width:_,height:A}=Ao(b);return{node:b,x:S,y:E,width:_,height:A}},Yt);return!f||f.hidden||!yW(f)?null:y.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 h0e=N.memo(d0e);var p0e=N.memo(f0e);const m0e=200,g0e=150,v0e=e=>!e.hidden,y0e=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?vW(Um(e.nodeLookup,{filter:v0e}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},b0e="react-flow__minimap-desc";function gY({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:w,pannable:x=!1,zoomable:b=!1,ariaLabel:S,inversePan:E,zoomStep:_=1,offsetScale:A=5}){const T=Xt(),O=N.useRef(null),{boundingRect:M,viewBB:R,rfId:P,panZoom:$,translateExtent:I,flowWidth:k,flowHeight:V,ariaLabelConfig:D}=ct(y0e,Yt),q=(e==null?void 0:e.width)??m0e,L=(e==null?void 0:e.height)??g0e,z=M.width/q,H=M.height/L,Y=Math.max(z,H),Q=Y*q,U=Y*L,F=A*Y,X=M.x-(Q-M.width)/2-F,W=M.y-(U-M.height)/2-F,G=Q+F*2,Z=U+F*2,J=`${b0e}-${P}`,re=N.useRef(0),ne=N.useRef();re.current=Y,N.useEffect(()=>{if(O.current&&$)return ne.current=Fve({domNode:O.current,panZoom:$,getTransform:()=>T.getState().transform,getViewScale:()=>re.current}),()=>{var ye;(ye=ne.current)==null||ye.destroy()}},[$]),N.useEffect(()=>{var ye;(ye=ne.current)==null||ye.update({translateExtent:I,width:k,height:V,inversePan:E,pannable:x,zoomStep:_,zoomable:b})},[x,b,E,_,I,k,V]);const fe=g?ye=>{var Te;const[xe,we]=((Te=ne.current)==null?void 0:Te.pointer(ye))||[0,0];g(ye,{x:xe,y:we})}:void 0,he=w?N.useCallback((ye,xe)=>{const we=T.getState().nodeLookup.get(xe).internals.userNode;w(ye,we)},[]):void 0,oe=S??D["minimap.ariaLabel"];return y.jsx(lx,{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:y.jsxs("svg",{width:q,height:L,viewBox:`${X} ${W} ${G} ${Z}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:O,onClick:fe,children:[oe&&y.jsx("title",{id:J,children:oe}),y.jsx(p0e,{onClick:he,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:l}),y.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-F},${W-F}h${G+F*2}v${Z+F*2}h${-G-F*2}z
385
- M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}gY.displayName="MiniMap";N.memo(gY);const x0e=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,w0e={[If.Line]:"right",[If.Handle]:"bottom-right"};function S0e({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:w,onResizeStart:x,onResize:b,onResizeEnd:S}){const E=WW(),_=typeof e=="string"?e:E,A=Xt(),T=N.useRef(null),O=n===If.Handle,M=ct(N.useCallback(x0e(O&&g),[O,g]),Yt),R=N.useRef(null),P=t??w0e[n];N.useEffect(()=>{if(!(!T.current||!_))return R.current||(R.current=rye({domNode:T.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 Q=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,...bW({x:I.x??Y.position.x,y:I.y??Y.position.y},{width:U,height:F},Y.parentId,D,Q)}},W=IP([X],D,q,L);z.push(...W),H.x=I.x?Math.max(Q[0]*U,I.x):void 0,H.y=I.y?Math.max(Q[1]*F,I.y):void 0}if(H.x!==void 0&&H.y!==void 0){const Q={id:_,type:"position",position:{...H}};z.push(Q)}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 Q of k){const U={...Q,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])}})),R.current.update({controlPosition:P,boundaries:{minWidth:l,minHeight:u,maxWidth:f,maxHeight:d},keepAspectRatio:h,resizeDirection:m,onResizeStart:x,onResize:b,onResizeEnd:S,shouldResize:w}),()=>{var I;(I=R.current)==null||I.destroy()}},[P,l,u,f,d,h,x,b,S,w]);const $=P.split("-");return y.jsx("div",{className:yn(["react-flow__resize-control","nodrag",...$,n,r]),ref:T,style:{...i,scale:M,...o&&{[O?"backgroundColor":"borderColor"]:o}},children:a})}N.memo(S0e);function BP(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 h_,aq;function _0e(){if(aq)return h_;aq=1;function e(){this.__data__=[],this.size=0}return h_=e,h_}var p_,oq;function vd(){if(oq)return p_;oq=1;function e(t,n){return t===n||t!==t&&n!==n}return p_=e,p_}var m_,sq;function fx(){if(sq)return m_;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 m_=t,m_}var g_,lq;function E0e(){if(lq)return g_;lq=1;var e=fx(),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 g_=r,g_}var v_,uq;function A0e(){if(uq)return v_;uq=1;var e=fx();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return v_=t,v_}var y_,cq;function T0e(){if(cq)return y_;cq=1;var e=fx();function t(n){return e(this.__data__,n)>-1}return y_=t,y_}var b_,fq;function C0e(){if(fq)return b_;fq=1;var e=fx();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 b_=t,b_}var x_,dq;function dx(){if(dq)return x_;dq=1;var e=_0e(),t=E0e(),n=A0e(),r=T0e(),i=C0e();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,x_=a,x_}var w_,hq;function O0e(){if(hq)return w_;hq=1;var e=dx();function t(){this.__data__=new e,this.size=0}return w_=t,w_}var S_,pq;function j0e(){if(pq)return S_;pq=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return S_=e,S_}var __,mq;function N0e(){if(mq)return __;mq=1;function e(t){return this.__data__.get(t)}return __=e,__}var E_,gq;function M0e(){if(gq)return E_;gq=1;function e(t){return this.__data__.has(t)}return E_=e,E_}var A_,vq;function vY(){if(vq)return A_;vq=1;var e=typeof Rv=="object"&&Rv&&Rv.Object===Object&&Rv;return A_=e,A_}var T_,yq;function Hi(){if(yq)return T_;yq=1;var e=vY(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return T_=n,T_}var C_,bq;function yd(){if(bq)return C_;bq=1;var e=Hi(),t=e.Symbol;return C_=t,C_}var O_,xq;function R0e(){if(xq)return O_;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 O_=a,O_}var j_,wq;function P0e(){if(wq)return j_;wq=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return j_=n,j_}var N_,Sq;function To(){if(Sq)return N_;Sq=1;var e=yd(),t=R0e(),n=P0e(),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 N_=o,N_}var M_,_q;function lr(){if(_q)return M_;_q=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return M_=e,M_}var R_,Eq;function bd(){if(Eq)return R_;Eq=1;var e=To(),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 R_=o,R_}var P_,Aq;function k0e(){if(Aq)return P_;Aq=1;var e=Hi(),t=e["__core-js_shared__"];return P_=t,P_}var k_,Tq;function D0e(){if(Tq)return k_;Tq=1;var e=k0e(),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 k_=n,k_}var D_,Cq;function yY(){if(Cq)return D_;Cq=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 D_=n,D_}var I_,Oq;function I0e(){if(Oq)return I_;Oq=1;var e=bd(),t=D0e(),n=lr(),r=yY(),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 I_=h,I_}var L_,jq;function L0e(){if(jq)return L_;jq=1;function e(t,n){return t==null?void 0:t[n]}return L_=e,L_}var $_,Nq;function Iu(){if(Nq)return $_;Nq=1;var e=I0e(),t=L0e();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return $_=n,$_}var B_,Mq;function qP(){if(Mq)return B_;Mq=1;var e=Iu(),t=Hi(),n=e(t,"Map");return B_=n,B_}var q_,Rq;function hx(){if(Rq)return q_;Rq=1;var e=Iu(),t=e(Object,"create");return q_=t,q_}var z_,Pq;function $0e(){if(Pq)return z_;Pq=1;var e=hx();function t(){this.__data__=e?e(null):{},this.size=0}return z_=t,z_}var V_,kq;function B0e(){if(kq)return V_;kq=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return V_=e,V_}var F_,Dq;function q0e(){if(Dq)return F_;Dq=1;var e=hx(),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 F_=i,F_}var U_,Iq;function z0e(){if(Iq)return U_;Iq=1;var e=hx(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return U_=r,U_}var H_,Lq;function V0e(){if(Lq)return H_;Lq=1;var e=hx(),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 H_=n,H_}var G_,$q;function F0e(){if($q)return G_;$q=1;var e=$0e(),t=B0e(),n=q0e(),r=z0e(),i=V0e();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,G_=a,G_}var K_,Bq;function U0e(){if(Bq)return K_;Bq=1;var e=F0e(),t=dx(),n=qP();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return K_=r,K_}var W_,qq;function H0e(){if(qq)return W_;qq=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return W_=e,W_}var Y_,zq;function px(){if(zq)return Y_;zq=1;var e=H0e();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Y_=t,Y_}var X_,Vq;function G0e(){if(Vq)return X_;Vq=1;var e=px();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return X_=t,X_}var Q_,Fq;function K0e(){if(Fq)return Q_;Fq=1;var e=px();function t(n){return e(this,n).get(n)}return Q_=t,Q_}var Z_,Uq;function W0e(){if(Uq)return Z_;Uq=1;var e=px();function t(n){return e(this,n).has(n)}return Z_=t,Z_}var J_,Hq;function Y0e(){if(Hq)return J_;Hq=1;var e=px();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 J_=t,J_}var eE,Gq;function zP(){if(Gq)return eE;Gq=1;var e=U0e(),t=G0e(),n=K0e(),r=W0e(),i=Y0e();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,eE=a,eE}var tE,Kq;function X0e(){if(Kq)return tE;Kq=1;var e=dx(),t=qP(),n=zP(),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 tE=i,tE}var nE,Wq;function mx(){if(Wq)return nE;Wq=1;var e=dx(),t=O0e(),n=j0e(),r=N0e(),i=M0e(),a=X0e();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,nE=o,nE}var rE,Yq;function VP(){if(Yq)return rE;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 rE=e,rE}var iE,Xq;function bY(){if(Xq)return iE;Xq=1;var e=Iu(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return iE=t,iE}var aE,Qq;function gx(){if(Qq)return aE;Qq=1;var e=bY();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return aE=t,aE}var oE,Zq;function vx(){if(Zq)return oE;Zq=1;var e=gx(),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 oE=i,oE}var sE,Jq;function Km(){if(Jq)return sE;Jq=1;var e=vx(),t=gx();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 sE=n,sE}var lE,e4;function Q0e(){if(e4)return lE;e4=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return lE=e,lE}var uE,t4;function mi(){if(t4)return uE;t4=1;function e(t){return t!=null&&typeof t=="object"}return uE=e,uE}var cE,n4;function Z0e(){if(n4)return cE;n4=1;var e=To(),t=mi(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return cE=r,cE}var fE,r4;function Wm(){if(r4)return fE;r4=1;var e=Z0e(),t=mi(),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 fE=a,fE}var dE,i4;function on(){if(i4)return dE;i4=1;var e=Array.isArray;return dE=e,dE}var tp={exports:{}},hE,a4;function J0e(){if(a4)return hE;a4=1;function e(){return!1}return hE=e,hE}tp.exports;var o4;function xd(){return o4||(o4=1,(function(e,t){var n=Hi(),r=J0e(),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 pE,s4;function yx(){if(s4)return pE;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 pE=n,pE}var mE,l4;function FP(){if(l4)return mE;l4=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return mE=t,mE}var gE,u4;function exe(){if(u4)return gE;u4=1;var e=To(),t=FP(),n=mi(),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]",w="[object String]",x="[object WeakMap]",b="[object ArrayBuffer]",S="[object DataView]",E="[object Float32Array]",_="[object Float64Array]",A="[object Int8Array]",T="[object Int16Array]",O="[object Int32Array]",M="[object Uint8Array]",R="[object Uint8ClampedArray]",P="[object Uint16Array]",$="[object Uint32Array]",I={};I[E]=I[_]=I[A]=I[T]=I[O]=I[M]=I[R]=I[P]=I[$]=!0,I[r]=I[i]=I[b]=I[a]=I[S]=I[o]=I[l]=I[u]=I[f]=I[d]=I[h]=I[m]=I[g]=I[w]=I[x]=!1;function k(V){return n(V)&&t(V.length)&&!!I[e(V)]}return gE=k,gE}var vE,c4;function bx(){if(c4)return vE;c4=1;function e(t){return function(n){return t(n)}}return vE=e,vE}var np={exports:{}};np.exports;var f4;function UP(){return f4||(f4=1,(function(e,t){var n=vY(),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 yE,d4;function Ym(){if(d4)return yE;d4=1;var e=exe(),t=bx(),n=UP(),r=n&&n.isTypedArray,i=r?t(r):e;return yE=i,yE}var bE,h4;function xY(){if(h4)return bE;h4=1;var e=Q0e(),t=Wm(),n=on(),r=xd(),i=yx(),a=Ym(),o=Object.prototype,l=o.hasOwnProperty;function u(f,d){var h=n(f),m=!h&&t(f),g=!h&&!m&&r(f),w=!h&&!m&&!g&&a(f),x=h||m||g||w,b=x?e(f.length,String):[],S=b.length;for(var E in f)(d||l.call(f,E))&&!(x&&(E=="length"||g&&(E=="offset"||E=="parent")||w&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||i(E,S)))&&b.push(E);return b}return bE=u,bE}var xE,p4;function xx(){if(p4)return xE;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 xE=t,xE}var wE,m4;function wY(){if(m4)return wE;m4=1;function e(t,n){return function(r){return t(n(r))}}return wE=e,wE}var SE,g4;function txe(){if(g4)return SE;g4=1;var e=wY(),t=e(Object.keys,Object);return SE=t,SE}var _E,v4;function HP(){if(v4)return _E;v4=1;var e=xx(),t=txe(),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 _E=i,_E}var EE,y4;function Co(){if(y4)return EE;y4=1;var e=bd(),t=FP();function n(r){return r!=null&&t(r.length)&&!e(r)}return EE=n,EE}var AE,b4;function rl(){if(b4)return AE;b4=1;var e=xY(),t=HP(),n=Co();function r(i){return n(i)?e(i):t(i)}return AE=r,AE}var TE,x4;function nxe(){if(x4)return TE;x4=1;var e=Km(),t=rl();function n(r,i){return r&&e(i,t(i),r)}return TE=n,TE}var CE,w4;function rxe(){if(w4)return CE;w4=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return CE=e,CE}var OE,S4;function ixe(){if(S4)return OE;S4=1;var e=lr(),t=xx(),n=rxe(),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 OE=a,OE}var jE,_4;function Lu(){if(_4)return jE;_4=1;var e=xY(),t=ixe(),n=Co();function r(i){return n(i)?e(i,!0):t(i)}return jE=r,jE}var NE,E4;function axe(){if(E4)return NE;E4=1;var e=Km(),t=Lu();function n(r,i){return r&&e(i,t(i),r)}return NE=n,NE}var rp={exports:{}};rp.exports;var A4;function SY(){return A4||(A4=1,(function(e,t){var n=Hi(),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 ME,T4;function _Y(){if(T4)return ME;T4=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 ME=e,ME}var RE,C4;function EY(){if(C4)return RE;C4=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 RE=e,RE}var PE,O4;function AY(){if(O4)return PE;O4=1;function e(){return[]}return PE=e,PE}var kE,j4;function GP(){if(j4)return kE;j4=1;var e=EY(),t=AY(),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 kE=a,kE}var DE,N4;function oxe(){if(N4)return DE;N4=1;var e=Km(),t=GP();function n(r,i){return e(r,t(r),i)}return DE=n,DE}var IE,M4;function KP(){if(M4)return IE;M4=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 IE=e,IE}var LE,R4;function wx(){if(R4)return LE;R4=1;var e=wY(),t=e(Object.getPrototypeOf,Object);return LE=t,LE}var $E,P4;function TY(){if(P4)return $E;P4=1;var e=KP(),t=wx(),n=GP(),r=AY(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var l=[];o;)e(l,n(o)),o=t(o);return l}:r;return $E=a,$E}var BE,k4;function sxe(){if(k4)return BE;k4=1;var e=Km(),t=TY();function n(r,i){return e(r,t(r),i)}return BE=n,BE}var qE,D4;function CY(){if(D4)return qE;D4=1;var e=KP(),t=on();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return qE=n,qE}var zE,I4;function OY(){if(I4)return zE;I4=1;var e=CY(),t=GP(),n=rl();function r(i){return e(i,n,t)}return zE=r,zE}var VE,L4;function lxe(){if(L4)return VE;L4=1;var e=CY(),t=TY(),n=Lu();function r(i){return e(i,n,t)}return VE=r,VE}var FE,$4;function uxe(){if($4)return FE;$4=1;var e=Iu(),t=Hi(),n=e(t,"DataView");return FE=n,FE}var UE,B4;function cxe(){if(B4)return UE;B4=1;var e=Iu(),t=Hi(),n=e(t,"Promise");return UE=n,UE}var HE,q4;function jY(){if(q4)return HE;q4=1;var e=Iu(),t=Hi(),n=e(t,"Set");return HE=n,HE}var GE,z4;function fxe(){if(z4)return GE;z4=1;var e=Iu(),t=Hi(),n=e(t,"WeakMap");return GE=n,GE}var KE,V4;function wd(){if(V4)return KE;V4=1;var e=uxe(),t=qP(),n=cxe(),r=jY(),i=fxe(),a=To(),o=yY(),l="[object Map]",u="[object Object]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",m="[object DataView]",g=o(e),w=o(t),x=o(n),b=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(_),T=A==u?_.constructor:void 0,O=T?o(T):"";if(O)switch(O){case g:return m;case w:return l;case x:return f;case b:return d;case S:return h}return A}),KE=E,KE}var WE,F4;function dxe(){if(F4)return WE;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 WE=n,WE}var YE,U4;function NY(){if(U4)return YE;U4=1;var e=Hi(),t=e.Uint8Array;return YE=t,YE}var XE,H4;function WP(){if(H4)return XE;H4=1;var e=NY();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return XE=t,XE}var QE,G4;function hxe(){if(G4)return QE;G4=1;var e=WP();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return QE=t,QE}var ZE,K4;function pxe(){if(K4)return ZE;K4=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return ZE=t,ZE}var JE,W4;function mxe(){if(W4)return JE;W4=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 JE=r,JE}var eA,Y4;function MY(){if(Y4)return eA;Y4=1;var e=WP();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return eA=t,eA}var tA,X4;function gxe(){if(X4)return tA;X4=1;var e=WP(),t=hxe(),n=pxe(),r=mxe(),i=MY(),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]",w="[object DataView]",x="[object Float32Array]",b="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",_="[object Int32Array]",A="[object Uint8Array]",T="[object Uint8ClampedArray]",O="[object Uint16Array]",M="[object Uint32Array]";function R(P,$,I){var k=P.constructor;switch($){case g:return e(P);case a:case o:return new k(+P);case w:return t(P,I);case x:case b:case S:case E:case _:case A:case T:case O:case M:return i(P,I);case l:return new k;case u:case h:return new k(P);case f:return n(P);case d:return new k;case m:return r(P)}}return tA=R,tA}var nA,Q4;function RY(){if(Q4)return nA;Q4=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 nA=n,nA}var rA,Z4;function PY(){if(Z4)return rA;Z4=1;var e=RY(),t=wx(),n=xx();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return rA=r,rA}var iA,J4;function vxe(){if(J4)return iA;J4=1;var e=wd(),t=mi(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return iA=r,iA}var aA,ez;function yxe(){if(ez)return aA;ez=1;var e=vxe(),t=bx(),n=UP(),r=n&&n.isMap,i=r?t(r):e;return aA=i,aA}var oA,tz;function bxe(){if(tz)return oA;tz=1;var e=wd(),t=mi(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return oA=r,oA}var sA,nz;function xxe(){if(nz)return sA;nz=1;var e=bxe(),t=bx(),n=UP(),r=n&&n.isSet,i=r?t(r):e;return sA=i,sA}var lA,rz;function kY(){if(rz)return lA;rz=1;var e=mx(),t=VP(),n=vx(),r=nxe(),i=axe(),a=SY(),o=_Y(),l=oxe(),u=sxe(),f=OY(),d=lxe(),h=wd(),m=dxe(),g=gxe(),w=PY(),x=on(),b=xd(),S=yxe(),E=lr(),_=xxe(),A=rl(),T=Lu(),O=1,M=2,R=4,P="[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]",Q="[object Set]",U="[object String]",F="[object Symbol]",X="[object WeakMap]",W="[object ArrayBuffer]",G="[object DataView]",Z="[object Float32Array]",J="[object Float64Array]",re="[object Int8Array]",ne="[object Int16Array]",fe="[object Int32Array]",he="[object Uint8Array]",oe="[object Uint8ClampedArray]",ye="[object Uint16Array]",xe="[object Uint32Array]",we={};we[P]=we[$]=we[W]=we[G]=we[I]=we[k]=we[Z]=we[J]=we[re]=we[ne]=we[fe]=we[L]=we[z]=we[H]=we[Y]=we[Q]=we[U]=we[F]=we[he]=we[oe]=we[ye]=we[xe]=!0,we[V]=we[D]=we[X]=!1;function Te(Ee,tt,nt,It,Ht,Mt){var Et,At=tt&O,He=tt&M,Lt=tt&R;if(nt&&(Et=Ht?nt(Ee,It,Ht,Mt):nt(Ee)),Et!==void 0)return Et;if(!E(Ee))return Ee;var bn=x(Ee);if(bn){if(Et=m(Ee),!At)return o(Ee,Et)}else{var Fn=h(Ee),Vu=Fn==D||Fn==q;if(b(Ee))return a(Ee,At);if(Fn==H||Fn==P||Vu&&!Ht){if(Et=He||Vu?{}:w(Ee),!At)return He?u(Ee,i(Et,Ee)):l(Ee,r(Et,Ee))}else{if(!we[Fn])return Ht?Ee:{};Et=g(Ee,Fn,At)}}Mt||(Mt=new e);var Sa=Mt.get(Ee);if(Sa)return Sa;Mt.set(Ee,Et),_(Ee)?Ee.forEach(function(Un){Et.add(Te(Un,tt,nt,Un,Ee,Mt))}):S(Ee)&&Ee.forEach(function(Un,Zt){Et.set(Zt,Te(Un,tt,nt,Zt,Ee,Mt))});var Dd=Lt?He?d:f:He?T:A,Fu=bn?void 0:Dd(Ee);return t(Fu||Ee,function(Un,Zt){Fu&&(Zt=Un,Un=Ee[Zt]),n(Et,Zt,Te(Un,tt,nt,Zt,Ee,Mt))}),Et}return lA=Te,lA}var uA,iz;function wxe(){if(iz)return uA;iz=1;var e=kY(),t=4;function n(r){return e(r,t)}return uA=n,uA}var cA,az;function YP(){if(az)return cA;az=1;function e(t){return function(){return t}}return cA=e,cA}var fA,oz;function Sxe(){if(oz)return fA;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 fA=e,fA}var dA,sz;function XP(){if(sz)return dA;sz=1;var e=Sxe(),t=e();return dA=t,dA}var hA,lz;function QP(){if(lz)return hA;lz=1;var e=XP(),t=rl();function n(r,i){return r&&e(r,i,t)}return hA=n,hA}var pA,uz;function _xe(){if(uz)return pA;uz=1;var e=Co();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 pA=t,pA}var mA,cz;function Sd(){if(cz)return mA;cz=1;var e=QP(),t=_xe(),n=t(e);return mA=n,mA}var gA,fz;function $u(){if(fz)return gA;fz=1;function e(t){return t}return gA=e,gA}var vA,dz;function DY(){if(dz)return vA;dz=1;var e=$u();function t(n){return typeof n=="function"?n:e}return vA=t,vA}var yA,hz;function IY(){if(hz)return yA;hz=1;var e=VP(),t=Sd(),n=DY(),r=on();function i(a,o){var l=r(a)?e:t;return l(a,n(o))}return yA=i,yA}var bA,pz;function LY(){return pz||(pz=1,bA=IY()),bA}var xA,mz;function Exe(){if(mz)return xA;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 xA=t,xA}var wA,gz;function Axe(){if(gz)return wA;gz=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return wA=t,wA}var SA,vz;function Txe(){if(vz)return SA;vz=1;function e(t){return this.__data__.has(t)}return SA=e,SA}var _A,yz;function $Y(){if(yz)return _A;yz=1;var e=zP(),t=Axe(),n=Txe();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,_A=r,_A}var EA,bz;function BY(){if(bz)return EA;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 EA=e,EA}var AA,xz;function qY(){if(xz)return AA;xz=1;function e(t,n){return t.has(n)}return AA=e,AA}var TA,wz;function zY(){if(wz)return TA;wz=1;var e=$Y(),t=BY(),n=qY(),r=1,i=2;function a(o,l,u,f,d,h){var m=u&r,g=o.length,w=l.length;if(g!=w&&!(m&&w>g))return!1;var x=h.get(o),b=h.get(l);if(x&&b)return x==l&&b==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],T=l[S];if(f)var O=m?f(T,A,S,l,o,h):f(A,T,S,o,l,h);if(O!==void 0){if(O)continue;E=!1;break}if(_){if(!t(l,function(M,R){if(!n(_,R)&&(A===M||d(A,M,u,f,h)))return _.push(R)})){E=!1;break}}else if(!(A===T||d(A,T,u,f,h))){E=!1;break}}return h.delete(o),h.delete(l),E}return TA=a,TA}var CA,Sz;function Cxe(){if(Sz)return CA;Sz=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return CA=e,CA}var OA,_z;function ZP(){if(_z)return OA;_z=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return OA=e,OA}var jA,Ez;function Oxe(){if(Ez)return jA;Ez=1;var e=yd(),t=NY(),n=vd(),r=zY(),i=Cxe(),a=ZP(),o=1,l=2,u="[object Boolean]",f="[object Date]",d="[object Error]",h="[object Map]",m="[object Number]",g="[object RegExp]",w="[object Set]",x="[object String]",b="[object Symbol]",S="[object ArrayBuffer]",E="[object DataView]",_=e?e.prototype:void 0,A=_?_.valueOf:void 0;function T(O,M,R,P,$,I,k){switch(R){case E:if(O.byteLength!=M.byteLength||O.byteOffset!=M.byteOffset)return!1;O=O.buffer,M=M.buffer;case S:return!(O.byteLength!=M.byteLength||!I(new t(O),new t(M)));case u:case f:case m:return n(+O,+M);case d:return O.name==M.name&&O.message==M.message;case g:case x:return O==M+"";case h:var V=i;case w:var D=P&o;if(V||(V=a),O.size!=M.size&&!D)return!1;var q=k.get(O);if(q)return q==M;P|=l,k.set(O,M);var L=r(V(O),V(M),P,$,I,k);return k.delete(O),L;case b:if(A)return A.call(O)==A.call(M)}return!1}return jA=T,jA}var NA,Az;function jxe(){if(Az)return NA;Az=1;var e=OY(),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,w=e(o),x=w.length;if(g!=x&&!h)return!1;for(var b=g;b--;){var S=m[b];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 T=h;++b<g;){S=m[b];var O=a[S],M=o[S];if(u)var R=h?u(M,O,S,o,a,d):u(O,M,S,a,o,d);if(!(R===void 0?O===M||f(O,M,l,u,d):R)){A=!1;break}T||(T=S=="constructor")}if(A&&!T){var P=a.constructor,$=o.constructor;P!=$&&"constructor"in a&&"constructor"in o&&!(typeof P=="function"&&P instanceof P&&typeof $=="function"&&$ instanceof $)&&(A=!1)}return d.delete(a),d.delete(o),A}return NA=i,NA}var MA,Tz;function Nxe(){if(Tz)return MA;Tz=1;var e=mx(),t=zY(),n=Oxe(),r=jxe(),i=wd(),a=on(),o=xd(),l=Ym(),u=1,f="[object Arguments]",d="[object Array]",h="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function w(x,b,S,E,_,A){var T=a(x),O=a(b),M=T?d:i(x),R=O?d:i(b);M=M==f?h:M,R=R==f?h:R;var P=M==h,$=R==h,I=M==R;if(I&&o(x)){if(!o(b))return!1;T=!0,P=!1}if(I&&!P)return A||(A=new e),T||l(x)?t(x,b,S,E,_,A):n(x,b,M,S,E,_,A);if(!(S&u)){var k=P&&g.call(x,"__wrapped__"),V=$&&g.call(b,"__wrapped__");if(k||V){var D=k?x.value():x,q=V?b.value():b;return A||(A=new e),_(D,q,S,E,A)}}return I?(A||(A=new e),r(x,b,S,E,_,A)):!1}return MA=w,MA}var RA,Cz;function JP(){if(Cz)return RA;Cz=1;var e=Nxe(),t=mi();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 RA=n,RA}var PA,Oz;function Mxe(){if(Oz)return PA;Oz=1;var e=mx(),t=JP(),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],w=a[g],x=m[1];if(h&&m[2]){if(w===void 0&&!(g in a))return!1}else{var b=new e;if(u)var S=u(w,x,g,a,o,b);if(!(S===void 0?t(x,w,n|r,u,b):S))return!1}}return!0}return PA=i,PA}var kA,jz;function VY(){if(jz)return kA;jz=1;var e=lr();function t(n){return n===n&&!e(n)}return kA=t,kA}var DA,Nz;function Rxe(){if(Nz)return DA;Nz=1;var e=VY(),t=rl();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 DA=n,DA}var IA,Mz;function FY(){if(Mz)return IA;Mz=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return IA=e,IA}var LA,Rz;function Pxe(){if(Rz)return LA;Rz=1;var e=Mxe(),t=Rxe(),n=FY();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 LA=r,LA}var $A,Pz;function _d(){if(Pz)return $A;Pz=1;var e=To(),t=mi(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return $A=r,$A}var BA,kz;function e2(){if(kz)return BA;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 BA=i,BA}var qA,Dz;function UY(){if(Dz)return qA;Dz=1;var e=zP(),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,qA=n,qA}var zA,Iz;function kxe(){if(Iz)return zA;Iz=1;var e=UY(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return zA=n,zA}var VA,Lz;function Dxe(){if(Lz)return VA;Lz=1;var e=kxe(),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 VA=r,VA}var FA,$z;function Sx(){if($z)return FA;$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 FA=e,FA}var UA,Bz;function Ixe(){if(Bz)return UA;Bz=1;var e=yd(),t=Sx(),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 UA=o,UA}var HA,qz;function t2(){if(qz)return HA;qz=1;var e=Ixe();function t(n){return n==null?"":e(n)}return HA=t,HA}var GA,zz;function _x(){if(zz)return GA;zz=1;var e=on(),t=e2(),n=Dxe(),r=t2();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return GA=i,GA}var KA,Vz;function Xm(){if(Vz)return KA;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 KA=t,KA}var WA,Fz;function Ex(){if(Fz)return WA;Fz=1;var e=_x(),t=Xm();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 WA=n,WA}var YA,Uz;function HY(){if(Uz)return YA;Uz=1;var e=Ex();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return YA=t,YA}var XA,Hz;function Lxe(){if(Hz)return XA;Hz=1;function e(t,n){return t!=null&&n in Object(t)}return XA=e,XA}var QA,Gz;function GY(){if(Gz)return QA;Gz=1;var e=_x(),t=Wm(),n=on(),r=yx(),i=FP(),a=Xm();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 QA=o,QA}var ZA,Kz;function KY(){if(Kz)return ZA;Kz=1;var e=Lxe(),t=GY();function n(r,i){return r!=null&&t(r,i,e)}return ZA=n,ZA}var JA,Wz;function $xe(){if(Wz)return JA;Wz=1;var e=JP(),t=HY(),n=KY(),r=e2(),i=VY(),a=FY(),o=Xm(),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 JA=f,JA}var eT,Yz;function WY(){if(Yz)return eT;Yz=1;function e(t){return function(n){return n==null?void 0:n[t]}}return eT=e,eT}var tT,Xz;function Bxe(){if(Xz)return tT;Xz=1;var e=Ex();function t(n){return function(r){return e(r,n)}}return tT=t,tT}var nT,Qz;function qxe(){if(Qz)return nT;Qz=1;var e=WY(),t=Bxe(),n=e2(),r=Xm();function i(a){return n(a)?e(r(a)):t(a)}return nT=i,nT}var rT,Zz;function gi(){if(Zz)return rT;Zz=1;var e=Pxe(),t=$xe(),n=$u(),r=on(),i=qxe();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 rT=a,rT}var iT,Jz;function YY(){if(Jz)return iT;Jz=1;var e=EY(),t=Exe(),n=gi(),r=on();function i(a,o){var l=r(a)?e:t;return l(a,n(o,3))}return iT=i,iT}var aT,e5;function zxe(){if(e5)return aT;e5=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return aT=n,aT}var oT,t5;function XY(){if(t5)return oT;t5=1;var e=zxe(),t=GY();function n(r,i){return r!=null&&t(r,i,e)}return oT=n,oT}var sT,n5;function Vxe(){if(n5)return sT;n5=1;var e=HP(),t=wd(),n=Wm(),r=on(),i=Co(),a=xd(),o=xx(),l=Ym(),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 w=t(g);if(w==u||w==f)return!g.size;if(o(g))return!e(g).length;for(var x in g)if(h.call(g,x))return!1;return!0}return sT=m,sT}var lT,r5;function QY(){if(r5)return lT;r5=1;function e(t){return t===void 0}return lT=e,lT}var uT,i5;function ZY(){if(i5)return uT;i5=1;var e=Sd(),t=Co();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 uT=n,uT}var cT,a5;function n2(){if(a5)return cT;a5=1;var e=Sx(),t=gi(),n=ZY(),r=on();function i(a,o){var l=r(a)?e:n;return l(a,t(o,3))}return cT=i,cT}var fT,o5;function Fxe(){if(o5)return fT;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 fT=e,fT}var dT,s5;function Uxe(){if(s5)return dT;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 dT=e,dT}var hT,l5;function JY(){if(l5)return hT;l5=1;var e=Fxe(),t=Sd(),n=gi(),r=Uxe(),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 hT=a,hT}var pT,u5;function eX(){if(u5)return pT;u5=1;var e=To(),t=on(),n=mi(),r="[object String]";function i(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return pT=i,pT}var mT,c5;function Hxe(){if(c5)return mT;c5=1;var e=WY(),t=e("length");return mT=t,mT}var gT,f5;function r2(){if(f5)return gT;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 gT=u,gT}var vT,d5;function Gxe(){if(d5)return vT;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",w=f+"?",x="["+a+"]?",b="(?:"+g+"(?:"+[d,h,m].join("|")+")"+x+w+")*",S=x+w+b,E="(?:"+[d+l+"?",l,h,m,o].join("|")+")",_=RegExp(u+"(?="+u+")|"+E+S,"g");function A(T){for(var O=_.lastIndex=0;_.test(T);)++O;return O}return vT=A,vT}var yT,h5;function Kxe(){if(h5)return yT;h5=1;var e=Hxe(),t=r2(),n=Gxe();function r(i){return t(i)?n(i):e(i)}return yT=r,yT}var bT,p5;function Wxe(){if(p5)return bT;p5=1;var e=HP(),t=wd(),n=Co(),r=eX(),i=Kxe(),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 bT=l,bT}var xT,m5;function Yxe(){if(m5)return xT;m5=1;var e=VP(),t=RY(),n=QP(),r=gi(),i=wx(),a=on(),o=xd(),l=bd(),u=lr(),f=Ym();function d(h,m,g){var w=a(h),x=w||o(h)||f(h);if(m=r(m,4),g==null){var b=h&&h.constructor;x?g=w?new b:[]:u(h)?g=l(b)?t(i(h)):{}:g={}}return(x?e:n)(h,function(S,E,_){return m(g,S,E,_)}),g}return xT=d,xT}var wT,g5;function Xxe(){if(g5)return wT;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 wT=i,wT}var ST,v5;function Ax(){if(v5)return ST;v5=1;var e=KP(),t=Xxe();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 ST=n,ST}var _T,y5;function Qxe(){if(y5)return _T;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 _T=e,_T}var ET,b5;function tX(){if(b5)return ET;b5=1;var e=Qxe(),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 ET=n,ET}var AT,x5;function Zxe(){if(x5)return AT;x5=1;var e=YP(),t=bY(),n=$u(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return AT=r,AT}var TT,w5;function Jxe(){if(w5)return TT;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 TT=r,TT}var CT,S5;function nX(){if(S5)return CT;S5=1;var e=Zxe(),t=Jxe(),n=t(e);return CT=n,CT}var OT,_5;function Tx(){if(_5)return OT;_5=1;var e=$u(),t=tX(),n=nX();function r(i,a){return n(t(i,a,e),i+"")}return OT=r,OT}var jT,E5;function rX(){if(E5)return jT;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 jT=e,jT}var NT,A5;function ewe(){if(A5)return NT;A5=1;function e(t){return t!==t}return NT=e,NT}var MT,T5;function twe(){if(T5)return MT;T5=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 MT=e,MT}var RT,C5;function nwe(){if(C5)return RT;C5=1;var e=rX(),t=ewe(),n=twe();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return RT=r,RT}var PT,O5;function rwe(){if(O5)return PT;O5=1;var e=nwe();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return PT=t,PT}var kT,j5;function iwe(){if(j5)return kT;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 kT=e,kT}var DT,N5;function awe(){if(N5)return DT;N5=1;function e(){}return DT=e,DT}var IT,M5;function owe(){if(M5)return IT;M5=1;var e=jY(),t=awe(),n=ZP(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return IT=i,IT}var LT,R5;function iX(){if(R5)return LT;R5=1;var e=$Y(),t=rwe(),n=iwe(),r=qY(),i=owe(),a=ZP(),o=200;function l(u,f,d){var h=-1,m=t,g=u.length,w=!0,x=[],b=x;if(d)w=!1,m=n;else if(g>=o){var S=f?null:i(u);if(S)return a(S);w=!1,m=r,b=new e}else b=f?[]:x;e:for(;++h<g;){var E=u[h],_=f?f(E):E;if(E=d||E!==0?E:0,w&&_===_){for(var A=b.length;A--;)if(b[A]===_)continue e;f&&b.push(_),x.push(E)}else m(b,_,d)||(b!==x&&b.push(_),x.push(E))}return x}return LT=l,LT}var $T,P5;function aX(){if(P5)return $T;P5=1;var e=Co(),t=mi();function n(r){return t(r)&&e(r)}return $T=n,$T}var BT,k5;function swe(){if(k5)return BT;k5=1;var e=Ax(),t=Tx(),n=iX(),r=aX(),i=t(function(a){return n(e(a,1,r,!0))});return BT=i,BT}var qT,D5;function lwe(){if(D5)return qT;D5=1;var e=Sx();function t(n,r){return e(r,function(i){return n[i]})}return qT=t,qT}var zT,I5;function oX(){if(I5)return zT;I5=1;var e=lwe(),t=rl();function n(r){return r==null?[]:e(r,t(r))}return zT=n,zT}var VT,L5;function vi(){if(L5)return VT;L5=1;var e;if(typeof BP=="function")try{e={clone:wxe(),constant:YP(),each:LY(),filter:YY(),has:XY(),isArray:on(),isEmpty:Vxe(),isFunction:bd(),isUndefined:QY(),keys:rl(),map:n2(),reduce:JY(),size:Wxe(),transform:Yxe(),union:swe(),values:oX()}}catch{}return e||(e=window._),VT=e,VT}var FT,$5;function i2(){if($5)return FT;$5=1;var e=vi();FT=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(w){m.length>1?g.setNode(w,h):g.setNode(w)}),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(x,b){d(b)&&h.setNode(b,x)}),e.each(this._edgeObjs,function(x){h.hasNode(x.v)&&h.hasNode(x.w)&&h.setEdge(x,m.edge(x))});var g={};function w(x){var b=m.parent(x);return b===void 0||h.hasNode(b)?(g[x]=b,b):b in g?g[b]:w(b)}return this._isCompound&&e.each(h.nodes(),function(x){h.setParent(x,w(x))}),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(w,x){return g.length>1?m.setEdge(w,x,h):m.setEdge(w,x),x}),this},i.prototype.setEdge=function(){var d,h,m,g,w=!1,x=arguments[0];typeof x=="object"&&x!==null&&"v"in x?(d=x.v,h=x.w,m=x.name,arguments.length===2&&(g=arguments[1],w=!0)):(d=x,h=arguments[1],m=arguments[3],arguments.length>2&&(g=arguments[2],w=!0)),d=""+d,h=""+h,e.isUndefined(m)||(m=""+m);var b=l(this._isDirected,d,h,m);if(e.has(this._edgeLabels,b))return w&&(this._edgeLabels[b]=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[b]=w?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[b]=S,a(this._preds[h],d),a(this._sucs[d],h),this._in[h][b]=S,this._out[d][b]=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),w=this._edgeObjs[g];return w&&(d=w.v,h=w.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(w){return w.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(w){return w.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 w=""+h,x=""+m;if(!d&&w>x){var b=w;w=x,x=b}return w+r+x+r+(e.isUndefined(g)?t:g)}function u(d,h,m,g){var w=""+h,x=""+m;if(!d&&w>x){var b=w;w=x,x=b}var S={v:w,w:x};return g&&(S.name=g),S}function f(d,h){return l(d,h.v,h.w,h.name)}return FT}var UT,B5;function uwe(){return B5||(B5=1,UT="2.1.8"),UT}var HT,q5;function cwe(){return q5||(q5=1,HT={Graph:i2(),version:uwe()}),HT}var GT,z5;function fwe(){if(z5)return GT;z5=1;var e=vi(),t=i2();GT={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 GT}var KT,V5;function dwe(){if(V5)return KT;V5=1;var e=vi();KT=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 KT}var WT,F5;function sX(){if(F5)return WT;F5=1;var e=vi();WT=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},WT}var YT,U5;function lX(){if(U5)return YT;U5=1;var e=vi(),t=sX();YT=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(w){var x=w.v!==h?w.v:w.w,b=f[x],S=l(w),E=m.distance+S;if(S<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+w+" Weight: "+S);E<b.distance&&(b.distance=E,b.predecessor=h,d.decrease(x,E))};for(a.nodes().forEach(function(w){var x=w===o?0:Number.POSITIVE_INFINITY;f[w]={distance:x},d.add(w,x)});d.size()>0&&(h=d.removeMin(),m=f[h],m.distance!==Number.POSITIVE_INFINITY);)u(h).forEach(g);return f}return YT}var XT,H5;function hwe(){if(H5)return XT;H5=1;var e=lX(),t=vi();XT=n;function n(r,i,a){return t.transform(r.nodes(),function(o,l){o[l]=e(r,l,i,a)},{})}return XT}var QT,G5;function uX(){if(G5)return QT;G5=1;var e=vi();QT=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 QT}var ZT,K5;function pwe(){if(K5)return ZT;K5=1;var e=vi(),t=uX();ZT=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 ZT}var JT,W5;function mwe(){if(W5)return JT;W5=1;var e=vi();JT=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 w=m[f],x=d[g],b=m[g],S=w.distance+x.distance;S<b.distance&&(b.distance=S,b.predecessor=x.predecessor)})})}),l}return JT}var eC,Y5;function cX(){if(Y5)return eC;Y5=1;var e=vi();eC=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,eC}var tC,X5;function gwe(){if(X5)return tC;X5=1;var e=cX();tC=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return tC}var nC,Q5;function fX(){if(Q5)return nC;Q5=1;var e=vi();nC=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 nC}var rC,Z5;function vwe(){if(Z5)return rC;Z5=1;var e=fX();rC=t;function t(n,r){return e(n,r,"post")}return rC}var iC,J5;function ywe(){if(J5)return iC;J5=1;var e=fX();iC=t;function t(n,r){return e(n,r,"pre")}return iC}var aC,eV;function bwe(){if(eV)return aC;eV=1;var e=vi(),t=i2(),n=sX();aC=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,w=u.priority(g);if(w!==void 0){var x=a(m);x<w&&(l[g]=f,u.decrease(g,x))}}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 aC}var oC,tV;function xwe(){return tV||(tV=1,oC={components:dwe(),dijkstra:lX(),dijkstraAll:hwe(),findCycles:pwe(),floydWarshall:mwe(),isAcyclic:gwe(),postorder:vwe(),preorder:ywe(),prim:bwe(),tarjan:uX(),topsort:cX()}),oC}var sC,nV;function wwe(){if(nV)return sC;nV=1;var e=cwe();return sC={Graph:e.Graph,json:fwe(),alg:xwe(),version:e.version},sC}var lC,rV;function Vi(){if(rV)return lC;rV=1;var e;if(typeof BP=="function")try{e=wwe()}catch{}return e||(e=window.graphlib),lC=e,lC}var uC,iV;function Swe(){if(iV)return uC;iV=1;var e=kY(),t=1,n=4;function r(i){return e(i,t|n)}return uC=r,uC}var cC,aV;function Ed(){if(aV)return cC;aV=1;var e=vd(),t=Co(),n=yx(),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 cC=i,cC}var fC,oV;function _we(){if(oV)return fC;oV=1;var e=Tx(),t=vd(),n=Ed(),r=Lu(),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),w=-1,x=g.length;++w<x;){var b=g[w],S=l[b];(S===void 0||t(S,i[b])&&!a.call(l,b))&&(l[b]=m[b])}return l});return fC=o,fC}var dC,sV;function Ewe(){if(sV)return dC;sV=1;var e=gi(),t=Co(),n=rl();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 dC=r,dC}var hC,lV;function Awe(){if(lV)return hC;lV=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return hC=t,hC}var pC,uV;function Twe(){if(uV)return pC;uV=1;var e=Awe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return pC=n,pC}var mC,cV;function dX(){if(cV)return mC;cV=1;var e=Twe(),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 mC=u,mC}var gC,fV;function hX(){if(fV)return gC;fV=1;var e=dX(),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 gC=r,gC}var vC,dV;function Cwe(){if(dV)return vC;dV=1;var e=hX();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return vC=t,vC}var yC,hV;function Owe(){if(hV)return yC;hV=1;var e=rX(),t=gi(),n=Cwe(),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 yC=i,yC}var bC,pV;function pX(){if(pV)return bC;pV=1;var e=Ewe(),t=Owe(),n=e(t);return bC=n,bC}var xC,mV;function mX(){if(mV)return xC;mV=1;var e=Ax();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return xC=t,xC}var wC,gV;function jwe(){if(gV)return wC;gV=1;var e=XP(),t=DY(),n=Lu();function r(i,a){return i==null?i:e(i,t(a),n)}return wC=r,wC}var SC,vV;function gX(){if(vV)return SC;vV=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return SC=e,SC}var _C,yV;function vX(){if(yV)return _C;yV=1;var e=gx(),t=QP(),n=gi();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 _C=r,_C}var EC,bV;function a2(){if(bV)return EC;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 EC=t,EC}var AC,xV;function Nwe(){if(xV)return AC;xV=1;function e(t,n){return t>n}return AC=e,AC}var TC,wV;function yX(){if(wV)return TC;wV=1;var e=a2(),t=Nwe(),n=$u();function r(i){return i&&i.length?e(i,n,t):void 0}return TC=r,TC}var CC,SV;function bX(){if(SV)return CC;SV=1;var e=gx(),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 CC=n,CC}var OC,_V;function xX(){if(_V)return OC;_V=1;var e=To(),t=wx(),n=mi(),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 OC=f,OC}var jC,EV;function wX(){if(EV)return jC;EV=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return jC=e,jC}var NC,AV;function Mwe(){if(AV)return NC;AV=1;var e=Km(),t=Lu();function n(r){return e(r,t(r))}return NC=n,NC}var MC,TV;function Rwe(){if(TV)return MC;TV=1;var e=bX(),t=SY(),n=MY(),r=_Y(),i=PY(),a=Wm(),o=on(),l=aX(),u=xd(),f=bd(),d=lr(),h=xX(),m=Ym(),g=wX(),w=Mwe();function x(b,S,E,_,A,T,O){var M=g(b,E),R=g(S,E),P=O.get(R);if(P){e(b,E,P);return}var $=T?T(M,R,E+"",b,S,O):void 0,I=$===void 0;if(I){var k=o(R),V=!k&&u(R),D=!k&&!V&&m(R);$=R,k||V||D?o(M)?$=M:l(M)?$=r(M):V?(I=!1,$=t(R,!0)):D?(I=!1,$=n(R,!0)):$=[]:h(R)||a(R)?($=M,a(M)?$=w(M):(!d(M)||f(M))&&($=i(R))):I=!1}I&&(O.set(R,$),A($,R,_,T,O),O.delete(R)),e(b,E,$)}return MC=x,MC}var RC,CV;function Pwe(){if(CV)return RC;CV=1;var e=mx(),t=bX(),n=XP(),r=Rwe(),i=lr(),a=Lu(),o=wX();function l(u,f,d,h,m){u!==f&&n(f,function(g,w){if(m||(m=new e),i(g))r(u,f,w,d,l,h,m);else{var x=h?h(o(u,w),g,w+"",u,f,m):void 0;x===void 0&&(x=g),t(u,w,x)}},a)}return RC=l,RC}var PC,OV;function kwe(){if(OV)return PC;OV=1;var e=Tx(),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 PC=n,PC}var kC,jV;function Dwe(){if(jV)return kC;jV=1;var e=Pwe(),t=kwe(),n=t(function(r,i,a){e(r,i,a)});return kC=n,kC}var DC,NV;function SX(){if(NV)return DC;NV=1;function e(t,n){return t<n}return DC=e,DC}var IC,MV;function _X(){if(MV)return IC;MV=1;var e=a2(),t=SX(),n=$u();function r(i){return i&&i.length?e(i,n,t):void 0}return IC=r,IC}var LC,RV;function Iwe(){if(RV)return LC;RV=1;var e=a2(),t=gi(),n=SX();function r(i,a){return i&&i.length?e(i,t(a,2),n):void 0}return LC=r,LC}var $C,PV;function EX(){if(PV)return $C;PV=1;var e=Hi(),t=function(){return e.Date.now()};return $C=t,$C}var BC,kV;function Lwe(){if(kV)return BC;kV=1;var e=vx(),t=_x(),n=yx(),r=lr(),i=Xm();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 w=i(l[d]),x=u;if(w==="__proto__"||w==="constructor"||w==="prototype")return o;if(d!=m){var b=g[w];x=f?f(b,w,g):void 0,x===void 0&&(x=r(b)?b:n(l[d+1])?[]:{})}e(g,w,x),g=g[w]}return o}return BC=a,BC}var qC,DV;function $we(){if(DV)return qC;DV=1;var e=Ex(),t=Lwe(),n=_x();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 qC=r,qC}var zC,IV;function Bwe(){if(IV)return zC;IV=1;var e=$we(),t=KY();function n(r,i){return e(r,i,function(a,o){return t(r,o)})}return zC=n,zC}var VC,LV;function qwe(){if(LV)return VC;LV=1;var e=mX(),t=tX(),n=nX();function r(i){return n(t(i,void 0,e),i+"")}return VC=r,VC}var FC,$V;function zwe(){if($V)return FC;$V=1;var e=Bwe(),t=qwe(),n=t(function(r,i){return r==null?{}:e(r,i)});return FC=n,FC}var UC,BV;function Vwe(){if(BV)return UC;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 UC=n,UC}var HC,qV;function Fwe(){if(qV)return HC;qV=1;var e=Vwe(),t=Ed(),n=hX();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 HC=r,HC}var GC,zV;function AX(){if(zV)return GC;zV=1;var e=Fwe(),t=e();return GC=t,GC}var KC,VV;function Uwe(){if(VV)return KC;VV=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return KC=e,KC}var WC,FV;function Hwe(){if(FV)return WC;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 WC=t,WC}var YC,UV;function Gwe(){if(UV)return YC;UV=1;var e=Hwe();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 YC=t,YC}var XC,HV;function Kwe(){if(HV)return XC;HV=1;var e=Sx(),t=Ex(),n=gi(),r=ZY(),i=Uwe(),a=bx(),o=Gwe(),l=$u(),u=on();function f(d,h,m){h.length?h=e(h,function(x){return u(x)?function(b){return t(b,x.length===1?x[0]:x)}:x}):h=[l];var g=-1;h=e(h,a(n));var w=r(d,function(x,b,S){var E=e(h,function(_){return _(x)});return{criteria:E,index:++g,value:x}});return i(w,function(x,b){return o(x,b,m)})}return XC=f,XC}var QC,GV;function TX(){if(GV)return QC;GV=1;var e=Ax(),t=Kwe(),n=Tx(),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 QC=i,QC}var ZC,KV;function Wwe(){if(KV)return ZC;KV=1;var e=t2(),t=0;function n(r){var i=++t;return e(r)+i}return ZC=n,ZC}var JC,WV;function Ywe(){if(WV)return JC;WV=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 JC=e,JC}var eO,YV;function Xwe(){if(YV)return eO;YV=1;var e=vx(),t=Ywe();function n(r,i){return t(r||[],i||[],e)}return eO=n,eO}var tO,XV;function Qt(){if(XV)return tO;XV=1;var e;if(typeof BP=="function")try{e={cloneDeep:Swe(),constant:YP(),defaults:_we(),each:LY(),filter:YY(),find:pX(),flatten:mX(),forEach:IY(),forIn:jwe(),has:XY(),isUndefined:QY(),last:gX(),map:n2(),mapValues:vX(),max:yX(),merge:Dwe(),min:_X(),minBy:Iwe(),now:EX(),pick:zwe(),range:AX(),reduce:JY(),sortBy:TX(),uniqueId:Wwe(),values:oX(),zipObject:Xwe()}}catch{}return e||(e=window._),tO=e,tO}var nO,QV;function Qwe(){if(QV)return nO;QV=1,nO=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 nO}var rO,ZV;function Zwe(){if(ZV)return rO;ZV=1;var e=Qt(),t=Vi().Graph,n=Qwe();rO=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],w=d[0],x;f.nodeCount();){for(;x=w.dequeue();)o(f,d,h,x);for(;x=g.dequeue();)o(f,d,h,x);if(f.nodeCount()){for(var b=d.length-2;b>0;--b)if(x=d[b].dequeue(),x){m=m.concat(o(f,d,h,x,!0));break}}}return m}function o(f,d,h,m,g){var w=g?[]:void 0;return e.forEach(f.inEdges(m.v),function(x){var b=f.edge(x),S=f.node(x.v);g&&w.push({v:x.v,w:x.w}),S.out-=b,u(d,h,S)}),e.forEach(f.outEdges(m.v),function(x){var b=f.edge(x),S=x.w,E=f.node(S);E.in-=b,u(d,h,E)}),f.removeNode(m.v),w}function l(f,d){var h=new t,m=0,g=0;e.forEach(f.nodes(),function(b){h.setNode(b,{v:b,in:0,out:0})}),e.forEach(f.edges(),function(b){var S=h.edge(b.v,b.w)||0,E=d(b),_=S+E;h.setEdge(b.v,b.w,_),g=Math.max(g,h.node(b.v).out+=E),m=Math.max(m,h.node(b.w).in+=E)});var w=e.range(g+m+3).map(function(){return new n}),x=m+1;return e.forEach(h.nodes(),function(b){u(w,x,h.node(b))}),{graph:h,buckets:w,zeroIdx:x}}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 rO}var iO,JV;function Jwe(){if(JV)return iO;JV=1;var e=Qt(),t=Zwe();iO={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 iO}var aO,eF;function Sr(){if(eF)return aO;eF=1;var e=Qt(),t=Vi().Graph;aO={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:w,notime:x};function n(b,S,E,_){var A;do A=e.uniqueId(_);while(b.hasNode(A));return E.dummy=S,b.setNode(A,E),A}function r(b){var S=new t().setGraph(b.graph());return e.forEach(b.nodes(),function(E){S.setNode(E,b.node(E))}),e.forEach(b.edges(),function(E){var _=S.edge(E.v,E.w)||{weight:0,minlen:1},A=b.edge(E);S.setEdge(E.v,E.w,{weight:_.weight+A.weight,minlen:Math.max(_.minlen,A.minlen)})}),S}function i(b){var S=new t({multigraph:b.isMultigraph()}).setGraph(b.graph());return e.forEach(b.nodes(),function(E){b.children(E).length||S.setNode(E,b.node(E))}),e.forEach(b.edges(),function(E){S.setEdge(E,b.edge(E))}),S}function a(b){var S=e.map(b.nodes(),function(E){var _={};return e.forEach(b.outEdges(E),function(A){_[A.w]=(_[A.w]||0)+b.edge(A).weight}),_});return e.zipObject(b.nodes(),S)}function o(b){var S=e.map(b.nodes(),function(E){var _={};return e.forEach(b.inEdges(E),function(A){_[A.v]=(_[A.v]||0)+b.edge(A).weight}),_});return e.zipObject(b.nodes(),S)}function l(b,S){var E=b.x,_=b.y,A=S.x-E,T=S.y-_,O=b.width/2,M=b.height/2;if(!A&&!T)throw new Error("Not possible to find intersection inside of the rectangle");var R,P;return Math.abs(T)*O>Math.abs(A)*M?(T<0&&(M=-M),R=M*A/T,P=M):(A<0&&(O=-O),R=O,P=O*T/A),{x:E+R,y:_+P}}function u(b){var S=e.map(e.range(m(b)+1),function(){return[]});return e.forEach(b.nodes(),function(E){var _=b.node(E),A=_.rank;e.isUndefined(A)||(S[A][_.order]=E)}),S}function f(b){var S=e.min(e.map(b.nodes(),function(E){return b.node(E).rank}));e.forEach(b.nodes(),function(E){var _=b.node(E);e.has(_,"rank")&&(_.rank-=S)})}function d(b){var S=e.min(e.map(b.nodes(),function(T){return b.node(T).rank})),E=[];e.forEach(b.nodes(),function(T){var O=b.node(T).rank-S;E[O]||(E[O]=[]),E[O].push(T)});var _=0,A=b.graph().nodeRankFactor;e.forEach(E,function(T,O){e.isUndefined(T)&&O%A!==0?--_:_&&e.forEach(T,function(M){b.node(M).rank+=_})})}function h(b,S,E,_){var A={width:0,height:0};return arguments.length>=4&&(A.rank=E,A.order=_),n(b,"border",A,S)}function m(b){return e.max(e.map(b.nodes(),function(S){var E=b.node(S).rank;if(!e.isUndefined(E))return E}))}function g(b,S){var E={lhs:[],rhs:[]};return e.forEach(b,function(_){S(_)?E.lhs.push(_):E.rhs.push(_)}),E}function w(b,S){var E=e.now();try{return S()}finally{console.log(b+" time: "+(e.now()-E)+"ms")}}function x(b,S){return S()}return aO}var oO,tF;function e1e(){if(tF)return oO;tF=1;var e=Qt(),t=Sr();oO={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 w,x,b;for(b=0,++u;u<d;++b,++u)m.points=[],x={width:0,height:0,edgeLabel:m,edgeObj:o,rank:u},w=t.addDummyNode(a,"edge",x,"_d"),u===g&&(x.width=m.width,x.height=m.height,x.dummy="edge-label",x.labelpos=m.labelpos),a.setEdge(l,w,{weight:m.weight},h),b===0&&a.graph().dummyChains.push(w),l=w;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 oO}var sO,nF;function yb(){if(nF)return sO;nF=1;var e=Qt();sO={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 sO}var lO,rF;function CX(){if(rF)return lO;rF=1;var e=Qt(),t=Vi().Graph,n=yb().slack;lO=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 lO}var uO,iF;function t1e(){if(iF)return uO;iF=1;var e=Qt(),t=CX(),n=yb().slack,r=yb().longestPath,i=Vi().alg.preorder,a=Vi().alg.postorder,o=Sr().simplify;uO=l,l.initLowLimValues=h,l.initCutValues=u,l.calcCutValue=d,l.leaveEdge=g,l.enterEdge=w,l.exchangeEdges=x;function l(_){_=o(_),r(_);var A=t(_);h(A),u(A,_);for(var T,O;T=g(A);)O=w(A,_,T),x(A,_,T,O)}function u(_,A){var T=a(_,_.nodes());T=T.slice(0,T.length-1),e.forEach(T,function(O){f(_,A,O)})}function f(_,A,T){var O=_.node(T),M=O.parent;_.edge(T,M).cutvalue=d(_,A,T)}function d(_,A,T){var O=_.node(T),M=O.parent,R=!0,P=A.edge(T,M),$=0;return P||(R=!1,P=A.edge(M,T)),$=P.weight,e.forEach(A.nodeEdges(T),function(I){var k=I.v===T,V=k?I.w:I.v;if(V!==M){var D=k===R,q=A.edge(I).weight;if($+=D?q:-q,S(_,T,V)){var L=_.edge(T,V).cutvalue;$+=D?-L:L}}}),$}function h(_,A){arguments.length<2&&(A=_.nodes()[0]),m(_,{},1,A)}function m(_,A,T,O,M){var R=T,P=_.node(O);return A[O]=!0,e.forEach(_.neighbors(O),function($){e.has(A,$)||(T=m(_,A,T,$,O))}),P.low=R,P.lim=T++,M?P.parent=M:delete P.parent,T}function g(_){return e.find(_.edges(),function(A){return _.edge(A).cutvalue<0})}function w(_,A,T){var O=T.v,M=T.w;A.hasEdge(O,M)||(O=T.w,M=T.v);var R=_.node(O),P=_.node(M),$=R,I=!1;R.lim>P.lim&&($=P,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 x(_,A,T,O){var M=T.v,R=T.w;_.removeEdge(M,R),_.setEdge(O.v,O.w,{}),h(_),u(_,A),b(_,A)}function b(_,A){var T=e.find(_.nodes(),function(M){return!A.node(M).parent}),O=i(_,T);O=O.slice(1),e.forEach(O,function(M){var R=_.node(M).parent,P=A.edge(M,R),$=!1;P||(P=A.edge(R,M),$=!0),A.node(M).rank=A.node(R).rank+($?P.minlen:-P.minlen)})}function S(_,A,T){return _.hasEdge(A,T)}function E(_,A,T){return T.low<=A.lim&&A.lim<=T.lim}return uO}var cO,aF;function n1e(){if(aF)return cO;aF=1;var e=yb(),t=e.longestPath,n=CX(),r=t1e();cO=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 cO}var fO,oF;function r1e(){if(oF)return fO;oF=1;var e=Qt();fO=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],w=!0;o!==u.w;){if(l=i.node(o),w){for(;(g=d[m])!==h&&i.node(g).maxRank<l.rank;)m++;g===h&&(w=!1)}if(!w){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 fO}var dO,sF;function i1e(){if(sF)return dO;sF=1;var e=Qt(),t=Sr();dO={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 w=l.children(g);if(!w.length){g!==u&&l.setEdge(u,g,{weight:0,minlen:f});return}var x=t.addBorderNode(l,"_bt"),b=t.addBorderNode(l,"_bb"),S=l.node(g);l.setParent(x,g),S.borderTop=x,l.setParent(b,g),S.borderBottom=b,e.forEach(w,function(E){r(l,u,f,d,h,m,E);var _=l.node(E),A=_.borderTop?_.borderTop:E,T=_.borderBottom?_.borderBottom:E,O=_.borderTop?d:2*d,M=A!==T?1:h-m[g]+1;l.setEdge(x,A,{weight:O,minlen:M,nestingEdge:!0}),l.setEdge(T,b,{weight:O,minlen:M,nestingEdge:!0})}),l.parent(g)||l.setEdge(u,x,{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 dO}var hO,lF;function a1e(){if(lF)return hO;lF=1;var e=Qt(),t=Sr();hO=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 hO}var pO,uF;function o1e(){if(uF)return pO;uF=1;var e=Qt();pO={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 pO}var mO,cF;function s1e(){if(cF)return mO;cF=1;var e=Qt();mO=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 mO}var gO,fF;function l1e(){if(fF)return gO;fF=1;var e=Qt();gO=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 w=0;g>0;)g%2&&(w+=d[g+1]),g=g-1>>1,d[g]+=m.weight;h+=m.weight*w})),h}return gO}var vO,dF;function u1e(){if(dF)return vO;dF=1;var e=Qt();vO=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 vO}var yO,hF;function c1e(){if(hF)return yO;hF=1;var e=Qt();yO=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 yO}var bO,pF;function f1e(){if(pF)return bO;pF=1;var e=Qt(),t=Sr();bO=n;function n(a,o){var l=t.partition(a,function(x){return e.has(x,"barycenter")}),u=l.lhs,f=e.sortBy(l.rhs,function(x){return-x.i}),d=[],h=0,m=0,g=0;u.sort(i(!!o)),g=r(d,f,g),e.forEach(u,function(x){g+=x.vs.length,d.push(x.vs),h+=x.barycenter*x.weight,m+=x.weight,g=r(d,f,g)});var w={vs:e.flatten(d,!0)};return m&&(w.barycenter=h/m,w.weight=m),w}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 bO}var xO,mF;function d1e(){if(mF)return xO;mF=1;var e=Qt(),t=u1e(),n=c1e(),r=f1e();xO=i;function i(l,u,f,d){var h=l.children(u),m=l.node(u),g=m?m.borderLeft:void 0,w=m?m.borderRight:void 0,x={};g&&(h=e.filter(h,function(T){return T!==g&&T!==w}));var b=t(l,h);e.forEach(b,function(T){if(l.children(T.v).length){var O=i(l,T.v,f,d);x[T.v]=O,e.has(O,"barycenter")&&o(T,O)}});var S=n(b,f);a(S,x);var E=r(S,d);if(g&&(E.vs=e.flatten([g,E.vs,w],!0),l.predecessors(g).length)){var _=l.node(l.predecessors(g)[0]),A=l.node(l.predecessors(w)[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 xO}var wO,gF;function h1e(){if(gF)return wO;gF=1;var e=Qt(),t=Vi().Graph;wO=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,w=u.edge(g,f),x=e.isUndefined(w)?0:w.weight;u.setEdge(g,f,{weight:i.edge(m).weight+x})}),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 wO}var SO,vF;function p1e(){if(vF)return SO;vF=1;var e=Qt();SO=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 SO}var _O,yF;function m1e(){if(yF)return _O;yF=1;var e=Qt(),t=s1e(),n=l1e(),r=d1e(),i=h1e(),a=p1e(),o=Vi().Graph,l=Sr();_O=u;function u(m){var g=l.maxRank(m),w=f(m,e.range(1,g+1),"inEdges"),x=f(m,e.range(g-1,-1,-1),"outEdges"),b=t(m);h(m,b);for(var S=Number.POSITIVE_INFINITY,E,_=0,A=0;A<4;++_,++A){d(_%2?w:x,_%4>=2),b=l.buildLayerMatrix(m);var T=n(m,b);T<S&&(A=0,E=e.cloneDeep(b),S=T)}h(m,E)}function f(m,g,w){return e.map(g,function(x){return i(m,x,w)})}function d(m,g){var w=new o;e.forEach(m,function(x){var b=x.graph().root,S=r(x,b,w,g);e.forEach(S.vs,function(E,_){x.node(E).order=_}),a(x,w,S.vs)})}function h(m,g){e.forEach(g,function(w){e.forEach(w,function(x,b){m.node(x).order=b})})}return _O}var EO,bF;function g1e(){if(bF)return EO;bF=1;var e=Qt(),t=Vi().Graph,n=Sr();EO={positionX:w,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(T,O){var M=0,R=0,P=T.length,$=e.last(O);return e.forEach(O,function(I,k){var V=a(S,I),D=V?S.node(V).order:P;(V||I===$)&&(e.forEach(O.slice(R,k+1),function(q){e.forEach(S.predecessors(q),function(L){var z=S.node(L),H=z.order;(H<M||D<H)&&!(z.dummy&&S.node(q).dummy)&&o(_,L,q)})}),R=k+1,M=D)}),O}return e.reduce(E,A),_}function i(S,E){var _={};function A(O,M,R,P,$){var I;e.forEach(e.range(M,R),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<P||D.order>$)&&o(_,V,I)})})}function T(O,M){var R=-1,P,$=0;return e.forEach(M,function(I,k){if(S.node(I).dummy==="border"){var V=S.predecessors(I);V.length&&(P=S.node(V[0]).order,A(M,$,k,R,P),$=k,R=P)}A(M,$,M.length,P,O.length)}),M}return e.reduce(E,T),_}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 T=S[E];T||(S[E]=T={}),T[_]=!0}function l(S,E,_){if(E>_){var A=E;E=_,_=A}return e.has(S[E],_)}function u(S,E,_,A){var T={},O={},M={};return e.forEach(E,function(R){e.forEach(R,function(P,$){T[P]=P,O[P]=P,M[P]=$})}),e.forEach(E,function(R){var P=-1;e.forEach(R,function($){var I=A($);if(I.length){I=e.sortBy(I,function(L){return M[L]});for(var k=(I.length-1)/2,V=Math.floor(k),D=Math.ceil(k);V<=D;++V){var q=I[V];O[$]===$&&P<M[q]&&!l(_,$,q)&&(O[q]=$,O[$]=T[$]=T[q],P=M[q])}}})}),{root:T,align:O}}function f(S,E,_,A,T){var O={},M=d(S,E,_,T),R=T?"borderLeft":"borderRight";function P(k,V){for(var D=M.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]=M.inEdges(k).reduce(function(V,D){return Math.max(V,O[D.v]+M.edge(D))},0)}function I(k){var V=M.outEdges(k).reduce(function(q,L){return Math.min(q,O[L.w]-M.edge(L))},Number.POSITIVE_INFINITY),D=S.node(k);V!==Number.POSITIVE_INFINITY&&D.borderType!==R&&(O[k]=Math.max(O[k],V))}return P($,M.predecessors.bind(M)),P(I,M.successors.bind(M)),e.forEach(A,function(k){O[k]=O[_[k]]}),O}function d(S,E,_,A){var T=new t,O=S.graph(),M=x(O.nodesep,O.edgesep,A);return e.forEach(E,function(R){var P;e.forEach(R,function($){var I=_[$];if(T.setNode(I),P){var k=_[P],V=T.edge(k,I);T.setEdge(k,I,Math.max(M(S,$,P),V||0))}P=$})}),T}function h(S,E){return e.minBy(e.values(E),function(_){var A=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;return e.forIn(_,function(O,M){var R=b(S,M)/2;A=Math.max(O+R,A),T=Math.min(O-R,T)}),A-T})}function m(S,E){var _=e.values(E),A=e.min(_),T=e.max(_);e.forEach(["u","d"],function(O){e.forEach(["l","r"],function(M){var R=O+M,P=S[R],$;if(P!==E){var I=e.values(P);$=M==="l"?A-e.min(I):T-e.max(I),$&&(S[R]=e.mapValues(P,function(k){return k+$}))}})})}function g(S,E){return e.mapValues(S.ul,function(_,A){if(E)return S[E.toLowerCase()][A];var T=e.sortBy(e.map(S,A));return(T[1]+T[2])/2})}function w(S){var E=n.buildLayerMatrix(S),_=e.merge(r(S,E),i(S,E)),A={},T;e.forEach(["u","d"],function(M){T=M==="u"?E:e.values(E).reverse(),e.forEach(["l","r"],function(R){R==="r"&&(T=e.map(T,function(k){return e.values(k).reverse()}));var P=(M==="u"?S.predecessors:S.successors).bind(S),$=u(S,T,_,P),I=f(S,T,$.root,$.align,R==="r");R==="r"&&(I=e.mapValues(I,function(k){return-k})),A[M+R]=I})});var O=h(S,A);return m(A,O),g(A,S.graph().align)}function x(S,E,_){return function(A,T,O){var M=A.node(T),R=A.node(O),P=0,$;if(P+=M.width/2,e.has(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":$=-M.width/2;break;case"r":$=M.width/2;break}if($&&(P+=_?$:-$),$=0,P+=(M.dummy?E:S)/2,P+=(R.dummy?E:S)/2,P+=R.width/2,e.has(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":$=R.width/2;break;case"r":$=-R.width/2;break}return $&&(P+=_?$:-$),$=0,P}}function b(S,E){return S.node(E).width}return EO}var AO,xF;function v1e(){if(xF)return AO;xF=1;var e=Qt(),t=Sr(),n=g1e().positionX;AO=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 AO}var TO,wF;function y1e(){if(wF)return TO;wF=1;var e=Qt(),t=Jwe(),n=e1e(),r=n1e(),i=Sr().normalizeRanks,a=r1e(),o=Sr().removeEmptyRanks,l=i1e(),u=a1e(),f=o1e(),d=m1e(),h=v1e(),m=Sr(),g=Vi().Graph;TO=w;function w(W,G){var Z=G&&G.debugTiming?m.time:m.notime;Z("layout",function(){var J=Z(" buildLayoutGraph",function(){return P(W)});Z(" runLayout",function(){x(J,Z)}),Z(" updateInputGraph",function(){b(W,J)})})}function x(W,G){G(" makeSpaceForEdgeLabels",function(){$(W)}),G(" removeSelfEdges",function(){Y(W)}),G(" acyclic",function(){t.run(W)}),G(" nestingGraph.run",function(){l.run(W)}),G(" rank",function(){r(m.asNonCompoundGraph(W))}),G(" injectEdgeLabelProxies",function(){I(W)}),G(" removeEmptyRanks",function(){o(W)}),G(" nestingGraph.cleanup",function(){l.cleanup(W)}),G(" normalizeRanks",function(){i(W)}),G(" assignRankMinMax",function(){k(W)}),G(" removeEdgeLabelProxies",function(){V(W)}),G(" normalize.run",function(){n.run(W)}),G(" parentDummyChains",function(){a(W)}),G(" addBorderSegments",function(){u(W)}),G(" order",function(){d(W)}),G(" insertSelfEdges",function(){Q(W)}),G(" adjustCoordinateSystem",function(){f.adjust(W)}),G(" position",function(){h(W)}),G(" positionSelfEdges",function(){U(W)}),G(" removeBorderNodes",function(){H(W)}),G(" normalize.undo",function(){n.undo(W)}),G(" fixupEdgeLabelCoords",function(){L(W)}),G(" undoCoordinateSystem",function(){f.undo(W)}),G(" translateGraph",function(){D(W)}),G(" assignNodeIntersects",function(){q(W)}),G(" reversePoints",function(){z(W)}),G(" acyclic.undo",function(){t.undo(W)})}function b(W,G){e.forEach(W.nodes(),function(Z){var J=W.node(Z),re=G.node(Z);J&&(J.x=re.x,J.y=re.y,G.children(Z).length&&(J.width=re.width,J.height=re.height))}),e.forEach(W.edges(),function(Z){var J=W.edge(Z),re=G.edge(Z);J.points=re.points,e.has(re,"x")&&(J.x=re.x,J.y=re.y)}),W.graph().width=G.graph().width,W.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"],T={width:0,height:0},O=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},R=["labelpos"];function P(W){var G=new g({multigraph:!0,compound:!0}),Z=X(W.graph());return G.setGraph(e.merge({},E,F(Z,S),e.pick(Z,_))),e.forEach(W.nodes(),function(J){var re=X(W.node(J));G.setNode(J,e.defaults(F(re,A),T)),G.setParent(J,W.parent(J))}),e.forEach(W.edges(),function(J){var re=X(W.edge(J));G.setEdge(J,e.merge({},M,F(re,O),e.pick(re,R)))}),G}function $(W){var G=W.graph();G.ranksep/=2,e.forEach(W.edges(),function(Z){var J=W.edge(Z);J.minlen*=2,J.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?J.width+=J.labeloffset:J.height+=J.labeloffset)})}function I(W){e.forEach(W.edges(),function(G){var Z=W.edge(G);if(Z.width&&Z.height){var J=W.node(G.v),re=W.node(G.w),ne={rank:(re.rank-J.rank)/2+J.rank,e:G};m.addDummyNode(W,"edge-proxy",ne,"_ep")}})}function k(W){var G=0;e.forEach(W.nodes(),function(Z){var J=W.node(Z);J.borderTop&&(J.minRank=W.node(J.borderTop).rank,J.maxRank=W.node(J.borderBottom).rank,G=e.max(G,J.maxRank))}),W.graph().maxRank=G}function V(W){e.forEach(W.nodes(),function(G){var Z=W.node(G);Z.dummy==="edge-proxy"&&(W.edge(Z.e).labelRank=Z.rank,W.removeNode(G))})}function D(W){var G=Number.POSITIVE_INFINITY,Z=0,J=Number.POSITIVE_INFINITY,re=0,ne=W.graph(),fe=ne.marginx||0,he=ne.marginy||0;function oe(ye){var xe=ye.x,we=ye.y,Te=ye.width,Ee=ye.height;G=Math.min(G,xe-Te/2),Z=Math.max(Z,xe+Te/2),J=Math.min(J,we-Ee/2),re=Math.max(re,we+Ee/2)}e.forEach(W.nodes(),function(ye){oe(W.node(ye))}),e.forEach(W.edges(),function(ye){var xe=W.edge(ye);e.has(xe,"x")&&oe(xe)}),G-=fe,J-=he,e.forEach(W.nodes(),function(ye){var xe=W.node(ye);xe.x-=G,xe.y-=J}),e.forEach(W.edges(),function(ye){var xe=W.edge(ye);e.forEach(xe.points,function(we){we.x-=G,we.y-=J}),e.has(xe,"x")&&(xe.x-=G),e.has(xe,"y")&&(xe.y-=J)}),ne.width=Z-G+fe,ne.height=re-J+he}function q(W){e.forEach(W.edges(),function(G){var Z=W.edge(G),J=W.node(G.v),re=W.node(G.w),ne,fe;Z.points?(ne=Z.points[0],fe=Z.points[Z.points.length-1]):(Z.points=[],ne=re,fe=J),Z.points.unshift(m.intersectRect(J,ne)),Z.points.push(m.intersectRect(re,fe))})}function L(W){e.forEach(W.edges(),function(G){var Z=W.edge(G);if(e.has(Z,"x"))switch((Z.labelpos==="l"||Z.labelpos==="r")&&(Z.width-=Z.labeloffset),Z.labelpos){case"l":Z.x-=Z.width/2+Z.labeloffset;break;case"r":Z.x+=Z.width/2+Z.labeloffset;break}})}function z(W){e.forEach(W.edges(),function(G){var Z=W.edge(G);Z.reversed&&Z.points.reverse()})}function H(W){e.forEach(W.nodes(),function(G){if(W.children(G).length){var Z=W.node(G),J=W.node(Z.borderTop),re=W.node(Z.borderBottom),ne=W.node(e.last(Z.borderLeft)),fe=W.node(e.last(Z.borderRight));Z.width=Math.abs(fe.x-ne.x),Z.height=Math.abs(re.y-J.y),Z.x=ne.x+Z.width/2,Z.y=J.y+Z.height/2}}),e.forEach(W.nodes(),function(G){W.node(G).dummy==="border"&&W.removeNode(G)})}function Y(W){e.forEach(W.edges(),function(G){if(G.v===G.w){var Z=W.node(G.v);Z.selfEdges||(Z.selfEdges=[]),Z.selfEdges.push({e:G,label:W.edge(G)}),W.removeEdge(G)}})}function Q(W){var G=m.buildLayerMatrix(W);e.forEach(G,function(Z){var J=0;e.forEach(Z,function(re,ne){var fe=W.node(re);fe.order=ne+J,e.forEach(fe.selfEdges,function(he){m.addDummyNode(W,"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(W){e.forEach(W.nodes(),function(G){var Z=W.node(G);if(Z.dummy==="selfedge"){var J=W.node(Z.e.v),re=J.x+J.width/2,ne=J.y,fe=Z.x-re,he=J.height/2;W.setEdge(Z.e,Z.label),W.removeNode(G),Z.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}],Z.label.x=Z.x,Z.label.y=Z.y}})}function F(W,G){return e.mapValues(e.pick(W,G),Number)}function X(W){var G={};return e.forEach(W,function(Z,J){G[J.toLowerCase()]=Z}),G}return TO}var CO,SF;function b1e(){if(SF)return CO;SF=1;var e=Qt(),t=Sr(),n=Vi().Graph;CO={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 CO}var OO,_F;function x1e(){return _F||(_F=1,OO="0.8.5"),OO}var jO,EF;function w1e(){return EF||(EF=1,jO={graphlib:Vi(),layout:y1e(),debug:b1e(),util:{time:Sr().time,notime:Sr().notime},version:x1e()}),jO}var S1e=w1e();const AF=vt(S1e),TF={completed:{icon:Dm,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"},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:k3,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},delayed:{icon:Li,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"},failed:{icon:U0,color:"text-destructive",bg:"bg-red-50 dark:bg-red-500/10",border:"border-red-200 dark:border-red-500/20"},paused:{icon:x7,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},unknown:{icon:k3,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"}};function _1e(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`}function E1e({data:e}){const{flowNode:t,onClick:n}=e,{job:r,queueName:i}=t,a=TF[r.status]||TF.unknown,o=a.icon;return y.jsxs("div",{className:be("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:[y.jsx(Lf,{type:"target",position:De.Top,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-0"}),y.jsxs("div",{className:"flex items-start gap-2.5",children:[y.jsx("div",{className:be("p-1.5 shrink-0",a.bg),children:y.jsx(o,{className:be("h-3.5 w-3.5",a.color,a.animate&&"animate-spin")})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsx("div",{className:"font-medium text-sm truncate text-foreground",children:r.name}),y.jsx("div",{className:"text-[11px] text-muted-foreground truncate mt-0.5",children:i}),r.duration!==void 0&&y.jsx("div",{className:"text-[11px] text-muted-foreground mt-1 font-mono tabular-nums",children:_1e(r.duration)})]})]}),y.jsx("div",{className:be("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}),y.jsx(Lf,{type:"source",position:De.Bottom,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-0"})]})}const A1e=N.memo(E1e),T1e={flowNode:A1e},CF=200,OF=80;function C1e(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:CF,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-CF/2,y:l.y-OF/2})}return{nodes:n,edges:r}}function O1e({flow:e,onNodeClick:t}){const{nodes:n,edges:r}=N.useMemo(()=>C1e(e,t),[e,t]),i=N.useCallback((a,o)=>{o.data.onClick&&o.data.flowNode&&o.data.onClick(o.data.flowNode)},[]);return y.jsx("div",{className:"w-full h-full",children:y.jsx(Qbe,{nodes:n,edges:r,nodeTypes:T1e,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 qr({icon:e,title:t,description:n,action:r,className:i}){return y.jsxs("div",{className:be("flex flex-col items-center justify-center py-12 text-center",i),children:[y.jsx("div",{className:"bg-muted p-4 mb-4",children:y.jsx(e,{className:"h-8 w-8 text-muted-foreground"})}),y.jsx("h3",{className:"font-medium text-lg mb-1",children:t}),n&&y.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mb-4",children:n}),r]})}const bb={completed:{label:"Completed",dotClass:"bg-status-success",textClass:"text-status-success",bgClass:"bg-status-success/10"},active:{label:"Running",dotClass:"bg-status-active",textClass:"text-status-active",bgClass:"bg-status-active/10"},waiting:{label:"Queued",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"},delayed:{label:"Delayed",dotClass:"bg-status-warning",textClass:"text-status-warning",bgClass:"bg-status-warning/10"},failed:{label:"Failed",dotClass:"bg-status-error",textClass:"text-status-error",bgClass:"bg-status-error/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 Qm({status:e,duration:t,className:n}){const r=bb[e]||bb.unknown;return y.jsxs("span",{className:be("inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium",r.bgClass,n),children:[y.jsx("span",{className:be("h-1.5 w-1.5 rounded-full",r.dotClass)}),y.jsx("span",{className:r.textClass,children:r.label})]})}function j1e({status:e,className:t}){const n=bb[e]||bb.unknown;return y.jsx("span",{className:be("h-2 w-2 rounded-full",n.dotClass,t)})}function N1e({queueName:e,jobId:t}){const n=hi(),{data:r,isLoading:i,error:a}=Bde(e,t),o=u=>{n({to:"/queues/$queueName/jobs/$jobId",params:{queueName:u.queueName,jobId:u.job.id}})};if(i)return y.jsxs("div",{className:"flex flex-col h-full -mb-6",children:[y.jsxs("div",{className:"pb-4 border-b border-border shrink-0",children:[y.jsx("div",{className:"flex items-center justify-between mb-4",children:y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"h-6 w-32 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-5 w-20 animate-pulse rounded bg-muted"})]})}),y.jsxs("div",{className:"flex items-center gap-6",children:[y.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})]})]}),y.jsx("div",{className:"flex-1 -mx-6 -mb-6 mt-6 flex items-center justify-center dotted-bg",children:y.jsx(sp,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]});if(a||!r)return y.jsx(qr,{icon:po,title:"Failed to load flow",description:(a==null?void 0:a.message)||"Flow not found or jobs have been cleaned up"});const l=OX(r);return y.jsxs("div",{className:"flex flex-col h-full -mb-6",children:[y.jsxs("div",{className:"pb-4 border-b border-border shrink-0",children:[y.jsx("div",{className:"flex items-center justify-between mb-4",children:y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(yu,{className:"h-5 w-5 text-muted-foreground"}),y.jsx(Qm,{status:r.job.status})]})}),y.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2 text-sm",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"Queue:"}),y.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})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Oce,{className:"h-4 w-4 text-muted-foreground"}),y.jsxs("span",{className:"text-muted-foreground",children:[l.total," job",l.total!==1?"s":""]})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Dm,{className:"h-4 w-4 text-emerald-500"}),y.jsxs("span",{className:"text-muted-foreground",children:[l.completed," completed"]})]}),l.failed>0&&y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(U0,{className:"h-4 w-4 text-red-500"}),y.jsxs("span",{className:"text-red-500",children:[l.failed," failed"]})]}),r.job.duration!==void 0&&y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Li,{className:"h-4 w-4 text-muted-foreground"}),y.jsx("span",{className:"text-muted-foreground",children:wr(r.job.duration)})]})]})]}),y.jsx("div",{className:"flex-1 -mx-6 -mb-6 mt-6 dotted-bg",children:y.jsx(O1e,{flow:r,onNodeClick:o})})]})}function OX(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=OX(i);t+=a.total,n+=a.completed,r+=a.failed}return{total:t,completed:n,failed:r}}function Au({timestamp:e,className:t}){return y.jsxs(q0,{children:[y.jsx(z0,{asChild:!0,children:y.jsx("span",{className:t,children:l7(e)})}),y.jsx(Pm,{children:y.jsx("span",{className:"font-mono text-xs",children:_y(e)})})]})}function jX({className:e,containerClassName:t,...n}){return y.jsx("div",{"data-slot":"table-container",className:be("relative w-full overflow-x-auto",t),children:y.jsx("table",{"data-slot":"table",className:be("w-full caption-bottom text-sm",e),...n})})}function NX({className:e,...t}){return y.jsx("thead",{"data-slot":"table-header",className:be("[&_tr]:border-b",e),...t})}function MX({className:e,...t}){return y.jsx("tbody",{"data-slot":"table-body",className:be("[&_tr:last-child]:border-0",e),...t})}function xb({className:e,...t}){return y.jsx("tr",{"data-slot":"table-row",className:be("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function ai({className:e,...t}){return y.jsx("th",{"data-slot":"table-head",className:be("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function oi({className:e,...t}){return y.jsx("td",{"data-slot":"table-cell",className:be("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function RX(e){const t=e+"CollectionProvider",[n,r]=tl(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=x=>{const{scope:b,children:S}=x,E=ie.useRef(null),_=ie.useRef(new Map).current;return y.jsx(i,{scope:b,itemMap:_,collectionRef:E,children:S})};o.displayName=t;const l=e+"CollectionSlot",u=Ep(l),f=ie.forwardRef((x,b)=>{const{scope:S,children:E}=x,_=a(l,S),A=Bt(b,_.collectionRef);return y.jsx(u,{ref:A,children:E})});f.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=Ep(d),g=ie.forwardRef((x,b)=>{const{scope:S,children:E,..._}=x,A=ie.useRef(null),T=Bt(b,A),O=a(d,S);return ie.useEffect(()=>(O.itemMap.set(A,{ref:A,..._}),()=>void O.itemMap.delete(A))),y.jsx(m,{[h]:"",ref:T,children:E})});g.displayName=d;function w(x){const b=a(e+"CollectionConsumer",x);return ie.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const _=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((O,M)=>_.indexOf(O.ref.current)-_.indexOf(M.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:f,ItemSlot:g},w,r]}var M1e=N.createContext(void 0);function o2(e){const t=N.useContext(M1e);return e||t||"ltr"}var NO="rovingFocusGroup.onEntryFocus",R1e={bubbles:!1,cancelable:!0},Zm="RovingFocusGroup",[BN,PX,P1e]=RX(Zm),[k1e,kX]=tl(Zm,[P1e]),[D1e,I1e]=k1e(Zm),DX=N.forwardRef((e,t)=>y.jsx(BN.Provider,{scope:e.__scopeRovingFocusGroup,children:y.jsx(BN.Slot,{scope:e.__scopeRovingFocusGroup,children:y.jsx(L1e,{...e,ref:t})})}));DX.displayName=Zm;var L1e=N.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=N.useRef(null),g=Bt(t,m),w=o2(a),[x,b]=mu({prop:o,defaultProp:l??null,onChange:u,caller:Zm}),[S,E]=N.useState(!1),_=Gs(f),A=PX(n),T=N.useRef(!1),[O,M]=N.useState(0);return N.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(NO,_),()=>R.removeEventListener(NO,_)},[_]),y.jsx(D1e,{scope:n,orientation:r,dir:w,loop:i,currentTabStopId:x,onItemFocus:N.useCallback(R=>b(R),[b]),onItemShiftTab:N.useCallback(()=>E(!0),[]),onFocusableItemAdd:N.useCallback(()=>M(R=>R+1),[]),onFocusableItemRemove:N.useCallback(()=>M(R=>R-1),[]),children:y.jsx(ot.div,{tabIndex:S||O===0?-1:0,"data-orientation":r,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:Ue(e.onMouseDown,()=>{T.current=!0}),onFocus:Ue(e.onFocus,R=>{const P=!T.current;if(R.target===R.currentTarget&&P&&!S){const $=new CustomEvent(NO,R1e);if(R.currentTarget.dispatchEvent($),!$.defaultPrevented){const I=A().filter(L=>L.focusable),k=I.find(L=>L.active),V=I.find(L=>L.id===x),q=[k,V,...I].filter(Boolean).map(L=>L.ref.current);$X(q,d)}}T.current=!1}),onBlur:Ue(e.onBlur,()=>E(!1))})})}),IX="RovingFocusGroupItem",LX=N.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...l}=e,u=or(),f=a||u,d=I1e(IX,n),h=d.currentTabStopId===f,m=PX(n),{onFocusableItemAdd:g,onFocusableItemRemove:w,currentTabStopId:x}=d;return N.useEffect(()=>{if(r)return g(),()=>w()},[r,g,w]),y.jsx(BN.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:y.jsx(ot.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:Ue(e.onMouseDown,b=>{r?d.onItemFocus(f):b.preventDefault()}),onFocus:Ue(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:Ue(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const S=q1e(b,d.orientation,d.dir);if(S!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.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(b.currentTarget);_=d.loop?z1e(_,A+1):_.slice(A+1)}setTimeout(()=>$X(_))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:x!=null}):o})})});LX.displayName=IX;var $1e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function B1e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function q1e(e,t,n){const r=B1e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $1e[r]}function $X(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function z1e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var V1e=DX,F1e=LX,Cx="Tabs",[U1e]=tl(Cx,[kX]),BX=kX(),[H1e,s2]=U1e(Cx),qX=N.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:u="automatic",...f}=e,d=o2(l),[h,m]=mu({prop:r,onChange:i,defaultProp:a??"",caller:Cx});return y.jsx(H1e,{scope:n,baseId:or(),value:h,onValueChange:m,orientation:o,dir:d,activationMode:u,children:y.jsx(ot.div,{dir:d,"data-orientation":o,...f,ref:t})})});qX.displayName=Cx;var zX="TabsList",VX=N.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=s2(zX,n),o=BX(n);return y.jsx(V1e,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:y.jsx(ot.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});VX.displayName=zX;var FX="TabsTrigger",UX=N.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=s2(FX,n),l=BX(n),u=KX(o.baseId,r),f=WX(o.baseId,r),d=r===o.value;return y.jsx(F1e,{asChild:!0,...l,focusable:!i,active:d,children:y.jsx(ot.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:Ue(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:Ue(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:Ue(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!i&&h&&o.onValueChange(r)})})})});UX.displayName=FX;var HX="TabsContent",GX=N.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,l=s2(HX,n),u=KX(l.baseId,r),f=WX(l.baseId,r),d=r===l.value,h=N.useRef(d);return N.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),y.jsx(nl,{present:i||d,children:({present:m})=>y.jsx(ot.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})})});GX.displayName=HX;function KX(e,t){return`${e}-trigger-${t}`}function WX(e,t){return`${e}-content-${t}`}var G1e=qX,YX=VX,XX=UX,QX=GX;const Ox=G1e,Jm=N.forwardRef(({className:e,...t},n)=>y.jsx(YX,{ref:n,className:be("inline-flex h-9 items-center gap-1 bg-muted p-1 text-muted-foreground",e),...t}));Jm.displayName=YX.displayName;const Ri=N.forwardRef(({className:e,...t},n)=>y.jsx(XX,{ref:n,className:be("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}));Ri.displayName=XX.displayName;const ia=N.forwardRef(({className:e,...t},n)=>y.jsx(QX,{ref:n,className:be("mt-2 focus-visible:outline-none",e),...t}));ia.displayName=QX.displayName;const jF=[{value:"all",label:"All"},{value:"waiting",label:"Waiting"},{value:"active",label:"Active"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}];function K1e({onFlowSelect:e}){const t=hi(),{data:n,isLoading:r,error:i}=$de(),[a,o]=N.useState("all"),l=h=>{t({to:"/queues/$queueName",params:{queueName:h}})},u=(n==null?void 0:n.flows)||[],f=N.useMemo(()=>{const h={all:u.length,waiting:0,active:0,completed:0,failed:0};for(const m of u)m.status in h&&(h[m.status]+=1);return h},[u]),d=N.useMemo(()=>a==="all"?u:u.filter(h=>h.status===a),[u,a]);return r&&u.length===0?y.jsx(X1e,{}):i?y.jsx("div",{className:"flex h-64 items-center justify-center",children:y.jsx(qr,{icon:po,title:"Failed to load flows",description:i.message})}):u.length===0?y.jsx("div",{className:"flex h-64 items-center justify-center",children:y.jsx(qr,{icon:yu,title:"No flows found",description:"Flows are created when you use BullMQ's FlowProducer"})}):y.jsxs(Ox,{value:a,onValueChange:h=>o(h),className:"flex h-full min-h-0 flex-col gap-4",children:[y.jsx(Jm,{className:"shrink-0 self-start",children:jF.map(h=>y.jsxs(Ri,{value:h.value,children:[h.label," (",f[h.value],")"]},h.value))}),jF.map(h=>y.jsx(ia,{value:h.value,className:"mt-0 min-h-0 flex-1 data-[state=active]:flex data-[state=active]:flex-col",children:d.length===0?y.jsx("div",{className:"flex h-48 items-center justify-center",children:y.jsx(qr,{icon:yu,title:`No ${h.value==="all"?"":h.label.toLowerCase()} flows`,description:"Try selecting a different status filter"})}):y.jsx(W1e,{flows:d,onFlowSelect:e,onQueueClick:l})},h.value))]})}function W1e({flows:e,onFlowSelect:t,onQueueClick:n}){return y.jsxs(jX,{containerClassName:"min-h-0 flex-1 overflow-auto",children:[y.jsx(NX,{className:"sticky top-0 z-10 bg-background",children:y.jsxs(xb,{children:[y.jsx(ai,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Flow"}),y.jsx(ai,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Queue"}),y.jsx(ai,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Status"}),y.jsx(ai,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Progress"}),y.jsx(ai,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Created"}),y.jsx(ai,{className:"w-8"})]})}),y.jsx(MX,{children:e.map(r=>y.jsx(Y1e,{flow:r,onClick:()=>t(r.queueName,r.id),onQueueClick:n},`${r.queueName}:${r.id}`))})]})}function Y1e({flow:e,onClick:t,onQueueClick:n}){const r=i=>{i.stopPropagation(),n(e.queueName)};return y.jsxs(xb,{onClick:t,className:"group cursor-pointer",children:[y.jsx(oi,{className:"min-w-0",children:y.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[y.jsx(yu,{className:"h-4 w-4 text-muted-foreground shrink-0"}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"truncate font-medium text-sm",children:e.name}),y.jsx("div",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.id})]})]})}),y.jsx(oi,{children:y.jsx("button",{type:"button",onClick:r,className:"truncate font-mono text-[11px] text-primary hover:underline",children:e.queueName})}),y.jsx(oi,{children:y.jsx(Qm,{status:e.status})}),y.jsx(oi,{children:y.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx(Dm,{className:"h-3.5 w-3.5 text-emerald-600 dark:text-emerald-400"}),y.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.completedJobs})]}),y.jsx("span",{className:"text-muted-foreground",children:"/"}),y.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.totalJobs}),e.failedJobs>0&&y.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[y.jsx(U0,{className:"h-3.5 w-3.5 text-destructive"}),y.jsx("span",{className:"text-destructive tabular-nums",children:e.failedJobs})]})]})}),y.jsx(oi,{children:y.jsx(Au,{timestamp:e.timestamp})}),y.jsx(oi,{className:"w-8",children:y.jsx(jf,{className:"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})})]})}function X1e(){return y.jsxs(jX,{children:[y.jsx(NX,{children:y.jsxs(xb,{children:[y.jsx(ai,{children:"Flow"}),y.jsx(ai,{children:"Queue"}),y.jsx(ai,{children:"Status"}),y.jsx(ai,{children:"Progress"}),y.jsx(ai,{children:"Created"}),y.jsx(ai,{className:"w-8"})]})}),y.jsx(MX,{children:[...Array(12)].map((e,t)=>y.jsxs(xb,{children:[y.jsx(oi,{children:y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"})]})}),y.jsx(oi,{children:y.jsx("div",{className:"h-4 w-16 animate-pulse rounded bg-muted"})}),y.jsx(oi,{children:y.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),y.jsx(oi,{children:y.jsx("div",{className:"h-4 w-16 animate-pulse rounded bg-muted"})}),y.jsx(oi,{children:y.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),y.jsx(oi,{className:"w-8"})]},t.toString()))})]})}function NF({data:e,className:t,defaultExpanded:n=!0}){const[r,i]=N.useState(!1),a=()=>{navigator.clipboard.writeText(JSON.stringify(e,null,2)),i(!0),setTimeout(()=>i(!1),2e3)};return y.jsxs("div",{className:be("relative group",t),children:[y.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?y.jsx(pd,{size:16,className:"h-4 w-4 text-status-success"}):y.jsx(H0,{className:"h-4 w-4 text-muted-foreground"})}),y.jsx("div",{className:"max-h-96 overflow-auto p-4 font-mono text-sm",children:y.jsx(qN,{data:e,level:0,defaultExpanded:n})})]})}function qN({data:e,level:t,defaultExpanded:n,keyName:r}){const[i,a]=N.useState(n),o=({name:l})=>y.jsxs("span",{className:"text-primary",children:['"',l,'"']});if(e===null)return y.jsxs("span",{children:[r&&y.jsxs(y.Fragment,{children:[y.jsx(o,{name:r}),y.jsx("span",{className:"text-foreground",children:": "})]}),y.jsx("span",{className:"text-muted-foreground italic",children:"null"})]});if(e===void 0)return y.jsxs("span",{children:[r&&y.jsxs(y.Fragment,{children:[y.jsx(o,{name:r}),y.jsx("span",{className:"text-foreground",children:": "})]}),y.jsx("span",{className:"text-muted-foreground italic",children:"undefined"})]});if(typeof e=="boolean")return y.jsxs("span",{children:[r&&y.jsxs(y.Fragment,{children:[y.jsx(o,{name:r}),y.jsx("span",{className:"text-foreground",children:": "})]}),y.jsx("span",{className:"text-status-warning",children:String(e)})]});if(typeof e=="number")return y.jsxs("span",{children:[r&&y.jsxs(y.Fragment,{children:[y.jsx(o,{name:r}),y.jsx("span",{className:"text-foreground",children:": "})]}),y.jsx("span",{className:"text-status-success",children:e})]});if(typeof e=="string")return y.jsxs("span",{children:[r&&y.jsxs(y.Fragment,{children:[y.jsx(o,{name:r}),y.jsx("span",{className:"text-foreground",children:": "})]}),y.jsxs("span",{className:"text-chart-5",children:['"',e,'"']})]});if(Array.isArray(e))return e.length===0?y.jsxs("span",{children:[r&&y.jsxs(y.Fragment,{children:[y.jsx(o,{name:r}),y.jsx("span",{className:"text-foreground",children:": "})]}),y.jsx("span",{className:"text-muted-foreground",children:"[]"})]}):y.jsxs("div",{children:[y.jsxs("button",{type:"button",onClick:()=>a(!i),className:"inline-flex items-center gap-1 hover:opacity-70",children:[y.jsx(jf,{className:be("h-3 w-3 text-muted-foreground transition-transform",i&&"rotate-90")}),r&&y.jsxs(y.Fragment,{children:[y.jsx(o,{name:r}),y.jsx("span",{className:"text-foreground",children:": "})]}),y.jsxs("span",{className:"text-muted-foreground",children:["Array(",e.length,")"]})]}),i&&y.jsx("div",{className:"ml-4 mt-1 space-y-1 border-l border-border pl-3",children:e.map((l,u)=>y.jsx("div",{children:y.jsx(qN,{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?y.jsxs("span",{children:[r&&y.jsxs(y.Fragment,{children:[y.jsx(o,{name:r}),y.jsx("span",{className:"text-foreground",children:": "})]}),y.jsx("span",{className:"text-muted-foreground",children:"{}"})]}):y.jsxs("div",{children:[y.jsxs("button",{type:"button",onClick:()=>a(!i),className:"inline-flex items-center gap-1 hover:opacity-70",children:[y.jsx(jf,{className:be("h-3 w-3 text-muted-foreground transition-transform",i&&"rotate-90")}),r&&y.jsxs(y.Fragment,{children:[y.jsx(o,{name:r}),y.jsx("span",{className:"text-foreground",children:": "})]}),y.jsxs("span",{className:"text-muted-foreground",children:["Object(",l.length,")"]})]}),i&&y.jsx("div",{className:"ml-4 mt-1 space-y-1 border-l border-border pl-3",children:l.map(([u,f])=>y.jsx("div",{children:y.jsx(qN,{data:f,level:t+1,defaultExpanded:t<1,keyName:u})},u))})]})}return y.jsx("span",{children:String(e)})}const Q1e=G0("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 go({className:e,variant:t,...n}){return y.jsx("span",{"data-slot":"badge",className:be(Q1e({variant:t}),e),...n})}function Z1e({queueName:e,jobId:t,readonly:n,search:r,onSearchChange:i,onBack:a,onClone:o}){const l=hi(),{data:u,isLoading:f,error:d}=Tde(e,t),h=Rde(),m=Pde(),g=kde(),[w,x]=N.useState(!1),b=r.tab||((u==null?void 0:u.status)==="failed"?"error":"payload"),S=h.isPending||m.isPending||g.isPending,E=async()=>{await navigator.clipboard.writeText(t),x(!0),setTimeout(()=>x(!1),2e3)},_=()=>{h.mutate({queueName:e,jobId:t})},A=()=>{m.mutate({queueName:e,jobId:t},{onSuccess:()=>a()})},T=()=>{g.mutate({queueName:e,jobId:t})},O=()=>{if(!u)return;const R={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},P=new Blob([JSON.stringify(R,null,2)],{type:"application/json"}),$=URL.createObjectURL(P),I=document.createElement("a");I.href=$,I.download=`job-${u.name}-${t}.json`,I.click(),URL.revokeObjectURL($)},M=()=>{if(!u)return;const R=JSON.stringify(u.data,null,2);o(e,u.name,R)};return f&&!u?y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{className:" border bg-card",children:[y.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"h-6 w-32 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"h-8 w-8 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-8 w-8 animate-pulse rounded bg-muted"})]})]}),y.jsxs("div",{className:"flex items-center gap-6 px-4 py-3",children:[y.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})]})]}),y.jsxs("div",{className:" border bg-card p-4",children:[y.jsx("div",{className:"h-5 w-16 animate-pulse rounded bg-muted mb-3"}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"})]})]})]}):d||!u?y.jsx(qr,{icon:po,title:"Job not found",description:(d==null?void 0:d.message)||"This job may have been removed",action:y.jsx(Tn,{variant:"outline",onClick:a,children:"Go back"})}):y.jsxs("div",{className:"flex h-full flex-col gap-4",children:[y.jsxs("div",{className:" border bg-card",children:[y.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx("div",{className:"flex items-center gap-2 bg-muted px-2.5 py-1 text-sm font-medium",children:u.name}),y.jsx(Qm,{status:u.status})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(Tn,{variant:"outline",size:"sm",onClick:O,children:[y.jsx(Ace,{className:"mr-1.5 h-3.5 w-3.5"}),"Export"]}),!n&&y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{variant:"outline",size:"sm",onClick:M,children:[y.jsx(Ece,{className:"mr-1.5 h-3.5 w-3.5"}),"Clone"]}),u.status==="failed"&&y.jsxs(Tn,{variant:"outline",size:"sm",onClick:_,disabled:S,children:[y.jsx(Im,{className:"mr-1.5 h-3.5 w-3.5"}),"Retry"]}),u.status==="delayed"&&y.jsxs(Tn,{variant:"outline",size:"sm",onClick:T,disabled:S,children:[y.jsx(Cce,{className:"mr-1.5 h-3.5 w-3.5"}),"Run Now"]}),y.jsxs(Tn,{variant:"outline",size:"sm",onClick:A,disabled:S,className:"text-destructive hover:bg-destructive/10 hover:text-destructive",children:[y.jsx(S7,{className:"mr-1.5 h-3.5 w-3.5"}),"Remove"]})]})]})]}),y.jsxs("div",{className:"divide-y text-sm",children:[y.jsx(kc,{icon:jce,label:"Job ID",mono:!0,children:y.jsxs("span",{className:"flex items-center gap-2",children:[t,y.jsx("button",{type:"button",onClick:E,className:"rounded p-1 hover:bg-muted",children:w?y.jsx(pd,{className:"h-3.5 w-3.5 text-status-success"}):y.jsx(H0,{className:"h-3.5 w-3.5 text-muted-foreground"})})]})}),y.jsx(kc,{icon:oP,label:"Queue",children:y.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&&y.jsx(kc,{icon:yu,label:"Part of Flow",children:y.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:[y.jsx("span",{className:"font-mono text-xs",children:u.parent.id}),y.jsx(Tce,{className:"h-3 w-3"})]})}),y.jsx(kc,{icon:Li,label:"Created",children:_y(u.timestamp)}),u.processedOn&&y.jsx(kc,{icon:Li,label:"Started",children:_y(u.processedOn)}),u.finishedOn&&y.jsx(kc,{icon:Li,label:"Finished",children:_y(u.finishedOn)})]}),y.jsxs("div",{className:"flex items-center gap-6 border-t px-4 py-3 text-sm",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"Duration"}),y.jsx("span",{className:"font-mono font-medium",children:u.duration?wr(u.duration):"-"})]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(sP,{className:"h-3.5 w-3.5 text-muted-foreground"}),y.jsx("span",{className:"text-muted-foreground",children:"Attempts"}),y.jsxs("span",{className:"font-mono font-medium",children:[u.attemptsMade," / ",u.opts.attempts||3]}),u.attemptsMade>1&&y.jsx(go,{variant:"secondary",className:"bg-amber-500/10 text-amber-600 text-[10px] px-1.5",children:"Retried"})]}),u.opts.delay&&y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"text-muted-foreground",children:"Delay"}),y.jsx("span",{className:"font-mono font-medium",children:wr(u.opts.delay)})]})]})]}),y.jsxs(Ox,{value:b,onValueChange:R=>i({...r,tab:R}),className:"flex-1",children:[y.jsxs(Jm,{children:[y.jsx(Ri,{value:"payload",children:"Payload"}),y.jsx(Ri,{value:"output",children:"Output"}),y.jsx(Ri,{value:"logs",children:"Logs"}),u.failedReason&&y.jsx(Ri,{value:"error",className:"text-status-error",children:"Error"}),u.attemptsMade>1&&u.stacktrace&&u.stacktrace.length>0&&y.jsxs(Ri,{value:"retries",children:["Retries (",u.attemptsMade-1,")"]}),y.jsx(Ri,{value:"timeline",children:"Timeline"})]}),y.jsx(ia,{value:"payload",className:"mt-4",children:y.jsx("div",{className:" border",children:y.jsx(NF,{data:u.data})})}),y.jsx(ia,{value:"output",className:"mt-4",children:y.jsx("div",{className:" border",children:u.returnvalue?y.jsx(NF,{data:u.returnvalue}):y.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No output data"})})}),y.jsx(ia,{value:"logs",className:"mt-4",children:y.jsx(J1e,{queueName:e,jobId:t,enabled:b==="logs"})}),u.failedReason&&y.jsx(ia,{value:"error",className:"mt-4 flex flex-col",style:{maxHeight:"calc(100vh - 480px)",minHeight:"200px"},children:y.jsx(eSe,{error:u.failedReason,stacktrace:u.stacktrace,jobName:u.name,queueName:e})}),u.attemptsMade>1&&u.stacktrace&&u.stacktrace.length>0&&y.jsx(ia,{value:"retries",className:"mt-4",children:y.jsx(nSe,{attemptsMade:u.attemptsMade,maxAttempts:u.opts.attempts||3,stacktraces:u.stacktrace,status:u.status})}),y.jsx(ia,{value:"timeline",className:"mt-4",children:y.jsx(tSe,{job:u})})]})]})}function J1e({queueName:e,jobId:t,enabled:n}){const{data:r,isLoading:i,error:a,refetch:o,isFetching:l}=Cde(e,t,n),[u,f]=N.useState(!1),d=(r==null?void 0:r.logs)??[],h=r?r.count>d.length:!1,m=N.useMemo(()=>{const w=new Map;return d.map((x,b)=>{const S=w.get(x)??0;return w.set(x,S+1),{key:`${S}:${x}`,line:x,number:b+1}})},[d]),g=async()=>{await navigator.clipboard.writeText(d.join(`
386
- `)),f(!0),setTimeout(()=>f(!1),2e3)};return i?y.jsxs("div",{className:"border bg-card p-4",children:[y.jsx("div",{className:"mb-3 h-4 w-28 animate-pulse rounded bg-muted"}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-5/6 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-2/3 animate-pulse rounded bg-muted"})]})]}):a?y.jsx(qr,{icon:po,title:"Failed to load logs",description:a.message,action:y.jsx(Tn,{variant:"outline",onClick:()=>o(),children:"Retry"})}):y.jsxs("div",{className:"overflow-hidden border bg-card",children:[y.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2",children:[y.jsx("div",{className:"text-sm text-muted-foreground",children:d.length===0?"No logs recorded":`Showing ${d.length}${h?` of ${r==null?void 0:r.count}`:""} log lines`}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs(Tn,{variant:"outline",size:"sm",onClick:()=>o(),disabled:l,children:[y.jsx(Im,{className:be("mr-1.5 h-3.5 w-3.5",l&&"animate-spin")}),"Refresh"]}),y.jsxs(Tn,{variant:"outline",size:"sm",onClick:g,disabled:d.length===0,children:[u?y.jsx(pd,{className:"mr-1.5 h-3.5 w-3.5 text-status-success"}):y.jsx(H0,{className:"mr-1.5 h-3.5 w-3.5"}),"Copy"]})]})]}),d.length===0?y.jsx("div",{className:"flex h-40 items-center justify-center text-sm text-muted-foreground",children:"This job has no BullMQ log lines."}):y.jsx("div",{className:"max-h-[calc(100vh-480px)] min-h-[220px] overflow-auto bg-muted/20 p-4 font-mono text-xs leading-6",children:y.jsx("div",{children:m.map(w=>y.jsxs("div",{className:"flex gap-4",children:[y.jsx("span",{className:"w-10 shrink-0 select-none text-right text-muted-foreground",children:w.number}),y.jsx("span",{className:"whitespace-pre-wrap break-words text-foreground",children:w.line})]},w.key))})})]})}function kc({icon:e,label:t,children:n,mono:r}){return y.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",children:[y.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[y.jsx(e,{className:"h-4 w-4"}),t]}),y.jsx("div",{className:be(r&&"font-mono"),children:n})]})}function eSe({error:e,stacktrace:t,jobName:n,queueName:r}){const[i,a]=N.useState(!0),[o,l]=N.useState(!1),u=async()=>{const d=t?`${e}
387
-
388
- ${t.join(`
389
- `)}`:e;await navigator.clipboard.writeText(d),l(!0),setTimeout(()=>l(!1),2e3)},f=()=>{const d=t?`${e}
390
-
391
- ${t.join(`
392
- `)}`:e,h=`Debug this error from job "${n||"unknown"}" in queue "${r||"unknown"}":
393
-
394
- ${d}
395
-
396
- 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 y.jsxs("div",{className:"flex flex-col h-full overflow-hidden border border-status-error/30 bg-status-error/5",children:[y.jsxs("div",{className:"flex items-center justify-between border-b border-status-error/30 px-4 py-2 shrink-0",children:[y.jsx("span",{className:"font-medium text-status-error",children:e}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.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:[y.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:y.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"})}),y.jsx("span",{children:"Fix in Cursor"})]}),y.jsx("div",{className:"h-4 w-px bg-border"}),y.jsx("button",{type:"button",onClick:u,className:"rounded p-1.5 hover:bg-status-error/10",title:"Copy error",children:o?y.jsx(pd,{className:"h-4 w-4 text-status-success"}):y.jsx(H0,{className:"h-4 w-4 text-muted-foreground"})}),t&&t.length>0&&y.jsx("button",{type:"button",onClick:()=>a(!i),className:"rounded p-1.5 hover:bg-status-error/10",title:i?"Collapse":"Expand",children:y.jsx(F0,{className:be("h-4 w-4 text-muted-foreground transition-transform",i&&"rotate-180")})})]})]}),i&&t&&t.length>0&&y.jsx("div",{className:"flex-1 overflow-auto p-4 min-h-0",children:y.jsx("pre",{className:"font-mono text-xs text-muted-foreground",children:t.join(`
397
- `)})})]})}function tSe({job:e}){const[t,n]=N.useState({root:!0,attempt:!0}),{spans:r,timeRange:i}=N.useMemo(()=>{var m,g,w,x;const u=e.timestamp,f=e.finishedOn||e.processedOn||Date.now(),d=f-u,h={id:"root",label:e.name,icon:e.status==="completed"?Dm:e.status==="failed"?U0:rb,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:Li,iconColor:"text-muted-foreground",startTime:e.timestamp,endTime:e.processedOn,status:"waiting"})),e.processedOn){const b={id:"exec",label:"run()",icon:rb,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=b.children)==null||g.push({id:`log-${b.children.length}`,label:E.message,icon:Mce,iconColor:"text-blue-400",startTime:E.time||e.processedOn,status:"success",isLog:!0})}e.status==="failed"&&e.failedReason&&((w=b.children)==null||w.push({id:"error",label:e.failedReason,icon:po,iconColor:"text-status-error",startTime:e.finishedOn||e.processedOn,status:"error",isLog:!0})),(x=h.children)==null||x.push(b)}return{spans:[h],timeRange:{start:u,end:f,duration:d}}},[e]),a=u=>{n(f=>({...f,[u]:!f[u]}))},o=N.useMemo(()=>{const{start:u,duration:f}=i,d=[],h=5;for(let m=0;m<=h;m++){const g=u+f/h*m,w=(g-u)/f*100;d.push({position:w,label:wr(g-u)})}return d},[i]),l=(u,f=0)=>{var b;const d=u.children&&u.children.length>0,h=t[u.id]!==!1,m=u.icon,g=(u.startTime-i.start)/i.duration*100,w=u.endTime?(u.endTime-i.start)/i.duration*100:100,x=Math.max(w-g,.5);return y.jsxs(N.Fragment,{children:[y.jsxs("div",{className:"group flex min-h-[36px] items-center border-b border-border/50 hover:bg-muted/30",children:[y.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?y.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:y.jsx(jf,{className:be("h-3.5 w-3.5 text-muted-foreground transition-transform",h&&"rotate-90")})}):y.jsx("div",{className:"w-5 shrink-0"}),y.jsx(m,{className:be("h-4 w-4 shrink-0",u.iconColor)}),y.jsx("span",{className:be("truncate text-sm",u.isLog?"text-muted-foreground":"font-medium"),children:u.label}),u.badge&&y.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})]}),y.jsx("div",{className:"relative h-full flex-1 py-2 pr-4",children:u.isLog?y.jsx("div",{className:"absolute top-1/2 h-2 w-2 -translate-y-1/2 rounded-full bg-muted-foreground/40",style:{left:`${g}%`}}):y.jsx("div",{className:be("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:`${x}%`,minWidth:"2px"},children:x>8&&u.endTime&&y.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&&((b=u.children)==null?void 0:b.map(S=>l(S,f+1)))]},u.id)};return y.jsxs("div",{className:"flex flex-col border bg-card overflow-hidden h-full",children:[y.jsxs("div",{className:"flex border-b bg-muted/30 shrink-0",children:[y.jsx("div",{className:"w-[45%] shrink-0 flex items-center py-2 pr-4",style:{paddingLeft:"12px"},children:y.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Span"})}),y.jsx("div",{className:"relative flex-1 py-2 pr-4 flex items-center",children:o.map((u,f)=>y.jsx("span",{className:"absolute font-mono text-[10px] text-muted-foreground",style:{left:`${u.position}%`,transform:"translateX(-50%)"},children:u.label},f.toString()))})]}),y.jsx("div",{className:"flex-1 overflow-auto min-h-0",children:r.map(u=>l(u))})]})}function nSe({attemptsMade:e,maxAttempts:t,stacktraces:n,status:r}){return y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{className:"flex items-center gap-4 border bg-muted/30 px-4 py-3",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(sP,{className:"h-4 w-4 text-amber-500"}),y.jsx("span",{className:"font-medium",children:"Retry History"})]}),y.jsxs("div",{className:"text-sm text-muted-foreground",children:[e," of ",t," attempts"]}),y.jsx(go,{variant:r==="completed"?"default":"destructive",className:"ml-auto",children:r==="completed"?"Eventually succeeded":"All attempts failed"})]}),y.jsx("div",{className:"space-y-3",children:n.map((i,a)=>y.jsx(rSe,{attemptNumber:a+1,isLast:a===n.length-1,stacktrace:i,succeeded:r==="completed"&&a===n.length-1},a.toString()))})]})}function rSe({attemptNumber:e,isLast:t,stacktrace:n,succeeded:r}){const[i,a]=N.useState(t),o=n.split(`
398
- `)[0]||"Unknown error";return y.jsxs("div",{className:be("overflow-hidden border",r?"border-status-success/30 bg-status-success/5":"border-status-error/30 bg-status-error/5"),children:[y.jsxs("button",{type:"button",onClick:()=>a(!i),className:"flex w-full items-center gap-3 px-4 py-2.5 text-left",children:[y.jsx("div",{className:be("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}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsxs("span",{className:"text-sm font-medium",children:["Attempt ",e]}),r?y.jsx(go,{variant:"secondary",className:"bg-status-success/10 text-status-success text-[10px]",children:"Success"}):y.jsx(go,{variant:"secondary",className:"bg-status-error/10 text-status-error text-[10px]",children:"Failed"})]}),!r&&y.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o})]}),y.jsx(F0,{className:be("h-4 w-4 text-muted-foreground transition-transform",i&&"rotate-180")})]}),i&&!r&&y.jsx("div",{className:"border-t border-inherit px-4 py-3",children:y.jsx("pre",{className:"max-h-48 overflow-auto font-mono text-xs text-muted-foreground whitespace-pre-wrap",children:n})}),i&&r&&y.jsx("div",{className:"border-t border-inherit px-4 py-3 text-sm text-status-success",children:y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Dm,{className:"h-4 w-4"}),"Job completed successfully on this attempt"]})})]})}function iSe({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((x,b)=>{const S=b/(e.length-1)*o,E=l-(x-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],w={default:"stroke-chart-1",success:"stroke-chart-success",danger:"stroke-chart-error",warning:"stroke-chart-4"}[n];return y.jsxs("svg",{viewBox:`0 0 ${o} ${l}`,className:be("w-20 h-6",t),preserveAspectRatio:"none",children:[y.jsx("defs",{children:y.jsxs("pattern",{id:m,x:"0",y:"0",width:"4",height:"4",patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:"4",height:"4",className:be(g,"opacity-15")}),y.jsx("path",{d:"M0,0 L4,4 M-1,3 L3,7 M-1,-1 L5,5",className:w,strokeWidth:"0.75",opacity:"0.4"})]})}),y.jsx("polygon",{points:d,fill:`url(#${m})`}),y.jsx("path",{d:f,fill:"none",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:be("stroke-current",h)})]})}function aSe({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?y.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[y.jsx(y7,{className:"h-3 w-3 mr-0.5"}),"0%"]}):y.jsxs("span",{className:be("inline-flex items-center text-xs font-medium",o?"text-chart-success":"text-chart-error"),children:[i?y.jsx(g7,{className:"h-3 w-3 mr-0.5"}):y.jsx(m7,{className:"h-3 w-3 mr-0.5"}),Math.abs(r).toFixed(0),"%"]})}function Jv({title:e,value:t,subtitle:n,sparklineData:r,sparklineColor:i="default",trend:a,className:o,icon:l}){return y.jsxs("div",{className:be("border border-dashed bg-card p-4 flex flex-col gap-2",o),children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:e}),l&&y.jsx("span",{className:"text-muted-foreground",children:l})]}),y.jsxs("div",{className:"flex items-end justify-between gap-4",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:t}),n&&y.jsx("span",{className:"text-xs text-muted-foreground",children:n}),a&&y.jsx(aSe,{current:a.current,previous:a.previous,higherIsBetter:a.higherIsBetter})]}),r&&r.length>0&&y.jsx(iSe,{data:r,color:i})]})]})}var oSe=HY();const ci=vt(oSe);var MO,MF;function sSe(){if(MF)return MO;MF=1;function e(t){return t==null}return MO=e,MO}var lSe=sSe();const at=vt(lSe);var uSe=eX();const Tu=vt(uSe);var cSe=bd();const Ye=vt(cSe);var fSe=lr();const Ad=vt(fSe);var RO={exports:{}},yt={};/**
399
- * @license React
400
- * react-is.production.min.js
401
- *
402
- * Copyright (c) Facebook, Inc. and its affiliates.
403
- *
404
- * This source code is licensed under the MIT license found in the
405
- * LICENSE file in the root directory of this source tree.
406
- */var RF;function dSe(){if(RF)return yt;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"),w;w=Symbol.for("react.module.reference");function x(b){if(typeof b=="object"&&b!==null){var S=b.$$typeof;switch(S){case e:switch(b=b.type,b){case n:case i:case r:case f:case d:return b;default:switch(b=b&&b.$$typeof,b){case l:case o:case u:case m:case h:case a:return b;default:return S}}case t:return S}}}return yt.ContextConsumer=o,yt.ContextProvider=a,yt.Element=e,yt.ForwardRef=u,yt.Fragment=n,yt.Lazy=m,yt.Memo=h,yt.Portal=t,yt.Profiler=i,yt.StrictMode=r,yt.Suspense=f,yt.SuspenseList=d,yt.isAsyncMode=function(){return!1},yt.isConcurrentMode=function(){return!1},yt.isContextConsumer=function(b){return x(b)===o},yt.isContextProvider=function(b){return x(b)===a},yt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},yt.isForwardRef=function(b){return x(b)===u},yt.isFragment=function(b){return x(b)===n},yt.isLazy=function(b){return x(b)===m},yt.isMemo=function(b){return x(b)===h},yt.isPortal=function(b){return x(b)===t},yt.isProfiler=function(b){return x(b)===i},yt.isStrictMode=function(b){return x(b)===r},yt.isSuspense=function(b){return x(b)===f},yt.isSuspenseList=function(b){return x(b)===d},yt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===f||b===d||b===g||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===h||b.$$typeof===a||b.$$typeof===o||b.$$typeof===u||b.$$typeof===w||b.getModuleId!==void 0)},yt.typeOf=x,yt}var PF;function hSe(){return PF||(PF=1,RO.exports=dSe()),RO.exports}var pSe=hSe(),PO,kF;function ZX(){if(kF)return PO;kF=1;var e=To(),t=mi(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return PO=r,PO}var kO,DF;function mSe(){if(DF)return kO;DF=1;var e=ZX();function t(n){return e(n)&&n!=+n}return kO=t,kO}var gSe=mSe();const Td=vt(gSe);var vSe=ZX();const ySe=vt(vSe);var Ii=function(t){return t===0?0:t>0?1:-1},Ul=function(t){return Tu(t)&&t.indexOf("%")===t.length-1},_e=function(t){return ySe(t)&&!Td(t)},bSe=function(t){return at(t)},Cn=function(t){return _e(t)||Tu(t)},xSe=0,eg=function(t){var n=++xSe;return"".concat(t||"").concat(n)},Cu=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(!_e(t)&&!Tu(t))return r;var a;if(Ul(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return Td(a)&&(a=r),i&&a>n&&(a=n),a},bs=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},wSe=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},si=function(t,n){return _e(t)&&_e(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):ci(r,t))===n})}var SSe=function(t,n){return _e(t)&&_e(n)?t-n:Tu(t)&&Tu(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function of(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 zN(e){"@babel/helpers - typeof";return zN=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},zN(e)}var _Se=["viewBox","children"],ESe=["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"],IF=["points","pathLength"],DO={svg:_Se,polygon:IF,polyline:IF},l2=["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(N.isValidElement(t)&&(r=t.props),!Ad(r))return null;var i={};return Object.keys(r).forEach(function(a){l2.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},ASe=function(t,n,r){return function(i){return t(n,r,i),null}},_b=function(t,n,r){if(!Ad(t)||zN(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];l2.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=ASe(o,n,r))}),i},TSe=["children"],CSe=["children"];function LF(e,t){if(e==null)return{};var n=OSe(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 OSe(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){"@babel/helpers - typeof";return VN=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},VN(e)}var $F={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":""},BF=null,IO=null,u2=function e(t){if(t===BF&&Array.isArray(IO))return IO;var n=[];return N.Children.forEach(t,function(r){at(r)||(pSe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),IO=n,BF=t,n};function $i(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return oo(i)}):r=[oo(t)],u2(e).forEach(function(i){var a=ci(i,"type.displayName")||ci(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function Pr(e,t){var n=$i(e,t);return n&&n[0]}var qF=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!_e(r)||r<=0||!_e(i)||i<=0)},jSe=["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"],NSe=function(t){return t&&t.type&&Tu(t.type)&&jSe.indexOf(t.type)>=0},MSe=function(t){return t&&VN(t)==="object"&&"clipDot"in t},RSe=function(t,n,r,i){var a,o=(a=DO==null?void 0:DO[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!Ye(t)&&(i&&o.includes(n)||ESe.includes(n))||r&&l2.includes(n)},Je=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(N.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},FN=function e(t,n){if(t===n)return!0;var r=N.Children.count(t);if(r!==N.Children.count(n))return!1;if(r===0)return!0;if(r===1)return zF(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(!zF(a,o))return!1}return!0},zF=function(t,n){if(at(t)&&at(n))return!0;if(!at(t)&&!at(n)){var r=t.props||{},i=r.children,a=LF(r,TSe),o=n.props||{},l=o.children,u=LF(o,CSe);return i&&l?of(a,u)&&FN(i,l):!i&&!l?of(a,u):!1}return!1},VF=function(t,n){var r=[],i={};return u2(t).forEach(function(a,o){if(NSe(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},PSe=function(t){var n=t&&t.type;return n&&$F[n]?$F[n]:null},kSe=function(t,n){return u2(n).indexOf(t)},DSe=["children","width","height","viewBox","className","style","title","desc"];function UN(){return UN=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},UN.apply(this,arguments)}function ISe(e,t){if(e==null)return{};var n=LSe(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 LSe(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 HN(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=ISe(e,DSe),d=i||{width:n,height:r,x:0,y:0},h=ut("recharts-surface",a);return ie.createElement("svg",UN({},Je(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 $Se=["children","className"];function GN(){return GN=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},GN.apply(this,arguments)}function BSe(e,t){if(e==null)return{};var n=qSe(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 qSe(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=BSe(e,$Se),a=ut("recharts-layer",r);return ie.createElement("g",GN({className:a},Je(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]},LO,FF;function zSe(){if(FF)return LO;FF=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 LO=e,LO}var $O,UF;function VSe(){if(UF)return $O;UF=1;var e=zSe();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 $O=t,$O}var BO,HF;function FSe(){if(HF)return BO;HF=1;function e(t){return t.split("")}return BO=e,BO}var qO,GF;function USe(){if(GF)return qO;GF=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",w=f+"?",x="["+a+"]?",b="(?:"+g+"(?:"+[d,h,m].join("|")+")"+x+w+")*",S=x+w+b,E="(?:"+[d+l+"?",l,h,m,o].join("|")+")",_=RegExp(u+"(?="+u+")|"+E+S,"g");function A(T){return T.match(_)||[]}return qO=A,qO}var zO,KF;function HSe(){if(KF)return zO;KF=1;var e=FSe(),t=r2(),n=USe();function r(i){return t(i)?n(i):e(i)}return zO=r,zO}var VO,WF;function GSe(){if(WF)return VO;WF=1;var e=VSe(),t=r2(),n=HSe(),r=t2();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 VO=i,VO}var FO,YF;function KSe(){if(YF)return FO;YF=1;var e=GSe(),t=e("toUpperCase");return FO=t,FO}var WSe=KSe();const jx=vt(WSe);function $t(e){return function(){return e}}const JX=Math.cos,Eb=Math.sin,Gi=Math.sqrt,Ab=Math.PI,Nx=2*Ab,KN=Math.PI,WN=2*KN,Ll=1e-6,YSe=WN-Ll;function eQ(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function XSe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return eQ;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?eQ:XSe(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>Ll)if(!(Math.abs(h*u-f*d)>Ll)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let g=r-o,w=i-l,x=u*u+f*f,b=g*g+w*w,S=Math.sqrt(x),E=Math.sqrt(m),_=a*Math.tan((KN-Math.acos((x+m-b)/(2*S*E)))/2),A=_/E,T=_/S;Math.abs(A-1)>Ll&&this._append`L${t+A*d},${n+A*h}`,this._append`A${a},${a},0,0,${+(h*g>d*w)},${this._x1=t+T*u},${this._y1=n+T*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)>Ll||Math.abs(this._y1-d)>Ll)&&this._append`L${f},${d}`,r&&(m<0&&(m=m%WN+WN),m>YSe?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>Ll&&this._append`A${r},${r},0,${+(m>=KN)},${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 c2(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 f2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tQ(e){this._context=e}tQ.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 Mx(e){return new tQ(e)}function nQ(e){return e[0]}function rQ(e){return e[1]}function iQ(e,t){var n=$t(!0),r=null,i=Mx,a=null,o=c2(l);e=typeof e=="function"?e:e===void 0?nQ:$t(e),t=typeof t=="function"?t:t===void 0?rQ:$t(t);function l(u){var f,d=(u=f2(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:$t(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:$t(+u),l):t},l.defined=function(u){return arguments.length?(n=typeof u=="function"?u:$t(!!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 ey(e,t,n){var r=null,i=$t(!0),a=null,o=Mx,l=null,u=c2(f);e=typeof e=="function"?e:e===void 0?nQ:$t(+e),t=typeof t=="function"?t:$t(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?rQ:$t(+n);function f(h){var m,g,w,x=(h=f2(h)).length,b,S=!1,E,_=new Array(x),A=new Array(x);for(a==null&&(l=o(E=u())),m=0;m<=x;++m){if(!(m<x&&i(b=h[m],m,h))===S)if(S=!S)g=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),w=m-1;w>=g;--w)l.point(_[w],A[w]);l.lineEnd(),l.areaEnd()}S&&(_[m]=+e(b,m,h),A[m]=+t(b,m,h),l.point(r?+r(b,m,h):_[m],n?+n(b,m,h):A[m]))}if(E)return l=null,E+""||null}function d(){return iQ().defined(i).curve(o).context(a)}return f.x=function(h){return arguments.length?(e=typeof h=="function"?h:$t(+h),r=null,f):e},f.x0=function(h){return arguments.length?(e=typeof h=="function"?h:$t(+h),f):e},f.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:$t(+h),f):r},f.y=function(h){return arguments.length?(t=typeof h=="function"?h:$t(+h),n=null,f):t},f.y0=function(h){return arguments.length?(t=typeof h=="function"?h:$t(+h),f):t},f.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:$t(+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:$t(!!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 aQ{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 ZSe(e){return new aQ(e,!0)}function JSe(e){return new aQ(e,!1)}const d2={draw(e,t){const n=Gi(t/Ab);e.moveTo(n,0),e.arc(0,0,n,0,Nx)}},e_e={draw(e,t){const n=Gi(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()}},oQ=Gi(1/3),t_e=oQ*2,n_e={draw(e,t){const n=Gi(t/t_e),r=n*oQ;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},r_e={draw(e,t){const n=Gi(t),r=-n/2;e.rect(r,r,n,n)}},i_e=.8908130915292852,sQ=Eb(Ab/10)/Eb(7*Ab/10),a_e=Eb(Nx/10)*sQ,o_e=-JX(Nx/10)*sQ,s_e={draw(e,t){const n=Gi(t*i_e),r=a_e*n,i=o_e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=Nx*a/5,l=JX(o),u=Eb(o);e.lineTo(u*n,-l*n),e.lineTo(l*r-u*i,u*r+l*i)}e.closePath()}},UO=Gi(3),l_e={draw(e,t){const n=-Gi(t/(UO*3));e.moveTo(0,n*2),e.lineTo(-UO*n,-n),e.lineTo(UO*n,-n),e.closePath()}},ti=-.5,ni=Gi(3)/2,YN=1/Gi(12),u_e=(YN/2+1)*3,c_e={draw(e,t){const n=Gi(t/u_e),r=n/2,i=n*YN,a=r,o=n*YN+n,l=-a,u=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(ti*r-ni*i,ni*r+ti*i),e.lineTo(ti*a-ni*o,ni*a+ti*o),e.lineTo(ti*l-ni*u,ni*l+ti*u),e.lineTo(ti*r+ni*i,ti*i-ni*r),e.lineTo(ti*a+ni*o,ti*o-ni*a),e.lineTo(ti*l+ni*u,ti*u-ni*l),e.closePath()}};function f_e(e,t){let n=null,r=c2(i);e=typeof e=="function"?e:$t(e||d2),t=typeof t=="function"?t:$t(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:$t(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:$t(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function Tb(){}function Cb(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 lQ(e){this._context=e}lQ.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:Cb(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:Cb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function d_e(e){return new lQ(e)}function uQ(e){this._context=e}uQ.prototype={areaStart:Tb,areaEnd:Tb,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:Cb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function h_e(e){return new uQ(e)}function cQ(e){this._context=e}cQ.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:Cb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function p_e(e){return new cQ(e)}function fQ(e){this._context=e}fQ.prototype={areaStart:Tb,areaEnd:Tb,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 m_e(e){return new fQ(e)}function XF(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(XF(a)+XF(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function ZF(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function HO(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:HO(this,this._t0,ZF(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,HO(this,ZF(this,n=QF(this,e,t)),n);break;default:HO(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 dQ(e){this._context=new hQ(e)}(dQ.prototype=Object.create(Ob.prototype)).point=function(e,t){Ob.prototype.point.call(this,t,e)};function hQ(e){this._context=e}hQ.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 g_e(e){return new Ob(e)}function v_e(e){return new dQ(e)}function pQ(e){this._context=e}pQ.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=JF(e),i=JF(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 JF(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 y_e(e){return new pQ(e)}function Rx(e,t){this._context=e,this._t=t}Rx.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 b_e(e){return new Rx(e,.5)}function x_e(e){return new Rx(e,0)}function w_e(e){return new Rx(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 XN(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function S_e(e,t){return e[t]}function __e(e){const t=[];return t.key=e,t}function E_e(){var e=$t([]),t=XN,n=$f,r=S_e;function i(a){var o=Array.from(e.apply(this,arguments),__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=f2(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:$t(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:$t(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?XN:typeof a=="function"?a:$t(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??$f,i):n},i}function A_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 C_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,w=0;w<l;++w){var x=e[t[w]],b=x[r][1]||0,S=x[r-1][1]||0;g+=b-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 O_e=["type","size","sizeType"];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 e6(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 t6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e6(Object(n),!0).forEach(function(r){j_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j_e(e,t,n){return t=N_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N_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=P_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 P_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 mQ={symbolCircle:d2,symbolCross:e_e,symbolDiamond:n_e,symbolSquare:r_e,symbolStar:s_e,symbolTriangle:l_e,symbolWye:c_e},k_e=Math.PI/180,D_e=function(t){var n="symbol".concat(jx(t));return mQ[n]||d2},I_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*k_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}},L_e=function(t,n){mQ["symbol".concat(jx(t))]=n},h2=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,O_e),f=t6(t6({},u),{},{type:r,size:a,sizeType:l}),d=function(){var b=D_e(r),S=f_e().type(b).size(I_e(a,l,r));return S()},h=f.className,m=f.cx,g=f.cy,w=Je(f,!0);return m===+m&&g===+g&&a===+a?ie.createElement("path",QN({},w,{className:ut("recharts-symbols",h),transform:"translate(".concat(m,", ").concat(g,")"),d:d()})):null};h2.registerSymbol=L_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 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 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 $_e(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){Vp(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 B_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q_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,vQ(r.key),r)}}function z_e(e,t,n){return t&&q_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V_e(e,t,n){return t=jb(t),F_e(e,gQ()?Reflect.construct(t,n||[],jb(e).constructor):t.apply(e,n))}function F_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 U_e(e)}function U_e(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 jb(e){return jb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jb(e)}function H_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&&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 Vp(e,t,n){return t=vQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vQ(e){var t=G_e(e,"string");return Bf(t)=="symbol"?t:t+""}function G_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 ri=32,p2=(function(e){function t(){return B_e(this,t),V_e(this,t,arguments)}return H_e(t,e),z_e(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=ri/2,o=ri/6,l=ri/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:ri,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,`
407
- A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(a,`
408
- H`).concat(ri,"M").concat(2*l,",").concat(a,`
409
- 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(ri/8,"h").concat(ri,"v").concat(ri*3/4,"h").concat(-ri,"z"),className:"recharts-legend-icon"});if(ie.isValidElement(r.legendIcon)){var f=$_e({},r);return delete f.legendIcon,ie.cloneElement(r.legendIcon,f)}return ie.createElement(h2,{fill:u,cx:a,cy:a,size:ri,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:ri,height:ri},h={display:l==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(g,w){var x=g.formatter||u,b=ut(Vp(Vp({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",g.inactive));if(g.type==="none")return null;var S=Ye(g.value)?null:g.value;so(!Ye(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",ZN({className:b,style:h,key:"legend-item-".concat(w)},_b(r.props,g,w)),ie.createElement(HN,{width:o,height:o,viewBox:d,style:m},r.renderIcon(g)),ie.createElement("span",{className:"recharts-legend-item-text",style:{color:E}},x?x(S,g,w):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())}}])})(N.PureComponent);Vp(p2,"displayName","Legend");Vp(p2,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var GO,r6;function K_e(){if(r6)return GO;r6=1;var e=gi(),t=iX();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return GO=n,GO}var W_e=K_e();const i6=vt(W_e);function yQ(e,t,n){return t===!0?i6(e,n):Ye(t)?i6(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 Y_e=["ref"];function a6(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 Ga(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a6(Object(n),!0).forEach(function(r){Px(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o6(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,xQ(r.key),r)}}function Q_e(e,t,n){return t&&o6(e.prototype,t),n&&o6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z_e(e,t,n){return t=Nb(t),J_e(e,bQ()?Reflect.construct(t,n||[],Nb(e).constructor):t.apply(e,n))}function J_e(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 eEe(e)}function eEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bQ=function(){return!!e})()}function Nb(e){return Nb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nb(e)}function tEe(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&&eM(e,t)}function eM(e,t){return eM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},eM(e,t)}function Px(e,t,n){return t=xQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xQ(e){var t=nEe(e,"string");return qf(t)=="symbol"?t:t+""}function nEe(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 rEe(e,t){if(e==null)return{};var n=iEe(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 iEe(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 aEe(e){return e.value}function oEe(e,t){if(ie.isValidElement(e))return ie.cloneElement(e,t);if(typeof e=="function")return ie.createElement(e,t);t.ref;var n=rEe(t,Y_e);return ie.createElement(p2,n)}var s6=1,zs=(function(e){function t(){var n;X_e(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Z_e(this,t,[].concat(i)),Px(n,"lastBoundingBox",{width:-1,height:-1}),n}return tEe(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)>s6||Math.abs(i.height-this.lastBoundingBox.height)>s6)&&(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?Ga({},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 w=this.getBBoxSnapshot();m={top:((d||0)-w.height)/2}}else m=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Ga(Ga({},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=Ga(Ga({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}},oEe(a,Ga(Ga({},this.props),{},{payload:yQ(d,f,aEe)})))}}],[{key:"getWithHeight",value:function(r,i){var a=Ga(Ga({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&_e(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])})(N.PureComponent);Px(zs,"displayName","Legend");Px(zs,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var sEe=TX();const m2=vt(sEe);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 tM(){return tM=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},tM.apply(this,arguments)}function lEe(e,t){return dEe(e)||fEe(e,t)||cEe(e,t)||uEe()}function uEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
410
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cEe(e,t){if(e){if(typeof e=="string")return l6(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 l6(e,t)}}function l6(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 fEe(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 dEe(e){if(Array.isArray(e))return e}function u6(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 KO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u6(Object(n),!0).forEach(function(r){hEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hEe(e,t,n){return t=pEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pEe(e){var t=mEe(e,"string");return Fp(t)=="symbol"?t:t+""}function mEe(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 gEe(e){return Array.isArray(e)&&Cn(e[0])&&Cn(e[1])?e.join(" ~ "):e}var vEe=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,w=t.labelClassName,x=t.label,b=t.labelFormatter,S=t.accessibilityLayer,E=S===void 0?!1:S,_=function(){if(d&&d.length){var k={padding:0,margin:0},V=(m?m2(d,m):d).map(function(D,q){if(D.type==="none")return null;var L=KO({display:"block",paddingTop:4,paddingBottom:4,color:D.color||"#000"},l),z=D.formatter||h||gEe,H=D.value,Y=D.name,Q=H,U=Y;if(z&&Q!=null&&U!=null){var F=z(H,Y,D,q,d);if(Array.isArray(F)){var X=lEe(F,2);Q=X[0],U=X[1]}else Q=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"},Q),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=KO({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),T=KO({margin:0},f),O=!at(x),M=O?x:"",R=ut("recharts-default-tooltip",g),P=ut("recharts-tooltip-label",w);O&&b&&d!==void 0&&d!==null&&(M=b(x,d));var $=E?{role:"status","aria-live":"assertive"}:{};return ie.createElement("div",tM({className:R,style:A},$),ie.createElement("p",{className:P,style:T},ie.isValidElement(M)?M:"".concat(M)),_())};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 ty(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=bEe(e,"string");return Up(t)=="symbol"?t:t+""}function bEe(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",xEe={visibility:"hidden"};function wEe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ut(qh,ty(ty(ty(ty({},"".concat(qh,"-right"),_e(n)&&t&&_e(t.x)&&n>=t.x),"".concat(qh,"-left"),_e(n)&&t&&_e(t.x)&&n<t.x),"".concat(qh,"-bottom"),_e(r)&&t&&_e(t.y)&&r>=t.y),"".concat(qh,"-top"),_e(r)&&t&&_e(t.y)&&r<t.y))}function c6(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&&_e(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 w=h+l,x=u[r]+f;return w>x?Math.max(d,u[r]):Math.max(h,u[r])}function SEe(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 _Ee(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=c6({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),h=c6({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),f=SEe({translateX:d,translateY:h,useTranslate3d:l})):f=xEe,{cssProperties:f,cssClasses:wEe({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 f6(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 d6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f6(Object(n),!0).forEach(function(r){rM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AEe(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,SQ(r.key),r)}}function TEe(e,t,n){return t&&AEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CEe(e,t,n){return t=Mb(t),OEe(e,wQ()?Reflect.construct(t,n||[],Mb(e).constructor):t.apply(e,n))}function OEe(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 jEe(e)}function jEe(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 Mb(e){return Mb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mb(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&&nM(e,t)}function nM(e,t){return nM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},nM(e,t)}function rM(e,t,n){return t=SQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SQ(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 h6=1,REe=(function(e){function t(){var n;EEe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=CEe(this,t,[].concat(i)),rM(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),rM(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 NEe(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)>h6||Math.abs(r.height-this.state.lastBoundingBox.height)>h6)&&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,w=i.position,x=i.reverseDirection,b=i.useTranslate3d,S=i.viewBox,E=i.wrapperStyle,_=_Ee({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:g,position:w,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:S}),A=_.cssClasses,T=_.cssProperties,O=d6(d6({transition:m&&a?"transform ".concat(l,"ms ").concat(u):void 0},T),{},{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(R){r.wrapperNode=R}},f)}}])})(N.PureComponent),PEe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Cd={isSsr:PEe()};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 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 m6(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){g2(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 kEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DEe(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,EQ(r.key),r)}}function IEe(e,t,n){return t&&DEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LEe(e,t,n){return t=Rb(t),$Ee(e,_Q()?Reflect.construct(t,n||[],Rb(e).constructor):t.apply(e,n))}function $Ee(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 BEe(e)}function BEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _Q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_Q=function(){return!!e})()}function Rb(e){return Rb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Rb(e)}function qEe(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&&iM(e,t)}function iM(e,t){return iM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},iM(e,t)}function g2(e,t,n){return t=EQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EQ(e){var t=zEe(e,"string");return Vf(t)=="symbol"?t:t+""}function zEe(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 VEe(e){return e.dataKey}function FEe(e,t){return ie.isValidElement(e)?ie.cloneElement(e,t):typeof e=="function"?ie.createElement(e,t):ie.createElement(vEe,t)}var ji=(function(e){function t(){return kEe(this,t),LEe(this,t,arguments)}return qEe(t,e),IEe(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,w=i.payload,x=i.payloadUniqBy,b=i.position,S=i.reverseDirection,E=i.useTranslate3d,_=i.viewBox,A=i.wrapperStyle,T=w??[];h&&T.length&&(T=yQ(w.filter(function(M){return M.value!=null&&(M.hide!==!0||r.props.includeHidden)}),x,VEe));var O=T.length>0;return ie.createElement(REe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:m,active:a,coordinate:d,hasPayload:O,offset:g,position:b,reverseDirection:S,useTranslate3d:E,viewBox:_,wrapperStyle:A},FEe(f,m6(m6({},this.props),{},{payload:T})))}}])})(N.PureComponent);g2(ji,"displayName","Tooltip");g2(ji,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Cd.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 WO,g6;function UEe(){if(g6)return WO;g6=1;var e=lr(),t=EX(),n=dX(),r="Expected a function",i=Math.max,a=Math.min;function o(l,u,f){var d,h,m,g,w,x,b=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,b=V,g=l.apply(q,D),g}function T(V){return b=V,w=setTimeout(R,u),S?A(V):g}function O(V){var D=V-x,q=V-b,L=u-D;return E?a(L,m-q):L}function M(V){var D=V-x,q=V-b;return x===void 0||D>=u||D<0||E&&q>=m}function R(){var V=t();if(M(V))return P(V);w=setTimeout(R,O(V))}function P(V){return w=void 0,_&&d?A(V):(d=h=void 0,g)}function $(){w!==void 0&&clearTimeout(w),b=0,d=x=h=w=void 0}function I(){return w===void 0?g:P(t())}function k(){var V=t(),D=M(V);if(d=arguments,h=this,x=V,D){if(w===void 0)return T(x);if(E)return clearTimeout(w),w=setTimeout(R,u),A(x)}return w===void 0&&(w=setTimeout(R,u)),g}return k.cancel=$,k.flush=I,k}return WO=o,WO}var YO,v6;function HEe(){if(v6)return YO;v6=1;var e=UEe(),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 YO=r,YO}var GEe=HEe();const AQ=vt(GEe);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 y6(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 ny(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y6(Object(n),!0).forEach(function(r){KEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KEe(e,t,n){return t=WEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WEe(e){var t=YEe(e,"string");return Hp(t)=="symbol"?t:t+""}function YEe(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 XEe(e,t){return eAe(e)||JEe(e,t)||ZEe(e,t)||QEe()}function QEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
411
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZEe(e,t){if(e){if(typeof e=="string")return b6(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 b6(e,t)}}function b6(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 JEe(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 eAe(e){if(Array.isArray(e))return e}var tAe=N.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,w=e.debounce,x=w===void 0?0:w,b=e.id,S=e.className,E=e.onResize,_=e.style,A=_===void 0?{}:_,T=N.useRef(null),O=N.useRef();O.current=E,N.useImperativeHandle(t,function(){return Object.defineProperty(T.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),T.current},configurable:!0})});var M=N.useState({containerWidth:i.width,containerHeight:i.height}),R=XEe(M,2),P=R[0],$=R[1],I=N.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}})},[]);N.useEffect(function(){var V=function(Y){var Q,U=Y[0].contentRect,F=U.width,X=U.height;I(F,X),(Q=O.current)===null||Q===void 0||Q.call(O,F,X)};x>0&&(V=AQ(V,x,{trailing:!0,leading:!1}));var D=new ResizeObserver(V),q=T.current.getBoundingClientRect(),L=q.width,z=q.height;return I(L,z),D.observe(T.current),function(){D.disconnect()}},[I,x]);var k=N.useMemo(function(){var V=P.containerWidth,D=P.containerHeight;if(V<0||D<0)return null;so(Ul(o)||Ul(u),`The width(%s) and height(%s) are both fixed numbers,
412
- 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=Ul(o)?V:o,L=Ul(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,
413
- please check the style of container, or the props width(%s) and height(%s),
414
- or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
415
- 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)?N.cloneElement(H,ny({width:q,height:L},z?{style:ny({height:"100%",width:"100%",maxHeight:L,maxWidth:q},H.props.style)}:{})):H})},[n,g,u,m,h,d,P,o]);return ie.createElement("div",{id:b?"".concat(b):void 0,className:ut("recharts-responsive-container",S),style:ny(ny({},A),{},{width:o,height:u,minWidth:d,minHeight:h,maxHeight:m}),ref:T},k)}),TQ=function(t){return null};TQ.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 x6(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 aM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x6(Object(n),!0).forEach(function(r){nAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nAe(e,t,n){return t=rAe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rAe(e){var t=iAe(e,"string");return Gp(t)=="symbol"?t:t+""}function iAe(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 Dc={widthCache:{},cacheCount:0},aAe=2e3,oAe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},w6="recharts_measurement_span";function sAe(e){var t=aM({},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||Cd.isSsr)return{width:0,height:0};var r=sAe(n),i=JSON.stringify({text:t,copyStyle:r});if(Dc.widthCache[i])return Dc.widthCache[i];try{var a=document.getElementById(w6);a||(a=document.createElement("span"),a.setAttribute("id",w6),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=aM(aM({},oAe),r);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return Dc.widthCache[i]=u,++Dc.cacheCount>aAe&&(Dc.cacheCount=0,Dc.widthCache={}),u}catch{return{width:0,height:0}}},lAe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Kp(e){"@babel/helpers - typeof";return Kp=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},Kp(e)}function Pb(e,t){return dAe(e)||fAe(e,t)||cAe(e,t)||uAe()}function uAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
416
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cAe(e,t){if(e){if(typeof e=="string")return S6(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 S6(e,t)}}function S6(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 fAe(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 dAe(e){if(Array.isArray(e))return e}function hAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _6(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,mAe(r.key),r)}}function pAe(e,t,n){return t&&_6(e.prototype,t),n&&_6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mAe(e){var t=gAe(e,"string");return Kp(t)=="symbol"?t:t+""}function gAe(e,t){if(Kp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var E6=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,A6=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,vAe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,yAe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,CQ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},bAe=Object.keys(CQ),Gc="NaN";function xAe(e,t){return e*CQ[t]}var ry=(function(){function e(t,n){hAe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!vAe.test(n)&&(this.num=NaN,this.unit=""),bAe.includes(n)&&(this.num=xAe(t,n),this.unit="px")}return pAe(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=yAe.exec(n))!==null&&r!==void 0?r:[],a=Pb(i,3),o=a[1],l=a[2];return new e(parseFloat(o),l??"")}}])})();function OQ(e){if(e.includes(Gc))return Gc;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=E6.exec(t))!==null&&n!==void 0?n:[],i=Pb(r,4),a=i[1],o=i[2],l=i[3],u=ry.parse(a??""),f=ry.parse(l??""),d=o==="*"?u.multiply(f):u.divide(f);if(d.isNaN())return Gc;t=t.replace(E6,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,m=(h=A6.exec(t))!==null&&h!==void 0?h:[],g=Pb(m,4),w=g[1],x=g[2],b=g[3],S=ry.parse(w??""),E=ry.parse(b??""),_=x==="+"?S.add(E):S.subtract(E);if(_.isNaN())return Gc;t=t.replace(A6,_.toString())}return t}var T6=/\(([^()]*)\)/;function wAe(e){for(var t=e;t.includes("(");){var n=T6.exec(t),r=Pb(n,2),i=r[1];t=t.replace(T6,OQ(i))}return t}function SAe(e){var t=e.replace(/\s+/g,"");return t=wAe(t),t=OQ(t),t}function _Ae(e){try{return SAe(e)}catch{return Gc}}function XO(e){var t=_Ae(e.slice(5,-1));return t===Gc?"":t}var EAe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],AAe=["dx","dy","angle","className","breakAll"];function oM(){return oM=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},oM.apply(this,arguments)}function C6(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 O6(e,t){return NAe(e)||jAe(e,t)||OAe(e,t)||CAe()}function CAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
417
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OAe(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 jAe(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 NAe(e){if(Array.isArray(e))return e}var jQ=/[ \f\n\r\t\v\u2028\u2029]+/,NQ=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];at(n)||(r?a=n.toString().split(""):a=n.toString().split(jQ));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=_e(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,Q=L[L.length-1];if(Q&&(i==null||a||Q.width+Y+r<Number(i)))Q.words.push(H),Q.width+=Y+r;else{var U={words:[H],width:Y};L.push(U)}return L},[])},g=m(n),w=function(q){return q.reduce(function(L,z){return L.width>z.width?L:z})};if(!d)return g;for(var x="…",b=function(q){var L=h.slice(0,q),z=NQ({breakAll:f,style:u,children:L+x}).wordsWithComputedWidth,H=m(z),Y=H.length>o||w(H).width>Number(i);return[Y,H]},S=0,E=h.length-1,_=0,A;S<=E&&_<=h.length-1;){var T=Math.floor((S+E)/2),O=T-1,M=b(O),R=O6(M,2),P=R[0],$=R[1],I=b(T),k=O6(I,1),V=k[0];if(!P&&!V&&(S=T+1),P&&V&&(E=T-1),!P&&V){A=$;break}_++}return A||g},N6=function(t){var n=at(t)?[]:t.toString().split(jQ);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)&&!Cd.isSsr){var u,f,d=NQ({breakAll:o,children:i,style:a});if(d){var h=d.wordsWithComputedWidth,m=d.spaceWidth;u=h,f=m}else return N6(i);return MAe({breakAll:o,children:i,maxLines:l,style:a},u,f,n,r)}return N6(i)},M6="#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,w=t.verticalAnchor,x=w===void 0?"end":w,b=t.fill,S=b===void 0?M6:b,E=C6(t,EAe),_=N.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,T=E.dy,O=E.angle,M=E.className,R=E.breakAll,P=C6(E,AAe);if(!Cn(r)||!Cn(a))return null;var $=r+(_e(A)?A:0),I=a+(_e(T)?T:0),k;switch(x){case"start":k=XO("calc(".concat(f,")"));break;case"middle":k=XO("calc(".concat((_.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:k=XO("calc(".concat(_.length-1," * -").concat(l,")"));break}var V=[];if(h){var D=_[0].width,q=E.width;V.push("scale(".concat((_e(q)?q/D:1)/D,")"))}return O&&V.push("rotate(".concat(O,", ").concat($,", ").concat(I,")")),V.length&&(P.transform=V.join(" ")),ie.createElement("text",oM({},Je(P,!0),{x:$,y:I,className:ut("recharts-text",M),textAnchor:g,fill:S.includes("url")?M6:S}),_.map(function(L,z){var H=L.words.join(R?"":" ");return ie.createElement("tspan",{x:$,dy:z===0?k:l,key:"".concat(H,"-").concat(z)},H)}))};function Vs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function PAe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function v2(e){let t,n,r;e.length!==2?(t=Vs,n=(l,u)=>Vs(e(l),u),r=(l,u)=>e(l)-u):(t=e===Vs||e===PAe?e:kAe,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 kAe(){return 0}function MQ(e){return e===null?NaN:+e}function*DAe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const IAe=v2(Vs),tg=IAe.right;v2(MQ).center;class R6 extends Map{constructor(t,n=BAe){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(P6(this,t))}has(t){return super.has(P6(this,t))}set(t,n){return super.set(LAe(this,t),n)}delete(t){return super.delete($Ae(this,t))}}function P6({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function LAe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function $Ae({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function BAe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function qAe(e=Vs){if(e===Vs)return RQ;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 RQ(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const zAe=Math.sqrt(50),VAe=Math.sqrt(10),FAe=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>=zAe?10:a>=VAe?5:a>=FAe?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 sM(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 lM(e,t,n){return t=+t,e=+e,n=+n,Db(e,t,n)[2]}function uM(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?lM(t,e,n):lM(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function k6(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function D6(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function PQ(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?RQ:qAe(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)),w=Math.min(r,Math.floor(t+(u-f)*h/u+m));PQ(e,t,g,w,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 UAe(e,t,n){if(e=Float64Array.from(DAe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return D6(e);if(t>=1)return k6(e);var r,i=(r-1)*t,a=Math.floor(i),o=k6(PQ(e,a).subarray(0,a+1)),l=D6(e.subarray(a+1));return o+(l-o)*(i-a)}}function HAe(e,t,n=MQ){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 GAe(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 yi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Oo(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 cM=Symbol("implicit");function y2(){var e=new R6,t=[],n=[],r=cM;function i(a){let o=e.get(a);if(o===void 0){if(r!==cM)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 R6;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 y2(t,n).unknown(r)},yi.apply(i,arguments),i}function Wp(){var e=y2().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,w=g?i:r,x=g?r:i;a=(x-w)/Math.max(1,m-u+f*2),l&&(a=Math.floor(a)),w+=(x-w-a*(m-u))*d,o=a*(1-u),l&&(w=Math.round(w),o=Math.round(o));var b=GAe(m).map(function(S){return w+a*S});return n(g?b.reverse():b)}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 Wp(t(),[r,i]).round(l).paddingInner(u).paddingOuter(f).align(d)},yi.apply(h(),arguments)}function kQ(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return kQ(t())},e}function cp(){return kQ(Wp.apply(null,arguments).paddingInner(1))}function KAe(e){return function(){return e}}function Ib(e){return+e}var I6=[0,1];function rr(e){return e}function fM(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:KAe(isNaN(t)?NaN:.5)}function WAe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function YAe(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=fM(i,r),a=n(o,a)):(r=fM(r,i),a=n(a,o)),function(l){return a(r(l))}}function XAe(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]=fM(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(l){var u=tg(e,l,1,r)-1;return a[u](i[u](l))}}function ng(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function kx(){var e=I6,t=I6,n=ao,r,i,a,o=rr,l,u,f;function d(){var m=Math.min(e.length,t.length);return o!==rr&&(o=WAe(e[0],e[m-1])),l=m>2?XAe:YAe,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),Mi)))(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=EP,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 b2(){return kx()(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 ZAe(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 JAe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var eTe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yp(e){if(!(t=eTe.exec(e)))throw new Error("invalid format: "+e);var t;return new x2({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=x2.prototype;function x2(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+""}x2.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 tTe(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 nTe(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 L6(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 $6={"%":(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)=>L6(e*100,t),r:L6,s:nTe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function B6(e){return e}var q6=Array.prototype.map,z6=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function rTe(e){var t=e.grouping===void 0||e.thousands===void 0?B6:ZAe(q6.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?B6:JAe(q6.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,w=h.align,x=h.sign,b=h.symbol,S=h.zero,E=h.width,_=h.comma,A=h.precision,T=h.trim,O=h.type;O==="n"?(_=!0,O="g"):$6[O]||(A===void 0&&(A=12),T=!0,O="g"),(S||g==="0"&&w==="=")&&(S=!0,g="0",w="=");var M=(m&&m.prefix!==void 0?m.prefix:"")+(b==="$"?n:b==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),R=(b==="$"?r:/[%p]/.test(O)?o:"")+(m&&m.suffix!==void 0?m.suffix:""),P=$6[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=M,D=R,q,L,z;if(O==="c")D=P(k)+D,k="";else{k=+k;var H=k<0||1/k<0;if(k=isNaN(k)?u:P(Math.abs(k),A),T&&(k=tTe(k)),H&&+k==0&&x!=="+"&&(H=!1),V=(H?x==="("?x:l:x==="-"||x==="("?"":x)+V,D=(O==="s"&&!isNaN(k)&&$b!==void 0?z6[8+$b/3]:"")+D+(H&&x==="("?")":""),$){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,Q=Y<E?new Array(E-Y+1).join(g):"";switch(_&&S&&(k=t(Q+k,Q.length?E-D.length:1/0),Q=""),w){case"<":k=V+k+D+Q;break;case"=":k=V+Q+k+D;break;case"^":k=Q.slice(0,Y=Q.length>>1)+V+k+D+Q.slice(Y);break;default:k=Q+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,w=Math.pow(10,-g),x=f((h=Yp(h),h.type="f",h),{suffix:z6[8+g/3]});return function(b){return x(w*b)}}return{format:f,formatPrefix:d}}var iy,w2,DQ;iTe({thousands:",",grouping:[3],currency:["$",""]});function iTe(e){return iy=rTe(e),w2=iy.format,DQ=iy.formatPrefix,iy}function aTe(e){return Math.max(0,-Ff(Math.abs(e)))}function oTe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ff(t)/3)))*3-Ff(Math.abs(e)))}function sTe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ff(t)-Ff(e))+1}function IQ(e,t,n,r){var i=uM(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=oTe(i,o))&&(r.precision=a),DQ(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=sTe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=aTe(i))&&(r.precision=a-(r.type==="%")*2);break}}return w2(r)}function il(e){var t=e.domain;return e.ticks=function(n){var r=t();return sM(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return IQ(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=lM(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=b2();return e.copy=function(){return ng(e,Bb())},yi.apply(e,arguments),il(e)}function LQ(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 LQ(e).unknown(t)},e=arguments.length?Array.from(e,Ib):[0,1],il(n)}function $Q(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 V6(e){return Math.log(e)}function F6(e){return Math.exp(e)}function lTe(e){return-Math.log(-e)}function uTe(e){return-Math.exp(-e)}function cTe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function fTe(e){return e===10?cTe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function dTe(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 U6(e){return(t,n)=>-e(-t,n)}function S2(e){const t=e(V6,F6),n=t.domain;let r=10,i,a;function o(){return i=dTe(r),a=fTe(r),n()[0]<0?(i=U6(i),a=U6(a),e(lTe,uTe)):e(V6,F6),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),w,x;const b=l==null?10:+l;let S=[];if(!(r%1)&&g-m<b){if(m=Math.floor(m),g=Math.ceil(g),f>0){for(;m<=g;++m)for(w=1;w<r;++w)if(x=m<0?w/a(-m):w*a(m),!(x<f)){if(x>d)break;S.push(x)}}else for(;m<=g;++m)for(w=r-1;w>=1;--w)if(x=m>0?w/a(-m):w*a(m),!(x<f)){if(x>d)break;S.push(x)}S.length*2<b&&(S=sM(f,d,b))}else S=sM(m,g,Math.min(g-m,b)).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=w2(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($Q(n(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function BQ(){const e=S2(kx()).domain([1,10]);return e.copy=()=>ng(e,BQ()).base(e.base()),yi.apply(e,arguments),e}function H6(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function G6(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function _2(e){var t=1,n=e(H6(t),G6(t));return n.constant=function(r){return arguments.length?e(H6(t=+r),G6(t)):t},il(n)}function qQ(){var e=_2(kx());return e.copy=function(){return ng(e,qQ()).constant(e.constant())},yi.apply(e,arguments)}function K6(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function hTe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function pTe(e){return e<0?-e*e:e*e}function E2(e){var t=e(rr,rr),n=1;function r(){return n===1?e(rr,rr):n===.5?e(hTe,pTe):e(K6(n),K6(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},il(t)}function A2(){var e=E2(kx());return e.copy=function(){return ng(e,A2()).exponent(e.exponent())},yi.apply(e,arguments),e}function mTe(){return A2.apply(null,arguments).exponent(.5)}function W6(e){return Math.sign(e)*e*e}function gTe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function zQ(){var e=b2(),t=[0,1],n=!1,r;function i(a){var o=gTe(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(W6(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(W6)),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 zQ(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},yi.apply(i,arguments),il(i)}function VQ(){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]=HAe(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?r:t[tg(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(Vs),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 VQ().domain(e).range(t).unknown(r)},yi.apply(a,arguments)}function FQ(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[tg(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 FQ().domain([e,t]).range(i).unknown(a)},yi.apply(il(o),arguments)}function UQ(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[tg(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 UQ().domain(e).range(t).unknown(n)},yi.apply(i,arguments)}const QO=new Date,ZO=new Date;function On(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=>On(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)=>(QO.setTime(+a),ZO.setTime(+o),e(QO),e(ZO),Math.floor(n(QO,ZO))),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=On(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);qb.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?On(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,li=to*60,no=li*60,vo=no*24,T2=vo*7,Y6=vo*30,JO=vo*365,Hl=On(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*to)},(e,t)=>(t-e)/to,e=>e.getUTCSeconds());Hl.range;const C2=On(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*to)},(e,t)=>{e.setTime(+e+t*li)},(e,t)=>(t-e)/li,e=>e.getMinutes());C2.range;const O2=On(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*li)},(e,t)=>(t-e)/li,e=>e.getUTCMinutes());O2.range;const j2=On(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*to-e.getMinutes()*li)},(e,t)=>{e.setTime(+e+t*no)},(e,t)=>(t-e)/no,e=>e.getHours());j2.range;const N2=On(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*no)},(e,t)=>(t-e)/no,e=>e.getUTCHours());N2.range;const rg=On(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*li)/vo,e=>e.getDate()-1);rg.range;const Dx=On(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vo,e=>e.getUTCDate()-1);Dx.range;const HQ=On(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/vo,e=>Math.floor(e/vo));HQ.range;function Bu(e){return On(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())*li)/T2)}const Ix=Bu(0),zb=Bu(1),vTe=Bu(2),yTe=Bu(3),Uf=Bu(4),bTe=Bu(5),xTe=Bu(6);Ix.range;zb.range;vTe.range;yTe.range;Uf.range;bTe.range;xTe.range;function qu(e){return On(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)/T2)}const Lx=qu(0),Vb=qu(1),wTe=qu(2),STe=qu(3),Hf=qu(4),_Te=qu(5),ETe=qu(6);Lx.range;Vb.range;wTe.range;STe.range;Hf.range;_Te.range;ETe.range;const M2=On(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());M2.range;const R2=On(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());R2.range;const yo=On(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());yo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:On(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)});yo.range;const bo=On(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());bo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:On(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)});bo.range;function GQ(e,t,n,r,i,a){const o=[[Hl,1,to],[Hl,5,5*to],[Hl,15,15*to],[Hl,30,30*to],[a,1,li],[a,5,5*li],[a,15,15*li],[a,30,30*li],[i,1,no],[i,3,3*no],[i,6,6*no],[i,12,12*no],[r,1,vo],[r,2,2*vo],[n,1,T2],[t,1,Y6],[t,3,3*Y6],[e,1,JO]];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),w=g?g.range(f,+d+1):[];return m?w.reverse():w}function u(f,d,h){const m=Math.abs(d-f)/h,g=v2(([,,b])=>b).right(o,m);if(g===o.length)return e.every(uM(f/JO,d/JO,h));if(g===0)return qb.every(Math.max(uM(f,d,h),1));const[w,x]=o[m/o[g-1][2]<o[g][2]/m?g-1:g];return w.every(x)}return[l,u]}const[ATe,TTe]=GQ(bo,R2,Lx,HQ,N2,O2),[CTe,OTe]=GQ(yo,M2,Ix,rg,j2,C2);function ej(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 tj(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 jTe(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),w=Uh(o),x=Fh(l),b=Uh(l),S=Fh(u),E=Uh(u),_={a:z,A:H,b:Y,B:Q,c:null,d:tU,e:tU,f:ZTe,g:lCe,G:cCe,H:YTe,I:XTe,j:QTe,L:KQ,m:JTe,M:eCe,p:U,q:F,Q:iU,s:aU,S:tCe,u:nCe,U:rCe,V:iCe,w:aCe,W:oCe,x:null,X:null,y:sCe,Y:uCe,Z:fCe,"%":rU},A={a:X,A:W,b:G,B:Z,c:null,d:nU,e:nU,f:mCe,g:ACe,G:CCe,H:dCe,I:hCe,j:pCe,L:YQ,m:gCe,M:vCe,p:J,q:re,Q:iU,s:aU,S:yCe,u:bCe,U:xCe,V:wCe,w:SCe,W:_Ce,x:null,X:null,y:ECe,Y:TCe,Z:OCe,"%":rU},T={a:$,A:I,b:k,B:V,c:D,d:J6,e:J6,f:HTe,g:Z6,G:Q6,H:eU,I:eU,j:zTe,L:UTe,m:qTe,M:VTe,p:P,q:BTe,Q:KTe,s:WTe,S:FTe,u:kTe,U:DTe,V:ITe,w:PTe,W:LTe,x:q,X:L,y:Z6,Y:Q6,Z:$Te,"%":GTe};_.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,xe=0,we=ne.length,Te,Ee,tt;for(he instanceof Date||(he=new Date(+he));++ye<we;)ne.charCodeAt(ye)===37&&(oe.push(ne.slice(xe,ye)),(Ee=X6[Te=ne.charAt(++ye)])!=null?Te=ne.charAt(++ye):Ee=Te==="e"?" ":"0",(tt=fe[Te])&&(Te=tt(he,Ee)),oe.push(Te),xe=ye+1);return oe.push(ne.slice(xe,ye)),oe.join("")}}function M(ne,fe){return function(he){var oe=Vh(1900,void 0,1),ye=R(oe,ne,he+="",0),xe,we;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?(xe=tj(Vh(oe.y,0,1)),we=xe.getUTCDay(),xe=we>4||we===0?Vb.ceil(xe):Vb(xe),xe=Dx.offset(xe,(oe.V-1)*7),oe.y=xe.getUTCFullYear(),oe.m=xe.getUTCMonth(),oe.d=xe.getUTCDate()+(oe.w+6)%7):(xe=ej(Vh(oe.y,0,1)),we=xe.getDay(),xe=we>4||we===0?zb.ceil(xe):zb(xe),xe=rg.offset(xe,(oe.V-1)*7),oe.y=xe.getFullYear(),oe.m=xe.getMonth(),oe.d=xe.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),we="Z"in oe?tj(Vh(oe.y,0,1)).getUTCDay():ej(Vh(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(we+5)%7:oe.w+oe.U*7-(we+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,tj(oe)):ej(oe)}}function R(ne,fe,he,oe){for(var ye=0,xe=fe.length,we=he.length,Te,Ee;ye<xe;){if(oe>=we)return-1;if(Te=fe.charCodeAt(ye++),Te===37){if(Te=fe.charAt(ye++),Ee=T[Te in X6?fe.charAt(ye++):Te],!Ee||(oe=Ee(ne,he,oe))<0)return-1}else if(Te!=he.charCodeAt(oe++))return-1}return oe}function P(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=w.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=x.exec(fe.slice(he));return oe?(ne.m=b.get(oe[0].toLowerCase()),he+oe[0].length):-1}function D(ne,fe,he){return R(ne,t,fe,he)}function q(ne,fe,he){return R(ne,n,fe,he)}function L(ne,fe,he){return R(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 Q(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 W(ne){return a[ne.getUTCDay()]}function G(ne){return u[ne.getUTCMonth()]}function Z(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=M(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=M(ne+="",!0);return fe.toString=function(){return ne},fe}}}var X6={"-":"",_:" ",0:"0"},kn=/^\s*\d+/,NTe=/^%/,MTe=/[\\^$*+?|[\]().{}]/g;function mt(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 RTe(e){return e.replace(MTe,"\\$&")}function Fh(e){return new RegExp("^(?:"+e.map(RTe).join("|")+")","i")}function Uh(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function PTe(e,t,n){var r=kn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function kTe(e,t,n){var r=kn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function DTe(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ITe(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function LTe(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Q6(e,t,n){var r=kn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Z6(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function $Te(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 BTe(e,t,n){var r=kn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function qTe(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function J6(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function zTe(e,t,n){var r=kn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function eU(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function VTe(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function FTe(e,t,n){var r=kn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function UTe(e,t,n){var r=kn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function HTe(e,t,n){var r=kn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function GTe(e,t,n){var r=NTe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function KTe(e,t,n){var r=kn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function WTe(e,t,n){var r=kn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function tU(e,t){return mt(e.getDate(),t,2)}function YTe(e,t){return mt(e.getHours(),t,2)}function XTe(e,t){return mt(e.getHours()%12||12,t,2)}function QTe(e,t){return mt(1+rg.count(yo(e),e),t,3)}function KQ(e,t){return mt(e.getMilliseconds(),t,3)}function ZTe(e,t){return KQ(e,t)+"000"}function JTe(e,t){return mt(e.getMonth()+1,t,2)}function eCe(e,t){return mt(e.getMinutes(),t,2)}function tCe(e,t){return mt(e.getSeconds(),t,2)}function nCe(e){var t=e.getDay();return t===0?7:t}function rCe(e,t){return mt(Ix.count(yo(e)-1,e),t,2)}function WQ(e){var t=e.getDay();return t>=4||t===0?Uf(e):Uf.ceil(e)}function iCe(e,t){return e=WQ(e),mt(Uf.count(yo(e),e)+(yo(e).getDay()===4),t,2)}function aCe(e){return e.getDay()}function oCe(e,t){return mt(zb.count(yo(e)-1,e),t,2)}function sCe(e,t){return mt(e.getFullYear()%100,t,2)}function lCe(e,t){return e=WQ(e),mt(e.getFullYear()%100,t,2)}function uCe(e,t){return mt(e.getFullYear()%1e4,t,4)}function cCe(e,t){var n=e.getDay();return e=n>=4||n===0?Uf(e):Uf.ceil(e),mt(e.getFullYear()%1e4,t,4)}function fCe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+mt(t/60|0,"0",2)+mt(t%60,"0",2)}function nU(e,t){return mt(e.getUTCDate(),t,2)}function dCe(e,t){return mt(e.getUTCHours(),t,2)}function hCe(e,t){return mt(e.getUTCHours()%12||12,t,2)}function pCe(e,t){return mt(1+Dx.count(bo(e),e),t,3)}function YQ(e,t){return mt(e.getUTCMilliseconds(),t,3)}function mCe(e,t){return YQ(e,t)+"000"}function gCe(e,t){return mt(e.getUTCMonth()+1,t,2)}function vCe(e,t){return mt(e.getUTCMinutes(),t,2)}function yCe(e,t){return mt(e.getUTCSeconds(),t,2)}function bCe(e){var t=e.getUTCDay();return t===0?7:t}function xCe(e,t){return mt(Lx.count(bo(e)-1,e),t,2)}function XQ(e){var t=e.getUTCDay();return t>=4||t===0?Hf(e):Hf.ceil(e)}function wCe(e,t){return e=XQ(e),mt(Hf.count(bo(e),e)+(bo(e).getUTCDay()===4),t,2)}function SCe(e){return e.getUTCDay()}function _Ce(e,t){return mt(Vb.count(bo(e)-1,e),t,2)}function ECe(e,t){return mt(e.getUTCFullYear()%100,t,2)}function ACe(e,t){return e=XQ(e),mt(e.getUTCFullYear()%100,t,2)}function TCe(e,t){return mt(e.getUTCFullYear()%1e4,t,4)}function CCe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Hf(e):Hf.ceil(e),mt(e.getUTCFullYear()%1e4,t,4)}function OCe(){return"+0000"}function rU(){return"%"}function iU(e){return+e}function aU(e){return Math.floor(+e/1e3)}var Ic,QQ,ZQ;jCe({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 jCe(e){return Ic=jTe(e),QQ=Ic.format,Ic.parse,ZQ=Ic.utcFormat,Ic.utcParse,Ic}function NCe(e){return new Date(e)}function MCe(e){return e instanceof Date?+e:+new Date(+e)}function P2(e,t,n,r,i,a,o,l,u,f){var d=b2(),h=d.invert,m=d.domain,g=f(".%L"),w=f(":%S"),x=f("%I:%M"),b=f("%I %p"),S=f("%a %d"),E=f("%b %d"),_=f("%B"),A=f("%Y");function T(O){return(u(O)<O?g:l(O)<O?w:o(O)<O?x:a(O)<O?b: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,MCe)):m().map(NCe)},d.ticks=function(O){var M=m();return e(M[0],M[M.length-1],O??10)},d.tickFormat=function(O,M){return M==null?T:f(M)},d.nice=function(O){var M=m();return(!O||typeof O.range!="function")&&(O=t(M[0],M[M.length-1],O??10)),O?m($Q(M,O)):d},d.copy=function(){return ng(d,P2(e,t,n,r,i,a,o,l,u,f))},d}function RCe(){return yi.apply(P2(CTe,OTe,yo,M2,Ix,rg,j2,C2,Hl,QQ).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function PCe(){return yi.apply(P2(ATe,TTe,bo,R2,Lx,Dx,N2,O2,Hl,ZQ).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function $x(){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,w;return arguments.length?([g,w]=m,o=h(g,w),f):[o(0),o(1)]}}return f.range=d(ao),f.rangeRound=d(EP),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 al(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function JQ(){var e=il($x()(rr));return e.copy=function(){return al(e,JQ())},Oo.apply(e,arguments)}function eZ(){var e=S2($x()).domain([1,10]);return e.copy=function(){return al(e,eZ()).base(e.base())},Oo.apply(e,arguments)}function tZ(){var e=_2($x());return e.copy=function(){return al(e,tZ()).constant(e.constant())},Oo.apply(e,arguments)}function k2(){var e=E2($x());return e.copy=function(){return al(e,k2()).exponent(e.exponent())},Oo.apply(e,arguments)}function kCe(){return k2.apply(null,arguments).exponent(.5)}function nZ(){var e=[],t=rr;function n(r){if(r!=null&&!isNaN(r=+r))return t((tg(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(Vs),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)=>UAe(e,a/r))},n.copy=function(){return nZ(t).domain(e)},Oo.apply(n,arguments)}function Bx(){var e=0,t=.5,n=1,r=1,i,a,o,l,u,f=rr,d,h=!1,m;function g(x){return isNaN(x=+x)?m:(x=.5+((x=+d(x))-a)*(r*x<r*a?l:u),f(h?Math.max(0,Math.min(1,x)):x))}g.domain=function(x){return arguments.length?([e,t,n]=x,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(x){return arguments.length?(h=!!x,g):h},g.interpolator=function(x){return arguments.length?(f=x,g):f};function w(x){return function(b){var S,E,_;return arguments.length?([S,E,_]=b,f=zme(x,[S,E,_]),g):[f(0),f(.5),f(1)]}}return g.range=w(ao),g.rangeRound=w(EP),g.unknown=function(x){return arguments.length?(m=x,g):m},function(x){return d=x,i=x(e),a=x(t),o=x(n),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,g}}function rZ(){var e=il(Bx()(rr));return e.copy=function(){return al(e,rZ())},Oo.apply(e,arguments)}function iZ(){var e=S2(Bx()).domain([.1,1,10]);return e.copy=function(){return al(e,iZ()).base(e.base())},Oo.apply(e,arguments)}function aZ(){var e=_2(Bx());return e.copy=function(){return al(e,aZ()).constant(e.constant())},Oo.apply(e,arguments)}function D2(){var e=E2(Bx());return e.copy=function(){return al(e,D2()).exponent(e.exponent())},Oo.apply(e,arguments)}function DCe(){return D2.apply(null,arguments).exponent(.5)}const oU=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Wp,scaleDiverging:rZ,scaleDivergingLog:iZ,scaleDivergingPow:D2,scaleDivergingSqrt:DCe,scaleDivergingSymlog:aZ,scaleIdentity:LQ,scaleImplicit:cM,scaleLinear:Bb,scaleLog:BQ,scaleOrdinal:y2,scalePoint:cp,scalePow:A2,scaleQuantile:VQ,scaleQuantize:FQ,scaleRadial:zQ,scaleSequential:JQ,scaleSequentialLog:eZ,scaleSequentialPow:k2,scaleSequentialQuantile:nZ,scaleSequentialSqrt:kCe,scaleSequentialSymlog:tZ,scaleSqrt:mTe,scaleSymlog:qQ,scaleThreshold:UQ,scaleTime:RCe,scaleUtc:PCe,tickFormat:IQ},Symbol.toStringTag,{value:"Module"}));var ICe=yX();const Ps=vt(ICe);var LCe=_X();const qx=vt(LCe);var nj,sU;function $Ce(){if(sU)return nj;sU=1;var e=Ax(),t=n2();function n(r,i){return e(t(r,i),1)}return nj=n,nj}var BCe=$Ce();const qCe=vt(BCe);var rj,lU;function zCe(){if(lU)return rj;lU=1;var e=JP();function t(n,r){return e(n,r)}return rj=t,rj}var VCe=zCe();const Xp=vt(VCe);var Od=1e9,FCe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},L2,Wt=!0,di="[DecimalError] ",cu=di+"Invalid argument: ",I2=di+"Exponent out of range: ",jd=Math.floor,$l=Math.pow,UCe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$r,Rn=1e7,Ft=7,oZ=9007199254740991,Fb=jd(oZ/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 kt(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($r))throw Error(di+"NaN");if(n.s<1)throw Error(di+(n.s?"NaN":"-Infinity"));return n.eq($r)?new r(0):(Wt=!1,t=lo(Qp(n,a),Qp(e,a),a),Wt=!0,kt(t,i))};Oe.minus=Oe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uZ(t,e):sZ(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(di+"NaN");return n.s?(Wt=!1,t=lo(n,e,0,1).times(e),Wt=!0,n.minus(t)):kt(new r(n),i)};Oe.naturalExponential=Oe.exp=function(){return lZ(this)};Oe.naturalLogarithm=Oe.ln=function(){return Qp(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?sZ(t,e):uZ(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(cu+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(di+"NaN")}for(e=vn(l),Wt=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=la(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),la(a.d).slice(0,o)===(t=la(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(kt(a,n+1,0),a.times(a).eq(l)){r=a;break}}else if(t!="9999")break;o+=4}return Wt=!0,kt(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%Rn|0,t=l/Rn|0;a[i]=(a[i]+t)%Rn|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,Wt?kt(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:(ga(e,0,Od),t===void 0?t=r.rounding:ga(t,0,8),kt(n,e+vn(n)+1,t))};Oe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Ou(r,!0):(ga(e,0,Od),t===void 0?t=i.rounding:ga(t,0,8),r=kt(new i(r),e+1,t),n=Ou(r,!0,e+1)),n};Oe.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Ou(i):(ga(e,0,Od),t===void 0?t=a.rounding:ga(t,0,8),r=kt(new a(i),e+vn(i)+1,t),n=Ou(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 kt(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($r);if(l=new u(l),!l.s){if(e.s<1)throw Error(di+"Infinity");return l}if(l.eq($r))return l;if(r=u.precision,e.eq($r))return kt(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=l.s,o){if((n=d<0?-d:d)<=oZ){for(i=new u($r),t=Math.ceil(r/Ft+4),Wt=!1;n%2&&(i=i.times(l),cU(i.d,t)),n=jd(n/2),n!==0;)l=l.times(l),cU(l.d,t);return Wt=!0,e.s<0?new u($r).div(i):kt(i,r)}}else if(a<0)throw Error(di+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,Wt=!1,i=e.times(Qp(l,r+f)),Wt=!0,i=lZ(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=Ou(i,n<=a.toExpNeg||n>=a.toExpPos)):(ga(e,1,Od),t===void 0?t=a.rounding:ga(t,0,8),i=kt(new a(i),e,t),n=vn(i),r=Ou(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):(ga(e,1,Od),t===void 0?t=r.rounding:ga(t,0,8)),kt(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 Ou(e,t<=n.toExpNeg||t>=n.toExpPos)};function sZ(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?kt(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)/Rn|0,u[a]%=Rn;for(n&&(u.unshift(n),++i),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=i,Wt?kt(t,h):t}function ga(e,t,n){if(e!==~~e||e<t||e>n)throw Error(cu+e)}function la(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+=vs(n)),a+=r;o=e[t],r=o+"",n=Ft-r.length,n&&(a+=vs(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%Rn|0,o=a/Rn|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*Rn+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,w,x,b,S,E,_,A,T,O,M,R,P=r.constructor,$=r.s==i.s?1:-1,I=r.d,k=i.d;if(!r.s)return new P(r);if(!i.s)throw Error(di+"Division by zero");for(u=r.e-i.e,M=k.length,T=I.length,g=new P($),w=g.d=[],f=0;k[f]==(I[f]||0);)++f;if(k[f]>(I[f]||0)&&--u,a==null?E=a=P.precision:o?E=a+(vn(r)-vn(i))+1:E=a,E<0)return new P(0);if(E=E/Ft+2|0,f=0,M==1)for(d=0,k=k[0],E++;(f<T||d)&&E--;f++)_=d*Rn+(I[f]||0),w[f]=_/k|0,d=_%k|0;else{for(d=Rn/(k[0]+1)|0,d>1&&(k=e(k,d),I=e(I,d),M=k.length,T=I.length),A=M,x=I.slice(0,M),b=x.length;b<M;)x[b++]=0;R=k.slice(),R.unshift(0),O=k[0],k[1]>=Rn/2&&++O;do d=0,l=t(k,x,M,b),l<0?(S=x[0],M!=b&&(S=S*Rn+(x[1]||0)),d=S/O|0,d>1?(d>=Rn&&(d=Rn-1),h=e(k,d),m=h.length,b=x.length,l=t(h,x,m,b),l==1&&(d--,n(h,M<m?R:k,m))):(d==0&&(l=d=1),h=k.slice()),m=h.length,m<b&&h.unshift(0),n(x,h,b),l==-1&&(b=x.length,l=t(k,x,M,b),l<1&&(d++,n(x,M<b?R:k,b))),b=x.length):l===0&&(d++,x=[0]),w[f++]=d,l&&x[0]?x[b++]=I[A]||0:(x=[I[A]],b=1);while((A++<T||x[0]!==void 0)&&E--)}return w[0]||w.shift(),g.e=u,kt(g,o?a+vn(g)+1:a)}})();function lZ(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(I2+vn(e));if(!e.s)return new d($r);for(Wt=!1,l=h,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(r=Math.log($l(2,f))/Math.LN10*2+5|0,l+=r,n=i=a=new d($r),d.precision=l;;){if(i=kt(i.times(e),l),n=n.times(++u),o=a.plus(lo(i,n,l)),la(o.d).slice(0,l)===la(a.d).slice(0,l)){for(;f--;)a=kt(a.times(a),l);return d.precision=h,t==null?(Wt=!0,kt(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 ij(e,t,n){if(t>e.LN10.sd())throw Wt=!0,n&&(e.precision=n),Error(di+"LN10 precision limit exceeded");return kt(new e(e.LN10),t)}function vs(e){for(var t="";e--;)t+="0";return t}function Qp(e,t){var n,r,i,a,o,l,u,f,d,h=1,m=10,g=e,w=g.d,x=g.constructor,b=x.precision;if(g.s<1)throw Error(di+(g.s?"NaN":"-Infinity"));if(g.eq($r))return new x(0);if(t==null?(Wt=!1,f=b):f=t,g.eq(10))return t==null&&(Wt=!0),ij(x,f);if(f+=m,x.precision=f,n=la(w),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=la(g.d),r=n.charAt(0),h++;a=vn(g),r>1?(g=new x("0."+n),a++):g=new x(r+"."+n.slice(1))}else return u=ij(x,f+2,b).times(a+""),g=Qp(new x(r+"."+n.slice(1)),f-m).plus(u),x.precision=b,t==null?(Wt=!0,kt(g,b)):g;for(l=o=g=lo(g.minus($r),g.plus($r),f),d=kt(g.times(g),f),i=3;;){if(o=kt(o.times(d),f),u=l.plus(lo(o,new x(i),f)),la(u.d).slice(0,f)===la(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(ij(x,f+2,b).times(a+""))),l=lo(l,new x(h),f),x.precision=b,t==null?(Wt=!0,kt(l,b)):l;l=u,i+=2}}function uU(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(I2+n)}else e.s=0,e.e=0,e.d=[0];return e}function kt(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=$l(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/$l(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]=$l(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=$l(10,Ft-r),h[d]=i>0?(f/$l(10,o-i)%$l(10,i)|0)*a:0),u)for(;;)if(d==0){(h[0]+=a)==Rn&&(h[0]=1,++e.e);break}else{if(h[d]+=a,h[d]!=Rn)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(I2+vn(e));return e}function uZ(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?kt(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]=Rn-1;--u[a],u[i]+=Rn}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?kt(t,g):t):new m(0)}function Ou(e,t,n){var r,i=vn(e),a=la(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+vs(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+vs(-i-1)+a,n&&(r=n-o)>0&&(a+=vs(r))):i>=o?(a+=vs(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+vs(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=vs(r))),e.s<0?"-"+a:a}function cU(e,t){if(e.length>t)return e.length=t,!0}function cZ(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(cu+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 uU(o,a.toString())}else if(typeof a!="string")throw Error(cu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,UCe.test(a))uU(o,a);else throw Error(cu+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=cZ,i.config=i.set=HCe,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 HCe(e){if(!e||typeof e!="object")throw Error(di+"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(cu+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(cu+n+": "+r);return this}var L2=cZ(FCe);$r=new L2(1);const Nt=L2;function GCe(e){return XCe(e)||YCe(e)||WCe(e)||KCe()}function KCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
418
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WCe(e,t){if(e){if(typeof e=="string")return dM(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 dM(e,t)}}function YCe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function XCe(e){if(Array.isArray(e))return dM(e)}function dM(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 QCe=function(t){return t},fZ={},dZ=function(t){return t===fZ},fU=function(t){return function n(){return arguments.length===0||arguments.length===1&&dZ(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},ZCe=function e(t,n){return t===1?n:fU(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!==fZ}).length;return o>=t?n.apply(void 0,i):e(t-o,fU(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 dZ(h)?u.shift():h});return n.apply(void 0,GCe(d).concat(u))}))})},zx=function(t){return ZCe(t.length,t)},hM=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},JCe=zx(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),eOe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return QCe;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))}},pM=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},hZ=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 tOe(e){var t;return e===0?t=1:t=Math.floor(new Nt(e).abs().log(10).toNumber())+1,t}function nOe(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 rOe=zx(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),iOe=zx(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),aOe=zx(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Vx={rangeStep:nOe,getDigitCount:tOe,interpolateNumber:rOe,uninterpolateNumber:iOe,uninterpolateTruncation:aOe};function mM(e){return lOe(e)||sOe(e)||pZ(e)||oOe()}function oOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
419
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sOe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function lOe(e){if(Array.isArray(e))return gM(e)}function Zp(e,t){return fOe(e)||cOe(e,t)||pZ(e,t)||uOe()}function uOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
420
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pZ(e,t){if(e){if(typeof e=="string")return gM(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 gM(e,t)}}function gM(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 cOe(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 fOe(e){if(Array.isArray(e))return e}function mZ(e){var t=Zp(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function gZ(e,t,n){if(e.lte(0))return new Nt(0);var r=Vx.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 dOe(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(Vx.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=eOe(JCe(function(u){return i.add(new Nt(u-o).mul(r)).toNumber()}),hM);return l(0,t)}function vZ(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=gZ(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?vZ(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 hOe(e){var t=Zp(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=mZ([n,r]),u=Zp(l,2),f=u[0],d=u[1];if(f===-1/0||d===1/0){var h=d===1/0?[f].concat(mM(hM(0,i-1).map(function(){return 1/0}))):[].concat(mM(hM(0,i-1).map(function(){return-1/0})),[d]);return n>r?pM(h):h}if(f===d)return dOe(f,i,a);var m=vZ(f,d,o,a),g=m.step,w=m.tickMin,x=m.tickMax,b=Vx.rangeStep(w,x.add(new Nt(.1).mul(g)),g);return n>r?pM(b):b}function pOe(e,t){var n=Zp(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=mZ([r,i]),l=Zp(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=gZ(new Nt(f).sub(u).div(d-1),a,0),m=[].concat(mM(Vx.rangeStep(new Nt(u),new Nt(f).sub(new Nt(.99).mul(h)),h)),[f]);return r>i?pM(m):m}var mOe=hZ(hOe),gOe=hZ(pOe),vOe="Invariant failed";function ju(e,t){throw new Error(vOe)}var yOe=["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 bOe(e,t){return _Oe(e)||SOe(e,t)||wOe(e,t)||xOe()}function xOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
421
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wOe(e,t){if(e){if(typeof e=="string")return dU(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 dU(e,t)}}function dU(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 SOe(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 _Oe(e){if(Array.isArray(e))return e}function EOe(e,t){if(e==null)return{};var n=AOe(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 AOe(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 COe(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 OOe(e,t,n){return t&&COe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jOe(e,t,n){return t=Hb(t),NOe(e,yZ()?Reflect.construct(t,n||[],Hb(e).constructor):t.apply(e,n))}function NOe(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 yZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yZ=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&&vM(e,t)}function vM(e,t){return vM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vM(e,t)}function bZ(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=POe(e,"string");return Gf(t)=="symbol"?t:t+""}function POe(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 Fx=(function(e){function t(){return TOe(this,t),jOe(this,t,arguments)}return ROe(t,e),OOe(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=EOe(r,yOe),g=Je(m,!1);this.props.direction==="x"&&d.type!=="number"&&ju();var w=u.map(function(x){var b=f(x,l),S=b.x,E=b.y,_=b.value,A=b.errorVal;if(!A)return null;var T=[],O,M;if(Array.isArray(A)){var R=bOe(A,2);O=R[0],M=R[1]}else O=M=A;if(a==="vertical"){var P=d.scale,$=E+i,I=$+o,k=$-o,V=P(_-O),D=P(_+M);T.push({x1:D,y1:I,x2:D,y2:k}),T.push({x1:V,y1:$,x2:D,y2:$}),T.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),Q=q(_+M);T.push({x1:z,y1:Q,x2:H,y2:Q}),T.push({x1:L,y1:Y,x2:L,y2:Q}),T.push({x1:z,y1:Y,x2:H,y2:Y})}return ie.createElement(Jt,Ub({className:"recharts-errorBar",key:"bar-".concat(T.map(function(U){return"".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))},g),T.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"},w)}}])})(ie.Component);bZ(Fx,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});bZ(Fx,"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 hU(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?hU(Object(n),!0).forEach(function(r){kOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kOe(e,t,n){return t=DOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DOe(e){var t=IOe(e,"string");return Jp(t)=="symbol"?t:t+""}function IOe(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 wZ=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Pr(n,zs);if(!o)return null;var l=zs.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,w=g.sectors||g.data||[];return d.concat(w.map(function(x){return{type:o.props.iconType||m.props.legendType,value:x.name,color:x.fill,payload:x}}))},[]):f=(r||[]).map(function(d){var h=d.item,m=h.type.defaultProps,g=m!==void 0?Pl(Pl({},m),h.props):{},w=g.dataKey,x=g.name,b=g.legendType,S=g.hide;return{inactive:S,dataKey:w,type:u.iconType||b||"square",color:$2(h),value:x||w,payload:g}}),Pl(Pl(Pl({},u),zs.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 pU(e){return qOe(e)||BOe(e)||$Oe(e)||LOe()}function LOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
422
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Oe(e,t){if(e){if(typeof e=="string")return yM(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 yM(e,t)}}function BOe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qOe(e){if(Array.isArray(e))return yM(e)}function yM(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 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 an(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){sf(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 sf(e,t,n){return t=zOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zOe(e){var t=VOe(e,"string");return em(t)=="symbol"?t:t+""}function VOe(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 at(e)||at(t)?n:Cn(t)?ci(e,t,n):Ye(t)?t(e):n}function fp(e,t,n,r){var i=qCe(e,function(l){return Ur(l,t)});if(n==="number"){var a=i.filter(function(l){return _e(l)||parseFloat(l)});return a.length?[qx(a),Ps(a)]:[1/0,-1/0]}var o=r?i.filter(function(l){return!at(l)}):i;return o.map(function(l){return Cn(l)||l instanceof Date?l:""})}var FOe=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(Ii(h-d)!==Ii(m-h)){var w=[];if(Ii(m-h)===Ii(u[1]-u[0])){g=m;var x=h+u[1]-u[0];w[0]=Math.min(x,(x+d)/2),w[1]=Math.max(x,(x+d)/2)}else{g=d;var b=m+u[1]-u[0];w[0]=Math.min(h,(b+h)/2),w[1]=Math.max(h,(b+h)/2)}var S=[Math.min(h,(g+h)/2),Math.max(h,(g+h)/2)];if(t>S[0]&&t<=S[1]||t>=w[0]&&t<=w[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},$2=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},UOe=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 w=d[h[m]],x=w.items,b=w.cateAxisId,S=x.filter(function(M){return oo(M.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,T=_[b];o[T]||(o[T]=[]);var O=at(A)?n:A;o[T].push({item:S[0],stackList:S.slice(1),barSize:at(O)?void 0:Cu(O,r,0)})}}return o},HOe=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=Cu(n,i,0,!0),d,h=[];if(o[0].barSize===+o[0].barSize){var m=!1,g=i/u,w=o.reduce(function(A,T){return A+T.barSize||0},0);w+=(u-1)*f,w>=i&&(w-=(u-1)*f,f=0),w>=i&&g>0&&(m=!0,g*=.9,w=u*g);var x=(i-w)/2>>0,b={offset:x-f,size:0};d=o.reduce(function(A,T){var O={item:T.item,position:{offset:b.offset+b.size+f,size:m?g:T.barSize}},M=[].concat(pU(A),[O]);return b=M[M.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(R){M.push({item:R,position:b})}),M},h)}else{var S=Cu(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,T,O){var M=[].concat(pU(A),[{item:T.item,position:{offset:S+(E+f)*O+(E-_)/2,size:_}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(R){M.push({item:R,position:M[M.length-1].position})}),M},h)}return d},GOe=function(t,n,r,i){var a=r.children,o=r.width,l=r.margin,u=o-(l.left||0)-(l.right||0),f=wZ({children:a,legendWidth:u});if(f){var d=i||{},h=d.width,m=d.height,g=f.align,w=f.verticalAlign,x=f.layout;if((x==="vertical"||x==="horizontal"&&w==="middle")&&g!=="center"&&_e(t[g]))return an(an({},t),{},sf({},g,t[g]+(h||0)));if((x==="horizontal"||x==="vertical"&&g==="center")&&w!=="middle"&&_e(t[w]))return an(an({},t),{},sf({},w,t[w]+(m||0)))}return t},KOe=function(t,n,r){return at(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},SZ=function(t,n,r,i,a){var o=n.props.children,l=$i(o,Fx).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(at(h))return f;var m=Array.isArray(h)?[qx(h),Ps(h)]:[h,h],g=u.reduce(function(w,x){var b=Ur(d,x,0),S=m[0]-Math.abs(Array.isArray(b)?b[0]:b),E=m[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(S,w[0]),Math.max(E,w[1])]},[1/0,-1/0]);return[Math.min(g[0],f[0]),Math.max(g[1],f[1])]},[1/0,-1/0])}return null},WOe=function(t,n,r,i,a){var o=n.map(function(l){return SZ(t,l,r,a,i)}).filter(function(l){return!at(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},_Z=function(t,n,r,i,a){var o=n.map(function(u){var f=u.props.dataKey;return r==="number"&&f&&SZ(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},[])},EZ=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},AZ=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?Ii(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!Td(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}})},aj=new WeakMap,ay=function(t,n){if(typeof n!="function")return t;aj.has(t)||aj.set(t,new WeakMap);var r=aj.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},YOe=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:Wp(),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:Wp(),realScaleType:"band"}:{scale:Bb(),realScaleType:"linear"};if(Tu(i)){var u="scale".concat(jx(i));return{scale:(oU[u]||cp)(),realScaleType:oU[u]?u:"point"}}return Ye(i)?{scale:i}:{scale:cp(),realScaleType:"point"}},gU=1e-4,XOe=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])-gU,o=Math.max(i[0],i[1])+gU,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},ZOe=function(t,n){if(!n||n.length!==2||!_e(n[0])||!_e(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(!_e(t[0])||t[0]<r)&&(a[0]=r),(!_e(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},JOe=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=Td(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])}},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;o<n;++o){var l=Td(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)}},tje={sign:JOe,expand:A_e,none:$f,silhouette:T_e,wiggle:C_e,positive:eje},nje=function(t,n,r){var i=n.map(function(l){return l.props.dataKey}),a=tje[r],o=E_e().keys(i).value(function(l,u){return+Ur(l,u,0)}).order(XN).offset(a);return o(t)},rje=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,w=(g=m.type)!==null&&g!==void 0&&g.defaultProps?an(an({},m.type.defaultProps),m.props):m.props,x=w.stackId,b=w.hide;if(b)return h;var S=w[r],E=h[S]||{hasStack:!1,stackGroups:{}};if(Cn(x)){var _=E.stackGroups[x]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(m),E.hasStack=!0,E.stackGroups[x]=_}else E.stackGroups[eg("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[m]};return an(an({},h),{},sf({},S,E))},u),d={};return Object.keys(f).reduce(function(h,m){var g=f[m];if(g.hasStack){var w={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(x,b){var S=g.stackGroups[b];return an(an({},x),{},sf({},b,{numericAxisId:r,cateAxisId:i,items:S.items,stackedData:nje(t,S.items,a)}))},w)}return an(an({},h),{},sf({},m,g))},d)},ije=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=mOe(f,a,l);return t.domain([qx(d),Ps(d)]),{niceTicks:d}}if(a&&i==="number"){var h=t.domain(),m=gOe(h,a,l);return{niceTicks:m}}return null};function vU(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&&!at(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,at(o)?t.dataKey:o);return at(u)?null:t.scale(u)}var yU=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 at(u)?null:n.scale(u)-a/2+i},aje=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]},oje=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},sje=function(t){return t.reduce(function(n,r){return[qx(r.concat([n[0]]).filter(_e)),Ps(r.concat([n[1]]).filter(_e))]},[1/0,-1/0])},TZ=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=sje(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})},bU=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,xU=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bM=function(t,n,r){if(Ye(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(_e(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(bU.test(t[0])){var a=+bU.exec(t[0])[1];i[0]=n[0]-a}else Ye(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(_e(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(xU.test(t[1])){var o=+xU.exec(t[1])[1];i[1]=n[1]+o}else Ye(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=m2(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},wU=function(t,n,r){return!t||!t.length||Xp(t,ci(r,"type.defaultProps.domain"))?n:t},CZ=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({},Je(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:$2(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 SU(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 _U(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SU(Object(n),!0).forEach(function(r){lje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lje(e,t,n){return t=uje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uje(e){var t=cje(e,"string");return tm(t)=="symbol"?t:t+""}function cje(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 Kb=Math.PI/180,fje=function(t){return t*180/Math.PI},zn=function(t,n,r,i){return{x:t+Math.cos(-Kb*i)*r,y:n+Math.sin(-Kb*i)*r}},dje=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))},hje=function(t,n){var r=t.x,i=t.y,a=n.cx,o=n.cy,l=dje({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:fje(f),angleInRadian:f}},pje=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}},mje=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},EU=function(t,n){var r=t.x,i=t.y,a=hje({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=pje(n),h=d.startAngle,m=d.endAngle,g=l,w;if(h<=m){for(;g>m;)g-=360;for(;g<h;)g+=360;w=g>=h&&g<=m}else{for(;g>h;)g-=360;for(;g<m;)g+=360;w=g>=m&&g<=h}return w?_U(_U({},n),{},{radius:o,angle:mje(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 gje=["offset"];function vje(e){return wje(e)||xje(e)||bje(e)||yje()}function yje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
423
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bje(e,t){if(e){if(typeof e=="string")return xM(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 xM(e,t)}}function xje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wje(e){if(Array.isArray(e))return xM(e)}function xM(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 Sje(e,t){if(e==null)return{};var n=_je(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 _je(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 AU(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?AU(Object(n),!0).forEach(function(r){Eje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eje(e,t,n){return t=Aje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aje(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 Cje=function(t){var n=t.value,r=t.formatter,i=at(t.children)?n:t.children;return Ye(r)?r(i):i},Oje=function(t,n){var r=Ii(n-t),i=Math.min(Math.abs(n-t),360);return r*i},jje=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,w=u.endAngle,x=u.clockWise,b=(h+m)/2,S=Oje(g,w),E=S>=0?1:-1,_,A;i==="insideStart"?(_=g+E*o,A=x):i==="insideEnd"?(_=w-E*o,A=!x):i==="end"&&(_=w+E*o,A=x),A=S<=0?A:!A;var T=zn(f,d,b,_),O=zn(f,d,b,_+(A?1:-1)*359),M="M".concat(T.x,",").concat(T.y,`
424
- A`).concat(b,",").concat(b,",0,1,").concat(A?0:1,`,
425
- `).concat(O.x,",").concat(O.y),R=at(t.id)?eg("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:R,d:M})),ie.createElement("textPath",{xlinkHref:"#".concat(R)},n))},Nje=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=zn(o,l,f+r,m),w=g.x,x=g.y;return{x:w,y:x,textAnchor:w>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var b=(u+f)/2,S=zn(o,l,b,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",w=h>0?"start":"end",x=f>=0?1:-1,b=x*i,S=x>0?"end":"start",E=x>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:w};return _n(_n({},A),r?{height:Math.max(r.y+r.height-(u+d),0),width:f}:{})}if(a==="left"){var T={x:l-b,y:u+d/2,textAnchor:S,verticalAnchor:"middle"};return _n(_n({},T),r?{width:Math.max(T.x-r.x,0),height:d}:{})}if(a==="right"){var O={x:l+f+b,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 M=r?{width:f,height:d}:{};return a==="insideLeft"?_n({x:l+b,y:u+d/2,textAnchor:E,verticalAnchor:"middle"},M):a==="insideRight"?_n({x:l+f-b,y:u+d/2,textAnchor:S,verticalAnchor:"middle"},M):a==="insideTop"?_n({x:l+f/2,y:u+m,textAnchor:"middle",verticalAnchor:w},M):a==="insideBottom"?_n({x:l+f/2,y:u+d-m,textAnchor:"middle",verticalAnchor:g},M):a==="insideTopLeft"?_n({x:l+b,y:u+m,textAnchor:E,verticalAnchor:w},M):a==="insideTopRight"?_n({x:l+f-b,y:u+m,textAnchor:S,verticalAnchor:w},M):a==="insideBottomLeft"?_n({x:l+b,y:u+d-m,textAnchor:E,verticalAnchor:g},M):a==="insideBottomRight"?_n({x:l+f-b,y:u+d-m,textAnchor:S,verticalAnchor:g},M):Ad(a)&&(_e(a.x)||Ul(a.x))&&(_e(a.y)||Ul(a.y))?_n({x:l+Cu(a.x,f),y:u+Cu(a.y,d),textAnchor:"end",verticalAnchor:"end"},M):_n({x:l+f/2,y:u+d/2,textAnchor:"middle",verticalAnchor:"middle"},M)},Rje=function(t){return"cx"in t&&_e(t.cx)};function Yn(e){var t=e.offset,n=t===void 0?5:t,r=Sje(e,gje),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||at(l)&&at(u)&&!N.isValidElement(f)&&!Ye(f))return null;if(N.isValidElement(f))return N.cloneElement(f,i);var g;if(Ye(f)){if(g=N.createElement(f,i),N.isValidElement(g))return g}else g=Cje(i);var w=Rje(a),x=Je(i,!0);if(w&&(o==="insideStart"||o==="insideEnd"||o==="end"))return jje(i,g,x);var b=w?Nje(i):Mje(i);return ie.createElement(kb,rm({className:ut("recharts-label",h)},x,b,{breakAll:m}),g)}Yn.displayName="Label";var OZ=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,w=t.left,x=t.width,b=t.height,S=t.clockWise,E=t.labelViewBox;if(E)return E;if(_e(x)&&_e(b)){if(_e(h)&&_e(m))return{x:h,y:m,width:x,height:b};if(_e(g)&&_e(w))return{x:g,y:w,width:x,height:b}}return _e(h)&&_e(m)?{x:h,y:m,width:0,height:0}:_e(n)&&_e(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:{}},Pje=function(t,n){return t?t===!0?ie.createElement(Yn,{key:"label-implicit",viewBox:n}):Cn(t)?ie.createElement(Yn,{key:"label-implicit",viewBox:n,value:t}):N.isValidElement(t)?t.type===Yn?N.cloneElement(t,{key:"label-implicit",viewBox:n}):ie.createElement(Yn,{key:"label-implicit",content:t,viewBox:n}):Ye(t)?ie.createElement(Yn,{key:"label-implicit",content:t,viewBox:n}):Ad(t)?ie.createElement(Yn,rm({viewBox:n},t,{key:"label-implicit"})):null:null},kje=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=OZ(t),o=$i(i,Yn).map(function(u,f){return N.cloneElement(u,{viewBox:n||a,key:"label-".concat(f)})});if(!r)return o;var l=Pje(t.label,n||a);return[l].concat(vje(o))};Yn.parseViewBox=OZ;Yn.renderCallByParent=kje;var Dje=gX();const Ije=vt(Dje);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 Lje=["valueAccessor"],$je=["data","dataKey","clockWise","id","textBreakAll"];function Bje(e){return Fje(e)||Vje(e)||zje(e)||qje()}function qje(){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 zje(e,t){if(e){if(typeof e=="string")return wM(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 wM(e,t)}}function Vje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fje(e){if(Array.isArray(e))return wM(e)}function wM(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 Wb(){return Wb=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},Wb.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 CU(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){Uje(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 Uje(e,t,n){return t=Hje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hje(e){var t=Gje(e,"string");return im(t)=="symbol"?t:t+""}function Gje(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 OU(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 Wje=function(t){return Array.isArray(t.value)?Ije(t.value):t.value};function Fs(e){var t=e.valueAccessor,n=t===void 0?Wje:t,r=OU(e,Lje),i=r.data,a=r.dataKey,o=r.clockWise,l=r.id,u=r.textBreakAll,f=OU(r,$je);return!i||!i.length?null:ie.createElement(Jt,{className:"recharts-label-list"},i.map(function(d,h){var m=at(a)?n(d,h):Ur(d&&d.payload,a),g=at(l)?{}:{id:"".concat(l,"-").concat(h)};return ie.createElement(Yn,Wb({},Je(d,!0),f,g,{parentViewBox:d.parentViewBox,value:m,textBreakAll:u,viewBox:Yn.parseViewBox(at(o)?d:CU(CU({},d),{},{clockWise:o})),key:"label-".concat(h),index:h}))}))}Fs.displayName="LabelList";function Yje(e,t){return e?e===!0?ie.createElement(Fs,{key:"labelList-implicit",data:t}):ie.isValidElement(e)||Ye(e)?ie.createElement(Fs,{key:"labelList-implicit",data:t,content:e}):Ad(e)?ie.createElement(Fs,Wb({data:t},e,{key:"labelList-implicit"})):null:null}function Xje(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=$i(r,Fs).map(function(o,l){return N.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return i;var a=Yje(e.label,t);return[a].concat(Bje(i))}Fs.renderCallByParent=Xje;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 SM(){return SM=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},SM.apply(this,arguments)}function jU(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?jU(Object(n),!0).forEach(function(r){Qje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qje(e,t,n){return t=Zje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zje(e){var t=Jje(e,"string");return am(t)=="symbol"?t:t+""}function Jje(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 eNe=function(t,n){var r=Ii(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},oy=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)/Kb,m=f?a:a+o*h,g=zn(n,r,d,m),w=zn(n,r,i,m),x=f?a-o*h:a,b=zn(n,r,d*Math.cos(h*Kb),x);return{center:g,circleTangency:w,lineTangency:b,theta:h}},jZ=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,l=t.endAngle,u=eNe(o,l),f=o+u,d=zn(n,r,a,o),h=zn(n,r,a,f),m="M ".concat(d.x,",").concat(d.y,`
427
- A `).concat(a,",").concat(a,`,0,
428
- `).concat(+(Math.abs(u)>180),",").concat(+(o>f),`,
429
- `).concat(h.x,",").concat(h.y,`
430
- `);if(i>0){var g=zn(n,r,i,o),w=zn(n,r,i,f);m+="L ".concat(w.x,",").concat(w.y,`
431
- A `).concat(i,",").concat(i,`,0,
432
- `).concat(+(Math.abs(u)>180),",").concat(+(o<=f),`,
433
- `).concat(g.x,",").concat(g.y," Z")}else m+="L ".concat(n,",").concat(r," Z");return m},tNe=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=Ii(d-f),m=oy({cx:n,cy:r,radius:a,angle:f,sign:h,cornerRadius:o,cornerIsExternal:u}),g=m.circleTangency,w=m.lineTangency,x=m.theta,b=oy({cx:n,cy:r,radius:a,angle:d,sign:-h,cornerRadius:o,cornerIsExternal:u}),S=b.circleTangency,E=b.lineTangency,_=b.theta,A=u?Math.abs(f-d):Math.abs(f-d)-x-_;if(A<0)return l?"M ".concat(w.x,",").concat(w.y,`
434
- a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
435
- a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
436
- `):jZ({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:f,endAngle:d});var T="M ".concat(w.x,",").concat(w.y,`
437
- A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(g.x,",").concat(g.y,`
438
- A`).concat(a,",").concat(a,",0,").concat(+(A>180),",").concat(+(h<0),",").concat(S.x,",").concat(S.y,`
439
- A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(E.x,",").concat(E.y,`
440
- `);if(i>0){var O=oy({cx:n,cy:r,radius:i,angle:f,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),M=O.circleTangency,R=O.lineTangency,P=O.theta,$=oy({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)-P-V;if(D<0&&o===0)return"".concat(T,"L").concat(n,",").concat(r,"Z");T+="L".concat(k.x,",").concat(k.y,`
441
- A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(I.x,",").concat(I.y,`
442
- A`).concat(i,",").concat(i,",0,").concat(+(D>180),",").concat(+(h>0),",").concat(M.x,",").concat(M.y,`
443
- A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(R.x,",").concat(R.y,"Z")}else T+="L".concat(n,",").concat(r,"Z");return T},nNe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},NZ=function(t){var n=NU(NU({},nNe),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),w=o-a,x=Cu(l,w,0,!0),b;return x>0&&Math.abs(d-h)<360?b=tNe({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(x,w/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:d,endAngle:h}):b=jZ({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:d,endAngle:h}),ie.createElement("path",SM({},Je(n,!0),{className:g,d:b,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 _M(){return _M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_M.apply(this,arguments)}function 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 RU(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){rNe(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 rNe(e,t,n){return t=iNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iNe(e){var t=aNe(e,"string");return om(t)=="symbol"?t:t+""}function aNe(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 PU={curveBasisClosed:h_e,curveBasisOpen:p_e,curveBasis:d_e,curveBumpX:ZSe,curveBumpY:JSe,curveLinearClosed:m_e,curveLinear:Mx,curveMonotoneX:g_e,curveMonotoneY:v_e,curveNatural:y_e,curveStep:b_e,curveStepAfter:w_e,curveStepBefore:x_e},sy=function(t){return t.x===+t.x&&t.y===+t.y},Hh=function(t){return t.x},Gh=function(t){return t.y},oNe=function(t,n){if(Ye(t))return t;var r="curve".concat(jx(t));return(r==="curveMonotone"||r==="curveBump")&&n?PU["".concat(r).concat(n==="vertical"?"Y":"X")]:PU[r]||Mx},sNe=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=oNe(r,l),h=f?a.filter(function(x){return sy(x)}):a,m;if(Array.isArray(o)){var g=f?o.filter(function(x){return sy(x)}):o,w=h.map(function(x,b){return RU(RU({},x),{},{base:g[b]})});return l==="vertical"?m=ey().y(Gh).x1(Hh).x0(function(x){return x.base.x}):m=ey().x(Hh).y1(Gh).y0(function(x){return x.base.y}),m.defined(sy).curve(d),m(w)}return l==="vertical"&&_e(o)?m=ey().y(Gh).x1(Hh).x0(o):_e(o)?m=ey().x(Hh).y1(Gh).y0(o):m=iQ().x(Hh).y(Gh),m.defined(sy).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?sNe(t):i;return N.createElement("path",_M({},Je(t,!1),Sb(t),{className:ut("recharts-curve",n),d:o,ref:a}))},oj={exports:{}},sj,kU;function lNe(){if(kU)return sj;kU=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return sj=e,sj}var lj,DU;function uNe(){if(DU)return lj;DU=1;var e=lNe();function t(){}function n(){}return n.resetWarningCache=t,lj=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},lj}var IU;function cNe(){return IU||(IU=1,oj.exports=uNe()()),oj.exports}var fNe=cNe();const bt=vt(fNe),{getOwnPropertyNames:dNe,getOwnPropertySymbols:hNe}=Object,{hasOwnProperty:pNe}=Object.prototype;function uj(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function ly(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 mNe(e){return e!=null?e[Symbol.toStringTag]:void 0}function LU(e){return dNe(e).concat(hNe(e))}const gNe=Object.hasOwn||((e,t)=>pNe.call(e,t));function zu(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const vNe="__v",yNe="__o",bNe="_owner",{getOwnPropertyDescriptor:$U,keys:BU}=Object;function xNe(e,t){return e.byteLength===t.byteLength&&Yb(new Uint8Array(e),new Uint8Array(t))}function wNe(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 SNe(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 _Ne(e,t){return zu(e.getTime(),t.getTime())}function ENe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ANe(e,t){return e===t}function qU(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=zu;function CNe(e,t,n){const r=BU(e);let i=r.length;if(BU(t).length!==i)return!1;for(;i-- >0;)if(!MZ(e,t,n,r[i]))return!1;return!0}function Kh(e,t,n){const r=LU(e);let i=r.length;if(LU(t).length!==i)return!1;let a,o,l;for(;i-- >0;)if(a=r[i],!MZ(e,t,n,a)||(o=$U(e,a),l=$U(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function ONe(e,t){return zu(e.valueOf(),t.valueOf())}function jNe(e,t){return e.source===t.source&&e.flags===t.flags}function zU(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 NNe(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 MZ(e,t,n,r){return(r===bNe||r===yNe||r===vNe)&&(e.$$typeof||t.$$typeof)?!0:gNe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const MNe="[object ArrayBuffer]",RNe="[object Arguments]",PNe="[object Boolean]",kNe="[object DataView]",DNe="[object Date]",INe="[object Error]",LNe="[object Map]",$Ne="[object Number]",BNe="[object Object]",qNe="[object RegExp]",zNe="[object Set]",VNe="[object String]",FNe={"[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},UNe="[object URL]",HNe=Object.prototype.toString;function GNe({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:w}){return function(b,S,E){if(b===S)return!0;if(b==null||S==null)return!1;const _=typeof b;if(_!==typeof S)return!1;if(_!=="object")return _==="number"?l(b,S,E):_==="function"?a(b,S,E):!1;const A=b.constructor;if(A!==S.constructor)return!1;if(A===Object)return u(b,S,E);if(Array.isArray(b))return t(b,S,E);if(A===Date)return r(b,S,E);if(A===RegExp)return d(b,S,E);if(A===Map)return o(b,S,E);if(A===Set)return h(b,S,E);const T=HNe.call(b);if(T===DNe)return r(b,S,E);if(T===qNe)return d(b,S,E);if(T===LNe)return o(b,S,E);if(T===zNe)return h(b,S,E);if(T===BNe)return typeof b.then!="function"&&typeof S.then!="function"&&u(b,S,E);if(T===UNe)return g(b,S,E);if(T===INe)return i(b,S,E);if(T===RNe)return u(b,S,E);if(FNe[T])return m(b,S,E);if(T===MNe)return e(b,S,E);if(T===kNe)return n(b,S,E);if(T===PNe||T===$Ne||T===VNe)return f(b,S,E);if(w){let O=w[T];if(!O){const M=mNe(b);M&&(O=w[M])}if(O)return O(b,S,E)}return!1}}function KNe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:xNe,areArraysEqual:n?Kh:wNe,areDataViewsEqual:SNe,areDatesEqual:_Ne,areErrorsEqual:ENe,areFunctionsEqual:ANe,areMapsEqual:n?uj(qU,Kh):qU,areNumbersEqual:TNe,areObjectsEqual:n?Kh:CNe,arePrimitiveWrappersEqual:ONe,areRegExpsEqual:jNe,areSetsEqual:n?uj(zU,Kh):zU,areTypedArraysEqual:n?uj(Yb,Kh):Yb,areUrlsEqual:NNe,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=ly(r.areArraysEqual),a=ly(r.areMapsEqual),o=ly(r.areObjectsEqual),l=ly(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return r}function WNe(e){return function(t,n,r,i,a,o,l){return e(t,n,l)}}function YNe({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 XNe=ol();ol({strict:!0});ol({circular:!0});ol({circular:!0,strict:!0});ol({createInternalComparator:()=>zu});ol({strict:!0,createInternalComparator:()=>zu});ol({circular:!0,createInternalComparator:()=>zu});ol({circular:!0,createInternalComparator:()=>zu,strict:!0});function ol(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=KNe(e),o=GNe(a),l=n?n(o):WNe(o);return YNe({circular:t,comparator:o,createState:r,equals:l,strict:i})}function QNe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function VU(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 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 ZNe(e){return nMe(e)||tMe(e)||eMe(e)||JNe()}function JNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
444
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eMe(e,t){if(e){if(typeof e=="string")return FU(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 FU(e,t)}}function FU(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 tMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nMe(e){if(Array.isArray(e))return e}function rMe(){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=ZNe(o),u=l[0],f=l.slice(1);if(typeof u=="number"){VU(i.bind(null,f),u);return}i(u),VU(i.bind(null,f));return}EM(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 UU(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?UU(Object(n),!0).forEach(function(r){RZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RZ(e,t,n){return t=iMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iMe(e){var t=aMe(e,"string");return sm(t)==="symbol"?t:String(t)}function aMe(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 oMe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},sMe=function(t){return t},lMe=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 HU(HU({},r),{},RZ({},i,t(i,n[i])))},{})},GU=function(t,n,r){return t.map(function(i){return"".concat(lMe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function uMe(e,t){return dMe(e)||fMe(e,t)||PZ(e,t)||cMe()}function cMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
445
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fMe(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 dMe(e){if(Array.isArray(e))return e}function hMe(e){return gMe(e)||mMe(e)||PZ(e)||pMe()}function pMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
446
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PZ(e,t){if(e){if(typeof e=="string")return AM(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 AM(e,t)}}function mMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gMe(e){if(Array.isArray(e))return AM(e)}function AM(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,kZ=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},DZ=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},KU=function(t,n){return function(r){var i=kZ(t,n);return DZ(i,r)}},vMe=function(t,n){return function(r){var i=kZ(t,n),a=[].concat(hMe(i.map(function(o,l){return o*l}).slice(1)),[0]);return DZ(a,r)}},WU=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(b){return parseFloat(b)}),d=uMe(f,4);i=d[0],a=d[1],o=d[2],l=d[3]}}}var h=KU(i,o),m=KU(a,l),g=vMe(i,o),w=function(S){return S>1?1:S<0?0:S},x=function(S){for(var E=S>1?1:S,_=E,A=0;A<8;++A){var T=h(_)-E,O=g(_);if(Math.abs(T-E)<Xb||O<Xb)return m(_);_=w(_-T/O)}return m(_)};return x.isStepper=!1,x},yMe=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,w=m*a,x=m+(g-w)*l/1e3,b=m*l/1e3+d;return Math.abs(b-h)<Xb&&Math.abs(x)<Xb?[h,0]:[b,x]};return u.isStepper=!0,u.dt=l,u},bMe=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 WU(i);case"spring":return yMe();default:if(i.split("(")[0]==="cubic-bezier")return WU(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 YU(e){return SMe(e)||wMe(e)||IZ(e)||xMe()}function xMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
447
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SMe(e){if(Array.isArray(e))return CM(e)}function XU(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 Bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XU(Object(n),!0).forEach(function(r){TM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TM(e,t,n){return t=_Me(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Me(e){var t=EMe(e,"string");return lm(t)==="symbol"?t:String(t)}function EMe(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 AMe(e,t){return OMe(e)||CMe(e,t)||IZ(e,t)||TMe()}function TMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
448
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IZ(e,t){if(e){if(typeof e=="string")return CM(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 CM(e,t)}}function CM(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 CMe(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 OMe(e){if(Array.isArray(e))return e}var Qb=function(t,n,r){return t+(n-t)*r},OM=function(t){var n=t.from,r=t.to;return n!==r},jMe=function e(t,n,r){var i=hp(function(a,o){if(OM(o)){var l=t(o.from,o.to,o.velocity),u=AMe(l,2),f=u[0],d=u[1];return Bn(Bn({},o),{},{from:f,velocity:d})}return o},n);return r<1?hp(function(a,o){return OM(o)?Bn(Bn({},o),{},{velocity:Qb(o.velocity,i[a].velocity,r),from:Qb(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const NMe=(function(e,t,n,r,i){var a=oMe(e,t),o=a.reduce(function(b,S){return Bn(Bn({},b),{},TM({},S,[e[S],t[S]]))},{}),l=a.reduce(function(b,S){return Bn(Bn({},b),{},TM({},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(OM).length},w=function(S){f||(f=S);var E=S-f,_=E/n.dt;l=jMe(n,l,_),i(Bn(Bn(Bn({},e),t),m())),f=S,g()||(u=requestAnimationFrame(h))},x=function(S){d||(d=S);var E=(S-d)/r,_=hp(function(T,O){return Qb.apply(void 0,YU(O).concat([n(E)]))},o);if(i(Bn(Bn(Bn({},e),t),_)),E<1)u=requestAnimationFrame(h);else{var A=hp(function(T,O){return Qb.apply(void 0,YU(O).concat([n(1)]))},o);i(Bn(Bn(Bn({},e),t),A))}};return h=n.isStepper?w:x,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(u)}}});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)}var MMe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function RMe(e,t){if(e==null)return{};var n=PMe(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 PMe(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 cj(e){return LMe(e)||IMe(e)||DMe(e)||kMe()}function kMe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
449
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DMe(e,t){if(e){if(typeof e=="string")return jM(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 jM(e,t)}}function IMe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LMe(e){if(Array.isArray(e))return jM(e)}function jM(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 QU(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 _i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QU(Object(n),!0).forEach(function(r){ip(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ip(e,t,n){return t=LZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BMe(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,LZ(r.key),r)}}function qMe(e,t,n){return t&&BMe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LZ(e){var t=zMe(e,"string");return Kf(t)==="symbol"?t:String(t)}function zMe(e,t){if(Kf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VMe(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&&NM(e,t)}function NM(e,t){return NM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},NM(e,t)}function FMe(e){var t=UMe();return function(){var r=Zb(e),i;if(t){var a=Zb(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return MM(this,i)}}function MM(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 RM(e)}function RM(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UMe(){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 Zb(e){return Zb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zb(e)}var xo=(function(e){VMe(n,e);var t=FMe(n);function n(r,i){var a;$Me(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(RM(a)),a.changeStyle=a.changeStyle.bind(RM(a)),!l||g<=0)return a.state={style:{}},typeof m=="function"&&(a.state={style:d}),MM(a);if(h&&h.length)a.state={style:h[0].style};else if(f){if(typeof m=="function")return a.state={style:f},MM(a);a.state={style:u?ip({},u,f):f}}else a.state={style:{}};return a}return qMe(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(!(XNe(i.to,d)&&i.canBegin&&i.isActive)){var w=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=w||f?h:i.to;if(this.state&&m){var b={style:u?ip({},u,x):x};(u&&m[u]!==x||!u&&m!==x)&&this.setState(b)}this.runAnimation(_i(_i({},this.props),{},{from:x,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=NMe(o,l,bMe(f),u,this.changeStyle),w=function(){a.stopJSAnimation=g()};this.manager.start([m,d,w,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(x,b,S){if(S===0)return x;var E=b.duration,_=b.easing,A=_===void 0?"ease":_,T=b.style,O=b.properties,M=b.onAnimationEnd,R=S>0?o[S-1]:b,P=O||Object.keys(T);if(typeof A=="function"||A==="spring")return[].concat(cj(x),[a.runJSAnimation.bind(a,{from:R.style,to:T,duration:E,easing:A}),E]);var $=GU(P,E,A),I=_i(_i(_i({},R.style),T),{},{transition:$});return[].concat(cj(x),[I,E,M]).filter(sMe)};return this.manager.start([u].concat(cj(o.reduce(g,[d,Math.max(m,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=rMe());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,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof f=="function"||typeof g=="function"||f==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var x=l?ip({},l,u):u,b=GU(Object.keys(x),o,f);w.start([d,a,_i(_i({},x),{},{transition:b}),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=RMe(i,MMe),f=N.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 w=g.props,x=w.style,b=x===void 0?{}:x,S=w.className,E=N.cloneElement(g,_i(_i({},u),{},{style:_i(_i({},b),d),className:S}));return E};return f===1?h(N.Children.only(a)):ie.createElement("div",null,N.Children.map(a,function(m){return h(m)}))}}]),n})(N.PureComponent);xo.displayName="Animate";xo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};xo.propTypes={from:bt.oneOfType([bt.object,bt.string]),to:bt.oneOfType([bt.object,bt.string]),attributeName:bt.string,duration:bt.number,begin:bt.number,easing:bt.oneOfType([bt.string,bt.func]),steps:bt.arrayOf(bt.shape({duration:bt.number.isRequired,style:bt.object.isRequired,easing:bt.oneOfType([bt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),bt.func]),properties:bt.arrayOf("string"),onAnimationEnd:bt.func})),children:bt.oneOfType([bt.node,bt.func]),isActive:bt.bool,canBegin:bt.bool,onAnimationEnd:bt.func,shouldReAnimate:bt.bool,onAnimationStart:bt.func,onAnimationReStart:bt.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 HMe(e,t){return YMe(e)||WMe(e,t)||KMe(e,t)||GMe()}function GMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
450
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KMe(e,t){if(e){if(typeof e=="string")return ZU(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 ZU(e,t)}}function ZU(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 WMe(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 YMe(e){if(Array.isArray(e))return e}function JU(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 e8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JU(Object(n),!0).forEach(function(r){XMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XMe(e,t,n){return t=QMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QMe(e){var t=ZMe(e,"string");return um(t)=="symbol"?t:t+""}function ZMe(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 t8=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,`,
451
- `).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,`,
452
- `).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,`,
453
- `).concat(t,",").concat(n+i-l*h[3])),d+="Z"}else if(o>0&&a===+a&&a>0){var w=Math.min(o,a);d="M ".concat(t,",").concat(n+l*w,`
454
- A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+u*w,",").concat(n,`
455
- L `).concat(t+r-u*w,",").concat(n,`
456
- A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+r,",").concat(n+l*w,`
457
- L `).concat(t+r,",").concat(n+i-l*w,`
458
- A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t+r-u*w,",").concat(n+i,`
459
- L `).concat(t+u*w,",").concat(n+i,`
460
- A `).concat(w,",").concat(w,",0,0,").concat(f,",").concat(t,",").concat(n+i-l*w," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},JMe=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},eRe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},B2=function(t){var n=e8(e8({},eRe),t),r=N.useRef(),i=N.useState(-1),a=HMe(i,2),o=a[0],l=a[1];N.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,w=n.animationEasing,x=n.animationDuration,b=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(xo,{canBegin:o>0,from:{width:d,height:h,x:u,y:f},to:{width:d,height:h,x:u,y:f},duration:x,animationEasing:w,isActive:E},function(A){var T=A.width,O=A.height,M=A.x,R=A.y;return ie.createElement(xo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:x,isActive:S,easing:w},ie.createElement("path",Jb({},Je(n,!0),{className:_,d:t8(M,R,T,O,m),ref:r})))}):ie.createElement("path",Jb({},Je(n,!0),{className:_,d:t8(u,f,d,h,m)}))};function PM(){return PM=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},PM.apply(this,arguments)}var q2=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?N.createElement("circle",PM({},Je(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 tRe=["x","y","top","left","width","height","className"];function kM(){return kM=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},kM.apply(this,arguments)}function n8(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 nRe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?n8(Object(n),!0).forEach(function(r){rRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rRe(e,t,n){return t=iRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iRe(e){var t=aRe(e,"string");return cm(t)=="symbol"?t:t+""}function aRe(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 oRe(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}var lRe=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},uRe=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,w=t.className,x=oRe(t,tRe),b=nRe({x:r,y:a,top:l,left:f,width:h,height:g},x);return!_e(r)||!_e(a)||!_e(h)||!_e(g)||!_e(l)||!_e(f)?null:ie.createElement("path",kM({},Je(b,!0),{className:ut("recharts-cross",w),d:lRe(r,a,h,g,l,f)}))},cRe=xX();const fRe=vt(cRe);var fj,r8;function dRe(){if(r8)return fj;r8=1;var e=To(),t=mi(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return fj=r,fj}var hRe=dRe();const pRe=vt(hRe);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 mRe(e,t){return bRe(e)||yRe(e,t)||vRe(e,t)||gRe()}function gRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
461
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vRe(e,t){if(e){if(typeof e=="string")return i8(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 i8(e,t)}}function i8(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 yRe(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 bRe(e){if(Array.isArray(e))return e}function a8(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 o8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a8(Object(n),!0).forEach(function(r){xRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xRe(e,t,n){return t=wRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wRe(e){var t=SRe(e,"string");return fm(t)=="symbol"?t:t+""}function SRe(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 s8=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},_Re={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ERe=function(t){var n=o8(o8({},_Re),t),r=N.useRef(),i=N.useState(-1),a=mRe(i,2),o=a[0],l=a[1];N.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,w=n.animationEasing,x=n.animationDuration,b=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(xo,{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:x,animationEasing:w,isActive:S},function(_){var A=_.upperWidth,T=_.lowerWidth,O=_.height,M=_.x,R=_.y;return ie.createElement(xo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:x,easing:w},ie.createElement("path",e0({},Je(n,!0),{className:E,d:s8(M,R,A,T,O),ref:r})))}):ie.createElement("g",null,ie.createElement("path",e0({},Je(n,!0),{className:E,d:s8(u,f,d,h,m)})))},ARe=["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 TRe(e,t){if(e==null)return{};var n=CRe(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 CRe(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 l8(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?l8(Object(n),!0).forEach(function(r){ORe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ORe(e,t,n){return t=jRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jRe(e){var t=NRe(e,"string");return dm(t)=="symbol"?t:t+""}function NRe(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 MRe(e,t){return t0(t0({},t),e)}function RRe(e,t){return e==="symbols"}function u8(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return ie.createElement(B2,n);case"trapezoid":return ie.createElement(ERe,n);case"sector":return ie.createElement(NZ,n);case"symbols":if(RRe(t))return ie.createElement(h2,n);break;default:return null}}function PRe(e){return N.isValidElement(e)?e.props:e}function kRe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?MRe:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,u=TRe(e,ARe),f;if(N.isValidElement(t))f=N.cloneElement(t,t0(t0({},u),PRe(t)));else if(Ye(t))f=t(u);else if(fRe(t)&&!pRe(t)){var d=i(t,u);f=ie.createElement(u8,{shapeType:n,elementProps:d})}else{var h=u;f=ie.createElement(u8,{shapeType:n,elementProps:h})}return l?ie.createElement(Jt,{className:o},f):f}function Ux(e,t){return t!=null&&"trapezoids"in e.props}function Hx(e,t){return t!=null&&"sectors"in e.props}function hm(e,t){return t!=null&&"points"in e.props}function DRe(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 IRe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function LRe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function $Re(e,t){var n;return Ux(e,t)?n=DRe:Hx(e,t)?n=IRe:hm(e,t)&&(n=LRe),n}function BRe(e,t){var n;return Ux(e,t)?n="trapezoids":Hx(e,t)?n="sectors":hm(e,t)&&(n="points"),n}function qRe(e,t){if(Ux(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(Hx(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 zRe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=BRe(n,t),a=qRe(n,t),o=r.filter(function(u,f){var d=Xp(a,u),h=n.props[i].filter(function(w){var x=$Re(n,t);return x(w,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 VRe=AX();const n0=vt(VRe);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 c8(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 f8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c8(Object(n),!0).forEach(function(r){$Z(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $Z(e,t,n){return t=FRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FRe(e){var t=URe(e,"string");return pm(t)=="symbol"?t:t+""}function URe(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 HRe=["Webkit","Moz","O","ms"],GRe=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=HRe.reduce(function(a,o){return f8(f8({},a),{},$Z({},o+r,n))},{});return i[t]=n,i};function Wf(e){"@babel/helpers - typeof";return Wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wf(e)}function 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 d8(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 dj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d8(Object(n),!0).forEach(function(r){Rr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h8(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,qZ(r.key),r)}}function WRe(e,t,n){return t&&h8(e.prototype,t),n&&h8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function YRe(e,t,n){return t=i0(t),XRe(e,BZ()?Reflect.construct(t,n||[],i0(e).constructor):t.apply(e,n))}function XRe(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 QRe(e)}function QRe(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 i0(e){return i0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},i0(e)}function ZRe(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&&DM(e,t)}function DM(e,t){return DM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},DM(e,t)}function Rr(e,t,n){return t=qZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qZ(e){var t=JRe(e,"string");return Wf(t)=="symbol"?t:t+""}function JRe(e,t){if(Wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ePe=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}},p8=function(t){return t.changedTouches&&!!t.changedTouches.length},Yf=(function(e){function t(n){var r;return KRe(this,t),r=YRe(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=p8(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 ZRe(t,e),WRe(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),w=t.getIndexInRange(o,m);return{startIndex:g-g%u,endIndex:w===d?d:w-w%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 Ye(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,w=u.onChange,x=r.pageX-a;x>0?x=Math.min(x,f+d-h-l,f+d-h-o):x<0&&(x=Math.max(x,f-o,f-l));var b=this.getIndex({startX:o+x,endX:l+x});(b.startIndex!==m||b.endIndex!==g)&&w&&w(b),this.setState({startX:o+x,endX:l+x,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=p8(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,w=d.onChange,x=d.gap,b=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,T=_.endIndex,O=function(){var R=b.length-1;return o==="startX"&&(l>u?A%x===0:T%x===0)||l<u&&T===R||o==="endX"&&(l>u?T%x===0:A%x===0)||l>u&&T===R};this.setState(Rr(Rr({},o,f+E),"brushMoveStartX",r.pageX),function(){w&&O()&&w(_)})}},{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=N.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,w=u.data,x=u.startIndex,b=u.endIndex,S=Math.max(r,this.props.x),E=dj(dj({},Je(this.props,!1)),{},{x:S,y:f,width:d,height:h}),_=g||"Min value: ".concat((a=w[x])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=w[b])===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(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),l.handleTravellerMoveKeyboard(T.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,w={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},w),this.getTextOfTick(i)),ie.createElement(kb,r0({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,m)+u+g,y:o+l/2},w),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,w=m.endX,x=m.isTextActive,b=m.isSlideMoving,S=m.isTravellerMoving,E=m.isTravellerFocused;if(!i||!i.length||!_e(l)||!_e(u)||!_e(f)||!_e(d)||f<=0||d<=0)return null;var _=ut("recharts-brush",a),A=ie.Children.count(o)===1,T=GRe("userSelect","none");return ie.createElement(Jt,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(g,w),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(w,"endX"),(x||b||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):Ye(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 dj({prevData:a,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:o},a&&a.length?ePe({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}}])})(N.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 hj,m8;function tPe(){if(m8)return hj;m8=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 hj=t,hj}var pj,g8;function nPe(){if(g8)return pj;g8=1;var e=BY(),t=gi(),n=tPe(),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 pj=a,pj}var rPe=nPe();const iPe=vt(rPe);var ha=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},aPe=vX();const oPe=vt(aPe);var mj,v8;function sPe(){if(v8)return mj;v8=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 mj=e,mj}var gj,y8;function lPe(){if(y8)return gj;y8=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 gj=t,gj}var vj,b8;function uPe(){if(b8)return vj;b8=1;var e=sPe(),t=lPe(),n=gi(),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 vj=a,vj}var cPe=uPe();const zZ=vt(cPe);var fPe=["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 IM(){return IM=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},IM.apply(this,arguments)}function x8(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 Wh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x8(Object(n),!0).forEach(function(r){dPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dPe(e,t,n){return t=hPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hPe(e){var t=pPe(e,"string");return mm(t)=="symbol"?t:t+""}function pPe(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 mPe(e,t){if(e==null)return{};var n=gPe(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 gPe(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 vPe(e,t){var n=e.x,r=e.y,i=mPe(e,fPe),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 Wh(Wh(Wh(Wh(Wh({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:d,width:m,name:t.name,radius:t.radius})}function w8(e){return ie.createElement(kRe,IM({shapeType:"rectangle",propTransformer:vPe,activeClassName:"recharts-active-bar"},e))}var yPe=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=_e(r)||bSe(r);return a?t(r,i):(a||ju(),n)}},bPe=["value","background"],VZ;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 xPe(e,t){if(e==null)return{};var n=wPe(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 wPe(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 S8(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?S8(Object(n),!0).forEach(function(r){ks(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _8(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,UZ(r.key),r)}}function _Pe(e,t,n){return t&&_8(e.prototype,t),n&&_8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function EPe(e,t,n){return t=o0(t),APe(e,FZ()?Reflect.construct(t,n||[],o0(e).constructor):t.apply(e,n))}function APe(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 TPe(e)}function TPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FZ=function(){return!!e})()}function o0(e){return o0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},o0(e)}function CPe(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&&LM(e,t)}function LM(e,t){return LM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},LM(e,t)}function ks(e,t,n){return t=UZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UZ(e){var t=OPe(e,"string");return Xf(t)=="symbol"?t:t+""}function OPe(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 Zs=(function(e){function t(){var n;SPe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=EPe(this,t,[].concat(i)),ks(n,"state",{isAnimationFinished:!1}),ks(n,"id",eg("recharts-bar-")),ks(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),ks(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return CPe(t,e),_Pe(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=Je(this.props,!1);return r&&r.map(function(h,m){var g=m===u,w=g?f:o,x=pn(pn(pn({},d),h),{},{isActive:g,option:w,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(w8,x))})}},{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(xo,{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 w=g.t,x=a.map(function(b,S){var E=m&&m[S];if(E){var _=si(E.x,b.x),A=si(E.y,b.y),T=si(E.width,b.width),O=si(E.height,b.height);return pn(pn({},b),{},{x:_(w),y:A(w),width:T(w),height:O(w)})}if(o==="horizontal"){var M=si(0,b.height),R=M(w);return pn(pn({},b),{},{y:b.y+b.height-R,height:R})}var P=si(0,b.width),$=P(w);return pn(pn({},b),{},{width:$})});return ie.createElement(Jt,null,r.renderRectanglesStatically(x))})}},{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=Je(this.props.background,!1);return a.map(function(f,d){f.value;var h=f.background,m=xPe(f,bPe);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(w8,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=$i(d,Fx);if(!h)return null;var m=f==="vertical"?o[0].height/2:o[0].width/2,g=function(b,S){var E=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:E,errorVal:Ur(b,S)}},w={clipPath:r?"url(#clipPath-".concat(i,")"):null};return ie.createElement(Jt,w,h.map(function(x){return ie.cloneElement(x,{key:"error-bar-".concat(i,"-").concat(x.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,w=r.background,x=r.id;if(i||!a||!a.length)return null;var b=this.state.isAnimationFinished,S=ut("recharts-bar",o),E=l&&l.allowDataOverflow,_=u&&u.allowDataOverflow,A=E||_,T=at(x)?this.id:x;return ie.createElement(Jt,{className:S},E||_?ie.createElement("defs",null,ie.createElement("clipPath",{id:"clipPath-".concat(T)},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(T,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,T),(!g||b)&&Fs.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}}])})(N.PureComponent);VZ=Zs;ks(Zs,"displayName","Bar");ks(Zs,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Cd.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ks(Zs,"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 w=t.layout,x=n.type.defaultProps,b=x!==void 0?pn(pn({},x),n.props):n.props,S=b.dataKey,E=b.children,_=b.minPointSize,A=w==="horizontal"?o:a,T=f?A.scale.domain():null,O=aje({numericAxis:A}),M=$i(E,TQ),R=h.map(function(P,$){var I,k,V,D,q,L;f?I=ZOe(f[d+$],T):(I=Ur(P,S),Array.isArray(I)||(I=[O,I]));var z=yPe(_,VZ.defaultProps.minPointSize)(I[1],$);if(w==="horizontal"){var H,Y=[o.scale(I[0]),o.scale(I[1])],Q=Y[0],U=Y[1];k=yU({axis:a,ticks:l,bandSize:i,offset:g.offset,entry:P,index:$}),V=(H=U??Q)!==null&&H!==void 0?H:void 0,D=g.size;var F=Q-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=Ii(q||z)*(Math.abs(z)-Math.abs(q));V-=X,q+=X}}else{var W=[a.scale(I[0]),a.scale(I[1])],G=W[0],Z=W[1];if(k=G,V=yU({axis:o,ticks:u,bandSize:i,offset:g.offset,entry:P,index:$}),D=Z-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=Ii(D||z)*(Math.abs(z)-Math.abs(D));D+=J}}return pn(pn(pn({},P),{},{x:k,y:V,width:D,height:q,value:f?I:I[1],payload:P,background:L},M&&M[$]&&M[$].props),{},{tooltipPayload:[CZ(n,P)],tooltipPosition:{x:k+D/2,y:V+q/2}})});return pn({data:R,layout:w},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 jPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E8(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,HZ(r.key),r)}}function NPe(e,t,n){return t&&E8(e.prototype,t),n&&E8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function A8(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 Ni(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A8(Object(n),!0).forEach(function(r){Gx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gx(e,t,n){return t=HZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HZ(e){var t=MPe(e,"string");return gm(t)=="symbol"?t:t+""}function MPe(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 GZ=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=!!Pr(f,Zs);return d.reduce(function(g,w){var x=n[w],b=x.orientation,S=x.domain,E=x.padding,_=E===void 0?{}:E,A=x.mirror,T=x.reversed,O="".concat(b).concat(A?"Mirror":""),M,R,P,$,I;if(x.type==="number"&&(x.padding==="gap"||x.padding==="no-gap")){var k=S[1]-S[0],V=1/0,D=x.categoricalDomain.sort(SSe);if(D.forEach(function(W,G){G>0&&(V=Math.min((W||0)-(D[G-1]||0),V))}),Number.isFinite(V)){var q=V/k,L=x.layout==="vertical"?r.height:r.width;if(x.padding==="gap"&&(M=q*L/2),x.padding==="no-gap"){var z=Cu(t.barCategoryGap,q*L),H=q*L/2;M=H-z-(H-z)/L*z}}}i==="xAxis"?R=[r.left+(_.left||0)+(M||0),r.left+r.width-(_.right||0)-(M||0)]:i==="yAxis"?R=u==="horizontal"?[r.top+r.height-(_.bottom||0),r.top+(_.top||0)]:[r.top+(_.top||0)+(M||0),r.top+r.height-(_.bottom||0)-(M||0)]:R=x.range,T&&(R=[R[1],R[0]]);var Y=YOe(x,a,m),Q=Y.scale,U=Y.realScaleType;Q.domain(S).range(R),XOe(Q);var F=ije(Q,Ni(Ni({},x),{},{realScaleType:U}));i==="xAxis"?(I=b==="top"&&!A||b==="bottom"&&A,P=r.left,$=h[O]-I*x.height):i==="yAxis"&&(I=b==="left"&&!A||b==="right"&&A,P=h[O]-I*x.width,$=r.top);var X=Ni(Ni(Ni({},x),F),{},{realScaleType:U,x:P,y:$,scale:Q,width:i==="xAxis"?r.width:x.width,height:i==="yAxis"?r.height:x.height});return X.bandSize=Gb(X,F),!x.hide&&i==="xAxis"?h[O]+=(I?-1:1)*X.height:x.hide||(h[O]+=(I?-1:1)*X.width),Ni(Ni({},g),{},Gx({},w,X))},{})},KZ=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)}},RPe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return KZ({x:n,y:r},{x:i,y:a})},WZ=(function(){function e(t){jPe(this,e),this.scale=t}return NPe(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)}}])})();Gx(WZ,"EPS",1e-4);var z2=function(t){var n=Object.keys(t).reduce(function(r,i){return Ni(Ni({},r),{},Gx({},i,WZ.create(t[i])))},{});return Ni(Ni({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return oPe(i,function(u,f){return n[f].apply(u,{bandAware:o,position:l})})},isInRange:function(i){return zZ(i,function(a,o){return n[o].isInRange(a)})}})};function PPe(e){return(e%180+180)%180}var kPe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=PPe(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)},DPe=pX();const IPe=vt(DPe);var LPe=UY();const $Pe=vt(LPe);var BPe=$Pe(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("")}),V2=N.createContext(void 0),F2=N.createContext(void 0),YZ=N.createContext(void 0),XZ=N.createContext({}),QZ=N.createContext(void 0),ZZ=N.createContext(0),JZ=N.createContext(0),T8=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=BPe(a);return ie.createElement(V2.Provider,{value:r},ie.createElement(F2.Provider,{value:i},ie.createElement(XZ.Provider,{value:a},ie.createElement(YZ.Provider,{value:d},ie.createElement(QZ.Provider,{value:o},ie.createElement(ZZ.Provider,{value:f},ie.createElement(JZ.Provider,{value:u},l)))))))},qPe=function(){return N.useContext(QZ)},eJ=function(t){var n=N.useContext(V2);n==null&&ju();var r=n[t];return r==null&&ju(),r},zPe=function(){var t=N.useContext(V2);return bs(t)},VPe=function(){var t=N.useContext(F2),n=IPe(t,function(r){return zZ(r.domain,Number.isFinite)});return n||bs(t)},tJ=function(t){var n=N.useContext(F2);n==null&&ju();var r=n[t];return r==null&&ju(),r},FPe=function(){var t=N.useContext(YZ);return t},UPe=function(){return N.useContext(XZ)},U2=function(){return N.useContext(JZ)},H2=function(){return N.useContext(ZZ)};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 HPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GPe(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,rJ(r.key),r)}}function KPe(e,t,n){return t&&GPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function WPe(e,t,n){return t=s0(t),YPe(e,nJ()?Reflect.construct(t,n||[],s0(e).constructor):t.apply(e,n))}function YPe(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 XPe(e)}function XPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nJ=function(){return!!e})()}function s0(e){return s0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},s0(e)}function QPe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$M(e,t)}function $M(e,t){return $M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$M(e,t)}function C8(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 O8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C8(Object(n),!0).forEach(function(r){G2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function G2(e,t,n){return t=rJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rJ(e){var t=ZPe(e,"string");return Qf(t)=="symbol"?t:t+""}function ZPe(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 JPe(e,t){return r2e(e)||n2e(e,t)||t2e(e,t)||e2e()}function e2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
462
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t2e(e,t){if(e){if(typeof e=="string")return j8(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 j8(e,t)}}function j8(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 n2e(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 r2e(e){if(Array.isArray(e))return e}function BM(){return BM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BM.apply(this,arguments)}var i2e=function(t,n){var r;return ie.isValidElement(t)?r=ie.cloneElement(t,n):Ye(t)?r=t(n):r=ie.createElement("line",BM({},n,{className:"recharts-reference-line-line"})),r},a2e=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 w=f.y,x=t.y.apply(w,{position:o});if(ha(f,"discard")&&!t.y.isInRange(x))return null;var b=[{x:d+m,y:x},{x:d,y:x}];return u==="left"?b.reverse():b}if(n){var S=f.x,E=t.x.apply(S,{position:o});if(ha(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,T=A.map(function(O){return t.apply(O,{position:o})});return ha(f,"discard")&&iPe(T,function(O){return!t.isInRange(O)})?null:T}return null};function o2e(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=qPe(),d=eJ(i),h=tJ(a),m=FPe();if(!f||!m)return null;so(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var g=z2({x:d.scale,y:h.scale}),w=Cn(t),x=Cn(n),b=r&&r.length===2,S=a2e(g,w,x,b,m,e.position,d.orientation,h.orientation,e);if(!S)return null;var E=JPe(S,2),_=E[0],A=_.x,T=_.y,O=E[1],M=O.x,R=O.y,P=ha(e,"hidden")?"url(#".concat(f,")"):void 0,$=O8(O8({clipPath:P},Je(e,!0)),{},{x1:A,y1:T,x2:M,y2:R});return ie.createElement(Jt,{className:ut("recharts-reference-line",l)},i2e(o,$),Yn.renderCallByParent(e,RPe({x1:A,y1:T,x2:M,y2:R})))}var K2=(function(e){function t(){return HPe(this,t),WPe(this,t,arguments)}return QPe(t,e),KPe(t,[{key:"render",value:function(){return ie.createElement(o2e,this.props)}}])})(ie.Component);G2(K2,"displayName","ReferenceLine");G2(K2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function qM(){return qM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qM.apply(this,arguments)}function 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 N8(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 M8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N8(Object(n),!0).forEach(function(r){Kx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function s2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l2e(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 u2e(e,t,n){return t&&l2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function c2e(e,t,n){return t=l0(t),f2e(e,iJ()?Reflect.construct(t,n||[],l0(e).constructor):t.apply(e,n))}function f2e(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 d2e(e)}function d2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iJ=function(){return!!e})()}function l0(e){return l0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},l0(e)}function h2e(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&&zM(e,t)}function zM(e,t){return zM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zM(e,t)}function Kx(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=p2e(e,"string");return Zf(t)=="symbol"?t:t+""}function p2e(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 m2e=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=z2({x:i.scale,y:a.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return ha(t,"discard")&&!o.isInRange(l)?null:l},Wx=(function(e){function t(){return s2e(this,t),c2e(this,t,arguments)}return h2e(t,e),u2e(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=m2e(this.props);if(!h)return null;var m=h.x,g=h.y,w=this.props,x=w.shape,b=w.className,S=ha(this.props,"hidden")?"url(#".concat(u,")"):void 0,E=M8(M8({clipPath:S},Je(this.props,!0)),{},{cx:m,cy:g});return ie.createElement(Jt,{className:ut("recharts-reference-dot",b)},t.renderDot(x,E),Yn.renderCallByParent(this.props,{x:m-o,y:g-o,width:2*o,height:2*o}))}}])})(ie.Component);Kx(Wx,"displayName","ReferenceDot");Kx(Wx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Kx(Wx,"renderDot",function(e,t){var n;return ie.isValidElement(e)?n=ie.cloneElement(e,t):Ye(e)?n=e(t):n=ie.createElement(q2,qM({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function VM(){return VM=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},VM.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 R8(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 P8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R8(Object(n),!0).forEach(function(r){Yx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v2e(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,sJ(r.key),r)}}function y2e(e,t,n){return t&&v2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function b2e(e,t,n){return t=u0(t),x2e(e,oJ()?Reflect.construct(t,n||[],u0(e).constructor):t.apply(e,n))}function x2e(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 w2e(e)}function w2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oJ=function(){return!!e})()}function u0(e){return u0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},u0(e)}function S2e(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&&FM(e,t)}function FM(e,t){return FM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},FM(e,t)}function Yx(e,t,n){return t=sJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sJ(e){var t=_2e(e,"string");return Jf(t)=="symbol"?t:t+""}function _2e(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 E2e=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=z2({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},w={x:n?m.x.apply(l,{position:"end"}):m.x.rangeMax,y:i?m.y.apply(f,{position:"end"}):m.y.rangeMax};return ha(a,"discard")&&(!m.isInRange(g)||!m.isInRange(w))?null:KZ(g,w)},Xx=(function(e){function t(){return g2e(this,t),b2e(this,t,arguments)}return S2e(t,e),y2e(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),w=Cn(l),x=this.props.shape;if(!h&&!m&&!g&&!w&&!x)return null;var b=E2e(h,m,g,w,this.props);if(!b&&!x)return null;var S=ha(this.props,"hidden")?"url(#".concat(d,")"):void 0;return ie.createElement(Jt,{className:ut("recharts-reference-area",u)},t.renderRect(x,P8(P8({clipPath:S},Je(this.props,!0)),b)),Yn.renderCallByParent(this.props,b))}}])})(ie.Component);Yx(Xx,"displayName","ReferenceArea");Yx(Xx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Yx(Xx,"renderRect",function(e,t){var n;return ie.isValidElement(e)?n=ie.cloneElement(e,t):Ye(e)?n=e(t):n=ie.createElement(B2,VM({},t,{className:"recharts-reference-area-rect"})),n});function lJ(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 A2e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return kPe(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 C2e(e,t){return lJ(e,t+1)}function O2e(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 w=r==null?void 0:r[u];if(w===void 0)return{v:lJ(r,f)};var x=u,b,S=function(){return b===void 0&&(b=n(w,x)),b},E=w.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 k8(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?k8(Object(n),!0).forEach(function(r){j2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j2e(e,t,n){return t=N2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N2e(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],w,x=function(){return w===void 0&&(w=n(g,m)),w};if(m===o-1){var b=e*(g.coordinate+e*x()/2-u);a[m]=g=Wn(Wn({},g),{},{tickCoord:b>0?g.coordinate-b*e:g.coordinate})}else a[m]=g=Wn(Wn({},g),{},{tickCoord:g.coordinate});var S=c0(e,g.tickCoord,x,l,u);S&&(u=g.tickCoord-e*(x()/2+i),a[m]=Wn(Wn({},g),{},{isShow:!0}))},d=o-1;d>=0;d--)f(d);return a}function P2e(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 w=a?l-1:l,x=function(E){var _=o[E],A,T=function(){return A===void 0&&(A=n(_,E)),A};if(E===0){var O=e*(_.coordinate-e*T()/2-u);o[E]=_=Wn(Wn({},_),{},{tickCoord:O<0?_.coordinate-O*e:_.coordinate})}else o[E]=_=Wn(Wn({},_),{},{tickCoord:_.coordinate});var M=c0(e,_.tickCoord,T,u,f);M&&(u=_.tickCoord+e*(T()/2+i),o[E]=Wn(Wn({},_),{},{isShow:!0}))},b=0;b<w;b++)x(b);return o}function W2(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(_e(u)||Cd.isSsr)return C2e(i,typeof u=="number"&&_e(u)?u:0);var m=[],g=l==="top"||l==="bottom"?"width":"height",w=d&&g==="width"?up(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},x=function(_,A){var T=Ye(f)?f(_.value,A):_.value;return g==="width"?A2e(up(T,{fontSize:t,letterSpacing:n}),w,h):up(T,{fontSize:t,letterSpacing:n})[g]},b=i.length>=2?Ii(i[1].coordinate-i[0].coordinate):1,S=T2e(a,b,g);return u==="equidistantPreserveStart"?O2e(b,S,x,i,o):(u==="preserveStart"||u==="preserveStartEnd"?m=P2e(b,S,x,i,o,u==="preserveStartEnd"):m=R2e(b,S,x,i,o),m.filter(function(E){return E.isShow}))}var k2e=["viewBox"],D2e=["viewBox"],I2e=["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 Kc(){return Kc=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},Kc.apply(this,arguments)}function D8(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?D8(Object(n),!0).forEach(function(r){Y2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yj(e,t){if(e==null)return{};var n=L2e(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 L2e(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 $2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I8(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&&I8(e.prototype,t),n&&I8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function q2e(e,t,n){return t=f0(t),z2e(e,uJ()?Reflect.construct(t,n||[],f0(e).constructor):t.apply(e,n))}function z2e(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 V2e(e)}function V2e(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 f0(e){return f0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},f0(e)}function F2e(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&&UM(e,t)}function UM(e,t){return UM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UM(e,t)}function Y2(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=U2e(e,"string");return ed(t)=="symbol"?t:t+""}function U2e(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 $2e(this,t),r=q2e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return F2e(t,e),B2e(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=yj(r,k2e),l=this.props,u=l.viewBox,f=yj(l,D2e);return!of(a,u)||!of(o,f)||!of(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,w,x,b,S,E,_=h?-1:1,A=r.tickSize||d,T=_e(r.tickCoord)?r.tickCoord:r.coordinate;switch(f){case"top":g=w=r.coordinate,b=o+ +!h*u,x=b-_*A,E=x-_*m,S=T;break;case"left":x=b=r.coordinate,w=a+ +!h*l,g=w-_*A,S=g-_*m,E=T;break;case"right":x=b=r.coordinate,w=a+ +h*l,g=w+_*A,S=g+_*m,E=T;break;default:g=w=r.coordinate,b=o+ +h*u,x=b+_*A,E=x+_*m,S=T;break}return{line:{x1:g,y1:x,x2:w,y2:b},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({},Je(this.props,!1)),Je(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",Kc({},h,{className:ut("recharts-cartesian-axis-line",ci(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=W2(Sn(Sn({},this.props),{},{ticks:r}),i,a),w=this.getTickTextAnchor(),x=this.getTickVerticalAnchor(),b=Je(this.props,!1),S=Je(d,!1),E=Sn(Sn({},b),{},{fill:"none"},Je(u,!1)),_=g.map(function(A,T){var O=o.getTickLineCoord(A),M=O.line,R=O.tick,P=Sn(Sn(Sn(Sn({textAnchor:w,verticalAnchor:x},b),{},{stroke:"none",fill:f},S),R),{},{index:T,payload:A,visibleTicksCount:g.length,tickFormatter:h});return ie.createElement(Jt,Kc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},_b(o.props,A,T)),u&&ie.createElement("line",Kc({},E,M,{className:ut("recharts-cartesian-axis-tick-line",ci(u,"className"))})),d&&t.renderTickItem(d,P,"".concat(Ye(h)?h(A.value,T):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=yj(h,I2e),w=m;return Ye(u)&&(w=m&&m.length>0?u(this.props):u(g)),o<=0||l<=0||!w||!w.length?null:ie.createElement(Jt,{className:ut("recharts-cartesian-axis",f),ref:function(b){r.layerReference=b}},a&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),Yn.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})):Ye(r)?o=r(Sn(Sn({},i),{},{className:l})):o=ie.createElement(kb,Kc({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(N.Component);Y2(Nd,"displayName","CartesianAxis");Y2(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 H2e=["x1","y1","x2","y2","key"],G2e=["offset"];function Nu(e){"@babel/helpers - typeof";return Nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nu(e)}function L8(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 Xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L8(Object(n),!0).forEach(function(r){K2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K2e(e,t,n){return t=W2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function W2e(e){var t=Y2e(e,"string");return Nu(t)=="symbol"?t:t+""}function Y2e(e,t){if(Nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}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 $8(e,t){if(e==null)return{};var n=X2e(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 X2e(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 fJ(e,t){var n;if(ie.isValidElement(e))n=ie.cloneElement(e,t);else if(Ye(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,u=$8(t,H2e),f=Je(u,!1);f.offset;var d=$8(f,G2e);n=ie.createElement("line",Gl({},d,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:l}))}return n}function Z2e(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=Xn(Xn({},e),{},{x1:t,y1:l,x2:t+n,y2:l,key:"line-".concat(u),index:u});return fJ(i,f)});return ie.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function J2e(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=Xn(Xn({},e),{},{x1:l,y1:t,x2:l,y2:t+n,key:"line-".concat(u),index:u});return fJ(i,f)});return ie.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function eke(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 w=!d[g+1],x=w?i+o-m:d[g+1]-m;if(x<=0)return null;var b=g%t.length;return ie.createElement("rect",{key:"react-".concat(g),y:m,x:r,height:x,width:a,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return ie.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function tke(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 w=!d[g+1],x=w?a+l-m:d[g+1]-m;if(x<=0)return null;var b=g%r.length;return ie.createElement("rect",{key:"react-".concat(g),x:m,y:o,width:x,height:u,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return ie.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var nke=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return AZ(W2(Xn(Xn(Xn({},Nd.defaultProps),r),{},{ticks:ro(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},rke=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return AZ(W2(Xn(Xn(Xn({},Nd.defaultProps),r),{},{ticks:ro(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},Lc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function HM(e){var t,n,r,i,a,o,l=U2(),u=H2(),f=UPe(),d=Xn(Xn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Lc.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Lc.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Lc.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Lc.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Lc.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Lc.verticalFill,x:_e(e.x)?e.x:f.left,y:_e(e.y)?e.y:f.top,width:_e(e.width)?e.width:f.width,height:_e(e.height)?e.height:f.height}),h=d.x,m=d.y,g=d.width,w=d.height,x=d.syncWithTicks,b=d.horizontalValues,S=d.verticalValues,E=zPe(),_=VPe();if(!_e(g)||g<=0||!_e(w)||w<=0||!_e(h)||h!==+h||!_e(m)||m!==+m)return null;var A=d.verticalCoordinatesGenerator||nke,T=d.horizontalCoordinatesGenerator||rke,O=d.horizontalPoints,M=d.verticalPoints;if((!O||!O.length)&&Ye(T)){var R=b&&b.length,P=T({yAxis:_?Xn(Xn({},_),{},{ticks:R?b:_.ticks}):void 0,width:l,height:u,offset:f},R?!0:x);so(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Nu(P),"]")),Array.isArray(P)&&(O=P)}if((!M||!M.length)&&Ye(A)){var $=S&&S.length,I=A({xAxis:E?Xn(Xn({},E),{},{ticks:$?S:E.ticks}):void 0,width:l,height:u,offset:f},$?!0:x);so(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Nu(I),"]")),Array.isArray(I)&&(M=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(Z2e,Gl({},d,{offset:f,horizontalPoints:O,xAxis:E,yAxis:_})),ie.createElement(J2e,Gl({},d,{offset:f,verticalPoints:M,xAxis:E,yAxis:_})),ie.createElement(eke,Gl({},d,{horizontalPoints:O})),ie.createElement(tke,Gl({},d,{verticalPoints:M})))}HM.displayName="CartesianGrid";var ike=["layout","type","stroke","connectNulls","isRange","ref"],ake=["key"],dJ;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 hJ(e,t){if(e==null)return{};var n=oke(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 oke(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 Kl(){return Kl=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},Kl.apply(this,arguments)}function B8(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 hs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B8(Object(n),!0).forEach(function(r){ua(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ske(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q8(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,mJ(r.key),r)}}function lke(e,t,n){return t&&q8(e.prototype,t),n&&q8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function uke(e,t,n){return t=d0(t),cke(e,pJ()?Reflect.construct(t,n||[],d0(e).constructor):t.apply(e,n))}function cke(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 fke(e)}function fke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pJ=function(){return!!e})()}function d0(e){return d0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},d0(e)}function dke(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&&GM(e,t)}function GM(e,t){return GM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},GM(e,t)}function ua(e,t,n){return t=mJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mJ(e){var t=hke(e,"string");return td(t)=="symbol"?t:t+""}function hke(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 wo=(function(e){function t(){var n;ske(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=uke(this,t,[].concat(i)),ua(n,"state",{isAnimationFinished:!0}),ua(n,"id",eg("recharts-area-")),ua(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Ye(o)&&o()}),ua(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Ye(o)&&o()}),n}return dke(t,e),lke(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=Je(this.props,!1),g=Je(f,!0),w=d.map(function(b,S){var E=hs(hs(hs({key:"dot-".concat(S),r:3},m),g),{},{index:S,cx:b.x,cy:b.y,dataKey:h,value:b.value,payload:b.payload,points:d});return t.renderDotItem(f,E)}),x={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return ie.createElement(Jt,Kl({className:"recharts-area-dots"},x),w)}},{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=Ps(o.map(function(m){return m.y||0}));return _e(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(Ps(a.map(function(m){return m.y||0})),h)),_e(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=Ps(o.map(function(m){return m.x||0}));return _e(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(Ps(a.map(function(m){return m.x||0})),h)),_e(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=hJ(l,ike);return ie.createElement(Jt,{clipPath:a?"url(#clipPath-".concat(o,")"):null},ie.createElement(dp,Kl({},Je(g,!0),{points:r,connectNulls:h,type:f,baseLine:i,layout:u,stroke:"none",className:"recharts-area-area"})),d!=="none"&&ie.createElement(dp,Kl({},Je(this.props,!1),{className:"recharts-area-curve",layout:u,type:f,connectNulls:h,fill:"none",points:r})),d!=="none"&&m&&ie.createElement(dp,Kl({},Je(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,w=this.state,x=w.prevPoints,b=w.prevBaseLine;return ie.createElement(xo,{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(x){var _=x.length/l.length,A=l.map(function(R,P){var $=Math.floor(P*_);if(x[$]){var I=x[$],k=si(I.x,R.x),V=si(I.y,R.y);return hs(hs({},R),{},{x:k(E),y:V(E)})}return R}),T;if(_e(u)&&typeof u=="number"){var O=si(b,u);T=O(E)}else if(at(u)||Td(u)){var M=si(b,0);T=M(E)}else T=u.map(function(R,P){var $=Math.floor(P*_);if(b[$]){var I=b[$],k=si(I.x,R.x),V=si(I.y,R.y);return hs(hs({},R),{},{x:k(E),y:V(E)})}return R});return a.renderAreaStatically(A,T,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,w=i.height,x=i.isAnimationActive,b=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,T=m&&m.allowDataOverflow,O=A||T,M=at(b)?this.id:b,R=(r=Je(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},P=R.r,$=P===void 0?3:P,I=R.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||T?ie.createElement("defs",null,ie.createElement("clipPath",{id:"clipPath-".concat(M)},ie.createElement("rect",{x:A?d:d-g/2,y:T?f:f-w/2,width:A?g:g*2,height:T?w:w*2})),!q&&ie.createElement("clipPath",{id:"clipPath-dots-".concat(M)},ie.createElement("rect",{x:d-L/2,y:f-L/2,width:g+L,height:w+L}))):null,E?null:this.renderArea(O,M),(o||E)&&this.renderDots(O,q,M),(!x||S)&&Fs.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}}])})(N.PureComponent);dJ=wo;ua(wo,"displayName","Area");ua(wo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Cd.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});ua(wo,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,l=o??a;if(_e(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]});ua(wo,"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,w=f&&f.length,x=dJ.getBaseValue(t,n,r,i),b=g==="horizontal",S=!1,E=h.map(function(A,T){var O;w?O=f[d+T]:(O=Ur(A,u),Array.isArray(O)?S=!0:O=[x,O]);var M=O[1]==null||w&&Ur(A,u)==null;return b?{x:vU({axis:r,ticks:a,bandSize:l,entry:A,index:T}),y:M?null:i.scale(O[1]),value:O,payload:A}:{x:M?null:r.scale(O[1]),y:vU({axis:i,ticks:o,bandSize:l,entry:A,index:T}),value:O,payload:A}}),_;return w||S?_=E.map(function(A){var T=Array.isArray(A.value)?A.value[0]:null;return b?{x:A.x,y:T!=null&&A.y!=null?i.scale(T):null}:{x:T!=null?r.scale(T):null,y:A.y}}):_=b?i.scale(x):r.scale(x),hs({points:E,baseLine:_,layout:g,isRange:S},m)});ua(wo,"renderDotItem",function(e,t){var n;if(ie.isValidElement(e))n=ie.cloneElement(e,t);else if(Ye(e))n=e(t);else{var r=ut("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=hJ(t,ake);n=ie.createElement(q2,Kl({},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 pke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mke(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 gke(e,t,n){return t&&mke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vke(e,t,n){return t=h0(t),yke(e,gJ()?Reflect.construct(t,n||[],h0(e).constructor):t.apply(e,n))}function yke(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 bke(e)}function bke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gJ=function(){return!!e})()}function h0(e){return h0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},h0(e)}function xke(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&&KM(e,t)}function KM(e,t){return KM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},KM(e,t)}function vJ(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=wke(e,"string");return nd(t)=="symbol"?t:t+""}function wke(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 WM(){return WM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WM.apply(this,arguments)}function Ske(e){var t=e.xAxisId,n=U2(),r=H2(),i=eJ(t);return i==null?null:N.createElement(Nd,WM({},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 pke(this,t),vke(this,t,arguments)}return xke(t,e),gke(t,[{key:"render",value:function(){return N.createElement(Ske,this.props)}}])})(N.Component);vJ(rd,"displayName","XAxis");vJ(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 _ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Eke(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 Ake(e,t,n){return t&&Eke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tke(e,t,n){return t=p0(t),Cke(e,bJ()?Reflect.construct(t,n||[],p0(e).constructor):t.apply(e,n))}function Cke(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 Oke(e)}function Oke(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 p0(e){return p0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},p0(e)}function jke(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&&YM(e,t)}function YM(e,t){return YM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YM(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=Nke(e,"string");return id(t)=="symbol"?t:t+""}function Nke(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 XM(){return XM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XM.apply(this,arguments)}var Mke=function(t){var n=t.yAxisId,r=U2(),i=H2(),a=tJ(n);return a==null?null:N.createElement(Nd,XM({},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 _ke(this,t),Tke(this,t,arguments)}return jke(t,e),Ake(t,[{key:"render",value:function(){return N.createElement(Mke,this.props)}}])})(N.Component);xJ(ad,"displayName","YAxis");xJ(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 z8(e){return Dke(e)||kke(e)||Pke(e)||Rke()}function Rke(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
463
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pke(e,t){if(e){if(typeof e=="string")return QM(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 QM(e,t)}}function kke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Dke(e){if(Array.isArray(e))return QM(e)}function QM(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 ZM=function(t,n,r,i,a){var o=$i(t,K2),l=$i(t,Wx),u=[].concat(z8(o),z8(l)),f=$i(t,Xx),d="".concat(i,"Id"),h=i[0],m=n;if(u.length&&(m=u.reduce(function(x,b){if(b.props[d]===r&&ha(b.props,"extendDomain")&&_e(b.props[h])){var S=b.props[h];return[Math.min(x[0],S),Math.max(x[1],S)]}return x},m)),f.length){var g="".concat(h,"1"),w="".concat(h,"2");m=f.reduce(function(x,b){if(b.props[d]===r&&ha(b.props,"extendDomain")&&_e(b.props[g])&&_e(b.props[w])){var S=b.props[g],E=b.props[w];return[Math.min(x[0],S,E),Math.max(x[1],S,E)]}return x},m)}return a&&a.length&&(m=a.reduce(function(x,b){return _e(b)?[Math.min(x[0],b),Math.max(x[1],b)]:x},m)),m},bj={exports:{}},V8;function Ike(){return V8||(V8=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),w=n?n+f:f;return u._events[w]?u._events[w].fn?u._events[w]=[u._events[w],g]:u._events[w].push(g):(u._events[w]=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,w=new Array(g);m<g;m++)w[m]=h[m].fn;return w},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,w){var x=n?n+f:f;if(!this._events[x])return!1;var b=this._events[x],S=arguments.length,E,_;if(b.fn){switch(b.once&&this.removeListener(f,b.fn,void 0,!0),S){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,h),!0;case 4:return b.fn.call(b.context,d,h,m),!0;case 5:return b.fn.call(b.context,d,h,m,g),!0;case 6:return b.fn.call(b.context,d,h,m,g,w),!0}for(_=1,E=new Array(S-1);_<S;_++)E[_-1]=arguments[_];b.fn.apply(b.context,E)}else{var A=b.length,T;for(_=0;_<A;_++)switch(b[_].once&&this.removeListener(f,b[_].fn,void 0,!0),S){case 1:b[_].fn.call(b[_].context);break;case 2:b[_].fn.call(b[_].context,d);break;case 3:b[_].fn.call(b[_].context,d,h);break;case 4:b[_].fn.call(b[_].context,d,h,m);break;default:if(!E)for(T=1,E=new Array(S-1);T<S;T++)E[T-1]=arguments[T];b[_].fn.apply(b[_].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 w=this._events[g];if(w.fn)w.fn===d&&(!m||w.once)&&(!h||w.context===h)&&o(this,g);else{for(var x=0,b=[],S=w.length;x<S;x++)(w[x].fn!==d||m&&!w[x].once||h&&w[x].context!==h)&&b.push(w[x]);b.length?this._events[g]=b.length===1?b[0]:b: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})(bj)),bj.exports}var Lke=Ike();const $ke=vt(Lke);var xj=new $ke,wj="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 Bke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qke(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,SJ(r.key),r)}}function zke(e,t,n){return t&&qke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sj(e,t,n){return t=SJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SJ(e){var t=Vke(e,"string");return ym(t)=="symbol"?t:t+""}function Vke(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 Fke=(function(){function e(){Bke(this,e),Sj(this,"activeIndex",0),Sj(this,"coordinateList",[]),Sj(this,"layout","horizontal")}return zke(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 Uke(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&&_e(r)&&_e(i))return!0}return!1}function Hke(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 _J(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=zn(t,n,r,i),l=zn(t,n,r,a);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function Gke(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=zn(l,u,f,h),g=zn(l,u,d,h);r=m.x,i=m.y,a=g.x,o=g.y}else return _J(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 F8(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 uy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F8(Object(n),!0).forEach(function(r){Kke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kke(e,t,n){return t=Wke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wke(e){var t=Yke(e,"string");return bm(t)=="symbol"?t:t+""}function Yke(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 Xke(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 w,x=dp;if(m==="ScatterChart")w=o,x=uRe;else if(m==="BarChart")w=Hke(h,o,u,d),x=B2;else if(h==="radial"){var b=_J(o),S=b.cx,E=b.cy,_=b.radius,A=b.startAngle,T=b.endAngle;w={cx:S,cy:E,startAngle:A,endAngle:T,innerRadius:_,outerRadius:_},x=NZ}else w={points:Gke(h,o,u)},x=dp;var O=uy(uy(uy(uy({stroke:"#ccc",pointerEvents:"none"},u),w),Je(g,!1)),{},{payload:l,payloadIndex:f,className:ut("recharts-tooltip-cursor",g.className)});return N.isValidElement(g)?N.cloneElement(g,O):N.createElement(x,O)}var Qke=["item"],Zke=["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 Wc(){return Wc=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},Wc.apply(this,arguments)}function U8(e,t){return tDe(e)||eDe(e,t)||AJ(e,t)||Jke()}function Jke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
464
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eDe(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 tDe(e){if(Array.isArray(e))return e}function H8(e,t){if(e==null)return{};var n=nDe(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 nDe(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 rDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iDe(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,TJ(r.key),r)}}function aDe(e,t,n){return t&&iDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oDe(e,t,n){return t=m0(t),sDe(e,EJ()?Reflect.construct(t,n||[],m0(e).constructor):t.apply(e,n))}function sDe(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 lDe(e)}function lDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EJ=function(){return!!e})()}function m0(e){return m0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},m0(e)}function uDe(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&&JM(e,t)}function JM(e,t){return JM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},JM(e,t)}function sd(e){return dDe(e)||fDe(e)||AJ(e)||cDe()}function cDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
465
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AJ(e,t){if(e){if(typeof e=="string")return eR(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 eR(e,t)}}function fDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dDe(e){if(Array.isArray(e))return eR(e)}function eR(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 G8(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?G8(Object(n),!0).forEach(function(r){$e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $e(e,t,n){return t=TJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TJ(e){var t=hDe(e,"string");return od(t)=="symbol"?t:t+""}function hDe(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 pDe={xAxis:["bottom","top"],yAxis:["left","right"]},mDe={width:"100%",height:"100%"},CJ={x:0,y:0};function cy(e){return e}var gDe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},vDe=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),zn(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var u=a.coordinate,f=i.angle;return me(me(me({},i),zn(i.cx,i.cy,u,f)),{},{angle:f,radius:u})}return CJ},Qx=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&&_e(i)&&_e(a)?t.slice(i,a+1):[]};function OJ(e){return e==="number"?[0,"auto"]:void 0}var tR=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,l=Qx(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),[CZ(f,m)]):u},[])},K8=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=gDe(a,r),l=t.orderedTooltipTicks,u=t.tooltipAxis,f=t.tooltipTicks,d=FOe(o,l,f,u);if(d>=0&&f){var h=f[d]&&f[d].value,m=tR(t,n,d,h),g=vDe(r,l,d,a);return{activeTooltipIndex:d,activeLabel:h,activePayload:m,activeCoordinate:g}}return null},yDe=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=EZ(d,a);return r.reduce(function(w,x){var b,S=x.type.defaultProps!==void 0?me(me({},x.type.defaultProps),x.props):x.props,E=S.type,_=S.dataKey,A=S.allowDataOverflow,T=S.allowDuplicatedCategory,O=S.scale,M=S.ticks,R=S.includeHidden,P=S[o];if(w[P])return w;var $=Qx(t.data,{graphicalItems:i.filter(function(F){var X,W=o in F.props?F.props[o]:(X=F.type.defaultProps)===null||X===void 0?void 0:X[o];return W===P}),dataStartIndex:u,dataEndIndex:f}),I=$.length,k,V,D;Uke(S.domain,A,E)&&(k=bM(S.domain,null,A),g&&(E==="number"||O!=="auto")&&(D=fp($,_,"category")));var q=OJ(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=wSe(k);T&&H?(V=k,k=n0(0,I)):T||(k=wU(z,k,x).reduce(function(F,X){return F.indexOf(X)>=0?F:[].concat(sd(F),[X])},[]))}else if(E==="category")T?k=k.filter(function(F){return F!==""&&!at(F)}):k=wU(z,k,x).reduce(function(F,X){return F.indexOf(X)>=0||X===""||at(X)?F:[].concat(sd(F),[X])},[]);else if(E==="number"){var Y=WOe($,i.filter(function(F){var X,W,G=o in F.props?F.props[o]:(X=F.type.defaultProps)===null||X===void 0?void 0:X[o],Z="hide"in F.props?F.props.hide:(W=F.type.defaultProps)===null||W===void 0?void 0:W.hide;return G===P&&(R||!Z)}),_,a,d);Y&&(k=Y)}g&&(E==="number"||O!=="auto")&&(D=fp($,_,"category"))}else g?k=n0(0,I):l&&l[P]&&l[P].hasStack&&E==="number"?k=m==="expand"?[0,1]:TZ(l[P].stackGroups,u,f):k=_Z($,i.filter(function(F){var X=o in F.props?F.props[o]:F.type.defaultProps[o],W="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return X===P&&(R||!W)}),E,d,!0);if(E==="number")k=ZM(h,k,P,a,M),z&&(k=bM(z,k,A));else if(E==="category"&&z){var Q=z,U=k.every(function(F){return Q.indexOf(F)>=0});U&&(k=Q)}}return me(me({},w),{},$e({},P,me(me({},S),{},{axisType:a,domain:k,categoricalDomain:D,duplicateDomain:V,originalDomain:(b=S.domain)!==null&&b!==void 0?b:q,isCategorical:g,layout:d})))},{})},bDe=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=Qx(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:f}),g=m.length,w=EZ(d,a),x=-1;return r.reduce(function(b,S){var E=S.type.defaultProps!==void 0?me(me({},S.type.defaultProps),S.props):S.props,_=E[o],A=OJ("number");if(!b[_]){x++;var T;return w?T=n0(0,g):l&&l[_]&&l[_].hasStack?(T=TZ(l[_].stackGroups,u,f),T=ZM(h,T,_,a)):(T=bM(A,_Z(m,r.filter(function(O){var M,R,P=o in O.props?O.props[o]:(M=O.type.defaultProps)===null||M===void 0?void 0:M[o],$="hide"in O.props?O.props.hide:(R=O.type.defaultProps)===null||R===void 0?void 0:R.hide;return P===_&&!$}),"number",d),i.defaultProps.allowDataOverflow),T=ZM(h,T,_,a)),me(me({},b),{},$e({},_,me(me({axisType:a},i.defaultProps),{},{hide:!0,orientation:ci(pDe,"".concat(a,".").concat(x%2),null),domain:T,originalDomain:A,isCategorical:w,layout:d})))}return b},{})},xDe=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=$i(d,a),g={};return m&&m.length?g=yDe(t,{axes:m,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:u,dataEndIndex:f}):o&&o.length&&(g=bDe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:u,dataEndIndex:f})),g},wDe=function(t){var n=bs(t),r=ro(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:m2(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Gb(n,r)}},W8=function(t){var n=t.children,r=t.defaultShowTooltip,i=Pr(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}},SDe=function(t){return!t||!t.length?!1:t.some(function(n){var r=oo(n&&n.type);return r&&r.indexOf("Bar")>=0})},Y8=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"}},_De=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=Pr(h,Yf),w=Pr(h,zs),x=Object.keys(u).reduce(function(T,O){var M=u[O],R=M.orientation;return!M.mirror&&!M.hide?me(me({},T),{},$e({},R,T[R]+M.width)):T},{left:m.left||0,right:m.right||0}),b=Object.keys(o).reduce(function(T,O){var M=o[O],R=M.orientation;return!M.mirror&&!M.hide?me(me({},T),{},$e({},R,ci(T,"".concat(R))+M.height)):T},{top:m.top||0,bottom:m.bottom||0}),S=me(me({},b),x),E=S.bottom;g&&(S.bottom+=g.props.height||Yf.defaultProps.height),w&&n&&(S=GOe(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)})},EDe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},jJ=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,T=E.offset,O=E.updateId,M=E.dataStartIndex,R=E.dataEndIndex,P=S.barSize,$=S.layout,I=S.barGap,k=S.barCategoryGap,V=S.maxBarSize,D=Y8($),q=D.numericAxisName,L=D.cateAxisName,z=SDe(_),H=[];return _.forEach(function(Y,Q){var U=Qx(S.data,{graphicalItems:[Y],dataStartIndex:M,dataEndIndex:R}),F=Y.type.defaultProps!==void 0?me(me({},Y.type.defaultProps),Y.props):Y.props,X=F.dataKey,W=F.maxBarSize,G=F["".concat(q,"Id")],Z=F["".concat(L,"Id")],J={},re=u.reduce(function(Ht,Mt){var Et=E["".concat(Mt.axisType,"Map")],At=F["".concat(Mt.axisType,"Id")];Et&&Et[At]||Mt.axisType==="zAxis"||ju();var He=Et[At];return me(me({},Ht),{},$e($e({},Mt.axisType,He),"".concat(Mt.axisType,"Ticks"),ro(He)))},J),ne=re[L],fe=re["".concat(L,"Ticks")],he=A&&A[G]&&A[G].hasStack&&oje(Y,A[G].stackGroups),oe=oo(Y.type).indexOf("Bar")>=0,ye=Gb(ne,fe),xe=[],we=z&&UOe({barSize:P,stackGroups:A,totalSize:EDe(re,L)});if(oe){var Te,Ee,tt=at(W)?V:W,nt=(Te=(Ee=Gb(ne,fe,!0))!==null&&Ee!==void 0?Ee:tt)!==null&&Te!==void 0?Te:0;xe=HOe({barGap:I,barCategoryGap:k,bandSize:nt!==ye?nt:ye,sizeList:we[Z],maxBarSize:tt}),nt!==ye&&(xe=xe.map(function(Ht){return me(me({},Ht),{},{position:me(me({},Ht.position),{},{offset:Ht.position.offset-nt/2})})}))}var It=Y&&Y.type&&Y.type.getComposedData;It&&H.push({props:me(me({},It(me(me({},re),{},{displayedData:U,props:S,dataKey:X,item:Y,bandSize:ye,barPosition:xe,offset:T,stackedData:he,layout:$,dataStartIndex:M,dataEndIndex:R}))),{},$e($e($e({key:Y.key||"item-".concat(Q)},q,re[q]),L,re[L]),"animationId",O)),childIndex:kSe(Y,S.children),item:Y})}),H},g=function(S,E){var _=S.props,A=S.dataStartIndex,T=S.dataEndIndex,O=S.updateId;if(!qF({props:_}))return null;var M=_.children,R=_.layout,P=_.stackOffset,$=_.data,I=_.reverseStackOrder,k=Y8(R),V=k.numericAxisName,D=k.cateAxisName,q=$i(M,r),L=rje($,q,"".concat(V,"Id"),"".concat(D,"Id"),P,I),z=u.reduce(function(F,X){var W="".concat(X.axisType,"Map");return me(me({},F),{},$e({},W,xDe(_,me(me({},X),{},{graphicalItems:q,stackGroups:X.axisType===V&&L,dataStartIndex:A,dataEndIndex:T}))))},{}),H=_De(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")],Q=wDe(Y),U=m(_,me(me({},z),{},{dataStartIndex:A,dataEndIndex:T,updateId:O,graphicalItems:q,stackGroups:L,offset:H}));return me(me({formattedGraphicalItems:U,graphicalItems:q,offset:H,stackGroups:L},Q),z)},w=(function(b){function S(E){var _,A,T;return rDe(this,S),T=oDe(this,S,[E]),$e(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),$e(T,"accessibilityManager",new Fke),$e(T,"handleLegendBBoxUpdate",function(O){if(O){var M=T.state,R=M.dataStartIndex,P=M.dataEndIndex,$=M.updateId;T.setState(me({legendBBox:O},g({props:T.props,dataStartIndex:R,dataEndIndex:P,updateId:$},me(me({},T.state),{},{legendBBox:O}))))}}),$e(T,"handleReceiveSyncEvent",function(O,M,R){if(T.props.syncId===O){if(R===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(M)}}),$e(T,"handleBrushChange",function(O){var M=O.startIndex,R=O.endIndex;if(M!==T.state.dataStartIndex||R!==T.state.dataEndIndex){var P=T.state.updateId;T.setState(function(){return me({dataStartIndex:M,dataEndIndex:R},g({props:T.props,dataStartIndex:M,dataEndIndex:R,updateId:P},T.state))}),T.triggerSyncEvent({dataStartIndex:M,dataEndIndex:R})}}),$e(T,"handleMouseEnter",function(O){var M=T.getMouseInfo(O);if(M){var R=me(me({},M),{},{isTooltipActive:!0});T.setState(R),T.triggerSyncEvent(R);var P=T.props.onMouseEnter;Ye(P)&&P(R,O)}}),$e(T,"triggeredAfterMouseMove",function(O){var M=T.getMouseInfo(O),R=M?me(me({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(R),T.triggerSyncEvent(R);var P=T.props.onMouseMove;Ye(P)&&P(R,O)}),$e(T,"handleItemMouseEnter",function(O){T.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),$e(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),$e(T,"handleMouseMove",function(O){O.persist(),T.throttleTriggeredAfterMouseMove(O)}),$e(T,"handleMouseLeave",function(O){T.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};T.setState(M),T.triggerSyncEvent(M);var R=T.props.onMouseLeave;Ye(R)&&R(M,O)}),$e(T,"handleOuterEvent",function(O){var M=PSe(O),R=ci(T.props,"".concat(M));if(M&&Ye(R)){var P,$;/.*touch.*/i.test(M)?$=T.getMouseInfo(O.changedTouches[0]):$=T.getMouseInfo(O),R((P=$)!==null&&P!==void 0?P:{},O)}}),$e(T,"handleClick",function(O){var M=T.getMouseInfo(O);if(M){var R=me(me({},M),{},{isTooltipActive:!0});T.setState(R),T.triggerSyncEvent(R);var P=T.props.onClick;Ye(P)&&P(R,O)}}),$e(T,"handleMouseDown",function(O){var M=T.props.onMouseDown;if(Ye(M)){var R=T.getMouseInfo(O);M(R,O)}}),$e(T,"handleMouseUp",function(O){var M=T.props.onMouseUp;if(Ye(M)){var R=T.getMouseInfo(O);M(R,O)}}),$e(T,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),$e(T,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&T.handleMouseDown(O.changedTouches[0])}),$e(T,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&T.handleMouseUp(O.changedTouches[0])}),$e(T,"handleDoubleClick",function(O){var M=T.props.onDoubleClick;if(Ye(M)){var R=T.getMouseInfo(O);M(R,O)}}),$e(T,"handleContextMenu",function(O){var M=T.props.onContextMenu;if(Ye(M)){var R=T.getMouseInfo(O);M(R,O)}}),$e(T,"triggerSyncEvent",function(O){T.props.syncId!==void 0&&xj.emit(wj,T.props.syncId,O,T.eventEmitterSymbol)}),$e(T,"applySyncEvent",function(O){var M=T.props,R=M.layout,P=M.syncMethod,$=T.state.updateId,I=O.dataStartIndex,k=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)T.setState(me({dataStartIndex:I,dataEndIndex:k},g({props:T.props,dataStartIndex:I,dataEndIndex:k,updateId:$},T.state)));else if(O.activeTooltipIndex!==void 0){var V=O.chartX,D=O.chartY,q=O.activeTooltipIndex,L=T.state,z=L.offset,H=L.tooltipTicks;if(!z)return;if(typeof P=="function")q=P(H,O);else if(P==="value"){q=-1;for(var Y=0;Y<H.length;Y++)if(H[Y].value===O.activeLabel){q=Y;break}}var Q=me(me({},z),{},{x:z.left,y:z.top}),U=Math.min(V,Q.x+Q.width),F=Math.min(D,Q.y+Q.height),X=H[q]&&H[q].value,W=tR(T.state,T.props.data,q),G=H[q]?{x:R==="horizontal"?H[q].coordinate:U,y:R==="horizontal"?F:H[q].coordinate}:CJ;T.setState(me(me({},O),{},{activeLabel:X,activeCoordinate:G,activePayload:W,activeTooltipIndex:q}))}else T.setState(O)}),$e(T,"renderCursor",function(O){var M,R=T.state,P=R.isTooltipActive,$=R.activeCoordinate,I=R.activePayload,k=R.offset,V=R.activeTooltipIndex,D=R.tooltipAxisBandSize,q=T.getTooltipEventType(),L=(M=O.props.active)!==null&&M!==void 0?M:P,z=T.props.layout,H=O.key||"_recharts-cursor";return ie.createElement(Xke,{key:H,activeCoordinate:$,activePayload:I,activeTooltipIndex:V,chartName:n,element:O,isActive:L,layout:z,offset:k,tooltipAxisBandSize:D,tooltipEventType:q})}),$e(T,"renderPolarAxis",function(O,M,R){var P=ci(O,"type.axisType"),$=ci(T.state,"".concat(P,"Map")),I=O.type.defaultProps,k=I!==void 0?me(me({},I),O.props):O.props,V=$&&$[k["".concat(P,"Id")]];return N.cloneElement(O,me(me({},V),{},{className:ut(P,V.className),key:O.key||"".concat(M,"-").concat(R),ticks:ro(V,!0)}))}),$e(T,"renderPolarGrid",function(O){var M=O.props,R=M.radialLines,P=M.polarAngles,$=M.polarRadius,I=T.state,k=I.radiusAxisMap,V=I.angleAxisMap,D=bs(k),q=bs(V),L=q.cx,z=q.cy,H=q.innerRadius,Y=q.outerRadius;return N.cloneElement(O,{polarAngles:Array.isArray(P)?P:ro(q,!0).map(function(Q){return Q.coordinate}),polarRadius:Array.isArray($)?$:ro(D,!0).map(function(Q){return Q.coordinate}),cx:L,cy:z,innerRadius:H,outerRadius:Y,key:O.key||"polar-grid",radialLines:R})}),$e(T,"renderLegend",function(){var O=T.state.formattedGraphicalItems,M=T.props,R=M.children,P=M.width,$=M.height,I=T.props.margin||{},k=P-(I.left||0)-(I.right||0),V=wZ({children:R,formattedGraphicalItems:O,legendWidth:k,legendContent:f});if(!V)return null;var D=V.item,q=H8(V,Qke);return N.cloneElement(D,me(me({},q),{},{chartWidth:P,chartHeight:$,margin:I,onBBoxUpdate:T.handleLegendBBoxUpdate}))}),$e(T,"renderTooltip",function(){var O,M=T.props,R=M.children,P=M.accessibilityLayer,$=Pr(R,ji);if(!$)return null;var I=T.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 N.cloneElement($,{viewBox:me(me({},L),{},{x:L.left,y:L.top}),active:z,label:q,payload:z?D:[],coordinate:V,accessibilityLayer:P})}),$e(T,"renderBrush",function(O){var M=T.props,R=M.margin,P=M.data,$=T.state,I=$.offset,k=$.dataStartIndex,V=$.dataEndIndex,D=$.updateId;return N.cloneElement(O,{key:O.key||"_recharts-brush",onChange:ay(T.handleBrushChange,O.props.onChange),data:P,x:_e(O.props.x)?O.props.x:I.left,y:_e(O.props.y)?O.props.y:I.top+I.height+I.brushBottom-(R.bottom||0),width:_e(O.props.width)?O.props.width:I.width,startIndex:k,endIndex:V,updateId:"brush-".concat(D)})}),$e(T,"renderReferenceElement",function(O,M,R){if(!O)return null;var P=T,$=P.clipPathId,I=T.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,Q=Y===void 0?q.yAxisId:Y;return N.cloneElement(O,{key:O.key||"".concat(M,"-").concat(R),xAxis:k[H],yAxis:V[Q],viewBox:{x:D.left,y:D.top,width:D.width,height:D.height},clipPathId:$})}),$e(T,"renderActivePoints",function(O){var M=O.item,R=O.activePoint,P=O.basePoint,$=O.childIndex,I=O.isRange,k=[],V=M.props.key,D=M.item.type.defaultProps!==void 0?me(me({},M.item.type.defaultProps),M.item.props):M.item.props,q=D.activeDot,L=D.dataKey,z=me(me({index:$,dataKey:L,cx:R.x,cy:R.y,r:4,fill:$2(M.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},Je(q,!1)),Sb(q));return k.push(S.renderActiveDot(q,z,"".concat(V,"-activePoint-").concat($))),P?k.push(S.renderActiveDot(q,me(me({},z),{},{cx:P.x,cy:P.y}),"".concat(V,"-basePoint-").concat($))):I&&k.push(null),k}),$e(T,"renderGraphicChild",function(O,M,R){var P=T.filterFormatItem(O,M,R);if(!P)return null;var $=T.getTooltipEventType(),I=T.state,k=I.isTooltipActive,V=I.tooltipAxis,D=I.activeTooltipIndex,q=I.activeLabel,L=T.props.children,z=Pr(L,ji),H=P.props,Y=H.points,Q=H.isRange,U=H.baseLine,F=P.item.type.defaultProps!==void 0?me(me({},P.item.type.defaultProps),P.item.props):P.item.props,X=F.activeDot,W=F.hide,G=F.activeBar,Z=F.activeShape,J=!!(!W&&k&&z&&(X||G||Z)),re={};$!=="axis"&&z&&z.props.trigger==="click"?re={onClick:ay(T.handleItemMouseEnter,O.props.onClick)}:$!=="axis"&&(re={onMouseLeave:ay(T.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:ay(T.handleItemMouseEnter,O.props.onMouseEnter)});var ne=N.cloneElement(O,me(me({},P.props),re));function fe(Mt){return typeof V.dataKey=="function"?V.dataKey(Mt.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=Q&&U&&wb(U,ye,q)}else he=Y==null?void 0:Y[D],oe=Q&&U&&U[D];if(Z||G){var xe=O.props.activeIndex!==void 0?O.props.activeIndex:D;return[N.cloneElement(O,me(me(me({},P.props),re),{},{activeIndex:xe})),null,null]}if(!at(he))return[ne].concat(sd(T.renderActivePoints({item:P,activePoint:he,basePoint:oe,childIndex:D,isRange:Q})))}else{var we,Te=(we=T.getItemByXY(T.state.activeCoordinate))!==null&&we!==void 0?we:{graphicalItem:ne},Ee=Te.graphicalItem,tt=Ee.item,nt=tt===void 0?O:tt,It=Ee.childIndex,Ht=me(me(me({},P.props),re),{},{activeIndex:It});return[N.cloneElement(nt,Ht),null,null]}return Q?[ne,null,null]:[ne,null]}),$e(T,"renderCustomized",function(O,M,R){return N.cloneElement(O,me(me({key:"recharts-customized-".concat(R)},T.props),T.state))}),$e(T,"renderMap",{CartesianGrid:{handler:cy,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:cy},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:cy},YAxis:{handler:cy},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((_=E.id)!==null&&_!==void 0?_:eg("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=AQ(T.triggeredAfterMouseMove,(A=E.throttleDelay)!==null&&A!==void 0?A:1e3/60),T.state={},T}return uDe(S,b),aDe(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,T=_.data,O=_.height,M=_.layout,R=Pr(A,ji);if(R){var P=R.props.defaultIndex;if(!(typeof P!="number"||P<0||P>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[P]&&this.state.tooltipTicks[P].value,I=tR(this.state,T,P,$),k=this.state.tooltipTicks[P].coordinate,V=(this.state.offset.top+O)/2,D=M==="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[P].tooltipPosition),I=L.props.points[P].tooltipPayload);var z={activeTooltipIndex:P,isTooltipActive:!0,activeLabel:$,activePayload:I,activeCoordinate:q};this.setState(z),this.renderCursor(R),this.accessibilityManager.setIndex(P)}}}},{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 T,O;this.accessibilityManager.setDetails({offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(_){FN([Pr(_.children,ji)],[Pr(this.props.children,ji)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=Pr(this.props.children,ji);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,T=A.getBoundingClientRect(),O=lAe(T),M={chartX:Math.round(_.pageX-O.left),chartY:Math.round(_.pageY-O.top)},R=T.width/A.offsetWidth||1,P=this.inRange(M.chartX,M.chartY,R);if(!P)return null;var $=this.state,I=$.xAxisMap,k=$.yAxisMap,V=this.getTooltipEventType(),D=K8(this.state,this.props.data,this.props.layout,P);if(V!=="axis"&&I&&k){var q=bs(I).scale,L=bs(k).scale,z=q&&q.invert?q.invert(M.chartX):null,H=L&&L.invert?L.invert(M.chartY):null;return me(me({},M),{},{xValue:z,yValue:H},D)}return D?me(me({},M),D):null}},{key:"inRange",value:function(_,A){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,M=_/T,R=A/T;if(O==="horizontal"||O==="vertical"){var P=this.state.offset,$=M>=P.left&&M<=P.left+P.width&&R>=P.top&&R<=P.top+P.height;return $?{x:M,y:R}:null}var I=this.state,k=I.angleAxisMap,V=I.radiusAxisMap;if(k&&V){var D=bs(k);return EU({x:M,y:R},D)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,A=this.getTooltipEventType(),T=Pr(_,ji),O={};T&&A==="axis"&&(T.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 M=Sb(this.props,this.handleOuterEvent);return me(me({},M),O)}},{key:"addListener",value:function(){xj.on(wj,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){xj.removeListener(wj,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,A,T){for(var O=this.state.formattedGraphicalItems,M=0,R=O.length;M<R;M++){var P=O[M];if(P.item===_||P.props.key===_.key||A===oo(P.item.type)&&T===P.childIndex)return P}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,A=this.state.offset,T=A.left,O=A.top,M=A.height,R=A.width;return ie.createElement("defs",null,ie.createElement("clipPath",{id:_},ie.createElement("rect",{x:T,y:O,height:M,width:R})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(A,T){var O=U8(T,2),M=O[0],R=O[1];return me(me({},A),{},$e({},M,R.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(A,T){var O=U8(T,2),M=O[0],R=O[1];return me(me({},A),{},$e({},M,R.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,T=A.formattedGraphicalItems,O=A.activeItem;if(T&&T.length)for(var M=0,R=T.length;M<R;M++){var P=T[M],$=P.props,I=P.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 JMe(_,H)});if(D)return{graphicalItem:P,payload:D}}else if(V==="RadialBar"){var q=($.data||[]).find(function(H){return EU(_,H)});if(q)return{graphicalItem:P,payload:q}}else if(Ux(P,O)||Hx(P,O)||hm(P,O)){var L=zRe({graphicalItem:P,activeTooltipItem:O,itemData:k.data}),z=k.activeIndex===void 0?L:k.activeIndex;return{graphicalItem:me(me({},P),{},{childIndex:z}),payload:hm(P,O)?k.data[L]:P.props.data[L]}}}return null}},{key:"render",value:function(){var _=this;if(!qF(this))return null;var A=this.props,T=A.children,O=A.className,M=A.width,R=A.height,P=A.style,$=A.compact,I=A.title,k=A.desc,V=H8(A,Zke),D=Je(V,!1);if($)return ie.createElement(T8,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ie.createElement(HN,Wc({},D,{width:M,height:R,title:I,desc:k}),this.renderClipPath(),VF(T,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(T8,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ie.createElement("div",Wc({className:ut("recharts-wrapper",O),style:me({position:"relative",cursor:"default",width:M,height:R},P)},z,{ref:function(Y){_.container=Y}}),ie.createElement(HN,Wc({},D,{width:M,height:R,title:I,desc:k,style:mDe}),this.renderClipPath(),VF(T,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(N.Component);$e(w,"displayName",n),$e(w,"defaultProps",me({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),$e(w,"getDerivedStateFromProps",function(b,S){var E=b.dataKey,_=b.data,A=b.children,T=b.width,O=b.height,M=b.layout,R=b.stackOffset,P=b.margin,$=S.dataStartIndex,I=S.dataEndIndex;if(S.updateId===void 0){var k=W8(b);return me(me(me({},k),{},{updateId:0},g(me(me({props:b},k),{},{updateId:0}),S)),{},{prevDataKey:E,prevData:_,prevWidth:T,prevHeight:O,prevLayout:M,prevStackOffset:R,prevMargin:P,prevChildren:A})}if(E!==S.prevDataKey||_!==S.prevData||T!==S.prevWidth||O!==S.prevHeight||M!==S.prevLayout||R!==S.prevStackOffset||!of(P,S.prevMargin)){var V=W8(b),D={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},q=me(me({},K8(S,_,M)),{},{updateId:S.updateId+1}),L=me(me(me({},V),D),q);return me(me(me({},L),g(me({props:b},L),S)),{},{prevDataKey:E,prevData:_,prevWidth:T,prevHeight:O,prevLayout:M,prevStackOffset:R,prevMargin:P,prevChildren:A})}if(!FN(A,S.prevChildren)){var z,H,Y,Q,U=Pr(A,Yf),F=U&&(z=(H=U.props)===null||H===void 0?void 0:H.startIndex)!==null&&z!==void 0?z:$,X=U&&(Y=(Q=U.props)===null||Q===void 0?void 0:Q.endIndex)!==null&&Y!==void 0?Y:I,W=F!==$||X!==I,G=!at(_),Z=G&&!W?S.updateId:S.updateId+1;return me(me({updateId:Z},g(me(me({props:b},S),{},{updateId:Z,dataStartIndex:F,dataEndIndex:X}),S)),{},{prevChildren:A,dataStartIndex:F,dataEndIndex:X})}return null}),$e(w,"renderActiveDot",function(b,S,E){var _;return N.isValidElement(b)?_=N.cloneElement(b,S):Ye(b)?_=b(S):_=ie.createElement(q2,S),ie.createElement(Jt,{className:"recharts-active-dot",key:E},_)});var x=N.forwardRef(function(S,E){return ie.createElement(w,Wc({},S,{ref:E}))});return x.displayName=w.displayName,x},ADe=jJ({chartName:"BarChart",GraphicalChild:Zs,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:rd},{axisType:"yAxis",AxisComp:ad}],formatAxisMap:GZ}),TDe=jJ({chartName:"AreaChart",GraphicalChild:wo,axisComponents:[{axisType:"xAxis",AxisComp:rd},{axisType:"yAxis",AxisComp:ad}],formatAxisMap:GZ});const NJ=N.createContext(null);function CDe(){const e=N.useContext(NJ);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const nR=N.forwardRef(({config:e,children:t,className:n,style:r,...i},a)=>{const o=N.useMemo(()=>{const l={};for(const[u,f]of Object.entries(e))f.color&&(l[`--color-${u}`]=f.color);return l},[e]);return y.jsx(NJ.Provider,{value:{config:e},children:y.jsx("div",{ref:a,className:be("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:y.jsx(tAe,{width:"100%",height:"100%",children:t})})})});nR.displayName="ChartContainer";const ODe=N.forwardRef(({active:e,payload:t,label:n,hideLabel:r=!1,indicator:i="dot",className:a},o)=>{const{config:l}=CDe();return!e||!(t!=null&&t.length)?null:y.jsxs("div",{ref:o,className:be("border bg-background px-3 py-2 text-xs shadow-md",a),children:[!r&&n&&y.jsx("div",{className:"mb-1.5 font-medium",children:n}),y.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 y.jsxs("div",{className:"flex items-center gap-2",children:[i==="dot"&&y.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:m}}),i==="line"&&y.jsx("div",{className:"h-0.5 w-3",style:{backgroundColor:m}}),y.jsxs("span",{className:"text-muted-foreground",children:[(h==null?void 0:h.label)||d,":"]}),y.jsx("span",{className:"font-medium",children:u.value})]},f.toString())})})]})});ODe.displayName="ChartTooltipContent";const jDe={completed:{label:"Completed",color:"hsl(var(--chart-completed))"},failed:{label:"Failed",color:"hsl(var(--chart-failed))"}},NDe={duration:{label:"Duration",color:"hsl(var(--chart-duration))"},waitTime:{label:"Wait Time",color:"hsl(var(--chart-wait))"}};function MJ(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function X8(e){return new Date(e).toLocaleTimeString([],{hour:"numeric"})}function RJ(e){return`${(e*100).toFixed(1)}%`}function MDe({active:e,payload:t,label:n}){return!e||!t||!n?null:y.jsxs("div",{className:" border bg-popover px-3 py-2 text-popover-foreground shadow-md",children:[y.jsx("p",{className:"text-xs font-medium mb-1.5",children:MJ(n)}),y.jsx("div",{className:"space-y-1",children:t.map(r=>y.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[y.jsx("span",{className:"h-2 w-2 shrink-0",style:{backgroundColor:r.color}}),y.jsxs("span",{className:"text-muted-foreground",children:[r.name,":"]}),y.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 y.jsxs("div",{className:" border bg-popover px-3 py-2 text-popover-foreground shadow-md",children:[y.jsx("p",{className:"text-xs font-medium mb-1.5",children:MJ(n)}),y.jsx("div",{className:"space-y-1",children:t.map(i=>{const a=i.dataKey?r(i.dataKey,i.color):i.color;return y.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[y.jsx("span",{className:"h-2 w-2 shrink-0",style:{backgroundColor:a}}),y.jsxs("span",{className:"text-muted-foreground",children:[i.name,":"]}),y.jsx("span",{className:"font-medium tabular-nums",children:wr(i.value)})]},i.name)})})]})}function PDe({jobs:e}){return e.length===0?y.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No completed jobs in the last 24 hours"}):y.jsx("div",{className:"divide-y divide-border",children:e.map((t,n)=>y.jsxs(HR,{to:"/queues/$queueName/jobs/$jobId",params:{queueName:t.queueName,jobId:t.jobId},className:"flex items-center justify-between px-4 py-2.5",children:[y.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[y.jsx("span",{className:"text-xs text-muted-foreground w-5 tabular-nums shrink-0",children:n+1}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"text-sm font-medium truncate",children:t.name}),y.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:t.queueName})]})]}),y.jsx(go,{variant:"outline",className:"font-mono text-xs shrink-0",children:wr(t.duration)})]},`${t.queueName}-${t.jobId}`))})}function kDe({jobs:e}){return e.length===0?y.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No failed jobs in the last 24 hours"}):y.jsx("div",{className:"divide-y divide-border",children:e.map((t,n)=>y.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",children:[y.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[y.jsx("span",{className:"text-xs text-muted-foreground w-5 tabular-nums shrink-0",children:n+1}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"text-sm font-medium truncate",children:t.name}),y.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:t.queueName})]})]}),y.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[y.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[t.failCount,"/",t.totalCount]}),y.jsx(go,{variant:"outline",className:be("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:RJ(t.errorRate)})]})]},`${t.queueName}-${t.name}`))})}function DDe(){return y.jsxs("div",{className:"space-y-6",children:[y.jsx("div",{className:"grid grid-cols-4 gap-4",children:["throughput","error-rate","duration","wait-time"].map(e=>y.jsxs("div",{className:" border p-4 space-y-3",children:[y.jsx(Mn,{className:"h-4 w-20"}),y.jsx(Mn,{className:"h-8 w-24"}),y.jsx(Mn,{className:"h-6 w-20"})]},e))}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:" border p-4 space-y-3",children:[y.jsx(Mn,{className:"h-4 w-32"}),y.jsx(Mn,{className:"h-48 w-full"})]}),y.jsxs("div",{className:" border p-4 space-y-3",children:[y.jsx(Mn,{className:"h-4 w-32"}),y.jsx(Mn,{className:"h-48 w-full"})]})]})]})}function IDe(){const{data:e,isLoading:t,error:n}=_de();if(t)return y.jsx(DDe,{});if(n||!e)return y.jsx("div",{className:" border border-destructive/50 bg-destructive/10 p-4",children:y.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((T,O)=>T+O.completed,0),m=d.reduce((T,O)=>T+O.completed,0),g=f.reduce((T,O)=>T+O.failed,0),w=d.reduce((T,O)=>T+O.failed,0),x=l.map(T=>({hour:T.hour,completed:T.completed,failed:T.failed})),b=l.map(T=>({hour:T.hour,duration:T.avgDuration,waitTime:T.avgWaitTime})),S=l.map(T=>T.completed+T.failed),E=l.map(T=>T.completed+T.failed>0?T.failed/(T.completed+T.failed):0),_=l.map(T=>T.avgDuration),A=l.map(T=>T.avgWaitTime);return y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[y.jsx(Jv,{title:"Throughput",value:o.throughputPerHour.toLocaleString(),subtitle:"jobs/hour avg",sparklineData:S,sparklineColor:"default",trend:{current:m+w,previous:h+g,higherIsBetter:!0},icon:y.jsx(kce,{className:"h-4 w-4"})}),y.jsx(Jv,{title:"Error Rate",value:RJ(o.errorRate),subtitle:`${o.totalFailed} failed`,sparklineData:E,sparklineColor:o.errorRate>.1?"danger":"success",trend:{current:w,previous:g,higherIsBetter:!1},icon:y.jsx(L3,{className:"h-4 w-4"})}),y.jsx(Jv,{title:"Avg Duration",value:wr(o.avgDuration),subtitle:"processing time",sparklineData:_,sparklineColor:"default",icon:y.jsx(_7,{className:"h-4 w-4"})}),y.jsx(Jv,{title:"Avg Wait Time",value:wr(o.avgWaitTime),subtitle:"queue delay",sparklineData:A,sparklineColor:o.avgWaitTime>6e4?"warning":"default",icon:y.jsx(Nce,{className:"h-4 w-4"})})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"border border-dashed bg-card p-4",children:[y.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[y.jsx(p7,{className:"h-4 w-4 text-muted-foreground"}),"Job Throughput"]}),y.jsx(nR,{config:jDe,className:"h-52 w-full",children:y.jsxs(TDe,{data:x,children:[y.jsx(HM,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",strokeOpacity:.5}),y.jsx(rd,{dataKey:"hour",tickFormatter:X8,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),y.jsx(ad,{tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:32}),y.jsx(ji,{content:y.jsx(MDe,{})}),y.jsx(zs,{verticalAlign:"top",height:32,iconType:"square",iconSize:8,wrapperStyle:{fontSize:12},formatter:T=>y.jsx("span",{style:{color:"hsl(var(--foreground))"},children:T})}),y.jsxs("defs",{children:[y.jsxs("linearGradient",{id:"completedGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[y.jsx("stop",{offset:"0%",stopColor:"var(--color-completed)",stopOpacity:.5}),y.jsx("stop",{offset:"100%",stopColor:"var(--color-completed)",stopOpacity:.05})]}),y.jsxs("pattern",{id:"failedPattern",x:"0",y:"0",width:"6",height:"6",patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:"6",height:"6",fill:"var(--color-failed)",fillOpacity:.15}),y.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"})]})]}),y.jsx(wo,{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"}}),y.jsx(wo,{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"}})]})})]}),y.jsxs("div",{className:"border border-dashed bg-card p-4",children:[y.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[y.jsx(Li,{className:"h-4 w-4 text-muted-foreground"}),"Processing Time"]}),y.jsx(nR,{config:NDe,className:"h-52 w-full",children:y.jsxs(ADe,{data:b,children:[y.jsx(HM,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",strokeOpacity:.5}),y.jsx(rd,{dataKey:"hour",tickFormatter:X8,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),y.jsx(ad,{tickFormatter:T=>wr(T),tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:48}),y.jsx(ji,{content:y.jsx(RDe,{}),cursor:!1}),y.jsx(zs,{verticalAlign:"top",height:32,iconType:"square",iconSize:8,wrapperStyle:{fontSize:12},formatter:T=>y.jsx("span",{style:{color:"hsl(var(--foreground))"},children:T})}),y.jsx(Zs,{dataKey:"duration",name:"Duration",fill:"hsl(210, 90%, 50%)",radius:[0,0,0,0],style:{outline:"none"},isAnimationActive:!1}),y.jsx(Zs,{dataKey:"waitTime",name:"Wait Time",fill:"hsl(45, 95%, 50%)",radius:[0,0,0,0],style:{outline:"none"},isAnimationActive:!1})]})})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsxs("div",{className:"border border-dashed bg-card",children:[y.jsx("div",{className:"border-b border-dashed px-4 py-3",children:y.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[y.jsx(Li,{className:"h-4 w-4 text-muted-foreground"}),"Slowest Jobs"]})}),y.jsx(PDe,{jobs:i})]}),y.jsxs("div",{className:"border border-dashed bg-card",children:[y.jsx("div",{className:"border-b border-dashed px-4 py-3",children:y.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[y.jsx(L3,{className:"h-4 w-4 text-muted-foreground"}),"Most Failing Job Types"]})}),y.jsx(kDe,{jobs:a})]})]})]})}const X2=N.createContext({});function Q2(e){const t=N.useRef(null);return t.current===null&&(t.current=e()),t.current}const LDe=typeof window<"u",PJ=LDe?N.useLayoutEffect:N.useEffect,Zx=N.createContext(null);function Z2(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 va=(e,t,n)=>n>t?t:n<e?e:n;let J2=()=>{};const Js={},kJ=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),DJ=e=>typeof e=="object"&&e!==null,IJ=e=>/^0[^.\s]+$/u.test(e);function LJ(e){let t;return()=>(t===void 0&&(t=e()),t)}const fi=e=>e,ig=(...e)=>e.reduce((t,n)=>r=>n(t(r))),xm=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class ek{constructor(){this.subscriptions=[]}add(t){return Z2(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,ui=e=>e/1e3,$J=(e,t)=>t?e*(1e3/t):0,BJ=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,$De=1e-7,BDe=12;function qDe(e,t,n,r,i){let a,o,l=0;do o=t+(n-t)/2,a=BJ(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>$De&&++l<BDe);return o}function ag(e,t,n,r){if(e===t&&n===r)return fi;const i=a=>qDe(a,0,1,e,n);return a=>a===0||a===1?a:BJ(i(a),t,r)}const qJ=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zJ=e=>t=>1-e(1-t),VJ=ag(.33,1.53,.69,.99),tk=zJ(VJ),FJ=qJ(tk),UJ=e=>e>=1?1:(e*=2)<1?.5*tk(e):.5*(2-Math.pow(2,-10*(e-1))),nk=e=>1-Math.sin(Math.acos(e)),HJ=zJ(nk),GJ=qJ(nk),zDe=ag(.42,0,1,1),VDe=ag(0,0,.58,1),KJ=ag(.42,0,.58,1),FDe=e=>Array.isArray(e)&&typeof e[0]!="number",WJ=e=>Array.isArray(e)&&typeof e[0]=="number",UDe={linear:fi,easeIn:zDe,easeInOut:KJ,easeOut:VDe,circIn:nk,circInOut:GJ,circOut:HJ,backIn:tk,backInOut:FJ,backOut:VJ,anticipate:UJ},HDe=e=>typeof e=="string",Q8=e=>{if(WJ(e)){J2(e.length===4);const[t,n,r,i]=e;return ag(t,n,r,i)}else if(HDe(e))return UDe[e];return e},fy=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function GDe(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 w=m&&i?n:r;return h&&o.add(d),w.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 YJ(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=fy.reduce((_,A)=>(_[A]=GDe(a),_),{}),{setup:l,read:u,resolveKeyframes:f,preUpdate:d,update:h,preRender:m,render:g,postRender:w}=o,x=()=>{const _=Js.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),w.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(x))},b=()=>{n=!0,r=!0,i.isProcessing||e(x)};return{schedule:fy.reduce((_,A)=>{const T=o[A];return _[A]=(O,M=!1,R=!1)=>(n||b(),T.schedule(O,M,R)),_},{}),cancel:_=>{for(let A=0;A<fy.length;A++)o[fy[A]].cancel(_)},state:i,steps:o}}const{schedule:Dt,cancel:el,state:qn,steps:_j}=YJ(typeof requestAnimationFrame<"u"?requestAnimationFrame:fi,!0);let My;function WDe(){My=void 0}const ir={now:()=>(My===void 0&&ir.set(qn.isProcessing||Js.useManualTiming?qn.timestamp:performance.now()),My),set:e=>{My=e,queueMicrotask(WDe)}},XJ=e=>t=>typeof t=="string"&&t.startsWith(e),QJ=XJ("--"),YDe=XJ("var(--"),rk=e=>YDe(e)?XDe.test(e.split("/*")[0].trim()):!1,XDe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Z8(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Md={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},wm={...Md,transform:e=>va(0,1,e)},dy={...Md,default:1},pp=e=>Math.round(e*1e5)/1e5,ik=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function QDe(e){return e==null}const ZDe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ak=(e,t)=>n=>!!(typeof n=="string"&&ZDe.test(n)&&n.startsWith(e)||t&&!QDe(n)&&Object.prototype.hasOwnProperty.call(n,t)),ZJ=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,l]=r.match(ik);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},JDe=e=>va(0,255,e),Ej={...Md,transform:e=>Math.round(JDe(e))},Wl={test:ak("rgb","red"),parse:ZJ("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ej.transform(e)+", "+Ej.transform(t)+", "+Ej.transform(n)+", "+pp(wm.transform(r))+")"};function eIe(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 rR={test:ak("#"),parse:eIe,transform:Wl.transform},og=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wa=og("deg"),pa=og("%"),Ne=og("px"),tIe=og("vh"),nIe=og("vw"),J8={...pa,parse:e=>pa.parse(e)/100,transform:e=>pa.transform(e*100)},Yc={test:ak("hsl","hue"),parse:ZJ("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+pa.transform(pp(t))+", "+pa.transform(pp(n))+", "+pp(wm.transform(r))+")"},gn={test:e=>Wl.test(e)||rR.test(e)||Yc.test(e),parse:e=>Wl.test(e)?Wl.parse(e):Yc.test(e)?Yc.parse(e):rR.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wl.transform(e):Yc.transform(e),getAnimatableNone:e=>{const t=gn.parse(e);return t.alpha=0,gn.transform(t)}},rIe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function iIe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(ik))==null?void 0:t.length)||0)+(((n=e.match(rIe))==null?void 0:n.length)||0)>0}const JJ="number",eee="color",aIe="var",oIe="var(",eH="${}",sIe=/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(sIe,u=>(gn.test(u)?(r.color.push(a),i.push(eee),n.push(gn.parse(u))):u.startsWith(oIe)?(r.var.push(a),i.push(aIe),n.push(u)):(r.number.push(a),i.push(JJ),n.push(parseFloat(u))),++a,eH)).split(eH);return{values:n,split:l,indexes:r,types:i}}function lIe(e){return ld(e).values}function tee({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===JJ?i+=pp(r[a]):o===eee?i+=gn.transform(r[a]):i+=r[a]}return i}}function uIe(e){return tee(ld(e))}const cIe=e=>typeof e=="number"?0:gn.test(e)?gn.getAnimatableNone(e):e,fIe=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:cIe(e);function dIe(e){const t=ld(e);return tee(t)(t.values.map((r,i)=>fIe(r,t.split[i])))}const Bi={test:iIe,parse:lIe,createTransformer:uIe,getAnimatableNone:dIe};function Aj(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 hIe({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=Aj(u,l,e+1/3),a=Aj(u,l,e),o=Aj(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 Pt=(e,t,n)=>e+(t-e)*n,Tj=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},pIe=[rR,Wl,Yc],mIe=e=>pIe.find(t=>t.test(e));function tH(e){const t=mIe(e);if(!t)return!1;let n=t.parse(e);return t===Yc&&(n=hIe(n)),n}const nH=(e,t)=>{const n=tH(e),r=tH(t);if(!n||!r)return v0(e,t);const i={...n};return a=>(i.red=Tj(n.red,r.red,a),i.green=Tj(n.green,r.green,a),i.blue=Tj(n.blue,r.blue,a),i.alpha=Pt(n.alpha,r.alpha,a),Wl.transform(i))},iR=new Set(["none","hidden"]);function gIe(e,t){return iR.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function vIe(e,t){return n=>Pt(e,t,n)}function ok(e){return typeof e=="number"?vIe:typeof e=="string"?rk(e)?v0:gn.test(e)?nH:xIe:Array.isArray(e)?nee:typeof e=="object"?gn.test(e)?nH:yIe:v0}function nee(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>ok(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function yIe(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ok(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function bIe(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 xIe=(e,t)=>{const n=Bi.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?iR.has(e)&&!i.values.length||iR.has(t)&&!r.values.length?gIe(e,t):ig(nee(bIe(r,i),i.values),n):v0(e,t)};function ree(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Pt(e,t,n):ok(e)(e,t)}const wIe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Dt.update(t,n),stop:()=>el(t),now:()=>qn.isProcessing?qn.timestamp:ir.now()}},iee=(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 sk(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 SIe(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(sk(r),y0);return{type:"keyframes",ease:a=>r.next(i*a).value/t,duration:ui(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 aR(e,t){return e*Math.sqrt(1-t*t)}const _Ie=12;function EIe(e,t,n){let r=n;for(let i=1;i<_Ie;i++)r=r-e(r)/t(r);return r}const Cj=.001;function AIe({duration:e=rn.duration,bounce:t=rn.bounce,velocity:n=rn.velocity,mass:r=rn.mass}){let i,a,o=1-t;o=va(rn.minDamping,rn.maxDamping,o),e=va(rn.minDuration,rn.maxDuration,ui(e)),o<1?(i=f=>{const d=f*o,h=d*e,m=d-n,g=aR(f,o),w=Math.exp(-h);return Cj-m/g*w},a=f=>{const h=f*o*e,m=h*n+n,g=Math.pow(o,2)*Math.pow(f,2)*e,w=Math.exp(-h),x=aR(Math.pow(f,2),o);return(-i(f)+Cj>0?-1:1)*((m-g)*w)/x}):(i=f=>{const d=Math.exp(-f*e),h=(f-n)*e+1;return-Cj+d*h},a=f=>{const d=Math.exp(-f*e),h=(n-f)*(e*e);return d*h});const l=5/e,u=EIe(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"],CIe=["stiffness","damping","mass"];function rH(e,t){return t.some(n=>e[n]!==void 0)}function OIe(e){let t={velocity:rn.velocity,stiffness:rn.stiffness,damping:rn.damping,mass:rn.mass,isResolvedFromDuration:!1,...e};if(!rH(e,CIe)&&rH(e,TIe))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*va(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:rn.mass,stiffness:i,damping:a}}else{const n=AIe({...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}=OIe({...n,velocity:-ui(n.velocity||0)}),w=m||0,x=f/(2*Math.sqrt(u*d)),b=o-a,S=ui(Math.sqrt(u/d)),E=Math.abs(b)<5;r||(r=E?rn.restSpeed.granular:rn.restSpeed.default),i||(i=E?rn.restDelta.granular:rn.restDelta.default);let _,A,T,O,M,R;if(x<1)T=aR(S,x),O=(w+x*S*b)/T,_=$=>{const I=Math.exp(-x*S*$);return o-I*(O*Math.sin(T*$)+b*Math.cos(T*$))},M=x*S*O+b*T,R=x*S*b-O*T,A=$=>Math.exp(-x*S*$)*(M*Math.sin(T*$)+R*Math.cos(T*$));else if(x===1){_=I=>o-Math.exp(-S*I)*(b+(w+S*b)*I);const $=w+S*b;A=I=>Math.exp(-S*I)*(S*$*I-w)}else{const $=S*Math.sqrt(x*x-1);_=D=>{const q=Math.exp(-x*S*D),L=Math.min($*D,300);return o-q*((w+x*S*b)*Math.sinh(L)+$*b*Math.cosh(L))/$};const I=(w+x*S*b)/$,k=x*S*I-b*$,V=x*S*b-I*$;A=D=>{const q=Math.exp(-x*S*D),L=Math.min($*D,300);return q*(k*Math.sinh(L)+V*Math.cosh(L))}}const P={calculatedDuration:g&&h||null,velocity:$=>zr(A($)),next:$=>{if(!g&&x<1){const k=Math.exp(-x*S*$),V=Math.sin(T*$),D=Math.cos(T*$),q=o-k*(O*V+b*D),L=zr(k*(M*V+R*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(sk(P),y0),I=iee(k=>P.next($*k).value,$,30);return $+"ms "+I},toTransition:()=>{}};return P}b0.applyToOptions=e=>{const t=SIe(e,100,b0);return e.ease=t.ease,e.duration=zr(t.duration),e.type="keyframes",e};const jIe=5;function aee(e,t,n){const r=Math.max(t-jIe,0);return $J(n-e(r),t-r)}function oR({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=R=>l!==void 0&&R<l||u!==void 0&&R>u,w=R=>l===void 0?u:u===void 0||Math.abs(l-R)<Math.abs(u-R)?l:u;let x=n*t;const b=h+x,S=o===void 0?b:o(b);S!==b&&(x=S-h);const E=R=>-x*Math.exp(-R/r),_=R=>S+E(R),A=R=>{const P=E(R),$=_(R);m.done=Math.abs(P)<=f,m.value=m.done?S:$};let T,O;const M=R=>{g(m.value)&&(T=R,O=b0({keyframes:[m.value,w(m.value)],velocity:aee(_,R,m.value),damping:i,stiffness:a,restDelta:f,restSpeed:d}))};return M(0),{calculatedDuration:null,next:R=>{let P=!1;return!O&&T===void 0&&(P=!0,A(R),M(R)),T!==void 0&&R>=T?O.next(R-T):(!P&&A(R),m)}}}function NIe(e,t,n){const r=[],i=n||Js.mix||ree,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]||fi:t;l=ig(u,l)}r.push(l)}return r}function MIe(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(J2(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=NIe(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(va(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(Pt(n,1,i))}}function PIe(e){const t=[0];return RIe(t,e.length-1),t}function kIe(e,t){return e.map(n=>n*t)}function DIe(e,t){return e.map(()=>t||KJ).splice(0,e.length-1)}function mp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=FDe(r)?r.map(Q8):Q8(r),a={done:!1,value:t[0]},o=kIe(n&&n.length===t.length?n:PIe(t),e),l=MIe(o,t,{ease:Array.isArray(i)?i:DIe(t,i)});return{calculatedDuration:e,next:u=>(a.value=l(u),a.done=u>=e,a)}}const IIe=e=>e!==null;function Jx(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(IIe),l=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||r===void 0?a[l]:r}const LIe={decay:oR,inertia:oR,tween:mp,keyframes:mp,spring:b0};function oee(e){typeof e.type=="string"&&(e.type=LIe[e.type])}class lk{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 $Ie=e=>e/100;class x0 extends lk{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;oee(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=ig($Ie,ree(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=sk(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:w,onUpdate:x,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),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 R=Math.min(this.currentTime,i)/l;let P=Math.floor(R),$=R%1;!$&&R>=1&&($=1),$===1&&P--,P=Math.min(P,h+1),!!(P%2)&&(m==="reverse"?($=1-$,g&&($-=g/l)):m==="mirror"&&(A=o)),_=va(0,1,$)*l}let T;E?(this.delayState.value=d[0],T=this.delayState):T=A.next(_),a&&!E&&(T.value=a(T.value));let{done:O}=T;!E&&u!==null&&(O=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return M&&w!==oR&&(T.value=Jx(d,this.options,b,this.speed)),x&&x(T.value),M&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return ui(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ui(t)}get time(){return ui(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 aee(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=ui(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=wIe,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 BIe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Yl=e=>e*180/Math.PI,sR=e=>{const t=Yl(Math.atan2(e[1],e[0]));return lR(t)},qIe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:sR,rotateZ:sR,skewX:e=>Yl(Math.atan(e[1])),skewY:e=>Yl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},lR=e=>(e=e%360,e<0&&(e+=360),e),iH=sR,aH=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),oH=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),zIe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:aH,scaleY:oH,scale:e=>(aH(e)+oH(e))/2,rotateX:e=>lR(Yl(Math.atan2(e[6],e[5]))),rotateY:e=>lR(Yl(Math.atan2(-e[2],e[0]))),rotateZ:iH,rotate:iH,skewX:e=>Yl(Math.atan(e[4])),skewY:e=>Yl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function uR(e){return e.includes("scale")?1:0}function cR(e,t){if(!e||e==="none")return uR(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=zIe,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=qIe,i=l}if(!i)return uR(t);const a=r[t],o=i[1].split(",").map(FIe);return typeof a=="function"?a(o):o[a]}const VIe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return cR(n,t)};function FIe(e){return parseFloat(e.trim())}const Rd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Pd=new Set([...Rd,"pathRotation"]),sH=e=>e===Md||e===Ne,UIe=new Set(["x","y","z"]),HIe=Rd.filter(e=>!UIe.has(e));function GIe(e){const t=[];return HIe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ds={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})=>cR(t,"x"),y:(e,{transform:t})=>cR(t,"y")};Ds.translateX=Ds.x;Ds.translateY=Ds.y;const fu=new Set;let fR=!1,dR=!1,hR=!1;function see(){if(dR){const e=Array.from(fu).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=GIe(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)})}dR=!1,fR=!1,fu.forEach(e=>e.complete(hR)),fu.clear()}function lee(){fu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(dR=!0)})}function KIe(){hR=!0,lee(),see(),hR=!1}class uk{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?(fu.add(this),fR||(fR=!0,Dt.read(lee),Dt.resolveKeyframes(see))):(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])}BIe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fu.delete(this)}cancel(){this.state==="scheduled"&&(fu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const WIe=e=>e.startsWith("--");function uee(e,t,n){WIe(t)?e.style.setProperty(t,n):e.style[t]=n}const YIe={};function cee(e,t){const n=LJ(e);return()=>YIe[t]??n()}const XIe=cee(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),fee=cee(()=>{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})`,lH={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 dee(e,t){if(e)return typeof e=="function"?fee()?iee(e,t):"ease-out":WJ(e)?ap(e):Array.isArray(e)?e.map(n=>dee(n,t)||lH.easeOut):lH[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=dee(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 hee(e){return typeof e=="function"&&"applyToOptions"in e}function ZIe({type:e,...t}){return hee(e)&&fee()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class pee extends lk{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,J2(typeof t.type!="string");const f=ZIe(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=Jx(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),uee(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 ui(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ui(t)}get time(){return ui(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&&XIe()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),fi):i(this)}}const mee={anticipate:UJ,backInOut:FJ,circInOut:GJ};function JIe(e){return e in mee}function eLe(e){typeof e.ease=="string"&&JIe(e.ease)&&(e.ease=mee[e.ease])}const Oj=10;class tLe extends pee{constructor(t){eLe(t),oee(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(Oj,ir.now()-this.startTime),f=va(0,Oj,u-Oj),d=l.sample(u).value,{name:h}=this.options;a&&h&&uee(a,h,d),n.setWithVelocity(l.sample(Math.max(0,u-f)).value,d,f),l.stop()}}const uH=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Bi.test(e)||e==="0")&&!e.startsWith("url("));function nLe(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 rLe(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=uH(i,t),l=uH(a,t);return!o||!l?!1:nLe(e)||(n==="spring"||hee(n))&&r}function pR(e){e.duration=0,e.type="keyframes"}const gee=new Set(["opacity","clipPath","filter","transform"]),iLe=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function aLe(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&iLe.test(e[t]))return!0;return!1}const oLe=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),sLe=LJ(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function lLe(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 sLe()&&n&&(gee.has(n)||oLe.has(n)&&aLe(l))&&(n!=="transform"||!d)&&!f&&!r&&i!=="mirror"&&a!==0&&o!=="inertia"}const uLe=40;class cLe extends lk{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 w;super(),this.stop=()=>{var x,b;this._animation&&(this._animation.stop(),(x=this.stopTimeline)==null||x.call(this)),(b=this.keyframeResolver)==null||b.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)||uk;this.keyframeResolver=new g(l,(x,b,S)=>this.onKeyframesResolved(x,b,m,!S),u,f,d),(w=this.keyframeResolver)==null||w.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;rLe(t,a,o,l)||(h=!1,(Js.instantAnimations||!u)&&(d==null||d(Jx(t,r,n))),t[0]=t[t.length-1],pR(r),r.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>uLe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=h&&!f&&lLe(g),x=(E=(S=g.motionValue)==null?void 0:S.owner)==null?void 0:E.current;let b;if(w)try{b=new tLe({...g,element:x})}catch{b=new x0(g)}else b=new x0(g);b.finished.then(()=>{this.notifyFinished()}).catch(fi),this.pendingTimeline&&(this.stopTimeline=b.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=b}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 vee(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 cH=30,fLe=e=>!isNaN(parseFloat(e));class dLe{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=fLe(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 ek);const r=this.events[t].add(n);return t==="change"?()=>{r(),Dt.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>cH)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,cH);return $J(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 dLe(e,t)}function yee(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function ck(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?yee(n,e):n}const hLe={type:"spring",stiffness:500,damping:25,restSpeed:10},pLe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),mLe={type:"keyframes",duration:.8},gLe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vLe=(e,{keyframes:t})=>t.length>2?mLe:Pd.has(e)?e.startsWith("scale")?pLe(t[1]):hLe:gLe,yLe=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function bLe(e){for(const t in e)if(!yLe.has(t))return!0;return!1}const fk=(e,t,n,r={},i,a)=>o=>{const l=ck(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};bLe(l)||Object.assign(d,vLe(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)&&(pR(d),d.delay===0&&(h=!0)),(Js.instantAnimations||Js.skipAnimations||i!=null&&i.shouldSkipAnimations||l.skipAnimations)&&(h=!0,pR(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const m=Jx(d.keyframes,l);if(m!==void 0){Dt.update(()=>{d.onUpdate(m),d.onComplete()});return}}return l.isSync?new x0(d):new cLe(d)},xLe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function wLe(e){const t=xLe.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function bee(e,t,n=1){const[r,i]=wLe(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return kJ(o)?parseFloat(o):o}return rk(i)?bee(i,t,n+1):i}function fH(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function dk(e,t,n,r){if(typeof t=="function"){const[i,a]=fH(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]=fH(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function du(e,t,n){const r=e.getProps();return dk(r,t,n!==void 0?n:r.custom,e)}const xee=new Set(["width","height","top","left","right","bottom",...Rd]),mR=e=>Array.isArray(e);function SLe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ud(n))}function _Le(e){return mR(e)?e[e.length-1]||0:e}function ELe(e,t){const n=du(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const l=_Le(a[o]);SLe(e,o,l)}}const Vn=e=>!!(e&&e.getVelocity);function ALe(e){return!!(Vn(e)&&e.add)}function gR(e,t){const n=e.getValue("willChange");if(ALe(n))return n.add(t);if(!n&&Js.WillChange){const r=new Js.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function hk(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const TLe="framerAppearId",wee="data-"+hk(TLe);function See(e){return e.props[wee]}function CLe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function _ee(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...l}=t;const u=e.getDefaultTransition();a=a?yee(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 w in l){const x=e.getValue(w,e.latestValues[w]??null),b=l[w];if(b===void 0||m&&CLe(m,w))continue;const S={delay:n,...ck(a||{},w)};d&&(S.skipAnimations=!0);const E=x.get();if(E!==void 0&&!x.isAnimating()&&!Array.isArray(b)&&b===E&&!S.velocity){Dt.update(()=>x.set(b));continue}let _=!1;if(window.MotionHandoffAnimation){const O=See(e);if(O){const M=window.MotionHandoffAnimation(O,w,Dt);M!==null&&(S.startTime=M,_=!0)}}gR(e,w);const A=f??e.shouldReduceMotion;x.start(fk(w,x,b,A&&xee.has(w)?{type:!1}:S,e,_));const T=x.animation;T&&h.push(T)}if(o){const w=()=>Dt.update(()=>{o&&ELe(e,o)});h.length?Promise.all(h).then(w):w()}return h}function vR(e,t,n={}){var u;const r=du(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(_ee(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:m}=i;return OLe(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 OLe(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(vR(u,t,{...o,delay:n+(typeof r=="function"?0:r)+vee(e.variantChildren,u,r,i,a)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function jLe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>vR(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=vR(e,t,n);else{const i=typeof t=="function"?du(e,t,n.custom):t;r=Promise.all(_ee(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const NLe={test:e=>e==="auto",parse:e=>e},Eee=e=>t=>t.test(e),Aee=[Md,Ne,pa,Wa,nIe,tIe,NLe],dH=e=>Aee.find(Eee(e));function MLe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||IJ(e):!0}const RLe=new Set(["brightness","contrast","saturate","opacity"]);function PLe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(ik)||[];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 kLe=/\b([a-z-]*)\(.*?\)/gu,yR={...Bi,getAnimatableNone:e=>{const t=e.match(kLe);return t?t.map(PLe).join(" "):e}},bR={...Bi,getAnimatableNone:e=>{const t=Bi.parse(e);return Bi.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},hH={...Md,transform:Math.round},DLe={rotate:Wa,pathRotation:Wa,rotateX:Wa,rotateY:Wa,rotateZ:Wa,scale:dy,scaleX:dy,scaleY:dy,scaleZ:dy,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:J8,originY:J8,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,...DLe,zIndex:hH,fillOpacity:wm,strokeOpacity:wm,numOctaves:hH},ILe={...w0,color:gn,backgroundColor:gn,outlineColor:gn,fill:gn,stroke:gn,borderColor:gn,borderTopColor:gn,borderRightColor:gn,borderBottomColor:gn,borderLeftColor:gn,filter:yR,WebkitFilter:yR,mask:bR,WebkitMask:bR},Tee=e=>ILe[e],LLe=new Set([yR,bR]);function Cee(e,t){let n=Tee(e);return LLe.has(n)||(n=Bi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $Le=new Set(["auto","none","0"]);function BLe(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!$Le.has(a)&&ld(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=Cee(n,i)}class qLe extends uk{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(),rk(h))){const m=bee(h,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!xee.has(r)||t.length!==2)return;const[i,a]=t,o=dH(i),l=dH(a),u=Z8(i),f=Z8(a);if(u!==f&&Ds[r]){this.needsMeasurement=!0;return}if(o!==l)if(sH(o)&&sH(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Ds[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&&BLe(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=Ds[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]=Ds[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 Oee(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 xR=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ry(e){return DJ(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:pk}=YJ(queueMicrotask,!1),Ai={x:!1,y:!1};function jee(){return Ai.x||Ai.y}function zLe(e){return e==="x"||e==="y"?Ai[e]?null:(Ai[e]=!0,()=>{Ai[e]=!1}):Ai.x||Ai.y?null:(Ai.x=Ai.y=!0,()=>{Ai.x=Ai.y=!1})}function Nee(e,t){const n=Oee(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function VLe(e){return!(e.pointerType==="touch"||jee())}function FLe(e,t,n={}){const[r,i,a]=Nee(e,n);return r.forEach(o=>{let l=!1,u=!1,f;const d=()=>{o.removeEventListener("pointerleave",w)},h=b=>{f&&(f(b),f=void 0),d()},m=b=>{l=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),u&&(u=!1,h(b))},g=()=>{l=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},w=b=>{if(b.pointerType!=="touch"){if(l){u=!0;return}h(b)}},x=b=>{if(!VLe(b))return;u=!1;const S=t(o,b);typeof S=="function"&&(f=S,o.addEventListener("pointerleave",w,i))};o.addEventListener("pointerenter",x,i),o.addEventListener("pointerdown",g,i)}),a}const Mee=(e,t)=>t?e===t?!0:Mee(e,t.parentElement):!1,mk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,ULe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function HLe(e){return ULe.has(e.tagName)||e.isContentEditable===!0}const GLe=new Set(["INPUT","SELECT","TEXTAREA"]);function KLe(e){return GLe.has(e.tagName)||e.isContentEditable===!0}const Py=new WeakSet;function pH(e){return t=>{t.key==="Enter"&&e(t)}}function jj(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const WLe=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=pH(()=>{if(Py.has(n))return;jj(n,"down");const i=pH(()=>{jj(n,"up")}),a=()=>jj(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 mH(e){return mk(e)&&!jee()}const gH=new WeakSet;function YLe(e,t,n={}){const[r,i,a]=Nee(e,n),o=l=>{const u=l.currentTarget;if(!mH(l)||gH.has(l))return;Py.add(u),n.stopPropagation&&gH.add(l);const f=t(u,l),d=(g,w)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),Py.has(u)&&Py.delete(u),mH(g)&&typeof f=="function"&&f(g,{success:w})},h=g=>{d(g,u===window||u===document||n.useGlobalTarget||Mee(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),Ry(l)&&(l.addEventListener("focus",f=>WLe(f,i)),!HLe(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function gk(e){return DJ(e)&&"ownerSVGElement"in e}const ky=new WeakMap;let ps;const Ree=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:gk(r)&&"getBBox"in r?r.getBBox()[t]:r[n],XLe=Ree("inline","width","offsetWidth"),QLe=Ree("block","height","offsetHeight");function ZLe({target:e,borderBoxSize:t}){var n;(n=ky.get(e))==null||n.forEach(r=>{r(e,{get width(){return XLe(e,t)},get height(){return QLe(e,t)}})})}function JLe(e){e.forEach(ZLe)}function e$e(){typeof ResizeObserver>"u"||(ps=new ResizeObserver(JLe))}function t$e(e,t){ps||e$e();const n=Oee(e);return n.forEach(r=>{let i=ky.get(r);i||(i=new Set,ky.set(r,i)),i.add(t),ps==null||ps.observe(r)}),()=>{n.forEach(r=>{const i=ky.get(r);i==null||i.delete(t),i!=null&&i.size||ps==null||ps.unobserve(r)})}}const Dy=new Set;let Xc;function n$e(){Xc=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Dy.forEach(t=>t(e))},window.addEventListener("resize",Xc)}function r$e(e){return Dy.add(e),Xc||n$e(),()=>{Dy.delete(e),!Dy.size&&typeof Xc=="function"&&(window.removeEventListener("resize",Xc),Xc=void 0)}}function vH(e,t){return typeof e=="function"?r$e(e):t$e(e,t)}function i$e(e){return gk(e)&&e.tagName==="svg"}const a$e=[...Aee,gn,Bi],o$e=e=>a$e.find(Eee(e)),yH=()=>({translate:0,scale:1,origin:0,originPoint:0}),Qc=()=>({x:yH(),y:yH()}),bH=()=>({min:0,max:0}),En=()=>({x:bH(),y:bH()}),s$e=new WeakMap;function ew(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Sm(e){return typeof e=="string"||Array.isArray(e)}const vk=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yk=["initial",...vk];function tw(e){return ew(e.animate)||yk.some(t=>Sm(e[t]))}function Pee(e){return!!(tw(e)||e.variants)}function l$e(e,t,n){for(const r in t){const i=t[r],a=n[r];if(Vn(i))e.addValue(r,i);else if(Vn(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 wR={current:null},kee={current:!1},u$e=typeof window<"u";function c$e(){if(kee.current=!0,!!u$e)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>wR.current=e.matches;e.addEventListener("change",t),t()}else wR.current=!1}const xH=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let S0={};function Dee(e){S0=e}function f$e(){return S0}class d$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=uk,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,Dt.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=tw(n),this.isVariantNode=Pee(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 w=m[g];f[g]!==void 0&&Vn(w)&&w.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,s$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:(kee.current||c$e(),this.shouldReduceMotion=wR.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(),el(this.notifyUpdate),el(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&&gee.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:u,ease:f,duration:d}=n.accelerate,h=new pee({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=Pd.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Dt.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<xH.length;r++){const i=xH[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=l$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"&&(kJ(r)||IJ(r))?r=parseFloat(r):!o$e(r)&&Bi.test(n)&&(r=Cee(t,n)),this.setBaseTarget(t,Vn(r)?r.get():r)),Vn(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=dk(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&&!Vn(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 ek),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){pk.render(this.render)}}class Iee extends d$e{constructor(){super(...arguments),this.KeyframeResolver=qLe}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;Vn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class sl{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Lee({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function h$e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function p$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 Nj(e){return e===void 0||e===1}function SR({scale:e,scaleX:t,scaleY:n}){return!Nj(e)||!Nj(t)||!Nj(n)}function Bl(e){return SR(e)||$ee(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $ee(e){return wH(e.x)||wH(e.y)}function wH(e){return e&&e!=="0%"}function _0(e,t,n){const r=e-n,i=t*r;return n+i}function SH(e,t,n,r,i){return i!==void 0&&(e=_0(e,i,r)),_0(e,n,r)+t}function _R(e,t=0,n=1,r,i){e.min=SH(e.min,t,n,r,i),e.max=SH(e.max,t,n,r,i)}function Bee(e,{x:t,y:n}){_R(e.x,t.translate,t.scale,t.originPoint),_R(e.y,n.translate,n.scale,n.originPoint)}const _H=.999999999999,EH=1.0000000000001;function m$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&&(aa(e.x,-a.scroll.offset.x),aa(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Bee(e,o)),r&&Bl(a.latestValues)&&Iy(e,a.latestValues,(l=a.layout)==null?void 0:l.layoutBox))}t.x<EH&&t.x>_H&&(t.x=1),t.y<EH&&t.y>_H&&(t.y=1)}function aa(e,t){e.min+=t,e.max+=t}function AH(e,t,n,r,i=.5){const a=Pt(e.min,e.max,i);_R(e,t,n,a,r)}function TH(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Iy(e,t,n){const r=n??e;AH(e.x,TH(t.x,r.x),t.scaleX,t.scale,t.originX),AH(e.y,TH(t.y,r.y),t.scaleY,t.scale,t.originY)}function qee(e,t){return Lee(p$e(e.getBoundingClientRect(),t))}function g$e(e,t,n){const r=qee(e,n),{scroll:i}=t;return i&&(aa(r.x,i.offset.x),aa(r.y,i.offset.y)),r}const v$e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},y$e=Rd.length;function b$e(e,t,n){let r="",i=!0;for(let o=0;o<y$e;o++){const l=Rd[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=xR(u,w0[l]);if(!f){i=!1;const h=v$e[l]||l;r+=`${h}(${d}) `}n&&(t[l]=d)}}const a=e.pathRotation;return a&&(i=!1,r+=`rotate(${xR(a,w0.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function bk(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(Pd.has(u)){o=!0;continue}else if(QJ(u)){i[u]=f;continue}else{const d=xR(f,w0[u]);u.startsWith("origin")?(l=!0,a[u]=d):r[u]=d}}if(t.transform||(o||n?r.transform=b$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 zee(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 CH(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=CH(e,t.target.x),r=CH(e,t.target.y);return`${n}% ${r}%`}},x$e={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Bi.parse(e);if(i.length>5)return r;const a=Bi.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=Pt(l,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=f),typeof i[3+o]=="number"&&(i[3+o]/=f),a(i)}},ER={borderRadius:{...Yh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yh,borderTopRightRadius:Yh,borderBottomLeftRadius:Yh,borderBottomRightRadius:Yh,boxShadow:x$e};function Vee(e,{layout:t,layoutId:n}){return Pd.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ER[e]||e==="opacity")}function xk(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)(Vn(r[l])||i&&Vn(i[l])||Vee(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(a[l]=r[l]);return a}function w$e(e){return window.getComputedStyle(e)}class S$e extends Iee{constructor(){super(...arguments),this.type="html",this.renderInstance=zee}readValueFromInstance(t,n){var r;if(Pd.has(n))return(r=this.projection)!=null&&r.isProjecting?uR(n):VIe(t,n);{const i=w$e(t),a=(QJ(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return qee(t,n)}build(t,n,r){bk(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return xk(t,n,r)}}const _$e={offset:"stroke-dashoffset",array:"stroke-dasharray"},E$e={offset:"strokeDashoffset",array:"strokeDasharray"};function A$e(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?_$e:E$e;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}const T$e=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Fee(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...l},u,f,d){if(bk(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&&A$e(h,i,a,o,!1)}const Uee=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"]),Hee=e=>typeof e=="string"&&e.toLowerCase()==="svg";function C$e(e,t,n,r){zee(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Uee.has(i)?i:hk(i),t.attrs[i])}function Gee(e,t,n){const r=xk(e,t,n);for(const i in e)if(Vn(e[i])||Vn(t[i])){const a=Rd.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}class O$e extends Iee{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=En}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Pd.has(n)){const r=Tee(n);return r&&r.default||0}return n=Uee.has(n)?n:hk(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Gee(t,n,r)}build(t,n,r){Fee(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){C$e(t,n,r,i)}mount(t){this.isSVGTag=Hee(t.tagName),super.mount(t)}}const j$e=yk.length;function Kee(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Kee(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<j$e;n++){const r=yk[n],i=e.props[r];(Sm(i)||i===!1)&&(t[r]=i)}return t}function Wee(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 N$e=[...vk].reverse(),M$e=vk.length;function R$e(e){return t=>Promise.all(t.map(({animation:n,options:r})=>jLe(e,n,r)))}function P$e(e){let t=R$e(e),n=OH(),r=!0,i=!1;const a=f=>(d,h)=>{var g;const m=du(e,h,f==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(m){const{transition:w,transitionEnd:x,...b}=m;d={...d,...b,...x}}return d};function o(f){t=f(e)}function l(f){const{props:d}=e,h=Kee(e.parent)||{},m=[],g=new Set;let w={},x=1/0;for(let S=0;S<M$e;S++){const E=N$e[S],_=n[E],A=d[E]!==void 0?d[E]:h[E],T=Sm(A),O=E===f?_.isActive:null;O===!1&&(x=S);let M=A===h[E]&&A!==d[E]&&T;if(M&&(r||i)&&e.manuallyAnimateOnMount&&(M=!1),_.protectedKeys={...w},!_.isActive&&O===null||!A&&!_.prevProp||ew(A)||typeof A=="boolean")continue;if(E==="exit"&&_.isActive&&O!==!0){_.prevResolvedValues&&(w={...w,..._.prevResolvedValues});continue}const R=k$e(_.prevProp,A);let P=R||E===f&&_.isActive&&!M&&T||S>x&&T,$=!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=>{P=!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],Q=V[H];if(w.hasOwnProperty(H))continue;let U=!1;mR(Y)&&mR(Q)?U=!Wee(Y,Q)||R:U=Y!==Q,U?Y!=null?q(H):g.add(H):Y!==void 0&&g.has(H)?q(H):_.protectedKeys[H]=!0}_.prevProp=A,_.prevResolvedValues=k,_.isActive&&(w={...w,...k}),(r||i)&&e.blockInitialAnimation&&(P=!1);const L=M&&R;P&&(!L||$)&&m.push(...I.map(H=>{const Y={type:E};if(typeof H=="string"&&(r||i)&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:Q}=e,U=du(Q,H);if(Q.enteringChildren&&U){const{delayChildren:F}=U.transition||{};Y.delay=vee(Q.enteringChildren,e,F)}}return{animation:H,options:Y}}))}if(g.size){const S={};if(typeof d.initial!="boolean"){const E=du(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 b=!!m.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,i=!1,b?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 w;return(w=g.animationState)==null?void 0:w.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=OH(),i=!0}}}function k$e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wee(t,e):!1}function kl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function OH(){return{animate:kl(!0),whileInView:kl(),whileHover:kl(),whileTap:kl(),whileDrag:kl(),whileFocus:kl(),exit:kl()}}function AR(e,t){e.min=t.min,e.max=t.max}function Ei(e,t){AR(e.x,t.x),AR(e.y,t.y)}function jH(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Yee=1e-4,D$e=1-Yee,I$e=1+Yee,Xee=.01,L$e=0-Xee,$$e=0+Xee;function ar(e){return e.max-e.min}function B$e(e,t,n){return Math.abs(e-t)<=n}function NH(e,t,n,r=.5){e.origin=r,e.originPoint=Pt(t.min,t.max,e.origin),e.scale=ar(n)/ar(t),e.translate=Pt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=D$e&&e.scale<=I$e||isNaN(e.scale))&&(e.scale=1),(e.translate>=L$e&&e.translate<=$$e||isNaN(e.translate))&&(e.translate=0)}function gp(e,t,n,r){NH(e.x,t.x,n.x,r?r.originX:void 0),NH(e.y,t.y,n.y,r?r.originY:void 0)}function MH(e,t,n,r=0){const i=r?Pt(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+ar(t)}function q$e(e,t,n,r){MH(e.x,t.x,n.x,r==null?void 0:r.x),MH(e.y,t.y,n.y,r==null?void 0:r.y)}function RH(e,t,n,r=0){const i=r?Pt(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+ar(t)}function E0(e,t,n,r){RH(e.x,t.x,n.x,r==null?void 0:r.x),RH(e.y,t.y,n.y,r==null?void 0:r.y)}function PH(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 z$e(e,t=0,n=1,r=.5,i,a=e,o=e){if(pa.test(t)&&(t=parseFloat(t),t=Pt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=Pt(a.min,a.max,r);e===a&&(l-=t),e.min=PH(e.min,t,n,l,i),e.max=PH(e.max,t,n,l,i)}function kH(e,t,[n,r,i],a,o){z$e(e,t[n],t[r],t[i],t.scale,a,o)}const V$e=["x","scaleX","originX"],F$e=["y","scaleY","originY"];function DH(e,t,n,r){kH(e.x,t,V$e,n?n.x:void 0,r?r.x:void 0),kH(e.y,t,F$e,n?n.y:void 0,r?r.y:void 0)}function IH(e){return e.translate===0&&e.scale===1}function Qee(e){return IH(e.x)&&IH(e.y)}function LH(e,t){return e.min===t.min&&e.max===t.max}function U$e(e,t){return LH(e.x,t.x)&&LH(e.y,t.y)}function $H(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zee(e,t){return $H(e.x,t.x)&&$H(e.y,t.y)}function BH(e){return ar(e.x)/ar(e.y)}function qH(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ji(e){return[e("x"),e("y")]}function H$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:w,skewY:x}=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) `),w&&(r+=`skewX(${w}deg) `),x&&(r+=`skewY(${x}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 Jee=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],G$e=Jee.length,zH=e=>typeof e=="string"?parseFloat(e):e,VH=e=>typeof e=="number"||Ne.test(e);function K$e(e,t,n,r,i,a){i?(e.opacity=Pt(0,n.opacity??1,W$e(r)),e.opacityExit=Pt(t.opacity??1,0,Y$e(r))):a&&(e.opacity=Pt(t.opacity??1,n.opacity??1,r));for(let o=0;o<G$e;o++){const l=Jee[o];let u=FH(t,l),f=FH(n,l);if(u===void 0&&f===void 0)continue;u||(u=0),f||(f=0),u===0||f===0||VH(u)===VH(f)?(e[l]=Math.max(Pt(zH(u),zH(f),r),0),(pa.test(f)||pa.test(u))&&(e[l]+="%")):e[l]=f}(t.rotate||n.rotate)&&(e.rotate=Pt(t.rotate||0,n.rotate||0,r))}function FH(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const W$e=ete(0,.5,HJ),Y$e=ete(.5,.95,fi);function ete(e,t,n){return r=>r<e?0:r>t?1:n(xm(e,t,r))}function X$e(e,t,n){const r=Vn(e)?e:ud(e);return r.start(fk("",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 Z$e{constructor(){this.children=[],this.isDirty=!1}add(t){Z2(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 J$e(e,t){const n=ir.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(el(r),e(a-t))};return Dt.setup(r,!0),()=>el(r)}function Ly(e){return Vn(e)?e.get():e}class e3e{constructor(){this.members=[]}add(t){Z2(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 $y={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Mj=["","X","Y","Z"],t3e=1e3;let n3e=0;function Rj(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function tte(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=See(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Dt,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&tte(r)}function nte({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=n3e++,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(a3e),this.nodes.forEach(f3e),this.nodes.forEach(d3e),this.nodes.forEach(o3e)},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 Z$e)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ek),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=gk(o)&&!i$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;Dt.read(()=>{h=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==h&&(h=g,this.root.updateBlockedByResize=!0,d&&d(),d=J$e(m,250),$y.hasAnimatedSinceResize&&($y.hasAnimatedSinceResize=!1,this.nodes.forEach(GH)))})}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 w=this.options.transition||f.getDefaultTransition()||v3e,{onLayoutAnimationStart:x,onLayoutAnimationComplete:b}=f.getProps(),S=!this.targetLayout||!Zee(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 _={...ck(w,"layout"),onPlay:x,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(d,E,_.path)}else h||GH(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(),el(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(h3e),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&&tte(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(l3e),this.nodes.forEach(UH);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(HH);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(u3e),this.nodes.forEach(c3e),this.nodes.forEach(r3e),this.nodes.forEach(i3e)):this.nodes.forEach(HH),this.clearAllSnapshots();const l=ir.now();qn.delta=va(0,1e3/60,l-qn.timestamp),qn.timestamp=l,qn.isProcessing=!0,_j.update.process(qn),_j.preRender.process(qn),_j.render.process(qn),qn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pk.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(s3e),this.sharedNodes.forEach(p3e)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Dt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Dt.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&&!Qee(this.projectionDelta),u=this.getTransformTemplate(),f=u?u(this.latestValues,""):void 0,d=f!==this.prevTransformTemplateValue;o&&this.instance&&(l||Bl(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)),y3e(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(b3e))){const{scroll:d}=this.root;d&&(aa(l.x,d.offset.x),aa(l.y,d.offset.y))}return l}removeElementScroll(o){var u;const l=En();if(Ei(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&&Ei(l,o),aa(l.x,h.offset.x),aa(l.y,h.offset.y))}return l}applyTransform(o,l=!1,u){var d,h;const f=u||En();Ei(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&&(aa(f.x,-g.scroll.offset.x),aa(f.y,-g.scroll.offset.y)),Bl(g.latestValues)&&Iy(f,g.latestValues,(d=g.layout)==null?void 0:d.layoutBox)}return Bl(this.latestValues)&&Iy(f,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),f}removeTransform(o){var u;const l=En();Ei(l,o);for(let f=0;f<this.path.length;f++){const d=this.path[f];if(!Bl(d.latestValues))continue;let h;d.instance&&(SR(d.latestValues)&&d.updateSnapshot(),h=En(),Ei(h,d.measurePageBox())),DH(l,d.latestValues,(u=d.snapshot)==null?void 0:u.layoutBox,h)}return Bl(this.latestValues)&&DH(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!==qn.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=qn.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(),q$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):Ei(this.target,this.layout.layoutBox),Bee(this.target,this.targetDelta)):Ei(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||SR(this.parent.latestValues)||$ee(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),Ei(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var w;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||(w=this.parent)!=null&&w.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===qn.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;Ei(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;m$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():(jH(this.prevProjectionDelta.x,this.projectionDelta.x),jH(this.prevProjectionDelta.y,this.projectionDelta.y)),gp(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!qH(this.projectionDelta.x,this.prevProjectionDelta.x)||!qH(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=Qc(),this.projectionDelta=Qc(),this.projectionDeltaWithTransform=Qc()}setAnimationOrigin(o,l=!1,u){const f=this.snapshot,d=f?f.latestValues:{},h={...this.latestValues},m=Qc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const g=En(),w=f?f.source:void 0,x=this.layout?this.layout.source:void 0,b=w!==x,S=this.getStack(),E=!S||S.members.length<=1,_=!!(b&&!E&&this.options.crossfade===!0&&!this.path.some(g3e));this.animationProgress=0;let A;const T=u==null?void 0:u.interpolateProjection(o);this.mixTargetDelta=O=>{const M=O/1e3,R=T==null?void 0:T(M);R?(m.x.translate=R.x,m.x.scale=Pt(o.x.scale,1,M),m.x.origin=o.x.origin,m.x.originPoint=o.x.originPoint,m.y.translate=R.y,m.y.scale=Pt(o.y.scale,1,M),m.y.origin=o.y.origin,m.y.originPoint=o.y.originPoint):(KH(m.x,o.x,M),KH(m.y,o.y,M)),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),m3e(this.relativeTarget,this.relativeTargetOrigin,g,M),A&&U$e(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=En()),Ei(A,this.relativeTarget)),b&&(this.animationValues=h,K$e(h,d,this.latestValues,M,_,E)),R&&R.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=R.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},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&&(el(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Dt.update(()=>{$y.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ud(0)),this.motionValue.jump(0,!1),this.currentAnimation=X$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(t3e),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&&rte(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}Ei(l,u),Iy(l,d),gp(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new e3e),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&&Rj("z",o,f,this.animationValues);for(let d=0;d<Mj.length;d++)Rj(`rotate${Mj[d]}`,o,f,this.animationValues),Rj(`skew${Mj[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=Ly(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=Ly(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Bl(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=f.animationValues||f.latestValues;this.applyTransformsToTarget();let h=H$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 w in ER){if(d[w]===void 0)continue;const{correct:x,applyTo:b,isCSSVariable:S}=ER[w],E=h==="none"?d[w]:x(d[w],f);if(b){const _=b.length;for(let A=0;A<_;A++)o[b[A]]=E}else S?this.options.visualElement.renderState.vars[w]=E:o[w]=E}this.options.layoutId&&(o.pointerEvents=f===this?Ly(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(UH),this.root.sharedNodes.clear()}}}function r3e(e){e.updateLayout()}function i3e(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")Ji(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";AR(o?t.measuredBox[h]:t.layoutBox[h],r[h])}else rte(a,t.layoutBox,r)&&Ji(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=Qc();gp(l,r,t.layoutBox);const u=Qc();o?gp(u,e.applyTransform(i,!0),t.measuredBox):gp(u,r,t.layoutBox);const f=!Qee(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 w=e.options.layoutAnchor||void 0,x=En();E0(x,t.layoutBox,m.layoutBox,w);const b=En();E0(b,r,g.layoutBox,w),Zee(x,b)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=x,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 a3e(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 o3e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function s3e(e){e.clearSnapshot()}function UH(e){e.clearMeasurements()}function l3e(e){e.isLayoutDirty=!0,e.updateLayout()}function HH(e){e.isLayoutDirty=!1}function u3e(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function c3e(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function GH(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function f3e(e){e.resolveTargetDelta()}function d3e(e){e.calcProjection()}function h3e(e){e.resetSkewAndRotation()}function p3e(e){e.removeLeadSnapshot()}function KH(e,t,n){e.translate=Pt(t.translate,0,n),e.scale=Pt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function WH(e,t,n,r){e.min=Pt(t.min,n.min,r),e.max=Pt(t.max,n.max,r)}function m3e(e,t,n,r){WH(e.x,t.x,n.x,r),WH(e.y,t.y,n.y,r)}function g3e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const v3e={duration:.45,ease:[.4,0,.1,1]},YH=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),XH=YH("applewebkit/")&&!YH("chrome/")?Math.round:fi;function QH(e){e.min=XH(e.min),e.max=XH(e.max)}function y3e(e){QH(e.x),QH(e.y)}function rte(e,t,n){return e==="position"||e==="preserve-aspect"&&!B$e(BH(t),BH(n),.2)}function b3e(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const x3e=nte({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},ite=nte({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Pj.current){const e=new x3e({});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"}),wk=N.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ZH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function w3e(...e){return t=>{let n=!1;const r=e.map(i=>{const a=ZH(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():ZH(e[i],null)}}}}function S3e(...e){return N.useCallback(w3e(...e),e)}class _3e extends N.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Ry(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Ry(r)&&r.offsetWidth||0,a=Ry(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 E3e({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){var m;const o=N.useId(),l=N.useRef(null),u=N.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:f}=N.useContext(wk),d=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),h=S3e(l,d);return N.useInsertionEffect(()=>{const{width:g,height:w,top:x,left:b,right:S,bottom:E,direction:_}=u.current;if(t||a===!1||!l.current||!g||!w)return;const A=_==="rtl",T=n==="left"?A?`right: ${S}`:`left: ${b}`:A?`left: ${b}`:`right: ${S}`,O=r==="bottom"?`bottom: ${E}`:`top: ${x}`;l.current.dataset.motionPopId=o;const M=document.createElement("style");f&&(M.nonce=f);const R=i??document.head;return R.appendChild(M),M.sheet&&M.sheet.insertRule(`
466
- [data-motion-pop-id="${o}"] {
467
- position: absolute !important;
468
- width: ${g}px !important;
469
- height: ${w}px !important;
470
- ${T}px !important;
471
- ${O}px !important;
472
- }
473
- `),()=>{var P;(P=l.current)==null||P.removeAttribute("data-motion-pop-id"),R.contains(M)&&R.removeChild(M)}},[t]),y.jsx(_3e,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:a===!1?e:N.cloneElement(e,{ref:h})})}const A3e=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:u,root:f})=>{const d=Q2(T3e),h=N.useId();let m=!0,g=N.useMemo(()=>(m=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:w=>{d.set(w,!0);for(const x of d.values())if(!x)return;r&&r()},register:w=>(d.set(w,!1),()=>d.delete(w))}),[n,d,r]);return a&&m&&(g={...g}),N.useMemo(()=>{d.forEach((w,x)=>d.set(x,!1))},[n]),N.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=y.jsx(E3e,{pop:o==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:f,children:e}),y.jsx(Zx.Provider,{value:g,children:e})};function T3e(){return new Map}function ate(e=!0){const t=N.useContext(Zx);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=N.useId();N.useEffect(()=>{if(e)return i(a)},[e]);const o=N.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const hy=e=>e.key||"";function JH(e){const t=[];return N.Children.forEach(e,n=>{N.isValidElement(n)&&t.push(n)}),t}const C3e=({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]=ate(o),m=N.useMemo(()=>JH(e),[e]),g=o&&!d?[]:m.map(hy),w=N.useRef(!0),x=N.useRef(m),b=Q2(()=>new Map),S=N.useRef(new Set),[E,_]=N.useState(m),[A,T]=N.useState(m);PJ(()=>{w.current=!1,x.current=m;for(let R=0;R<A.length;R++){const P=hy(A[R]);g.includes(P)?(b.delete(P),S.current.delete(P)):b.get(P)!==!0&&b.set(P,!1)}},[A,g.length,g.join("-")]);const O=[];if(m!==E){let R=[...m];for(let P=0;P<A.length;P++){const $=A[P],I=hy($);g.includes(I)||(R.splice(P,0,$),O.push($))}return a==="wait"&&O.length&&(R=O),T(JH(R)),_(m),null}const{forceRender:M}=N.useContext(X2);return y.jsx(y.Fragment,{children:A.map(R=>{const P=hy(R),$=o&&!d?!1:m===A||g.includes(P),I=()=>{if(S.current.has(P))return;if(b.has(P))S.current.add(P),b.set(P,!0);else return;let k=!0;b.forEach(V=>{V||(k=!1)}),k&&(M==null||M(),T(x.current),o&&(h==null||h()),r&&r())};return y.jsx(A3e,{isPresent:$,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:f,onExitComplete:$?void 0:I,anchorX:l,anchorY:u,children:R},P)})})},ote=N.createContext({strict:!1}),e9={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 t9=!1;function O3e(){if(t9)return;const e={};for(const t in e9)e[t]={isEnabled:n=>e9[t].some(r=>!!n[r])};Dee(e),t9=!0}function ste(){return O3e(),f$e()}function j3e(e){const t=ste();for(const n in e)t[n]={...t[n],...e[n]};Dee(t)}const N3e=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")||N3e.has(e)}let lte=e=>!A0(e);function M3e(e){typeof e=="function"&&(lte=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"||Vn(e[i])||(lte(i)||n===!0&&A0(i)||!t&&!A0(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const nw=N.createContext({});function P3e(e,t){if(tw(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 k3e(e){const{initial:t,animate:n}=P3e(e,N.useContext(nw));return N.useMemo(()=>({initial:t,animate:n}),[n9(t),n9(n)])}function n9(e){return Array.isArray(e)?e.join(" "):e}const Sk=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ute(e,t,n){for(const r in t)!Vn(t[r])&&!Vee(r,n)&&(e[r]=t[r])}function D3e({transformTemplate:e},t){return N.useMemo(()=>{const n=Sk();return bk(n,t,e),Object.assign({},n.vars,n.style)},[t])}function I3e(e,t){const n=e.style||{},r={};return ute(r,n,e),Object.assign(r,D3e(e,t)),r}function L3e(e,t){const n={},r=I3e(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 cte=()=>({...Sk(),attrs:{}});function $3e(e,t,n,r){const i=N.useMemo(()=>{const a=cte();return Fee(a,t,Hee(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};ute(a,e.style,e),i.style={...a,...i.style}}return i}const B3e=["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 _k(e){return typeof e!="string"||e.includes("-")?!1:!!(B3e.indexOf(e)>-1||/[A-Z]/u.test(e))}function q3e(e,t,n,{latestValues:r},i,a=!1,o){const u=(o??_k(e)?$3e:L3e)(t,r,i,e),f=R3e(t,typeof e=="string",a),d=e!==N.Fragment?{...f,...u,ref:n}:{},{children:h}=t,m=N.useMemo(()=>Vn(h)?h.get():h,[h]);return N.createElement(e,{...d,children:m})}function z3e({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:V3e(n,r,i,e),renderState:t()}}function V3e(e,t,n,r){const i={},a=r(e,{});for(const m in a)i[m]=Ly(a[m]);let{initial:o,animate:l}=e;const u=tw(e),f=Pee(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"&&!ew(h)){const m=Array.isArray(h)?h:[h];for(let g=0;g<m.length;g++){const w=dk(e,m[g]);if(w){const{transitionEnd:x,transition:b,...S}=w;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 x)i[E]=x[E]}}}return i}const fte=e=>(t,n)=>{const r=N.useContext(nw),i=N.useContext(Zx),a=()=>z3e(e,t,r,i);return n?a():Q2(a)},F3e=fte({scrapeMotionValuesFromProps:xk,createRenderState:Sk}),U3e=fte({scrapeMotionValuesFromProps:Gee,createRenderState:cte}),H3e=Symbol.for("motionComponentSymbol");function G3e(e,t,n){const r=N.useRef(n);N.useInsertionEffect(()=>{r.current=n});const i=N.useRef(null);return N.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 dte=N.createContext({});function Fc(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}=N.useContext(nw),l=N.useContext(ote),u=N.useContext(Zx),f=N.useContext(wk),d=f.reducedMotion,h=f.skipAnimations,m=N.useRef(null),g=N.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 w=m.current,x=N.useContext(dte);w&&!w.projection&&i&&(w.type==="html"||w.type==="svg")&&W3e(m.current,n,i,x);const b=N.useRef(!1);N.useInsertionEffect(()=>{w&&b.current&&w.update(n,u)});const S=n[wee],E=N.useRef(!!S&&typeof window<"u"&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,S))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,S)));return PJ(()=>{g.current=!0,w&&(b.current=!0,window.MotionIsMounted=!0,w.updateFeatures(),w.scheduleRenderMicrotask(),E.current&&w.animationState&&w.animationState.animateChanges())}),N.useEffect(()=>{w&&(!E.current&&w.animationState&&w.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,S)}),E.current=!1),w.enteringChildren=void 0)}),w}function W3e(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:hte(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||l&&Fc(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:f,layoutAnchor:d})}function hte(e){if(e)return e.options.allowProjection!==!1?e.projection:hte(e.parent)}function kj(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&j3e(r);const a=n?n==="svg":_k(e),o=a?U3e:F3e;function l(f,d){let h;const m={...N.useContext(wk),...f,layoutId:Y3e(f)},{isStatic:g}=m,w=k3e(f),x=o(f,g);if(!g&&typeof window<"u"){X3e();const b=Q3e(m);h=b.MeasureLayout,w.visualElement=K3e(e,x,m,i,b.ProjectionNode,a)}return y.jsxs(nw.Provider,{value:w,children:[h&&w.visualElement?y.jsx(h,{visualElement:w.visualElement,...m}):null,q3e(e,f,G3e(x,w.visualElement,d),x,g,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=N.forwardRef(l);return u[H3e]=e,u}function Y3e({layoutId:e}){const t=N.useContext(X2).id;return t&&e!==void 0?t+"-"+e:e}function X3e(e,t){N.useContext(ote).strict}function Q3e(e){const t=ste(),{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 Z3e(e,t){if(typeof Proxy>"u")return kj;const n=new Map,r=(a,o)=>kj(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,kj(o,void 0,e,t)),n.get(o))})}const J3e=(e,t)=>t.isSVG??_k(e)?new O$e(t):new S$e(t,{allowProjection:e!==N.Fragment});class eBe extends sl{constructor(t){super(t),t.animationState||(t.animationState=P$e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ew(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 tBe=0;class nBe extends sl{constructor(){super(...arguments),this.id=tBe++,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=du(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 rBe={animation:{Feature:eBe},exit:{Feature:nBe}};function sg(e){return{point:{x:e.pageX,y:e.pageY}}}const iBe=e=>t=>mk(t)&&e(t,sg(t));function vp(e,t,n,r){return _m(e,t,iBe(n),r)}const pte=({current:e})=>e?e.ownerDocument.defaultView:null,r9=(e,t)=>Math.abs(e-t);function aBe(e,t){const n=r9(e.x,t.x),r=r9(e.y,t.y);return Math.sqrt(n**2+r**2)}const i9=new Set(["auto","scroll"]);class mte{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=py(this.lastRawMoveEventInfo,this.transformPagePoint));const g=Dj(this.lastMoveEventInfo,this.history),w=this.startEvent!==null,x=aBe(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!w&&!x)return;const{point:b}=g,{timestamp:S}=qn;this.history.push({...b,timestamp:S});const{onStart:E,onMove:_}=this.handlers;w||(E&&E(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,g)},this.handlePointerMove=(g,w)=>{this.lastMoveEvent=g,this.lastRawMoveEventInfo=w,this.lastMoveEventInfo=py(w,this.transformPagePoint),Dt.update(this.updatePoint,!0)},this.handlePointerUp=(g,w)=>{this.end();const{onEnd:x,onSessionEnd:b,resumeAnimation:S}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=Dj(g.type==="pointercancel"?this.lastMoveEventInfo:py(w,this.transformPagePoint),this.history);this.startEvent&&x&&x(g,E),b&&b(g,E)},!mk(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const u=sg(t),f=py(u,this.transformPagePoint),{point:d}=f,{timestamp:h}=qn;this.history=[{...d,timestamp:h}];const{onSessionStart:m}=n;m&&m(t,Dj(f,this.history)),this.removeListeners=ig(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);(i9.has(r.overflowX)||i9.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),Dt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),el(this.updatePoint)}}function py(e,t){return t?{point:t(e.point)}:e}function a9(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Dj({point:e},t){return{point:e,delta:a9(e,gte(t)),offset:a9(e,oBe(t)),velocity:sBe(t,.1)}}function oBe(e){return e[0]}function gte(e){return e[e.length-1]}function sBe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=gte(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=ui(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 lBe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Pt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Pt(n,e,r.max):Math.min(e,n)),e}function o9(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 uBe(e,{top:t,left:n,bottom:r,right:i}){return{x:o9(e.x,n,i),y:o9(e.y,t,r)}}function s9(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 cBe(e,t){return{x:s9(e.x,t.x),y:s9(e.y,t.y)}}function fBe(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)),va(0,1,n)}function dBe(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 TR=.35;function hBe(e=TR){return e===!1?e=0:e===!0&&(e=TR),{x:l9(e,"left","right"),y:l9(e,"top","bottom")}}function l9(e,t,n){return{min:u9(e,t),max:u9(e,n)}}function u9(e,t){return typeof e=="number"?e:e[t]||0}const pBe=new WeakMap;class mBe{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(sg(h).point),this.stopAnimation()},o=(h,m)=>{const{drag:g,dragPropagation:w,onDragStart:x}=this.getProps();if(g&&!w&&(this.openDragLock&&this.openDragLock(),this.openDragLock=zLe(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),Ji(S=>{let E=this.getAxisMotionValue(S).get()||0;if(pa.test(E)){const{projection:_}=this.visualElement;if(_&&_.layout){const A=_.layout.layoutBox[S];A&&(E=ar(A)*(parseFloat(E)/100))}}this.originPoint[S]=E}),x&&Dt.update(()=>x(h,m),!1,!0),gR(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:w,onDirectionLock:x,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:S}=m;if(w&&this.currentDirection===null){this.currentDirection=vBe(S),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",m.point,S),this.updateAxis("y",m.point,S),this.visualElement.render(),b&&Dt.update(()=>b(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 mte(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:u,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:pte(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&&Dt.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||!my(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=lBe(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&&Fc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=uBe(r.layoutBox,t):this.constraints=!1,this.elastic=hBe(n),i!==this.constraints&&!Fc(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ji(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=dBe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Fc(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=g$e(r,i.root,this.visualElement.getTransformPagePoint());let o=cBe(i.layout.layoutBox,a);if(n){const l=n(h$e(o));this.hasMutatedConstraints=!!l,l&&(o=Lee(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},f=Ji(d=>{if(!my(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,w={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(d,w)});return Promise.all(f).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return gR(this.visualElement,t),r.start(fk(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ji(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){Ji(n=>{const{drag:r}=this.getProps();if(!my(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]-Pt(o,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Fc(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ji(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const u=l.get();i[o]=fBe({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(),Ji(o=>{if(!my(o,t,null))return;const l=this.getAxisMotionValue(o),{min:u,max:f}=this.constraints[o];l.set(Pt(u,f,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;pBe.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();Fc(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),r||(r=gBe(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Dt.read(i);const l=_m(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:d})=>{this.isDragging&&d&&(Ji(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=TR,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function c9(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function gBe(e,t,n){const r=vH(e,c9(n)),i=vH(t,c9(n));return()=>{r(),i()}}function my(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function vBe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class yBe extends sl{constructor(t){super(t),this.removeGroupControls=fi,this.removeListeners=fi,this.controls=new mBe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||fi}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 Ij=e=>(t,n)=>{e&&Dt.update(()=>e(t,n),!1,!0)};class bBe extends sl{constructor(){super(...arguments),this.removePointerDownListener=fi}onPointerDown(t){this.session=new mte(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:pte(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ij(t),onStart:Ij(n),onMove:Ij(r),onEnd:(a,o)=>{delete this.session,i&&Dt.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 Lj=!1;class xBe extends N.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),Lj&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),$y.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}),Lj=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Dt.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(),pk.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Lj=!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 vte(e){const[t,n]=ate(),r=N.useContext(X2);return y.jsx(xBe,{...e,layoutGroup:r,switchLayoutGroup:N.useContext(dte),isPresent:t,safeToRemove:n})}const wBe={pan:{Feature:bBe},drag:{Feature:yBe,ProjectionNode:ite,MeasureLayout:vte}};function f9(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&&Dt.postRender(()=>a(t,sg(t)))}class SBe extends sl{mount(){const{current:t}=this.node;t&&(this.unmount=FLe(t,(n,r)=>(f9(this.node,r,"Start"),i=>f9(this.node,i,"End"))))}unmount(){}}class _Be extends sl{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=ig(_m(this.node.current,"focus",()=>this.onFocus()),_m(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function d9(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&&Dt.postRender(()=>a(t,sg(t)))}class EBe extends sl{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=YLe(t,(i,a)=>(d9(this.node,a,"Start"),(o,{success:l})=>d9(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const CR=new WeakMap,$j=new WeakMap,ABe=e=>{const t=CR.get(e.target);t&&t(e)},TBe=e=>{e.forEach(ABe)};function CBe({root:e,...t}){const n=e||document;$j.has(n)||$j.set(n,{});const r=$j.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(TBe,{root:e,...t})),r[i]}function OBe(e,t,n){const r=CBe(t);return CR.set(e,n),r.observe(e),()=>{CR.delete(e),r.unobserve(e)}}const jBe={some:0,all:1};class NBe extends sl{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:jBe[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=OBe(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:NBe},tap:{Feature:EBe},focus:{Feature:_Be},hover:{Feature:SBe}},PBe={layout:{ProjectionNode:ite,MeasureLayout:vte}},kBe={...rBe,...RBe,...wBe,...PBe},h9=Z3e(kBe,J3e);function DBe({children:e,container:t}){const[n,r]=N.useState(!1);return N.useEffect(()=>(r(!0),()=>r(!1)),[]),n?Du.createPortal(e,t||document.body):null}function yte({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(w=>w.status==="failed"),h=e.some(w=>w.status==="delayed"),m=e.filter(w=>w.status==="failed").length,g=e.filter(w=>w.status==="delayed").length;return y.jsx(C3e,{children:e.length>0&&y.jsx(DBe,{children:y.jsx(h9.div,{className:be("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:y.jsxs("div",{className:"relative pointer-events-auto min-w-[400px] h-12",children:[y.jsx(h9.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}}),y.jsxs("div",{className:"relative h-12 flex items-center justify-between px-4",children:[y.jsxs("span",{className:"text-xs text-foreground",children:[e.length," selected"]}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Tn,{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?y.jsx(GS,{className:"h-3 w-3 text-muted-foreground/50"}):null,i&&h&&y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{variant:"ghost",size:"sm",onClick:i,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[l?y.jsx(sp,{className:"mr-1 h-3 w-3 animate-spin"}):y.jsx(_7,{className:"mr-1 h-3 w-3"}),"Promote",g<e.length&&` (${g})`]}),n&&d||r?y.jsx(GS,{className:"h-3 w-3 text-muted-foreground/50"}):null]}),n&&d&&y.jsxs(y.Fragment,{children:[y.jsxs(Tn,{variant:"ghost",size:"sm",onClick:n,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[a?y.jsx(sp,{className:"mr-1 h-3 w-3 animate-spin"}):y.jsx(sP,{className:"mr-1 h-3 w-3"}),"Retry",m<e.length&&` (${m})`]}),r?y.jsx(GS,{className:"h-3 w-3 text-muted-foreground/50"}):null]}),r&&y.jsxs(Tn,{variant:"ghost",size:"sm",onClick:r,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[o?y.jsx(sp,{className:"mr-1 h-3 w-3 animate-spin"}):y.jsx(S7,{className:"mr-1 h-3 w-3"}),"Delete"]})]})]})]})})})})}function T0(e,t){const n=N.useMemo(()=>IBe(e),[e]),r=N.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 y.jsxs("button",{type:"button",onClick:l,className:be("flex items-center gap-1 text-left font-medium transition-colors hover:text-foreground",a?"text-foreground":"text-muted-foreground",i),children:[t,y.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center",children:a?o==="asc"?y.jsx(g7,{className:"h-3 w-3"}):y.jsx(m7,{className:"h-3 w-3"}):y.jsx(wce,{className:"h-3 w-3 opacity-50"})})]})}function IBe(e){if(!e)return;const[t,n]=e.split(":");if(t)return{field:t,direction:n==="asc"?"asc":"desc"}}function bte(e){const t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rw="Checkbox",[LBe]=tl(rw),[$Be,Ek]=LBe(rw);function BBe(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]=mu({prop:n,defaultProp:i??!1,onChange:u,caller:rw}),[w,x]=N.useState(null),[b,S]=N.useState(null),E=N.useRef(!1),_=w?!!o||!!w.closest("form"):!0,A={checked:m,disabled:a,setChecked:g,control:w,setControl:x,name:l,form:o,value:d,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:Us(i)?!1:i,isFormControl:_,bubbleInput:b,setBubbleInput:S};return y.jsx($Be,{scope:t,...A,children:qBe(h)?h(A):r})}var xte="CheckboxTrigger",wte=N.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:w}=Ek(xte,e),x=Bt(i,d),b=N.useRef(u);return N.useEffect(()=>{const S=a==null?void 0:a.form;if(S){const E=()=>h(b.current);return S.addEventListener("reset",E),()=>S.removeEventListener("reset",E)}},[a,h]),y.jsx(ot.button,{type:"button",role:"checkbox","aria-checked":Us(u)?"mixed":u,"aria-required":f,"data-state":Cte(u),"data-disabled":l?"":void 0,disabled:l,value:o,...r,ref:x,onKeyDown:Ue(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:Ue(n,S=>{h(E=>Us(E)?!0:!E),w&&g&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})})});wte.displayName=xte;var Ste=N.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 y.jsx(BBe,{__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})=>y.jsxs(y.Fragment,{children:[y.jsx(wte,{...h,ref:t,__scopeCheckbox:n}),m&&y.jsx(Tte,{__scopeCheckbox:n})]})})});Ste.displayName=rw;var _te="CheckboxIndicator",Ete=N.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=Ek(_te,n);return y.jsx(nl,{present:r||Us(a.checked)||a.checked===!0,children:y.jsx(ot.span,{"data-state":Cte(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});Ete.displayName=_te;var Ate="CheckboxBubbleInput",Tte=N.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}=Ek(Ate,e),w=Bt(n,g),x=bte(a),b=MG(r);N.useEffect(()=>{const E=m;if(!E)return;const _=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(_,"checked").set,O=!i.current;if(x!==a&&T){const M=new Event("click",{bubbles:O});E.indeterminate=Us(a),T.call(E,Us(a)?!1:a),E.dispatchEvent(M)}},[m,x,a,i]);const S=N.useRef(Us(a)?!1:a);return y.jsx(ot.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??S.current,required:l,disabled:u,name:f,value:d,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Tte.displayName=Ate;function qBe(e){return typeof e=="function"}function Us(e){return e==="indeterminate"}function Cte(e){return Us(e)?"indeterminate":e?"checked":"unchecked"}function iw({className:e,indeterminate:t,checked:n,...r}){return y.jsx(Ste,{"data-slot":"checkbox",checked:t?"indeterminate":n,className:be("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:y.jsx(Ete,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:t?y.jsx(y7,{className:"size-3.5"}):y.jsx(pd,{className:"size-3.5"})})})}const zBe=[{value:"all",label:"All"},{value:"waiting",label:"Waiting"},{value:"active",label:"Active"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"delayed",label:"Delayed"}];function VBe({queueName:e,search:t,onSearchChange:n,onJobSelect:r}){var F;sr();const[i,a]=N.useState(new Map),{data:o=[]}=Q0(),l=o.find(X=>X.name===e),u=(l==null?void 0:l.isPaused)??!1,f=Ide(),d=Lde(),h=f.isPending||d.isPending,m=()=>{u?d.mutate(e):f.mutate(e)},g=mK(),w=gK(),x=vK(),b=t.status==="all"?void 0:t.status,{currentSort:S,handleSort:E}=T0(t.sort,X=>n({...t,sort:X})),{data:_,isLoading:A,error:T,fetchNextPage:O,hasNextPage:M,isFetchingNextPage:R,isRefetching:P}=Ade(e,b,t.sort),$=N.useMemo(()=>(_==null?void 0:_.pages.flatMap(X=>X.data))??[],[_]);(F=_==null?void 0:_.pages[0])==null||F.total;const I=vP(),k=X=>{n({...t,status:X})};A||P||I.isPending;const V=X=>i.has(X),D=X=>{a(W=>{const G=new Map(W);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 W of $)X.set(W.id,{queueName:e,jobId:W.id,status:W.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(W=>W.status==="failed");X.length>0&&await g.mutateAsync({jobs:X}),L()},Q=async()=>{const X=Array.from(i.values());await w.mutateAsync({jobs:X}),L()},U=async()=>{const X=Array.from(i.values()).filter(W=>W.status==="delayed");X.length>0&&await x.mutateAsync({jobs:X}),L()};return y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Ox,{value:t.status||"all",onValueChange:k,children:y.jsx(Jm,{children:zBe.map(X=>y.jsx(Ri,{value:X.value,children:X.label},X.value))})}),u&&y.jsx(go,{variant:"secondary",className:"bg-amber-500/10 text-amber-600",children:"Paused"})]}),y.jsx("div",{className:"flex items-center gap-2",children:y.jsx(Tn,{variant:u?"default":"outline",size:"sm",onClick:m,disabled:h,children:u?y.jsxs(y.Fragment,{children:[y.jsx(rb,{className:"mr-2 h-4 w-4"}),"Resume"]}):y.jsxs(y.Fragment,{children:[y.jsx(x7,{className:"mr-2 h-4 w-4"}),"Pause"]})})})]}),A&&$.length===0?y.jsxs(y.Fragment,{children:[y.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:[y.jsx("div",{className:"col-span-5",children:"Job"}),y.jsx("div",{className:"col-span-2",children:"Status"}),y.jsx("div",{className:"col-span-2",children:"Queued"}),y.jsx("div",{className:"col-span-2",children:"Started"}),y.jsx("div",{className:"col-span-1"})]}),y.jsx("div",{className:"divide-y divide-border/50",children:[...Array(15)].map((X,W)=>y.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[y.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[y.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),y.jsxs("div",{className:"space-y-1.5",children:[y.jsx("div",{className:"h-4 w-28 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-3 w-20 animate-pulse rounded bg-muted"})]})]}),y.jsx("div",{className:"col-span-2",children:y.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),y.jsx("div",{className:"col-span-2",children:y.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),y.jsx("div",{className:"col-span-2",children:y.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),y.jsx("div",{className:"col-span-1 flex justify-end",children:y.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"})})]},W.toString()))})]}):T?y.jsx(qr,{icon:vu,title:"Failed to load jobs",description:T.message}):$.length===0?y.jsx(qr,{icon:vu,title:"No jobs found",description:b?`No ${b} jobs in this queue`:"This queue is empty"}):y.jsxs(y.Fragment,{children:[y.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:[y.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[y.jsx(iw,{checked:z,indeterminate:H,onCheckedChange:X=>{X?q():L()}}),y.jsx(Pn,{field:"name",label:"Job",currentSort:S,onSort:E})]}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"status",label:"Status",currentSort:S,onSort:E})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"timestamp",label:"Queued",currentSort:S,onSort:E})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"processedOn",label:"Started",currentSort:S,onSort:E})}),y.jsx("div",{className:"col-span-1"})]}),y.jsx("div",{className:"divide-y divide-border/50",children:$.map(X=>y.jsx(FBe,{job:X,selected:V(X.id),onSelect:()=>D(X),onClick:()=>r(X.id)},X.id))}),M&&y.jsx("div",{className:"flex justify-center pt-4",children:y.jsx(Tn,{variant:"outline",onClick:()=>O(),disabled:R,children:R?y.jsxs(y.Fragment,{children:[y.jsx(Im,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):"Load more"})}),y.jsx("div",{className:"flex items-center justify-between pt-2 text-sm text-muted-foreground",children:y.jsxs("span",{children:["Showing ",$.length," jobs"]})})]}),y.jsx(yte,{selection:Array.from(i.values()),onClear:L,onRetry:Y,onDelete:Q,onPromote:U,isRetrying:g.isPending,isDeleting:w.isPending,isPromoting:x.isPending})]})}function FBe({job:e,selected:t,onSelect:n,onClick:r}){const i=a=>{a.stopPropagation(),n()};return y.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:[y.jsxs("div",{className:"col-span-5 flex min-w-0 items-center gap-3",children:[y.jsx("div",{onClick:i,onKeyDown:a=>a.stopPropagation(),children:y.jsx(iw,{checked:t})}),y.jsx(vu,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),y.jsxs("div",{className:"min-w-0",children:[y.jsx("div",{className:"truncate font-medium",children:e.name}),y.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:Qy(e.id,24)})]})]}),y.jsx("div",{className:"col-span-2",children:y.jsx(Qm,{status:e.status,duration:e.duration})}),y.jsx("div",{className:"col-span-2 text-muted-foreground",children:y.jsx(Au,{timestamp:e.timestamp})}),y.jsx("div",{className:"col-span-2 text-muted-foreground",children:e.processedOn?y.jsx(Au,{timestamp:e.processedOn}):y.jsx("span",{children:"-"})}),y.jsx("div",{className:"col-span-1 flex justify-end",children:y.jsx(jf,{className:"h-4 w-4 text-muted-foreground"})})]})}function UBe({onQueueSelect:e}){const{data:t}=gd(),{data:n=[],isLoading:r,error:i}=Q0(),a=HBe(n,(t==null?void 0:t.queueGroups)||[],(t==null?void 0:t.queues)||[]),o=a.reduce((l,u)=>{for(const f of u.queues)l.queues+=1,l.waiting+=f.counts.waiting,l.active+=f.counts.active,l.failed+=f.counts.failed,l.completed+=f.counts.completed;return l},{queues:0,waiting:0,active:0,failed:0,completed:0});return r&&n.length===0?y.jsx(GBe,{}):i?y.jsx("div",{className:"flex min-h-[320px] items-center justify-center",children:y.jsxs("div",{className:"text-center",children:[y.jsx(po,{className:"mx-auto mb-3 h-8 w-8 text-destructive"}),y.jsx("h3",{className:"font-medium",children:"Failed to load queues"}),y.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:i.message})]})}):a.length===0?y.jsx("div",{className:"flex min-h-[320px] items-center justify-center",children:y.jsxs("div",{className:"text-center",children:[y.jsx(D3,{className:"mx-auto mb-3 h-8 w-8 text-muted-foreground"}),y.jsx("h3",{className:"font-medium",children:"No queues configured"})]})}):y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[y.jsx(gy,{label:"Queues",value:o.queues,icon:xN}),y.jsx(gy,{label:"Active",value:o.active,icon:p7}),y.jsx(gy,{label:"Waiting",value:o.waiting,icon:D3}),y.jsx(gy,{label:"Failed",value:o.failed,icon:po,tone:o.failed>0?"danger":void 0})]}),y.jsx("div",{className:"space-y-5",children:a.map(l=>{const u=l.queues.reduce((f,d)=>(f.waiting+=d.counts.waiting,f.active+=d.counts.active,f.failed+=d.counts.failed,f),{waiting:0,active:0,failed:0});return y.jsxs("section",{className:"space-y-2",children:[y.jsxs("div",{className:"flex items-center justify-between gap-3",children:[y.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[y.jsx(xN,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),y.jsx("h2",{className:"truncate font-medium",children:l.name}),y.jsx(go,{variant:"secondary",children:l.queues.length})]}),y.jsxs("div",{className:"hidden items-center gap-3 font-mono text-xs text-muted-foreground sm:flex",children:[y.jsxs("span",{children:[u.active," active"]}),y.jsxs("span",{children:[u.waiting," waiting"]}),y.jsxs("span",{className:be(u.failed>0&&"text-destructive"),children:[u.failed," failed"]})]})]}),y.jsxs("div",{className:"overflow-x-auto border bg-card",children:[y.jsxs("div",{className:"grid min-w-[520px] grid-cols-[minmax(0,1fr)_72px_72px_72px_86px] border-b px-3 py-2 text-xs text-muted-foreground",children:[y.jsx("span",{children:"Queue"}),y.jsx("span",{className:"text-right",children:"Waiting"}),y.jsx("span",{className:"text-right",children:"Active"}),y.jsx("span",{className:"text-right",children:"Failed"}),y.jsx("span",{className:"text-right",children:"State"})]}),l.queues.map(f=>y.jsxs("button",{type:"button",onClick:()=>e(f.name),className:"grid min-w-[520px] w-full grid-cols-[minmax(0,1fr)_72px_72px_72px_86px] items-center border-b px-3 py-2 text-left text-sm transition-colors last:border-b-0 hover:bg-accent",children:[y.jsx("span",{className:"truncate font-mono font-medium",children:f.name}),y.jsx(Bj,{value:f.counts.waiting}),y.jsx(Bj,{value:f.counts.active,tone:"active"}),y.jsx(Bj,{value:f.counts.failed,tone:f.counts.failed>0?"danger":void 0}),y.jsx("span",{className:"flex justify-end",children:f.isPaused?y.jsx(go,{variant:"outline",children:"Paused"}):y.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[y.jsx(iP,{className:"h-3 w-3"}),"Live"]})})]},f.name))]})]},l.name)})})]})}function HBe(e,t,n){const r=new Map(e.map(l=>[l.name,l])),i=new Set,a=[];for(const l of t){const u=l.queues.map(f=>r.get(f)).filter(f=>!!f);for(const f of u)i.add(f.name);u.length>0&&a.push({name:l.name,queues:u})}const o=n.map(l=>r.get(l)).filter(l=>!!l).filter(l=>!i.has(l.name));return o.length>0&&a.push({name:"Ungrouped",queues:o}),a}function gy({label:e,value:t,icon:n,tone:r}){return y.jsxs("div",{className:"border bg-card p-3",children:[y.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[y.jsx("span",{className:"text-sm text-muted-foreground",children:e}),y.jsx(n,{className:be("h-4 w-4 text-muted-foreground",r==="danger"&&"text-destructive")})]}),y.jsx("div",{className:"font-mono text-2xl font-semibold",children:t.toLocaleString()})]})}function Bj({value:e,tone:t}){return y.jsx("span",{className:be("text-right font-mono",t==="active"&&e>0&&"text-warning",t==="danger"&&"text-destructive"),children:e.toLocaleString()})}function GBe(){return y.jsxs("div",{className:"space-y-6",children:[y.jsx("div",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[...Array(4)].map((e,t)=>y.jsxs("div",{className:"border bg-card p-3",children:[y.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[y.jsx(Mn,{className:"h-4 w-16"}),y.jsx(Mn,{className:"h-4 w-4"})]}),y.jsx(Mn,{className:"h-8 w-14"})]},t.toString()))}),[...Array(2)].map((e,t)=>y.jsxs("div",{className:"space-y-2",children:[y.jsx(Mn,{className:"h-5 w-36"}),y.jsx("div",{className:"border bg-card",children:[...Array(3)].map((n,r)=>y.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_72px_72px_72px_86px] border-b px-3 py-2 last:border-b-0",children:[y.jsx(Mn,{className:"h-5 w-28"}),y.jsx(Mn,{className:"ml-auto h-5 w-8"}),y.jsx(Mn,{className:"ml-auto h-5 w-8"}),y.jsx(Mn,{className:"ml-auto h-5 w-8"}),y.jsx(Mn,{className:"ml-auto h-5 w-14"})]},r.toString()))})]},t.toString()))]})}function KBe({search:e,onSearchChange:t,onJobSelect:n,onQueueSelect:r}){sr();const[i,a]=N.useState(new Map),o=mK(),l=gK(),u=vK(),{currentSort:f,handleSort:d}=T0(e.sort,G=>t({...e,sort:G})),h=N.useMemo(()=>yP(e.q??""),[e.q]),m=N.useMemo(()=>{if(e.from&&e.to)return{start:e.from,end:e.to}},[e.from,e.to]),g=N.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:w,isLoading:x,error:b,fetchNextPage:S,hasNextPage:E,isFetchingNextPage:_,isRefetching:A}=Ode(e.sort,g),T=N.useMemo(()=>(w==null?void 0:w.pages.flatMap(G=>G.data))??[],[w]),O=T,M=(G,Z)=>{t({...e,q:G||void 0,status:Z??e.status})},R=G=>{t({...e,from:G==null?void 0:G.start,to:G==null?void 0:G.end})},P=vP();x||A||P.isPending;const $=(G,Z)=>`${G}:${Z}`,I=(G,Z)=>i.has($(G,Z)),k=G=>{const Z=$(G.queueName,G.id);a(J=>{const re=new Map(J);return re.has(Z)?re.delete(Z):re.set(Z,{queueName:G.queueName,jobId:G.id,status:G.status}),re})},V=()=>{const G=new Map;for(const Z of O){const J=$(Z.queueName,Z.id);G.set(J,{queueName:Z.queueName,jobId:Z.id,status:Z.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(Z=>Z.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(Z=>Z.status==="delayed");G.length>0&&await u.mutateAsync({jobs:G}),D()},{data:Q}=Ede(),U=N.useMemo(()=>{if(!Q){const Z=Date.now(),J=14400*1e3,re=new Date(Z);return re.setHours(0,0,0,0),re.setDate(re.getDate()-6),{buckets:[],startTime:re.getTime(),endTime:Z,bucketSize:J}}return{buckets:Q.buckets.map(Z=>{const J=new Date(Z.time);return{time:Z.time,label:J.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric",hour:"numeric"}),dayLabel:J.toLocaleDateString([],{weekday:"short"}),success:Z.completed,error:Z.failed}}),startTime:Q.startTime,endTime:Q.endTime,bucketSize:Q.bucketSize}},[Q]),F=(Q==null?void 0:Q.totalCompleted)??0,X=(Q==null?void 0:Q.totalFailed)??0,W=N.useRef(null);return N.useEffect(()=>{const G=W.current;if(!G||!E)return;const Z=new IntersectionObserver(J=>{J[0].isIntersecting&&E&&!_&&S()},{rootMargin:"100px"});return Z.observe(G),()=>Z.disconnect()},[E,_,S]),y.jsxs("div",{className:"h-full overflow-auto",children:[y.jsx("div",{className:"pb-4",children:y.jsx(YBe,{data:U,selection:m??null,onSelectionChange:R,totalSuccess:F,totalError:X})}),y.jsxs("div",{className:"sticky top-0 z-20 bg-background",children:[y.jsx("div",{className:"border-b border-dashed pb-3",children:y.jsx(Gde,{value:e.q??"",status:e.status,onChange:M})}),y.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:[y.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[y.jsx(iw,{checked:q,indeterminate:L,onCheckedChange:G=>{G?V():D()}}),y.jsx(Pn,{field:"name",label:"Job",currentSort:f,onSort:d})]}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"queueName",label:"Queue",currentSort:f,onSort:d})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"status",label:"Status",currentSort:f,onSort:d})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"timestamp",label:"Time",currentSort:f,onSort:d})}),y.jsx("div",{className:"col-span-1",children:y.jsx(Pn,{field:"duration",label:"Duration",currentSort:f,onSort:d})})]})]}),x&&T.length===0?y.jsx("div",{className:"divide-y divide-border/50",children:[...Array(15)].map((G,Z)=>y.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[y.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[y.jsx("div",{className:"h-4 w-4 animate-pulse bg-muted"}),y.jsx("div",{className:"h-2 w-2 animate-pulse bg-muted"}),y.jsx("div",{className:"h-4 w-32 animate-pulse bg-muted"})]}),y.jsx("div",{className:"col-span-2",children:y.jsx("div",{className:"h-4 w-16 animate-pulse bg-muted"})}),y.jsx("div",{className:"col-span-2",children:y.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),y.jsx("div",{className:"col-span-2",children:y.jsx("div",{className:"h-4 w-24 animate-pulse bg-muted"})}),y.jsx("div",{className:"col-span-1",children:y.jsx("div",{className:"h-4 w-12 animate-pulse bg-muted"})})]},Z.toString()))}):b?y.jsx("div",{className:"flex h-64 items-center justify-center",children:y.jsx(qr,{icon:vu,title:"Failed to load runs",description:b.message})}):O.length===0?y.jsx("div",{className:"flex h-64 items-center justify-center",children:y.jsx(qr,{icon:vu,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"})}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"divide-y divide-border/50",children:O.map(G=>y.jsx(WBe,{run:G,selected:I(G.queueName,G.id),onSelect:()=>k(G),onClick:()=>n(G.queueName,G.id),onQueueClick:r},`${G.queueName}-${G.id}`))}),E&&y.jsx("div",{ref:W,className:"flex items-center justify-center py-4",children:_&&y.jsx(Im,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),y.jsxs("div",{className:"px-6 py-3 text-xs text-muted-foreground",children:["Showing ",O.length," runs"]})]}),y.jsx(yte,{selection:Array.from(i.values()),onClear:D,onRetry:z,onDelete:H,onPromote:Y,isRetrying:o.isPending,isDeleting:l.isPending,isPromoting:u.isPending})]})}function WBe({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 y.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:[y.jsxs("div",{className:"col-span-5 flex min-w-0 items-center gap-3",children:[y.jsx("div",{onClick:o,onKeyDown:u=>u.stopPropagation(),children:y.jsx(iw,{checked:t})}),y.jsx(j1e,{status:e.status}),y.jsxs("div",{className:"min-w-0",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"truncate font-medium",children:e.name}),a&&y.jsxs("div",{className:"flex items-center gap-1",children:[Object.entries(e.tags).slice(0,2).map(([u,f])=>y.jsxs(q0,{children:[y.jsx(z0,{asChild:!0,children:y.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,":",Qy(String(f),8)]})}),y.jsx(Pm,{children:y.jsxs("span",{className:"font-mono",children:[u,": ",String(f)]})})]},u)),Object.keys(e.tags).length>2&&y.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",Object.keys(e.tags).length-2]})]})]}),y.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:Qy(e.id,24)})]})]}),y.jsx("div",{className:"col-span-2",children:y.jsx("button",{type:"button",onClick:l,className:"truncate font-mono text-xs text-primary hover:underline",children:e.queueName})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Qm,{status:e.status})}),y.jsx("div",{className:"col-span-2 text-muted-foreground",children:e.processedOn?y.jsx(Au,{timestamp:e.processedOn}):y.jsx(Au,{timestamp:e.timestamp})}),y.jsxs("div",{className:"col-span-1 flex items-center justify-between",children:[y.jsx("span",{className:"font-mono text-muted-foreground",children:e.duration?wr(e.duration):"-"}),y.jsx(jf,{className:"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})]})}function YBe({data:e,selection:t,onSelectionChange:n,totalSuccess:r,totalError:i}){const a=N.useRef(null),[o,l]=N.useState(!1),[u,f]=N.useState(null),[d,h]=N.useState(null),m=Math.max(...e.buckets.map(A=>A.success+A.error),1),g=A=>{if(!a.current)return e.startTime;const T=a.current.getBoundingClientRect(),M=Math.max(0,Math.min(A-T.left,T.width))/T.width;return e.startTime+M*(e.endTime-e.startTime)},w=A=>{if(A.button!==0)return;const T=g(A.clientX);l(!0),f(T),h(T)},x=A=>{if(!o||u===null)return;const T=g(A.clientX);h(T)},b=()=>{if(o&&u!==null&&d!==null){const A=Math.min(u,d),T=Math.max(u,d);T-A>1e3&&n({start:A,end:T})}l(!1),f(null),h(null)},S=()=>{o&&b()},E=A=>{const T=new Date(A),O=new Date;return T.toDateString()===O.toDateString()?"Today":T.toLocaleDateString([],{weekday:"short"})},_=A=>{const T=e.endTime-e.startTime,O=(A.start-e.startTime)/T*100,M=(A.end-A.start)/T*100;return{left:`${O}%`,width:`${M}%`}};return y.jsxs("div",{className:"border border-dashed p-4",children:[y.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Activity"}),y.jsx("span",{className:"text-xs text-muted-foreground",children:"Last 7 days"})]}),y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:"h-2 w-2 bg-chart-1"}),y.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:[r," completed"]})]}),y.jsxs("div",{className:"flex items-center gap-1.5",children:[y.jsx("div",{className:"h-2 w-2 bg-chart-failed"}),y.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:[i," failed"]})]}),y.jsx("div",{className:"h-6",children:t&&y.jsxs(Tn,{variant:"ghost",size:"sm",onClick:()=>n(null),className:"h-6 gap-1 px-2 text-xs",children:[y.jsx(Np,{className:"h-3 w-3"}),"Clear"]})})]})]}),y.jsxs("div",{ref:a,className:"relative h-12 cursor-crosshair select-none",onMouseDown:w,onMouseMove:x,onMouseUp:b,onMouseLeave:S,children:[e.buckets.map((A,T)=>{const O=A.success+A.error,M=A.success>0?Math.max(A.success/m*100,8):0,R=A.error>0?Math.max(A.error/m*100,8):0,P=O>0,$=e.endTime-e.startTime,I=(A.time-e.startTime)/$*100;return y.jsxs(q0,{children:[y.jsx(z0,{asChild:!0,children:y.jsx("div",{className:"absolute bottom-0 flex h-full w-[3px] flex-col justify-end",style:{left:`${I}%`},children:P?y.jsxs(y.Fragment,{children:[A.error>0&&y.jsx("div",{className:"w-full bg-chart-failed",style:{height:`${R}%`}}),A.success>0&&y.jsx("div",{className:"w-full bg-chart-1",style:{height:`${M}%`}})]}):y.jsx("div",{className:"h-px w-full bg-muted/30"})})}),y.jsxs(Pm,{side:"top",className:"text-xs",children:[y.jsx("div",{className:"font-medium text-foreground",children:A.label}),O>0?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:"text-muted-foreground",children:[O," ",O===1?"run":"runs"]}),A.success>0&&y.jsxs("div",{className:"text-chart-1",children:[A.success," completed"]}),A.error>0&&y.jsxs("div",{className:"text-chart-failed",children:[A.error," failed"]})]}):y.jsx("div",{className:"text-muted-foreground",children:"No activity"})]})]},T.toString())}),y.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-px bg-border"}),o&&u!==null&&d!==null&&y.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&&y.jsx("div",{className:"pointer-events-none absolute bottom-0 top-0 border-x-2 border-ring bg-ring/20",style:_(t)})]}),y.jsx("div",{className:"mt-2 flex justify-between text-[10px] text-muted-foreground",children:Array.from({length:7}).map((A,T)=>{const O=e.startTime+T*24*60*60*1e3;return y.jsx("span",{children:E(O)},T.toString())})})]})}function XBe({search:e,onSearchChange:t}){sr();const{currentSort:n,handleSort:r}=T0(e.repeatableSort,b=>t({...e,repeatableSort:b})),{currentSort:i,handleSort:a}=T0(e.delayedSort,b=>t({...e,delayedSort:b})),{data:o=[],isLoading:l,error:u,isRefetching:f}=jde(e.repeatableSort),{data:d=[],isLoading:h,error:m,isRefetching:g}=Nde(e.delayedSort),w=vP();l||h||f||g||w.isPending;const x=u||m;return l||h?y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("div",{className:"h-7 w-32 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-9 w-9 animate-pulse rounded bg-muted"})]}),y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{className:"flex gap-2",children:[y.jsx("div",{className:"h-9 w-32 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-9 w-28 animate-pulse rounded bg-muted"})]}),y.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:[y.jsx("div",{className:"col-span-3",children:"Name"}),y.jsx("div",{className:"col-span-2",children:"Queue"}),y.jsx("div",{className:"col-span-3",children:"Pattern"}),y.jsx("div",{className:"col-span-2",children:"Next Run"}),y.jsx("div",{className:"col-span-2",children:"Timezone"})]}),y.jsx("div",{className:"divide-y divide-border/50",children:[...Array(10)].map((b,S)=>y.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[y.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[y.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),y.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})]}),y.jsx("div",{className:"col-span-2",children:y.jsx("div",{className:"h-3 w-16 animate-pulse rounded bg-muted"})}),y.jsx("div",{className:"col-span-3",children:y.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})}),y.jsx("div",{className:"col-span-2",children:y.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),y.jsx("div",{className:"col-span-2",children:y.jsx("div",{className:"h-3 w-16 animate-pulse rounded bg-muted"})})]},`pulse-${S.toString()}`))})]})]}):x?y.jsx(qr,{icon:po,title:"Failed to load schedulers",description:x.message}):y.jsx("div",{className:"space-y-6",children:y.jsxs(Ox,{value:e.tab||"repeatable",onValueChange:b=>t({...e,tab:b}),children:[y.jsxs(Jm,{children:[y.jsxs(Ri,{value:"repeatable",children:["Repeatable (",o.length,")"]}),y.jsxs(Ri,{value:"delayed",children:["Delayed (",d.length,")"]})]}),y.jsx(ia,{value:"repeatable",className:"mt-4",children:o.length===0?y.jsx(qr,{icon:Li,title:"No repeatable jobs",description:"No cron or repeating jobs are configured"}):y.jsxs("div",{className:"divide-y divide-border/50",children:[y.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:[y.jsx("div",{className:"col-span-3",children:y.jsx(Pn,{field:"name",label:"Name",currentSort:n,onSort:r})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"queueName",label:"Queue",currentSort:n,onSort:r})}),y.jsx("div",{className:"col-span-3",children:y.jsx(Pn,{field:"pattern",label:"Pattern",currentSort:n,onSort:r})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"next",label:"Next Run",currentSort:n,onSort:r})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"tz",label:"Timezone",currentSort:n,onSort:r})})]}),o.map(b=>y.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3 text-sm",children:[y.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[y.jsx(Li,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),y.jsx("span",{className:"truncate font-medium",children:b.name})]}),y.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:b.queueName}),y.jsx("div",{className:"col-span-3 font-mono text-xs",children:b.pattern||(b.every?`every ${wr(b.every)}`:"-")}),y.jsx("div",{className:"col-span-2 text-muted-foreground",children:b.next?y.jsx(Au,{timestamp:b.next}):"-"}),y.jsx("div",{className:"col-span-2 text-xs text-muted-foreground",children:b.tz||"UTC"})]},b.key))]})}),y.jsx(ia,{value:"delayed",className:"mt-4",children:d.length===0?y.jsx(qr,{icon:I3,title:"No delayed jobs",description:"No jobs are scheduled for future execution"}):y.jsxs("div",{className:"divide-y divide-border/50",children:[y.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:[y.jsx("div",{className:"col-span-3",children:y.jsx(Pn,{field:"name",label:"Name",currentSort:i,onSort:a})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"queueName",label:"Queue",currentSort:i,onSort:a})}),y.jsx("div",{className:"col-span-2",children:"Job ID"}),y.jsx("div",{className:"col-span-3",children:y.jsx(Pn,{field:"processAt",label:"Executes At",currentSort:i,onSort:a})}),y.jsx("div",{className:"col-span-2",children:y.jsx(Pn,{field:"delay",label:"Delay",currentSort:i,onSort:a})})]}),d.map(b=>y.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3 text-sm",children:[y.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[y.jsx(I3,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),y.jsx("span",{className:"truncate font-medium",children:b.name})]}),y.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:b.queueName}),y.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:b.id}),y.jsx("div",{className:"col-span-3 text-muted-foreground",children:y.jsx(Au,{timestamp:b.processAt})}),y.jsx("div",{className:"col-span-2 text-muted-foreground",children:wr(b.delay)})]},`${b.queueName}-${b.id}`))]})})]})})}function p9(e,[t,n]){return Math.min(n,Math.max(t,e))}var QBe=[" ","Enter","ArrowUp","ArrowDown"],ZBe=[" ","Enter"],Mu="Select",[aw,ow,JBe]=RX(Mu),[kd]=tl(Mu,[JBe,I0]),sw=I0(),[eqe,ll]=kd(Mu),[tqe,nqe]=kd(Mu),Ote=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:w}=e,x=sw(t),[b,S]=N.useState(null),[E,_]=N.useState(null),[A,T]=N.useState(!1),O=o2(f),[M,R]=mu({prop:r,defaultProp:i??!1,onChange:a,caller:Mu}),[P,$]=mu({prop:o,defaultProp:l,onChange:u,caller:Mu}),I=N.useRef(null),k=b?w||!!b.closest("form"):!0,[V,D]=N.useState(new Set),q=Array.from(V).map(L=>L.props.value).join(";");return y.jsx(zG,{...x,children:y.jsxs(eqe,{required:g,scope:t,trigger:b,onTriggerChange:S,valueNode:E,onValueNodeChange:_,valueNodeHasChildren:A,onValueNodeHasChildrenChange:T,contentId:or(),value:P,onValueChange:$,open:M,onOpenChange:R,dir:O,triggerPointerDownPosRef:I,disabled:m,children:[y.jsx(aw.Provider,{scope:t,children:y.jsx(tqe,{scope:e.__scopeSelect,onNativeOptionAdd:N.useCallback(L=>{D(z=>new Set(z).add(L))},[]),onNativeOptionRemove:N.useCallback(L=>{D(z=>{const H=new Set(z);return H.delete(L),H})},[]),children:n})}),k?y.jsxs(Zte,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:h,value:P,onChange:L=>$(L.target.value),disabled:m,form:w,children:[P===void 0?y.jsx("option",{value:""}):null,Array.from(V)]},q):null]})})};Ote.displayName=Mu;var jte="SelectTrigger",Nte=N.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=sw(n),o=ll(jte,n),l=o.disabled||r,u=Bt(t,o.onTriggerChange),f=ow(n),d=N.useRef("touch"),[h,m,g]=ene(x=>{const b=f().filter(_=>!_.disabled),S=b.find(_=>_.value===o.value),E=tne(b,x,S);E!==void 0&&o.onValueChange(E.value)}),w=x=>{l||(o.onOpenChange(!0),g()),x&&(o.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return y.jsx(VG,{asChild:!0,...a,children:y.jsx(ot.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":Jte(o.value)?"":void 0,...i,ref:u,onClick:Ue(i.onClick,x=>{x.currentTarget.focus(),d.current!=="mouse"&&w(x)}),onPointerDown:Ue(i.onPointerDown,x=>{d.current=x.pointerType;const b=x.target;b.hasPointerCapture(x.pointerId)&&b.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(w(x),x.preventDefault())}),onKeyDown:Ue(i.onKeyDown,x=>{const b=h.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&m(x.key),!(b&&x.key===" ")&&QBe.includes(x.key)&&(w(),x.preventDefault())})})})});Nte.displayName=jte;var Mte="SelectValue",Rte=N.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...l}=e,u=ll(Mte,n),{onValueNodeHasChildrenChange:f}=u,d=a!==void 0,h=Bt(t,u.onValueNodeChange);return Zn(()=>{f(d)},[f,d]),y.jsx(ot.span,{...l,ref:h,style:{pointerEvents:"none"},children:Jte(u.value)?y.jsx(y.Fragment,{children:o}):a})});Rte.displayName=Mte;var rqe="SelectIcon",Pte=N.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return y.jsx(ot.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});Pte.displayName=rqe;var iqe="SelectPortal",kte=e=>y.jsx(L0,{asChild:!0,...e});kte.displayName=iqe;var Ru="SelectContent",Dte=N.forwardRef((e,t)=>{const n=ll(Ru,e.__scopeSelect),[r,i]=N.useState();if(Zn(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?Du.createPortal(y.jsx(Ite,{scope:e.__scopeSelect,children:y.jsx(aw.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),a):null}return y.jsx(Lte,{...e,ref:t})});Dte.displayName=Ru;var Ti=10,[Ite,ul]=kd(Ru),aqe="SelectContentImpl",oqe=Ep("SelectContent.RemoveScroll"),Lte=N.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:w,hideWhenDetached:x,avoidCollisions:b,...S}=e,E=ll(Ru,n),[_,A]=N.useState(null),[T,O]=N.useState(null),M=Bt(t,J=>A(J)),[R,P]=N.useState(null),[$,I]=N.useState(null),k=ow(n),[V,D]=N.useState(!1),q=N.useRef(!1);N.useEffect(()=>{if(_)return B7(_)},[_]),N7();const L=N.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&&T&&(T.scrollTop=0),oe===fe&&T&&(T.scrollTop=T.scrollHeight),oe==null||oe.focus(),document.activeElement!==he))return},[k,T]),z=N.useCallback(()=>L([R,_]),[L,R,_]);N.useEffect(()=>{V&&z()},[V,z]);const{onOpenChange:H,triggerPointerDownPosRef:Y}=E;N.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]),N.useEffect(()=>{const J=()=>H(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[H]);const[Q,U]=ene(J=>{const re=k().filter(he=>!he.disabled),ne=re.find(he=>he.ref.current===document.activeElement),fe=tne(re,J,ne);fe&&setTimeout(()=>fe.ref.current.focus())}),F=N.useCallback((J,re,ne)=>{const fe=!q.current&&!ne;(E.value!==void 0&&E.value===re||fe)&&(P(J),fe&&(q.current=!0))},[E.value]),X=N.useCallback(()=>_==null?void 0:_.focus(),[_]),W=N.useCallback((J,re,ne)=>{const fe=!q.current&&!ne;(E.value!==void 0&&E.value===re||fe)&&I(J)},[E.value]),G=r==="popper"?OR:$te,Z=G===OR?{side:l,sideOffset:u,align:f,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:w,hideWhenDetached:x,avoidCollisions:b}:{};return y.jsx(Ite,{scope:n,content:_,viewport:T,onViewportChange:O,itemRefCallback:F,selectedItem:R,onItemLeave:X,itemTextRefCallback:W,focusSelectedItem:z,selectedItemText:$,position:r,isPositioned:V,searchRef:Q,children:y.jsx(cP,{as:oqe,allowPinchZoom:!0,children:y.jsx(uP,{asChild:!0,trapped:E.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:Ue(i,J=>{var re;(re=E.trigger)==null||re.focus({preventScroll:!0}),J.preventDefault()}),children:y.jsx(M0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:y.jsx(G,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:J=>J.preventDefault(),...S,...Z,onPlaced:()=>D(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:Ue(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()}})})})})})})});Lte.displayName=aqe;var sqe="SelectItemAlignedPosition",$te=N.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=ll(Ru,n),o=ul(Ru,n),[l,u]=N.useState(null),[f,d]=N.useState(null),h=Bt(t,M=>d(M)),m=ow(n),g=N.useRef(!1),w=N.useRef(!0),{viewport:x,selectedItem:b,selectedItemText:S,focusSelectedItem:E}=o,_=N.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&f&&x&&b&&S){const M=a.trigger.getBoundingClientRect(),R=f.getBoundingClientRect(),P=a.valueNode.getBoundingClientRect(),$=S.getBoundingClientRect();if(a.dir!=="rtl"){const he=$.left-R.left,oe=P.left-he,ye=M.left-oe,xe=M.width+ye,we=Math.max(xe,R.width),Te=window.innerWidth-Ti,Ee=p9(oe,[Ti,Math.max(Ti,Te-we)]);l.style.minWidth=xe+"px",l.style.left=Ee+"px"}else{const he=R.right-$.right,oe=window.innerWidth-P.right-he,ye=window.innerWidth-M.right-oe,xe=M.width+ye,we=Math.max(xe,R.width),Te=window.innerWidth-Ti,Ee=p9(oe,[Ti,Math.max(Ti,Te-we)]);l.style.minWidth=xe+"px",l.style.right=Ee+"px"}const I=m(),k=window.innerHeight-Ti*2,V=x.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,Q=Math.min(b.offsetHeight*5,Y),U=window.getComputedStyle(x),F=parseInt(U.paddingTop,10),X=parseInt(U.paddingBottom,10),W=M.top+M.height/2-Ti,G=k-W,Z=b.offsetHeight/2,J=b.offsetTop+Z,re=q+L+J,ne=Y-re;if(re<=W){const he=I.length>0&&b===I[I.length-1].ref.current;l.style.bottom="0px";const oe=f.clientHeight-x.offsetTop-x.offsetHeight,ye=Math.max(G,Z+(he?X:0)+oe+z),xe=re+ye;l.style.height=xe+"px"}else{const he=I.length>0&&b===I[0].ref.current;l.style.top="0px";const ye=Math.max(W,q+x.offsetTop+(he?F:0)+Z)+ne;l.style.height=ye+"px",x.scrollTop=re-W+x.offsetTop}l.style.margin=`${Ti}px 0`,l.style.minHeight=Q+"px",l.style.maxHeight=k+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[m,a.trigger,a.valueNode,l,f,x,b,S,a.dir,r]);Zn(()=>_(),[_]);const[A,T]=N.useState();Zn(()=>{f&&T(window.getComputedStyle(f).zIndex)},[f]);const O=N.useCallback(M=>{M&&w.current===!0&&(_(),E==null||E(),w.current=!1)},[_,E]);return y.jsx(uqe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:O,children:y.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:y.jsx(ot.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});$te.displayName=sqe;var lqe="SelectPopperPosition",OR=N.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ti,...a}=e,o=sw(n);return y.jsx(FG,{...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)"}})});OR.displayName=lqe;var[uqe,Ak]=kd(Ru,{}),jR="SelectViewport",Bte=N.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=ul(jR,n),o=Ak(jR,n),l=Bt(t,a.onViewportChange),u=N.useRef(0);return y.jsxs(y.Fragment,{children:[y.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}),y.jsx(aw.Slot,{scope:n,children:y.jsx(ot.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ue(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 w=window.innerHeight-Ti*2,x=parseFloat(h.style.minHeight),b=parseFloat(h.style.height),S=Math.max(x,b);if(S<w){const E=S+g,_=Math.min(w,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})})})]})});Bte.displayName=jR;var qte="SelectGroup",[cqe,fqe]=kd(qte),dqe=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=or();return y.jsx(cqe,{scope:n,id:i,children:y.jsx(ot.div,{role:"group","aria-labelledby":i,...r,ref:t})})});dqe.displayName=qte;var zte="SelectLabel",Vte=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=fqe(zte,n);return y.jsx(ot.div,{id:i.id,...r,ref:t})});Vte.displayName=zte;var C0="SelectItem",[hqe,Fte]=kd(C0),Ute=N.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,l=ll(C0,n),u=ul(C0,n),f=l.value===r,[d,h]=N.useState(a??""),[m,g]=N.useState(!1),w=Bt(t,E=>{var _;return(_=u.itemRefCallback)==null?void 0:_.call(u,E,r,i)}),x=or(),b=N.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 y.jsx(hqe,{scope:n,value:r,disabled:i,textId:x,isSelected:f,onItemTextChange:N.useCallback(E=>{h(_=>_||((E==null?void 0:E.textContent)??"").trim())},[]),children:y.jsx(aw.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:y.jsx(ot.div,{role:"option","aria-labelledby":x,"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:w,onFocus:Ue(o.onFocus,()=>g(!0)),onBlur:Ue(o.onBlur,()=>g(!1)),onClick:Ue(o.onClick,()=>{b.current!=="mouse"&&S()}),onPointerUp:Ue(o.onPointerUp,()=>{b.current==="mouse"&&S()}),onPointerDown:Ue(o.onPointerDown,E=>{b.current=E.pointerType}),onPointerMove:Ue(o.onPointerMove,E=>{var _;b.current=E.pointerType,i?(_=u.onItemLeave)==null||_.call(u):b.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ue(o.onPointerLeave,E=>{var _;E.currentTarget===document.activeElement&&((_=u.onItemLeave)==null||_.call(u))}),onKeyDown:Ue(o.onKeyDown,E=>{var A;((A=u.searchRef)==null?void 0:A.current)!==""&&E.key===" "||(ZBe.includes(E.key)&&S(),E.key===" "&&E.preventDefault())})})})})});Ute.displayName=C0;var op="SelectItemText",Hte=N.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=ll(op,n),l=ul(op,n),u=Fte(op,n),f=nqe(op,n),[d,h]=N.useState(null),m=Bt(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,w=N.useMemo(()=>y.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:x,onNativeOptionRemove:b}=f;return Zn(()=>(x(w),()=>b(w)),[x,b,w]),y.jsxs(y.Fragment,{children:[y.jsx(ot.span,{id:u.textId,...a,ref:m}),u.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Du.createPortal(a.children,o.valueNode):null]})});Hte.displayName=op;var Gte="SelectItemIndicator",Kte=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Fte(Gte,n).isSelected?y.jsx(ot.span,{"aria-hidden":!0,...r,ref:t}):null});Kte.displayName=Gte;var NR="SelectScrollUpButton",Wte=N.forwardRef((e,t)=>{const n=ul(NR,e.__scopeSelect),r=Ak(NR,e.__scopeSelect),[i,a]=N.useState(!1),o=Bt(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?y.jsx(Xte,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});Wte.displayName=NR;var MR="SelectScrollDownButton",Yte=N.forwardRef((e,t)=>{const n=ul(MR,e.__scopeSelect),r=Ak(MR,e.__scopeSelect),[i,a]=N.useState(!1),o=Bt(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?y.jsx(Xte,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});Yte.displayName=MR;var Xte=N.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=ul("SelectScrollButton",n),o=N.useRef(null),l=ow(n),u=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.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]),y.jsx(ot.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ue(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Ue(i.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Ue(i.onPointerLeave,()=>{u()})})}),pqe="SelectSeparator",Qte=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return y.jsx(ot.div,{"aria-hidden":!0,...r,ref:t})});Qte.displayName=pqe;var RR="SelectArrow",mqe=N.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=sw(n),a=ll(RR,n),o=ul(RR,n);return a.open&&o.position==="popper"?y.jsx(UG,{...i,...r,ref:t}):null});mqe.displayName=RR;var gqe="SelectBubbleInput",Zte=N.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=N.useRef(null),a=Bt(r,i),o=bte(t);return N.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]),y.jsx(ot.select,{...n,style:{...HG,...n.style},ref:a,defaultValue:t})});Zte.displayName=gqe;function Jte(e){return e===""||e===void 0}function ene(e){const t=Gs(e),n=N.useRef(""),r=N.useRef(0),i=N.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=N.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function tne(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=vqe(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 vqe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yqe=Ote,nne=Nte,bqe=Rte,xqe=Pte,wqe=kte,rne=Dte,Sqe=Bte,ine=Vte,ane=Ute,_qe=Hte,Eqe=Kte,one=Wte,sne=Yte,lne=Qte;const Aqe=yqe,Tqe=bqe,une=N.forwardRef(({className:e,children:t,...n},r)=>y.jsxs(nne,{ref:r,className:be("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,y.jsx(xqe,{asChild:!0,children:y.jsx(F0,{className:"h-4 w-4 opacity-50"})})]}));une.displayName=nne.displayName;const cne=N.forwardRef(({className:e,...t},n)=>y.jsx(one,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(_ce,{className:"h-4 w-4"})}));cne.displayName=one.displayName;const fne=N.forwardRef(({className:e,...t},n)=>y.jsx(sne,{ref:n,className:be("flex cursor-default items-center justify-center py-1",e),...t,children:y.jsx(F0,{className:"h-4 w-4"})}));fne.displayName=sne.displayName;const dne=N.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>y.jsx(wqe,{children:y.jsxs(rne,{ref:i,className:be("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:[y.jsx(cne,{}),y.jsx(Sqe,{className:be("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),y.jsx(fne,{})]})}));dne.displayName=rne.displayName;const Cqe=N.forwardRef(({className:e,...t},n)=>y.jsx(ine,{ref:n,className:be("px-2 py-1.5 text-sm font-semibold",e),...t}));Cqe.displayName=ine.displayName;const hne=N.forwardRef(({className:e,children:t,...n},r)=>y.jsxs(ane,{ref:r,className:be("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:[y.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:y.jsx(Eqe,{children:y.jsx(pd,{className:"h-4 w-4"})})}),y.jsx(_qe,{children:t})]}));hne.displayName=ane.displayName;const Oqe=N.forwardRef(({className:e,...t},n)=>y.jsx(lne,{ref:n,className:be("-mx-1 my-1 h-px bg-muted",e),...t}));Oqe.displayName=lne.displayName;function jqe({queues:e,readonly:t,prefill:n}){const r=Dde(),[i,a]=N.useState((n==null?void 0:n.queue)||e[0]||""),[o,l]=N.useState((n==null?void 0:n.jobName)||"test-job"),[u,f]=N.useState((n==null?void 0:n.payload)||`{
474
- "message": "Hello from Workbench"
475
- }`),[d,h]=N.useState(""),[m,g]=N.useState(null);N.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 w=async x=>{if(x.preventDefault(),!i||!o){g({success:!1,message:"Queue and job name are required"});return}let b;try{b=JSON.parse(u)}catch{g({success:!1,message:"Invalid JSON payload"});return}g(null),r.mutate({queueName:i,name:o,data:b,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?y.jsxs("div",{className:"flex h-[400px] flex-col items-center justify-center text-center",children:[y.jsx(aP,{className:"mb-4 h-12 w-12 text-muted-foreground"}),y.jsx("h2",{className:"mb-2 text-lg font-medium",children:"Test Mode Disabled"}),y.jsx("p",{className:"max-w-md text-muted-foreground",children:"The dashboard is in readonly mode. Job testing is disabled."})]}):y.jsxs("div",{className:"max-w-2xl",children:[y.jsx("div",{className:"mb-6",children:y.jsx("p",{className:"text-sm text-muted-foreground",children:"Manually enqueue a job for testing purposes"})}),y.jsxs("form",{onSubmit:w,className:"space-y-6",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx("label",{htmlFor:"queue",className:"text-sm font-medium",children:"Queue"}),y.jsxs(Aqe,{value:i,onValueChange:a,children:[y.jsx(une,{children:y.jsx(Tqe,{placeholder:"Select a queue"})}),y.jsx(dne,{children:e.map(x=>y.jsx(hne,{value:x,children:x},x))})]})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("label",{htmlFor:"jobName",className:"text-sm font-medium",children:"Job Name"}),y.jsx("input",{type:"text",value:o,onChange:x=>l(x.target.value),className:"h-9 w-full border bg-background px-3 text-sm focus:outline-none",placeholder:"my-job-name"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("label",{htmlFor:"delay",className:"text-sm font-medium",children:"Delay (seconds)"}),y.jsx("input",{type:"number",value:d,onChange:x=>h(x.target.value),className:"h-9 w-full border bg-background px-3 text-sm focus:outline-none",placeholder:"0",min:"0"}),y.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional delay before the job is processed"})]}),y.jsxs("div",{className:"space-y-2",children:[y.jsx("label",{htmlFor:"payload",className:"text-sm font-medium",children:"Payload (JSON)"}),y.jsx("textarea",{value:u,onChange:x=>f(x.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" }'})]}),y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx(Tn,{type:"submit",disabled:r.isPending,children:r.isPending?y.jsx(y.Fragment,{children:"Processing..."}):y.jsx(y.Fragment,{children:"Enqueue Job"})}),m&&y.jsxs("div",{className:be("flex items-center gap-2 text-sm",m.success?"text-success":"text-destructive"),children:[m.success?y.jsx(iP,{className:"h-4 w-4"}):y.jsx(po,{className:"h-4 w-4"}),m.message]})]})]})]})}const pne=N.createContext(null);function Nqe(){const e=N.useContext(pne);if(!e)throw new Error("useSearchContext must be used within SearchContextProvider");return e}const Mqe=km({status:V0(["all","active","completed","failed","waiting","delayed"]).optional().catch("all"),q:Bs().optional().catch(""),from:P3().optional(),to:P3().optional(),sort:Bs().optional()}),Rqe=km({status:V0(["all","active","completed","failed","waiting","delayed"]).optional().catch("all"),sort:Bs().optional()}),Pqe=km({tab:V0(["repeatable","delayed"]).optional().catch("repeatable"),repeatableSort:Bs().optional(),delayedSort:Bs().optional()}),kqe=km({tab:V0(["payload","output","logs","error","retries","timeline"]).optional()}),Dqe=km({queue:Bs().optional(),jobName:Bs().optional(),payload:Bs().optional()});function Iqe(){const{data:e,isLoading:t}=gd();wde();const{data:n=[]}=Q0(),r=hi(),i=N.useMemo(()=>new Set(n.filter(b=>b.isPaused).map(b=>b.name)),[n]),a=ose(),[o,l]=N.useState(!1),[u,f]=N.useState(""),[d,h]=N.useState(()=>{if(typeof window<"u"){const b=localStorage.getItem("workbench:theme");return b?b==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches}return!1}),{activeNav:m,activeQueue:g}=N.useMemo(()=>{const b=a.pathname;return b==="/"||b===""?{activeNav:"runs",activeQueue:void 0}:b==="/metrics"?{activeNav:"metrics",activeQueue:void 0}:b==="/schedulers"?{activeNav:"schedulers",activeQueue:void 0}:b==="/flows"||b.startsWith("/flows/")?{activeNav:"flows",activeQueue:void 0}:b==="/test"?{activeNav:"test",activeQueue:void 0}:b==="/queues"?{activeNav:"queues",activeQueue:void 0}:b.startsWith("/queues/")?{activeNav:"queues",activeQueue:b.split("/")[2]}:{activeNav:"runs",activeQueue:void 0}},[a.pathname]);if(N.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]),N.useEffect(()=>{const b=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",b),()=>document.removeEventListener("keydown",b)},[o,d]),t||!e)return y.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:y.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading..."})});const w=b=>{switch(b){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;case"queues":r({to:"/queues"});break}},x=b=>{r({to:"/queues/$queueName",params:{queueName:b}})};return y.jsxs(aK,{className:"h-screen overflow-hidden bg-background",children:[y.jsx(zde,{queues:e.queues,queueGroups:e.queueGroups,pausedQueues:i,activeNav:m,activeQueue:g,onNavSelect:w,onQueueSelect:x,isDark:d,onToggleTheme:()=>h(!d)}),y.jsx("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:y.jsx(pne.Provider,{value:{searchQuery:u,setSearchQuery:f,setCommandOpen:l},children:y.jsx(mG,{})})}),y.jsx(She,{open:o,onOpenChange:l,queues:e.queues,searchQuery:u,onSearchQueryChange:f,isDark:d,onToggleTheme:()=>h(!d),onSelectQueue:b=>{r({to:"/queues/$queueName",params:{queueName:b}}),l(!1)},onSelectJob:(b,S)=>{r({to:"/queues/$queueName/jobs/$jobId",params:{queueName:b,jobId:S}}),l(!1)},onNavigate:b=>{r({to:b}),l(!1)}})]})}function jo({title:e,subtitle:t,children:n,className:r}){const i=Nqe();return y.jsxs(y.Fragment,{children:[y.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-2 border-b border-border px-6",children:[y.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[y.jsx("h1",{className:"text-lg font-semibold",children:e}),t&&y.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:t})]}),y.jsx(Ehe,{value:i.searchQuery,onValueChange:i.setSearchQuery,onFocus:()=>i.setCommandOpen(!0)})]}),y.jsx("main",{className:be("flex-1 overflow-auto p-6",r),children:n})]})}function Lqe(){const e=hi(),t=ku({from:"/"});return y.jsx(jo,{title:"Runs",className:"pb-0!",children:y.jsx(KBe,{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 $qe(){const e=hi(),t=ku({from:"/schedulers"});return y.jsx(jo,{title:"Schedulers",children:y.jsx(XBe,{search:t,onSearchChange:n=>{e({to:"/schedulers",search:n,replace:!0})}})})}function Bqe(){return y.jsx(jo,{title:"Metrics",children:y.jsx(IDe,{})})}function qqe(){const e=hi();return y.jsx(jo,{title:"Flows",className:"pb-0!",children:y.jsx(K1e,{onFlowSelect:(t,n)=>e({to:"/flows/$queueName/$jobId",params:{queueName:t,jobId:n}})})})}function zqe(){const{queueName:e,jobId:t}=Nm({from:"/flows/$queueName/$jobId"});return y.jsx(jo,{title:"Flow Details",subtitle:t,children:y.jsx(N1e,{queueName:e,jobId:t})})}function Vqe(){const{data:e}=gd(),t=ku({from:"/test"});return y.jsx(jo,{title:"Test",children:y.jsx(jqe,{queues:(e==null?void 0:e.queues)||[],readonly:e==null?void 0:e.readonly,prefill:t})})}function Fqe(){const e=hi();return y.jsx(jo,{title:"Queues",children:y.jsx(UBe,{onQueueSelect:t=>e({to:"/queues/$queueName",params:{queueName:t}})})})}function Uqe(){const{queueName:e}=Nm({from:"/queues/$queueName"}),t=hi(),n=ku({from:"/queues/$queueName"});return y.jsx(jo,{title:e,children:y.jsx(VBe,{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 Hqe(){const{queueName:e,jobId:t}=Nm({from:"/queues/$queueName/jobs/$jobId"}),{data:n}=gd(),r=hi(),i=ku({from:"/queues/$queueName/jobs/$jobId"});return y.jsx(jo,{title:"Job Details",subtitle:t,children:y.jsx(Z1e,{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 wa=Hoe({component:Iqe}),Gqe=So({getParentRoute:()=>wa,path:"/",component:Lqe,validateSearch:Mqe}),Kqe=So({getParentRoute:()=>wa,path:"/metrics",component:Bqe}),Wqe=So({getParentRoute:()=>wa,path:"/schedulers",component:$qe,validateSearch:Pqe}),Yqe=So({getParentRoute:()=>wa,path:"/flows",component:qqe}),Xqe=So({getParentRoute:()=>wa,path:"/flows/$queueName/$jobId",component:zqe}),Qqe=So({getParentRoute:()=>wa,path:"/test",component:Vqe,validateSearch:Dqe}),Zqe=So({getParentRoute:()=>wa,path:"/queues",component:Fqe}),Jqe=So({getParentRoute:()=>wa,path:"/queues/$queueName",component:Uqe,validateSearch:Rqe}),e4e=So({getParentRoute:()=>wa,path:"/queues/$queueName/jobs/$jobId",component:Hqe,validateSearch:kqe}),t4e=wa.addChildren([Gqe,Kqe,Wqe,Yqe,Xqe,Qqe,Zqe,Jqe,e4e]);function n4e(e){return nse({routeTree:t4e,basepath:e})}const r4e=new rae({defaultOptions:{queries:{staleTime:1e3*5,refetchOnWindowFocus:!0,retry:1}}});function i4e(){if(typeof document<"u"){const e=document.querySelector("base");if(e!=null&&e.href)return new URL(e.href).pathname.replace(/\/$/,"")||"/"}return"/"}const a4e=n4e(i4e());function o4e(){return y.jsx(iae,{client:r4e,children:y.jsx(u7,{delayDuration:0,children:y.jsx(ase,{router:a4e})})})}Nie.createRoot(document.getElementById("root")).render(y.jsx(ie.StrictMode,{children:y.jsx(o4e,{})}));