@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.
@@ -0,0 +1,511 @@
1
+ var A3=e=>{throw TypeError(e)};var S_=(e,t,n)=>t.has(e)||A3("Cannot "+n);var ie=(e,t,n)=>(S_(e,t,"read from private field"),n?n.call(e):t.get(e)),De=(e,t,n)=>t.has(e)?A3("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ce=(e,t,n,r)=>(S_(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ze=(e,t,n)=>(S_(e,t,"access private method"),n);var vy=(e,t,n,r)=>({set _(i){Ce(e,t,i,n)},get _(){return ie(e,t,r)}});function Qoe(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 yy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ct(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var __={exports:{}},ip={};/**
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 C3;function Zoe(){if(C3)return ip;C3=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 s in i)s!=="key"&&(a[s]=i[s])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:a}}return ip.Fragment=t,ip.jsx=n,ip.jsxs=n,ip}var T3;function Joe(){return T3||(T3=1,__.exports=Zoe()),__.exports}var g=Joe(),E_={exports:{}},He={};/**
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 j3;function ese(){if(j3)return He;j3=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"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),m=Symbol.iterator;function v(U){return U===null||typeof U!="object"?null:(U=m&&U[m]||U["@@iterator"],typeof U=="function"?U:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,b={};function S(U,V,X){this.props=U,this.context=V,this.refs=b,this.updater=X||x}S.prototype.isReactComponent={},S.prototype.setState=function(U,V){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,V,"setState")},S.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function E(){}E.prototype=S.prototype;function _(U,V,X){this.props=U,this.context=V,this.refs=b,this.updater=X||x}var A=_.prototype=new E;A.constructor=_,w(A,S.prototype),A.isPureReactComponent=!0;var C=Array.isArray;function N(){}var M={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function P(U,V,X){var W=X.ref;return{$$typeof:e,type:U,key:V,ref:W!==void 0?W:null,props:X}}function $(U,V){return P(U.type,V,U.props)}function L(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function D(U){var V={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(X){return V[X]})}var F=/\/+/g;function I(U,V){return typeof U=="object"&&U!==null&&U.key!=null?D(""+U.key):V.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(N,N):(U.status="pending",U.then(function(V){U.status==="pending"&&(U.status="fulfilled",U.value=V)},function(V){U.status==="pending"&&(U.status="rejected",U.reason=V)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function k(U,V,X,W,K){var J=typeof U;(J==="undefined"||J==="boolean")&&(U=null);var ee=!1;if(U===null)ee=!0;else switch(J){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(U.$$typeof){case e:case t:ee=!0;break;case h:return ee=U._init,k(ee(U._payload),V,X,W,K)}}if(ee)return K=K(U),ee=W===""?"."+I(U,0):W,C(K)?(X="",ee!=null&&(X=ee.replace(F,"$&/")+"/"),k(K,V,X,"",function(se){return se})):K!=null&&(L(K)&&(K=$(K,X+(K.key==null||U&&U.key===K.key?"":(""+K.key).replace(F,"$&/")+"/")+ee)),V.push(K)),1;ee=0;var te=W===""?".":W+":";if(C(U))for(var ne=0;ne<U.length;ne++)W=U[ne],J=te+I(W,ne),ee+=k(W,V,X,J,K);else if(ne=v(U),typeof ne=="function")for(U=ne.call(U),ne=0;!(W=U.next()).done;)W=W.value,J=te+I(W,ne++),ee+=k(W,V,X,J,K);else if(J==="object"){if(typeof U.then=="function")return k(q(U),V,X,W,K);throw V=String(U),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ee}function z(U,V,X){if(U==null)return U;var W=[],K=0;return k(U,W,"","",function(J){return V.call(X,J,K++)}),W}function H(U){if(U._status===-1){var V=U._result;V=V(),V.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=V)}if(U._status===1)return U._result.default;throw U._result}var G=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=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(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)},Q={map:z,forEach:function(U,V,X){z(U,function(){V.apply(this,arguments)},X)},count:function(U){var V=0;return z(U,function(){V++}),V},toArray:function(U){return z(U,function(V){return V})||[]},only:function(U){if(!L(U))throw Error("React.Children.only expected to receive a single React element child.");return U}};return He.Activity=d,He.Children=Q,He.Component=S,He.Fragment=n,He.Profiler=i,He.PureComponent=_,He.StrictMode=r,He.Suspense=c,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=M,He.__COMPILER_RUNTIME={__proto__:null,c:function(U){return M.H.useMemoCache(U)}},He.cache=function(U){return function(){return U.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(U,V,X){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var W=w({},U.props),K=U.key;if(V!=null)for(J in V.key!==void 0&&(K=""+V.key),V)!R.call(V,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&V.ref===void 0||(W[J]=V[J]);var J=arguments.length-2;if(J===1)W.children=X;else if(1<J){for(var ee=Array(J),te=0;te<J;te++)ee[te]=arguments[te+2];W.children=ee}return P(U.type,K,W)},He.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},He.createElement=function(U,V,X){var W,K={},J=null;if(V!=null)for(W in V.key!==void 0&&(J=""+V.key),V)R.call(V,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(K[W]=V[W]);var ee=arguments.length-2;if(ee===1)K.children=X;else if(1<ee){for(var te=Array(ee),ne=0;ne<ee;ne++)te[ne]=arguments[ne+2];K.children=te}if(U&&U.defaultProps)for(W in ee=U.defaultProps,ee)K[W]===void 0&&(K[W]=ee[W]);return P(U,J,K)},He.createRef=function(){return{current:null}},He.forwardRef=function(U){return{$$typeof:s,render:U}},He.isValidElement=L,He.lazy=function(U){return{$$typeof:h,_payload:{_status:-1,_result:U},_init:H}},He.memo=function(U,V){return{$$typeof:f,type:U,compare:V===void 0?null:V}},He.startTransition=function(U){var V=M.T,X={};M.T=X;try{var W=U(),K=M.S;K!==null&&K(X,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(N,G)}catch(J){G(J)}finally{V!==null&&X.types!==null&&(V.types=X.types),M.T=V}},He.unstable_useCacheRefresh=function(){return M.H.useCacheRefresh()},He.use=function(U){return M.H.use(U)},He.useActionState=function(U,V,X){return M.H.useActionState(U,V,X)},He.useCallback=function(U,V){return M.H.useCallback(U,V)},He.useContext=function(U){return M.H.useContext(U)},He.useDebugValue=function(){},He.useDeferredValue=function(U,V){return M.H.useDeferredValue(U,V)},He.useEffect=function(U,V){return M.H.useEffect(U,V)},He.useEffectEvent=function(U){return M.H.useEffectEvent(U)},He.useId=function(){return M.H.useId()},He.useImperativeHandle=function(U,V,X){return M.H.useImperativeHandle(U,V,X)},He.useInsertionEffect=function(U,V){return M.H.useInsertionEffect(U,V)},He.useLayoutEffect=function(U,V){return M.H.useLayoutEffect(U,V)},He.useMemo=function(U,V){return M.H.useMemo(U,V)},He.useOptimistic=function(U,V){return M.H.useOptimistic(U,V)},He.useReducer=function(U,V,X){return M.H.useReducer(U,V,X)},He.useRef=function(U){return M.H.useRef(U)},He.useState=function(U){return M.H.useState(U)},He.useSyncExternalStore=function(U,V,X){return M.H.useSyncExternalStore(U,V,X)},He.useTransition=function(){return M.H.useTransition()},He.version="19.2.6",He}var N3;function dg(){return N3||(N3=1,E_.exports=ese()),E_.exports}var j=dg();const Z=Ct(j),IP=Qoe({__proto__:null,default:Z},[j]);var A_={exports:{}},ap={},C_={exports:{}},T_={};/**
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 O3;function tse(){return O3||(O3=1,(function(e){function t(k,z){var H=k.length;k.push(z);e:for(;0<H;){var G=H-1>>>1,Q=k[G];if(0<i(Q,z))k[G]=z,k[H]=Q,H=G;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var z=k[0],H=k.pop();if(H!==z){k[0]=H;e:for(var G=0,Q=k.length,U=Q>>>1;G<U;){var V=2*(G+1)-1,X=k[V],W=V+1,K=k[W];if(0>i(X,H))W<Q&&0>i(K,X)?(k[G]=K,k[W]=H,G=W):(k[G]=X,k[V]=H,G=V);else if(W<Q&&0>i(K,H))k[G]=K,k[W]=H,G=W;else break e}}return z}function i(k,z){var H=k.sortIndex-z.sortIndex;return H!==0?H:k.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,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],f=[],h=1,d=null,m=3,v=!1,x=!1,w=!1,b=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function A(k){for(var z=n(f);z!==null;){if(z.callback===null)r(f);else if(z.startTime<=k)r(f),z.sortIndex=z.expirationTime,t(c,z);else break;z=n(f)}}function C(k){if(w=!1,A(k),!x)if(n(c)!==null)x=!0,N||(N=!0,D());else{var z=n(f);z!==null&&q(C,z.startTime-k)}}var N=!1,M=-1,R=5,P=-1;function $(){return b?!0:!(e.unstable_now()-P<R)}function L(){if(b=!1,N){var k=e.unstable_now();P=k;var z=!0;try{e:{x=!1,w&&(w=!1,E(M),M=-1),v=!0;var H=m;try{t:{for(A(k),d=n(c);d!==null&&!(d.expirationTime>k&&$());){var G=d.callback;if(typeof G=="function"){d.callback=null,m=d.priorityLevel;var Q=G(d.expirationTime<=k);if(k=e.unstable_now(),typeof Q=="function"){d.callback=Q,A(k),z=!0;break t}d===n(c)&&r(c),A(k)}else r(c);d=n(c)}if(d!==null)z=!0;else{var U=n(f);U!==null&&q(C,U.startTime-k),z=!1}}break e}finally{d=null,m=H,v=!1}z=void 0}}finally{z?D():N=!1}}}var D;if(typeof _=="function")D=function(){_(L)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,I=F.port2;F.port1.onmessage=L,D=function(){I.postMessage(null)}}else D=function(){S(L,0)};function q(k,z){M=S(function(){k(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(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(k){switch(m){case 1:case 2:case 3:var z=3;break;default:z=m}var H=m;m=z;try{return k()}finally{m=H}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(k,z){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var H=m;m=k;try{return z()}finally{m=H}},e.unstable_scheduleCallback=function(k,z,H){var G=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?G+H:G):H=G,k){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,k={id:h++,callback:z,priorityLevel:k,startTime:H,expirationTime:Q,sortIndex:-1},H>G?(k.sortIndex=H,t(f,k),n(c)===null&&k===n(f)&&(w?(E(M),M=-1):w=!0,q(C,H-G))):(k.sortIndex=Q,t(c,k),x||v||(x=!0,N||(N=!0,D()))),k},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(k){var z=m;return function(){var H=m;m=z;try{return k.apply(this,arguments)}finally{m=H}}}})(T_)),T_}var M3;function nse(){return M3||(M3=1,C_.exports=tse()),C_.exports}var j_={exports:{}},lr={};/**
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 R3;function rse(){if(R3)return lr;R3=1;var e=dg();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; 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(c,f,h){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:d==null?null:""+d,children:c,containerInfo:f,implementation:h}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function s(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return lr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,lr.createPortal=function(c,f){var h=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(c,f,null,h)},lr.flushSync=function(c){var f=o.T,h=r.p;try{if(o.T=null,r.p=2,c)return c()}finally{o.T=f,r.p=h,r.d.f()}},lr.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},lr.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},lr.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,d=s(h,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:d,integrity:m,fetchPriority:v}):h==="script"&&r.d.X(c,{crossOrigin:d,integrity:m,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},lr.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=s(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},lr.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,d=s(h,f.crossOrigin);r.d.L(c,h,{crossOrigin:d,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})}},lr.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=s(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},lr.requestFormReset=function(c){r.d.r(c)},lr.unstable_batchedUpdates=function(c,f){return c(f)},lr.useFormState=function(c,f,h){return o.H.useFormState(c,f,h)},lr.useFormStatus=function(){return o.H.useHostTransitionStatus()},lr.version="19.2.6",lr}var P3;function GG(){if(P3)return j_.exports;P3=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(),j_.exports=rse(),j_.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 k3;function ise(){if(k3)return ap;k3=1;var e=nse(),t=dg(),n=GG();function r(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function a(l){var u=l,p=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,(u.flags&4098)!==0&&(p=u.return),l=u.return;while(l)}return u.tag===3?p:null}function o(l){if(l.tag===13){var u=l.memoizedState;if(u===null&&(l=l.alternate,l!==null&&(u=l.memoizedState)),u!==null)return u.dehydrated}return null}function s(l){if(l.tag===31){var u=l.memoizedState;if(u===null&&(l=l.alternate,l!==null&&(u=l.memoizedState)),u!==null)return u.dehydrated}return null}function c(l){if(a(l)!==l)throw Error(r(188))}function f(l){var u=l.alternate;if(!u){if(u=a(l),u===null)throw Error(r(188));return u!==l?null:l}for(var p=l,y=u;;){var T=p.return;if(T===null)break;var O=T.alternate;if(O===null){if(y=T.return,y!==null){p=y;continue}break}if(T.child===O.child){for(O=T.child;O;){if(O===p)return c(T),l;if(O===y)return c(T),u;O=O.sibling}throw Error(r(188))}if(p.return!==y.return)p=T,y=O;else{for(var B=!1,Y=T.child;Y;){if(Y===p){B=!0,p=T,y=O;break}if(Y===y){B=!0,y=T,p=O;break}Y=Y.sibling}if(!B){for(Y=O.child;Y;){if(Y===p){B=!0,p=O,y=T;break}if(Y===y){B=!0,y=O,p=T;break}Y=Y.sibling}if(!B)throw Error(r(189))}}if(p.alternate!==y)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?l:u}function h(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(u=h(l),u!==null)return u;l=l.sibling}return null}var d=Object.assign,m=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),w=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"),C=Symbol.for("react.suspense"),N=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"),L=Symbol.iterator;function D(l){return l===null||typeof l!="object"?null:(l=L&&l[L]||l["@@iterator"],typeof l=="function"?l:null)}var F=Symbol.for("react.client.reference");function I(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===F?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case w:return"Fragment";case S:return"Profiler";case b:return"StrictMode";case C:return"Suspense";case N:return"SuspenseList";case P:return"Activity"}if(typeof l=="object")switch(l.$$typeof){case x:return"Portal";case _:return l.displayName||"Context";case E:return(l._context.displayName||"Context")+".Consumer";case A:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case M:return u=l.displayName||null,u!==null?u:I(l.type)||"Memo";case R:u=l._payload,l=l._init;try{return I(l(u))}catch{}}return null}var q=Array.isArray,k=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},G=[],Q=-1;function U(l){return{current:l}}function V(l){0>Q||(l.current=G[Q],G[Q]=null,Q--)}function X(l,u){Q++,G[Q]=l.current,l.current=u}var W=U(null),K=U(null),J=U(null),ee=U(null);function te(l,u){switch(X(J,u),X(K,l),X(W,null),u.nodeType){case 9:case 11:l=(l=u.documentElement)&&(l=l.namespaceURI)?W$(l):0;break;default:if(l=u.tagName,u=u.namespaceURI)u=W$(u),l=Y$(u,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}V(W),X(W,l)}function ne(){V(W),V(K),V(J)}function se(l){l.memoizedState!==null&&X(ee,l);var u=W.current,p=Y$(u,l.type);u!==p&&(X(K,l),X(W,p))}function ce(l){K.current===l&&(V(W),V(K)),ee.current===l&&(V(ee),ep._currentValue=H)}var oe,be;function xe(l){if(oe===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);oe=u&&u[1]||"",be=-1<p.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+oe+l+be}var we=!1;function Ae(l,u){if(!l||we)return"";we=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){var ye=function(){throw Error()};if(Object.defineProperty(ye.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ye,[])}catch(he){var de=he}Reflect.construct(l,[],ye)}else{try{ye.call()}catch(he){de=he}l.call(ye.prototype)}}else{try{throw Error()}catch(he){de=he}(ye=l())&&typeof ye.catch=="function"&&ye.catch(function(){})}}catch(he){if(he&&de&&typeof he.stack=="string")return[he.stack,de.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var T=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");T&&T.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=y.DetermineComponentFrameRoot(),B=O[0],Y=O[1];if(B&&Y){var re=B.split(`
44
+ `),fe=Y.split(`
45
+ `);for(T=y=0;y<re.length&&!re[y].includes("DetermineComponentFrameRoot");)y++;for(;T<fe.length&&!fe[T].includes("DetermineComponentFrameRoot");)T++;if(y===re.length||T===fe.length)for(y=re.length-1,T=fe.length-1;1<=y&&0<=T&&re[y]!==fe[T];)T--;for(;1<=y&&0<=T;y--,T--)if(re[y]!==fe[T]){if(y!==1||T!==1)do if(y--,T--,0>T||re[y]!==fe[T]){var pe=`
46
+ `+re[y].replace(" at new "," at ");return l.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",l.displayName)),pe}while(1<=y&&0<=T);break}}}finally{we=!1,Error.prepareStackTrace=p}return(p=l?l.displayName||l.name:"")?xe(p):""}function Ee(l,u){switch(l.tag){case 26:case 27:case 5:return xe(l.type);case 16:return xe("Lazy");case 13:return l.child!==u&&u!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return Ae(l.type,!1);case 11:return Ae(l.type.render,!1);case 1:return Ae(l.type,!0);case 31:return xe("Activity");default:return""}}function rt(l){try{var u="",p=null;do u+=Ee(l,p),p=l,l=l.return;while(l);return u}catch(y){return`
47
+ Error generating stack: `+y.message+`
48
+ `+y.stack}}var Ve=Object.prototype.hasOwnProperty,Pt=e.unstable_scheduleCallback,Ft=e.unstable_cancelCallback,Xe=e.unstable_shouldYield,ht=e.unstable_requestPaint,Tt=e.unstable_now,We=e.unstable_getCurrentPriorityLevel,Et=e.unstable_ImmediatePriority,hn=e.unstable_UserBlockingPriority,Tn=e.unstable_NormalPriority,ya=e.unstable_LowPriority,rr=e.unstable_IdlePriority,is=e.log,zr=e.unstable_setDisableYieldValue,Ln=null,Ht=null;function Fr(l){if(typeof is=="function"&&zr(l),Ht&&typeof Ht.setStrictMode=="function")try{Ht.setStrictMode(Ln,l)}catch{}}var $n=Math.clz32?Math.clz32:hi,dh=Math.log,$l=Math.LN2;function hi(l){return l>>>=0,l===0?32:31-(dh(l)/$l|0)|0}var as=256,os=262144,Qa=4194304;function pi(l){var u=l&42;if(u!==0)return u;switch(l&-l){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 l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Fe(l,u,p){var y=l.pendingLanes;if(y===0)return 0;var T=0,O=l.suspendedLanes,B=l.pingedLanes;l=l.warmLanes;var Y=y&134217727;return Y!==0?(y=Y&~O,y!==0?T=pi(y):(B&=Y,B!==0?T=pi(B):p||(p=Y&~l,p!==0&&(T=pi(p))))):(Y=y&~O,Y!==0?T=pi(Y):B!==0?T=pi(B):p||(p=y&~l,p!==0&&(T=pi(p)))),T===0?0:u!==0&&u!==T&&(u&O)===0&&(O=T&-T,p=u&-u,O>=p||O===32&&(p&4194048)!==0)?u:T}function Vt(l,u){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&u)===0}function gn(l,u){switch(l){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Bn(){var l=Qa;return Qa<<=1,(Qa&62914560)===0&&(Qa=4194304),l}function ba(l){for(var u=[],p=0;31>p;p++)u.push(l);return u}function Gt(l,u){l.pendingLanes|=u,u!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function ir(l,u,p,y,T,O){var B=l.pendingLanes;l.pendingLanes=p,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=p,l.entangledLanes&=p,l.errorRecoveryDisabledLanes&=p,l.shellSuspendCounter=0;var Y=l.entanglements,re=l.expirationTimes,fe=l.hiddenUpdates;for(p=B&~p;0<p;){var pe=31-$n(p),ye=1<<pe;Y[pe]=0,re[pe]=-1;var de=fe[pe];if(de!==null)for(fe[pe]=null,pe=0;pe<de.length;pe++){var he=de[pe];he!==null&&(he.lane&=-536870913)}p&=~ye}y!==0&&Za(l,y,0),O!==0&&T===0&&l.tag!==0&&(l.suspendedLanes|=O&~(B&~u))}function Za(l,u,p){l.pendingLanes|=u,l.suspendedLanes&=~u;var y=31-$n(u);l.entangledLanes|=u,l.entanglements[y]=l.entanglements[y]|1073741824|p&261930}function ar(l,u){var p=l.entangledLanes|=u;for(l=l.entanglements;p;){var y=31-$n(p),T=1<<y;T&u|l[y]&u&&(l[y]|=u),p&=~T}}function or(l,u){var p=u&-u;return p=(p&42)!==0?1:ss(p),(p&(l.suspendedLanes|u))!==0?0:p}function ss(l){switch(l){case 2:l=1;break;case 8:l=4;break;case 32:l=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:l=128;break;case 268435456:l=134217728;break;default:l=0}return l}function Vr(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function hh(){var l=z.p;return l!==0?l:(l=window.event,l===void 0?32:y3(l.type))}function Jg(l,u){var p=z.p;try{return z.p=l,u()}finally{z.p=p}}var xa=Math.random().toString(36).slice(2),jn="__reactFiber$"+xa,sr="__reactProps$"+xa,Ja="__reactContainer$"+xa,xu="__reactEvents$"+xa,ev="__reactListeners$"+xa,h1="__reactHandles$"+xa,tv="__reactResources$"+xa,Bl="__reactMarker$"+xa;function ph(l){delete l[jn],delete l[sr],delete l[xu],delete l[ev],delete l[h1]}function ls(l){var u=l[jn];if(u)return u;for(var p=l.parentNode;p;){if(u=p[Ja]||p[jn]){if(p=u.alternate,u.child!==null||p!==null&&p.child!==null)for(l=n3(l);l!==null;){if(p=l[jn])return p;l=n3(l)}return u}l=p,p=l.parentNode}return null}function cs(l){if(l=l[jn]||l[Ja]){var u=l.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return l}return null}function us(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l.stateNode;throw Error(r(33))}function fs(l){var u=l[tv];return u||(u=l[tv]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function vn(l){l[Bl]=!0}var nv=new Set,rv={};function eo(l,u){ds(l,u),ds(l+"Capture",u)}function ds(l,u){for(rv[l]=u,l=0;l<u.length;l++)nv.add(u[l])}var p1=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]*$"),mh={},iv={};function m1(l){return Ve.call(iv,l)?!0:Ve.call(mh,l)?!1:p1.test(l)?iv[l]=!0:(mh[l]=!0,!1)}function wu(l,u,p){if(m1(u))if(p===null)l.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":l.removeAttribute(u);return;case"boolean":var y=u.toLowerCase().slice(0,5);if(y!=="data-"&&y!=="aria-"){l.removeAttribute(u);return}}l.setAttribute(u,""+p)}}function Su(l,u,p){if(p===null)l.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(u);return}l.setAttribute(u,""+p)}}function Ui(l,u,p,y){if(y===null)l.removeAttribute(p);else{switch(typeof y){case"undefined":case"function":case"symbol":case"boolean":l.removeAttribute(p);return}l.setAttributeNS(u,p,""+y)}}function _r(l){switch(typeof l){case"bigint":case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function av(l){var u=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function g1(l,u,p){var y=Object.getOwnPropertyDescriptor(l.constructor.prototype,u);if(!l.hasOwnProperty(u)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var T=y.get,O=y.set;return Object.defineProperty(l,u,{configurable:!0,get:function(){return T.call(this)},set:function(B){p=""+B,O.call(this,B)}}),Object.defineProperty(l,u,{enumerable:y.enumerable}),{getValue:function(){return p},setValue:function(B){p=""+B},stopTracking:function(){l._valueTracker=null,delete l[u]}}}}function hs(l){if(!l._valueTracker){var u=av(l)?"checked":"value";l._valueTracker=g1(l,u,""+l[u])}}function ov(l){if(!l)return!1;var u=l._valueTracker;if(!u)return!0;var p=u.getValue(),y="";return l&&(y=av(l)?l.checked?"true":"false":l.value),l=y,l!==p?(u.setValue(l),!0):!1}function ql(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var v1=/[\n"\\]/g;function Er(l){return l.replace(v1,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function zl(l,u,p,y,T,O,B,Y){l.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?l.type=B:l.removeAttribute("type"),u!=null?B==="number"?(u===0&&l.value===""||l.value!=u)&&(l.value=""+_r(u)):l.value!==""+_r(u)&&(l.value=""+_r(u)):B!=="submit"&&B!=="reset"||l.removeAttribute("value"),u!=null?gh(l,B,_r(u)):p!=null?gh(l,B,_r(p)):y!=null&&l.removeAttribute("value"),T==null&&O!=null&&(l.defaultChecked=!!O),T!=null&&(l.checked=T&&typeof T!="function"&&typeof T!="symbol"),Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?l.name=""+_r(Y):l.removeAttribute("name")}function sv(l,u,p,y,T,O,B,Y){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),u!=null||p!=null){if(!(O!=="submit"&&O!=="reset"||u!=null)){hs(l);return}p=p!=null?""+_r(p):"",u=u!=null?""+_r(u):p,Y||u===l.value||(l.value=u),l.defaultValue=u}y=y??T,y=typeof y!="function"&&typeof y!="symbol"&&!!y,l.checked=Y?l.checked:!!y,l.defaultChecked=!!y,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(l.name=B),hs(l)}function gh(l,u,p){u==="number"&&ql(l.ownerDocument)===l||l.defaultValue===""+p||(l.defaultValue=""+p)}function to(l,u,p,y){if(l=l.options,u){u={};for(var T=0;T<p.length;T++)u["$"+p[T]]=!0;for(p=0;p<l.length;p++)T=u.hasOwnProperty("$"+l[p].value),l[p].selected!==T&&(l[p].selected=T),T&&y&&(l[p].defaultSelected=!0)}else{for(p=""+_r(p),u=null,T=0;T<l.length;T++){if(l[T].value===p){l[T].selected=!0,y&&(l[T].defaultSelected=!0);return}u!==null||l[T].disabled||(u=l[T])}u!==null&&(u.selected=!0)}}function VD(l,u,p){if(u!=null&&(u=""+_r(u),u!==l.value&&(l.value=u),p==null)){l.defaultValue!==u&&(l.defaultValue=u);return}l.defaultValue=p!=null?""+_r(p):""}function UD(l,u,p,y){if(u==null){if(y!=null){if(p!=null)throw Error(r(92));if(q(y)){if(1<y.length)throw Error(r(93));y=y[0]}p=y}p==null&&(p=""),u=p}p=_r(u),l.defaultValue=p,y=l.textContent,y===p&&y!==""&&y!==null&&(l.value=y),hs(l)}function _u(l,u){if(u){var p=l.firstChild;if(p&&p===l.lastChild&&p.nodeType===3){p.nodeValue=u;return}}l.textContent=u}var Gie=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 HD(l,u,p){var y=u.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?y?l.setProperty(u,""):u==="float"?l.cssFloat="":l[u]="":y?l.setProperty(u,p):typeof p!="number"||p===0||Gie.has(u)?u==="float"?l.cssFloat=p:l[u]=(""+p).trim():l[u]=p+"px"}function GD(l,u,p){if(u!=null&&typeof u!="object")throw Error(r(62));if(l=l.style,p!=null){for(var y in p)!p.hasOwnProperty(y)||u!=null&&u.hasOwnProperty(y)||(y.indexOf("--")===0?l.setProperty(y,""):y==="float"?l.cssFloat="":l[y]="");for(var T in u)y=u[T],u.hasOwnProperty(T)&&p[T]!==y&&HD(l,T,y)}else for(var O in u)u.hasOwnProperty(O)&&HD(l,O,u[O])}function y1(l){if(l.indexOf("-")===-1)return!1;switch(l){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 Kie=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"]]),Wie=/^[\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 lv(l){return Wie.test(""+l)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":l}function no(){}var b1=null;function x1(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var Eu=null,Au=null;function KD(l){var u=cs(l);if(u&&(l=u.stateNode)){var p=l[sr]||null;e:switch(l=u.stateNode,u.type){case"input":if(zl(l,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),u=p.name,p.type==="radio"&&u!=null){for(p=l;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+Er(""+u)+'"][type="radio"]'),u=0;u<p.length;u++){var y=p[u];if(y!==l&&y.form===l.form){var T=y[sr]||null;if(!T)throw Error(r(90));zl(y,T.value,T.defaultValue,T.defaultValue,T.checked,T.defaultChecked,T.type,T.name)}}for(u=0;u<p.length;u++)y=p[u],y.form===l.form&&ov(y)}break e;case"textarea":VD(l,p.value,p.defaultValue);break e;case"select":u=p.value,u!=null&&to(l,!!p.multiple,u,!1)}}}var w1=!1;function WD(l,u,p){if(w1)return l(u,p);w1=!0;try{var y=l(u);return y}finally{if(w1=!1,(Eu!==null||Au!==null)&&(Yv(),Eu&&(u=Eu,l=Au,Au=Eu=null,KD(u),l)))for(u=0;u<l.length;u++)KD(l[u])}}function vh(l,u){var p=l.stateNode;if(p===null)return null;var y=p[sr]||null;if(y===null)return null;p=y[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(l=l.type,y=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!y;break e;default:l=!1}if(l)return null;if(p&&typeof p!="function")throw Error(r(231,u,typeof p));return p}var ro=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),S1=!1;if(ro)try{var yh={};Object.defineProperty(yh,"passive",{get:function(){S1=!0}}),window.addEventListener("test",yh,yh),window.removeEventListener("test",yh,yh)}catch{S1=!1}var ps=null,_1=null,cv=null;function YD(){if(cv)return cv;var l,u=_1,p=u.length,y,T="value"in ps?ps.value:ps.textContent,O=T.length;for(l=0;l<p&&u[l]===T[l];l++);var B=p-l;for(y=1;y<=B&&u[p-y]===T[O-y];y++);return cv=T.slice(l,1<y?1-y:void 0)}function uv(l){var u=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&u===13&&(l=13)):l=u,l===10&&(l=13),32<=l||l===13?l:0}function fv(){return!0}function XD(){return!1}function Ar(l){function u(p,y,T,O,B){this._reactName=p,this._targetInst=T,this.type=y,this.nativeEvent=O,this.target=B,this.currentTarget=null;for(var Y in l)l.hasOwnProperty(Y)&&(p=l[Y],this[Y]=p?p(O):O[Y]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?fv:XD,this.isPropagationStopped=XD,this}return d(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=fv)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=fv)},persist:function(){},isPersistent:fv}),u}var Fl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dv=Ar(Fl),bh=d({},Fl,{view:0,detail:0}),Yie=Ar(bh),E1,A1,xh,hv=d({},bh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:T1,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==xh&&(xh&&l.type==="mousemove"?(E1=l.screenX-xh.screenX,A1=l.screenY-xh.screenY):A1=E1=0,xh=l),E1)},movementY:function(l){return"movementY"in l?l.movementY:A1}}),QD=Ar(hv),Xie=d({},hv,{dataTransfer:0}),Qie=Ar(Xie),Zie=d({},bh,{relatedTarget:0}),C1=Ar(Zie),Jie=d({},Fl,{animationName:0,elapsedTime:0,pseudoElement:0}),eae=Ar(Jie),tae=d({},Fl,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),nae=Ar(tae),rae=d({},Fl,{data:0}),ZD=Ar(rae),iae={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aae={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"},oae={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sae(l){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(l):(l=oae[l])?!!u[l]:!1}function T1(){return sae}var lae=d({},bh,{key:function(l){if(l.key){var u=iae[l.key]||l.key;if(u!=="Unidentified")return u}return l.type==="keypress"?(l=uv(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?aae[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:T1,charCode:function(l){return l.type==="keypress"?uv(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?uv(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),cae=Ar(lae),uae=d({},hv,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JD=Ar(uae),fae=d({},bh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:T1}),dae=Ar(fae),hae=d({},Fl,{propertyName:0,elapsedTime:0,pseudoElement:0}),pae=Ar(hae),mae=d({},hv,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),gae=Ar(mae),vae=d({},Fl,{newState:0,oldState:0}),yae=Ar(vae),bae=[9,13,27,32],j1=ro&&"CompositionEvent"in window,wh=null;ro&&"documentMode"in document&&(wh=document.documentMode);var xae=ro&&"TextEvent"in window&&!wh,eI=ro&&(!j1||wh&&8<wh&&11>=wh),tI=" ",nI=!1;function rI(l,u){switch(l){case"keyup":return bae.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iI(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Cu=!1;function wae(l,u){switch(l){case"compositionend":return iI(u);case"keypress":return u.which!==32?null:(nI=!0,tI);case"textInput":return l=u.data,l===tI&&nI?null:l;default:return null}}function Sae(l,u){if(Cu)return l==="compositionend"||!j1&&rI(l,u)?(l=YD(),cv=_1=ps=null,Cu=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return eI&&u.locale!=="ko"?null:u.data;default:return null}}var _ae={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 aI(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u==="input"?!!_ae[l.type]:u==="textarea"}function oI(l,u,p,y){Eu?Au?Au.push(y):Au=[y]:Eu=y,u=ny(u,"onChange"),0<u.length&&(p=new dv("onChange","change",null,p,y),l.push({event:p,listeners:u}))}var Sh=null,_h=null;function Eae(l){F$(l,0)}function pv(l){var u=us(l);if(ov(u))return l}function sI(l,u){if(l==="change")return u}var lI=!1;if(ro){var N1;if(ro){var O1="oninput"in document;if(!O1){var cI=document.createElement("div");cI.setAttribute("oninput","return;"),O1=typeof cI.oninput=="function"}N1=O1}else N1=!1;lI=N1&&(!document.documentMode||9<document.documentMode)}function uI(){Sh&&(Sh.detachEvent("onpropertychange",fI),_h=Sh=null)}function fI(l){if(l.propertyName==="value"&&pv(_h)){var u=[];oI(u,_h,l,x1(l)),WD(Eae,u)}}function Aae(l,u,p){l==="focusin"?(uI(),Sh=u,_h=p,Sh.attachEvent("onpropertychange",fI)):l==="focusout"&&uI()}function Cae(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return pv(_h)}function Tae(l,u){if(l==="click")return pv(u)}function jae(l,u){if(l==="input"||l==="change")return pv(u)}function Nae(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var Ur=typeof Object.is=="function"?Object.is:Nae;function Eh(l,u){if(Ur(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var p=Object.keys(l),y=Object.keys(u);if(p.length!==y.length)return!1;for(y=0;y<p.length;y++){var T=p[y];if(!Ve.call(u,T)||!Ur(l[T],u[T]))return!1}return!0}function dI(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function hI(l,u){var p=dI(l);l=0;for(var y;p;){if(p.nodeType===3){if(y=l+p.textContent.length,l<=u&&y>=u)return{node:p,offset:u-l};l=y}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=dI(p)}}function pI(l,u){return l&&u?l===u?!0:l&&l.nodeType===3?!1:u&&u.nodeType===3?pI(l,u.parentNode):"contains"in l?l.contains(u):l.compareDocumentPosition?!!(l.compareDocumentPosition(u)&16):!1:!1}function mI(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var u=ql(l.document);u instanceof l.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)l=u.contentWindow;else break;u=ql(l.document)}return u}function M1(l){var u=l&&l.nodeName&&l.nodeName.toLowerCase();return u&&(u==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||u==="textarea"||l.contentEditable==="true")}var Oae=ro&&"documentMode"in document&&11>=document.documentMode,Tu=null,R1=null,Ah=null,P1=!1;function gI(l,u,p){var y=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;P1||Tu==null||Tu!==ql(y)||(y=Tu,"selectionStart"in y&&M1(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Ah&&Eh(Ah,y)||(Ah=y,y=ny(R1,"onSelect"),0<y.length&&(u=new dv("onSelect","select",null,u,p),l.push({event:u,listeners:y}),u.target=Tu)))}function Vl(l,u){var p={};return p[l.toLowerCase()]=u.toLowerCase(),p["Webkit"+l]="webkit"+u,p["Moz"+l]="moz"+u,p}var ju={animationend:Vl("Animation","AnimationEnd"),animationiteration:Vl("Animation","AnimationIteration"),animationstart:Vl("Animation","AnimationStart"),transitionrun:Vl("Transition","TransitionRun"),transitionstart:Vl("Transition","TransitionStart"),transitioncancel:Vl("Transition","TransitionCancel"),transitionend:Vl("Transition","TransitionEnd")},k1={},vI={};ro&&(vI=document.createElement("div").style,"AnimationEvent"in window||(delete ju.animationend.animation,delete ju.animationiteration.animation,delete ju.animationstart.animation),"TransitionEvent"in window||delete ju.transitionend.transition);function Ul(l){if(k1[l])return k1[l];if(!ju[l])return l;var u=ju[l],p;for(p in u)if(u.hasOwnProperty(p)&&p in vI)return k1[l]=u[p];return l}var yI=Ul("animationend"),bI=Ul("animationiteration"),xI=Ul("animationstart"),Mae=Ul("transitionrun"),Rae=Ul("transitionstart"),Pae=Ul("transitioncancel"),wI=Ul("transitionend"),SI=new Map,D1="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(" ");D1.push("scrollEnd");function Hi(l,u){SI.set(l,u),eo(u,[l])}var mv=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},mi=[],Nu=0,I1=0;function gv(){for(var l=Nu,u=I1=Nu=0;u<l;){var p=mi[u];mi[u++]=null;var y=mi[u];mi[u++]=null;var T=mi[u];mi[u++]=null;var O=mi[u];if(mi[u++]=null,y!==null&&T!==null){var B=y.pending;B===null?T.next=T:(T.next=B.next,B.next=T),y.pending=T}O!==0&&_I(p,T,O)}}function vv(l,u,p,y){mi[Nu++]=l,mi[Nu++]=u,mi[Nu++]=p,mi[Nu++]=y,I1|=y,l.lanes|=y,l=l.alternate,l!==null&&(l.lanes|=y)}function L1(l,u,p,y){return vv(l,u,p,y),yv(l)}function Hl(l,u){return vv(l,null,null,u),yv(l)}function _I(l,u,p){l.lanes|=p;var y=l.alternate;y!==null&&(y.lanes|=p);for(var T=!1,O=l.return;O!==null;)O.childLanes|=p,y=O.alternate,y!==null&&(y.childLanes|=p),O.tag===22&&(l=O.stateNode,l===null||l._visibility&1||(T=!0)),l=O,O=O.return;return l.tag===3?(O=l.stateNode,T&&u!==null&&(T=31-$n(p),l=O.hiddenUpdates,y=l[T],y===null?l[T]=[u]:y.push(u),u.lane=p|536870912),O):null}function yv(l){if(50<Kh)throw Kh=0,GS=null,Error(r(185));for(var u=l.return;u!==null;)l=u,u=l.return;return l.tag===3?l.stateNode:null}var Ou={};function kae(l,u,p,y){this.tag=l,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=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hr(l,u,p,y){return new kae(l,u,p,y)}function $1(l){return l=l.prototype,!(!l||!l.isReactComponent)}function io(l,u){var p=l.alternate;return p===null?(p=Hr(l.tag,u,l.key,l.mode),p.elementType=l.elementType,p.type=l.type,p.stateNode=l.stateNode,p.alternate=l,l.alternate=p):(p.pendingProps=u,p.type=l.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=l.flags&65011712,p.childLanes=l.childLanes,p.lanes=l.lanes,p.child=l.child,p.memoizedProps=l.memoizedProps,p.memoizedState=l.memoizedState,p.updateQueue=l.updateQueue,u=l.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=l.sibling,p.index=l.index,p.ref=l.ref,p.refCleanup=l.refCleanup,p}function EI(l,u){l.flags&=65011714;var p=l.alternate;return p===null?(l.childLanes=0,l.lanes=u,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=p.childLanes,l.lanes=p.lanes,l.child=p.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=p.memoizedProps,l.memoizedState=p.memoizedState,l.updateQueue=p.updateQueue,l.type=p.type,u=p.dependencies,l.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),l}function bv(l,u,p,y,T,O){var B=0;if(y=l,typeof l=="function")$1(l)&&(B=1);else if(typeof l=="string")B=Boe(l,p,W.current)?26:l==="html"||l==="head"||l==="body"?27:5;else e:switch(l){case P:return l=Hr(31,p,u,T),l.elementType=P,l.lanes=O,l;case w:return Gl(p.children,T,O,u);case b:B=8,T|=24;break;case S:return l=Hr(12,p,u,T|2),l.elementType=S,l.lanes=O,l;case C:return l=Hr(13,p,u,T),l.elementType=C,l.lanes=O,l;case N:return l=Hr(19,p,u,T),l.elementType=N,l.lanes=O,l;default:if(typeof l=="object"&&l!==null)switch(l.$$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,y=null;break e}B=29,p=Error(r(130,l===null?"null":typeof l,"")),y=null}return u=Hr(B,p,u,T),u.elementType=l,u.type=y,u.lanes=O,u}function Gl(l,u,p,y){return l=Hr(7,l,y,u),l.lanes=p,l}function B1(l,u,p){return l=Hr(6,l,null,u),l.lanes=p,l}function AI(l){var u=Hr(18,null,null,0);return u.stateNode=l,u}function q1(l,u,p){return u=Hr(4,l.children!==null?l.children:[],l.key,u),u.lanes=p,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}var CI=new WeakMap;function gi(l,u){if(typeof l=="object"&&l!==null){var p=CI.get(l);return p!==void 0?p:(u={value:l,source:u,stack:rt(u)},CI.set(l,u),u)}return{value:l,source:u,stack:rt(u)}}var Mu=[],Ru=0,xv=null,Ch=0,vi=[],yi=0,ms=null,wa=1,Sa="";function ao(l,u){Mu[Ru++]=Ch,Mu[Ru++]=xv,xv=l,Ch=u}function TI(l,u,p){vi[yi++]=wa,vi[yi++]=Sa,vi[yi++]=ms,ms=l;var y=wa;l=Sa;var T=32-$n(y)-1;y&=~(1<<T),p+=1;var O=32-$n(u)+T;if(30<O){var B=T-T%5;O=(y&(1<<B)-1).toString(32),y>>=B,T-=B,wa=1<<32-$n(u)+T|p<<T|y,Sa=O+l}else wa=1<<O|p<<T|y,Sa=l}function z1(l){l.return!==null&&(ao(l,1),TI(l,1,0))}function F1(l){for(;l===xv;)xv=Mu[--Ru],Mu[Ru]=null,Ch=Mu[--Ru],Mu[Ru]=null;for(;l===ms;)ms=vi[--yi],vi[yi]=null,Sa=vi[--yi],vi[yi]=null,wa=vi[--yi],vi[yi]=null}function jI(l,u){vi[yi++]=wa,vi[yi++]=Sa,vi[yi++]=ms,wa=u.id,Sa=u.overflow,ms=l}var Kn=null,Kt=null,pt=!1,gs=null,bi=!1,V1=Error(r(519));function vs(l){var u=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Th(gi(u,l)),V1}function NI(l){var u=l.stateNode,p=l.type,y=l.memoizedProps;switch(u[jn]=l,u[sr]=y,p){case"dialog":lt("cancel",u),lt("close",u);break;case"iframe":case"object":case"embed":lt("load",u);break;case"video":case"audio":for(p=0;p<Yh.length;p++)lt(Yh[p],u);break;case"source":lt("error",u);break;case"img":case"image":case"link":lt("error",u),lt("load",u);break;case"details":lt("toggle",u);break;case"input":lt("invalid",u),sv(u,y.value,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name,!0);break;case"select":lt("invalid",u);break;case"textarea":lt("invalid",u),UD(u,y.value,y.defaultValue,y.children)}p=y.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||u.textContent===""+p||y.suppressHydrationWarning===!0||G$(u.textContent,p)?(y.popover!=null&&(lt("beforetoggle",u),lt("toggle",u)),y.onScroll!=null&&lt("scroll",u),y.onScrollEnd!=null&&lt("scrollend",u),y.onClick!=null&&(u.onclick=no),u=!0):u=!1,u||vs(l,!0)}function OI(l){for(Kn=l.return;Kn;)switch(Kn.tag){case 5:case 31:case 13:bi=!1;return;case 27:case 3:bi=!0;return;default:Kn=Kn.return}}function Pu(l){if(l!==Kn)return!1;if(!pt)return OI(l),pt=!0,!1;var u=l.tag,p;if((p=u!==3&&u!==27)&&((p=u===5)&&(p=l.type,p=!(p!=="form"&&p!=="button")||s_(l.type,l.memoizedProps)),p=!p),p&&Kt&&vs(l),OI(l),u===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(317));Kt=t3(l)}else if(u===31){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(317));Kt=t3(l)}else u===27?(u=Kt,Ms(l.type)?(l=d_,d_=null,Kt=l):Kt=u):Kt=Kn?wi(l.stateNode.nextSibling):null;return!0}function Kl(){Kt=Kn=null,pt=!1}function U1(){var l=gs;return l!==null&&(Nr===null?Nr=l:Nr.push.apply(Nr,l),gs=null),l}function Th(l){gs===null?gs=[l]:gs.push(l)}var H1=U(null),Wl=null,oo=null;function ys(l,u,p){X(H1,u._currentValue),u._currentValue=p}function so(l){l._currentValue=H1.current,V(H1)}function G1(l,u,p){for(;l!==null;){var y=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),l===p)break;l=l.return}}function K1(l,u,p,y){var T=l.child;for(T!==null&&(T.return=l);T!==null;){var O=T.dependencies;if(O!==null){var B=T.child;O=O.firstContext;e:for(;O!==null;){var Y=O;O=T;for(var re=0;re<u.length;re++)if(Y.context===u[re]){O.lanes|=p,Y=O.alternate,Y!==null&&(Y.lanes|=p),G1(O.return,p,l),y||(B=null);break e}O=Y.next}}else if(T.tag===18){if(B=T.return,B===null)throw Error(r(341));B.lanes|=p,O=B.alternate,O!==null&&(O.lanes|=p),G1(B,p,l),B=null}else B=T.child;if(B!==null)B.return=T;else for(B=T;B!==null;){if(B===l){B=null;break}if(T=B.sibling,T!==null){T.return=B.return,B=T;break}B=B.return}T=B}}function ku(l,u,p,y){l=null;for(var T=u,O=!1;T!==null;){if(!O){if((T.flags&524288)!==0)O=!0;else if((T.flags&262144)!==0)break}if(T.tag===10){var B=T.alternate;if(B===null)throw Error(r(387));if(B=B.memoizedProps,B!==null){var Y=T.type;Ur(T.pendingProps.value,B.value)||(l!==null?l.push(Y):l=[Y])}}else if(T===ee.current){if(B=T.alternate,B===null)throw Error(r(387));B.memoizedState.memoizedState!==T.memoizedState.memoizedState&&(l!==null?l.push(ep):l=[ep])}T=T.return}l!==null&&K1(u,l,p,y),u.flags|=262144}function wv(l){for(l=l.firstContext;l!==null;){if(!Ur(l.context._currentValue,l.memoizedValue))return!0;l=l.next}return!1}function Yl(l){Wl=l,oo=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function Wn(l){return MI(Wl,l)}function Sv(l,u){return Wl===null&&Yl(l),MI(l,u)}function MI(l,u){var p=u._currentValue;if(u={context:u,memoizedValue:p,next:null},oo===null){if(l===null)throw Error(r(308));oo=u,l.dependencies={lanes:0,firstContext:u},l.flags|=524288}else oo=oo.next=u;return p}var Dae=typeof AbortController<"u"?AbortController:function(){var l=[],u=this.signal={aborted:!1,addEventListener:function(p,y){l.push(y)}};this.abort=function(){u.aborted=!0,l.forEach(function(p){return p()})}},Iae=e.unstable_scheduleCallback,Lae=e.unstable_NormalPriority,yn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function W1(){return{controller:new Dae,data:new Map,refCount:0}}function jh(l){l.refCount--,l.refCount===0&&Iae(Lae,function(){l.controller.abort()})}var Nh=null,Y1=0,Du=0,Iu=null;function $ae(l,u){if(Nh===null){var p=Nh=[];Y1=0,Du=ZS(),Iu={status:"pending",value:void 0,then:function(y){p.push(y)}}}return Y1++,u.then(RI,RI),u}function RI(){if(--Y1===0&&Nh!==null){Iu!==null&&(Iu.status="fulfilled");var l=Nh;Nh=null,Du=0,Iu=null;for(var u=0;u<l.length;u++)(0,l[u])()}}function Bae(l,u){var p=[],y={status:"pending",value:null,reason:null,then:function(T){p.push(T)}};return l.then(function(){y.status="fulfilled",y.value=u;for(var T=0;T<p.length;T++)(0,p[T])(u)},function(T){for(y.status="rejected",y.reason=T,T=0;T<p.length;T++)(0,p[T])(void 0)}),y}var PI=k.S;k.S=function(l,u){g$=Tt(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&$ae(l,u),PI!==null&&PI(l,u)};var Xl=U(null);function X1(){var l=Xl.current;return l!==null?l:$t.pooledCache}function _v(l,u){u===null?X(Xl,Xl.current):X(Xl,u.pool)}function kI(){var l=X1();return l===null?null:{parent:yn._currentValue,pool:l}}var Lu=Error(r(460)),Q1=Error(r(474)),Ev=Error(r(542)),Av={then:function(){}};function DI(l){return l=l.status,l==="fulfilled"||l==="rejected"}function II(l,u,p){switch(p=l[p],p===void 0?l.push(u):p!==u&&(u.then(no,no),u=p),u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,$I(l),l;default:if(typeof u.status=="string")u.then(no,no);else{if(l=$t,l!==null&&100<l.shellSuspendCounter)throw Error(r(482));l=u,l.status="pending",l.then(function(y){if(u.status==="pending"){var T=u;T.status="fulfilled",T.value=y}},function(y){if(u.status==="pending"){var T=u;T.status="rejected",T.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,$I(l),l}throw Zl=u,Lu}}function Ql(l){try{var u=l._init;return u(l._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(Zl=p,Lu):p}}var Zl=null;function LI(){if(Zl===null)throw Error(r(459));var l=Zl;return Zl=null,l}function $I(l){if(l===Lu||l===Ev)throw Error(r(483))}var $u=null,Oh=0;function Cv(l){var u=Oh;return Oh+=1,$u===null&&($u=[]),II($u,l,u)}function Mh(l,u){u=u.props.ref,l.ref=u!==void 0?u:null}function Tv(l,u){throw u.$$typeof===m?Error(r(525)):(l=Object.prototype.toString.call(u),Error(r(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l)))}function BI(l){function u(le,ae){if(l){var ue=le.deletions;ue===null?(le.deletions=[ae],le.flags|=16):ue.push(ae)}}function p(le,ae){if(!l)return null;for(;ae!==null;)u(le,ae),ae=ae.sibling;return null}function y(le){for(var ae=new Map;le!==null;)le.key!==null?ae.set(le.key,le):ae.set(le.index,le),le=le.sibling;return ae}function T(le,ae){return le=io(le,ae),le.index=0,le.sibling=null,le}function O(le,ae,ue){return le.index=ue,l?(ue=le.alternate,ue!==null?(ue=ue.index,ue<ae?(le.flags|=67108866,ae):ue):(le.flags|=67108866,ae)):(le.flags|=1048576,ae)}function B(le){return l&&le.alternate===null&&(le.flags|=67108866),le}function Y(le,ae,ue,ve){return ae===null||ae.tag!==6?(ae=B1(ue,le.mode,ve),ae.return=le,ae):(ae=T(ae,ue),ae.return=le,ae)}function re(le,ae,ue,ve){var Be=ue.type;return Be===w?pe(le,ae,ue.props.children,ve,ue.key):ae!==null&&(ae.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===R&&Ql(Be)===ae.type)?(ae=T(ae,ue.props),Mh(ae,ue),ae.return=le,ae):(ae=bv(ue.type,ue.key,ue.props,null,le.mode,ve),Mh(ae,ue),ae.return=le,ae)}function fe(le,ae,ue,ve){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==ue.containerInfo||ae.stateNode.implementation!==ue.implementation?(ae=q1(ue,le.mode,ve),ae.return=le,ae):(ae=T(ae,ue.children||[]),ae.return=le,ae)}function pe(le,ae,ue,ve,Be){return ae===null||ae.tag!==7?(ae=Gl(ue,le.mode,ve,Be),ae.return=le,ae):(ae=T(ae,ue),ae.return=le,ae)}function ye(le,ae,ue){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=B1(""+ae,le.mode,ue),ae.return=le,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case v:return ue=bv(ae.type,ae.key,ae.props,null,le.mode,ue),Mh(ue,ae),ue.return=le,ue;case x:return ae=q1(ae,le.mode,ue),ae.return=le,ae;case R:return ae=Ql(ae),ye(le,ae,ue)}if(q(ae)||D(ae))return ae=Gl(ae,le.mode,ue,null),ae.return=le,ae;if(typeof ae.then=="function")return ye(le,Cv(ae),ue);if(ae.$$typeof===_)return ye(le,Sv(le,ae),ue);Tv(le,ae)}return null}function de(le,ae,ue,ve){var Be=ae!==null?ae.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Be!==null?null:Y(le,ae,""+ue,ve);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:return ue.key===Be?re(le,ae,ue,ve):null;case x:return ue.key===Be?fe(le,ae,ue,ve):null;case R:return ue=Ql(ue),de(le,ae,ue,ve)}if(q(ue)||D(ue))return Be!==null?null:pe(le,ae,ue,ve,null);if(typeof ue.then=="function")return de(le,ae,Cv(ue),ve);if(ue.$$typeof===_)return de(le,ae,Sv(le,ue),ve);Tv(le,ue)}return null}function he(le,ae,ue,ve,Be){if(typeof ve=="string"&&ve!==""||typeof ve=="number"||typeof ve=="bigint")return le=le.get(ue)||null,Y(ae,le,""+ve,Be);if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case v:return le=le.get(ve.key===null?ue:ve.key)||null,re(ae,le,ve,Be);case x:return le=le.get(ve.key===null?ue:ve.key)||null,fe(ae,le,ve,Be);case R:return ve=Ql(ve),he(le,ae,ue,ve,Be)}if(q(ve)||D(ve))return le=le.get(ue)||null,pe(ae,le,ve,Be,null);if(typeof ve.then=="function")return he(le,ae,ue,Cv(ve),Be);if(ve.$$typeof===_)return he(le,ae,ue,Sv(ae,ve),Be);Tv(ae,ve)}return null}function Oe(le,ae,ue,ve){for(var Be=null,xt=null,Pe=ae,Qe=ae=0,ft=null;Pe!==null&&Qe<ue.length;Qe++){Pe.index>Qe?(ft=Pe,Pe=null):ft=Pe.sibling;var wt=de(le,Pe,ue[Qe],ve);if(wt===null){Pe===null&&(Pe=ft);break}l&&Pe&&wt.alternate===null&&u(le,Pe),ae=O(wt,ae,Qe),xt===null?Be=wt:xt.sibling=wt,xt=wt,Pe=ft}if(Qe===ue.length)return p(le,Pe),pt&&ao(le,Qe),Be;if(Pe===null){for(;Qe<ue.length;Qe++)Pe=ye(le,ue[Qe],ve),Pe!==null&&(ae=O(Pe,ae,Qe),xt===null?Be=Pe:xt.sibling=Pe,xt=Pe);return pt&&ao(le,Qe),Be}for(Pe=y(Pe);Qe<ue.length;Qe++)ft=he(Pe,le,Qe,ue[Qe],ve),ft!==null&&(l&&ft.alternate!==null&&Pe.delete(ft.key===null?Qe:ft.key),ae=O(ft,ae,Qe),xt===null?Be=ft:xt.sibling=ft,xt=ft);return l&&Pe.forEach(function(Is){return u(le,Is)}),pt&&ao(le,Qe),Be}function qe(le,ae,ue,ve){if(ue==null)throw Error(r(151));for(var Be=null,xt=null,Pe=ae,Qe=ae=0,ft=null,wt=ue.next();Pe!==null&&!wt.done;Qe++,wt=ue.next()){Pe.index>Qe?(ft=Pe,Pe=null):ft=Pe.sibling;var Is=de(le,Pe,wt.value,ve);if(Is===null){Pe===null&&(Pe=ft);break}l&&Pe&&Is.alternate===null&&u(le,Pe),ae=O(Is,ae,Qe),xt===null?Be=Is:xt.sibling=Is,xt=Is,Pe=ft}if(wt.done)return p(le,Pe),pt&&ao(le,Qe),Be;if(Pe===null){for(;!wt.done;Qe++,wt=ue.next())wt=ye(le,wt.value,ve),wt!==null&&(ae=O(wt,ae,Qe),xt===null?Be=wt:xt.sibling=wt,xt=wt);return pt&&ao(le,Qe),Be}for(Pe=y(Pe);!wt.done;Qe++,wt=ue.next())wt=he(Pe,le,Qe,wt.value,ve),wt!==null&&(l&&wt.alternate!==null&&Pe.delete(wt.key===null?Qe:wt.key),ae=O(wt,ae,Qe),xt===null?Be=wt:xt.sibling=wt,xt=wt);return l&&Pe.forEach(function(Xoe){return u(le,Xoe)}),pt&&ao(le,Qe),Be}function It(le,ae,ue,ve){if(typeof ue=="object"&&ue!==null&&ue.type===w&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:e:{for(var Be=ue.key;ae!==null;){if(ae.key===Be){if(Be=ue.type,Be===w){if(ae.tag===7){p(le,ae.sibling),ve=T(ae,ue.props.children),ve.return=le,le=ve;break e}}else if(ae.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===R&&Ql(Be)===ae.type){p(le,ae.sibling),ve=T(ae,ue.props),Mh(ve,ue),ve.return=le,le=ve;break e}p(le,ae);break}else u(le,ae);ae=ae.sibling}ue.type===w?(ve=Gl(ue.props.children,le.mode,ve,ue.key),ve.return=le,le=ve):(ve=bv(ue.type,ue.key,ue.props,null,le.mode,ve),Mh(ve,ue),ve.return=le,le=ve)}return B(le);case x:e:{for(Be=ue.key;ae!==null;){if(ae.key===Be)if(ae.tag===4&&ae.stateNode.containerInfo===ue.containerInfo&&ae.stateNode.implementation===ue.implementation){p(le,ae.sibling),ve=T(ae,ue.children||[]),ve.return=le,le=ve;break e}else{p(le,ae);break}else u(le,ae);ae=ae.sibling}ve=q1(ue,le.mode,ve),ve.return=le,le=ve}return B(le);case R:return ue=Ql(ue),It(le,ae,ue,ve)}if(q(ue))return Oe(le,ae,ue,ve);if(D(ue)){if(Be=D(ue),typeof Be!="function")throw Error(r(150));return ue=Be.call(ue),qe(le,ae,ue,ve)}if(typeof ue.then=="function")return It(le,ae,Cv(ue),ve);if(ue.$$typeof===_)return It(le,ae,Sv(le,ue),ve);Tv(le,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,ae!==null&&ae.tag===6?(p(le,ae.sibling),ve=T(ae,ue),ve.return=le,le=ve):(p(le,ae),ve=B1(ue,le.mode,ve),ve.return=le,le=ve),B(le)):p(le,ae)}return function(le,ae,ue,ve){try{Oh=0;var Be=It(le,ae,ue,ve);return $u=null,Be}catch(Pe){if(Pe===Lu||Pe===Ev)throw Pe;var xt=Hr(29,Pe,null,le.mode);return xt.lanes=ve,xt.return=le,xt}finally{}}}var Jl=BI(!0),qI=BI(!1),bs=!1;function Z1(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function J1(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function xs(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function ws(l,u,p){var y=l.updateQueue;if(y===null)return null;if(y=y.shared,(At&2)!==0){var T=y.pending;return T===null?u.next=u:(u.next=T.next,T.next=u),y.pending=u,u=yv(l),_I(l,null,p),u}return vv(l,y,u,p),yv(l)}function Rh(l,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var y=u.lanes;y&=l.pendingLanes,p|=y,u.lanes=p,ar(l,p)}}function eS(l,u){var p=l.updateQueue,y=l.alternate;if(y!==null&&(y=y.updateQueue,p===y)){var T=null,O=null;if(p=p.firstBaseUpdate,p!==null){do{var B={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};O===null?T=O=B:O=O.next=B,p=p.next}while(p!==null);O===null?T=O=u:O=O.next=u}else T=O=u;p={baseState:y.baseState,firstBaseUpdate:T,lastBaseUpdate:O,shared:y.shared,callbacks:y.callbacks},l.updateQueue=p;return}l=p.lastBaseUpdate,l===null?p.firstBaseUpdate=u:l.next=u,p.lastBaseUpdate=u}var tS=!1;function Ph(){if(tS){var l=Iu;if(l!==null)throw l}}function kh(l,u,p,y){tS=!1;var T=l.updateQueue;bs=!1;var O=T.firstBaseUpdate,B=T.lastBaseUpdate,Y=T.shared.pending;if(Y!==null){T.shared.pending=null;var re=Y,fe=re.next;re.next=null,B===null?O=fe:B.next=fe,B=re;var pe=l.alternate;pe!==null&&(pe=pe.updateQueue,Y=pe.lastBaseUpdate,Y!==B&&(Y===null?pe.firstBaseUpdate=fe:Y.next=fe,pe.lastBaseUpdate=re))}if(O!==null){var ye=T.baseState;B=0,pe=fe=re=null,Y=O;do{var de=Y.lane&-536870913,he=de!==Y.lane;if(he?(ut&de)===de:(y&de)===de){de!==0&&de===Du&&(tS=!0),pe!==null&&(pe=pe.next={lane:0,tag:Y.tag,payload:Y.payload,callback:null,next:null});e:{var Oe=l,qe=Y;de=u;var It=p;switch(qe.tag){case 1:if(Oe=qe.payload,typeof Oe=="function"){ye=Oe.call(It,ye,de);break e}ye=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=qe.payload,de=typeof Oe=="function"?Oe.call(It,ye,de):Oe,de==null)break e;ye=d({},ye,de);break e;case 2:bs=!0}}de=Y.callback,de!==null&&(l.flags|=64,he&&(l.flags|=8192),he=T.callbacks,he===null?T.callbacks=[de]:he.push(de))}else he={lane:de,tag:Y.tag,payload:Y.payload,callback:Y.callback,next:null},pe===null?(fe=pe=he,re=ye):pe=pe.next=he,B|=de;if(Y=Y.next,Y===null){if(Y=T.shared.pending,Y===null)break;he=Y,Y=he.next,he.next=null,T.lastBaseUpdate=he,T.shared.pending=null}}while(!0);pe===null&&(re=ye),T.baseState=re,T.firstBaseUpdate=fe,T.lastBaseUpdate=pe,O===null&&(T.shared.lanes=0),Cs|=B,l.lanes=B,l.memoizedState=ye}}function zI(l,u){if(typeof l!="function")throw Error(r(191,l));l.call(u)}function FI(l,u){var p=l.callbacks;if(p!==null)for(l.callbacks=null,l=0;l<p.length;l++)zI(p[l],u)}var Bu=U(null),jv=U(0);function VI(l,u){l=vo,X(jv,l),X(Bu,u),vo=l|u.baseLanes}function nS(){X(jv,vo),X(Bu,Bu.current)}function rS(){vo=jv.current,V(Bu),V(jv)}var Gr=U(null),xi=null;function Ss(l){var u=l.alternate;X(pn,pn.current&1),X(Gr,l),xi===null&&(u===null||Bu.current!==null||u.memoizedState!==null)&&(xi=l)}function iS(l){X(pn,pn.current),X(Gr,l),xi===null&&(xi=l)}function UI(l){l.tag===22?(X(pn,pn.current),X(Gr,l),xi===null&&(xi=l)):_s()}function _s(){X(pn,pn.current),X(Gr,Gr.current)}function Kr(l){V(Gr),xi===l&&(xi=null),V(pn)}var pn=U(0);function Nv(l){for(var u=l;u!==null;){if(u.tag===13){var p=u.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||u_(p)||f_(p)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var lo=0,Ye=null,kt=null,bn=null,Ov=!1,qu=!1,ec=!1,Mv=0,Dh=0,zu=null,qae=0;function sn(){throw Error(r(321))}function aS(l,u){if(u===null)return!1;for(var p=0;p<u.length&&p<l.length;p++)if(!Ur(l[p],u[p]))return!1;return!0}function oS(l,u,p,y,T,O){return lo=O,Ye=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,k.H=l===null||l.memoizedState===null?TL:wS,ec=!1,O=p(y,T),ec=!1,qu&&(O=GI(u,p,y,T)),HI(l),O}function HI(l){k.H=$h;var u=kt!==null&&kt.next!==null;if(lo=0,bn=kt=Ye=null,Ov=!1,Dh=0,zu=null,u)throw Error(r(300));l===null||xn||(l=l.dependencies,l!==null&&wv(l)&&(xn=!0))}function GI(l,u,p,y){Ye=l;var T=0;do{if(qu&&(zu=null),Dh=0,qu=!1,25<=T)throw Error(r(301));if(T+=1,bn=kt=null,l.updateQueue!=null){var O=l.updateQueue;O.lastEffect=null,O.events=null,O.stores=null,O.memoCache!=null&&(O.memoCache.index=0)}k.H=jL,O=u(p,y)}while(qu);return O}function zae(){var l=k.H,u=l.useState()[0];return u=typeof u.then=="function"?Ih(u):u,l=l.useState()[0],(kt!==null?kt.memoizedState:null)!==l&&(Ye.flags|=1024),u}function sS(){var l=Mv!==0;return Mv=0,l}function lS(l,u,p){u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~p}function cS(l){if(Ov){for(l=l.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}Ov=!1}lo=0,bn=kt=Ye=null,qu=!1,Dh=Mv=0,zu=null}function mr(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bn===null?Ye.memoizedState=bn=l:bn=bn.next=l,bn}function mn(){if(kt===null){var l=Ye.alternate;l=l!==null?l.memoizedState:null}else l=kt.next;var u=bn===null?Ye.memoizedState:bn.next;if(u!==null)bn=u,kt=l;else{if(l===null)throw Ye.alternate===null?Error(r(467)):Error(r(310));kt=l,l={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},bn===null?Ye.memoizedState=bn=l:bn=bn.next=l}return bn}function Rv(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ih(l){var u=Dh;return Dh+=1,zu===null&&(zu=[]),l=II(zu,l,u),u=Ye,(bn===null?u.memoizedState:bn.next)===null&&(u=u.alternate,k.H=u===null||u.memoizedState===null?TL:wS),l}function Pv(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return Ih(l);if(l.$$typeof===_)return Wn(l)}throw Error(r(438,String(l)))}function uS(l){var u=null,p=Ye.updateQueue;if(p!==null&&(u=p.memoCache),u==null){var y=Ye.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(T){return T.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),p===null&&(p=Rv(),Ye.updateQueue=p),p.memoCache=u,p=u.data[u.index],p===void 0)for(p=u.data[u.index]=Array(l),y=0;y<l;y++)p[y]=$;return u.index++,p}function co(l,u){return typeof u=="function"?u(l):u}function kv(l){var u=mn();return fS(u,kt,l)}function fS(l,u,p){var y=l.queue;if(y===null)throw Error(r(311));y.lastRenderedReducer=p;var T=l.baseQueue,O=y.pending;if(O!==null){if(T!==null){var B=T.next;T.next=O.next,O.next=B}u.baseQueue=T=O,y.pending=null}if(O=l.baseState,T===null)l.memoizedState=O;else{u=T.next;var Y=B=null,re=null,fe=u,pe=!1;do{var ye=fe.lane&-536870913;if(ye!==fe.lane?(ut&ye)===ye:(lo&ye)===ye){var de=fe.revertLane;if(de===0)re!==null&&(re=re.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),ye===Du&&(pe=!0);else if((lo&de)===de){fe=fe.next,de===Du&&(pe=!0);continue}else ye={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(Y=re=ye,B=O):re=re.next=ye,Ye.lanes|=de,Cs|=de;ye=fe.action,ec&&p(O,ye),O=fe.hasEagerState?fe.eagerState:p(O,ye)}else de={lane:ye,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},re===null?(Y=re=de,B=O):re=re.next=de,Ye.lanes|=ye,Cs|=ye;fe=fe.next}while(fe!==null&&fe!==u);if(re===null?B=O:re.next=Y,!Ur(O,l.memoizedState)&&(xn=!0,pe&&(p=Iu,p!==null)))throw p;l.memoizedState=O,l.baseState=B,l.baseQueue=re,y.lastRenderedState=O}return T===null&&(y.lanes=0),[l.memoizedState,y.dispatch]}function dS(l){var u=mn(),p=u.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=l;var y=p.dispatch,T=p.pending,O=u.memoizedState;if(T!==null){p.pending=null;var B=T=T.next;do O=l(O,B.action),B=B.next;while(B!==T);Ur(O,u.memoizedState)||(xn=!0),u.memoizedState=O,u.baseQueue===null&&(u.baseState=O),p.lastRenderedState=O}return[O,y]}function KI(l,u,p){var y=Ye,T=mn(),O=pt;if(O){if(p===void 0)throw Error(r(407));p=p()}else p=u();var B=!Ur((kt||T).memoizedState,p);if(B&&(T.memoizedState=p,xn=!0),T=T.queue,mS(XI.bind(null,y,T,l),[l]),T.getSnapshot!==u||B||bn!==null&&bn.memoizedState.tag&1){if(y.flags|=2048,Fu(9,{destroy:void 0},YI.bind(null,y,T,p,u),null),$t===null)throw Error(r(349));O||(lo&127)!==0||WI(y,u,p)}return p}function WI(l,u,p){l.flags|=16384,l={getSnapshot:u,value:p},u=Ye.updateQueue,u===null?(u=Rv(),Ye.updateQueue=u,u.stores=[l]):(p=u.stores,p===null?u.stores=[l]:p.push(l))}function YI(l,u,p,y){u.value=p,u.getSnapshot=y,QI(u)&&ZI(l)}function XI(l,u,p){return p(function(){QI(u)&&ZI(l)})}function QI(l){var u=l.getSnapshot;l=l.value;try{var p=u();return!Ur(l,p)}catch{return!0}}function ZI(l){var u=Hl(l,2);u!==null&&Or(u,l,2)}function hS(l){var u=mr();if(typeof l=="function"){var p=l;if(l=p(),ec){Fr(!0);try{p()}finally{Fr(!1)}}}return u.memoizedState=u.baseState=l,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:l},u}function JI(l,u,p,y){return l.baseState=p,fS(l,kt,typeof y=="function"?y:co)}function Fae(l,u,p,y,T){if(Lv(l))throw Error(r(485));if(l=u.action,l!==null){var O={payload:T,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){O.listeners.push(B)}};k.T!==null?p(!0):O.isTransition=!1,y(O),p=u.pending,p===null?(O.next=u.pending=O,eL(u,O)):(O.next=p.next,u.pending=p.next=O)}}function eL(l,u){var p=u.action,y=u.payload,T=l.state;if(u.isTransition){var O=k.T,B={};k.T=B;try{var Y=p(T,y),re=k.S;re!==null&&re(B,Y),tL(l,u,Y)}catch(fe){pS(l,u,fe)}finally{O!==null&&B.types!==null&&(O.types=B.types),k.T=O}}else try{O=p(T,y),tL(l,u,O)}catch(fe){pS(l,u,fe)}}function tL(l,u,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(y){nL(l,u,y)},function(y){return pS(l,u,y)}):nL(l,u,p)}function nL(l,u,p){u.status="fulfilled",u.value=p,rL(u),l.state=p,u=l.pending,u!==null&&(p=u.next,p===u?l.pending=null:(p=p.next,u.next=p,eL(l,p)))}function pS(l,u,p){var y=l.pending;if(l.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=p,rL(u),u=u.next;while(u!==y)}l.action=null}function rL(l){l=l.listeners;for(var u=0;u<l.length;u++)(0,l[u])()}function iL(l,u){return u}function aL(l,u){if(pt){var p=$t.formState;if(p!==null){e:{var y=Ye;if(pt){if(Kt){t:{for(var T=Kt,O=bi;T.nodeType!==8;){if(!O){T=null;break t}if(T=wi(T.nextSibling),T===null){T=null;break t}}O=T.data,T=O==="F!"||O==="F"?T:null}if(T){Kt=wi(T.nextSibling),y=T.data==="F!";break e}}vs(y)}y=!1}y&&(u=p[0])}}return p=mr(),p.memoizedState=p.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:iL,lastRenderedState:u},p.queue=y,p=EL.bind(null,Ye,y),y.dispatch=p,y=hS(!1),O=xS.bind(null,Ye,!1,y.queue),y=mr(),T={state:u,dispatch:null,action:l,pending:null},y.queue=T,p=Fae.bind(null,Ye,T,O,p),T.dispatch=p,y.memoizedState=l,[u,p,!1]}function oL(l){var u=mn();return sL(u,kt,l)}function sL(l,u,p){if(u=fS(l,u,iL)[0],l=kv(co)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var y=Ih(u)}catch(B){throw B===Lu?Ev:B}else y=u;u=mn();var T=u.queue,O=T.dispatch;return p!==u.memoizedState&&(Ye.flags|=2048,Fu(9,{destroy:void 0},Vae.bind(null,T,p),null)),[y,O,l]}function Vae(l,u){l.action=u}function lL(l){var u=mn(),p=kt;if(p!==null)return sL(u,p,l);mn(),u=u.memoizedState,p=mn();var y=p.queue.dispatch;return p.memoizedState=l,[u,y,!1]}function Fu(l,u,p,y){return l={tag:l,create:p,deps:y,inst:u,next:null},u=Ye.updateQueue,u===null&&(u=Rv(),Ye.updateQueue=u),p=u.lastEffect,p===null?u.lastEffect=l.next=l:(y=p.next,p.next=l,l.next=y,u.lastEffect=l),l}function cL(){return mn().memoizedState}function Dv(l,u,p,y){var T=mr();Ye.flags|=l,T.memoizedState=Fu(1|u,{destroy:void 0},p,y===void 0?null:y)}function Iv(l,u,p,y){var T=mn();y=y===void 0?null:y;var O=T.memoizedState.inst;kt!==null&&y!==null&&aS(y,kt.memoizedState.deps)?T.memoizedState=Fu(u,O,p,y):(Ye.flags|=l,T.memoizedState=Fu(1|u,O,p,y))}function uL(l,u){Dv(8390656,8,l,u)}function mS(l,u){Iv(2048,8,l,u)}function Uae(l){Ye.flags|=4;var u=Ye.updateQueue;if(u===null)u=Rv(),Ye.updateQueue=u,u.events=[l];else{var p=u.events;p===null?u.events=[l]:p.push(l)}}function fL(l){var u=mn().memoizedState;return Uae({ref:u,nextImpl:l}),function(){if((At&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}function dL(l,u){return Iv(4,2,l,u)}function hL(l,u){return Iv(4,4,l,u)}function pL(l,u){if(typeof u=="function"){l=l();var p=u(l);return function(){typeof p=="function"?p():u(null)}}if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function mL(l,u,p){p=p!=null?p.concat([l]):null,Iv(4,4,pL.bind(null,u,l),p)}function gS(){}function gL(l,u){var p=mn();u=u===void 0?null:u;var y=p.memoizedState;return u!==null&&aS(u,y[1])?y[0]:(p.memoizedState=[l,u],l)}function vL(l,u){var p=mn();u=u===void 0?null:u;var y=p.memoizedState;if(u!==null&&aS(u,y[1]))return y[0];if(y=l(),ec){Fr(!0);try{l()}finally{Fr(!1)}}return p.memoizedState=[y,u],y}function vS(l,u,p){return p===void 0||(lo&1073741824)!==0&&(ut&261930)===0?l.memoizedState=u:(l.memoizedState=p,l=y$(),Ye.lanes|=l,Cs|=l,p)}function yL(l,u,p,y){return Ur(p,u)?p:Bu.current!==null?(l=vS(l,p,y),Ur(l,u)||(xn=!0),l):(lo&42)===0||(lo&1073741824)!==0&&(ut&261930)===0?(xn=!0,l.memoizedState=p):(l=y$(),Ye.lanes|=l,Cs|=l,u)}function bL(l,u,p,y,T){var O=z.p;z.p=O!==0&&8>O?O:8;var B=k.T,Y={};k.T=Y,xS(l,!1,u,p);try{var re=T(),fe=k.S;if(fe!==null&&fe(Y,re),re!==null&&typeof re=="object"&&typeof re.then=="function"){var pe=Bae(re,y);Lh(l,u,pe,Xr(l))}else Lh(l,u,y,Xr(l))}catch(ye){Lh(l,u,{then:function(){},status:"rejected",reason:ye},Xr())}finally{z.p=O,B!==null&&Y.types!==null&&(B.types=Y.types),k.T=B}}function Hae(){}function yS(l,u,p,y){if(l.tag!==5)throw Error(r(476));var T=xL(l).queue;bL(l,T,u,H,p===null?Hae:function(){return wL(l),p(y)})}function xL(l){var u=l.memoizedState;if(u!==null)return u;u={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:H},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:p},next:null},l.memoizedState=u,l=l.alternate,l!==null&&(l.memoizedState=u),u}function wL(l){var u=xL(l);u.next===null&&(u=l.alternate.memoizedState),Lh(l,u.next.queue,{},Xr())}function bS(){return Wn(ep)}function SL(){return mn().memoizedState}function _L(){return mn().memoizedState}function Gae(l){for(var u=l.return;u!==null;){switch(u.tag){case 24:case 3:var p=Xr();l=xs(p);var y=ws(u,l,p);y!==null&&(Or(y,u,p),Rh(y,u,p)),u={cache:W1()},l.payload=u;return}u=u.return}}function Kae(l,u,p){var y=Xr();p={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Lv(l)?AL(u,p):(p=L1(l,u,p,y),p!==null&&(Or(p,l,y),CL(p,u,y)))}function EL(l,u,p){var y=Xr();Lh(l,u,p,y)}function Lh(l,u,p,y){var T={lane:y,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Lv(l))AL(u,T);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=u.lastRenderedReducer,O!==null))try{var B=u.lastRenderedState,Y=O(B,p);if(T.hasEagerState=!0,T.eagerState=Y,Ur(Y,B))return vv(l,u,T,0),$t===null&&gv(),!1}catch{}finally{}if(p=L1(l,u,T,y),p!==null)return Or(p,l,y),CL(p,u,y),!0}return!1}function xS(l,u,p,y){if(y={lane:2,revertLane:ZS(),gesture:null,action:y,hasEagerState:!1,eagerState:null,next:null},Lv(l)){if(u)throw Error(r(479))}else u=L1(l,p,y,2),u!==null&&Or(u,l,2)}function Lv(l){var u=l.alternate;return l===Ye||u!==null&&u===Ye}function AL(l,u){qu=Ov=!0;var p=l.pending;p===null?u.next=u:(u.next=p.next,p.next=u),l.pending=u}function CL(l,u,p){if((p&4194048)!==0){var y=u.lanes;y&=l.pendingLanes,p|=y,u.lanes=p,ar(l,p)}}var $h={readContext:Wn,use:Pv,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useLayoutEffect:sn,useInsertionEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useSyncExternalStore:sn,useId:sn,useHostTransitionStatus:sn,useFormState:sn,useActionState:sn,useOptimistic:sn,useMemoCache:sn,useCacheRefresh:sn};$h.useEffectEvent=sn;var TL={readContext:Wn,use:Pv,useCallback:function(l,u){return mr().memoizedState=[l,u===void 0?null:u],l},useContext:Wn,useEffect:uL,useImperativeHandle:function(l,u,p){p=p!=null?p.concat([l]):null,Dv(4194308,4,pL.bind(null,u,l),p)},useLayoutEffect:function(l,u){return Dv(4194308,4,l,u)},useInsertionEffect:function(l,u){Dv(4,2,l,u)},useMemo:function(l,u){var p=mr();u=u===void 0?null:u;var y=l();if(ec){Fr(!0);try{l()}finally{Fr(!1)}}return p.memoizedState=[y,u],y},useReducer:function(l,u,p){var y=mr();if(p!==void 0){var T=p(u);if(ec){Fr(!0);try{p(u)}finally{Fr(!1)}}}else T=u;return y.memoizedState=y.baseState=T,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:T},y.queue=l,l=l.dispatch=Kae.bind(null,Ye,l),[y.memoizedState,l]},useRef:function(l){var u=mr();return l={current:l},u.memoizedState=l},useState:function(l){l=hS(l);var u=l.queue,p=EL.bind(null,Ye,u);return u.dispatch=p,[l.memoizedState,p]},useDebugValue:gS,useDeferredValue:function(l,u){var p=mr();return vS(p,l,u)},useTransition:function(){var l=hS(!1);return l=bL.bind(null,Ye,l.queue,!0,!1),mr().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,u,p){var y=Ye,T=mr();if(pt){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),$t===null)throw Error(r(349));(ut&127)!==0||WI(y,u,p)}T.memoizedState=p;var O={value:p,getSnapshot:u};return T.queue=O,uL(XI.bind(null,y,O,l),[l]),y.flags|=2048,Fu(9,{destroy:void 0},YI.bind(null,y,O,p,u),null),p},useId:function(){var l=mr(),u=$t.identifierPrefix;if(pt){var p=Sa,y=wa;p=(y&~(1<<32-$n(y)-1)).toString(32)+p,u="_"+u+"R_"+p,p=Mv++,0<p&&(u+="H"+p.toString(32)),u+="_"}else p=qae++,u="_"+u+"r_"+p.toString(32)+"_";return l.memoizedState=u},useHostTransitionStatus:bS,useFormState:aL,useActionState:aL,useOptimistic:function(l){var u=mr();u.memoizedState=u.baseState=l;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=p,u=xS.bind(null,Ye,!0,p),p.dispatch=u,[l,u]},useMemoCache:uS,useCacheRefresh:function(){return mr().memoizedState=Gae.bind(null,Ye)},useEffectEvent:function(l){var u=mr(),p={impl:l};return u.memoizedState=p,function(){if((At&2)!==0)throw Error(r(440));return p.impl.apply(void 0,arguments)}}},wS={readContext:Wn,use:Pv,useCallback:gL,useContext:Wn,useEffect:mS,useImperativeHandle:mL,useInsertionEffect:dL,useLayoutEffect:hL,useMemo:vL,useReducer:kv,useRef:cL,useState:function(){return kv(co)},useDebugValue:gS,useDeferredValue:function(l,u){var p=mn();return yL(p,kt.memoizedState,l,u)},useTransition:function(){var l=kv(co)[0],u=mn().memoizedState;return[typeof l=="boolean"?l:Ih(l),u]},useSyncExternalStore:KI,useId:SL,useHostTransitionStatus:bS,useFormState:oL,useActionState:oL,useOptimistic:function(l,u){var p=mn();return JI(p,kt,l,u)},useMemoCache:uS,useCacheRefresh:_L};wS.useEffectEvent=fL;var jL={readContext:Wn,use:Pv,useCallback:gL,useContext:Wn,useEffect:mS,useImperativeHandle:mL,useInsertionEffect:dL,useLayoutEffect:hL,useMemo:vL,useReducer:dS,useRef:cL,useState:function(){return dS(co)},useDebugValue:gS,useDeferredValue:function(l,u){var p=mn();return kt===null?vS(p,l,u):yL(p,kt.memoizedState,l,u)},useTransition:function(){var l=dS(co)[0],u=mn().memoizedState;return[typeof l=="boolean"?l:Ih(l),u]},useSyncExternalStore:KI,useId:SL,useHostTransitionStatus:bS,useFormState:lL,useActionState:lL,useOptimistic:function(l,u){var p=mn();return kt!==null?JI(p,kt,l,u):(p.baseState=l,[l,p.queue.dispatch])},useMemoCache:uS,useCacheRefresh:_L};jL.useEffectEvent=fL;function SS(l,u,p,y){u=l.memoizedState,p=p(y,u),p=p==null?u:d({},u,p),l.memoizedState=p,l.lanes===0&&(l.updateQueue.baseState=p)}var _S={enqueueSetState:function(l,u,p){l=l._reactInternals;var y=Xr(),T=xs(y);T.payload=u,p!=null&&(T.callback=p),u=ws(l,T,y),u!==null&&(Or(u,l,y),Rh(u,l,y))},enqueueReplaceState:function(l,u,p){l=l._reactInternals;var y=Xr(),T=xs(y);T.tag=1,T.payload=u,p!=null&&(T.callback=p),u=ws(l,T,y),u!==null&&(Or(u,l,y),Rh(u,l,y))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var p=Xr(),y=xs(p);y.tag=2,u!=null&&(y.callback=u),u=ws(l,y,p),u!==null&&(Or(u,l,p),Rh(u,l,p))}};function NL(l,u,p,y,T,O,B){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(y,O,B):u.prototype&&u.prototype.isPureReactComponent?!Eh(p,y)||!Eh(T,O):!0}function OL(l,u,p,y){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(p,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(p,y),u.state!==l&&_S.enqueueReplaceState(u,u.state,null)}function tc(l,u){var p=u;if("ref"in u){p={};for(var y in u)y!=="ref"&&(p[y]=u[y])}if(l=l.defaultProps){p===u&&(p=d({},p));for(var T in l)p[T]===void 0&&(p[T]=l[T])}return p}function ML(l){mv(l)}function RL(l){console.error(l)}function PL(l){mv(l)}function $v(l,u){try{var p=l.onUncaughtError;p(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function kL(l,u,p){try{var y=l.onCaughtError;y(p.value,{componentStack:p.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(T){setTimeout(function(){throw T})}}function ES(l,u,p){return p=xs(p),p.tag=3,p.payload={element:null},p.callback=function(){$v(l,u)},p}function DL(l){return l=xs(l),l.tag=3,l}function IL(l,u,p,y){var T=p.type.getDerivedStateFromError;if(typeof T=="function"){var O=y.value;l.payload=function(){return T(O)},l.callback=function(){kL(u,p,y)}}var B=p.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(l.callback=function(){kL(u,p,y),typeof T!="function"&&(Ts===null?Ts=new Set([this]):Ts.add(this));var Y=y.stack;this.componentDidCatch(y.value,{componentStack:Y!==null?Y:""})})}function Wae(l,u,p,y,T){if(p.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=p.alternate,u!==null&&ku(u,p,T,!0),p=Gr.current,p!==null){switch(p.tag){case 31:case 13:return xi===null?Xv():p.alternate===null&&ln===0&&(ln=3),p.flags&=-257,p.flags|=65536,p.lanes=T,y===Av?p.flags|=16384:(u=p.updateQueue,u===null?p.updateQueue=new Set([y]):u.add(y),YS(l,y,T)),!1;case 22:return p.flags|=65536,y===Av?p.flags|=16384:(u=p.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},p.updateQueue=u):(p=u.retryQueue,p===null?u.retryQueue=new Set([y]):p.add(y)),YS(l,y,T)),!1}throw Error(r(435,p.tag))}return YS(l,y,T),Xv(),!1}if(pt)return u=Gr.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=T,y!==V1&&(l=Error(r(422),{cause:y}),Th(gi(l,p)))):(y!==V1&&(u=Error(r(423),{cause:y}),Th(gi(u,p))),l=l.current.alternate,l.flags|=65536,T&=-T,l.lanes|=T,y=gi(y,p),T=ES(l.stateNode,y,T),eS(l,T),ln!==4&&(ln=2)),!1;var O=Error(r(520),{cause:y});if(O=gi(O,p),Gh===null?Gh=[O]:Gh.push(O),ln!==4&&(ln=2),u===null)return!0;y=gi(y,p),p=u;do{switch(p.tag){case 3:return p.flags|=65536,l=T&-T,p.lanes|=l,l=ES(p.stateNode,y,l),eS(p,l),!1;case 1:if(u=p.type,O=p.stateNode,(p.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(Ts===null||!Ts.has(O))))return p.flags|=65536,T&=-T,p.lanes|=T,T=DL(T),IL(T,l,p,y),eS(p,T),!1}p=p.return}while(p!==null);return!1}var AS=Error(r(461)),xn=!1;function Yn(l,u,p,y){u.child=l===null?qI(u,null,p,y):Jl(u,l.child,p,y)}function LL(l,u,p,y,T){p=p.render;var O=u.ref;if("ref"in y){var B={};for(var Y in y)Y!=="ref"&&(B[Y]=y[Y])}else B=y;return Yl(u),y=oS(l,u,p,B,O,T),Y=sS(),l!==null&&!xn?(lS(l,u,T),uo(l,u,T)):(pt&&Y&&z1(u),u.flags|=1,Yn(l,u,y,T),u.child)}function $L(l,u,p,y,T){if(l===null){var O=p.type;return typeof O=="function"&&!$1(O)&&O.defaultProps===void 0&&p.compare===null?(u.tag=15,u.type=O,BL(l,u,O,y,T)):(l=bv(p.type,null,y,u,u.mode,T),l.ref=u.ref,l.return=u,u.child=l)}if(O=l.child,!PS(l,T)){var B=O.memoizedProps;if(p=p.compare,p=p!==null?p:Eh,p(B,y)&&l.ref===u.ref)return uo(l,u,T)}return u.flags|=1,l=io(O,y),l.ref=u.ref,l.return=u,u.child=l}function BL(l,u,p,y,T){if(l!==null){var O=l.memoizedProps;if(Eh(O,y)&&l.ref===u.ref)if(xn=!1,u.pendingProps=y=O,PS(l,T))(l.flags&131072)!==0&&(xn=!0);else return u.lanes=l.lanes,uo(l,u,T)}return CS(l,u,p,y,T)}function qL(l,u,p,y){var T=y.children,O=l!==null?l.memoizedState:null;if(l===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),y.mode==="hidden"){if((u.flags&128)!==0){if(O=O!==null?O.baseLanes|p:p,l!==null){for(y=u.child=l.child,T=0;y!==null;)T=T|y.lanes|y.childLanes,y=y.sibling;y=T&~O}else y=0,u.child=null;return zL(l,u,O,p,y)}if((p&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},l!==null&&_v(u,O!==null?O.cachePool:null),O!==null?VI(u,O):nS(),UI(u);else return y=u.lanes=536870912,zL(l,u,O!==null?O.baseLanes|p:p,p,y)}else O!==null?(_v(u,O.cachePool),VI(u,O),_s(),u.memoizedState=null):(l!==null&&_v(u,null),nS(),_s());return Yn(l,u,T,p),u.child}function Bh(l,u){return l!==null&&l.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function zL(l,u,p,y,T){var O=X1();return O=O===null?null:{parent:yn._currentValue,pool:O},u.memoizedState={baseLanes:p,cachePool:O},l!==null&&_v(u,null),nS(),UI(u),l!==null&&ku(l,u,y,!0),u.childLanes=T,null}function Bv(l,u){return u=zv({mode:u.mode,children:u.children},l.mode),u.ref=l.ref,l.child=u,u.return=l,u}function FL(l,u,p){return Jl(u,l.child,null,p),l=Bv(u,u.pendingProps),l.flags|=2,Kr(u),u.memoizedState=null,l}function Yae(l,u,p){var y=u.pendingProps,T=(u.flags&128)!==0;if(u.flags&=-129,l===null){if(pt){if(y.mode==="hidden")return l=Bv(u,y),u.lanes=536870912,Bh(null,l);if(iS(u),(l=Kt)?(l=e3(l,bi),l=l!==null&&l.data==="&"?l:null,l!==null&&(u.memoizedState={dehydrated:l,treeContext:ms!==null?{id:wa,overflow:Sa}:null,retryLane:536870912,hydrationErrors:null},p=AI(l),p.return=u,u.child=p,Kn=u,Kt=null)):l=null,l===null)throw vs(u);return u.lanes=536870912,null}return Bv(u,y)}var O=l.memoizedState;if(O!==null){var B=O.dehydrated;if(iS(u),T)if(u.flags&256)u.flags&=-257,u=FL(l,u,p);else if(u.memoizedState!==null)u.child=l.child,u.flags|=128,u=null;else throw Error(r(558));else if(xn||ku(l,u,p,!1),T=(p&l.childLanes)!==0,xn||T){if(y=$t,y!==null&&(B=or(y,p),B!==0&&B!==O.retryLane))throw O.retryLane=B,Hl(l,B),Or(y,l,B),AS;Xv(),u=FL(l,u,p)}else l=O.treeContext,Kt=wi(B.nextSibling),Kn=u,pt=!0,gs=null,bi=!1,l!==null&&jI(u,l),u=Bv(u,y),u.flags|=4096;return u}return l=io(l.child,{mode:y.mode,children:y.children}),l.ref=u.ref,u.child=l,l.return=u,l}function qv(l,u){var p=u.ref;if(p===null)l!==null&&l.ref!==null&&(u.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(l===null||l.ref!==p)&&(u.flags|=4194816)}}function CS(l,u,p,y,T){return Yl(u),p=oS(l,u,p,y,void 0,T),y=sS(),l!==null&&!xn?(lS(l,u,T),uo(l,u,T)):(pt&&y&&z1(u),u.flags|=1,Yn(l,u,p,T),u.child)}function VL(l,u,p,y,T,O){return Yl(u),u.updateQueue=null,p=GI(u,y,p,T),HI(l),y=sS(),l!==null&&!xn?(lS(l,u,O),uo(l,u,O)):(pt&&y&&z1(u),u.flags|=1,Yn(l,u,p,O),u.child)}function UL(l,u,p,y,T){if(Yl(u),u.stateNode===null){var O=Ou,B=p.contextType;typeof B=="object"&&B!==null&&(O=Wn(B)),O=new p(y,O),u.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=_S,u.stateNode=O,O._reactInternals=u,O=u.stateNode,O.props=y,O.state=u.memoizedState,O.refs={},Z1(u),B=p.contextType,O.context=typeof B=="object"&&B!==null?Wn(B):Ou,O.state=u.memoizedState,B=p.getDerivedStateFromProps,typeof B=="function"&&(SS(u,p,B,y),O.state=u.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(B=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),B!==O.state&&_S.enqueueReplaceState(O,O.state,null),kh(u,y,O,T),Ph(),O.state=u.memoizedState),typeof O.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(l===null){O=u.stateNode;var Y=u.memoizedProps,re=tc(p,Y);O.props=re;var fe=O.context,pe=p.contextType;B=Ou,typeof pe=="object"&&pe!==null&&(B=Wn(pe));var ye=p.getDerivedStateFromProps;pe=typeof ye=="function"||typeof O.getSnapshotBeforeUpdate=="function",Y=u.pendingProps!==Y,pe||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(Y||fe!==B)&&OL(u,O,y,B),bs=!1;var de=u.memoizedState;O.state=de,kh(u,y,O,T),Ph(),fe=u.memoizedState,Y||de!==fe||bs?(typeof ye=="function"&&(SS(u,p,ye,y),fe=u.memoizedState),(re=bs||NL(u,p,re,y,de,fe,B))?(pe||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(u.flags|=4194308)):(typeof O.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=fe),O.props=y,O.state=fe,O.context=B,y=re):(typeof O.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{O=u.stateNode,J1(l,u),B=u.memoizedProps,pe=tc(p,B),O.props=pe,ye=u.pendingProps,de=O.context,fe=p.contextType,re=Ou,typeof fe=="object"&&fe!==null&&(re=Wn(fe)),Y=p.getDerivedStateFromProps,(fe=typeof Y=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(B!==ye||de!==re)&&OL(u,O,y,re),bs=!1,de=u.memoizedState,O.state=de,kh(u,y,O,T),Ph();var he=u.memoizedState;B!==ye||de!==he||bs||l!==null&&l.dependencies!==null&&wv(l.dependencies)?(typeof Y=="function"&&(SS(u,p,Y,y),he=u.memoizedState),(pe=bs||NL(u,p,pe,y,de,he,re)||l!==null&&l.dependencies!==null&&wv(l.dependencies))?(fe||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(y,he,re),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(y,he,re)),typeof O.componentDidUpdate=="function"&&(u.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof O.componentDidUpdate!="function"||B===l.memoizedProps&&de===l.memoizedState||(u.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||B===l.memoizedProps&&de===l.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=he),O.props=y,O.state=he,O.context=re,y=pe):(typeof O.componentDidUpdate!="function"||B===l.memoizedProps&&de===l.memoizedState||(u.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||B===l.memoizedProps&&de===l.memoizedState||(u.flags|=1024),y=!1)}return O=y,qv(l,u),y=(u.flags&128)!==0,O||y?(O=u.stateNode,p=y&&typeof p.getDerivedStateFromError!="function"?null:O.render(),u.flags|=1,l!==null&&y?(u.child=Jl(u,l.child,null,T),u.child=Jl(u,null,p,T)):Yn(l,u,p,T),u.memoizedState=O.state,l=u.child):l=uo(l,u,T),l}function HL(l,u,p,y){return Kl(),u.flags|=256,Yn(l,u,p,y),u.child}var TS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jS(l){return{baseLanes:l,cachePool:kI()}}function NS(l,u,p){return l=l!==null?l.childLanes&~p:0,u&&(l|=Yr),l}function GL(l,u,p){var y=u.pendingProps,T=!1,O=(u.flags&128)!==0,B;if((B=O)||(B=l!==null&&l.memoizedState===null?!1:(pn.current&2)!==0),B&&(T=!0,u.flags&=-129),B=(u.flags&32)!==0,u.flags&=-33,l===null){if(pt){if(T?Ss(u):_s(),(l=Kt)?(l=e3(l,bi),l=l!==null&&l.data!=="&"?l:null,l!==null&&(u.memoizedState={dehydrated:l,treeContext:ms!==null?{id:wa,overflow:Sa}:null,retryLane:536870912,hydrationErrors:null},p=AI(l),p.return=u,u.child=p,Kn=u,Kt=null)):l=null,l===null)throw vs(u);return f_(l)?u.lanes=32:u.lanes=536870912,null}var Y=y.children;return y=y.fallback,T?(_s(),T=u.mode,Y=zv({mode:"hidden",children:Y},T),y=Gl(y,T,p,null),Y.return=u,y.return=u,Y.sibling=y,u.child=Y,y=u.child,y.memoizedState=jS(p),y.childLanes=NS(l,B,p),u.memoizedState=TS,Bh(null,y)):(Ss(u),OS(u,Y))}var re=l.memoizedState;if(re!==null&&(Y=re.dehydrated,Y!==null)){if(O)u.flags&256?(Ss(u),u.flags&=-257,u=MS(l,u,p)):u.memoizedState!==null?(_s(),u.child=l.child,u.flags|=128,u=null):(_s(),Y=y.fallback,T=u.mode,y=zv({mode:"visible",children:y.children},T),Y=Gl(Y,T,p,null),Y.flags|=2,y.return=u,Y.return=u,y.sibling=Y,u.child=y,Jl(u,l.child,null,p),y=u.child,y.memoizedState=jS(p),y.childLanes=NS(l,B,p),u.memoizedState=TS,u=Bh(null,y));else if(Ss(u),f_(Y)){if(B=Y.nextSibling&&Y.nextSibling.dataset,B)var fe=B.dgst;B=fe,y=Error(r(419)),y.stack="",y.digest=B,Th({value:y,source:null,stack:null}),u=MS(l,u,p)}else if(xn||ku(l,u,p,!1),B=(p&l.childLanes)!==0,xn||B){if(B=$t,B!==null&&(y=or(B,p),y!==0&&y!==re.retryLane))throw re.retryLane=y,Hl(l,y),Or(B,l,y),AS;u_(Y)||Xv(),u=MS(l,u,p)}else u_(Y)?(u.flags|=192,u.child=l.child,u=null):(l=re.treeContext,Kt=wi(Y.nextSibling),Kn=u,pt=!0,gs=null,bi=!1,l!==null&&jI(u,l),u=OS(u,y.children),u.flags|=4096);return u}return T?(_s(),Y=y.fallback,T=u.mode,re=l.child,fe=re.sibling,y=io(re,{mode:"hidden",children:y.children}),y.subtreeFlags=re.subtreeFlags&65011712,fe!==null?Y=io(fe,Y):(Y=Gl(Y,T,p,null),Y.flags|=2),Y.return=u,y.return=u,y.sibling=Y,u.child=y,Bh(null,y),y=u.child,Y=l.child.memoizedState,Y===null?Y=jS(p):(T=Y.cachePool,T!==null?(re=yn._currentValue,T=T.parent!==re?{parent:re,pool:re}:T):T=kI(),Y={baseLanes:Y.baseLanes|p,cachePool:T}),y.memoizedState=Y,y.childLanes=NS(l,B,p),u.memoizedState=TS,Bh(l.child,y)):(Ss(u),p=l.child,l=p.sibling,p=io(p,{mode:"visible",children:y.children}),p.return=u,p.sibling=null,l!==null&&(B=u.deletions,B===null?(u.deletions=[l],u.flags|=16):B.push(l)),u.child=p,u.memoizedState=null,p)}function OS(l,u){return u=zv({mode:"visible",children:u},l.mode),u.return=l,l.child=u}function zv(l,u){return l=Hr(22,l,null,u),l.lanes=0,l}function MS(l,u,p){return Jl(u,l.child,null,p),l=OS(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function KL(l,u,p){l.lanes|=u;var y=l.alternate;y!==null&&(y.lanes|=u),G1(l.return,u,p)}function RS(l,u,p,y,T,O){var B=l.memoizedState;B===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:p,tailMode:T,treeForkCount:O}:(B.isBackwards=u,B.rendering=null,B.renderingStartTime=0,B.last=y,B.tail=p,B.tailMode=T,B.treeForkCount=O)}function WL(l,u,p){var y=u.pendingProps,T=y.revealOrder,O=y.tail;y=y.children;var B=pn.current,Y=(B&2)!==0;if(Y?(B=B&1|2,u.flags|=128):B&=1,X(pn,B),Yn(l,u,y,p),y=pt?Ch:0,!Y&&l!==null&&(l.flags&128)!==0)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&KL(l,p,u);else if(l.tag===19)KL(l,p,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(T){case"forwards":for(p=u.child,T=null;p!==null;)l=p.alternate,l!==null&&Nv(l)===null&&(T=p),p=p.sibling;p=T,p===null?(T=u.child,u.child=null):(T=p.sibling,p.sibling=null),RS(u,!1,T,p,O,y);break;case"backwards":case"unstable_legacy-backwards":for(p=null,T=u.child,u.child=null;T!==null;){if(l=T.alternate,l!==null&&Nv(l)===null){u.child=T;break}l=T.sibling,T.sibling=p,p=T,T=l}RS(u,!0,p,null,O,y);break;case"together":RS(u,!1,null,null,void 0,y);break;default:u.memoizedState=null}return u.child}function uo(l,u,p){if(l!==null&&(u.dependencies=l.dependencies),Cs|=u.lanes,(p&u.childLanes)===0)if(l!==null){if(ku(l,u,p,!1),(p&u.childLanes)===0)return null}else return null;if(l!==null&&u.child!==l.child)throw Error(r(153));if(u.child!==null){for(l=u.child,p=io(l,l.pendingProps),u.child=p,p.return=u;l.sibling!==null;)l=l.sibling,p=p.sibling=io(l,l.pendingProps),p.return=u;p.sibling=null}return u.child}function PS(l,u){return(l.lanes&u)!==0?!0:(l=l.dependencies,!!(l!==null&&wv(l)))}function Xae(l,u,p){switch(u.tag){case 3:te(u,u.stateNode.containerInfo),ys(u,yn,l.memoizedState.cache),Kl();break;case 27:case 5:se(u);break;case 4:te(u,u.stateNode.containerInfo);break;case 10:ys(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,iS(u),null;break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(Ss(u),u.flags|=128,null):(p&u.child.childLanes)!==0?GL(l,u,p):(Ss(u),l=uo(l,u,p),l!==null?l.sibling:null);Ss(u);break;case 19:var T=(l.flags&128)!==0;if(y=(p&u.childLanes)!==0,y||(ku(l,u,p,!1),y=(p&u.childLanes)!==0),T){if(y)return WL(l,u,p);u.flags|=128}if(T=u.memoizedState,T!==null&&(T.rendering=null,T.tail=null,T.lastEffect=null),X(pn,pn.current),y)break;return null;case 22:return u.lanes=0,qL(l,u,p,u.pendingProps);case 24:ys(u,yn,l.memoizedState.cache)}return uo(l,u,p)}function YL(l,u,p){if(l!==null)if(l.memoizedProps!==u.pendingProps)xn=!0;else{if(!PS(l,p)&&(u.flags&128)===0)return xn=!1,Xae(l,u,p);xn=(l.flags&131072)!==0}else xn=!1,pt&&(u.flags&1048576)!==0&&TI(u,Ch,u.index);switch(u.lanes=0,u.tag){case 16:e:{var y=u.pendingProps;if(l=Ql(u.elementType),u.type=l,typeof l=="function")$1(l)?(y=tc(l,y),u.tag=1,u=UL(null,u,l,y,p)):(u.tag=0,u=CS(null,u,l,y,p));else{if(l!=null){var T=l.$$typeof;if(T===A){u.tag=11,u=LL(null,u,l,y,p);break e}else if(T===M){u.tag=14,u=$L(null,u,l,y,p);break e}}throw u=I(l)||l,Error(r(306,u,""))}}return u;case 0:return CS(l,u,u.type,u.pendingProps,p);case 1:return y=u.type,T=tc(y,u.pendingProps),UL(l,u,y,T,p);case 3:e:{if(te(u,u.stateNode.containerInfo),l===null)throw Error(r(387));y=u.pendingProps;var O=u.memoizedState;T=O.element,J1(l,u),kh(u,y,null,p);var B=u.memoizedState;if(y=B.cache,ys(u,yn,y),y!==O.cache&&K1(u,[yn],p,!0),Ph(),y=B.element,O.isDehydrated)if(O={element:y,isDehydrated:!1,cache:B.cache},u.updateQueue.baseState=O,u.memoizedState=O,u.flags&256){u=HL(l,u,y,p);break e}else if(y!==T){T=gi(Error(r(424)),u),Th(T),u=HL(l,u,y,p);break e}else{switch(l=u.stateNode.containerInfo,l.nodeType){case 9:l=l.body;break;default:l=l.nodeName==="HTML"?l.ownerDocument.body:l}for(Kt=wi(l.firstChild),Kn=u,pt=!0,gs=null,bi=!0,p=qI(u,null,y,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(Kl(),y===T){u=uo(l,u,p);break e}Yn(l,u,y,p)}u=u.child}return u;case 26:return qv(l,u),l===null?(p=o3(u.type,null,u.pendingProps,null))?u.memoizedState=p:pt||(p=u.type,l=u.pendingProps,y=ry(J.current).createElement(p),y[jn]=u,y[sr]=l,Xn(y,p,l),vn(y),u.stateNode=y):u.memoizedState=o3(u.type,l.memoizedProps,u.pendingProps,l.memoizedState),null;case 27:return se(u),l===null&&pt&&(y=u.stateNode=r3(u.type,u.pendingProps,J.current),Kn=u,bi=!0,T=Kt,Ms(u.type)?(d_=T,Kt=wi(y.firstChild)):Kt=T),Yn(l,u,u.pendingProps.children,p),qv(l,u),l===null&&(u.flags|=4194304),u.child;case 5:return l===null&&pt&&((T=y=Kt)&&(y=Coe(y,u.type,u.pendingProps,bi),y!==null?(u.stateNode=y,Kn=u,Kt=wi(y.firstChild),bi=!1,T=!0):T=!1),T||vs(u)),se(u),T=u.type,O=u.pendingProps,B=l!==null?l.memoizedProps:null,y=O.children,s_(T,O)?y=null:B!==null&&s_(T,B)&&(u.flags|=32),u.memoizedState!==null&&(T=oS(l,u,zae,null,null,p),ep._currentValue=T),qv(l,u),Yn(l,u,y,p),u.child;case 6:return l===null&&pt&&((l=p=Kt)&&(p=Toe(p,u.pendingProps,bi),p!==null?(u.stateNode=p,Kn=u,Kt=null,l=!0):l=!1),l||vs(u)),null;case 13:return GL(l,u,p);case 4:return te(u,u.stateNode.containerInfo),y=u.pendingProps,l===null?u.child=Jl(u,null,y,p):Yn(l,u,y,p),u.child;case 11:return LL(l,u,u.type,u.pendingProps,p);case 7:return Yn(l,u,u.pendingProps,p),u.child;case 8:return Yn(l,u,u.pendingProps.children,p),u.child;case 12:return Yn(l,u,u.pendingProps.children,p),u.child;case 10:return y=u.pendingProps,ys(u,u.type,y.value),Yn(l,u,y.children,p),u.child;case 9:return T=u.type._context,y=u.pendingProps.children,Yl(u),T=Wn(T),y=y(T),u.flags|=1,Yn(l,u,y,p),u.child;case 14:return $L(l,u,u.type,u.pendingProps,p);case 15:return BL(l,u,u.type,u.pendingProps,p);case 19:return WL(l,u,p);case 31:return Yae(l,u,p);case 22:return qL(l,u,p,u.pendingProps);case 24:return Yl(u),y=Wn(yn),l===null?(T=X1(),T===null&&(T=$t,O=W1(),T.pooledCache=O,O.refCount++,O!==null&&(T.pooledCacheLanes|=p),T=O),u.memoizedState={parent:y,cache:T},Z1(u),ys(u,yn,T)):((l.lanes&p)!==0&&(J1(l,u),kh(u,null,null,p),Ph()),T=l.memoizedState,O=u.memoizedState,T.parent!==y?(T={parent:y,cache:y},u.memoizedState=T,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=T),ys(u,yn,y)):(y=O.cache,ys(u,yn,y),y!==T.cache&&K1(u,[yn],p,!0))),Yn(l,u,u.pendingProps.children,p),u.child;case 29:throw u.pendingProps}throw Error(r(156,u.tag))}function fo(l){l.flags|=4}function kS(l,u,p,y,T){if((u=(l.mode&32)!==0)&&(u=!1),u){if(l.flags|=16777216,(T&335544128)===T)if(l.stateNode.complete)l.flags|=8192;else if(S$())l.flags|=8192;else throw Zl=Av,Q1}else l.flags&=-16777217}function XL(l,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)l.flags&=-16777217;else if(l.flags|=16777216,!f3(u))if(S$())l.flags|=8192;else throw Zl=Av,Q1}function Fv(l,u){u!==null&&(l.flags|=4),l.flags&16384&&(u=l.tag!==22?Bn():536870912,l.lanes|=u,Gu|=u)}function qh(l,u){if(!pt)switch(l.tailMode){case"hidden":u=l.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?l.tail=null:p.sibling=null;break;case"collapsed":p=l.tail;for(var y=null;p!==null;)p.alternate!==null&&(y=p),p=p.sibling;y===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:y.sibling=null}}function Wt(l){var u=l.alternate!==null&&l.alternate.child===l.child,p=0,y=0;if(u)for(var T=l.child;T!==null;)p|=T.lanes|T.childLanes,y|=T.subtreeFlags&65011712,y|=T.flags&65011712,T.return=l,T=T.sibling;else for(T=l.child;T!==null;)p|=T.lanes|T.childLanes,y|=T.subtreeFlags,y|=T.flags,T.return=l,T=T.sibling;return l.subtreeFlags|=y,l.childLanes=p,u}function Qae(l,u,p){var y=u.pendingProps;switch(F1(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(u),null;case 1:return Wt(u),null;case 3:return p=u.stateNode,y=null,l!==null&&(y=l.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),so(yn),ne(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(l===null||l.child===null)&&(Pu(u)?fo(u):l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,U1())),Wt(u),null;case 26:var T=u.type,O=u.memoizedState;return l===null?(fo(u),O!==null?(Wt(u),XL(u,O)):(Wt(u),kS(u,T,null,y,p))):O?O!==l.memoizedState?(fo(u),Wt(u),XL(u,O)):(Wt(u),u.flags&=-16777217):(l=l.memoizedProps,l!==y&&fo(u),Wt(u),kS(u,T,l,y,p)),null;case 27:if(ce(u),p=J.current,T=u.type,l!==null&&u.stateNode!=null)l.memoizedProps!==y&&fo(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return Wt(u),null}l=W.current,Pu(u)?NI(u):(l=r3(T,y,p),u.stateNode=l,fo(u))}return Wt(u),null;case 5:if(ce(u),T=u.type,l!==null&&u.stateNode!=null)l.memoizedProps!==y&&fo(u);else{if(!y){if(u.stateNode===null)throw Error(r(166));return Wt(u),null}if(O=W.current,Pu(u))NI(u);else{var B=ry(J.current);switch(O){case 1:O=B.createElementNS("http://www.w3.org/2000/svg",T);break;case 2:O=B.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;default:switch(T){case"svg":O=B.createElementNS("http://www.w3.org/2000/svg",T);break;case"math":O=B.createElementNS("http://www.w3.org/1998/Math/MathML",T);break;case"script":O=B.createElement("div"),O.innerHTML="<script><\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof y.is=="string"?B.createElement("select",{is:y.is}):B.createElement("select"),y.multiple?O.multiple=!0:y.size&&(O.size=y.size);break;default:O=typeof y.is=="string"?B.createElement(T,{is:y.is}):B.createElement(T)}}O[jn]=u,O[sr]=y;e:for(B=u.child;B!==null;){if(B.tag===5||B.tag===6)O.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===u)break e;for(;B.sibling===null;){if(B.return===null||B.return===u)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}u.stateNode=O;e:switch(Xn(O,T,y),T){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}y&&fo(u)}}return Wt(u),kS(u,u.type,l===null?null:l.memoizedProps,u.pendingProps,p),null;case 6:if(l&&u.stateNode!=null)l.memoizedProps!==y&&fo(u);else{if(typeof y!="string"&&u.stateNode===null)throw Error(r(166));if(l=J.current,Pu(u)){if(l=u.stateNode,p=u.memoizedProps,y=null,T=Kn,T!==null)switch(T.tag){case 27:case 5:y=T.memoizedProps}l[jn]=u,l=!!(l.nodeValue===p||y!==null&&y.suppressHydrationWarning===!0||G$(l.nodeValue,p)),l||vs(u,!0)}else l=ry(l).createTextNode(y),l[jn]=u,u.stateNode=l}return Wt(u),null;case 31:if(p=u.memoizedState,l===null||l.memoizedState!==null){if(y=Pu(u),p!==null){if(l===null){if(!y)throw Error(r(318));if(l=u.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[jn]=u}else Kl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Wt(u),l=!1}else p=U1(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=p),l=!0;if(!l)return u.flags&256?(Kr(u),u):(Kr(u),null);if((u.flags&128)!==0)throw Error(r(558))}return Wt(u),null;case 13:if(y=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(T=Pu(u),y!==null&&y.dehydrated!==null){if(l===null){if(!T)throw Error(r(318));if(T=u.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(r(317));T[jn]=u}else Kl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Wt(u),T=!1}else T=U1(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=T),T=!0;if(!T)return u.flags&256?(Kr(u),u):(Kr(u),null)}return Kr(u),(u.flags&128)!==0?(u.lanes=p,u):(p=y!==null,l=l!==null&&l.memoizedState!==null,p&&(y=u.child,T=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(T=y.alternate.memoizedState.cachePool.pool),O=null,y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(O=y.memoizedState.cachePool.pool),O!==T&&(y.flags|=2048)),p!==l&&p&&(u.child.flags|=8192),Fv(u,u.updateQueue),Wt(u),null);case 4:return ne(),l===null&&n_(u.stateNode.containerInfo),Wt(u),null;case 10:return so(u.type),Wt(u),null;case 19:if(V(pn),y=u.memoizedState,y===null)return Wt(u),null;if(T=(u.flags&128)!==0,O=y.rendering,O===null)if(T)qh(y,!1);else{if(ln!==0||l!==null&&(l.flags&128)!==0)for(l=u.child;l!==null;){if(O=Nv(l),O!==null){for(u.flags|=128,qh(y,!1),l=O.updateQueue,u.updateQueue=l,Fv(u,l),u.subtreeFlags=0,l=p,p=u.child;p!==null;)EI(p,l),p=p.sibling;return X(pn,pn.current&1|2),pt&&ao(u,y.treeForkCount),u.child}l=l.sibling}y.tail!==null&&Tt()>Kv&&(u.flags|=128,T=!0,qh(y,!1),u.lanes=4194304)}else{if(!T)if(l=Nv(O),l!==null){if(u.flags|=128,T=!0,l=l.updateQueue,u.updateQueue=l,Fv(u,l),qh(y,!0),y.tail===null&&y.tailMode==="hidden"&&!O.alternate&&!pt)return Wt(u),null}else 2*Tt()-y.renderingStartTime>Kv&&p!==536870912&&(u.flags|=128,T=!0,qh(y,!1),u.lanes=4194304);y.isBackwards?(O.sibling=u.child,u.child=O):(l=y.last,l!==null?l.sibling=O:u.child=O,y.last=O)}return y.tail!==null?(l=y.tail,y.rendering=l,y.tail=l.sibling,y.renderingStartTime=Tt(),l.sibling=null,p=pn.current,X(pn,T?p&1|2:p&1),pt&&ao(u,y.treeForkCount),l):(Wt(u),null);case 22:case 23:return Kr(u),rS(),y=u.memoizedState!==null,l!==null?l.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(p&536870912)!==0&&(u.flags&128)===0&&(Wt(u),u.subtreeFlags&6&&(u.flags|=8192)):Wt(u),p=u.updateQueue,p!==null&&Fv(u,p.retryQueue),p=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048),l!==null&&V(Xl),null;case 24:return p=null,l!==null&&(p=l.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),so(yn),Wt(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function Zae(l,u){switch(F1(u),u.tag){case 1:return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return so(yn),ne(),l=u.flags,(l&65536)!==0&&(l&128)===0?(u.flags=l&-65537|128,u):null;case 26:case 27:case 5:return ce(u),null;case 31:if(u.memoizedState!==null){if(Kr(u),u.alternate===null)throw Error(r(340));Kl()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 13:if(Kr(u),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Kl()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return V(pn),null;case 4:return ne(),null;case 10:return so(u.type),null;case 22:case 23:return Kr(u),rS(),l!==null&&V(Xl),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 24:return so(yn),null;case 25:return null;default:return null}}function QL(l,u){switch(F1(u),u.tag){case 3:so(yn),ne();break;case 26:case 27:case 5:ce(u);break;case 4:ne();break;case 31:u.memoizedState!==null&&Kr(u);break;case 13:Kr(u);break;case 19:V(pn);break;case 10:so(u.type);break;case 22:case 23:Kr(u),rS(),l!==null&&V(Xl);break;case 24:so(yn)}}function zh(l,u){try{var p=u.updateQueue,y=p!==null?p.lastEffect:null;if(y!==null){var T=y.next;p=T;do{if((p.tag&l)===l){y=void 0;var O=p.create,B=p.inst;y=O(),B.destroy=y}p=p.next}while(p!==T)}}catch(Y){Rt(u,u.return,Y)}}function Es(l,u,p){try{var y=u.updateQueue,T=y!==null?y.lastEffect:null;if(T!==null){var O=T.next;y=O;do{if((y.tag&l)===l){var B=y.inst,Y=B.destroy;if(Y!==void 0){B.destroy=void 0,T=u;var re=p,fe=Y;try{fe()}catch(pe){Rt(T,re,pe)}}}y=y.next}while(y!==O)}}catch(pe){Rt(u,u.return,pe)}}function ZL(l){var u=l.updateQueue;if(u!==null){var p=l.stateNode;try{FI(u,p)}catch(y){Rt(l,l.return,y)}}}function JL(l,u,p){p.props=tc(l.type,l.memoizedProps),p.state=l.memoizedState;try{p.componentWillUnmount()}catch(y){Rt(l,u,y)}}function Fh(l,u){try{var p=l.ref;if(p!==null){switch(l.tag){case 26:case 27:case 5:var y=l.stateNode;break;case 30:y=l.stateNode;break;default:y=l.stateNode}typeof p=="function"?l.refCleanup=p(y):p.current=y}}catch(T){Rt(l,u,T)}}function _a(l,u){var p=l.ref,y=l.refCleanup;if(p!==null)if(typeof y=="function")try{y()}catch(T){Rt(l,u,T)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(T){Rt(l,u,T)}else p.current=null}function e$(l){var u=l.type,p=l.memoizedProps,y=l.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&y.focus();break e;case"img":p.src?y.src=p.src:p.srcSet&&(y.srcset=p.srcSet)}}catch(T){Rt(l,l.return,T)}}function DS(l,u,p){try{var y=l.stateNode;xoe(y,l.type,p,u),y[sr]=u}catch(T){Rt(l,l.return,T)}}function t$(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&Ms(l.type)||l.tag===4}function IS(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||t$(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&Ms(l.type)||l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function LS(l,u,p){var y=l.tag;if(y===5||y===6)l=l.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(l,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(l),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=no));else if(y!==4&&(y===27&&Ms(l.type)&&(p=l.stateNode,u=null),l=l.child,l!==null))for(LS(l,u,p),l=l.sibling;l!==null;)LS(l,u,p),l=l.sibling}function Vv(l,u,p){var y=l.tag;if(y===5||y===6)l=l.stateNode,u?p.insertBefore(l,u):p.appendChild(l);else if(y!==4&&(y===27&&Ms(l.type)&&(p=l.stateNode),l=l.child,l!==null))for(Vv(l,u,p),l=l.sibling;l!==null;)Vv(l,u,p),l=l.sibling}function n$(l){var u=l.stateNode,p=l.memoizedProps;try{for(var y=l.type,T=u.attributes;T.length;)u.removeAttributeNode(T[0]);Xn(u,y,p),u[jn]=l,u[sr]=p}catch(O){Rt(l,l.return,O)}}var ho=!1,wn=!1,$S=!1,r$=typeof WeakSet=="function"?WeakSet:Set,qn=null;function Jae(l,u){if(l=l.containerInfo,a_=uy,l=mI(l),M1(l)){if("selectionStart"in l)var p={start:l.selectionStart,end:l.selectionEnd};else e:{p=(p=l.ownerDocument)&&p.defaultView||window;var y=p.getSelection&&p.getSelection();if(y&&y.rangeCount!==0){p=y.anchorNode;var T=y.anchorOffset,O=y.focusNode;y=y.focusOffset;try{p.nodeType,O.nodeType}catch{p=null;break e}var B=0,Y=-1,re=-1,fe=0,pe=0,ye=l,de=null;t:for(;;){for(var he;ye!==p||T!==0&&ye.nodeType!==3||(Y=B+T),ye!==O||y!==0&&ye.nodeType!==3||(re=B+y),ye.nodeType===3&&(B+=ye.nodeValue.length),(he=ye.firstChild)!==null;)de=ye,ye=he;for(;;){if(ye===l)break t;if(de===p&&++fe===T&&(Y=B),de===O&&++pe===y&&(re=B),(he=ye.nextSibling)!==null)break;ye=de,de=ye.parentNode}ye=he}p=Y===-1||re===-1?null:{start:Y,end:re}}else p=null}p=p||{start:0,end:0}}else p=null;for(o_={focusedElem:l,selectionRange:p},uy=!1,qn=u;qn!==null;)if(u=qn,l=u.child,(u.subtreeFlags&1028)!==0&&l!==null)l.return=u,qn=l;else for(;qn!==null;){switch(u=qn,O=u.alternate,l=u.flags,u.tag){case 0:if((l&4)!==0&&(l=u.updateQueue,l=l!==null?l.events:null,l!==null))for(p=0;p<l.length;p++)T=l[p],T.ref.impl=T.nextImpl;break;case 11:case 15:break;case 1:if((l&1024)!==0&&O!==null){l=void 0,p=u,T=O.memoizedProps,O=O.memoizedState,y=p.stateNode;try{var Oe=tc(p.type,T);l=y.getSnapshotBeforeUpdate(Oe,O),y.__reactInternalSnapshotBeforeUpdate=l}catch(qe){Rt(p,p.return,qe)}}break;case 3:if((l&1024)!==0){if(l=u.stateNode.containerInfo,p=l.nodeType,p===9)c_(l);else if(p===1)switch(l.nodeName){case"HEAD":case"HTML":case"BODY":c_(l);break;default:l.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((l&1024)!==0)throw Error(r(163))}if(l=u.sibling,l!==null){l.return=u.return,qn=l;break}qn=u.return}}function i$(l,u,p){var y=p.flags;switch(p.tag){case 0:case 11:case 15:mo(l,p),y&4&&zh(5,p);break;case 1:if(mo(l,p),y&4)if(l=p.stateNode,u===null)try{l.componentDidMount()}catch(B){Rt(p,p.return,B)}else{var T=tc(p.type,u.memoizedProps);u=u.memoizedState;try{l.componentDidUpdate(T,u,l.__reactInternalSnapshotBeforeUpdate)}catch(B){Rt(p,p.return,B)}}y&64&&ZL(p),y&512&&Fh(p,p.return);break;case 3:if(mo(l,p),y&64&&(l=p.updateQueue,l!==null)){if(u=null,p.child!==null)switch(p.child.tag){case 27:case 5:u=p.child.stateNode;break;case 1:u=p.child.stateNode}try{FI(l,u)}catch(B){Rt(p,p.return,B)}}break;case 27:u===null&&y&4&&n$(p);case 26:case 5:mo(l,p),u===null&&y&4&&e$(p),y&512&&Fh(p,p.return);break;case 12:mo(l,p);break;case 31:mo(l,p),y&4&&s$(l,p);break;case 13:mo(l,p),y&4&&l$(l,p),y&64&&(l=p.memoizedState,l!==null&&(l=l.dehydrated,l!==null&&(p=loe.bind(null,p),joe(l,p))));break;case 22:if(y=p.memoizedState!==null||ho,!y){u=u!==null&&u.memoizedState!==null||wn,T=ho;var O=wn;ho=y,(wn=u)&&!O?go(l,p,(p.subtreeFlags&8772)!==0):mo(l,p),ho=T,wn=O}break;case 30:break;default:mo(l,p)}}function a$(l){var u=l.alternate;u!==null&&(l.alternate=null,a$(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&ph(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}var Qt=null,Cr=!1;function po(l,u,p){for(p=p.child;p!==null;)o$(l,u,p),p=p.sibling}function o$(l,u,p){if(Ht&&typeof Ht.onCommitFiberUnmount=="function")try{Ht.onCommitFiberUnmount(Ln,p)}catch{}switch(p.tag){case 26:wn||_a(p,u),po(l,u,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:wn||_a(p,u);var y=Qt,T=Cr;Ms(p.type)&&(Qt=p.stateNode,Cr=!1),po(l,u,p),Qh(p.stateNode),Qt=y,Cr=T;break;case 5:wn||_a(p,u);case 6:if(y=Qt,T=Cr,Qt=null,po(l,u,p),Qt=y,Cr=T,Qt!==null)if(Cr)try{(Qt.nodeType===9?Qt.body:Qt.nodeName==="HTML"?Qt.ownerDocument.body:Qt).removeChild(p.stateNode)}catch(O){Rt(p,u,O)}else try{Qt.removeChild(p.stateNode)}catch(O){Rt(p,u,O)}break;case 18:Qt!==null&&(Cr?(l=Qt,Z$(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,p.stateNode),ef(l)):Z$(Qt,p.stateNode));break;case 4:y=Qt,T=Cr,Qt=p.stateNode.containerInfo,Cr=!0,po(l,u,p),Qt=y,Cr=T;break;case 0:case 11:case 14:case 15:Es(2,p,u),wn||Es(4,p,u),po(l,u,p);break;case 1:wn||(_a(p,u),y=p.stateNode,typeof y.componentWillUnmount=="function"&&JL(p,u,y)),po(l,u,p);break;case 21:po(l,u,p);break;case 22:wn=(y=wn)||p.memoizedState!==null,po(l,u,p),wn=y;break;default:po(l,u,p)}}function s$(l,u){if(u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null))){l=l.dehydrated;try{ef(l)}catch(p){Rt(u,u.return,p)}}}function l$(l,u){if(u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{ef(l)}catch(p){Rt(u,u.return,p)}}function eoe(l){switch(l.tag){case 31:case 13:case 19:var u=l.stateNode;return u===null&&(u=l.stateNode=new r$),u;case 22:return l=l.stateNode,u=l._retryCache,u===null&&(u=l._retryCache=new r$),u;default:throw Error(r(435,l.tag))}}function Uv(l,u){var p=eoe(l);u.forEach(function(y){if(!p.has(y)){p.add(y);var T=coe.bind(null,l,y);y.then(T,T)}})}function Tr(l,u){var p=u.deletions;if(p!==null)for(var y=0;y<p.length;y++){var T=p[y],O=l,B=u,Y=B;e:for(;Y!==null;){switch(Y.tag){case 27:if(Ms(Y.type)){Qt=Y.stateNode,Cr=!1;break e}break;case 5:Qt=Y.stateNode,Cr=!1;break e;case 3:case 4:Qt=Y.stateNode.containerInfo,Cr=!0;break e}Y=Y.return}if(Qt===null)throw Error(r(160));o$(O,B,T),Qt=null,Cr=!1,O=T.alternate,O!==null&&(O.return=null),T.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)c$(u,l),u=u.sibling}var Gi=null;function c$(l,u){var p=l.alternate,y=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:Tr(u,l),jr(l),y&4&&(Es(3,l,l.return),zh(3,l),Es(5,l,l.return));break;case 1:Tr(u,l),jr(l),y&512&&(wn||p===null||_a(p,p.return)),y&64&&ho&&(l=l.updateQueue,l!==null&&(y=l.callbacks,y!==null&&(p=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=p===null?y:p.concat(y))));break;case 26:var T=Gi;if(Tr(u,l),jr(l),y&512&&(wn||p===null||_a(p,p.return)),y&4){var O=p!==null?p.memoizedState:null;if(y=l.memoizedState,p===null)if(y===null)if(l.stateNode===null){e:{y=l.type,p=l.memoizedProps,T=T.ownerDocument||T;t:switch(y){case"title":O=T.getElementsByTagName("title")[0],(!O||O[Bl]||O[jn]||O.namespaceURI==="http://www.w3.org/2000/svg"||O.hasAttribute("itemprop"))&&(O=T.createElement(y),T.head.insertBefore(O,T.querySelector("head > title"))),Xn(O,y,p),O[jn]=l,vn(O),y=O;break e;case"link":var B=c3("link","href",T).get(y+(p.href||""));if(B){for(var Y=0;Y<B.length;Y++)if(O=B[Y],O.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&O.getAttribute("rel")===(p.rel==null?null:p.rel)&&O.getAttribute("title")===(p.title==null?null:p.title)&&O.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){B.splice(Y,1);break t}}O=T.createElement(y),Xn(O,y,p),T.head.appendChild(O);break;case"meta":if(B=c3("meta","content",T).get(y+(p.content||""))){for(Y=0;Y<B.length;Y++)if(O=B[Y],O.getAttribute("content")===(p.content==null?null:""+p.content)&&O.getAttribute("name")===(p.name==null?null:p.name)&&O.getAttribute("property")===(p.property==null?null:p.property)&&O.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&O.getAttribute("charset")===(p.charSet==null?null:p.charSet)){B.splice(Y,1);break t}}O=T.createElement(y),Xn(O,y,p),T.head.appendChild(O);break;default:throw Error(r(468,y))}O[jn]=l,vn(O),y=O}l.stateNode=y}else u3(T,l.type,l.stateNode);else l.stateNode=l3(T,y,l.memoizedProps);else O!==y?(O===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):O.count--,y===null?u3(T,l.type,l.stateNode):l3(T,y,l.memoizedProps)):y===null&&l.stateNode!==null&&DS(l,l.memoizedProps,p.memoizedProps)}break;case 27:Tr(u,l),jr(l),y&512&&(wn||p===null||_a(p,p.return)),p!==null&&y&4&&DS(l,l.memoizedProps,p.memoizedProps);break;case 5:if(Tr(u,l),jr(l),y&512&&(wn||p===null||_a(p,p.return)),l.flags&32){T=l.stateNode;try{_u(T,"")}catch(Oe){Rt(l,l.return,Oe)}}y&4&&l.stateNode!=null&&(T=l.memoizedProps,DS(l,T,p!==null?p.memoizedProps:T)),y&1024&&($S=!0);break;case 6:if(Tr(u,l),jr(l),y&4){if(l.stateNode===null)throw Error(r(162));y=l.memoizedProps,p=l.stateNode;try{p.nodeValue=y}catch(Oe){Rt(l,l.return,Oe)}}break;case 3:if(oy=null,T=Gi,Gi=iy(u.containerInfo),Tr(u,l),Gi=T,jr(l),y&4&&p!==null&&p.memoizedState.isDehydrated)try{ef(u.containerInfo)}catch(Oe){Rt(l,l.return,Oe)}$S&&($S=!1,u$(l));break;case 4:y=Gi,Gi=iy(l.stateNode.containerInfo),Tr(u,l),jr(l),Gi=y;break;case 12:Tr(u,l),jr(l);break;case 31:Tr(u,l),jr(l),y&4&&(y=l.updateQueue,y!==null&&(l.updateQueue=null,Uv(l,y)));break;case 13:Tr(u,l),jr(l),l.child.flags&8192&&l.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(Gv=Tt()),y&4&&(y=l.updateQueue,y!==null&&(l.updateQueue=null,Uv(l,y)));break;case 22:T=l.memoizedState!==null;var re=p!==null&&p.memoizedState!==null,fe=ho,pe=wn;if(ho=fe||T,wn=pe||re,Tr(u,l),wn=pe,ho=fe,jr(l),y&8192)e:for(u=l.stateNode,u._visibility=T?u._visibility&-2:u._visibility|1,T&&(p===null||re||ho||wn||nc(l)),p=null,u=l;;){if(u.tag===5||u.tag===26){if(p===null){re=p=u;try{if(O=re.stateNode,T)B=O.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{Y=re.stateNode;var ye=re.memoizedProps.style,de=ye!=null&&ye.hasOwnProperty("display")?ye.display:null;Y.style.display=de==null||typeof de=="boolean"?"":(""+de).trim()}}catch(Oe){Rt(re,re.return,Oe)}}}else if(u.tag===6){if(p===null){re=u;try{re.stateNode.nodeValue=T?"":re.memoizedProps}catch(Oe){Rt(re,re.return,Oe)}}}else if(u.tag===18){if(p===null){re=u;try{var he=re.stateNode;T?J$(he,!0):J$(re.stateNode,!1)}catch(Oe){Rt(re,re.return,Oe)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;p===u&&(p=null),u=u.return}p===u&&(p=null),u.sibling.return=u.return,u=u.sibling}y&4&&(y=l.updateQueue,y!==null&&(p=y.retryQueue,p!==null&&(y.retryQueue=null,Uv(l,p))));break;case 19:Tr(u,l),jr(l),y&4&&(y=l.updateQueue,y!==null&&(l.updateQueue=null,Uv(l,y)));break;case 30:break;case 21:break;default:Tr(u,l),jr(l)}}function jr(l){var u=l.flags;if(u&2){try{for(var p,y=l.return;y!==null;){if(t$(y)){p=y;break}y=y.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var T=p.stateNode,O=IS(l);Vv(l,O,T);break;case 5:var B=p.stateNode;p.flags&32&&(_u(B,""),p.flags&=-33);var Y=IS(l);Vv(l,Y,B);break;case 3:case 4:var re=p.stateNode.containerInfo,fe=IS(l);LS(l,fe,re);break;default:throw Error(r(161))}}catch(pe){Rt(l,l.return,pe)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function u$(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var u=l;u$(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),l=l.sibling}}function mo(l,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)i$(l,u.alternate,u),u=u.sibling}function nc(l){for(l=l.child;l!==null;){var u=l;switch(u.tag){case 0:case 11:case 14:case 15:Es(4,u,u.return),nc(u);break;case 1:_a(u,u.return);var p=u.stateNode;typeof p.componentWillUnmount=="function"&&JL(u,u.return,p),nc(u);break;case 27:Qh(u.stateNode);case 26:case 5:_a(u,u.return),nc(u);break;case 22:u.memoizedState===null&&nc(u);break;case 30:nc(u);break;default:nc(u)}l=l.sibling}}function go(l,u,p){for(p=p&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,T=l,O=u,B=O.flags;switch(O.tag){case 0:case 11:case 15:go(T,O,p),zh(4,O);break;case 1:if(go(T,O,p),y=O,T=y.stateNode,typeof T.componentDidMount=="function")try{T.componentDidMount()}catch(fe){Rt(y,y.return,fe)}if(y=O,T=y.updateQueue,T!==null){var Y=y.stateNode;try{var re=T.shared.hiddenCallbacks;if(re!==null)for(T.shared.hiddenCallbacks=null,T=0;T<re.length;T++)zI(re[T],Y)}catch(fe){Rt(y,y.return,fe)}}p&&B&64&&ZL(O),Fh(O,O.return);break;case 27:n$(O);case 26:case 5:go(T,O,p),p&&y===null&&B&4&&e$(O),Fh(O,O.return);break;case 12:go(T,O,p);break;case 31:go(T,O,p),p&&B&4&&s$(T,O);break;case 13:go(T,O,p),p&&B&4&&l$(T,O);break;case 22:O.memoizedState===null&&go(T,O,p),Fh(O,O.return);break;case 30:break;default:go(T,O,p)}u=u.sibling}}function BS(l,u){var p=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),l=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(l=u.memoizedState.cachePool.pool),l!==p&&(l!=null&&l.refCount++,p!=null&&jh(p))}function qS(l,u){l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&jh(l))}function Ki(l,u,p,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)f$(l,u,p,y),u=u.sibling}function f$(l,u,p,y){var T=u.flags;switch(u.tag){case 0:case 11:case 15:Ki(l,u,p,y),T&2048&&zh(9,u);break;case 1:Ki(l,u,p,y);break;case 3:Ki(l,u,p,y),T&2048&&(l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&jh(l)));break;case 12:if(T&2048){Ki(l,u,p,y),l=u.stateNode;try{var O=u.memoizedProps,B=O.id,Y=O.onPostCommit;typeof Y=="function"&&Y(B,u.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(re){Rt(u,u.return,re)}}else Ki(l,u,p,y);break;case 31:Ki(l,u,p,y);break;case 13:Ki(l,u,p,y);break;case 23:break;case 22:O=u.stateNode,B=u.alternate,u.memoizedState!==null?O._visibility&2?Ki(l,u,p,y):Vh(l,u):O._visibility&2?Ki(l,u,p,y):(O._visibility|=2,Vu(l,u,p,y,(u.subtreeFlags&10256)!==0||!1)),T&2048&&BS(B,u);break;case 24:Ki(l,u,p,y),T&2048&&qS(u.alternate,u);break;default:Ki(l,u,p,y)}}function Vu(l,u,p,y,T){for(T=T&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var O=l,B=u,Y=p,re=y,fe=B.flags;switch(B.tag){case 0:case 11:case 15:Vu(O,B,Y,re,T),zh(8,B);break;case 23:break;case 22:var pe=B.stateNode;B.memoizedState!==null?pe._visibility&2?Vu(O,B,Y,re,T):Vh(O,B):(pe._visibility|=2,Vu(O,B,Y,re,T)),T&&fe&2048&&BS(B.alternate,B);break;case 24:Vu(O,B,Y,re,T),T&&fe&2048&&qS(B.alternate,B);break;default:Vu(O,B,Y,re,T)}u=u.sibling}}function Vh(l,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var p=l,y=u,T=y.flags;switch(y.tag){case 22:Vh(p,y),T&2048&&BS(y.alternate,y);break;case 24:Vh(p,y),T&2048&&qS(y.alternate,y);break;default:Vh(p,y)}u=u.sibling}}var Uh=8192;function Uu(l,u,p){if(l.subtreeFlags&Uh)for(l=l.child;l!==null;)d$(l,u,p),l=l.sibling}function d$(l,u,p){switch(l.tag){case 26:Uu(l,u,p),l.flags&Uh&&l.memoizedState!==null&&qoe(p,Gi,l.memoizedState,l.memoizedProps);break;case 5:Uu(l,u,p);break;case 3:case 4:var y=Gi;Gi=iy(l.stateNode.containerInfo),Uu(l,u,p),Gi=y;break;case 22:l.memoizedState===null&&(y=l.alternate,y!==null&&y.memoizedState!==null?(y=Uh,Uh=16777216,Uu(l,u,p),Uh=y):Uu(l,u,p));break;default:Uu(l,u,p)}}function h$(l){var u=l.alternate;if(u!==null&&(l=u.child,l!==null)){u.child=null;do u=l.sibling,l.sibling=null,l=u;while(l!==null)}}function Hh(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var y=u[p];qn=y,m$(y,l)}h$(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)p$(l),l=l.sibling}function p$(l){switch(l.tag){case 0:case 11:case 15:Hh(l),l.flags&2048&&Es(9,l,l.return);break;case 3:Hh(l);break;case 12:Hh(l);break;case 22:var u=l.stateNode;l.memoizedState!==null&&u._visibility&2&&(l.return===null||l.return.tag!==13)?(u._visibility&=-3,Hv(l)):Hh(l);break;default:Hh(l)}}function Hv(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var p=0;p<u.length;p++){var y=u[p];qn=y,m$(y,l)}h$(l)}for(l=l.child;l!==null;){switch(u=l,u.tag){case 0:case 11:case 15:Es(8,u,u.return),Hv(u);break;case 22:p=u.stateNode,p._visibility&2&&(p._visibility&=-3,Hv(u));break;default:Hv(u)}l=l.sibling}}function m$(l,u){for(;qn!==null;){var p=qn;switch(p.tag){case 0:case 11:case 15:Es(8,p,u);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var y=p.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:jh(p.memoizedState.cache)}if(y=p.child,y!==null)y.return=p,qn=y;else e:for(p=l;qn!==null;){y=qn;var T=y.sibling,O=y.return;if(a$(y),y===p){qn=null;break e}if(T!==null){T.return=O,qn=T;break e}qn=O}}}var toe={getCacheForType:function(l){var u=Wn(yn),p=u.data.get(l);return p===void 0&&(p=l(),u.data.set(l,p)),p},cacheSignal:function(){return Wn(yn).controller.signal}},noe=typeof WeakMap=="function"?WeakMap:Map,At=0,$t=null,st=null,ut=0,Mt=0,Wr=null,As=!1,Hu=!1,zS=!1,vo=0,ln=0,Cs=0,rc=0,FS=0,Yr=0,Gu=0,Gh=null,Nr=null,VS=!1,Gv=0,g$=0,Kv=1/0,Wv=null,Ts=null,Nn=0,js=null,Ku=null,yo=0,US=0,HS=null,v$=null,Kh=0,GS=null;function Xr(){return(At&2)!==0&&ut!==0?ut&-ut:k.T!==null?ZS():hh()}function y$(){if(Yr===0)if((ut&536870912)===0||pt){var l=os;os<<=1,(os&3932160)===0&&(os=262144),Yr=l}else Yr=536870912;return l=Gr.current,l!==null&&(l.flags|=32),Yr}function Or(l,u,p){(l===$t&&(Mt===2||Mt===9)||l.cancelPendingCommit!==null)&&(Wu(l,0),Ns(l,ut,Yr,!1)),Gt(l,p),((At&2)===0||l!==$t)&&(l===$t&&((At&2)===0&&(rc|=p),ln===4&&Ns(l,ut,Yr,!1)),Ea(l))}function b$(l,u,p){if((At&6)!==0)throw Error(r(327));var y=!p&&(u&127)===0&&(u&l.expiredLanes)===0||Vt(l,u),T=y?aoe(l,u):WS(l,u,!0),O=y;do{if(T===0){Hu&&!y&&Ns(l,u,0,!1);break}else{if(p=l.current.alternate,O&&!roe(p)){T=WS(l,u,!1),O=!1;continue}if(T===2){if(O=u,l.errorRecoveryDisabledLanes&O)var B=0;else B=l.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){u=B;e:{var Y=l;T=Gh;var re=Y.current.memoizedState.isDehydrated;if(re&&(Wu(Y,B).flags|=256),B=WS(Y,B,!1),B!==2){if(zS&&!re){Y.errorRecoveryDisabledLanes|=O,rc|=O,T=4;break e}O=Nr,Nr=T,O!==null&&(Nr===null?Nr=O:Nr.push.apply(Nr,O))}T=B}if(O=!1,T!==2)continue}}if(T===1){Wu(l,0),Ns(l,u,0,!0);break}e:{switch(y=l,O=T,O){case 0:case 1:throw Error(r(345));case 4:if((u&4194048)!==u)break;case 6:Ns(y,u,Yr,!As);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((u&62914560)===u&&(T=Gv+300-Tt(),10<T)){if(Ns(y,u,Yr,!As),Fe(y,0,!0)!==0)break e;yo=u,y.timeoutHandle=X$(x$.bind(null,y,p,Nr,Wv,VS,u,Yr,rc,Gu,As,O,"Throttled",-0,0),T);break e}x$(y,p,Nr,Wv,VS,u,Yr,rc,Gu,As,O,null,-0,0)}}break}while(!0);Ea(l)}function x$(l,u,p,y,T,O,B,Y,re,fe,pe,ye,de,he){if(l.timeoutHandle=-1,ye=u.subtreeFlags,ye&8192||(ye&16785408)===16785408){ye={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:no},d$(u,O,ye);var Oe=(O&62914560)===O?Gv-Tt():(O&4194048)===O?g$-Tt():0;if(Oe=zoe(ye,Oe),Oe!==null){yo=O,l.cancelPendingCommit=Oe(j$.bind(null,l,u,O,p,y,T,B,Y,re,pe,ye,null,de,he)),Ns(l,O,B,!fe);return}}j$(l,u,O,p,y,T,B,Y,re)}function roe(l){for(var u=l;;){var p=u.tag;if((p===0||p===11||p===15)&&u.flags&16384&&(p=u.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var y=0;y<p.length;y++){var T=p[y],O=T.getSnapshot;T=T.value;try{if(!Ur(O(),T))return!1}catch{return!1}}if(p=u.child,u.subtreeFlags&16384&&p!==null)p.return=u,u=p;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Ns(l,u,p,y){u&=~FS,u&=~rc,l.suspendedLanes|=u,l.pingedLanes&=~u,y&&(l.warmLanes|=u),y=l.expirationTimes;for(var T=u;0<T;){var O=31-$n(T),B=1<<O;y[O]=-1,T&=~B}p!==0&&Za(l,p,u)}function Yv(){return(At&6)===0?(Wh(0),!1):!0}function KS(){if(st!==null){if(Mt===0)var l=st.return;else l=st,oo=Wl=null,cS(l),$u=null,Oh=0,l=st;for(;l!==null;)QL(l.alternate,l),l=l.return;st=null}}function Wu(l,u){var p=l.timeoutHandle;p!==-1&&(l.timeoutHandle=-1,_oe(p)),p=l.cancelPendingCommit,p!==null&&(l.cancelPendingCommit=null,p()),yo=0,KS(),$t=l,st=p=io(l.current,null),ut=u,Mt=0,Wr=null,As=!1,Hu=Vt(l,u),zS=!1,Gu=Yr=FS=rc=Cs=ln=0,Nr=Gh=null,VS=!1,(u&8)!==0&&(u|=u&32);var y=l.entangledLanes;if(y!==0)for(l=l.entanglements,y&=u;0<y;){var T=31-$n(y),O=1<<T;u|=l[T],y&=~O}return vo=u,gv(),p}function w$(l,u){Ye=null,k.H=$h,u===Lu||u===Ev?(u=LI(),Mt=3):u===Q1?(u=LI(),Mt=4):Mt=u===AS?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Wr=u,st===null&&(ln=1,$v(l,gi(u,l.current)))}function S$(){var l=Gr.current;return l===null?!0:(ut&4194048)===ut?xi===null:(ut&62914560)===ut||(ut&536870912)!==0?l===xi:!1}function _$(){var l=k.H;return k.H=$h,l===null?$h:l}function E$(){var l=k.A;return k.A=toe,l}function Xv(){ln=4,As||(ut&4194048)!==ut&&Gr.current!==null||(Hu=!0),(Cs&134217727)===0&&(rc&134217727)===0||$t===null||Ns($t,ut,Yr,!1)}function WS(l,u,p){var y=At;At|=2;var T=_$(),O=E$();($t!==l||ut!==u)&&(Wv=null,Wu(l,u)),u=!1;var B=ln;e:do try{if(Mt!==0&&st!==null){var Y=st,re=Wr;switch(Mt){case 8:KS(),B=6;break e;case 3:case 2:case 9:case 6:Gr.current===null&&(u=!0);var fe=Mt;if(Mt=0,Wr=null,Yu(l,Y,re,fe),p&&Hu){B=0;break e}break;default:fe=Mt,Mt=0,Wr=null,Yu(l,Y,re,fe)}}ioe(),B=ln;break}catch(pe){w$(l,pe)}while(!0);return u&&l.shellSuspendCounter++,oo=Wl=null,At=y,k.H=T,k.A=O,st===null&&($t=null,ut=0,gv()),B}function ioe(){for(;st!==null;)A$(st)}function aoe(l,u){var p=At;At|=2;var y=_$(),T=E$();$t!==l||ut!==u?(Wv=null,Kv=Tt()+500,Wu(l,u)):Hu=Vt(l,u);e:do try{if(Mt!==0&&st!==null){u=st;var O=Wr;t:switch(Mt){case 1:Mt=0,Wr=null,Yu(l,u,O,1);break;case 2:case 9:if(DI(O)){Mt=0,Wr=null,C$(u);break}u=function(){Mt!==2&&Mt!==9||$t!==l||(Mt=7),Ea(l)},O.then(u,u);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:DI(O)?(Mt=0,Wr=null,C$(u)):(Mt=0,Wr=null,Yu(l,u,O,7));break;case 5:var B=null;switch(st.tag){case 26:B=st.memoizedState;case 5:case 27:var Y=st;if(B?f3(B):Y.stateNode.complete){Mt=0,Wr=null;var re=Y.sibling;if(re!==null)st=re;else{var fe=Y.return;fe!==null?(st=fe,Qv(fe)):st=null}break t}}Mt=0,Wr=null,Yu(l,u,O,5);break;case 6:Mt=0,Wr=null,Yu(l,u,O,6);break;case 8:KS(),ln=6;break e;default:throw Error(r(462))}}ooe();break}catch(pe){w$(l,pe)}while(!0);return oo=Wl=null,k.H=y,k.A=T,At=p,st!==null?0:($t=null,ut=0,gv(),ln)}function ooe(){for(;st!==null&&!Xe();)A$(st)}function A$(l){var u=YL(l.alternate,l,vo);l.memoizedProps=l.pendingProps,u===null?Qv(l):st=u}function C$(l){var u=l,p=u.alternate;switch(u.tag){case 15:case 0:u=VL(p,u,u.pendingProps,u.type,void 0,ut);break;case 11:u=VL(p,u,u.pendingProps,u.type.render,u.ref,ut);break;case 5:cS(u);default:QL(p,u),u=st=EI(u,vo),u=YL(p,u,vo)}l.memoizedProps=l.pendingProps,u===null?Qv(l):st=u}function Yu(l,u,p,y){oo=Wl=null,cS(u),$u=null,Oh=0;var T=u.return;try{if(Wae(l,T,u,p,ut)){ln=1,$v(l,gi(p,l.current)),st=null;return}}catch(O){if(T!==null)throw st=T,O;ln=1,$v(l,gi(p,l.current)),st=null;return}u.flags&32768?(pt||y===1?l=!0:Hu||(ut&536870912)!==0?l=!1:(As=l=!0,(y===2||y===9||y===3||y===6)&&(y=Gr.current,y!==null&&y.tag===13&&(y.flags|=16384))),T$(u,l)):Qv(u)}function Qv(l){var u=l;do{if((u.flags&32768)!==0){T$(u,As);return}l=u.return;var p=Qae(u.alternate,u,vo);if(p!==null){st=p;return}if(u=u.sibling,u!==null){st=u;return}st=u=l}while(u!==null);ln===0&&(ln=5)}function T$(l,u){do{var p=Zae(l.alternate,l);if(p!==null){p.flags&=32767,st=p;return}if(p=l.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!u&&(l=l.sibling,l!==null)){st=l;return}st=l=p}while(l!==null);ln=6,st=null}function j$(l,u,p,y,T,O,B,Y,re){l.cancelPendingCommit=null;do Zv();while(Nn!==0);if((At&6)!==0)throw Error(r(327));if(u!==null){if(u===l.current)throw Error(r(177));if(O=u.lanes|u.childLanes,O|=I1,ir(l,p,O,B,Y,re),l===$t&&(st=$t=null,ut=0),Ku=u,js=l,yo=p,US=O,HS=T,v$=y,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(l.callbackNode=null,l.callbackPriority=0,uoe(Tn,function(){return P$(),null})):(l.callbackNode=null,l.callbackPriority=0),y=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||y){y=k.T,k.T=null,T=z.p,z.p=2,B=At,At|=4;try{Jae(l,u,p)}finally{At=B,z.p=T,k.T=y}}Nn=1,N$(),O$(),M$()}}function N$(){if(Nn===1){Nn=0;var l=js,u=Ku,p=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||p){p=k.T,k.T=null;var y=z.p;z.p=2;var T=At;At|=4;try{c$(u,l);var O=o_,B=mI(l.containerInfo),Y=O.focusedElem,re=O.selectionRange;if(B!==Y&&Y&&Y.ownerDocument&&pI(Y.ownerDocument.documentElement,Y)){if(re!==null&&M1(Y)){var fe=re.start,pe=re.end;if(pe===void 0&&(pe=fe),"selectionStart"in Y)Y.selectionStart=fe,Y.selectionEnd=Math.min(pe,Y.value.length);else{var ye=Y.ownerDocument||document,de=ye&&ye.defaultView||window;if(de.getSelection){var he=de.getSelection(),Oe=Y.textContent.length,qe=Math.min(re.start,Oe),It=re.end===void 0?qe:Math.min(re.end,Oe);!he.extend&&qe>It&&(B=It,It=qe,qe=B);var le=hI(Y,qe),ae=hI(Y,It);if(le&&ae&&(he.rangeCount!==1||he.anchorNode!==le.node||he.anchorOffset!==le.offset||he.focusNode!==ae.node||he.focusOffset!==ae.offset)){var ue=ye.createRange();ue.setStart(le.node,le.offset),he.removeAllRanges(),qe>It?(he.addRange(ue),he.extend(ae.node,ae.offset)):(ue.setEnd(ae.node,ae.offset),he.addRange(ue))}}}}for(ye=[],he=Y;he=he.parentNode;)he.nodeType===1&&ye.push({element:he,left:he.scrollLeft,top:he.scrollTop});for(typeof Y.focus=="function"&&Y.focus(),Y=0;Y<ye.length;Y++){var ve=ye[Y];ve.element.scrollLeft=ve.left,ve.element.scrollTop=ve.top}}uy=!!a_,o_=a_=null}finally{At=T,z.p=y,k.T=p}}l.current=u,Nn=2}}function O$(){if(Nn===2){Nn=0;var l=js,u=Ku,p=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||p){p=k.T,k.T=null;var y=z.p;z.p=2;var T=At;At|=4;try{i$(l,u.alternate,u)}finally{At=T,z.p=y,k.T=p}}Nn=3}}function M$(){if(Nn===4||Nn===3){Nn=0,ht();var l=js,u=Ku,p=yo,y=v$;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Nn=5:(Nn=0,Ku=js=null,R$(l,l.pendingLanes));var T=l.pendingLanes;if(T===0&&(Ts=null),Vr(p),u=u.stateNode,Ht&&typeof Ht.onCommitFiberRoot=="function")try{Ht.onCommitFiberRoot(Ln,u,void 0,(u.current.flags&128)===128)}catch{}if(y!==null){u=k.T,T=z.p,z.p=2,k.T=null;try{for(var O=l.onRecoverableError,B=0;B<y.length;B++){var Y=y[B];O(Y.value,{componentStack:Y.stack})}}finally{k.T=u,z.p=T}}(yo&3)!==0&&Zv(),Ea(l),T=l.pendingLanes,(p&261930)!==0&&(T&42)!==0?l===GS?Kh++:(Kh=0,GS=l):Kh=0,Wh(0)}}function R$(l,u){(l.pooledCacheLanes&=u)===0&&(u=l.pooledCache,u!=null&&(l.pooledCache=null,jh(u)))}function Zv(){return N$(),O$(),M$(),P$()}function P$(){if(Nn!==5)return!1;var l=js,u=US;US=0;var p=Vr(yo),y=k.T,T=z.p;try{z.p=32>p?32:p,k.T=null,p=HS,HS=null;var O=js,B=yo;if(Nn=0,Ku=js=null,yo=0,(At&6)!==0)throw Error(r(331));var Y=At;if(At|=4,p$(O.current),f$(O,O.current,B,p),At=Y,Wh(0,!1),Ht&&typeof Ht.onPostCommitFiberRoot=="function")try{Ht.onPostCommitFiberRoot(Ln,O)}catch{}return!0}finally{z.p=T,k.T=y,R$(l,u)}}function k$(l,u,p){u=gi(p,u),u=ES(l.stateNode,u,2),l=ws(l,u,2),l!==null&&(Gt(l,2),Ea(l))}function Rt(l,u,p){if(l.tag===3)k$(l,l,p);else for(;u!==null;){if(u.tag===3){k$(u,l,p);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ts===null||!Ts.has(y))){l=gi(p,l),p=DL(2),y=ws(u,p,2),y!==null&&(IL(p,y,u,l),Gt(y,2),Ea(y));break}}u=u.return}}function YS(l,u,p){var y=l.pingCache;if(y===null){y=l.pingCache=new noe;var T=new Set;y.set(u,T)}else T=y.get(u),T===void 0&&(T=new Set,y.set(u,T));T.has(p)||(zS=!0,T.add(p),l=soe.bind(null,l,u,p),u.then(l,l))}function soe(l,u,p){var y=l.pingCache;y!==null&&y.delete(u),l.pingedLanes|=l.suspendedLanes&p,l.warmLanes&=~p,$t===l&&(ut&p)===p&&(ln===4||ln===3&&(ut&62914560)===ut&&300>Tt()-Gv?(At&2)===0&&Wu(l,0):FS|=p,Gu===ut&&(Gu=0)),Ea(l)}function D$(l,u){u===0&&(u=Bn()),l=Hl(l,u),l!==null&&(Gt(l,u),Ea(l))}function loe(l){var u=l.memoizedState,p=0;u!==null&&(p=u.retryLane),D$(l,p)}function coe(l,u){var p=0;switch(l.tag){case 31:case 13:var y=l.stateNode,T=l.memoizedState;T!==null&&(p=T.retryLane);break;case 19:y=l.stateNode;break;case 22:y=l.stateNode._retryCache;break;default:throw Error(r(314))}y!==null&&y.delete(u),D$(l,p)}function uoe(l,u){return Pt(l,u)}var Jv=null,Xu=null,XS=!1,ey=!1,QS=!1,Os=0;function Ea(l){l!==Xu&&l.next===null&&(Xu===null?Jv=Xu=l:Xu=Xu.next=l),ey=!0,XS||(XS=!0,doe())}function Wh(l,u){if(!QS&&ey){QS=!0;do for(var p=!1,y=Jv;y!==null;){if(l!==0){var T=y.pendingLanes;if(T===0)var O=0;else{var B=y.suspendedLanes,Y=y.pingedLanes;O=(1<<31-$n(42|l)+1)-1,O&=T&~(B&~Y),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(p=!0,B$(y,O))}else O=ut,O=Fe(y,y===$t?O:0,y.cancelPendingCommit!==null||y.timeoutHandle!==-1),(O&3)===0||Vt(y,O)||(p=!0,B$(y,O));y=y.next}while(p);QS=!1}}function foe(){I$()}function I$(){ey=XS=!1;var l=0;Os!==0&&Soe()&&(l=Os);for(var u=Tt(),p=null,y=Jv;y!==null;){var T=y.next,O=L$(y,u);O===0?(y.next=null,p===null?Jv=T:p.next=T,T===null&&(Xu=p)):(p=y,(l!==0||(O&3)!==0)&&(ey=!0)),y=T}Nn!==0&&Nn!==5||Wh(l),Os!==0&&(Os=0)}function L$(l,u){for(var p=l.suspendedLanes,y=l.pingedLanes,T=l.expirationTimes,O=l.pendingLanes&-62914561;0<O;){var B=31-$n(O),Y=1<<B,re=T[B];re===-1?((Y&p)===0||(Y&y)!==0)&&(T[B]=gn(Y,u)):re<=u&&(l.expiredLanes|=Y),O&=~Y}if(u=$t,p=ut,p=Fe(l,l===u?p:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),y=l.callbackNode,p===0||l===u&&(Mt===2||Mt===9)||l.cancelPendingCommit!==null)return y!==null&&y!==null&&Ft(y),l.callbackNode=null,l.callbackPriority=0;if((p&3)===0||Vt(l,p)){if(u=p&-p,u===l.callbackPriority)return u;switch(y!==null&&Ft(y),Vr(p)){case 2:case 8:p=hn;break;case 32:p=Tn;break;case 268435456:p=rr;break;default:p=Tn}return y=$$.bind(null,l),p=Pt(p,y),l.callbackPriority=u,l.callbackNode=p,u}return y!==null&&y!==null&&Ft(y),l.callbackPriority=2,l.callbackNode=null,2}function $$(l,u){if(Nn!==0&&Nn!==5)return l.callbackNode=null,l.callbackPriority=0,null;var p=l.callbackNode;if(Zv()&&l.callbackNode!==p)return null;var y=ut;return y=Fe(l,l===$t?y:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),y===0?null:(b$(l,y,u),L$(l,Tt()),l.callbackNode!=null&&l.callbackNode===p?$$.bind(null,l):null)}function B$(l,u){if(Zv())return null;b$(l,u,!0)}function doe(){Eoe(function(){(At&6)!==0?Pt(Et,foe):I$()})}function ZS(){if(Os===0){var l=Du;l===0&&(l=as,as<<=1,(as&261888)===0&&(as=256)),Os=l}return Os}function q$(l){return l==null||typeof l=="symbol"||typeof l=="boolean"?null:typeof l=="function"?l:lv(""+l)}function z$(l,u){var p=u.ownerDocument.createElement("input");return p.name=u.name,p.value=u.value,l.id&&p.setAttribute("form",l.id),u.parentNode.insertBefore(p,u),l=new FormData(l),p.parentNode.removeChild(p),l}function hoe(l,u,p,y,T){if(u==="submit"&&p&&p.stateNode===T){var O=q$((T[sr]||null).action),B=y.submitter;B&&(u=(u=B[sr]||null)?q$(u.formAction):B.getAttribute("formAction"),u!==null&&(O=u,B=null));var Y=new dv("action","action",null,y,T);l.push({event:Y,listeners:[{instance:null,listener:function(){if(y.defaultPrevented){if(Os!==0){var re=B?z$(T,B):new FormData(T);yS(p,{pending:!0,data:re,method:T.method,action:O},null,re)}}else typeof O=="function"&&(Y.preventDefault(),re=B?z$(T,B):new FormData(T),yS(p,{pending:!0,data:re,method:T.method,action:O},O,re))},currentTarget:T}]})}}for(var JS=0;JS<D1.length;JS++){var e_=D1[JS],poe=e_.toLowerCase(),moe=e_[0].toUpperCase()+e_.slice(1);Hi(poe,"on"+moe)}Hi(yI,"onAnimationEnd"),Hi(bI,"onAnimationIteration"),Hi(xI,"onAnimationStart"),Hi("dblclick","onDoubleClick"),Hi("focusin","onFocus"),Hi("focusout","onBlur"),Hi(Mae,"onTransitionRun"),Hi(Rae,"onTransitionStart"),Hi(Pae,"onTransitionCancel"),Hi(wI,"onTransitionEnd"),ds("onMouseEnter",["mouseout","mouseover"]),ds("onMouseLeave",["mouseout","mouseover"]),ds("onPointerEnter",["pointerout","pointerover"]),ds("onPointerLeave",["pointerout","pointerover"]),eo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),eo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),eo("onBeforeInput",["compositionend","keypress","textInput","paste"]),eo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),eo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),eo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yh="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(" "),goe=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yh));function F$(l,u){u=(u&4)!==0;for(var p=0;p<l.length;p++){var y=l[p],T=y.event;y=y.listeners;e:{var O=void 0;if(u)for(var B=y.length-1;0<=B;B--){var Y=y[B],re=Y.instance,fe=Y.currentTarget;if(Y=Y.listener,re!==O&&T.isPropagationStopped())break e;O=Y,T.currentTarget=fe;try{O(T)}catch(pe){mv(pe)}T.currentTarget=null,O=re}else for(B=0;B<y.length;B++){if(Y=y[B],re=Y.instance,fe=Y.currentTarget,Y=Y.listener,re!==O&&T.isPropagationStopped())break e;O=Y,T.currentTarget=fe;try{O(T)}catch(pe){mv(pe)}T.currentTarget=null,O=re}}}}function lt(l,u){var p=u[xu];p===void 0&&(p=u[xu]=new Set);var y=l+"__bubble";p.has(y)||(V$(u,l,2,!1),p.add(y))}function t_(l,u,p){var y=0;u&&(y|=4),V$(p,l,y,u)}var ty="_reactListening"+Math.random().toString(36).slice(2);function n_(l){if(!l[ty]){l[ty]=!0,nv.forEach(function(p){p!=="selectionchange"&&(goe.has(p)||t_(p,!1,l),t_(p,!0,l))});var u=l.nodeType===9?l:l.ownerDocument;u===null||u[ty]||(u[ty]=!0,t_("selectionchange",!1,u))}}function V$(l,u,p,y){switch(y3(u)){case 2:var T=Uoe;break;case 8:T=Hoe;break;default:T=v_}p=T.bind(null,u,p,l),T=void 0,!S1||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(T=!0),y?T!==void 0?l.addEventListener(u,p,{capture:!0,passive:T}):l.addEventListener(u,p,!0):T!==void 0?l.addEventListener(u,p,{passive:T}):l.addEventListener(u,p,!1)}function r_(l,u,p,y,T){var O=y;if((u&1)===0&&(u&2)===0&&y!==null)e:for(;;){if(y===null)return;var B=y.tag;if(B===3||B===4){var Y=y.stateNode.containerInfo;if(Y===T)break;if(B===4)for(B=y.return;B!==null;){var re=B.tag;if((re===3||re===4)&&B.stateNode.containerInfo===T)return;B=B.return}for(;Y!==null;){if(B=ls(Y),B===null)return;if(re=B.tag,re===5||re===6||re===26||re===27){y=O=B;continue e}Y=Y.parentNode}}y=y.return}WD(function(){var fe=O,pe=x1(p),ye=[];e:{var de=SI.get(l);if(de!==void 0){var he=dv,Oe=l;switch(l){case"keypress":if(uv(p)===0)break e;case"keydown":case"keyup":he=cae;break;case"focusin":Oe="focus",he=C1;break;case"focusout":Oe="blur",he=C1;break;case"beforeblur":case"afterblur":he=C1;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":he=QD;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=Qie;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=dae;break;case yI:case bI:case xI:he=eae;break;case wI:he=pae;break;case"scroll":case"scrollend":he=Yie;break;case"wheel":he=gae;break;case"copy":case"cut":case"paste":he=nae;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=JD;break;case"toggle":case"beforetoggle":he=yae}var qe=(u&4)!==0,It=!qe&&(l==="scroll"||l==="scrollend"),le=qe?de!==null?de+"Capture":null:de;qe=[];for(var ae=fe,ue;ae!==null;){var ve=ae;if(ue=ve.stateNode,ve=ve.tag,ve!==5&&ve!==26&&ve!==27||ue===null||le===null||(ve=vh(ae,le),ve!=null&&qe.push(Xh(ae,ve,ue))),It)break;ae=ae.return}0<qe.length&&(de=new he(de,Oe,null,p,pe),ye.push({event:de,listeners:qe}))}}if((u&7)===0){e:{if(de=l==="mouseover"||l==="pointerover",he=l==="mouseout"||l==="pointerout",de&&p!==b1&&(Oe=p.relatedTarget||p.fromElement)&&(ls(Oe)||Oe[Ja]))break e;if((he||de)&&(de=pe.window===pe?pe:(de=pe.ownerDocument)?de.defaultView||de.parentWindow:window,he?(Oe=p.relatedTarget||p.toElement,he=fe,Oe=Oe?ls(Oe):null,Oe!==null&&(It=a(Oe),qe=Oe.tag,Oe!==It||qe!==5&&qe!==27&&qe!==6)&&(Oe=null)):(he=null,Oe=fe),he!==Oe)){if(qe=QD,ve="onMouseLeave",le="onMouseEnter",ae="mouse",(l==="pointerout"||l==="pointerover")&&(qe=JD,ve="onPointerLeave",le="onPointerEnter",ae="pointer"),It=he==null?de:us(he),ue=Oe==null?de:us(Oe),de=new qe(ve,ae+"leave",he,p,pe),de.target=It,de.relatedTarget=ue,ve=null,ls(pe)===fe&&(qe=new qe(le,ae+"enter",Oe,p,pe),qe.target=ue,qe.relatedTarget=It,ve=qe),It=ve,he&&Oe)t:{for(qe=voe,le=he,ae=Oe,ue=0,ve=le;ve;ve=qe(ve))ue++;ve=0;for(var Be=ae;Be;Be=qe(Be))ve++;for(;0<ue-ve;)le=qe(le),ue--;for(;0<ve-ue;)ae=qe(ae),ve--;for(;ue--;){if(le===ae||ae!==null&&le===ae.alternate){qe=le;break t}le=qe(le),ae=qe(ae)}qe=null}else qe=null;he!==null&&U$(ye,de,he,qe,!1),Oe!==null&&It!==null&&U$(ye,It,Oe,qe,!0)}}e:{if(de=fe?us(fe):window,he=de.nodeName&&de.nodeName.toLowerCase(),he==="select"||he==="input"&&de.type==="file")var xt=sI;else if(aI(de))if(lI)xt=jae;else{xt=Cae;var Pe=Aae}else he=de.nodeName,!he||he.toLowerCase()!=="input"||de.type!=="checkbox"&&de.type!=="radio"?fe&&y1(fe.elementType)&&(xt=sI):xt=Tae;if(xt&&(xt=xt(l,fe))){oI(ye,xt,p,pe);break e}Pe&&Pe(l,de,fe),l==="focusout"&&fe&&de.type==="number"&&fe.memoizedProps.value!=null&&gh(de,"number",de.value)}switch(Pe=fe?us(fe):window,l){case"focusin":(aI(Pe)||Pe.contentEditable==="true")&&(Tu=Pe,R1=fe,Ah=null);break;case"focusout":Ah=R1=Tu=null;break;case"mousedown":P1=!0;break;case"contextmenu":case"mouseup":case"dragend":P1=!1,gI(ye,p,pe);break;case"selectionchange":if(Oae)break;case"keydown":case"keyup":gI(ye,p,pe)}var Qe;if(j1)e:{switch(l){case"compositionstart":var ft="onCompositionStart";break e;case"compositionend":ft="onCompositionEnd";break e;case"compositionupdate":ft="onCompositionUpdate";break e}ft=void 0}else Cu?rI(l,p)&&(ft="onCompositionEnd"):l==="keydown"&&p.keyCode===229&&(ft="onCompositionStart");ft&&(eI&&p.locale!=="ko"&&(Cu||ft!=="onCompositionStart"?ft==="onCompositionEnd"&&Cu&&(Qe=YD()):(ps=pe,_1="value"in ps?ps.value:ps.textContent,Cu=!0)),Pe=ny(fe,ft),0<Pe.length&&(ft=new ZD(ft,l,null,p,pe),ye.push({event:ft,listeners:Pe}),Qe?ft.data=Qe:(Qe=iI(p),Qe!==null&&(ft.data=Qe)))),(Qe=xae?wae(l,p):Sae(l,p))&&(ft=ny(fe,"onBeforeInput"),0<ft.length&&(Pe=new ZD("onBeforeInput","beforeinput",null,p,pe),ye.push({event:Pe,listeners:ft}),Pe.data=Qe)),hoe(ye,l,fe,p,pe)}F$(ye,u)})}function Xh(l,u,p){return{instance:l,listener:u,currentTarget:p}}function ny(l,u){for(var p=u+"Capture",y=[];l!==null;){var T=l,O=T.stateNode;if(T=T.tag,T!==5&&T!==26&&T!==27||O===null||(T=vh(l,p),T!=null&&y.unshift(Xh(l,T,O)),T=vh(l,u),T!=null&&y.push(Xh(l,T,O))),l.tag===3)return y;l=l.return}return[]}function voe(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5&&l.tag!==27);return l||null}function U$(l,u,p,y,T){for(var O=u._reactName,B=[];p!==null&&p!==y;){var Y=p,re=Y.alternate,fe=Y.stateNode;if(Y=Y.tag,re!==null&&re===y)break;Y!==5&&Y!==26&&Y!==27||fe===null||(re=fe,T?(fe=vh(p,O),fe!=null&&B.unshift(Xh(p,fe,re))):T||(fe=vh(p,O),fe!=null&&B.push(Xh(p,fe,re)))),p=p.return}B.length!==0&&l.push({event:u,listeners:B})}var yoe=/\r\n?/g,boe=/\u0000|\uFFFD/g;function H$(l){return(typeof l=="string"?l:""+l).replace(yoe,`
49
+ `).replace(boe,"")}function G$(l,u){return u=H$(u),H$(l)===u}function Dt(l,u,p,y,T,O){switch(p){case"children":typeof y=="string"?u==="body"||u==="textarea"&&y===""||_u(l,y):(typeof y=="number"||typeof y=="bigint")&&u!=="body"&&_u(l,""+y);break;case"className":Su(l,"class",y);break;case"tabIndex":Su(l,"tabindex",y);break;case"dir":case"role":case"viewBox":case"width":case"height":Su(l,p,y);break;case"style":GD(l,y,O);break;case"data":if(u!=="object"){Su(l,"data",y);break}case"src":case"href":if(y===""&&(u!=="a"||p!=="href")){l.removeAttribute(p);break}if(y==null||typeof y=="function"||typeof y=="symbol"||typeof y=="boolean"){l.removeAttribute(p);break}y=lv(""+y),l.setAttribute(p,y);break;case"action":case"formAction":if(typeof y=="function"){l.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 O=="function"&&(p==="formAction"?(u!=="input"&&Dt(l,u,"name",T.name,T,null),Dt(l,u,"formEncType",T.formEncType,T,null),Dt(l,u,"formMethod",T.formMethod,T,null),Dt(l,u,"formTarget",T.formTarget,T,null)):(Dt(l,u,"encType",T.encType,T,null),Dt(l,u,"method",T.method,T,null),Dt(l,u,"target",T.target,T,null)));if(y==null||typeof y=="symbol"||typeof y=="boolean"){l.removeAttribute(p);break}y=lv(""+y),l.setAttribute(p,y);break;case"onClick":y!=null&&(l.onclick=no);break;case"onScroll":y!=null&&lt("scroll",l);break;case"onScrollEnd":y!=null&&lt("scrollend",l);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(T.children!=null)throw Error(r(60));l.innerHTML=p}}break;case"multiple":l.multiple=y&&typeof y!="function"&&typeof y!="symbol";break;case"muted":l.muted=y&&typeof y!="function"&&typeof y!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(y==null||typeof y=="function"||typeof y=="boolean"||typeof y=="symbol"){l.removeAttribute("xlink:href");break}p=lv(""+y),l.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":y!=null&&typeof y!="function"&&typeof y!="symbol"?l.setAttribute(p,""+y):l.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":y&&typeof y!="function"&&typeof y!="symbol"?l.setAttribute(p,""):l.removeAttribute(p);break;case"capture":case"download":y===!0?l.setAttribute(p,""):y!==!1&&y!=null&&typeof y!="function"&&typeof y!="symbol"?l.setAttribute(p,y):l.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":y!=null&&typeof y!="function"&&typeof y!="symbol"&&!isNaN(y)&&1<=y?l.setAttribute(p,y):l.removeAttribute(p);break;case"rowSpan":case"start":y==null||typeof y=="function"||typeof y=="symbol"||isNaN(y)?l.removeAttribute(p):l.setAttribute(p,y);break;case"popover":lt("beforetoggle",l),lt("toggle",l),wu(l,"popover",y);break;case"xlinkActuate":Ui(l,"http://www.w3.org/1999/xlink","xlink:actuate",y);break;case"xlinkArcrole":Ui(l,"http://www.w3.org/1999/xlink","xlink:arcrole",y);break;case"xlinkRole":Ui(l,"http://www.w3.org/1999/xlink","xlink:role",y);break;case"xlinkShow":Ui(l,"http://www.w3.org/1999/xlink","xlink:show",y);break;case"xlinkTitle":Ui(l,"http://www.w3.org/1999/xlink","xlink:title",y);break;case"xlinkType":Ui(l,"http://www.w3.org/1999/xlink","xlink:type",y);break;case"xmlBase":Ui(l,"http://www.w3.org/XML/1998/namespace","xml:base",y);break;case"xmlLang":Ui(l,"http://www.w3.org/XML/1998/namespace","xml:lang",y);break;case"xmlSpace":Ui(l,"http://www.w3.org/XML/1998/namespace","xml:space",y);break;case"is":wu(l,"is",y);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=Kie.get(p)||p,wu(l,p,y))}}function i_(l,u,p,y,T,O){switch(p){case"style":GD(l,y,O);break;case"dangerouslySetInnerHTML":if(y!=null){if(typeof y!="object"||!("__html"in y))throw Error(r(61));if(p=y.__html,p!=null){if(T.children!=null)throw Error(r(60));l.innerHTML=p}}break;case"children":typeof y=="string"?_u(l,y):(typeof y=="number"||typeof y=="bigint")&&_u(l,""+y);break;case"onScroll":y!=null&&lt("scroll",l);break;case"onScrollEnd":y!=null&&lt("scrollend",l);break;case"onClick":y!=null&&(l.onclick=no);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rv.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(T=p.endsWith("Capture"),u=p.slice(2,T?p.length-7:void 0),O=l[sr]||null,O=O!=null?O[p]:null,typeof O=="function"&&l.removeEventListener(u,O,T),typeof y=="function")){typeof O!="function"&&O!==null&&(p in l?l[p]=null:l.hasAttribute(p)&&l.removeAttribute(p)),l.addEventListener(u,y,T);break e}p in l?l[p]=y:y===!0?l.setAttribute(p,""):wu(l,p,y)}}}function Xn(l,u,p){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lt("error",l),lt("load",l);var y=!1,T=!1,O;for(O in p)if(p.hasOwnProperty(O)){var B=p[O];if(B!=null)switch(O){case"src":y=!0;break;case"srcSet":T=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Dt(l,u,O,B,p,null)}}T&&Dt(l,u,"srcSet",p.srcSet,p,null),y&&Dt(l,u,"src",p.src,p,null);return;case"input":lt("invalid",l);var Y=O=B=T=null,re=null,fe=null;for(y in p)if(p.hasOwnProperty(y)){var pe=p[y];if(pe!=null)switch(y){case"name":T=pe;break;case"type":B=pe;break;case"checked":re=pe;break;case"defaultChecked":fe=pe;break;case"value":O=pe;break;case"defaultValue":Y=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,u));break;default:Dt(l,u,y,pe,p,null)}}sv(l,O,Y,re,fe,B,T,!1);return;case"select":lt("invalid",l),y=B=O=null;for(T in p)if(p.hasOwnProperty(T)&&(Y=p[T],Y!=null))switch(T){case"value":O=Y;break;case"defaultValue":B=Y;break;case"multiple":y=Y;default:Dt(l,u,T,Y,p,null)}u=O,p=B,l.multiple=!!y,u!=null?to(l,!!y,u,!1):p!=null&&to(l,!!y,p,!0);return;case"textarea":lt("invalid",l),O=T=y=null;for(B in p)if(p.hasOwnProperty(B)&&(Y=p[B],Y!=null))switch(B){case"value":y=Y;break;case"defaultValue":T=Y;break;case"children":O=Y;break;case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(91));break;default:Dt(l,u,B,Y,p,null)}UD(l,y,T,O);return;case"option":for(re in p)if(p.hasOwnProperty(re)&&(y=p[re],y!=null))switch(re){case"selected":l.selected=y&&typeof y!="function"&&typeof y!="symbol";break;default:Dt(l,u,re,y,p,null)}return;case"dialog":lt("beforetoggle",l),lt("toggle",l),lt("cancel",l),lt("close",l);break;case"iframe":case"object":lt("load",l);break;case"video":case"audio":for(y=0;y<Yh.length;y++)lt(Yh[y],l);break;case"image":lt("error",l),lt("load",l);break;case"details":lt("toggle",l);break;case"embed":case"source":case"link":lt("error",l),lt("load",l);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in p)if(p.hasOwnProperty(fe)&&(y=p[fe],y!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,u));default:Dt(l,u,fe,y,p,null)}return;default:if(y1(u)){for(pe in p)p.hasOwnProperty(pe)&&(y=p[pe],y!==void 0&&i_(l,u,pe,y,p,void 0));return}}for(Y in p)p.hasOwnProperty(Y)&&(y=p[Y],y!=null&&Dt(l,u,Y,y,p,null))}function xoe(l,u,p,y){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var T=null,O=null,B=null,Y=null,re=null,fe=null,pe=null;for(he in p){var ye=p[he];if(p.hasOwnProperty(he)&&ye!=null)switch(he){case"checked":break;case"value":break;case"defaultValue":re=ye;default:y.hasOwnProperty(he)||Dt(l,u,he,null,y,ye)}}for(var de in y){var he=y[de];if(ye=p[de],y.hasOwnProperty(de)&&(he!=null||ye!=null))switch(de){case"type":O=he;break;case"name":T=he;break;case"checked":fe=he;break;case"defaultChecked":pe=he;break;case"value":B=he;break;case"defaultValue":Y=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,u));break;default:he!==ye&&Dt(l,u,de,he,y,ye)}}zl(l,B,Y,re,fe,pe,O,T);return;case"select":he=B=Y=de=null;for(O in p)if(re=p[O],p.hasOwnProperty(O)&&re!=null)switch(O){case"value":break;case"multiple":he=re;default:y.hasOwnProperty(O)||Dt(l,u,O,null,y,re)}for(T in y)if(O=y[T],re=p[T],y.hasOwnProperty(T)&&(O!=null||re!=null))switch(T){case"value":de=O;break;case"defaultValue":Y=O;break;case"multiple":B=O;default:O!==re&&Dt(l,u,T,O,y,re)}u=Y,p=B,y=he,de!=null?to(l,!!p,de,!1):!!y!=!!p&&(u!=null?to(l,!!p,u,!0):to(l,!!p,p?[]:"",!1));return;case"textarea":he=de=null;for(Y in p)if(T=p[Y],p.hasOwnProperty(Y)&&T!=null&&!y.hasOwnProperty(Y))switch(Y){case"value":break;case"children":break;default:Dt(l,u,Y,null,y,T)}for(B in y)if(T=y[B],O=p[B],y.hasOwnProperty(B)&&(T!=null||O!=null))switch(B){case"value":de=T;break;case"defaultValue":he=T;break;case"children":break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:T!==O&&Dt(l,u,B,T,y,O)}VD(l,de,he);return;case"option":for(var Oe in p)if(de=p[Oe],p.hasOwnProperty(Oe)&&de!=null&&!y.hasOwnProperty(Oe))switch(Oe){case"selected":l.selected=!1;break;default:Dt(l,u,Oe,null,y,de)}for(re in y)if(de=y[re],he=p[re],y.hasOwnProperty(re)&&de!==he&&(de!=null||he!=null))switch(re){case"selected":l.selected=de&&typeof de!="function"&&typeof de!="symbol";break;default:Dt(l,u,re,de,y,he)}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 qe in p)de=p[qe],p.hasOwnProperty(qe)&&de!=null&&!y.hasOwnProperty(qe)&&Dt(l,u,qe,null,y,de);for(fe in y)if(de=y[fe],he=p[fe],y.hasOwnProperty(fe)&&de!==he&&(de!=null||he!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,u));break;default:Dt(l,u,fe,de,y,he)}return;default:if(y1(u)){for(var It in p)de=p[It],p.hasOwnProperty(It)&&de!==void 0&&!y.hasOwnProperty(It)&&i_(l,u,It,void 0,y,de);for(pe in y)de=y[pe],he=p[pe],!y.hasOwnProperty(pe)||de===he||de===void 0&&he===void 0||i_(l,u,pe,de,y,he);return}}for(var le in p)de=p[le],p.hasOwnProperty(le)&&de!=null&&!y.hasOwnProperty(le)&&Dt(l,u,le,null,y,de);for(ye in y)de=y[ye],he=p[ye],!y.hasOwnProperty(ye)||de===he||de==null&&he==null||Dt(l,u,ye,de,y,he)}function K$(l){switch(l){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function woe(){if(typeof performance.getEntriesByType=="function"){for(var l=0,u=0,p=performance.getEntriesByType("resource"),y=0;y<p.length;y++){var T=p[y],O=T.transferSize,B=T.initiatorType,Y=T.duration;if(O&&Y&&K$(B)){for(B=0,Y=T.responseEnd,y+=1;y<p.length;y++){var re=p[y],fe=re.startTime;if(fe>Y)break;var pe=re.transferSize,ye=re.initiatorType;pe&&K$(ye)&&(re=re.responseEnd,B+=pe*(re<Y?1:(Y-fe)/(re-fe)))}if(--y,u+=8*(O+B)/(T.duration/1e3),l++,10<l)break}}if(0<l)return u/l/1e6}return navigator.connection&&(l=navigator.connection.downlink,typeof l=="number")?l:5}var a_=null,o_=null;function ry(l){return l.nodeType===9?l:l.ownerDocument}function W$(l){switch(l){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Y$(l,u){if(l===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return l===1&&u==="foreignObject"?0:l}function s_(l,u){return l==="textarea"||l==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var l_=null;function Soe(){var l=window.event;return l&&l.type==="popstate"?l===l_?!1:(l_=l,!0):(l_=null,!1)}var X$=typeof setTimeout=="function"?setTimeout:void 0,_oe=typeof clearTimeout=="function"?clearTimeout:void 0,Q$=typeof Promise=="function"?Promise:void 0,Eoe=typeof queueMicrotask=="function"?queueMicrotask:typeof Q$<"u"?function(l){return Q$.resolve(null).then(l).catch(Aoe)}:X$;function Aoe(l){setTimeout(function(){throw l})}function Ms(l){return l==="head"}function Z$(l,u){var p=u,y=0;do{var T=p.nextSibling;if(l.removeChild(p),T&&T.nodeType===8)if(p=T.data,p==="/$"||p==="/&"){if(y===0){l.removeChild(T),ef(u);return}y--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")y++;else if(p==="html")Qh(l.ownerDocument.documentElement);else if(p==="head"){p=l.ownerDocument.head,Qh(p);for(var O=p.firstChild;O;){var B=O.nextSibling,Y=O.nodeName;O[Bl]||Y==="SCRIPT"||Y==="STYLE"||Y==="LINK"&&O.rel.toLowerCase()==="stylesheet"||p.removeChild(O),O=B}}else p==="body"&&Qh(l.ownerDocument.body);p=T}while(p);ef(u)}function J$(l,u){var p=l;l=0;do{var y=p.nextSibling;if(p.nodeType===1?u?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(u?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),y&&y.nodeType===8)if(p=y.data,p==="/$"){if(l===0)break;l--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||l++;p=y}while(p)}function c_(l){var u=l.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var p=u;switch(u=u.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":c_(p),ph(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}l.removeChild(p)}}function Coe(l,u,p,y){for(;l.nodeType===1;){var T=p;if(l.nodeName.toLowerCase()!==u.toLowerCase()){if(!y&&(l.nodeName!=="INPUT"||l.type!=="hidden"))break}else if(y){if(!l[Bl])switch(u){case"meta":if(!l.hasAttribute("itemprop"))break;return l;case"link":if(O=l.getAttribute("rel"),O==="stylesheet"&&l.hasAttribute("data-precedence"))break;if(O!==T.rel||l.getAttribute("href")!==(T.href==null||T.href===""?null:T.href)||l.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin)||l.getAttribute("title")!==(T.title==null?null:T.title))break;return l;case"style":if(l.hasAttribute("data-precedence"))break;return l;case"script":if(O=l.getAttribute("src"),(O!==(T.src==null?null:T.src)||l.getAttribute("type")!==(T.type==null?null:T.type)||l.getAttribute("crossorigin")!==(T.crossOrigin==null?null:T.crossOrigin))&&O&&l.hasAttribute("async")&&!l.hasAttribute("itemprop"))break;return l;default:return l}}else if(u==="input"&&l.type==="hidden"){var O=T.name==null?null:""+T.name;if(T.type==="hidden"&&l.getAttribute("name")===O)return l}else return l;if(l=wi(l.nextSibling),l===null)break}return null}function Toe(l,u,p){if(u==="")return null;for(;l.nodeType!==3;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!p||(l=wi(l.nextSibling),l===null))return null;return l}function e3(l,u){for(;l.nodeType!==8;)if((l.nodeType!==1||l.nodeName!=="INPUT"||l.type!=="hidden")&&!u||(l=wi(l.nextSibling),l===null))return null;return l}function u_(l){return l.data==="$?"||l.data==="$~"}function f_(l){return l.data==="$!"||l.data==="$?"&&l.ownerDocument.readyState!=="loading"}function joe(l,u){var p=l.ownerDocument;if(l.data==="$~")l._reactRetry=u;else if(l.data!=="$?"||p.readyState!=="loading")u();else{var y=function(){u(),p.removeEventListener("DOMContentLoaded",y)};p.addEventListener("DOMContentLoaded",y),l._reactRetry=y}}function wi(l){for(;l!=null;l=l.nextSibling){var u=l.nodeType;if(u===1||u===3)break;if(u===8){if(u=l.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return l}var d_=null;function t3(l){l=l.nextSibling;for(var u=0;l;){if(l.nodeType===8){var p=l.data;if(p==="/$"||p==="/&"){if(u===0)return wi(l.nextSibling);u--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||u++}l=l.nextSibling}return null}function n3(l){l=l.previousSibling;for(var u=0;l;){if(l.nodeType===8){var p=l.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(u===0)return l;u--}else p!=="/$"&&p!=="/&"||u++}l=l.previousSibling}return null}function r3(l,u,p){switch(u=ry(p),l){case"html":if(l=u.documentElement,!l)throw Error(r(452));return l;case"head":if(l=u.head,!l)throw Error(r(453));return l;case"body":if(l=u.body,!l)throw Error(r(454));return l;default:throw Error(r(451))}}function Qh(l){for(var u=l.attributes;u.length;)l.removeAttributeNode(u[0]);ph(l)}var Si=new Map,i3=new Set;function iy(l){return typeof l.getRootNode=="function"?l.getRootNode():l.nodeType===9?l:l.ownerDocument}var bo=z.d;z.d={f:Noe,r:Ooe,D:Moe,C:Roe,L:Poe,m:koe,X:Ioe,S:Doe,M:Loe};function Noe(){var l=bo.f(),u=Yv();return l||u}function Ooe(l){var u=cs(l);u!==null&&u.tag===5&&u.type==="form"?wL(u):bo.r(l)}var Qu=typeof document>"u"?null:document;function a3(l,u,p){var y=Qu;if(y&&typeof u=="string"&&u){var T=Er(u);T='link[rel="'+l+'"][href="'+T+'"]',typeof p=="string"&&(T+='[crossorigin="'+p+'"]'),i3.has(T)||(i3.add(T),l={rel:l,crossOrigin:p,href:u},y.querySelector(T)===null&&(u=y.createElement("link"),Xn(u,"link",l),vn(u),y.head.appendChild(u)))}}function Moe(l){bo.D(l),a3("dns-prefetch",l,null)}function Roe(l,u){bo.C(l,u),a3("preconnect",l,u)}function Poe(l,u,p){bo.L(l,u,p);var y=Qu;if(y&&l&&u){var T='link[rel="preload"][as="'+Er(u)+'"]';u==="image"&&p&&p.imageSrcSet?(T+='[imagesrcset="'+Er(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(T+='[imagesizes="'+Er(p.imageSizes)+'"]')):T+='[href="'+Er(l)+'"]';var O=T;switch(u){case"style":O=Zu(l);break;case"script":O=Ju(l)}Si.has(O)||(l=d({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:l,as:u},p),Si.set(O,l),y.querySelector(T)!==null||u==="style"&&y.querySelector(Zh(O))||u==="script"&&y.querySelector(Jh(O))||(u=y.createElement("link"),Xn(u,"link",l),vn(u),y.head.appendChild(u)))}}function koe(l,u){bo.m(l,u);var p=Qu;if(p&&l){var y=u&&typeof u.as=="string"?u.as:"script",T='link[rel="modulepreload"][as="'+Er(y)+'"][href="'+Er(l)+'"]',O=T;switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Ju(l)}if(!Si.has(O)&&(l=d({rel:"modulepreload",href:l},u),Si.set(O,l),p.querySelector(T)===null)){switch(y){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(Jh(O)))return}y=p.createElement("link"),Xn(y,"link",l),vn(y),p.head.appendChild(y)}}}function Doe(l,u,p){bo.S(l,u,p);var y=Qu;if(y&&l){var T=fs(y).hoistableStyles,O=Zu(l);u=u||"default";var B=T.get(O);if(!B){var Y={loading:0,preload:null};if(B=y.querySelector(Zh(O)))Y.loading=5;else{l=d({rel:"stylesheet",href:l,"data-precedence":u},p),(p=Si.get(O))&&h_(l,p);var re=B=y.createElement("link");vn(re),Xn(re,"link",l),re._p=new Promise(function(fe,pe){re.onload=fe,re.onerror=pe}),re.addEventListener("load",function(){Y.loading|=1}),re.addEventListener("error",function(){Y.loading|=2}),Y.loading|=4,ay(B,u,y)}B={type:"stylesheet",instance:B,count:1,state:Y},T.set(O,B)}}}function Ioe(l,u){bo.X(l,u);var p=Qu;if(p&&l){var y=fs(p).hoistableScripts,T=Ju(l),O=y.get(T);O||(O=p.querySelector(Jh(T)),O||(l=d({src:l,async:!0},u),(u=Si.get(T))&&p_(l,u),O=p.createElement("script"),vn(O),Xn(O,"link",l),p.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},y.set(T,O))}}function Loe(l,u){bo.M(l,u);var p=Qu;if(p&&l){var y=fs(p).hoistableScripts,T=Ju(l),O=y.get(T);O||(O=p.querySelector(Jh(T)),O||(l=d({src:l,async:!0,type:"module"},u),(u=Si.get(T))&&p_(l,u),O=p.createElement("script"),vn(O),Xn(O,"link",l),p.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},y.set(T,O))}}function o3(l,u,p,y){var T=(T=J.current)?iy(T):null;if(!T)throw Error(r(446));switch(l){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=Zu(p.href),p=fs(T).hoistableStyles,y=p.get(u),y||(y={type:"style",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){l=Zu(p.href);var O=fs(T).hoistableStyles,B=O.get(l);if(B||(T=T.ownerDocument||T,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(l,B),(O=T.querySelector(Zh(l)))&&!O._p&&(B.instance=O,B.state.loading=5),Si.has(l)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Si.set(l,p),O||$oe(T,l,p,B.state))),u&&y===null)throw Error(r(528,""));return B}if(u&&y!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=Ju(p),p=fs(T).hoistableScripts,y=p.get(u),y||(y={type:"script",instance:null,count:0,state:null},p.set(u,y)),y):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function Zu(l){return'href="'+Er(l)+'"'}function Zh(l){return'link[rel="stylesheet"]['+l+"]"}function s3(l){return d({},l,{"data-precedence":l.precedence,precedence:null})}function $oe(l,u,p,y){l.querySelector('link[rel="preload"][as="style"]['+u+"]")?y.loading=1:(u=l.createElement("link"),y.preload=u,u.addEventListener("load",function(){return y.loading|=1}),u.addEventListener("error",function(){return y.loading|=2}),Xn(u,"link",p),vn(u),l.head.appendChild(u))}function Ju(l){return'[src="'+Er(l)+'"]'}function Jh(l){return"script[async]"+l}function l3(l,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var y=l.querySelector('style[data-href~="'+Er(p.href)+'"]');if(y)return u.instance=y,vn(y),y;var T=d({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return y=(l.ownerDocument||l).createElement("style"),vn(y),Xn(y,"style",T),ay(y,p.precedence,l),u.instance=y;case"stylesheet":T=Zu(p.href);var O=l.querySelector(Zh(T));if(O)return u.state.loading|=4,u.instance=O,vn(O),O;y=s3(p),(T=Si.get(T))&&h_(y,T),O=(l.ownerDocument||l).createElement("link"),vn(O);var B=O;return B._p=new Promise(function(Y,re){B.onload=Y,B.onerror=re}),Xn(O,"link",y),u.state.loading|=4,ay(O,p.precedence,l),u.instance=O;case"script":return O=Ju(p.src),(T=l.querySelector(Jh(O)))?(u.instance=T,vn(T),T):(y=p,(T=Si.get(O))&&(y=d({},p),p_(y,T)),l=l.ownerDocument||l,T=l.createElement("script"),vn(T),Xn(T,"link",y),l.head.appendChild(T),u.instance=T);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(y=u.instance,u.state.loading|=4,ay(y,p.precedence,l));return u.instance}function ay(l,u,p){for(var y=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),T=y.length?y[y.length-1]:null,O=T,B=0;B<y.length;B++){var Y=y[B];if(Y.dataset.precedence===u)O=Y;else if(O!==T)break}O?O.parentNode.insertBefore(l,O.nextSibling):(u=p.nodeType===9?p.head:p,u.insertBefore(l,u.firstChild))}function h_(l,u){l.crossOrigin==null&&(l.crossOrigin=u.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=u.referrerPolicy),l.title==null&&(l.title=u.title)}function p_(l,u){l.crossOrigin==null&&(l.crossOrigin=u.crossOrigin),l.referrerPolicy==null&&(l.referrerPolicy=u.referrerPolicy),l.integrity==null&&(l.integrity=u.integrity)}var oy=null;function c3(l,u,p){if(oy===null){var y=new Map,T=oy=new Map;T.set(p,y)}else T=oy,y=T.get(p),y||(y=new Map,T.set(p,y));if(y.has(l))return y;for(y.set(l,null),p=p.getElementsByTagName(l),T=0;T<p.length;T++){var O=p[T];if(!(O[Bl]||O[jn]||l==="link"&&O.getAttribute("rel")==="stylesheet")&&O.namespaceURI!=="http://www.w3.org/2000/svg"){var B=O.getAttribute(u)||"";B=l+B;var Y=y.get(B);Y?Y.push(O):y.set(B,[O])}}return y}function u3(l,u,p){l=l.ownerDocument||l,l.head.insertBefore(p,u==="title"?l.querySelector("head > title"):null)}function Boe(l,u,p){if(p===1||u.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return l=u.disabled,typeof u.precedence=="string"&&l==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function f3(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function qoe(l,u,p,y){if(p.type==="stylesheet"&&(typeof y.media!="string"||matchMedia(y.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var T=Zu(y.href),O=u.querySelector(Zh(T));if(O){u=O._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(l.count++,l=sy.bind(l),u.then(l,l)),p.state.loading|=4,p.instance=O,vn(O);return}O=u.ownerDocument||u,y=s3(y),(T=Si.get(T))&&h_(y,T),O=O.createElement("link"),vn(O);var B=O;B._p=new Promise(function(Y,re){B.onload=Y,B.onerror=re}),Xn(O,"link",y),p.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(l.count++,p=sy.bind(l),u.addEventListener("load",p),u.addEventListener("error",p))}}var m_=0;function zoe(l,u){return l.stylesheets&&l.count===0&&cy(l,l.stylesheets),0<l.count||0<l.imgCount?function(p){var y=setTimeout(function(){if(l.stylesheets&&cy(l,l.stylesheets),l.unsuspend){var O=l.unsuspend;l.unsuspend=null,O()}},6e4+u);0<l.imgBytes&&m_===0&&(m_=62500*woe());var T=setTimeout(function(){if(l.waitingForImages=!1,l.count===0&&(l.stylesheets&&cy(l,l.stylesheets),l.unsuspend)){var O=l.unsuspend;l.unsuspend=null,O()}},(l.imgBytes>m_?50:800)+u);return l.unsuspend=p,function(){l.unsuspend=null,clearTimeout(y),clearTimeout(T)}}:null}function sy(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cy(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var ly=null;function cy(l,u){l.stylesheets=null,l.unsuspend!==null&&(l.count++,ly=new Map,u.forEach(Foe,l),ly=null,sy.call(l))}function Foe(l,u){if(!(u.state.loading&4)){var p=ly.get(l);if(p)var y=p.get(null);else{p=new Map,ly.set(l,p);for(var T=l.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O<T.length;O++){var B=T[O];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(p.set(B.dataset.precedence,B),y=B)}y&&p.set(null,y)}T=u.instance,B=T.getAttribute("data-precedence"),O=p.get(B)||y,O===y&&p.set(null,T),p.set(B,T),this.count++,y=sy.bind(this),T.addEventListener("load",y),T.addEventListener("error",y),O?O.parentNode.insertBefore(T,O.nextSibling):(l=l.nodeType===9?l.head:l,l.insertBefore(T,l.firstChild)),u.state.loading|=4}}var ep={$$typeof:_,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function Voe(l,u,p,y,T,O,B,Y,re){this.tag=1,this.containerInfo=l,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=ba(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ba(0),this.hiddenUpdates=ba(null),this.identifierPrefix=y,this.onUncaughtError=T,this.onCaughtError=O,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function d3(l,u,p,y,T,O,B,Y,re,fe,pe,ye){return l=new Voe(l,u,p,B,re,fe,pe,ye,Y),u=1,O===!0&&(u|=24),O=Hr(3,null,null,u),l.current=O,O.stateNode=l,u=W1(),u.refCount++,l.pooledCache=u,u.refCount++,O.memoizedState={element:y,isDehydrated:p,cache:u},Z1(O),l}function h3(l){return l?(l=Ou,l):Ou}function p3(l,u,p,y,T,O){T=h3(T),y.context===null?y.context=T:y.pendingContext=T,y=xs(u),y.payload={element:p},O=O===void 0?null:O,O!==null&&(y.callback=O),p=ws(l,y,u),p!==null&&(Or(p,l,u),Rh(p,l,u))}function m3(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var p=l.retryLane;l.retryLane=p!==0&&p<u?p:u}}function g_(l,u){m3(l,u),(l=l.alternate)&&m3(l,u)}function g3(l){if(l.tag===13||l.tag===31){var u=Hl(l,67108864);u!==null&&Or(u,l,67108864),g_(l,67108864)}}function v3(l){if(l.tag===13||l.tag===31){var u=Xr();u=ss(u);var p=Hl(l,u);p!==null&&Or(p,l,u),g_(l,u)}}var uy=!0;function Uoe(l,u,p,y){var T=k.T;k.T=null;var O=z.p;try{z.p=2,v_(l,u,p,y)}finally{z.p=O,k.T=T}}function Hoe(l,u,p,y){var T=k.T;k.T=null;var O=z.p;try{z.p=8,v_(l,u,p,y)}finally{z.p=O,k.T=T}}function v_(l,u,p,y){if(uy){var T=y_(y);if(T===null)r_(l,u,y,fy,p),b3(l,y);else if(Koe(T,l,u,p,y))y.stopPropagation();else if(b3(l,y),u&4&&-1<Goe.indexOf(l)){for(;T!==null;){var O=cs(T);if(O!==null)switch(O.tag){case 3:if(O=O.stateNode,O.current.memoizedState.isDehydrated){var B=pi(O.pendingLanes);if(B!==0){var Y=O;for(Y.pendingLanes|=2,Y.entangledLanes|=2;B;){var re=1<<31-$n(B);Y.entanglements[1]|=re,B&=~re}Ea(O),(At&6)===0&&(Kv=Tt()+500,Wh(0))}}break;case 31:case 13:Y=Hl(O,2),Y!==null&&Or(Y,O,2),Yv(),g_(O,2)}if(O=y_(y),O===null&&r_(l,u,y,fy,p),O===T)break;T=O}T!==null&&y.stopPropagation()}else r_(l,u,y,null,p)}}function y_(l){return l=x1(l),b_(l)}var fy=null;function b_(l){if(fy=null,l=ls(l),l!==null){var u=a(l);if(u===null)l=null;else{var p=u.tag;if(p===13){if(l=o(u),l!==null)return l;l=null}else if(p===31){if(l=s(u),l!==null)return l;l=null}else if(p===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;l=null}else u!==l&&(l=null)}}return fy=l,null}function y3(l){switch(l){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(We()){case Et:return 2;case hn:return 8;case Tn:case ya:return 32;case rr:return 268435456;default:return 32}default:return 32}}var x_=!1,Rs=null,Ps=null,ks=null,tp=new Map,np=new Map,Ds=[],Goe="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 b3(l,u){switch(l){case"focusin":case"focusout":Rs=null;break;case"dragenter":case"dragleave":Ps=null;break;case"mouseover":case"mouseout":ks=null;break;case"pointerover":case"pointerout":tp.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":np.delete(u.pointerId)}}function rp(l,u,p,y,T,O){return l===null||l.nativeEvent!==O?(l={blockedOn:u,domEventName:p,eventSystemFlags:y,nativeEvent:O,targetContainers:[T]},u!==null&&(u=cs(u),u!==null&&g3(u)),l):(l.eventSystemFlags|=y,u=l.targetContainers,T!==null&&u.indexOf(T)===-1&&u.push(T),l)}function Koe(l,u,p,y,T){switch(u){case"focusin":return Rs=rp(Rs,l,u,p,y,T),!0;case"dragenter":return Ps=rp(Ps,l,u,p,y,T),!0;case"mouseover":return ks=rp(ks,l,u,p,y,T),!0;case"pointerover":var O=T.pointerId;return tp.set(O,rp(tp.get(O)||null,l,u,p,y,T)),!0;case"gotpointercapture":return O=T.pointerId,np.set(O,rp(np.get(O)||null,l,u,p,y,T)),!0}return!1}function x3(l){var u=ls(l.target);if(u!==null){var p=a(u);if(p!==null){if(u=p.tag,u===13){if(u=o(p),u!==null){l.blockedOn=u,Jg(l.priority,function(){v3(p)});return}}else if(u===31){if(u=s(p),u!==null){l.blockedOn=u,Jg(l.priority,function(){v3(p)});return}}else if(u===3&&p.stateNode.current.memoizedState.isDehydrated){l.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}l.blockedOn=null}function dy(l){if(l.blockedOn!==null)return!1;for(var u=l.targetContainers;0<u.length;){var p=y_(l.nativeEvent);if(p===null){p=l.nativeEvent;var y=new p.constructor(p.type,p);b1=y,p.target.dispatchEvent(y),b1=null}else return u=cs(p),u!==null&&g3(u),l.blockedOn=p,!1;u.shift()}return!0}function w3(l,u,p){dy(l)&&p.delete(u)}function Woe(){x_=!1,Rs!==null&&dy(Rs)&&(Rs=null),Ps!==null&&dy(Ps)&&(Ps=null),ks!==null&&dy(ks)&&(ks=null),tp.forEach(w3),np.forEach(w3)}function hy(l,u){l.blockedOn===u&&(l.blockedOn=null,x_||(x_=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Woe)))}var py=null;function S3(l){py!==l&&(py=l,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){py===l&&(py=null);for(var u=0;u<l.length;u+=3){var p=l[u],y=l[u+1],T=l[u+2];if(typeof y!="function"){if(b_(y||p)===null)continue;break}var O=cs(p);O!==null&&(l.splice(u,3),u-=3,yS(O,{pending:!0,data:T,method:p.method,action:y},y,T))}}))}function ef(l){function u(re){return hy(re,l)}Rs!==null&&hy(Rs,l),Ps!==null&&hy(Ps,l),ks!==null&&hy(ks,l),tp.forEach(u),np.forEach(u);for(var p=0;p<Ds.length;p++){var y=Ds[p];y.blockedOn===l&&(y.blockedOn=null)}for(;0<Ds.length&&(p=Ds[0],p.blockedOn===null);)x3(p),p.blockedOn===null&&Ds.shift();if(p=(l.ownerDocument||l).$$reactFormReplay,p!=null)for(y=0;y<p.length;y+=3){var T=p[y],O=p[y+1],B=T[sr]||null;if(typeof O=="function")B||S3(p);else if(B){var Y=null;if(O&&O.hasAttribute("formAction")){if(T=O,B=O[sr]||null)Y=B.formAction;else if(b_(T)!==null)continue}else Y=B.action;typeof Y=="function"?p[y+1]=Y:(p.splice(y,3),y-=3),S3(p)}}}function _3(){function l(O){O.canIntercept&&O.info==="react-transition"&&O.intercept({handler:function(){return new Promise(function(B){return T=B})},focusReset:"manual",scroll:"manual"})}function u(){T!==null&&(T(),T=null),y||setTimeout(p,20)}function p(){if(!y&&!navigation.transition){var O=navigation.currentEntry;O&&O.url!=null&&navigation.navigate(O.url,{state:O.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var y=!1,T=null;return navigation.addEventListener("navigate",l),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(p,100),function(){y=!0,navigation.removeEventListener("navigate",l),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),T!==null&&(T(),T=null)}}}function w_(l){this._internalRoot=l}my.prototype.render=w_.prototype.render=function(l){var u=this._internalRoot;if(u===null)throw Error(r(409));var p=u.current,y=Xr();p3(p,y,l,u,null,null)},my.prototype.unmount=w_.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var u=l.containerInfo;p3(l.current,2,null,l,null,null),Yv(),u[Ja]=null}};function my(l){this._internalRoot=l}my.prototype.unstable_scheduleHydration=function(l){if(l){var u=hh();l={blockedOn:null,target:l,priority:u};for(var p=0;p<Ds.length&&u!==0&&u<Ds[p].priority;p++);Ds.splice(p,0,l),p===0&&x3(l)}};var E3=t.version;if(E3!=="19.2.6")throw Error(r(527,E3,"19.2.6"));z.findDOMNode=function(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(r(188)):(l=Object.keys(l).join(","),Error(r(268,l)));return l=f(u),l=l!==null?h(l):null,l=l===null?null:l.stateNode,l};var Yoe={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var gy=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gy.isDisabled&&gy.supportsFiber)try{Ln=gy.inject(Yoe),Ht=gy}catch{}}return ap.createRoot=function(l,u){if(!i(l))throw Error(r(299));var p=!1,y="",T=ML,O=RL,B=PL;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(T=u.onUncaughtError),u.onCaughtError!==void 0&&(O=u.onCaughtError),u.onRecoverableError!==void 0&&(B=u.onRecoverableError)),u=d3(l,1,!1,null,null,p,y,null,T,O,B,_3),l[Ja]=u.current,n_(l),new w_(u)},ap.hydrateRoot=function(l,u,p){if(!i(l))throw Error(r(299));var y=!1,T="",O=ML,B=RL,Y=PL,re=null;return p!=null&&(p.unstable_strictMode===!0&&(y=!0),p.identifierPrefix!==void 0&&(T=p.identifierPrefix),p.onUncaughtError!==void 0&&(O=p.onUncaughtError),p.onCaughtError!==void 0&&(B=p.onCaughtError),p.onRecoverableError!==void 0&&(Y=p.onRecoverableError),p.formState!==void 0&&(re=p.formState)),u=d3(l,1,!0,u,p??null,y,T,re,O,B,Y,_3),u.context=h3(null),p=u.current,y=Xr(),y=ss(y),T=xs(y),T.callback=null,ws(p,T,y),p=y,u.current.lanes=p,Gt(u,p),Ea(u),l[Ja]=u.current,n_(l),new my(u)},ap.version="19.2.6",ap}var D3;function ase(){if(D3)return A_.exports;D3=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(),A_.exports=ise(),A_.exports}var ose=ase();const sse=Ct(ose);var Ld=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(){}},_c,Zs,Df,DG,lse=(DG=class extends Ld{constructor(){super();De(this,_c);De(this,Zs);De(this,Df);Ce(this,Df,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ie(this,Zs)||this.setEventListener(ie(this,Df))}onUnsubscribe(){var t;this.hasListeners()||((t=ie(this,Zs))==null||t.call(this),Ce(this,Zs,void 0))}setEventListener(t){var n;Ce(this,Df,t),(n=ie(this,Zs))==null||n.call(this),Ce(this,Zs,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ie(this,_c)!==t&&(Ce(this,_c,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof ie(this,_c)=="boolean"?ie(this,_c):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},_c=new WeakMap,Zs=new WeakMap,Df=new WeakMap,DG),LP=new lse,cse={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Js,DP,IG,use=(IG=class{constructor(){De(this,Js,cse);De(this,DP,!1)}setTimeoutProvider(e){Ce(this,Js,e)}setTimeout(e,t){return ie(this,Js).setTimeout(e,t)}clearTimeout(e){ie(this,Js).clearTimeout(e)}setInterval(e,t){return ie(this,Js).setInterval(e,t)}clearInterval(e){ie(this,Js).clearInterval(e)}},Js=new WeakMap,DP=new WeakMap,IG),hc=new use;function fse(e){setTimeout(e,0)}var dse=typeof window>"u"||"Deno"in globalThis;function vr(){}function hse(e,t){return typeof e=="function"?e(t):e}function qO(e){return typeof e=="number"&&e>=0&&e!==1/0}function KG(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ml(e,t){return typeof e=="function"?e(t):e}function ei(e,t){return typeof e=="function"?e(t):e}function I3(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==$P(o,t.options))return!1}else if(!Yp(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function L3(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(zc(t.options.mutationKey)!==zc(a))return!1}else if(!Yp(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function $P(e,t){return((t==null?void 0:t.queryKeyHashFn)||zc)(e)}function zc(e){return JSON.stringify(e,(t,n)=>zO(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 pse=Object.prototype.hasOwnProperty;function WG(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=$3(e)&&$3(t);if(!r&&!(zO(e)&&zO(t)))return t;const a=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),s=o.length,c=r?new Array(s):{};let f=0;for(let h=0;h<s;h++){const d=r?h:o[h],m=e[d],v=t[d];if(m===v){c[d]=m,(r?h<a:pse.call(e,d))&&f++;continue}if(m===null||v===null||typeof m!="object"||typeof v!="object"){c[d]=v;continue}const x=WG(m,v,n+1);c[d]=x,x===m&&f++}return a===s&&f===a?e:c}function Cb(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 $3(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zO(e){if(!B3(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!B3(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function B3(e){return Object.prototype.toString.call(e)==="[object Object]"}function mse(e){return new Promise(t=>{hc.setTimeout(t,e)})}function FO(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?WG(e,t):t}function gse(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function vse(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var BP=Symbol();function YG(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===BP?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function qP(e,t){return typeof e=="function"?e(...t):!!e}function yse(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 Xp=(()=>{let e=()=>dse;return{isServer(){return e()},setIsServer(t){e=t}}})();function VO(){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 bse=fse;function xse(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=bse;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(c=>{n(c)})})})};return{batch:s=>{let c;t++;try{c=s()}finally{t--,t||o()}return c},batchCalls:s=>(...c)=>{a(()=>{s(...c)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Pn=xse(),If,el,Lf,LG,wse=(LG=class extends Ld{constructor(){super();De(this,If,!0);De(this,el);De(this,Lf);Ce(this,Lf,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){ie(this,el)||this.setEventListener(ie(this,Lf))}onUnsubscribe(){var t;this.hasListeners()||((t=ie(this,el))==null||t.call(this),Ce(this,el,void 0))}setEventListener(t){var n;Ce(this,Lf,t),(n=ie(this,el))==null||n.call(this),Ce(this,el,t(this.setOnline.bind(this)))}setOnline(t){ie(this,If)!==t&&(Ce(this,If,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return ie(this,If)}},If=new WeakMap,el=new WeakMap,Lf=new WeakMap,LG),Tb=new wse;function Sse(e){return Math.min(1e3*2**e,3e4)}function XG(e){return(e??"online")==="online"?Tb.isOnline():!0}var UO=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function QG(e){let t=!1,n=0,r;const i=VO(),a=()=>i.status!=="pending",o=w=>{var b;if(!a()){const S=new UO(w);m(S),(b=e.onCancel)==null||b.call(e,S)}},s=()=>{t=!0},c=()=>{t=!1},f=()=>LP.isFocused()&&(e.networkMode==="always"||Tb.isOnline())&&e.canRun(),h=()=>XG(e.networkMode)&&e.canRun(),d=w=>{a()||(r==null||r(),i.resolve(w))},m=w=>{a()||(r==null||r(),i.reject(w))},v=()=>new Promise(w=>{var b;r=S=>{(a()||f())&&w(S)},(b=e.onPause)==null||b.call(e)}).then(()=>{var w;r=void 0,a()||(w=e.onContinue)==null||w.call(e)}),x=()=>{if(a())return;let w;const b=n===0?e.initialPromise:void 0;try{w=b??e.fn()}catch(S){w=Promise.reject(S)}Promise.resolve(w).then(d).catch(S=>{var N;if(a())return;const E=e.retry??(Xp.isServer()?0:3),_=e.retryDelay??Sse,A=typeof _=="function"?_(n,S):_,C=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,S);if(t||!C){m(S);return}n++,(N=e.onFail)==null||N.call(e,n,S),mse(A).then(()=>f()?void 0:v()).then(()=>{t?m(S):x()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:s,continueRetry:c,canStart:h,start:()=>(h()?x():v().then(x),i)}}var Ec,$G,ZG=($G=class{constructor(){De(this,Ec)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qO(this.gcTime)&&Ce(this,Ec,hc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xp.isServer()?1/0:300*1e3))}clearGcTimeout(){ie(this,Ec)!==void 0&&(hc.clearTimeout(ie(this,Ec)),Ce(this,Ec,void 0))}},Ec=new WeakMap,$G);function _se(e){return{onFetch:(t,n)=>{var h,d,m,v,x;const r=t.options,i=(m=(d=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,a=((v=t.state.data)==null?void 0:v.pages)||[],o=((x=t.state.data)==null?void 0:x.pageParams)||[];let s={pages:[],pageParams:[]},c=0;const f=async()=>{let w=!1;const b=_=>{yse(_,()=>t.signal,()=>w=!0)},S=YG(t.options,t.fetchOptions),E=async(_,A,C)=>{if(w)return Promise.reject(t.signal.reason);if(A==null&&_.pages.length)return Promise.resolve(_);const M=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:A,direction:C?"backward":"forward",meta:t.options.meta};return b(L),L})(),R=await S(M),{maxPages:P}=t.options,$=C?vse:gse;return{pages:$(_.pages,R,P),pageParams:$(_.pageParams,A,P)}};if(i&&a.length){const _=i==="backward",A=_?JG:HO,C={pages:a,pageParams:o},N=A(r,C);s=await E(C,N,_)}else{const _=e??a.length;do{const A=c===0?o[0]??r.initialPageParam:HO(r,s);if(c>0&&A==null)break;s=await E(s,A),c++}while(c<_)}return s};t.options.persister?t.fetchFn=()=>{var w,b;return(b=(w=t.options).persister)==null?void 0:b.call(w,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function HO(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 JG(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 Ese(e,t){return t?HO(e,t)!=null:!1}function Ase(e,t){return!t||!e.getPreviousPageParam?!1:JG(e,t)!=null}var $f,Ac,Bf,Ci,Cc,zn,sg,Tc,Jr,e7,_o,BG,Cse=(BG=class extends ZG{constructor(t){super();De(this,Jr);De(this,$f);De(this,Ac);De(this,Bf);De(this,Ci);De(this,Cc);De(this,zn);De(this,sg);De(this,Tc);Ce(this,Tc,!1),Ce(this,sg,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ce(this,Cc,t.client),Ce(this,Ci,ie(this,Cc).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ce(this,Ac,z3(this.options)),this.state=t.state??ie(this,Ac),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return ie(this,$f)}get promise(){var t;return(t=ie(this,zn))==null?void 0:t.promise}setOptions(t){if(this.options={...ie(this,sg),...t},t!=null&&t._type&&Ce(this,$f,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=z3(this.options);n.data!==void 0&&(this.setState(q3(n.data,n.dataUpdatedAt)),Ce(this,Ac,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ie(this,Ci).remove(this)}setData(t,n){const r=FO(this.state.data,t,this.options);return Ze(this,Jr,_o).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Ze(this,Jr,_o).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=ie(this,zn))==null?void 0:r.promise;return(i=ie(this,zn))==null||i.cancel(t),n?n.then(vr).catch(vr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return ie(this,Ac)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>ei(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===BP||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ml(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:!KG(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=ie(this,zn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=ie(this,zn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ie(this,Ci).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(ie(this,zn)&&(ie(this,Tc)||Ze(this,Jr,e7).call(this)?ie(this,zn).cancel({revert:!0}):ie(this,zn).cancelRetry()),this.scheduleGc()),ie(this,Ci).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ze(this,Jr,_o).call(this,{type:"invalidate"})}async fetch(t,n){var f,h,d,m,v,x,w,b,S,E,_;if(this.state.fetchStatus!=="idle"&&((f=ie(this,zn))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(ie(this,zn))return ie(this,zn).continueRetry(),ie(this,zn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(C=>C.options.queryFn);A&&this.setOptions(A.options)}const r=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(Ce(this,Tc,!0),r.signal)})},a=()=>{const A=YG(this.options,n),N=(()=>{const M={client:ie(this,Cc),queryKey:this.queryKey,meta:this.meta};return i(M),M})();return Ce(this,Tc,!1),this.options.persister?this.options.persister(A,N,this):A(N)},s=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:ie(this,Cc),state:this.state,fetchFn:a};return i(A),A})(),c=ie(this,$f)==="infinite"?_se(this.options.pages):this.options.behavior;c==null||c.onFetch(s,this),Ce(this,Bf,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=s.fetchOptions)==null?void 0:h.meta))&&Ze(this,Jr,_o).call(this,{type:"fetch",meta:(d=s.fetchOptions)==null?void 0:d.meta}),Ce(this,zn,QG({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,onCancel:A=>{A instanceof UO&&A.revert&&this.setState({...ie(this,Bf),fetchStatus:"idle"}),r.abort()},onFail:(A,C)=>{Ze(this,Jr,_o).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{Ze(this,Jr,_o).call(this,{type:"pause"})},onContinue:()=>{Ze(this,Jr,_o).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0}));try{const A=await ie(this,zn).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(v=(m=ie(this,Ci).config).onSuccess)==null||v.call(m,A,this),(w=(x=ie(this,Ci).config).onSettled)==null||w.call(x,A,this.state.error,this),A}catch(A){if(A instanceof UO){if(A.silent)return ie(this,zn).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ze(this,Jr,_o).call(this,{type:"error",error:A}),(S=(b=ie(this,Ci).config).onError)==null||S.call(b,A,this),(_=(E=ie(this,Ci).config).onSettled)==null||_.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},$f=new WeakMap,Ac=new WeakMap,Bf=new WeakMap,Ci=new WeakMap,Cc=new WeakMap,zn=new WeakMap,sg=new WeakMap,Tc=new WeakMap,Jr=new WeakSet,e7=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},_o=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,...t7(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...q3(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ce(this,Bf,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),Pn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),ie(this,Ci).notify({query:this,type:"updated",action:t})})},BG);function t7(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:XG(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function q3(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function z3(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 Mr,mt,lg,gr,jc,qf,Ao,tl,cg,zf,Ff,Nc,Oc,nl,Vf,Ot,Ap,GO,KO,WO,YO,XO,QO,ZO,r7,qG,n7=(qG=class extends Ld{constructor(t,n){super();De(this,Ot);De(this,Mr);De(this,mt);De(this,lg);De(this,gr);De(this,jc);De(this,qf);De(this,Ao);De(this,tl);De(this,cg);De(this,zf);De(this,Ff);De(this,Nc);De(this,Oc);De(this,nl);De(this,Vf,new Set);this.options=n,Ce(this,Mr,t),Ce(this,tl,null),Ce(this,Ao,VO()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(ie(this,mt).addObserver(this),F3(ie(this,mt),this.options)?Ze(this,Ot,Ap).call(this):this.updateResult(),Ze(this,Ot,YO).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return JO(ie(this,mt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return JO(ie(this,mt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ze(this,Ot,XO).call(this),Ze(this,Ot,QO).call(this),ie(this,mt).removeObserver(this)}setOptions(t){const n=this.options,r=ie(this,mt);if(this.options=ie(this,Mr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ei(this.options.enabled,ie(this,mt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ze(this,Ot,ZO).call(this),ie(this,mt).setOptions(this.options),n._defaulted&&!Cb(this.options,n)&&ie(this,Mr).getQueryCache().notify({type:"observerOptionsUpdated",query:ie(this,mt),observer:this});const i=this.hasListeners();i&&V3(ie(this,mt),r,this.options,n)&&Ze(this,Ot,Ap).call(this),this.updateResult(),i&&(ie(this,mt)!==r||ei(this.options.enabled,ie(this,mt))!==ei(n.enabled,ie(this,mt))||ml(this.options.staleTime,ie(this,mt))!==ml(n.staleTime,ie(this,mt)))&&Ze(this,Ot,GO).call(this);const a=Ze(this,Ot,KO).call(this);i&&(ie(this,mt)!==r||ei(this.options.enabled,ie(this,mt))!==ei(n.enabled,ie(this,mt))||a!==ie(this,nl))&&Ze(this,Ot,WO).call(this,a)}getOptimisticResult(t){const n=ie(this,Mr).getQueryCache().build(ie(this,Mr),t),r=this.createResult(n,t);return jse(this,r)&&(Ce(this,gr,r),Ce(this,qf,this.options),Ce(this,jc,ie(this,mt).state)),r}getCurrentResult(){return ie(this,gr)}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&&ie(this,Ao).status==="pending"&&ie(this,Ao).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){ie(this,Vf).add(t)}getCurrentQuery(){return ie(this,mt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=ie(this,Mr).defaultQueryOptions(t),r=ie(this,Mr).getQueryCache().build(ie(this,Mr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ze(this,Ot,Ap).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),ie(this,gr)))}createResult(t,n){var P;const r=ie(this,mt),i=this.options,a=ie(this,gr),o=ie(this,jc),s=ie(this,qf),f=t!==r?t.state:ie(this,lg),{state:h}=t;let d={...h},m=!1,v;if(n._optimisticResults){const $=this.hasListeners(),L=!$&&F3(t,n),D=$&&V3(t,r,n,i);(L||D)&&(d={...d,...t7(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:x,errorUpdatedAt:w,status:b}=d;v=d.data;let S=!1;if(n.placeholderData!==void 0&&v===void 0&&b==="pending"){let $;a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?($=a.data,S=!0):$=typeof n.placeholderData=="function"?n.placeholderData((P=ie(this,Ff))==null?void 0:P.state.data,ie(this,Ff)):n.placeholderData,$!==void 0&&(b="success",v=FO(a==null?void 0:a.data,$,n),m=!0)}if(n.select&&v!==void 0&&!S)if(a&&v===(o==null?void 0:o.data)&&n.select===ie(this,cg))v=ie(this,zf);else try{Ce(this,cg,n.select),v=n.select(v),v=FO(a==null?void 0:a.data,v,n),Ce(this,zf,v),Ce(this,tl,null)}catch($){Ce(this,tl,$)}ie(this,tl)&&(x=ie(this,tl),v=ie(this,zf),w=Date.now(),b="error");const E=d.fetchStatus==="fetching",_=b==="pending",A=b==="error",C=_&&E,N=v!==void 0,R={status:b,fetchStatus:d.fetchStatus,isPending:_,isSuccess:b==="success",isError:A,isInitialLoading:C,isLoading:C,data:v,dataUpdatedAt:d.dataUpdatedAt,error:x,errorUpdatedAt:w,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>f.dataUpdateCount||d.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!_,isLoadingError:A&&!N,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&N,isStale:zP(t,n),refetch:this.refetch,promise:ie(this,Ao),isEnabled:ei(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=R.data!==void 0,L=R.status==="error"&&!$,D=q=>{L?q.reject(R.error):$&&q.resolve(R.data)},F=()=>{const q=Ce(this,Ao,R.promise=VO());D(q)},I=ie(this,Ao);switch(I.status){case"pending":t.queryHash===r.queryHash&&D(I);break;case"fulfilled":(L||R.data!==I.value)&&F();break;case"rejected":(!L||R.error!==I.reason)&&F();break}}return R}updateResult(){const t=ie(this,gr),n=this.createResult(ie(this,mt),this.options);if(Ce(this,jc,ie(this,mt).state),Ce(this,qf,this.options),ie(this,jc).data!==void 0&&Ce(this,Ff,ie(this,mt)),Cb(n,t))return;Ce(this,gr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!ie(this,Vf).size)return!0;const o=new Set(a??ie(this,Vf));return this.options.throwOnError&&o.add("error"),Object.keys(ie(this,gr)).some(s=>{const c=s;return ie(this,gr)[c]!==t[c]&&o.has(c)})};Ze(this,Ot,r7).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ze(this,Ot,YO).call(this)}},Mr=new WeakMap,mt=new WeakMap,lg=new WeakMap,gr=new WeakMap,jc=new WeakMap,qf=new WeakMap,Ao=new WeakMap,tl=new WeakMap,cg=new WeakMap,zf=new WeakMap,Ff=new WeakMap,Nc=new WeakMap,Oc=new WeakMap,nl=new WeakMap,Vf=new WeakMap,Ot=new WeakSet,Ap=function(t){Ze(this,Ot,ZO).call(this);let n=ie(this,mt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(vr)),n},GO=function(){Ze(this,Ot,XO).call(this);const t=ml(this.options.staleTime,ie(this,mt));if(Xp.isServer()||ie(this,gr).isStale||!qO(t))return;const r=KG(ie(this,gr).dataUpdatedAt,t)+1;Ce(this,Nc,hc.setTimeout(()=>{ie(this,gr).isStale||this.updateResult()},r))},KO=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(ie(this,mt)):this.options.refetchInterval)??!1},WO=function(t){Ze(this,Ot,QO).call(this),Ce(this,nl,t),!(Xp.isServer()||ei(this.options.enabled,ie(this,mt))===!1||!qO(ie(this,nl))||ie(this,nl)===0)&&Ce(this,Oc,hc.setInterval(()=>{(this.options.refetchIntervalInBackground||LP.isFocused())&&Ze(this,Ot,Ap).call(this)},ie(this,nl)))},YO=function(){Ze(this,Ot,GO).call(this),Ze(this,Ot,WO).call(this,Ze(this,Ot,KO).call(this))},XO=function(){ie(this,Nc)!==void 0&&(hc.clearTimeout(ie(this,Nc)),Ce(this,Nc,void 0))},QO=function(){ie(this,Oc)!==void 0&&(hc.clearInterval(ie(this,Oc)),Ce(this,Oc,void 0))},ZO=function(){const t=ie(this,Mr).getQueryCache().build(ie(this,Mr),this.options);if(t===ie(this,mt))return;const n=ie(this,mt);Ce(this,mt,t),Ce(this,lg,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},r7=function(t){Pn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(ie(this,gr))}),ie(this,Mr).getQueryCache().notify({query:ie(this,mt),type:"observerResultsUpdated"})})},qG);function Tse(e,t){return ei(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&ei(t.retryOnMount,e)===!1)}function F3(e,t){return Tse(e,t)||e.state.data!==void 0&&JO(e,t,t.refetchOnMount)}function JO(e,t,n){if(ei(t.enabled,e)!==!1&&ml(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&zP(e,t)}return!1}function V3(e,t,n,r){return(e!==t||ei(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&zP(e,n)}function zP(e,t){return ei(t.enabled,e)!==!1&&e.isStaleByTime(ml(t.staleTime,e))}function jse(e,t){return!Cb(e.getCurrentResult(),t)}var Nse=class extends n7{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var x,w;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=(w=(x=n.fetchMeta)==null?void 0:x.fetchMore)==null?void 0:w.direction,f=o&&c==="forward",h=i&&c==="forward",d=o&&c==="backward",m=i&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Ese(t,n.data),hasPreviousPage:Ase(t,n.data),isFetchNextPageError:f,isFetchingNextPage:h,isFetchPreviousPageError:d,isFetchingPreviousPage:m,isRefetchError:s&&!f&&!d,isRefetching:a&&!h&&!m}}},ug,ja,cr,Mc,Na,zs,zG,Ose=(zG=class extends ZG{constructor(t){super();De(this,Na);De(this,ug);De(this,ja);De(this,cr);De(this,Mc);Ce(this,ug,t.client),this.mutationId=t.mutationId,Ce(this,cr,t.mutationCache),Ce(this,ja,[]),this.state=t.state||i7(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ie(this,ja).includes(t)||(ie(this,ja).push(t),this.clearGcTimeout(),ie(this,cr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ce(this,ja,ie(this,ja).filter(n=>n!==t)),this.scheduleGc(),ie(this,cr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ie(this,ja).length||(this.state.status==="pending"?this.scheduleGc():ie(this,cr).remove(this))}continue(){var t;return((t=ie(this,Mc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,s,c,f,h,d,m,v,x,w,b,S,E,_,A,C,N,M;const n=()=>{Ze(this,Na,zs).call(this,{type:"continue"})},r={client:ie(this,ug),meta:this.options.meta,mutationKey:this.options.mutationKey};Ce(this,Mc,QG({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,P)=>{Ze(this,Na,zs).call(this,{type:"failed",failureCount:R,error:P})},onPause:()=>{Ze(this,Na,zs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ie(this,cr).canRun(this)}));const i=this.state.status==="pending",a=!ie(this,Mc).canStart();try{if(i)n();else{Ze(this,Na,zs).call(this,{type:"pending",variables:t,isPaused:a}),ie(this,cr).config.onMutate&&await ie(this,cr).config.onMutate(t,this,r);const P=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,t,r));P!==this.state.context&&Ze(this,Na,zs).call(this,{type:"pending",context:P,variables:t,isPaused:a})}const R=await ie(this,Mc).start();return await((f=(c=ie(this,cr).config).onSuccess)==null?void 0:f.call(c,R,t,this.state.context,this,r)),await((d=(h=this.options).onSuccess)==null?void 0:d.call(h,R,t,this.state.context,r)),await((v=(m=ie(this,cr).config).onSettled)==null?void 0:v.call(m,R,null,this.state.variables,this.state.context,this,r)),await((w=(x=this.options).onSettled)==null?void 0:w.call(x,R,null,t,this.state.context,r)),Ze(this,Na,zs).call(this,{type:"success",data:R}),R}catch(R){try{await((S=(b=ie(this,cr).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((C=(A=ie(this,cr).config).onSettled)==null?void 0:C.call(A,void 0,R,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((M=(N=this.options).onSettled)==null?void 0:M.call(N,void 0,R,t,this.state.context,r))}catch(P){Promise.reject(P)}throw Ze(this,Na,zs).call(this,{type:"error",error:R}),R}finally{ie(this,cr).runNext(this)}}},ug=new WeakMap,ja=new WeakMap,cr=new WeakMap,Mc=new WeakMap,Na=new WeakSet,zs=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),Pn.batch(()=>{ie(this,ja).forEach(r=>{r.onMutationUpdate(t)}),ie(this,cr).notify({mutation:this,type:"updated",action:t})})},zG);function i7(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Co,Zi,fg,FG,Mse=(FG=class extends Ld{constructor(t={}){super();De(this,Co);De(this,Zi);De(this,fg);this.config=t,Ce(this,Co,new Set),Ce(this,Zi,new Map),Ce(this,fg,0)}build(t,n,r){const i=new Ose({client:t,mutationCache:this,mutationId:++vy(this,fg)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){ie(this,Co).add(t);const n=by(t);if(typeof n=="string"){const r=ie(this,Zi).get(n);r?r.push(t):ie(this,Zi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ie(this,Co).delete(t)){const n=by(t);if(typeof n=="string"){const r=ie(this,Zi).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&ie(this,Zi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=by(t);if(typeof n=="string"){const r=ie(this,Zi).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=by(t);if(typeof n=="string"){const i=(r=ie(this,Zi).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(){Pn.batch(()=>{ie(this,Co).forEach(t=>{this.notify({type:"removed",mutation:t})}),ie(this,Co).clear(),ie(this,Zi).clear()})}getAll(){return Array.from(ie(this,Co))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>L3(n,r))}findAll(t={}){return this.getAll().filter(n=>L3(t,n))}notify(t){Pn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Pn.batch(()=>Promise.all(t.map(n=>n.continue().catch(vr))))}},Co=new WeakMap,Zi=new WeakMap,fg=new WeakMap,FG);function by(e){var t;return(t=e.options.scope)==null?void 0:t.id}var To,rl,Rr,jo,qo,ib,eM,VG,Rse=(VG=class extends Ld{constructor(n,r){super();De(this,qo);De(this,To);De(this,rl);De(this,Rr);De(this,jo);Ce(this,To,n),this.setOptions(r),this.bindMethods(),Ze(this,qo,ib).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=ie(this,To).defaultMutationOptions(n),Cb(this.options,r)||ie(this,To).getMutationCache().notify({type:"observerOptionsUpdated",mutation:ie(this,Rr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&zc(r.mutationKey)!==zc(this.options.mutationKey)?this.reset():((i=ie(this,Rr))==null?void 0:i.state.status)==="pending"&&ie(this,Rr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=ie(this,Rr))==null||n.removeObserver(this)}onMutationUpdate(n){Ze(this,qo,ib).call(this),Ze(this,qo,eM).call(this,n)}getCurrentResult(){return ie(this,rl)}reset(){var n;(n=ie(this,Rr))==null||n.removeObserver(this),Ce(this,Rr,void 0),Ze(this,qo,ib).call(this),Ze(this,qo,eM).call(this)}mutate(n,r){var i;return Ce(this,jo,r),(i=ie(this,Rr))==null||i.removeObserver(this),Ce(this,Rr,ie(this,To).getMutationCache().build(ie(this,To),this.options)),ie(this,Rr).addObserver(this),ie(this,Rr).execute(n)}},To=new WeakMap,rl=new WeakMap,Rr=new WeakMap,jo=new WeakMap,qo=new WeakSet,ib=function(){var r;const n=((r=ie(this,Rr))==null?void 0:r.state)??i7();Ce(this,rl,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},eM=function(n){Pn.batch(()=>{var r,i,a,o,s,c,f,h;if(ie(this,jo)&&this.hasListeners()){const d=ie(this,rl).variables,m=ie(this,rl).context,v={client:ie(this,To),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=ie(this,jo)).onSuccess)==null||i.call(r,n.data,d,m,v)}catch(x){Promise.reject(x)}try{(o=(a=ie(this,jo)).onSettled)==null||o.call(a,n.data,null,d,m,v)}catch(x){Promise.reject(x)}}else if((n==null?void 0:n.type)==="error"){try{(c=(s=ie(this,jo)).onError)==null||c.call(s,n.error,d,m,v)}catch(x){Promise.reject(x)}try{(h=(f=ie(this,jo)).onSettled)==null||h.call(f,void 0,n.error,d,m,v)}catch(x){Promise.reject(x)}}}this.listeners.forEach(d=>{d(ie(this,rl))})})},VG),Oa,UG,Pse=(UG=class extends Ld{constructor(t={}){super();De(this,Oa);this.config=t,Ce(this,Oa,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??$P(i,n);let o=this.get(a);return o||(o=new Cse({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){ie(this,Oa).has(t.queryHash)||(ie(this,Oa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=ie(this,Oa).get(t.queryHash);n&&(t.destroy(),n===t&&ie(this,Oa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Pn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ie(this,Oa).get(t)}getAll(){return[...ie(this,Oa).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>I3(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>I3(t,r)):n}notify(t){Pn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Pn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Pn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Oa=new WeakMap,UG),cn,il,al,Uf,Hf,ol,Gf,Kf,HG,kse=(HG=class{constructor(e={}){De(this,cn);De(this,il);De(this,al);De(this,Uf);De(this,Hf);De(this,ol);De(this,Gf);De(this,Kf);Ce(this,cn,e.queryCache||new Pse),Ce(this,il,e.mutationCache||new Mse),Ce(this,al,e.defaultOptions||{}),Ce(this,Uf,new Map),Ce(this,Hf,new Map),Ce(this,ol,0)}mount(){vy(this,ol)._++,ie(this,ol)===1&&(Ce(this,Gf,LP.subscribe(async e=>{e&&(await this.resumePausedMutations(),ie(this,cn).onFocus())})),Ce(this,Kf,Tb.subscribe(async e=>{e&&(await this.resumePausedMutations(),ie(this,cn).onOnline())})))}unmount(){var e,t;vy(this,ol)._--,ie(this,ol)===0&&((e=ie(this,Gf))==null||e.call(this),Ce(this,Gf,void 0),(t=ie(this,Kf))==null||t.call(this),Ce(this,Kf,void 0))}isFetching(e){return ie(this,cn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ie(this,il).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ie(this,cn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=ie(this,cn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ml(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return ie(this,cn).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=ie(this,cn).get(r.queryHash),a=i==null?void 0:i.state.data,o=hse(t,a);if(o!==void 0)return ie(this,cn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Pn.batch(()=>ie(this,cn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ie(this,cn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=ie(this,cn);Pn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=ie(this,cn);return Pn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Pn.batch(()=>ie(this,cn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(vr).catch(vr)}invalidateQueries(e,t={}){return Pn.batch(()=>(ie(this,cn).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=Pn.batch(()=>ie(this,cn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(vr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(vr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=ie(this,cn).build(this,t);return n.isStaleByTime(ml(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(vr).catch(vr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(vr).catch(vr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Tb.isOnline()?ie(this,il).resumePausedMutations():Promise.resolve()}getQueryCache(){return ie(this,cn)}getMutationCache(){return ie(this,il)}getDefaultOptions(){return ie(this,al)}setDefaultOptions(e){Ce(this,al,e)}setQueryDefaults(e,t){ie(this,Uf).set(zc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ie(this,Uf).values()],n={};return t.forEach(r=>{Yp(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){ie(this,Hf).set(zc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ie(this,Hf).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={...ie(this,al).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=$P(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===BP&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ie(this,al).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ie(this,cn).clear(),ie(this,il).clear()}},cn=new WeakMap,il=new WeakMap,al=new WeakMap,Uf=new WeakMap,Hf=new WeakMap,ol=new WeakMap,Gf=new WeakMap,Kf=new WeakMap,HG),a7=j.createContext(void 0),nn=e=>{const t=j.useContext(a7);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Dse=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(a7.Provider,{value:e,children:t})),o7=j.createContext(!1),Ise=()=>j.useContext(o7);o7.Provider;function Lse(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $se=j.createContext(Lse()),Bse=()=>j.useContext($se),qse=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?qP(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},zse=e=>{j.useEffect(()=>{e.clearReset()},[e])},Fse=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||qP(n,[e.error,r])),Vse=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))}},Use=(e,t)=>e.isLoading&&e.isFetching&&!t,Hse=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,U3=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function s7(e,t,n){var v,x,w,b;const r=Ise(),i=Bse(),a=nn(),o=a.defaultQueryOptions(e);(x=(v=a.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||x.call(v,o);const s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?"isRestoring":c?"optimistic":void 0,Vse(o),qse(o,i,s),zse(i);const f=!a.getQueryCache().get(o.queryHash),[h]=j.useState(()=>new t(a,o)),d=h.getOptimisticResult(o),m=!r&&c;if(j.useSyncExternalStore(j.useCallback(S=>{const E=m?h.subscribe(Pn.batchCalls(S)):vr;return h.updateResult(),E},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),j.useEffect(()=>{h.setOptions(o)},[o,h]),Hse(o,d))throw U3(o,h,i);if(Fse({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;if((b=(w=a.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||b.call(w,o,d),o.experimental_prefetchInRender&&!Xp.isServer()&&Use(d,r)){const S=f?U3(o,h,i):s==null?void 0:s.promise;S==null||S.catch(vr).finally(()=>{h.updateResult()})}return o.notifyOnChangeProps?d:h.trackResult(d)}function nr(e,t){return s7(e,n7)}function Dn(e,t){const n=nn(),[r]=j.useState(()=>new Rse(n,e));j.useEffect(()=>{r.setOptions(e)},[r,e]);const i=j.useSyncExternalStore(j.useCallback(o=>r.subscribe(Pn.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=j.useCallback((o,s)=>{r.mutate(o,s).catch(vr)},[r]);if(i.error&&qP(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function l7(e,t){return s7(e,Nse)}var Cp=typeof window<"u"?j.useLayoutEffect:j.useEffect;function N_(e){const t=j.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Gse(e,t,n={},r={}){j.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([a])=>{t(a)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function Kse(e){const t=j.useRef(null);return j.useImperativeHandle(e,()=>t.current,[]),t}const c7=!1;function Qp(e){return e[e.length-1]}function Wse(e){return typeof e=="function"}function pc(e,t){return Wse(e)?e(t):e}const u7=Object.prototype.hasOwnProperty,H3=Object.prototype.propertyIsEnumerable;function f7(e){for(const t in e)if(u7.call(e,t))return!0;return!1}const Yse=()=>Object.create(null),ic=(e,t)=>sl(e,t,Yse);function sl(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,a=W3(e)&&W3(i);if(!a&&!(jb(e)&&jb(i)))return i;const o=a?e:G3(e);if(!o)return i;const s=a?i:G3(i);if(!s)return i;const c=o.length,f=s.length,h=a?new Array(f):n();let d=0;for(let m=0;m<f;m++){const v=a?m:s[m],x=e[v],w=i[v];if(x===w){h[v]=x,(a?m<c:u7.call(e,v))&&d++;continue}if(x===null||w===null||typeof x!="object"||typeof w!="object"){h[v]=w;continue}const b=sl(x,w,n,r+1);h[v]=b,b===x&&d++}return c===f&&d===c?e:h}function G3(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!H3.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(!H3.call(e,i))return!1;r.push(i)}return r}function jb(e){if(!K3(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!K3(n)||!n.hasOwnProperty("isPrototypeOf"))}function K3(e){return Object.prototype.toString.call(e)==="[object Object]"}function W3(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Rc(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(!Rc(e[r],t[r],n))return!1;return!0}if(jb(e)&&jb(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)&&!Rc(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||!Rc(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 Zp(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Xse(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function Y3(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 Xse(t)}const Qse=["http:","https:","mailto:","tel:"];function Nb(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function op(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+=Y3(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+Y3(n?e.slice(n):e);let a=!1;return r.startsWith("//")&&(a=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:a}}function Zse(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Jse(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 ko(){throw new Error("Invariant failed")}function Jp(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 c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const s=t.get(a);if(s)s.value=o,i(s);else{const c={key:a,value:o,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(a,c)}},clear(){t.clear(),n=void 0,r=void 0}}}const ll=4,d7=5;function ele(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 h7(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 s=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,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=ele(a);if(o){const[s,c]=o,f=a.charCodeAt(s+1);if(f===45){if(s+2<a.length&&a.charCodeAt(s+2)===36){const h=s+3,d=c;if(h<d)return n[0]=3,n[1]=t+s,n[2]=t+h,n[3]=t+d,n[4]=t+c+1,n[5]=i,n}}else if(f===36){const h=s+1,d=s+2;return d===c?(n[0]=2,n[1]=t+s,n[2]=t+h,n[3]=t+d,n[4]=t+c+1,n[5]=e.length,n):(n[0]=1,n[1]=t+s,n[2]=t+d,n[3]=t+c,n[4]=t+c+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 C0(e,t,n,r,i,a,o){var c,f,h,d,m,v,x,w,b,S;o==null||o(n);let s=r;{const E=n.fullPath??n.from,_=E.length,A=((c=n.options)==null?void 0:c.caseSensitive)??e,C=((h=(f=n.options)==null?void 0:f.params)==null?void 0:h.parse)??((d=n.options)==null?void 0:d.parseParams);for(;s<_;){const M=h7(E,s,t);let R;const P=s,$=M[5];switch(s=$+1,a++,M[0]){case 0:{const L=E.substring(M[2],M[3]);if(A){const D=(m=i.static)==null?void 0:m.get(L);if(D)R=D;else{i.static??(i.static=new Map);const F=mc(n.fullPath??n.from);F.parent=i,F.depth=a,R=F,i.static.set(L,F)}}else{const D=L.toLowerCase(),F=(v=i.staticInsensitive)==null?void 0:v.get(D);if(F)R=F;else{i.staticInsensitive??(i.staticInsensitive=new Map);const I=mc(n.fullPath??n.from);I.parent=i,I.depth=a,R=I,i.staticInsensitive.set(D,I)}}break}case 1:{const L=E.substring(P,M[1]),D=E.substring(M[4],$),F=A&&!!(L||D),I=L?F?L:L.toLowerCase():void 0,q=D?F?D:D.toLowerCase():void 0,k=!C&&((x=i.dynamic)==null?void 0:x.find(z=>!z.parse&&z.caseSensitive===F&&z.prefix===I&&z.suffix===q));if(k)R=k;else{const z=M_(1,n.fullPath??n.from,F,I,q);R=z,z.depth=a,z.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(z)}break}case 3:{const L=E.substring(P,M[1]),D=E.substring(M[4],$),F=A&&!!(L||D),I=L?F?L:L.toLowerCase():void 0,q=D?F?D:D.toLowerCase():void 0,k=!C&&((w=i.optional)==null?void 0:w.find(z=>!z.parse&&z.caseSensitive===F&&z.prefix===I&&z.suffix===q));if(k)R=k;else{const z=M_(3,n.fullPath??n.from,F,I,q);R=z,z.parent=i,z.depth=a,i.optional??(i.optional=[]),i.optional.push(z)}break}case 2:{const L=E.substring(P,M[1]),D=E.substring(M[4],$),F=A&&!!(L||D),I=L?F?L:L.toLowerCase():void 0,q=D?F?D:D.toLowerCase():void 0,k=M_(2,n.fullPath??n.from,F,I,q);R=k,k.parent=i,k.depth=a,i.wildcard??(i.wildcard=[]),i.wildcard.push(k)}}i=R}if(C&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const M=mc(n.fullPath??n.from);M.kind=d7,M.parent=i,a++,M.depth=a,i.pathless??(i.pathless=[]),i.pathless.push(M),i=M}const N=(n.path||!n.children)&&!n.isRoot;if(N&&E.endsWith("/")){const M=mc(n.fullPath??n.from);M.kind=ll,M.parent=i,a++,M.depth=a,i.index=M,i=M}i.parse=C??null,i.priority=((S=(b=n.options)==null?void 0:b.params)==null?void 0:S.priority)??0,N&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const E of n.children)C0(e,t,E,s,i,a,o)}function O_(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 Ks(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Ks(i);if(e.static)for(const i of e.static.values())Ks(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Ks(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(O_);for(const i of e.dynamic)Ks(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(O_);for(const i of e.optional)Ks(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(O_);for(const i of e.wildcard)Ks(i)}}function mc(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 M_(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 tle(e,t){const n=mc("/"),r=new Uint16Array(6);for(const i of e)C0(!1,r,i,1,n,0);Ks(n),t.masksTree=n,t.flatCache=Jp(1e3)}function nle(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=FP(e,t.masksTree);return t.flatCache.set(e,r),r}function rle(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=mc("/"),C0(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),FP(r,o,n)}function ile(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=FP(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)a=null;else throw o}return a&&(a.branch=m7(a.route)),t.matchCache.set(r,a),a}function ale(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function ole(e,t=!1,n){const r=mc(e.fullPath),i=new Uint16Array(6),a={},o={};let s=0;return C0(t,i,e,1,r,0,c=>{if(n==null||n(c,s),c.id in a&&ko(),a[c.id]=c,s!==0&&c.path){const f=ale(c.fullPath);(!o[f]||c.fullPath.endsWith("/"))&&(o[f]=c)}s++}),Ks(r),{processedTree:{segmentTree:r,singleCache:Jp(1e3),matchCache:Jp(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function FP(e,t,n=!1){const r=e.split("/"),i=lle(e,r,t,n);if(!i)return null;const[a]=p7(e,r,i);return{route:i.node.route,rawParams:a}}function p7(e,t,n){var h,d,m,v,x,w,b,S,E,_;const r=sle(n.node);let i=null;const a=Object.create(null);let o=((h=n.extract)==null?void 0:h.part)??0,s=((d=n.extract)==null?void 0:d.node)??0,c=((m=n.extract)==null?void 0:m.path)??0,f=((v=n.extract)==null?void 0:v.segment)??0;for(;s<r.length;o++,s++,c++,f++){const A=r[s];if(A.kind===ll)break;if(A.kind===d7){f--,o--,c--;continue}const C=t[o],N=c;if(C&&(c+=C.length),A.kind===1){i??(i=n.node.fullPath.split("/"));const M=i[f],R=((x=A.prefix)==null?void 0:x.length)??0;if(M.charCodeAt(R)===123){const P=((w=A.suffix)==null?void 0:w.length)??0,$=M.substring(R+2,M.length-P-1),L=C.substring(R,C.length-P);a[$]=decodeURIComponent(L)}else{const P=M.substring(1);a[P]=decodeURIComponent(C)}}else if(A.kind===3){if(n.skipped&1<<s){o--,c=N-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),L=A.suffix||A.prefix?C.substring(R,C.length-P):C;L&&(a[$]=decodeURIComponent(L))}else if(A.kind===2){const M=A,R=e.substring(N+(((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:s,path:c,segment:f}]}function m7(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function sle(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function lle(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!Qp(t),a=i&&e!=="/",o=t.length-(i?1:0),s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let c=null,f=null;for(;s.length;){const h=s.pop(),{node:d,index:m,skipped:v,depth:x,statics:w,dynamics:b,optionals:S}=h;let{extract:E,rawParams:_}=h;if(d.kind===2&&d.route&&!wy(f,h))continue;if(d.parse){if(!X3(e,t,h))continue;_=h.rawParams,E=h.extract}r&&d.route&&d.kind!==ll&&wy(c,h)&&(c=h);const A=m===o;if(A&&(d.route&&(!a||d.kind===ll||d.kind===2)&&wy(f,h)&&(f=h),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;const C=A?void 0:t[m];let N;if(A&&d.index){const M={node:d.index,index:m,skipped:v,depth:x+1,statics:w,dynamics:b,optionals:S,extract:E,rawParams:_};let R=!0;if(d.index.parse&&(X3(e,t,M)||(R=!1)),R){if(!b&&!S&&!v&&cle(w,o))return M;wy(f,M)&&(f=M)}}if(d.wildcard)for(let M=d.wildcard.length-1;M>=0;M--){const R=d.wildcard[M],{prefix:P,suffix:$}=R;if(!(P&&(A||!(R.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(P)))){if($){if(A)continue;const L=t.slice(m).join("/").slice(-$.length);if((R.caseSensitive?L:L.toLowerCase())!==$)continue}s.push({node:R,index:o,skipped:v,depth:x+1,statics:w,dynamics:b,optionals:S,extract:E,rawParams:_})}}if(d.optional){const M=v|1<<x,R=x+1;for(let P=d.optional.length-1;P>=0;P--){const $=d.optional[P];s.push({node:$,index:m,skipped:M,depth:R,statics:w,dynamics:b,optionals:S,extract:E,rawParams:_})}if(!A)for(let P=d.optional.length-1;P>=0;P--){const $=d.optional[P],{prefix:L,suffix:D}=$;if(L||D){const F=$.caseSensitive?C:N??(N=C.toLowerCase());if(L&&!F.startsWith(L)||D&&!F.endsWith(D))continue}s.push({node:$,index:m+1,skipped:v,depth:R,statics:w,dynamics:b,optionals:S+xy(o,m),extract:E,rawParams:_})}}if(!A&&d.dynamic&&C)for(let M=d.dynamic.length-1;M>=0;M--){const R=d.dynamic[M],{prefix:P,suffix:$}=R;if(P||$){const L=R.caseSensitive?C:N??(N=C.toLowerCase());if(P&&!L.startsWith(P)||$&&!L.endsWith($))continue}s.push({node:R,index:m+1,skipped:v,depth:x+1,statics:w,dynamics:b+xy(o,m),optionals:S,extract:E,rawParams:_})}if(!A&&d.staticInsensitive){const M=d.staticInsensitive.get(N??(N=C.toLowerCase()));M&&s.push({node:M,index:m+1,skipped:v,depth:x+1,statics:w+xy(o,m),dynamics:b,optionals:S,extract:E,rawParams:_})}if(!A&&d.static){const M=d.static.get(C);M&&s.push({node:M,index:m+1,skipped:v,depth:x+1,statics:w+xy(o,m),dynamics:b,optionals:S,extract:E,rawParams:_})}if(d.pathless){const M=x+1;for(let R=d.pathless.length-1;R>=0;R--){const P=d.pathless[R];s.push({node:P,index:m,skipped:v,depth:M,statics:w,dynamics:b,optionals:S,extract:E,rawParams:_})}}}if(f)return f;if(r&&c){let h=c.index;for(let m=0;m<c.index;m++)h+=t[m].length;const d=h===e.length?"/":e.slice(h);return c.rawParams??(c.rawParams=Object.create(null)),c.rawParams["**"]=decodeURIComponent(d),c}return null}function xy(e,t){return 2**(e-t-1)}function cle(e,t){return e===2**(t-1)-1}function X3(e,t,n){let r,i;try{[r,i]=p7(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 wy(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===ll)>(e.node.kind===ll)||t.node.kind===ll==(e.node.kind===ll)&&t.depth>e.depth))):!0}function ab(e){return VP(e.filter(t=>t!==void 0).join("/"))}function VP(e){return e.replace(/\/{2,}/g,"/")}function g7(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function No(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function v7(e){return No(g7(e))}function Ob(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function ule(e,t,n){return Ob(e,n)===Ob(t,n)}function fle({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 s;if(a)s=e.split("/");else if(i)s=t.split("/");else{for(s=e.split("/");s.length>1&&Qp(s)==="";)s.pop();const f=t.split("/");for(let h=0,d=f.length;h<d;h++){const m=f[h];m===""?h?h===d-1&&s.push(m):s=[m]:m===".."?s.pop():m==="."||s.push(m)}}s.length>1&&(Qp(s)===""?n==="never"&&s.pop():n==="always"&&s.push(""));const c=VP(s.join("/"))||"/";return o&&r&&r.set(o,c),c}function dle(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 R_(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=>Z3(i,n)).join("/"):Z3(r,n)}function Q3({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 s=0,c,f="";for(;s<o;){const h=s;c=h7(e,h,c);const d=c[5];if(s=d+1,h===d)continue;const m=c[0];if(m===0){f+="/"+e.substring(h,d);continue}if(m===2){const v=t._splat;a._splat=v,a["*"]=v;const x=e.substring(h,c[1]),w=e.substring(c[4],d);if(!v){i=!0,(x||w)&&(f+="/"+x+w);continue}const b=R_("_splat",t,n);f+="/"+x+b+w;continue}if(m===1){const v=e.substring(c[2],c[3]);!i&&!(v in t)&&(i=!0),a[v]=t[v];const x=e.substring(h,c[1]),w=e.substring(c[4],d),b=R_(v,t,n)??"undefined";f+="/"+x+b+w;continue}if(m===3){const v=e.substring(c[2],c[3]),x=t[v];if(x==null)continue;a[v]=x;const w=e.substring(h,c[1]),b=e.substring(c[4],d),S=R_(v,t,n)??"";f+="/"+w+S+b;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:a,interpolatedPath:f||"/",isMissingParams:i}}function Z3(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function hr(e){return(e==null?void 0:e.isNotFound)===!0}function hle(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 P_(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function ple(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]=P_(i):Array.isArray(a)?a.push(P_(i)):n[r]=[a,P_(i)]}return n}const mle=vle(JSON.parse),gle=yle(JSON.stringify,JSON.parse);function vle(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=ple(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function yle(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=hle(i,r);return a?`?${a}`:""}}const Pc="__root__";function ble(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 Dr(e){return e instanceof Response&&!!e.options}const tM=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},xle=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),T0=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),kc=(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 s=e.router.getMatch(o.id);s&&Object.assign(r,s.__routeContext,s.__beforeLoadContext)}return r},J3=(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 s=e.matches[o];if(e.router.looseRoutesById[s.routeId].options.notFoundComponent)return o}return n?a:i},cl=(e,t,n)=>{var r,i,a;if(!(!Dr(n)&&!hr(n)))throw Dr(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:Dr(n)?"redirected":hr(n)?"notFound":o.status==="pending"?"success":o.status,context:kc(e,t.index),isFetching:!1,error:n})),hr(n)&&!n.routeId&&(n.routeId=t.routeId),(a=t._nonReactive.loadPromise)==null||a.resolve()),Dr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},y7=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},e4=(e,t,n)=>{const r=kc(e,n);e.updateMatch(t,i=>({...i,context:r}))},sp=(e,t,n,r)=>{var s,c;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),cl(e,e.router.getMatch(i),n);try{(c=(s=o.options).onError)==null||c.call(s,n)}catch(f){n=f,cl(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>{var h,d;return(h=f._nonReactive.beforeLoadPromise)==null||h.resolve(),f._nonReactive.beforeLoadPromise=void 0,(d=f._nonReactive.loadPromise)==null||d.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!Dr(n)&&!hr(n)&&(e.serialError??(e.serialError=n))},b7=(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&&!T0(e,t)&&(n.options.loader||n.options.beforeLoad||w7(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((a=e.router.options)==null?void 0:a.defaultPendingComponent))){const o=setTimeout(()=>{tM(e)},i);r._nonReactive.pendingTimeout=o}},wle=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;b7(e,t,n,r);const i=()=>{const a=e.router.getMatch(t);a.preload&&(a.status==="redirected"||a.status==="notFound")&&cl(e,a,a.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Sle=(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:s}=i;o&&sp(e,n,o,"PARSE_PARAMS"),s&&sp(e,n,s,"VALIDATE_SEARCH"),b7(e,t,r,i);const c=new AbortController;let f=!1;const h=()=>{f||(f=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:c})))},d=()=>{var A;(A=i._nonReactive.beforeLoadPromise)==null||A.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),d()});return}i._nonReactive.beforeLoadPromise=Wf();const m={...kc(e,n,!1),...i.__routeContext},{search:v,params:x,cause:w}=i,b=T0(e,t),S={search:v,abortController:c,params:x,preload:b,context:m,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:b?"preload":w,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},E=A=>{if(A===void 0){e.router.batch(()=>{h(),d()});return}(Dr(A)||hr(A))&&(h(),sp(e,n,A,"BEFORE_LOAD")),e.router.batch(()=>{h(),e.updateMatch(t,C=>({...C,__beforeLoadContext:A})),d()})};let _;try{if(_=r.options.beforeLoad(S),Zp(_))return h(),_.catch(A=>{sp(e,n,A,"BEFORE_LOAD")}).then(E)}catch(A){h(),sp(e,n,A,"BEFORE_LOAD")}E(_)},_le=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>Sle(e,n,t,i),s=()=>{if(y7(e,n))return;const c=wle(e,n,i);return Zp(c)?c.then(o):o()};return a()},Ele=(e,t,n)=>{var a,o,s,c,f,h;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),(c=(s=n.options).scripts)==null?void 0:c.call(s,i),(h=(f=n.options).headers)==null?void 0:h.call(f,i)]).then(([d,m,v])=>({meta:d==null?void 0:d.meta,links:d==null?void 0:d.links,headScripts:d==null?void 0:d.scripts,headers:v,scripts:m,styles:d==null?void 0:d.styles}))},x7=(e,t,n,r,i)=>{const a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:f}=e.router.getMatch(n),h=kc(e,r),d=T0(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:h,location:e.location,navigate:m=>e.router.navigate({...m,_fromLocation:e.location}),cause:d?"preload":f,route:i,...e.router.options.additionalContext}},t4=async(e,t,n,r,i)=>{var a,o,s,c,f;try{const h=e.router.getMatch(n);try{(!(c7??e.router.isServer)||h.ssr===!0)&&em(i);const d=i.options.loader,m=typeof d=="function"?d:d==null?void 0:d.handler,v=m==null?void 0:m(x7(e,t,n,r,i)),x=!!m&&Zp(v);if((x||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||h._nonReactive.minPendingPromise)&&e.updateMatch(n,b=>({...b,isFetching:"loader"})),m){const b=x?await v:v;cl(e,e.router.getMatch(n),b),b!==void 0&&e.updateMatch(n,S=>({...S,loaderData:b}))}i._lazyPromise&&await i._lazyPromise;const w=h._nonReactive.minPendingPromise;w&&await w,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,b=>({...b,error:void 0,context:kc(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(d){let m=d;if((m==null?void 0:m.name)==="AbortError"){if(h.abortController.signal.aborted){(a=h._nonReactive.loaderPromise)==null||a.resolve(),h._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,x=>({...x,status:x.status==="pending"?"success":x.status,isFetching:!1,context:kc(e,r)}));return}const v=h._nonReactive.minPendingPromise;v&&await v,hr(d)&&await((s=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:s.call(o)),cl(e,e.router.getMatch(n),d);try{(f=(c=i.options).onError)==null||f.call(c,d)}catch(x){m=x,cl(e,e.router.getMatch(n),x)}!Dr(m)&&!hr(m)&&await em(i,["errorComponent"]),e.updateMatch(n,x=>({...x,error:m,context:kc(e,r),status:"error",isFetching:!1}))}}catch(h){const d=e.router.getMatch(n);d&&(d._nonReactive.loaderPromise=void 0),cl(e,d,h)}},Ale=async(e,t,n)=>{var v,x,w,b;async function r(S,E,_,A,C){const N=Date.now()-E.updatedAt,M=S?C.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:C.options.staleTime??e.router.options.defaultStaleTime??0,R=C.options.shouldReload,P=typeof R=="function"?R(x7(e,t,i,n,C)):R,{status:$,invalid:L}=A,D=N>=M&&(!!e.forceStaleReload||A.cause==="enter"||_!==void 0&&_!==A.id);o=$==="success"&&(L||(P??D)),S&&C.options.preload===!1||(o&&!e.sync&&h?(s=!0,(async()=>{var F,I;try{await t4(e,t,i,n,C);const q=e.router.getMatch(i);(F=q._nonReactive.loaderPromise)==null||F.resolve(),(I=q._nonReactive.loadPromise)==null||I.resolve(),q._nonReactive.loaderPromise=void 0,q._nonReactive.loadPromise=void 0}catch(q){Dr(q)&&await e.router.navigate(q.options)}})()):$!=="success"||o?await t4(e,t,i,n,C):e4(e,i,n))}const{id:i,routeId:a}=e.matches[n];let o=!1,s=!1;const c=e.router.looseRoutesById[a],f=c.options.loader,h=((typeof f=="function"||f==null?void 0:f.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(y7(e,i)){if(!e.router.getMatch(i))return e.matches[n];e4(e,i,n)}else{const S=e.router.getMatch(i),E=e.router.stores.matchesId.get()[n],_=((v=E&&e.router.stores.matchStores.get(E)||null)==null?void 0:v.routeId)===a?E:(x=e.router.stores.matches.get().find(C=>C.routeId===a))==null?void 0:x.id,A=T0(e,i);if(S._nonReactive.loaderPromise){if(S.status==="success"&&!e.sync&&!S.preload&&h)return S;await S._nonReactive.loaderPromise;const C=e.router.getMatch(i),N=C._nonReactive.error||C.error;N&&cl(e,C,N),C.status==="pending"&&await r(A,S,_,C,c)}else{const C=A&&!e.router.stores.matchStores.has(i),N=e.router.getMatch(i);N._nonReactive.loaderPromise=Wf(),C!==N.preload&&e.updateMatch(i,M=>({...M,preload:C})),await r(A,S,_,N,c)}}const d=e.router.getMatch(i);s||((w=d._nonReactive.loaderPromise)==null||w.resolve(),(b=d._nonReactive.loadPromise)==null||b.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;const m=s?d.isFetching:!1;return m!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,S=>({...S,isFetching:m,invalid:!1})),e.router.getMatch(i)):d};async function n4(e){var m,v;const t=e,n=[];xle(t.router)&&tM(t);let r;for(let x=0;x<t.matches.length;x++){try{const w=_le(t,x);Zp(w)&&await w}catch(w){if(Dr(w))throw w;if(hr(w))r=w;else if(!t.preload)throw w;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?J3(t,r):void 0,o=r&&t.preload?0:a!==void 0?Math.min(a+1,i):i;let s,c;for(let x=0;x<o;x++)n.push(Ale(t,n,x));try{await Promise.all(n)}catch{const x=await Promise.allSettled(n);for(const w of x){if(w.status!=="rejected")continue;const b=w.reason;if(Dr(b))throw b;hr(b)?s??(s=b):c??(c=b)}if(c!==void 0)throw c}const f=s??(r&&!t.preload?r:void 0);let h=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const x=J3(t,f);x===void 0&&ko();const w=t.matches[x],b=t.router.looseRoutesById[w.routeId],S=(m=t.router.options)==null?void 0:m.defaultNotFoundComponent;!b.options.notFoundComponent&&S&&(b.options.notFoundComponent=S),f.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,_=>({..._,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=x,await em(b,["notFoundComponent"])}else if(!t.preload){const x=t.matches[0];x.globalNotFound||(v=t.router.getMatch(x.id))!=null&&v.globalNotFound&&t.updateMatch(x.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const x=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await em(x,["errorComponent"])}for(let x=0;x<=h;x++){const{id:w,routeId:b}=t.matches[x],S=t.router.looseRoutesById[b];try{const E=Ele(t,w,S);if(E){const _=await E;t.updateMatch(w,A=>({...A,..._}))}}catch(E){console.error(`Error executing head for route ${b}:`,E)}}const d=tM(t);if(Zp(d)&&await d,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function r4(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 em(e,t=ob){!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===ob?(()=>{if(e._componentsPromise===void 0){const r=r4(e,ob);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():r4(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function w7(e){var t;for(const n of ob)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const ob=["component","errorComponent","pendingComponent","notFoundComponent"];function Cle(e){return{input:({url:t})=>{for(const n of e)t=nM(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=S7(e[n],t);return t}}}function Tle(e){const t=v7(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=ab(["/",t,a.pathname]),a)}}function nM(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 S7(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 jle(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,f=n(e.status),h=n(e.loadedAt),d=n(e.isLoading),m=n(e.isTransitioning),v=n(e.location),x=n(e.resolvedLocation),w=n(e.statusCode),b=n(e.redirect),S=n([]),E=n([]),_=n([]),A=r(()=>k_(o,S.get())),C=r(()=>k_(s,E.get())),N=r(()=>k_(c,_.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:v.get().href,resolvedLocationHref:(z=x.get())==null?void 0:z.href,status:f.get()}}),$=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:d.get(),isTransitioning:m.get(),matches:A.get(),location:v.get(),resolvedLocation:x.get(),statusCode:w.get(),redirect:b.get()})),L=Jp(64);function D(z){let H=L.get(z);return H||(H=r(()=>{const G=S.get();for(const Q of G){const U=o.get(Q);if(U&&U.routeId===z)return U.get()}}),L.set(z,H)),H}const F={status:f,loadedAt:h,isLoading:d,isTransitioning:m,location:v,resolvedLocation:x,statusCode:w,redirect:b,matchesId:S,pendingIds:E,cachedIds:_,matches:A,pendingMatches:C,cachedMatches:N,firstId:M,hasPending:R,matchRouteDeps:P,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:$,getRouteMatchStore:D,setMatches:I,setPending:q,setCached:k};I(e.matches),a==null||a(F);function I(z){D_(z,o,S,n,i)}function q(z){D_(z,s,E,n,i)}function k(z){D_(z,c,_,n,i)}return F}function k_(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function D_(e,t,n,r,i){const a=e.map(s=>s.id),o=new Set(a);i(()=>{for(const s of t.keys())o.has(s)||t.delete(s);for(const s of e){const c=t.get(s.id);if(!c){const f=r(s);f.routeId=s.routeId,t.set(s.id,f);continue}c.routeId=s.routeId,c.get()!==s&&c.set(s)}Jse(n.get(),a)||n.set(a)})}var gl="__TSR_index",i4="popstate",a4="beforeunload";function Nle(e){let t=e.getLocation();const n=new Set,r=o=>{t=e.getLocation(),n.forEach(s=>s({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?r(o):t=e.getLocation()},a=async({task:o,navigateOpts:s,...c})=>{var d,m;if((s==null?void 0:s.ignoreBlocker)??!1){o();return}const f=((d=e.getBlockers)==null?void 0:d.call(e))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const v of f){const x=Mb(c.path,c.state);if(await v.blockerFn({currentLocation:t,nextLocation:x,action:c.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,s,c)=>{const f=t.state[gl];s=o4(f+1,s),a({task:()=>{e.pushState(o,s),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:o,state:s})},replace:(o,s,c)=>{const f=t.state[gl];s=o4(f,s),a({task:()=>{e.replaceState(o,s),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:o,state:s})},go:(o,s)=>{a({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:s,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[gl]!==0,createHref:o=>e.createHref(o),block:o=>{var c;if(!e.setBlockers)return()=>{};const s=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...s,o]),()=>{var h,d;const f=((h=e.getBlockers)==null?void 0:h.call(e))??[];(d=e.setBlockers)==null||d.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 o4(e,t){t||(t={});const n=UP();return{...t,key:n,__TSR_key:n,[gl]:e}}function Ole(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=$,s=($=>$),c=(()=>Mb(`${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 $=UP();t.history.replaceState({[gl]:0,key:$,__TSR_key:$},"")}let f=c(),h,d=!1,m=!1,v=!1,x=!1;const w=()=>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,h=void 0)},_=($,L,D)=>{const F=s(L);S||(h=f),f=Mb(L,D),b={href:F,state:D,isPush:(b==null?void 0:b.isPush)||$==="push"},S||(S=Promise.resolve().then(()=>E()))},A=$=>{f=c(),M.notify({type:$})},C=async()=>{if(m){m=!1;return}const $=c(),L=$.state[gl]-f.state[gl],D=L===1,F=L===-1,I=!D&&!F||d;d=!1;const q=I?"GO":F?"BACK":"FORWARD",k=I?{type:"GO",index:L}:{type:F?"BACK":"FORWARD"};if(v)v=!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(k);return}}}f=c(),M.notify(k)},N=$=>{if(x){x=!1;return}let L=!1;const D=a();if(typeof document<"u"&&D.length)for(const F of D){const I=F.enableBeforeUnload??!0;if(I===!0){L=!0;break}if(typeof I=="function"&&I()===!0){L=!0;break}}if(L)return $.preventDefault(),$.returnValue=""},M=Nle({getLocation:w,getLength:()=>t.history.length,pushState:($,L)=>_("push",$,L),replaceState:($,L)=>_("replace",$,L),back:$=>($&&(v=!0),x=!0,t.history.back()),forward:$=>{$&&(v=!0),x=!0,t.history.forward()},go:$=>{d=!0,t.history.go($)},createHref:$=>s($),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(a4,N,{capture:!0}),t.removeEventListener(i4,C)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(a4,N,{capture:!0}),t.addEventListener(i4,C),t.history.pushState=function(...$){const L=n.apply(t.history,$);return M._ignoreSubscribers||A("PUSH"),L},t.history.replaceState=function(...$){const L=r.apply(t.history,$);return M._ignoreSubscribers||A("REPLACE"),L},M}function Mle(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Mb(e,t){const n=Mle(e),r=n.indexOf("#"),i=n.indexOf("?"),a=UP();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||{[gl]:0,key:a,__TSR_key:a}}}function UP(){return(Math.random()+1).toString(36).substring(7)}function Af(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 rM=new WeakMap;var Rle=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 h;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=dle(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Ole()),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 d;this.resolvePathCache=Jp(1e3),d=this.buildRouteTree(),this.setRoutes(d)}if(!this.stores&&this.latestLocation){const d=this.getStoreConfig(this);this.batch=d.batch,this.stores=jle(kle(this.latestLocation),d),Hle(this)}let s=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(a||i!==c||o!==f){this.basepath=c;const d=[],m=v7(c);m&&m!=="/"&&d.push(Tle({basepath:c})),f&&d.push(f),this.rewrite=d.length===0?void 0:d.length===1?d[0]:Cle(d),this.history&&this.updateLatestLocation(),s=!0}s&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((h=window.CSS)==null?void 0:h.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=ole(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&tle(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:c,search:f,hash:h,href:d,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const S=this.options.parseSearch(f),E=this.options.stringifySearch(S);return{href:c+E+h,publicHref:c+E+h,pathname:op(c).path,external:!1,searchStr:E,search:ic(r==null?void 0:r.search,S),hash:op(h.slice(1)).path,state:sl(r==null?void 0:r.state,m)}}const v=new URL(d,this.origin),x=nM(this.rewrite,v),w=this.options.parseSearch(x.search),b=this.options.stringifySearch(w);return x.search=b,{href:x.href.replace(x.origin,""),publicHref:d,pathname:op(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:b,search:ic(r==null?void 0:r.search,w),hash:op(x.hash.slice(1)).path,state:sl(r==null?void 0:r.state,m)}},a=i(n),{__tempLocation:o,__tempKey:s}=a.state;if(o&&(!s||s===this.tempLocationKey)){const c=i(o);return c.state.key=a.state.key,c.state.__TSR_key=a.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:a}}return a},this.resolvePathWithBase=(n,r)=>fle({base:n,to:r.includes("//")?VP(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=>Dle({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 L,D;const o=a._fromLocation||this.pendingBuiltLocation||this.latestLocation,s=this.matchRoutesLightweight(o);a.from;const c=a.unsafeRelative==="path"?o.pathname:a.from??s.fullPath,f=a.to?`${a.to}`:void 0,h=s.search,d=Object.assign(Object.create(null),s.params),m=(f==null?void 0:f.charCodeAt(0))===47?"/":this.resolvePathWithBase(c,"."),v=f?this.resolvePathWithBase(m,f):m,x=a.params===!1||a.params===null?Object.create(null):(a.params??!0)===!0?d:Object.assign(d,pc(a.params,d)),w=this.routesByPath[No(v)];let b;if(w)b=this.getRouteBranch(w);else if(v.includes("$"))b=[];else{const F=this.getMatchedRoutes(v);b=F.matchedRoutes,this.options.notFoundRoute&&(!F.foundRoute||F.foundRoute.path!=="/"&&F.routeParams["**"])&&(b=[...b,this.options.notFoundRoute])}if(b.length&&f7(x))for(const F of b){const I=((L=F.options.params)==null?void 0:L.stringify)??F.options.stringifyParams;if(I)try{Object.assign(x,I(x))}catch{}}const S=n.leaveParams?v:op(Q3({path:v,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let E=h;if(n._includeValidateSearch&&((D=this.options.search)!=null&&D.strict)){const F={};b.forEach(I=>{if(I.options.validateSearch)try{Object.assign(F,sb(I.options.validateSearch,{...F,...E}))}catch{}}),E=F}E=Ile({search:E,dest:a,destRoutes:b,_includeValidateSearch:n._includeValidateSearch}),E=ic(h,E);const _=this.options.stringifySearch(E),A=a.hash===!0?o.hash:a.hash?pc(a.hash,o.hash):void 0,C=A?`#${A}`:"";let N=a.state===!0?o.state:a.state?pc(a.state,o.state):{};N=sl(o.state,N);const M=`${S}${_}${C}`;let R,P,$=!1;if(this.rewrite){const F=new URL(M,this.origin),I=S7(this.rewrite,F);R=F.href.replace(F.origin,""),I.origin!==this.origin?(P=I.href,$=!0):P=I.pathname+I.search+I.hash}else R=Zse(M),P=R;return{publicHref:P,href:R,pathname:S,search:E,searchStr:_,state:N,hash:A??"",external:$,unmaskOnReload:a.unmaskOnReload}},i=(a={},o)=>{const s=r(a);let c=o?r(o):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const h=nle(s.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:d,params:m,...v}=h.route,x=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,pc(m,f));o={from:n.from,...v,params:x},c=r(o)}}}return c&&(s.maskedLocation=c),s};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(d=>{i.state[d]=this.latestLocation.state[d]});const h=Rc(i.state,this.latestLocation.state);return f.forEach(d=>{delete i.state[d]}),h},s=No(this.latestLocation.href)===No(i.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Wf(()=>{c==null||c.resolve(),c=void 0}),s&&o())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...d}=i;f&&(d={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,a=i.replace?"REPLACE":"PUSH",this.history[a==="REPLACE"?"replace":"push"](d.publicHref,d.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:s,...c}={})=>{if(s){const d=this.history.location.state.__TSR_index,m=Mb(s,{__TSR_index:n?d:d+1}),v=new URL(m.pathname,this.origin);c.to=nM(this.rewrite,v).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.hash.slice(1)}const f=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const h=this.commitLocation({...f,viewTransition:a,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:a,...o})=>{var c,f;let s=!1;if(i)try{new URL(`${i}`),s=!0}catch{}if(s&&!r&&(r=!0),r){if(n!==void 0||!i){const d=this.buildLocation({to:n,...o});i=i??d.publicHref,a=a??d.publicHref}const h=!s&&a?a:i;if(Nb(h,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const d=((f=(c=this.history).getBlockers)==null?void 0:f.call(c))??[];for(const m of d)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(h):window.location.href=h,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 s=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(h=>{this.startTransition(async()=>{var d;try{this.beforeLoad(),r?rM.set(this.latestLocation,r):rM.delete(this.latestLocation);const m=this.latestLocation,v=Af(m,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...v}),this.emit({type:"onBeforeLoad",...v}),await n4({router:this,sync:n==null?void 0:n.sync,forceStaleReload:s.href===m.href,matches:this.stores.pendingMatches.get(),location:m,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var E,_;let x=null,w=null,b=null,S=null;this.batch(()=>{const A=this.stores.pendingMatches.get(),C=A.length,N=this.stores.matches.get();x=C?N.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);w=C?N.filter(P=>!M.has(P.routeId)):null,b=C?A.filter(P=>!R.has(P.routeId)):null,S=C?A.filter(P=>R.has(P.routeId)):N,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),C&&(this.stores.setMatches(A),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...x.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[A,C]of[[w,"onLeave"],[b,"onEnter"],[S,"onStay"]])if(A)for(const N of A)(_=(E=this.looseRoutesById[N.routeId].options)[C])==null||_.call(E,N)})})}})}catch(m){Dr(m)?(i=m,this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):hr(m)&&(a=m);const v=i?i.status:a?404:this.stores.matches.get().some(x=>x.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(v),this.stores.redirect.set(i)})}this.latestLoadPromise===o&&((d=this.commitLocationPromise)==null||d.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),h()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(h=>h.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},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(),s=typeof r.types=="function"?r.types(Af(a,o)):r.types;if(s===!1){n();return}i={update:n,types:s}}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 s=r(o.get());s.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):o.set(s)}})},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&&Nb(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=em,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()]),s=i.filter(c=>!o.has(c.id));if(s.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...s])}try{return i=await n4({router:this,matches:i,location:r,preload:!0,updateMatch:(c,f)=>{a.has(c)?i=i.map(h=>h.id===c?f(h):h):this.updateMatch(c,f)}}),i}catch(c){if(Dr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});hr(c)||console.error(c);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(),s=rle(a.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!s||n.params&&!Rc(s.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Rc(o.search,a.search,{partial:!0})?s.rawParams:!1:s.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??gle,parseSearch:e.parseSearch??mle,protocolAllowlist:e.protocolAllowlist??Qse}),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=m7(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 h,d;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n;let{matchedRoutes:a}=n,o=!1;(r?r.path!=="/"&&i["**"]:No(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);const s=o?$le(this.options.notFoundMode,a):void 0,c=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 v=a[m],x=c[m-1];let w,b,S;{const I=(x==null?void 0:x.search)??e.search,q=(x==null?void 0:x._strictSearch)??void 0;try{const k=sb(v.options.validateSearch,{...I})??void 0;w={...I,...k},b={...q,...k},S=void 0}catch(k){let z=k;if(k instanceof Rb||(z=new Rb(k.message,{cause:k})),t!=null&&t.throwOnError)throw z;w=I,b={},S=z}}const E=((d=(h=v.options).loaderDeps)==null?void 0:d.call(h,{search:w}))??"",_=E?JSON.stringify(E):"",{interpolatedPath:A,usedParams:C}=Q3({path:v.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),N=v.id+A+_,M=this.getMatch(N),R=f.get(v.id),P=(M==null?void 0:M._strictParams)??C;let $;if(!M)try{s4(v,P)}catch(I){if(hr(I)||Dr(I)?$=I:$=new Ple(I.message,{cause:I}),t!=null&&t.throwOnError)throw $}Object.assign(i,P);const L=R?"stay":"enter";let D;if(M)D={...M,cause:L,params:(R==null?void 0:R.params)??i,_strictParams:P,search:ic(R?R.search:M.search,w),_strictSearch:b};else{const I=v.options.loader||v.options.beforeLoad||v.lazyFn||w7(v)?"pending":"success";D={id:N,ssr:v.options.ssr,index:m,routeId:v.id,params:(R==null?void 0:R.params)??i,_strictParams:P,pathname:A,updatedAt:Date.now(),search:R?ic(R.search,w):w,_strictSearch:b,searchError:void 0,status:I,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:Wf()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:R?sl(R.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:v.options.staticData||{},fullPath:v.fullPath}}t!=null&&t.preload||(D.globalNotFound=s===v.id),D.searchError=S;const F=this.getParentContext(x);D.context={...F,...D.__routeContext,...D.__beforeLoadContext},c[m]=D}for(let m=0;m<c.length;m++){const v=c[m],x=this.looseRoutesById[v.routeId],w=this.getMatch(v.id),b=f.get(v.routeId);if(v.params=b?ic(b.params,i):i,!w){const S=c[m-1],E=this.getParentContext(S);if(x.options.context){const _={deps:v.loaderDeps,params:v.params,context:E??{},location:e,navigate:A=>this.navigate({...A,_fromLocation:e}),buildLocation:this.buildLocation,cause:v.cause,abortController:v.abortController,preload:!!v.preload,matches:c,routeId:x.id};v.__routeContext=x.options.context(_)??void 0}v.context={...E,...v.__routeContext,...v.__beforeLoadContext}}}return c}matchRoutesLightweight(e){var f;const{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=Qp(t),i={...e.search};for(const h of t)try{Object.assign(i,sb(h.options.validateSearch,i))}catch{}const a=Qp(this.stores.matchesId.get()),o=a&&((f=this.stores.matchStores.get(a))==null?void 0:f.get()),s=o&&o.routeId===r.id&&o.pathname===e.pathname;let c;if(s)c=o.params;else{const h=Object.assign(Object.create(null),n);for(const d of t)try{s4(d,h)}catch{}c=h}return{matchedRoutes:t,fullPath:r.fullPath,search:i,params:c}}},Rb=class extends Error{},Ple=class extends Error{};function kle(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function sb(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Rb("Async validation not supported");if(n.issues)throw new Rb(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 Dle({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=No(e);let a;const o=ile(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 Ile({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Lle(n)(e,t,r??!1)}function Lle(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:s,next:c})=>{let f=s;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(f=a.options.preSearchFilters.reduce((d,m)=>m(d),s));const h=c(f);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((d,m)=>m(d),h):h};t.middlewares.push(o)}if(a.options.validateSearch){const o=({search:s,next:c})=>{const f=c(s);if(!t._includeValidateSearch)return f;try{return{...f,...sb(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:pc(o.search,a):{}};t.middlewares.push(n);const r=(a,o,s)=>{if(a>=s.length)return o;const c=s[a];return c({search:o,next:h=>r(a+1,h,s)})};return function(o,s,c){return t.dest=s,t._includeValidateSearch=c,r(0,o,t.middlewares)}}function $le(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 Pc}function s4(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 Ble(){try{return sessionStorage}catch{return}}const qle="tsr-scroll-restoration-v1_3",Cf=Ble();function zle(){try{return JSON.parse((Cf==null?void 0:Cf.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function Fle(){try{Cf==null||Cf.setItem(qle,JSON.stringify(Fs))}catch{}}const Fs=zle(),l4="data-scroll-restoration-id",Vle=e=>e.state.__TSR_key||e.href;function Ule(e){const t=e.getAttribute(l4);if(t)return`[${l4}="${t}"]`;let n="",r=e,i;for(;i=r.parentNode;){let a=1,o=r;for(;o=o.previousElementSibling;)a++;const s=`${r.localName}:nth-child(${a})`;n=n?`${s} > ${n}`:s,r=i}return n}let Sy=!1;const ff="window";function iM(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function c4(e){const t=[];for(const n of e){if(n===ff)continue;const r=iM(n);r&&t.push(r)}return t}function Hle(e,t){if(e.options.scrollRestoration&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,Sy=!1;const n=e.options.getScrollRestorationKey||Vle,r=new Map,i=(s,c,f)=>{const h=r.get(s)||{};h.scrollX=c,h.scrollY=f,r.set(s,h)};history.scrollRestoration="manual";const a=s=>{if(!(Sy||!e.isScrollRestoring))if(s.target===document)i(ff,scrollX,scrollY);else{const c=s.target;i(c,c.scrollLeft,c.scrollTop)}},o=s=>{if(!e.isScrollRestoring)return;const c=Fs[s]||(Fs[s]={});for(const[f,h]of r)f===ff?c[ff]=h:f.isConnected&&(c[Ule(f)]=h)};document.addEventListener("scroll",a,!0),e.subscribe("onBeforeLoad",s=>{s.fromLocation&&o(n(s.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{o(n(e.stores.resolvedLocation.get()??e.stores.location.get())),Fle()}),e.subscribe("onRendered",s=>{var x;const c=e.options.scrollRestorationBehavior,f=e.options.scrollToTopSelectors,h=e.resetNextScroll;let d;if(r.clear(),h||(e.resetNextScroll=!0),typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return;const m=n(s.toLocation),v=s.fromLocation&&n(s.fromLocation);if(e.isScrollRestoring&&v&&v!==m){const w=Fs[v];if(w){let b=Fs[m];for(const S in w){if(S===ff){if(h)continue}else{const E=iM(S);if(!E||h&&f&&(d??(d=c4(f)),d.includes(E)))continue}b||(b=Fs[m]={}),b[S]??(b[S]=w[S])}}}Sy=!0;try{const w=s.toLocation.hash,b=s.toLocation.state.__hashScrollIntoViewOptions??!0;let S=!1;if(h){const E=rM.get(s.toLocation),_=w&&b&&(E==="PUSH"||E==="REPLACE"),A=e.isScrollRestoring?Fs[m]:void 0;if(A)for(const C in A){const{scrollX:N,scrollY:M}=A[C];if(C===ff){if(_)continue;scrollTo({top:M,left:N,behavior:c}),S=!0}else{const R=iM(C);R&&(R.scrollLeft=N,R.scrollTop=M)}}if(!S&&!w){const C={top:0,left:0,behavior:c};if(scrollTo(C),f){d??(d=c4(f));for(const N of d)N.scrollTo(C)}}}!S&&w&&b&&((x=document.getElementById(w))==null||x.scrollIntoView(b))}finally{Sy=!1}})}const Gle="Error preloading route! ☝️";var _7=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 c,f;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(f=(c=this.options).getParentRoute)==null?void 0:f.call(c),r?this._path=Pc:this.parentRoute||ko();let i=r?Pc:n==null?void 0:n.path;i&&i!=="/"&&(i=g7(i));const a=(n==null?void 0:n.id)||i;let o=r?Pc:ab([this.parentRoute.id==="__root__"?"":this.parentRoute.id,a]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=ab(["/",o]));const s=o==="__root__"?"/":ab([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=s,this._to=No(s)},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=>ble({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.")}},Kle=class extends _7{constructor(e){super(e)}};function HP(e){const t=e.errorComponent??GP;return g.jsx(Wle,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?j.createElement(t,{error:n,reset:r}):e.children})}var Wle=class extends j.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function GP({error:e}){const[t,n]=j.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.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"})]}),g.jsx("div",{style:{height:".25rem"}}),t?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?g.jsx("code",{children:e.message}):null})}):null]})}function Yle({children:e,fallback:t=null}){return E7()?g.jsx(Z.Fragment,{children:e}):g.jsx(Z.Fragment,{children:t})}function E7(){return Z.useSyncExternalStore(Xle,()=>!0,()=>!1)}function Xle(){return()=>{}}var A7=j.createContext(null);function ui(e){return j.useContext(A7)}var j0=j.createContext(void 0),Qle=j.createContext(void 0),Zt=(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))(Zt||{});function Zle({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(f,h,d){const m=h.depsTail;if(m!==void 0&&m.dep===f)return;const v=m!==void 0?m.nextDep:h.deps;if(v!==void 0&&v.dep===f){v.version=d,h.depsTail=v;return}const x=f.subsTail;if(x!==void 0&&x.version===d&&x.sub===h)return;const w=h.depsTail=f.subsTail={version:d,dep:f,sub:h,prevDep:m,nextDep:v,prevSub:x,nextSub:void 0};v!==void 0&&(v.prevDep=w),m!==void 0?m.nextDep=w:h.deps=w,x!==void 0?x.nextSub=w:f.subs=w}function i(f,h=f.sub){const d=f.dep,m=f.prevDep,v=f.nextDep,x=f.nextSub,w=f.prevSub;return v!==void 0?v.prevDep=m:h.depsTail=m,m!==void 0?m.nextDep=v:h.deps=v,x!==void 0?x.prevSub=w:d.subsTail=w,w!==void 0?w.nextSub=x:(d.subs=x)===void 0&&n(d),v}function a(f){let h=f.nextSub,d;e:do{const m=f.sub;let v=m.flags;if(v&60?v&12?v&4?!(v&48)&&c(f,m)?(m.flags=v|40,v&=1):v=0:m.flags=v&-9|32:v=0:m.flags=v|32,v&2&&t(m),v&1){const x=m.subs;if(x!==void 0){const w=(f=x).nextSub;w!==void 0&&(d={value:h,prev:d},h=w);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;d!==void 0;)if(f=d.value,d=d.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function o(f,h){let d,m=0,v=!1;e:do{const x=f.dep,w=x.flags;if(h.flags&16)v=!0;else if((w&17)===17){if(e(x)){const b=x.subs;b.nextSub!==void 0&&s(b),v=!0}}else if((w&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(d={value:f,prev:d}),f=x.deps,h=x,++m;continue}if(!v){const b=f.nextDep;if(b!==void 0){f=b;continue}}for(;m--;){const b=h.subs,S=b.nextSub!==void 0;if(S?(f=d.value,d=d.prev):f=b,v){if(e(h)){S&&s(b),h=f.sub;continue}v=!1}else h.flags&=-33;h=f.sub;const E=f.nextDep;if(E!==void 0){f=E;continue e}}return v}while(!0)}function s(f){do{const h=f.sub,d=h.flags;(d&48)===32&&(h.flags=d|16,(d&6)===2&&t(h))}while((f=f.nextSub)!==void 0)}function c(f,h){let d=h.depsTail;for(;d!==void 0;){if(d===f)return!0;d=d.prevDep}return!1}}function Jle(e,t,n){var a,o,s;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:(s=r?e.complete:n)==null?void 0:s.bind(i)}}const aM=[];let lb=0;const{link:u4,unlink:ece,propagate:tce,checkDirty:C7,shallowPropagate:f4}=Zle({update(e){return e._update()},notify(e){aM[oM++]=e,e.flags&=~Zt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Zt.Mutable|Zt.Dirty,Pb(e))}});let _y=0,oM=0,Ta,sM=0;function T7(e){try{++sM,e()}finally{--sM||j7()}}function Pb(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=ece(n,e)}function j7(){if(!(sM>0)){for(;_y<oM;){const e=aM[_y];aM[_y++]=void 0,e.notify()}_y=0,oM=0}}function d4(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?Zt.None:Zt.Mutable,get(){return Ta!==void 0&&u4(i,Ta,lb),i._snapshot},subscribe(a){const o=Jle(a),s={current:!1},c=nce(()=>{var f;i.get(),s.current?(f=o.next)==null||f.call(o,i._snapshot):s.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(a){const o=Ta,s=(t==null?void 0:t.compare)??Object.is;if(n)Ta=i,++lb,i.depsTail=void 0;else if(a===void 0)return!1;n&&(i.flags=Zt.Mutable|Zt.RecursedCheck);try{const c=i._snapshot,f=typeof a=="function"?a(c):a===void 0&&n?r(c):a;return c===void 0||!s(c,f)?(i._snapshot=f,!0):!1}finally{Ta=o,n&&(i.flags&=~Zt.RecursedCheck),Pb(i)}}};return n?(i.flags=Zt.Mutable|Zt.Dirty,i.get=function(){const a=i.flags;if(a&Zt.Dirty||a&Zt.Pending&&C7(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&f4(o)}}else a&Zt.Pending&&(i.flags=a&~Zt.Pending);return Ta!==void 0&&u4(i,Ta,lb),i._snapshot}):i.set=function(a){if(i._update(a)){const o=i.subs;o!==void 0&&(tce(o),f4(o),j7())}},i}function nce(e){const t=()=>{const r=Ta;Ta=n,++lb,n.depsTail=void 0,n.flags=Zt.Watching|Zt.RecursedCheck;try{return e()}finally{Ta=r,n.flags&=~Zt.RecursedCheck,Pb(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Zt.Watching|Zt.RecursedCheck,notify(){const r=this.flags;r&Zt.Dirty||r&Zt.Pending&&C7(this.deps,this)?t():this.flags=Zt.Watching},stop(){this.flags=Zt.None,this.depsTail=void 0,Pb(this)}};return t(),n}var I_={exports:{}},L_={},$_={exports:{}},B_={};/**
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 h4;function rce(){if(h4)return B_;h4=1;var e=dg();function t(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(d,m){var v=m(),x=r({inst:{value:v,getSnapshot:m}}),w=x[0].inst,b=x[1];return a(function(){w.value=v,w.getSnapshot=m,c(w)&&b({inst:w})},[d,v,m]),i(function(){return c(w)&&b({inst:w}),d(function(){c(w)&&b({inst:w})})},[d]),o(v),v}function c(d){var m=d.getSnapshot;d=d.value;try{var v=m();return!n(d,v)}catch{return!0}}function f(d,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:s;return B_.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,B_}var p4;function ice(){return p4||(p4=1,$_.exports=rce()),$_.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 m4;function ace(){if(m4)return L_;m4=1;var e=dg(),t=ice();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,c=e.useDebugValue;return L_.useSyncExternalStoreWithSelector=function(f,h,d,m,v){var x=a(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=s(function(){function S(N){if(!E){if(E=!0,_=N,N=m(N),v!==void 0&&w.hasValue){var M=w.value;if(v(M,N))return A=M}return A=N}if(M=A,r(_,N))return M;var R=m(N);return v!==void 0&&v(M,R)?(_=N,M):(_=N,A=R)}var E=!1,_,A,C=d===void 0?null:d;return[function(){return S(h())},C===null?void 0:function(){return S(C())}]},[h,d,m,v]);var b=i(f,x[0],x[1]);return o(function(){w.hasValue=!0,w.value=b},[b]),c(b),b},L_}var g4;function oce(){return g4||(g4=1,I_.exports=ace()),I_.exports}var N7=oce();const sce=Ct(N7);function lce(e,t){return e===t}function Br(e,t,n=lce){const r=j.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:s}=e.subscribe(o);return s},[e]),i=j.useCallback(()=>e==null?void 0:e.get(),[e]);return N7.useSyncExternalStoreWithSelector(r,i,i,t,n)}var cce={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function lu(e){const t=ui(),n=j.useContext(e.from?Qle:j0),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=j.useRef(void 0);return Br(i??cce,o=>{if((e.shouldThrow??!0)&&!o&&ko(),o===void 0)return;const s=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=sl(a.current,s);return a.current=c,c}return s})}function O7(e){return lu({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function M7(e){const{select:t,...n}=e;return lu({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function hg(e){return lu({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 cu(e){return lu({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fi(e){const t=ui();return j.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function R7(e){return lu({...e,select:t=>e.select?e.select(t.context):t.context})}var uu=GG();const P7=Ct(uu);function uce(e,t){const n=ui(),r=Kse(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:d,replace:m,startTransition:v,resetScroll:x,viewTransition:w,children:b,target:S,disabled:E,style:_,className:A,onClick:C,onBlur:N,onFocus:M,onMouseEnter:R,onMouseLeave:P,onTouchStart:$,ignoreBlocker:L,params:D,search:F,hash:I,state:q,mask:k,reloadDocument:z,unsafeRelative:H,from:G,_fromLocation:Q,...U}=e,V=E7(),X=j.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),W=Br(n.stores.location,We=>We,(We,Et)=>We.href===Et.href),K=j.useMemo(()=>{const We={_fromLocation:W,...X};return n.buildLocation(We)},[n,W,X]),J=K.maskedLocation?K.maskedLocation.publicHref:K.publicHref,ee=K.maskedLocation?K.maskedLocation.external:K.external,te=j.useMemo(()=>gce(J,ee,n.history,E),[E,ee,J,n.history]),ne=j.useMemo(()=>{if(te!=null&&te.external)return Nb(te.href,n.protocolAllowlist)?void 0:te.href;if(!vce(s)&&!(typeof s!="string"||s.indexOf(":")===-1))try{return new URL(s),Nb(s,n.protocolAllowlist)?void 0:s}catch{}},[s,te,n.protocolAllowlist]),se=j.useMemo(()=>{if(ne)return!1;if(o!=null&&o.exact){if(!ule(W.pathname,K.pathname,n.basepath))return!1}else{const We=Ob(W.pathname,n.basepath),Et=Ob(K.pathname,n.basepath);if(!(We.startsWith(Et)&&(We.length===Et.length||We[Et.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Rc(W.search,K.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?V&&W.hash===K.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,V,K.hash,K.pathname,K.search,n.basepath]),ce=se?pc(i,{})??fce:q_,oe=se?q_:pc(a,{})??q_,be=[A,ce.className,oe.className].filter(Boolean).join(" "),xe=(_||ce.style||oe.style)&&{..._,...ce.style,...oe.style},[we,Ae]=j.useState(!1),Ee=j.useRef(!1),rt=e.reloadDocument||ne?!1:c??n.options.defaultPreload,Ve=f??n.options.defaultPreloadDelay??0,Pt=j.useCallback(()=>{n.preloadRoute({...X,_builtLocation:K}).catch(We=>{console.warn(We),console.warn(Gle)})},[n,X,K]);Gse(r,j.useCallback(We=>{We!=null&&We.isIntersecting&&Pt()},[Pt]),mce,{disabled:!!E||rt!=="viewport"}),j.useEffect(()=>{Ee.current||!E&&rt==="render"&&(Pt(),Ee.current=!0)},[E,Pt,rt]);const Ft=We=>{const Et=We.currentTarget.getAttribute("target"),hn=S!==void 0?S:Et;if(!E&&!yce(We)&&!We.defaultPrevented&&(!hn||hn==="_self")&&We.button===0){We.preventDefault(),uu.flushSync(()=>{Ae(!0)});const Tn=n.subscribe("onResolved",()=>{Tn(),Ae(!1)});n.navigate({...X,replace:m,resetScroll:x,hashScrollIntoView:d,startTransition:v,viewTransition:w,ignoreBlocker:L})}};if(ne)return{...U,ref:r,href:ne,...b&&{children:b},...S&&{target:S},...E&&{disabled:E},..._&&{style:_},...A&&{className:A},...C&&{onClick:C},...N&&{onBlur:N},...M&&{onFocus:M},...R&&{onMouseEnter:R},...P&&{onMouseLeave:P},...$&&{onTouchStart:$}};const Xe=We=>{if(E||rt!=="intent")return;if(!Ve){Pt();return}const Et=We.currentTarget;if(lp.has(Et))return;const hn=setTimeout(()=>{lp.delete(Et),Pt()},Ve);lp.set(Et,hn)},ht=We=>{E||rt!=="intent"||Pt()},Tt=We=>{if(E||!rt||!Ve)return;const Et=We.currentTarget,hn=lp.get(Et);hn&&(clearTimeout(hn),lp.delete(Et))};return{...U,...ce,...oe,href:te==null?void 0:te.href,ref:r,onClick:tf([C,Ft]),onBlur:tf([N,Tt]),onFocus:tf([M,Xe]),onMouseEnter:tf([R,Xe]),onMouseLeave:tf([P,Tt]),onTouchStart:tf([$,ht]),disabled:!!E,target:S,...xe&&{style:xe},...be&&{className:be},...E&&dce,...se&&hce,...V&&we&&pce}}var q_={},fce={className:"active"},dce={role:"link","aria-disabled":!0},hce={"data-status":"active","aria-current":"page"},pce={"data-transitioning":"transitioning"},lp=new WeakMap,mce={rootMargin:"100px"},tf=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function gce(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function vce(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var pg=j.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...a}=uce(r,t),o=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;if(!n){const{disabled:s,...c}=a;return j.createElement("a",c,o)}return j.createElement(n,a,o)});function yce(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var bce=class extends _7{constructor(e){super(e),this.useMatch=t=>lu({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>R7({...t,from:this.id}),this.useSearch=t=>cu({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>hg({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>M7({...t,from:this.id}),this.useLoaderData=t=>O7({...t,from:this.id}),this.useNavigate=()=>fi({from:this.fullPath}),this.Link=Z.forwardRef((t,n)=>g.jsx(pg,{ref:n,from:this.fullPath,...t}))}};function Ka(e){return new bce(e)}var xce=class extends Kle{constructor(e){super(e),this.useMatch=t=>lu({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>R7({...t,from:this.id}),this.useSearch=t=>cu({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>hg({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>M7({...t,from:this.id}),this.useLoaderData=t=>O7({...t,from:this.id}),this.useNavigate=()=>fi({from:this.fullPath}),this.Link=Z.forwardRef((t,n)=>g.jsx(pg,{ref:n,from:this.fullPath,...t}))}};function wce(e){return new xce(e)}function Sce(e){const t=ui(),n=`not-found-${Br(t.stores.location,r=>r.pathname)}-${Br(t.stores.status,r=>r)}`;return g.jsx(HP,{getResetKey:()=>n,onCatch:(r,i)=>{var a;if(hr(r))(a=e.onCatch)==null||a.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(hr(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function _ce(){return g.jsx("p",{children:"Not Found"})}function df(e){return g.jsx(g.Fragment,{children:e.children})}function k7(e,t,n){return t.options.notFoundComponent?g.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?g.jsx(e.options.defaultNotFoundComponent,{...n}):g.jsx(_ce,{})}function Ece(e){return null}function Ace(){return Ece(ui()),null}var D7=j.memo(function({matchId:t}){const n=ui(),r=n.stores.matchStores.get(t);r||ko();const i=Br(n.stores.loadedAt,o=>o),a=Br(r,o=>o);return g.jsx(Cce,{router:n,matchId:t,resetKey:i,matchState:j.useMemo(()=>{var c;const o=a.routeId,s=(c=n.routesById[o].parentRoute)==null?void 0:c.id;return{routeId:o,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:s}},[a._displayPending,a.routeId,a.ssr,n.routesById])})});function Cce({router:e,matchId:t,resetKey:n,matchState:r}){var x,w;const i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?g.jsx(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((x=e.options.notFoundRoute)==null?void 0:x.options.component):i.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",d=(!i.isRoot||i.options.wrapInSuspense||h)&&(i.options.wrapInSuspense??a??(((w=i.options.errorComponent)==null?void 0:w.preload)||h))?j.Suspense:df,m=s?HP:df,v=f?Sce:df;return g.jsxs(i.isRoot?i.options.shellComponent??df:df,{children:[g.jsx(j0.Provider,{value:t,children:g.jsx(d,{fallback:o,children:g.jsx(m,{getResetKey:()=>n,errorComponent:s||GP,onCatch:(b,S)=>{if(hr(b))throw b.routeId??(b.routeId=r.routeId),b;c==null||c(b,S)},children:g.jsx(v,{fallback:b=>{if(b.routeId??(b.routeId=r.routeId),!f||b.routeId&&b.routeId!==r.routeId||!b.routeId&&!i.isRoot)throw b;return j.createElement(f,b)},children:h||r._displayPending?g.jsx(Yle,{fallback:o,children:g.jsx(v4,{matchId:t})}):g.jsx(v4,{matchId:t})})})})}),r.parentRouteId===Pc?g.jsxs(g.Fragment,{children:[g.jsx(Tce,{resetKey:n}),e.options.scrollRestoration&&c7?g.jsx(Ace,{}):null]}):null]})}function Tce({resetKey:e}){const t=ui(),n=j.useRef(void 0);return Cp(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Af(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var v4=j.memo(function({matchId:t}){const n=ui(),r=(h,d)=>{var m;return((m=n.getMatch(h.id))==null?void 0:m._nonReactive[d])??h._nonReactive[d]},i=n.stores.matchStores.get(t);i||ko();const a=Br(i,h=>h),o=a.routeId,s=n.routesById[o],c=j.useMemo(()=>{var d;const h=(d=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:d({routeId:o,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return h?JSON.stringify(h):void 0},[o,a.loaderDeps,a._strictParams,a._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=j.useMemo(()=>{const h=s.options.component??n.options.defaultComponent;return h?g.jsx(h,{},c):g.jsx(I7,{})},[c,s.options.component,n.options.defaultComponent]);if(a._displayPending)throw r(a,"displayPendingPromise");if(a._forcePending)throw r(a,"minPendingPromise");if(a.status==="pending"){const h=s.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const d=n.getMatch(a.id);if(d&&!d._nonReactive.minPendingPromise){const m=Wf();d._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),d._nonReactive.minPendingPromise=void 0},h)}}throw r(a,"loadPromise")}if(a.status==="notFound")return hr(a.error)||ko(),k7(n,s,a.error);if(a.status==="redirected")throw Dr(a.error)||ko(),r(a,"loadPromise");if(a.status==="error")throw a.error;return f}),I7=j.memo(function(){const t=ui(),n=j.useContext(j0);let r,i=!1,a;{const f=n?t.stores.matchStores.get(n):void 0;[r,i]=Br(f,h=>[h==null?void 0:h.routeId,(h==null?void 0:h.globalNotFound)??!1]),a=Br(t.stores.matchesId,h=>h[h.findIndex(d=>d===n)+1])}const o=r?t.routesById[r]:void 0,s=t.options.defaultPendingComponent?g.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||ko(),k7(t,o,void 0);if(!a)return null;const c=g.jsx(D7,{matchId:a});return r===Pc?g.jsx(j.Suspense,{fallback:s,children:c}):c});function jce(){const e=ui(),t=j.useRef({router:e,mounted:!1}),[n,r]=j.useState(!1),i=Br(e.stores.isLoading,d=>d),a=Br(e.stores.hasPending,d=>d),o=N_(i),s=i||n||a,c=N_(s),f=i||a,h=N_(f);return e.startTransition=d=>{r(!0),j.startTransition(()=>{d(),r(!1)})},j.useEffect(()=>{const d=e.history.subscribe(e.load),m=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return No(e.latestLocation.publicHref)!==No(m.publicHref)&&e.commitLocation({...m,replace:!0}),()=>{d()}},[e,e.history]),Cp(()=>{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]),Cp(()=>{o&&!i&&e.emit({type:"onLoad",...Af(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Cp(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...Af(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),Cp(()=>{if(c&&!s){const d=Af(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...d}),T7(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function Nce(){const e=ui(),t=e.routesById[Pc].options.pendingComponent??e.options.defaultPendingComponent,n=t?g.jsx(t,{}):null,r=g.jsxs(typeof document<"u"&&e.ssr?df:j.Suspense,{fallback:n,children:[g.jsx(jce,{}),g.jsx(Oce,{})]});return e.options.InnerWrap?g.jsx(e.options.InnerWrap,{children:r}):r}function Oce(){const e=ui(),t=Br(e.stores.firstId,i=>i),n=Br(e.stores.loadedAt,i=>i),r=t?g.jsx(D7,{matchId:t}):null;return g.jsx(j0.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:g.jsx(HP,{getResetKey:()=>n,errorComponent:GP,onCatch:void 0,children:r})})}var Mce=e=>({createMutableStore:d4,createReadonlyStore:d4,batch:T7}),Rce=e=>new Pce(e),Pce=class extends Rle{constructor(e){super(e,Mce)}};function kce({router:e,children:t,...n}){f7(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=g.jsx(A7.Provider,{value:e,children:t});return e.options.Wrap?g.jsx(e.options.Wrap,{children:r}):r}function Dce({router:e,...t}){return g.jsx(kce,{router:e,...t,children:g.jsx(Nce,{})})}function Ice(e){const t=ui(),n=j.useRef(void 0);return Br(t.stores.location,r=>{const i=r;if(t.options.defaultStructuralSharing){const a=sl(n.current,i);return n.current=a,a}return i})}function je(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 y4(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function za(...e){return t=>{let n=!1;const r=e.map(i=>{const a=y4(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():y4(e[i],null)}}}}function yt(...e){return j.useCallback(za(...e),e)}function Lce(e,t){const n=j.createContext(t),r=a=>{const{children:o,...s}=a,c=j.useMemo(()=>s,Object.values(s));return g.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(a){const o=j.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function $i(e,t=[]){let n=[];function r(a,o){const s=j.createContext(o),c=n.length;n=[...n,o];const f=d=>{var S;const{scope:m,children:v,...x}=d,w=((S=m==null?void 0:m[e])==null?void 0:S[c])||s,b=j.useMemo(()=>x,Object.values(x));return g.jsx(w.Provider,{value:b,children:v})};f.displayName=a+"Provider";function h(d,m){var w;const v=((w=m==null?void 0:m[e])==null?void 0:w[c])||s,x=j.useContext(v);if(x)return x;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[f,h]}const i=()=>{const a=n.map(o=>j.createContext(o));return function(s){const c=(s==null?void 0:s[e])||a;return j.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return i.scopeName=e,[r,$ce(i,...t)]}function $ce(...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((s,{useScope:c,scopeName:f})=>{const d=c(a)[`__scope${f}`];return{...s,...d}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Yf(e){const t=Bce(e),n=j.forwardRef((r,i)=>{const{children:a,...o}=r,s=j.Children.toArray(a),c=s.find(qce);if(c){const f=c.props.children,h=s.map(d=>d===c?j.Children.count(f)>1?j.Children.only(null):j.isValidElement(f)?f.props.children:null:d);return g.jsx(t,{...o,ref:i,children:j.isValidElement(f)?j.cloneElement(f,void 0,h):null})}return g.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function Bce(e){const t=j.forwardRef((n,r)=>{const{children:i,...a}=n;if(j.isValidElement(i)){const o=Fce(i),s=zce(a,i.props);return i.type!==j.Fragment&&(s.ref=r?za(r,o):o),j.cloneElement(i,s)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var L7=Symbol("radix.slottable");function $7(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=L7,t}function qce(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===L7}function zce(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]=(...s)=>{const c=a(...s);return i(...s),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Fce(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 Vce=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ue=Vce.reduce((e,t)=>{const n=Yf(`Primitive.${t}`),r=j.forwardRef((i,a)=>{const{asChild:o,...s}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function B7(e,t){e&&uu.flushSync(()=>e.dispatchEvent(t))}function Fa(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Uce(e,t=globalThis==null?void 0:globalThis.document){const n=Fa(e);j.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Hce="DismissableLayer",lM="dismissableLayer.update",Gce="dismissableLayer.pointerDownOutside",Kce="dismissableLayer.focusOutside",b4,q7=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mg=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,f=j.useContext(q7),[h,d]=j.useState(null),m=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=j.useState({}),x=yt(t,M=>d(M)),w=Array.from(f.layers),[b]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=w.indexOf(b),E=h?w.indexOf(h):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,A=E>=S,C=Xce(M=>{const R=M.target,P=[...f.branches].some($=>$.contains(R));!A||P||(i==null||i(M),o==null||o(M),M.defaultPrevented||s==null||s())},m),N=Qce(M=>{const R=M.target;[...f.branches].some($=>$.contains(R))||(a==null||a(M),o==null||o(M),M.defaultPrevented||s==null||s())},m);return Uce(M=>{E===f.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&s&&(M.preventDefault(),s()))},m),j.useEffect(()=>{if(h)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(b4=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(h)),f.layers.add(h),x4(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=b4)}},[h,m,n,f]),j.useEffect(()=>()=>{h&&(f.layers.delete(h),f.layersWithOutsidePointerEventsDisabled.delete(h),x4())},[h,f]),j.useEffect(()=>{const M=()=>v({});return document.addEventListener(lM,M),()=>document.removeEventListener(lM,M)},[]),g.jsx(Ue.div,{...c,ref:x,style:{pointerEvents:_?A?"auto":"none":void 0,...e.style},onFocusCapture:je(e.onFocusCapture,N.onFocusCapture),onBlurCapture:je(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:je(e.onPointerDownCapture,C.onPointerDownCapture)})});mg.displayName=Hce;var Wce="DismissableLayerBranch",Yce=j.forwardRef((e,t)=>{const n=j.useContext(q7),r=j.useRef(null),i=yt(t,r);return j.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),g.jsx(Ue.div,{...e,ref:i})});Yce.displayName=Wce;function Xce(e,t=globalThis==null?void 0:globalThis.document){const n=Fa(e),r=j.useRef(!1),i=j.useRef(()=>{});return j.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){z7(Gce,n,f,{discrete:!0})};const f={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}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 Qce(e,t=globalThis==null?void 0:globalThis.document){const n=Fa(e),r=j.useRef(!1);return j.useEffect(()=>{const i=a=>{a.target&&!r.current&&z7(Kce,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 x4(){const e=new CustomEvent(lM);document.dispatchEvent(e)}function z7(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?B7(i,a):i.dispatchEvent(a)}var tr=globalThis!=null&&globalThis.document?j.useLayoutEffect:()=>{},Zce=IP[" useId ".trim().toString()]||(()=>{}),Jce=0;function Hn(e){const[t,n]=j.useState(Zce());return tr(()=>{n(r=>r??String(Jce++))},[e]),e||(t?`radix-${t}`:"")}const eue=["top","right","bottom","left"],_l=Math.min,ti=Math.max,kb=Math.round,Ey=Math.floor,Ia=e=>({x:e,y:e}),tue={left:"right",right:"left",bottom:"top",top:"bottom"};function cM(e,t,n){return ti(e,_l(t,n))}function zo(e,t){return typeof e=="function"?e(t):e}function Fo(e){return e.split("-")[0]}function $d(e){return e.split("-")[1]}function KP(e){return e==="x"?"y":"x"}function WP(e){return e==="y"?"height":"width"}function Pa(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function YP(e){return KP(Pa(e))}function nue(e,t,n){n===void 0&&(n=!1);const r=$d(e),i=YP(e),a=WP(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Db(o)),[o,Db(o)]}function rue(e){const t=Db(e);return[uM(e),t,uM(t)]}function uM(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const w4=["left","right"],S4=["right","left"],iue=["top","bottom"],aue=["bottom","top"];function oue(e,t,n){switch(e){case"top":case"bottom":return n?t?S4:w4:t?w4:S4;case"left":case"right":return t?iue:aue;default:return[]}}function sue(e,t,n,r){const i=$d(e);let a=oue(Fo(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(uM)))),a}function Db(e){const t=Fo(e);return tue[t]+e.slice(t.length)}function lue(e){return{top:0,right:0,bottom:0,left:0,...e}}function F7(e){return typeof e!="number"?lue(e):{top:e,right:e,bottom:e,left:e}}function Ib(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 _4(e,t,n){let{reference:r,floating:i}=e;const a=Pa(t),o=YP(t),s=WP(o),c=Fo(t),f=a==="y",h=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,m=r[s]/2-i[s]/2;let v;switch(c){case"top":v={x:h,y:r.y-i.height};break;case"bottom":v={x:h,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-i.width,y:d};break;default:v={x:r.x,y:r.y}}switch($d(t)){case"start":v[o]-=m*(n&&f?-1:1);break;case"end":v[o]+=m*(n&&f?-1:1);break}return v}async function cue(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:m=!1,padding:v=0}=zo(t,e),x=F7(v),b=s[m?d==="floating"?"reference":"floating":d],S=Ib(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(s.floating)),boundary:f,rootBoundary:h,strategy:c})),E=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),A=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},C=Ib(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:E,offsetParent:_,strategy:c}):E);return{top:(S.top-C.top+x.top)/A.y,bottom:(C.bottom-S.bottom+x.bottom)/A.y,left:(S.left-C.left+x.left)/A.x,right:(C.right-S.right+x.right)/A.x}}const uue=50,fue=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:cue},c=await(o.isRTL==null?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:d}=_4(f,r,c),m=r,v=0;const x={};for(let w=0;w<a.length;w++){const b=a[w];if(!b)continue;const{name:S,fn:E}=b,{x:_,y:A,data:C,reset:N}=await E({x:h,y:d,initialPlacement:r,placement:m,strategy:i,middlewareData:x,rects:f,platform:s,elements:{reference:e,floating:t}});h=_??h,d=A??d,x[S]={...x[S],...C},N&&v<uue&&(v++,typeof N=="object"&&(N.placement&&(m=N.placement),N.rects&&(f=N.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:h,y:d}=_4(f,m,c)),w=-1)}return{x:h,y:d,placement:m,strategy:i,middlewareData:x}},due=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:f,padding:h=0}=zo(e,t)||{};if(f==null)return{};const d=F7(h),m={x:n,y:r},v=YP(i),x=WP(v),w=await o.getDimensions(f),b=v==="y",S=b?"top":"left",E=b?"bottom":"right",_=b?"clientHeight":"clientWidth",A=a.reference[x]+a.reference[v]-m[v]-a.floating[x],C=m[v]-a.reference[v],N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let M=N?N[_]:0;(!M||!await(o.isElement==null?void 0:o.isElement(N)))&&(M=s.floating[_]||a.floating[x]);const R=A/2-C/2,P=M/2-w[x]/2-1,$=_l(d[S],P),L=_l(d[E],P),D=$,F=M-w[x]-L,I=M/2-w[x]/2+R,q=cM(D,I,F),k=!c.arrow&&$d(i)!=null&&I!==q&&a.reference[x]/2-(I<D?$:L)-w[x]/2<0,z=k?I<D?I-D:I-F:0;return{[v]:m[v]+z,data:{[v]:q,centerOffset:I-q-z,...k&&{alignmentOffset:z}},reset:k}}}),hue=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:s,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,...b}=zo(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=Fo(i),E=Pa(s),_=Fo(s)===s,A=await(c.isRTL==null?void 0:c.isRTL(f.floating)),C=m||(_||!w?[Db(s)]:rue(s)),N=x!=="none";!m&&N&&C.push(...sue(s,w,x,A));const M=[s,...C],R=await c.detectOverflow(t,b),P=[];let $=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&P.push(R[S]),d){const I=nue(i,o,A);P.push(R[I[0]],R[I[1]])}if($=[...$,{placement:i,overflows:P}],!P.every(I=>I<=0)){var L,D;const I=(((L=a.flip)==null?void 0:L.index)||0)+1,q=M[I];if(q&&(!(d==="alignment"?E!==Pa(q):!1)||$.every(H=>Pa(H.placement)===E?H.overflows[0]>0:!0)))return{data:{index:I,overflows:$},reset:{placement:q}};let k=(D=$.filter(z=>z.overflows[0]<=0).sort((z,H)=>z.overflows[1]-H.overflows[1])[0])==null?void 0:D.placement;if(!k)switch(v){case"bestFit":{var F;const z=(F=$.filter(H=>{if(N){const G=Pa(H.placement);return G===E||G==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(G=>G>0).reduce((G,Q)=>G+Q,0)]).sort((H,G)=>H[1]-G[1])[0])==null?void 0:F[0];z&&(k=z);break}case"initialPlacement":k=s;break}if(i!==k)return{reset:{placement:k}}}return{}}}};function E4(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function A4(e){return eue.some(t=>e[t]>=0)}const pue=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=zo(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...a,elementContext:"reference"}),s=E4(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:A4(s)}}}case"escaped":{const o=await r.detectOverflow(t,{...a,altBoundary:!0}),s=E4(o,n.floating);return{data:{escapedOffsets:s,escaped:A4(s)}}}default:return{}}}}},V7=new Set(["left","top"]);async function mue(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Fo(n),s=$d(n),c=Pa(n)==="y",f=V7.has(o)?-1:1,h=a&&c?-1:1,d=zo(t,e);let{mainAxis:m,crossAxis:v,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof x=="number"&&(v=s==="end"?x*-1:x),c?{x:v*h,y:m*f}:{x:m*f,y:v*h}}const gue=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:s}=t,c=await mue(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},vue=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:s=!1,limiter:c={fn:S=>{let{x:E,y:_}=S;return{x:E,y:_}}},...f}=zo(e,t),h={x:n,y:r},d=await a.detectOverflow(t,f),m=Pa(Fo(i)),v=KP(m);let x=h[v],w=h[m];if(o){const S=v==="y"?"top":"left",E=v==="y"?"bottom":"right",_=x+d[S],A=x-d[E];x=cM(_,x,A)}if(s){const S=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=w+d[S],A=w-d[E];w=cM(_,w,A)}const b=c.fn({...t,[v]:x,[m]:w});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[v]:o,[m]:s}}}}}},yue=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:f=!0}=zo(e,t),h={x:n,y:r},d=Pa(i),m=KP(d);let v=h[m],x=h[d];const w=zo(s,t),b=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(c){const _=m==="y"?"height":"width",A=a.reference[m]-a.floating[_]+b.mainAxis,C=a.reference[m]+a.reference[_]-b.mainAxis;v<A?v=A:v>C&&(v=C)}if(f){var S,E;const _=m==="y"?"width":"height",A=V7.has(Fo(i)),C=a.reference[d]-a.floating[_]+(A&&((S=o.offset)==null?void 0:S[d])||0)+(A?0:b.crossAxis),N=a.reference[d]+a.reference[_]+(A?0:((E=o.offset)==null?void 0:E[d])||0)-(A?b.crossAxis:0);x<C?x=C:x>N&&(x=N)}return{[m]:v,[d]:x}}}},bue=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:s}=t,{apply:c=()=>{},...f}=zo(e,t),h=await o.detectOverflow(t,f),d=Fo(i),m=$d(i),v=Pa(i)==="y",{width:x,height:w}=a.floating;let b,S;d==="top"||d==="bottom"?(b=d,S=m===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(S=d,b=m==="end"?"top":"bottom");const E=w-h.top-h.bottom,_=x-h.left-h.right,A=_l(w-h[b],E),C=_l(x-h[S],_),N=!t.middlewareData.shift;let M=A,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=E),N&&!m){const $=ti(h.left,0),L=ti(h.right,0),D=ti(h.top,0),F=ti(h.bottom,0);v?R=x-2*($!==0||L!==0?$+L:ti(h.left,h.right)):M=w-2*(D!==0||F!==0?D+F:ti(h.top,h.bottom))}await c({...t,availableWidth:R,availableHeight:M});const P=await o.getDimensions(s.floating);return x!==P.width||w!==P.height?{reset:{rects:!0}}:{}}}};function N0(){return typeof window<"u"}function Bd(e){return U7(e)?(e.nodeName||"").toLowerCase():"#document"}function ai(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wa(e){var t;return(t=(U7(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function U7(e){return N0()?e instanceof Node||e instanceof ai(e).Node:!1}function ca(e){return N0()?e instanceof Element||e instanceof ai(e).Element:!1}function Xo(e){return N0()?e instanceof HTMLElement||e instanceof ai(e).HTMLElement:!1}function C4(e){return!N0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ai(e).ShadowRoot}function gg(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ua(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function xue(e){return/^(table|td|th)$/.test(Bd(e))}function O0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const wue=/transform|translate|scale|rotate|perspective|filter/,Sue=/paint|layout|strict|content/,ac=e=>!!e&&e!=="none";let z_;function XP(e){const t=ca(e)?ua(e):e;return ac(t.transform)||ac(t.translate)||ac(t.scale)||ac(t.rotate)||ac(t.perspective)||!QP()&&(ac(t.backdropFilter)||ac(t.filter))||wue.test(t.willChange||"")||Sue.test(t.contain||"")}function _ue(e){let t=El(e);for(;Xo(t)&&!Xf(t);){if(XP(t))return t;if(O0(t))return null;t=El(t)}return null}function QP(){return z_==null&&(z_=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),z_}function Xf(e){return/^(html|body|#document)$/.test(Bd(e))}function ua(e){return ai(e).getComputedStyle(e)}function M0(e){return ca(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function El(e){if(Bd(e)==="html")return e;const t=e.assignedSlot||e.parentNode||C4(e)&&e.host||Wa(e);return C4(t)?t.host:t}function H7(e){const t=El(e);return Xf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xo(t)&&gg(t)?t:H7(t)}function tm(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=H7(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=ai(i);if(a){const s=fM(o);return t.concat(o,o.visualViewport||[],gg(i)?i:[],s&&n?tm(s):[])}else return t.concat(i,tm(i,[],n))}function fM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function G7(e){const t=ua(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Xo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=kb(n)!==a||kb(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ZP(e){return ca(e)?e:e.contextElement}function Tf(e){const t=ZP(e);if(!Xo(t))return Ia(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=G7(t);let o=(a?kb(n.width):n.width)/r,s=(a?kb(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const Eue=Ia(0);function K7(e){const t=ai(e);return!QP()||!t.visualViewport?Eue:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Aue(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ai(e)?!1:t}function Fc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=ZP(e);let o=Ia(1);t&&(r?ca(r)&&(o=Tf(r)):o=Tf(e));const s=Aue(a,n,r)?K7(a):Ia(0);let c=(i.left+s.x)/o.x,f=(i.top+s.y)/o.y,h=i.width/o.x,d=i.height/o.y;if(a){const m=ai(a),v=r&&ca(r)?ai(r):r;let x=m,w=fM(x);for(;w&&r&&v!==x;){const b=Tf(w),S=w.getBoundingClientRect(),E=ua(w),_=S.left+(w.clientLeft+parseFloat(E.paddingLeft))*b.x,A=S.top+(w.clientTop+parseFloat(E.paddingTop))*b.y;c*=b.x,f*=b.y,h*=b.x,d*=b.y,c+=_,f+=A,x=ai(w),w=fM(x)}}return Ib({width:h,height:d,x:c,y:f})}function R0(e,t){const n=M0(e).scrollLeft;return t?t.left+n:Fc(Wa(e)).left+n}function W7(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-R0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Cue(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=Wa(r),s=t?O0(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},f=Ia(1);const h=Ia(0),d=Xo(r);if((d||!d&&!a)&&((Bd(r)!=="body"||gg(o))&&(c=M0(r)),d)){const v=Fc(r);f=Tf(r),h.x=v.x+r.clientLeft,h.y=v.y+r.clientTop}const m=o&&!d&&!a?W7(o,c):Ia(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-c.scrollTop*f.y+h.y+m.y}}function Tue(e){return Array.from(e.getClientRects())}function jue(e){const t=Wa(e),n=M0(e),r=e.ownerDocument.body,i=ti(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ti(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+R0(e);const s=-n.scrollTop;return ua(r).direction==="rtl"&&(o+=ti(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}const T4=25;function Nue(e,t){const n=ai(e),r=Wa(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;const h=QP();(!h||h&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}const f=R0(r);if(f<=0){const h=r.ownerDocument,d=h.body,m=getComputedStyle(d),v=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,x=Math.abs(r.clientWidth-d.clientWidth-v);x<=T4&&(a-=x)}else f<=T4&&(a+=f);return{width:a,height:o,x:s,y:c}}function Oue(e,t){const n=Fc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Xo(e)?Tf(e):Ia(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,c=i*a.x,f=r*a.y;return{width:o,height:s,x:c,y:f}}function j4(e,t,n){let r;if(t==="viewport")r=Nue(e,n);else if(t==="document")r=jue(Wa(e));else if(ca(t))r=Oue(t,n);else{const i=K7(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ib(r)}function Y7(e,t){const n=El(e);return n===t||!ca(n)||Xf(n)?!1:ua(n).position==="fixed"||Y7(n,t)}function Mue(e,t){const n=t.get(e);if(n)return n;let r=tm(e,[],!1).filter(s=>ca(s)&&Bd(s)!=="body"),i=null;const a=ua(e).position==="fixed";let o=a?El(e):e;for(;ca(o)&&!Xf(o);){const s=ua(o),c=XP(o);!c&&s.position==="fixed"&&(i=null),(a?!c&&!i:!c&&s.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||gg(o)&&!c&&Y7(e,o))?r=r.filter(h=>h!==o):i=s,o=El(o)}return t.set(e,r),r}function Rue(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?O0(t)?[]:Mue(t,this._c):[].concat(n),r],s=j4(t,o[0],i);let c=s.top,f=s.right,h=s.bottom,d=s.left;for(let m=1;m<o.length;m++){const v=j4(t,o[m],i);c=ti(v.top,c),f=_l(v.right,f),h=_l(v.bottom,h),d=ti(v.left,d)}return{width:f-d,height:h-c,x:d,y:c}}function Pue(e){const{width:t,height:n}=G7(e);return{width:t,height:n}}function kue(e,t,n){const r=Xo(t),i=Wa(t),a=n==="fixed",o=Fc(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Ia(0);function f(){c.x=R0(i)}if(r||!r&&!a)if((Bd(t)!=="body"||gg(i))&&(s=M0(t)),r){const v=Fc(t,!0,a,t);c.x=v.x+t.clientLeft,c.y=v.y+t.clientTop}else i&&f();a&&!r&&i&&f();const h=i&&!r&&!a?W7(i,s):Ia(0),d=o.left+s.scrollLeft-c.x-h.x,m=o.top+s.scrollTop-c.y-h.y;return{x:d,y:m,width:o.width,height:o.height}}function F_(e){return ua(e).position==="static"}function N4(e,t){if(!Xo(e)||ua(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Wa(e)===n&&(n=n.ownerDocument.body),n}function X7(e,t){const n=ai(e);if(O0(e))return n;if(!Xo(e)){let i=El(e);for(;i&&!Xf(i);){if(ca(i)&&!F_(i))return i;i=El(i)}return n}let r=N4(e,t);for(;r&&xue(r)&&F_(r);)r=N4(r,t);return r&&Xf(r)&&F_(r)&&!XP(r)?n:r||_ue(e)||n}const Due=async function(e){const t=this.getOffsetParent||X7,n=this.getDimensions,r=await n(e.floating);return{reference:kue(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Iue(e){return ua(e).direction==="rtl"}const Lue={convertOffsetParentRelativeRectToViewportRelativeRect:Cue,getDocumentElement:Wa,getClippingRect:Rue,getOffsetParent:X7,getElementRects:Due,getClientRects:Tue,getDimensions:Pue,getScale:Tf,isElement:ca,isRTL:Iue};function Q7(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $ue(e,t){let n=null,r;const i=Wa(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const f=e.getBoundingClientRect(),{left:h,top:d,width:m,height:v}=f;if(s||t(),!m||!v)return;const x=Ey(d),w=Ey(i.clientWidth-(h+m)),b=Ey(i.clientHeight-(d+v)),S=Ey(h),_={rootMargin:-x+"px "+-w+"px "+-b+"px "+-S+"px",threshold:ti(0,_l(1,c))||1};let A=!0;function C(N){const M=N[0].intersectionRatio;if(M!==c){if(!A)return o();M?o(!1,M):r=setTimeout(()=>{o(!1,1e-7)},1e3)}M===1&&!Q7(f,e.getBoundingClientRect())&&o(),A=!1}try{n=new IntersectionObserver(C,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,_)}n.observe(e)}return o(!0),a}function Bue(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=ZP(e),h=i||a?[...f?tm(f):[],...t?tm(t):[]]:[];h.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const d=f&&s?$ue(f,n):null;let m=-1,v=null;o&&(v=new ResizeObserver(S=>{let[E]=S;E&&E.target===f&&v&&t&&(v.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),n()}),f&&!c&&v.observe(f),t&&v.observe(t));let x,w=c?Fc(e):null;c&&b();function b(){const S=Fc(e);w&&!Q7(w,S)&&n(),w=S,x=requestAnimationFrame(b)}return n(),()=>{var S;h.forEach(E=>{i&&E.removeEventListener("scroll",n),a&&E.removeEventListener("resize",n)}),d==null||d(),(S=v)==null||S.disconnect(),v=null,c&&cancelAnimationFrame(x)}}const que=gue,zue=vue,Fue=hue,Vue=bue,Uue=pue,O4=due,Hue=yue,Gue=(e,t,n)=>{const r=new Map,i={platform:Lue,...n},a={...i.platform,_c:r};return fue(e,t,{...i,platform:a})};var Kue=typeof document<"u",Wue=function(){},cb=Kue?j.useLayoutEffect:Wue;function Lb(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(!Lb(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)&&!Lb(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Z7(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function M4(e,t){const n=Z7(e);return Math.round(t*n)/n}function V_(e){const t=j.useRef(e);return cb(()=>{t.current=e}),t}function Yue(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:f}=e,[h,d]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,v]=j.useState(r);Lb(m,r)||v(r);const[x,w]=j.useState(null),[b,S]=j.useState(null),E=j.useCallback(H=>{H!==N.current&&(N.current=H,w(H))},[]),_=j.useCallback(H=>{H!==M.current&&(M.current=H,S(H))},[]),A=a||x,C=o||b,N=j.useRef(null),M=j.useRef(null),R=j.useRef(h),P=c!=null,$=V_(c),L=V_(i),D=V_(f),F=j.useCallback(()=>{if(!N.current||!M.current)return;const H={placement:t,strategy:n,middleware:m};L.current&&(H.platform=L.current),Gue(N.current,M.current,H).then(G=>{const Q={...G,isPositioned:D.current!==!1};I.current&&!Lb(R.current,Q)&&(R.current=Q,uu.flushSync(()=>{d(Q)}))})},[m,t,n,L,D]);cb(()=>{f===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[f]);const I=j.useRef(!1);cb(()=>(I.current=!0,()=>{I.current=!1}),[]),cb(()=>{if(A&&(N.current=A),C&&(M.current=C),A&&C){if($.current)return $.current(A,C,F);F()}},[A,C,F,$,P]);const q=j.useMemo(()=>({reference:N,floating:M,setReference:E,setFloating:_}),[E,_]),k=j.useMemo(()=>({reference:A,floating:C}),[A,C]),z=j.useMemo(()=>{const H={position:n,left:0,top:0};if(!k.floating)return H;const G=M4(k.floating,h.x),Q=M4(k.floating,h.y);return s?{...H,transform:"translate("+G+"px, "+Q+"px)",...Z7(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:Q}},[n,s,k.floating,h.x,h.y]);return j.useMemo(()=>({...h,update:F,refs:q,elements:k,floatingStyles:z}),[h,F,q,k,z])}const Xue=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?O4({element:r.current,padding:i}).fn(n):{}:r?O4({element:r,padding:i}).fn(n):{}}}},Que=(e,t)=>{const n=que(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zue=(e,t)=>{const n=zue(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jue=(e,t)=>({fn:Hue(e).fn,options:[e,t]}),efe=(e,t)=>{const n=Fue(e);return{name:n.name,fn:n.fn,options:[e,t]}},tfe=(e,t)=>{const n=Vue(e);return{name:n.name,fn:n.fn,options:[e,t]}},nfe=(e,t)=>{const n=Uue(e);return{name:n.name,fn:n.fn,options:[e,t]}},rfe=(e,t)=>{const n=Xue(e);return{name:n.name,fn:n.fn,options:[e,t]}};var ife="Arrow",J7=j.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return g.jsx(Ue.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});J7.displayName=ife;var afe=J7;function eK(e){const[t,n]=j.useState(void 0);return tr(()=>{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,s;if("borderBoxSize"in a){const c=a.borderBoxSize,f=Array.isArray(c)?c[0]:c;o=f.inlineSize,s=f.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var JP="Popper",[tK,qd]=$i(JP),[ofe,nK]=tK(JP),rK=e=>{const{__scopePopper:t,children:n}=e,[r,i]=j.useState(null);return g.jsx(ofe,{scope:t,anchor:r,onAnchorChange:i,children:n})};rK.displayName=JP;var iK="PopperAnchor",aK=j.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=nK(iK,n),o=j.useRef(null),s=yt(t,o),c=j.useRef(null);return j.useEffect(()=>{const f=c.current;c.current=(r==null?void 0:r.current)||o.current,f!==c.current&&a.onAnchorChange(c.current)}),r?null:g.jsx(Ue.div,{...i,ref:s})});aK.displayName=iK;var e2="PopperContent",[sfe,lfe]=tK(e2),oK=j.forwardRef((e,t)=>{var ee,te,ne,se,ce,oe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:f=[],collisionPadding:h=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:x,...w}=e,b=nK(e2,n),[S,E]=j.useState(null),_=yt(t,be=>E(be)),[A,C]=j.useState(null),N=eK(A),M=(N==null?void 0:N.width)??0,R=(N==null?void 0:N.height)??0,P=r+(a!=="center"?"-"+a:""),$=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},L=Array.isArray(f)?f:[f],D=L.length>0,F={padding:$,boundary:L.filter(ufe),altBoundary:D},{refs:I,floatingStyles:q,placement:k,isPositioned:z,middlewareData:H}=Yue({strategy:"fixed",placement:P,whileElementsMounted:(...be)=>Bue(...be,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[Que({mainAxis:i+R,alignmentAxis:o}),c&&Zue({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Jue():void 0,...F}),c&&efe({...F}),tfe({...F,apply:({elements:be,rects:xe,availableWidth:we,availableHeight:Ae})=>{const{width:Ee,height:rt}=xe.reference,Ve=be.floating.style;Ve.setProperty("--radix-popper-available-width",`${we}px`),Ve.setProperty("--radix-popper-available-height",`${Ae}px`),Ve.setProperty("--radix-popper-anchor-width",`${Ee}px`),Ve.setProperty("--radix-popper-anchor-height",`${rt}px`)}}),A&&rfe({element:A,padding:s}),ffe({arrowWidth:M,arrowHeight:R}),m&&nfe({strategy:"referenceHidden",...F})]}),[G,Q]=cK(k),U=Fa(x);tr(()=>{z&&(U==null||U())},[z,U]);const V=(ee=H.arrow)==null?void 0:ee.x,X=(te=H.arrow)==null?void 0:te.y,W=((ne=H.arrow)==null?void 0:ne.centerOffset)!==0,[K,J]=j.useState();return tr(()=>{S&&J(window.getComputedStyle(S).zIndex)},[S]),g.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:z?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(se=H.transformOrigin)==null?void 0:se.x,(ce=H.transformOrigin)==null?void 0:ce.y].join(" "),...((oe=H.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(sfe,{scope:n,placedSide:G,onArrowChange:C,arrowX:V,arrowY:X,shouldHideArrow:W,children:g.jsx(Ue.div,{"data-side":G,"data-align":Q,...w,ref:_,style:{...w.style,animation:z?void 0:"none"}})})})});oK.displayName=e2;var sK="PopperArrow",cfe={top:"bottom",right:"left",bottom:"top",left:"right"},lK=j.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=lfe(sK,r),o=cfe[a.placedSide];return g.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:g.jsx(afe,{...i,ref:n,style:{...i.style,display:"block"}})})});lK.displayName=sK;function ufe(e){return e!==null}var ffe=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,s=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[f,h]=cK(n),d={start:"0%",center:"50%",end:"100%"}[h],m=(((S=i.arrow)==null?void 0:S.x)??0)+s/2,v=(((E=i.arrow)==null?void 0:E.y)??0)+c/2;let x="",w="";return f==="bottom"?(x=o?d:`${m}px`,w=`${-c}px`):f==="top"?(x=o?d:`${m}px`,w=`${r.floating.height+c}px`):f==="right"?(x=`${-c}px`,w=o?d:`${v}px`):f==="left"&&(x=`${r.floating.width+c}px`,w=o?d:`${v}px`),{data:{x,y:w}}}});function cK(e){const[t,n="center"]=e.split("-");return[t,n]}var t2=rK,n2=aK,r2=oK,i2=lK,dfe="Portal",vg=j.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=j.useState(!1);tr(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?P7.createPortal(g.jsx(Ue.div,{...r,ref:t}),o):null});vg.displayName=dfe;function hfe(e,t){return j.useReducer((n,r)=>t[n][r]??n,e)}var di=e=>{const{present:t,children:n}=e,r=pfe(t),i=typeof n=="function"?n({present:r.isPresent}):j.Children.only(n),a=yt(r.ref,mfe(i));return typeof n=="function"||r.isPresent?j.cloneElement(i,{ref:a}):null};di.displayName="Presence";function pfe(e){const[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef("none"),o=e?"mounted":"unmounted",[s,c]=hfe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const f=Ay(r.current);a.current=s==="mounted"?f:"none"},[s]),tr(()=>{const f=r.current,h=i.current;if(h!==e){const m=a.current,v=Ay(f);e?c("MOUNT"):v==="none"||(f==null?void 0:f.display)==="none"?c("UNMOUNT"):c(h&&m!==v?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),tr(()=>{if(t){let f;const h=t.ownerDocument.defaultView??window,d=v=>{const w=Ay(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&w&&(c("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",f=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=v=>{v.target===t&&(a.current=Ay(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{h.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:j.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Ay(e){return(e==null?void 0:e.animationName)||"none"}function mfe(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 gfe=IP[" useInsertionEffect ".trim().toString()]||tr;function Vo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=vfe({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{const h=j.useRef(e!==void 0);j.useEffect(()=>{const d=h.current;d!==s&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=s},[s,r])}const f=j.useCallback(h=>{var d;if(s){const m=yfe(h)?h(e):h;m!==e&&((d=o.current)==null||d.call(o,m))}else a(h)},[s,e,a,o]);return[c,f]}function vfe({defaultProp:e,onChange:t}){const[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return gfe(()=>{a.current=t},[t]),j.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function yfe(e){return typeof e=="function"}var uK=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"}),bfe="VisuallyHidden",fK=j.forwardRef((e,t)=>g.jsx(Ue.span,{...e,ref:t,style:{...uK,...e.style}}));fK.displayName=bfe;var xfe=fK,[P0]=$i("Tooltip",[qd]),k0=qd(),dK="TooltipProvider",wfe=700,dM="tooltip.open",[Sfe,a2]=P0(dK),hK=e=>{const{__scopeTooltip:t,delayDuration:n=wfe,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=j.useRef(!0),s=j.useRef(!1),c=j.useRef(0);return j.useEffect(()=>{const f=c.current;return()=>window.clearTimeout(f)},[]),g.jsx(Sfe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:j.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:j.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:j.useCallback(f=>{s.current=f},[]),disableHoverableContent:i,children:a})};hK.displayName=dK;var nm="Tooltip",[_fe,yg]=P0(nm),pK=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=a2(nm,e.__scopeTooltip),f=k0(t),[h,d]=j.useState(null),m=Hn(),v=j.useRef(0),x=o??c.disableHoverableContent,w=s??c.delayDuration,b=j.useRef(!1),[S,E]=Vo({prop:r,defaultProp:i??!1,onChange:M=>{M?(c.onOpen(),document.dispatchEvent(new CustomEvent(dM))):c.onClose(),a==null||a(M)},caller:nm}),_=j.useMemo(()=>S?b.current?"delayed-open":"instant-open":"closed",[S]),A=j.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b.current=!1,E(!0)},[E]),C=j.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),N=j.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{b.current=!0,E(!0),v.current=0},w)},[w,E]);return j.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),g.jsx(t2,{...f,children:g.jsx(_fe,{scope:t,contentId:m,open:S,stateAttribute:_,trigger:h,onTriggerChange:d,onTriggerEnter:j.useCallback(()=>{c.isOpenDelayedRef.current?N():A()},[c.isOpenDelayedRef,N,A]),onTriggerLeave:j.useCallback(()=>{x?C():(window.clearTimeout(v.current),v.current=0)},[C,x]),onOpen:A,onClose:C,disableHoverableContent:x,children:n})})};pK.displayName=nm;var hM="TooltipTrigger",mK=j.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=yg(hM,n),a=a2(hM,n),o=k0(n),s=j.useRef(null),c=yt(t,s,i.onTriggerChange),f=j.useRef(!1),h=j.useRef(!1),d=j.useCallback(()=>f.current=!1,[]);return j.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),g.jsx(n2,{asChild:!0,...o,children:g.jsx(Ue.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:je(e.onPointerMove,m=>{m.pointerType!=="touch"&&!h.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),h.current=!0)}),onPointerLeave:je(e.onPointerLeave,()=>{i.onTriggerLeave(),h.current=!1}),onPointerDown:je(e.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:je(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:je(e.onBlur,i.onClose),onClick:je(e.onClick,i.onClose)})})});mK.displayName=hM;var o2="TooltipPortal",[Efe,Afe]=P0(o2,{forceMount:void 0}),gK=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=yg(o2,t);return g.jsx(Efe,{scope:t,forceMount:n,children:g.jsx(di,{present:n||a.open,children:g.jsx(vg,{asChild:!0,container:i,children:r})})})};gK.displayName=o2;var Qf="TooltipContent",vK=j.forwardRef((e,t)=>{const n=Afe(Qf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=yg(Qf,e.__scopeTooltip);return g.jsx(di,{present:r||o.open,children:o.disableHoverableContent?g.jsx(yK,{side:i,...a,ref:t}):g.jsx(Cfe,{side:i,...a,ref:t})})}),Cfe=j.forwardRef((e,t)=>{const n=yg(Qf,e.__scopeTooltip),r=a2(Qf,e.__scopeTooltip),i=j.useRef(null),a=yt(t,i),[o,s]=j.useState(null),{trigger:c,onClose:f}=n,h=i.current,{onPointerInTransitChange:d}=r,m=j.useCallback(()=>{s(null),d(!1)},[d]),v=j.useCallback((x,w)=>{const b=x.currentTarget,S={x:x.clientX,y:x.clientY},E=Mfe(S,b.getBoundingClientRect()),_=Rfe(S,E),A=Pfe(w.getBoundingClientRect()),C=Dfe([..._,...A]);s(C),d(!0)},[d]);return j.useEffect(()=>()=>m(),[m]),j.useEffect(()=>{if(c&&h){const x=b=>v(b,h),w=b=>v(b,c);return c.addEventListener("pointerleave",x),h.addEventListener("pointerleave",w),()=>{c.removeEventListener("pointerleave",x),h.removeEventListener("pointerleave",w)}}},[c,h,v,m]),j.useEffect(()=>{if(o){const x=w=>{const b=w.target,S={x:w.clientX,y:w.clientY},E=(c==null?void 0:c.contains(b))||(h==null?void 0:h.contains(b)),_=!kfe(S,o);E?m():_&&(m(),f())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,h,o,f,m]),g.jsx(yK,{...e,ref:a})}),[Tfe,jfe]=P0(nm,{isInside:!1}),Nfe=$7("TooltipContent"),yK=j.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=yg(Qf,n),f=k0(n),{onClose:h}=c;return j.useEffect(()=>(document.addEventListener(dM,h),()=>document.removeEventListener(dM,h)),[h]),j.useEffect(()=>{if(c.trigger){const d=m=>{const v=m.target;v!=null&&v.contains(c.trigger)&&h()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,h]),g.jsx(mg,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:h,children:g.jsxs(r2,{"data-state":c.stateAttribute,...f,...s,ref:t,style:{...s.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:[g.jsx(Nfe,{children:r}),g.jsx(Tfe,{scope:n,isInside:!0,children:g.jsx(xfe,{id:c.contentId,role:"tooltip",children:i||r})})]})})});vK.displayName=Qf;var bK="TooltipArrow",Ofe=j.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=k0(n);return jfe(bK,n).isInside?null:g.jsx(i2,{...i,...r,ref:t})});Ofe.displayName=bK;function Mfe(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 Rfe(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 Pfe(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 kfe(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 s=t[a],c=t[o],f=s.x,h=s.y,d=c.x,m=c.y;h>r!=m>r&&n<(d-f)*(r-h)/(m-h)+f&&(i=!i)}return i}function Dfe(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),Ife(t)}function Ife(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 Lfe=hK,$fe=pK,Bfe=mK,qfe=gK,xK=vK;function wK(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=wK(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=wK(e))&&(r&&(r+=" "),r+=t);return r}const s2="-",zfe=e=>{const t=Vfe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(s2);return s[0]===""&&s.length!==1&&s.shift(),SK(s,t)||Ffe(o)},getConflictingClassGroupIds:(o,s)=>{const c=n[o]||[];return s&&r[o]?[...c,...r[o]]:c}}},SK=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?SK(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(s2);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},R4=/^\[(.+)\]$/,Ffe=e=>{if(R4.test(e)){const t=R4.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Vfe=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Hfe(Object.entries(e.classGroups),n).forEach(([a,o])=>{pM(o,r,a,t)}),r},pM=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:P4(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(Ufe(i)){pM(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{pM(o,P4(t,a),n,r)})})},P4=(e,t)=>{let n=e;return t.split(s2).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Ufe=e=>e.isThemeGetter,Hfe=(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,s])=>[t+o,s])):a);return[n,i]}):e,Gfe=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)}}},_K="!",Kfe=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const c=[];let f=0,h=0,d;for(let b=0;b<s.length;b++){let S=s[b];if(f===0){if(S===i&&(r||s.slice(b,b+a)===t)){c.push(s.slice(h,b)),h=b+a;continue}if(S==="/"){d=b;continue}}S==="["?f++:S==="]"&&f--}const m=c.length===0?s:s.substring(h),v=m.startsWith(_K),x=v?m.substring(1):m,w=d&&d>h?d-h:void 0;return{modifiers:c,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:w}};return n?s=>n({className:s,parseClassName:o}):o},Wfe=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},Yfe=e=>({cache:Gfe(e.cacheSize),parseClassName:Kfe(e),...zfe(e)}),Xfe=/\s+/,Qfe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(Xfe);let s="";for(let c=o.length-1;c>=0;c-=1){const f=o[c],{modifiers:h,hasImportantModifier:d,baseClassName:m,maybePostfixModifierPosition:v}=n(f);let x=!!v,w=r(x?m.substring(0,v):m);if(!w){if(!x){s=f+(s.length>0?" "+s:s);continue}if(w=r(m),!w){s=f+(s.length>0?" "+s:s);continue}x=!1}const b=Wfe(h).join(":"),S=d?b+_K:b,E=S+w;if(a.includes(E))continue;a.push(E);const _=i(w,x);for(let A=0;A<_.length;++A){const C=_[A];a.push(S+C)}s=f+(s.length>0?" "+s:s)}return s};function Zfe(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=EK(t))&&(r&&(r+=" "),r+=n);return r}const EK=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=EK(e[r]))&&(n&&(n+=" "),n+=t);return n};function Jfe(e,...t){let n,r,i,a=o;function o(c){const f=t.reduce((h,d)=>d(h),e());return n=Yfe(f),r=n.cache.get,i=n.cache.set,a=s,s(c)}function s(c){const f=r(c);if(f)return f;const h=Qfe(c,n);return i(c,h),h}return function(){return a(Zfe.apply(null,arguments))}}const Yt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},AK=/^\[(?:([a-z-]+):)?(.+)\]$/i,ede=/^\d+\/\d+$/,tde=new Set(["px","full","screen"]),nde=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rde=/\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$/,ide=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ade=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ode=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xo=e=>jf(e)||tde.has(e)||ede.test(e),Ls=e=>zd(e,"length",pde),jf=e=>!!e&&!Number.isNaN(Number(e)),U_=e=>zd(e,"number",jf),cp=e=>!!e&&Number.isInteger(Number(e)),sde=e=>e.endsWith("%")&&jf(e.slice(0,-1)),Je=e=>AK.test(e),$s=e=>nde.test(e),lde=new Set(["length","size","percentage"]),cde=e=>zd(e,lde,CK),ude=e=>zd(e,"position",CK),fde=new Set(["image","url"]),dde=e=>zd(e,fde,gde),hde=e=>zd(e,"",mde),up=()=>!0,zd=(e,t,n)=>{const r=AK.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},pde=e=>rde.test(e)&&!ide.test(e),CK=()=>!1,mde=e=>ade.test(e),gde=e=>ode.test(e),vde=()=>{const e=Yt("colors"),t=Yt("spacing"),n=Yt("blur"),r=Yt("brightness"),i=Yt("borderColor"),a=Yt("borderRadius"),o=Yt("borderSpacing"),s=Yt("borderWidth"),c=Yt("contrast"),f=Yt("grayscale"),h=Yt("hueRotate"),d=Yt("invert"),m=Yt("gap"),v=Yt("gradientColorStops"),x=Yt("gradientColorStopPositions"),w=Yt("inset"),b=Yt("margin"),S=Yt("opacity"),E=Yt("padding"),_=Yt("saturate"),A=Yt("scale"),C=Yt("sepia"),N=Yt("skew"),M=Yt("space"),R=Yt("translate"),P=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",Je,t],D=()=>[Je,t],F=()=>["",xo,Ls],I=()=>["auto",jf,Je],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["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"],G=()=>["","0",Je],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[jf,Je];return{cacheSize:500,separator:":",theme:{colors:[up],spacing:[xo,Ls],blur:["none","",$s,Je],brightness:U(),borderColor:[e],borderRadius:["none","","full",$s,Je],borderSpacing:D(),borderWidth:F(),contrast:U(),grayscale:G(),hueRotate:U(),invert:G(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[sde,Ls],inset:L(),margin:L(),opacity:U(),padding:D(),saturate:U(),scale:U(),sepia:G(),skew:U(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",Je]}],container:["container"],columns:[{columns:[$s]}],"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(),Je]}],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:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",cp,Je]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Je]}],grow:[{grow:G()}],shrink:[{shrink:G()}],order:[{order:["first","last","none",cp,Je]}],"grid-cols":[{"grid-cols":[up]}],"col-start-end":[{col:["auto",{span:["full",cp,Je]},Je]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[up]}],"row-start-end":[{row:["auto",{span:[cp,Je]},Je]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Je]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Je]}],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",Je,t]}],"min-w":[{"min-w":[Je,t,"min","max","fit"]}],"max-w":[{"max-w":[Je,t,"none","full","min","max","fit","prose",{screen:[$s]},$s]}],h:[{h:[Je,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Je,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Je,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Je,t,"auto","min","max","fit"]}],"font-size":[{text:["base",$s,Ls]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",U_]}],"font-family":[{font:[up]}],"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",Je]}],"line-clamp":[{"line-clamp":["none",jf,U_]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",xo,Je]}],"list-image":[{"list-image":["none",Je]}],"list-style-type":[{list:["none","disc","decimal",Je]}],"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:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",xo,Ls]}],"underline-offset":[{"underline-offset":["auto",xo,Je]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Je]}],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",Je]}],"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(),ude]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",cde]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},dde]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],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:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:k()}],"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:["",...k()]}],"outline-offset":[{"outline-offset":[xo,Je]}],"outline-w":[{outline:[xo,Ls]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[xo,Ls]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$s,hde]}],"shadow-color":[{shadow:[up]}],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:[c]}],"drop-shadow":[{"drop-shadow":["","none",$s,Je]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Je]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",Je]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",Je]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[cp,Je]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Je]}],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",Je]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",Je]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[xo,Ls,U_]}],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"]}}},yde=Jfe(vde);function ge(...e){return yde(gt(e))}function Lr(e){return e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}m`:`${(e/36e5).toFixed(1)}h`}function Lp(e,t){return e.length<=t?e:`${e.slice(0,t)}...`}function TK(e){const n=Date.now()-e,r=n<0,i=Math.abs(n),a=(o,s)=>r?`in ${o}${s}`:`${o}${s} ago`;return i<6e4?a(Math.floor(i/1e3),"s"):i<36e5?a(Math.floor(i/6e4),"m"):i<864e5?a(Math.floor(i/36e5),"h"):a(Math.floor(i/864e5),"d")}function ub(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}const jK=Lfe,bg=$fe,xg=Bfe,Fd=j.forwardRef(({className:e,sideOffset:t=4,...n},r)=>g.jsx(qfe,{children:g.jsx(xK,{ref:r,sideOffset:t,className:ge("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})}));Fd.displayName=xK.displayName;var St;(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(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];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})(St||(St={}));var k4;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(k4||(k4={}));const Re=St.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ws=e=>{switch(typeof e){case"undefined":return Re.undefined;case"string":return Re.string;case"number":return Number.isNaN(e)?Re.nan:Re.number;case"boolean":return Re.boolean;case"function":return Re.function;case"bigint":return Re.bigint;case"symbol":return Re.symbol;case"object":return Array.isArray(e)?Re.array:e===null?Re.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Re.promise:typeof Map<"u"&&e instanceof Map?Re.map:typeof Set<"u"&&e instanceof Set?Re.set:typeof Date<"u"&&e instanceof Date?Re.date:Re.object;default:return Re.unknown}},Se=St.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 Uo 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 s=r,c=0;for(;c<o.path.length;){const f=o.path[c];c===o.path.length-1?(s[f]=s[f]||{_errors:[]},s[f]._errors.push(n(o))):s[f]=s[f]||{_errors:[]},s=s[f],c++}}};return i(this),r}static assert(t){if(!(t instanceof Uo))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,St.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()}}Uo.create=e=>new Uo(e);const mM=(e,t)=>{let n;switch(e.code){case Se.invalid_type:e.received===Re.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,St.jsonStringifyReplacer)}`;break;case Se.unrecognized_keys:n=`Unrecognized key(s) in object: ${St.joinValues(e.keys,", ")}`;break;case Se.invalid_union:n="Invalid input";break;case Se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${St.joinValues(e.options)}`;break;case Se.invalid_enum_value:n=`Invalid enum value. Expected ${St.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}"`:St.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,St.assertNever(e)}return{message:n}};let bde=mM;function xde(){return bde}const wde=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 s="";const c=r.filter(f=>!!f).slice().reverse();for(const f of c)s=f(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function Te(e,t){const n=xde(),r=wde({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mM?void 0:mM].filter(i=>!!i)});e.common.issues.push(r)}class si{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 Ge;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 si.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 Ge;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 Ge=Object.freeze({status:"aborted"}),Tp=e=>({status:"dirty",value:e}),Bi=e=>({status:"valid",value:e}),D4=e=>e.status==="aborted",I4=e=>e.status==="dirty",Zf=e=>e.status==="valid",$b=e=>typeof Promise<"u"&&e instanceof Promise;var ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(ke||(ke={}));class Al{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 L4=(e,t)=>{if(Zf(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 Uo(e.common.issues);return this._error=n,this._error}}};function at(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,s)=>{const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??r??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:i}}class bt{get description(){return this._def.description}_getType(t){return Ws(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ws(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new si,ctx:{common:t.parent.common,data:t.data,parsedType:Ws(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if($b(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:Ws(t)},i=this._parseSync({data:t,path:r.path,parent:r});return L4(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:Ws(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return Zf(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=>Zf(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:Ws(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await($b(i)?i:Promise.resolve(i));return L4(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),s=()=>a.addIssue({code:Se.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!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 td({schema:this,typeName:Ke.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 vl.create(this,this._def)}nullable(){return nd.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return La.create(this)}promise(){return Fb.create(this,this._def)}or(t){return qb.create([this,t],this._def)}and(t){return zb.create(this,t,this._def)}transform(t){return new td({...at(this._def),schema:this,typeName:Ke.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new vM({...at(this._def),innerType:this,defaultValue:n,typeName:Ke.ZodDefault})}brand(){return new Ude({typeName:Ke.ZodBranded,type:this,...at(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new yM({...at(this._def),innerType:this,catchValue:n,typeName:Ke.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return l2.create(this,t)}readonly(){return bM.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Sde=/^c[^\s-]{8,}$/i,_de=/^[0-9a-z]+$/,Ede=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ade=/^[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,Cde=/^[a-z0-9_-]{21}$/i,Tde=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,jde=/^[-+]?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)?)??$/,Nde=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ode="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let H_;const Mde=/^(?:(?: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])$/,Rde=/^(?:(?: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])$/,Pde=/^(([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]))$/,kde=/^(([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])$/,Dde=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ide=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,NK="((\\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])))",Lde=new RegExp(`^${NK}$`);function OK(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 $de(e){return new RegExp(`^${OK(e)}$`)}function Bde(e){let t=`${NK}T${OK(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 qde(e,t){return!!((t==="v4"||!t)&&Mde.test(e)||(t==="v6"||!t)&&Pde.test(e))}function zde(e,t){if(!Tde.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 Fde(e,t){return!!((t==="v4"||!t)&&Rde.test(e)||(t==="v6"||!t)&&kde.test(e))}class ul extends bt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Re.string){const a=this._getOrReturnCtx(t);return Te(a,{code:Se.invalid_type,expected:Re.string,received:a.parsedType}),Ge}const r=new si;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),Te(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),Te(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,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?Te(i,{code:Se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&Te(i,{code:Se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")Nde.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"email",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")H_||(H_=new RegExp(Ode,"u")),H_.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"emoji",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")Ade.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"uuid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")Cde.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"nanoid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")Sde.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"cuid",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")_de.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"cuid2",code:Se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")Ede.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(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),Te(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),Te(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),Te(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),Te(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),Te(i,{code:Se.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?Bde(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{code:Se.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Lde.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{code:Se.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?$de(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{code:Se.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?jde.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"duration",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?qde(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"ip",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?zde(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"jwt",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?Fde(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"cidr",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?Dde.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"base64",code:Se.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?Ide.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"base64url",code:Se.invalid_string,message:a.message}),r.dirty()):St.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,...ke.errToObj(r)})}_addCheck(t){return new ul({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ke.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,...ke.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,...ke.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...ke.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...ke.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ke.errToObj(n)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new ul({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ul({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ul({...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}}ul.create=e=>new ul({checks:[],typeName:Ke.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...at(e)});function Vde(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 Jf extends bt{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)!==Re.number){const a=this._getOrReturnCtx(t);return Te(a,{code:Se.invalid_type,expected:Re.number,received:a.parsedType}),Ge}let r;const i=new si;for(const a of this._def.checks)a.kind==="int"?St.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Te(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),Te(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),Te(r,{code:Se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Vde(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),Te(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),Te(r,{code:Se.not_finite,message:a.message}),i.dirty()):St.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,i){return new Jf({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(i)}]})}_addCheck(t){return new Jf({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.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"&&St.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)}}Jf.create=e=>new Jf({checks:[],typeName:Ke.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...at(e)});class rm extends bt{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)!==Re.bigint)return this._getInvalidInput(t);let r;const i=new si;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),Te(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),Te(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),Te(r,{code:Se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):St.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Te(n,{code:Se.invalid_type,expected:Re.bigint,received:n.parsedType}),Ge}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,i){return new rm({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(i)}]})}_addCheck(t){return new rm({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.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}}rm.create=e=>new rm({checks:[],typeName:Ke.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...at(e)});class $4 extends bt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Re.boolean){const r=this._getOrReturnCtx(t);return Te(r,{code:Se.invalid_type,expected:Re.boolean,received:r.parsedType}),Ge}return Bi(t.data)}}$4.create=e=>new $4({typeName:Ke.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...at(e)});class Bb extends bt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Re.date){const a=this._getOrReturnCtx(t);return Te(a,{code:Se.invalid_type,expected:Re.date,received:a.parsedType}),Ge}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Te(a,{code:Se.invalid_date}),Ge}const r=new si;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),Te(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),Te(i,{code:Se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):St.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Bb({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ke.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}}Bb.create=e=>new Bb({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ke.ZodDate,...at(e)});class B4 extends bt{_parse(t){if(this._getType(t)!==Re.symbol){const r=this._getOrReturnCtx(t);return Te(r,{code:Se.invalid_type,expected:Re.symbol,received:r.parsedType}),Ge}return Bi(t.data)}}B4.create=e=>new B4({typeName:Ke.ZodSymbol,...at(e)});class q4 extends bt{_parse(t){if(this._getType(t)!==Re.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:Se.invalid_type,expected:Re.undefined,received:r.parsedType}),Ge}return Bi(t.data)}}q4.create=e=>new q4({typeName:Ke.ZodUndefined,...at(e)});class z4 extends bt{_parse(t){if(this._getType(t)!==Re.null){const r=this._getOrReturnCtx(t);return Te(r,{code:Se.invalid_type,expected:Re.null,received:r.parsedType}),Ge}return Bi(t.data)}}z4.create=e=>new z4({typeName:Ke.ZodNull,...at(e)});class F4 extends bt{constructor(){super(...arguments),this._any=!0}_parse(t){return Bi(t.data)}}F4.create=e=>new F4({typeName:Ke.ZodAny,...at(e)});class V4 extends bt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Bi(t.data)}}V4.create=e=>new V4({typeName:Ke.ZodUnknown,...at(e)});class Cl extends bt{_parse(t){const n=this._getOrReturnCtx(t);return Te(n,{code:Se.invalid_type,expected:Re.never,received:n.parsedType}),Ge}}Cl.create=e=>new Cl({typeName:Ke.ZodNever,...at(e)});class U4 extends bt{_parse(t){if(this._getType(t)!==Re.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:Se.invalid_type,expected:Re.void,received:r.parsedType}),Ge}return Bi(t.data)}}U4.create=e=>new U4({typeName:Ke.ZodVoid,...at(e)});class La extends bt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Re.array)return Te(n,{code:Se.invalid_type,expected:Re.array,received:n.parsedType}),Ge;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(Te(n,{code:o?Se.too_big:Se.too_small,minimum:s?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&&(Te(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&&(Te(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,s)=>i.type._parseAsync(new Al(n,o,n.path,s)))).then(o=>si.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new Al(n,o,n.path,s)));return si.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new La({...this._def,minLength:{value:t,message:ke.toString(n)}})}max(t,n){return new La({...this._def,maxLength:{value:t,message:ke.toString(n)}})}length(t,n){return new La({...this._def,exactLength:{value:t,message:ke.toString(n)}})}nonempty(t){return this.min(1,t)}}La.create=(e,t)=>new La({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ke.ZodArray,...at(t)});function hf(e){if(e instanceof _n){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=vl.create(hf(r))}return new _n({...e._def,shape:()=>t})}else return e instanceof La?new La({...e._def,type:hf(e.element)}):e instanceof vl?vl.create(hf(e.unwrap())):e instanceof nd?nd.create(hf(e.unwrap())):e instanceof Vc?Vc.create(e.items.map(t=>hf(t))):e}class _n extends bt{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=St.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Re.object){const f=this._getOrReturnCtx(t);return Te(f,{code:Se.invalid_type,expected:Re.object,received:f.parsedType}),Ge}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Cl&&this._def.unknownKeys==="strip"))for(const f in i.data)o.includes(f)||s.push(f);const c=[];for(const f of o){const h=a[f],d=i.data[f];c.push({key:{status:"valid",value:f},value:h._parse(new Al(i,d,i.path,f)),alwaysSet:f in i.data})}if(this._def.catchall instanceof Cl){const f=this._def.unknownKeys;if(f==="passthrough")for(const h of s)c.push({key:{status:"valid",value:h},value:{status:"valid",value:i.data[h]}});else if(f==="strict")s.length>0&&(Te(i,{code:Se.unrecognized_keys,keys:s}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const h of s){const d=i.data[h];c.push({key:{status:"valid",value:h},value:f._parse(new Al(i,d,i.path,h)),alwaysSet:h in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const f=[];for(const h of c){const d=await h.key,m=await h.value;f.push({key:d,value:m,alwaysSet:h.alwaysSet})}return f}).then(f=>si.mergeObjectSync(r,f)):si.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new _n({...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:ke.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(t){return new _n({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _n({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ke.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new _n({...this._def,catchall:t})}pick(t){const n={};for(const r of St.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new _n({...this._def,shape:()=>n})}omit(t){const n={};for(const r of St.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new _n({...this._def,shape:()=>n})}deepPartial(){return hf(this)}partial(t){const n={};for(const r of St.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new _n({...this._def,shape:()=>n})}required(t){const n={};for(const r of St.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof vl;)a=a._def.innerType;n[r]=a}return new _n({...this._def,shape:()=>n})}keyof(){return MK(St.objectKeys(this.shape))}}_n.create=(e,t)=>new _n({shape:()=>e,unknownKeys:"strip",catchall:Cl.create(),typeName:Ke.ZodObject,...at(t)});_n.strictCreate=(e,t)=>new _n({shape:()=>e,unknownKeys:"strict",catchall:Cl.create(),typeName:Ke.ZodObject,...at(t)});_n.lazycreate=(e,t)=>new _n({shape:e,unknownKeys:"strip",catchall:Cl.create(),typeName:Ke.ZodObject,...at(t)});class qb extends bt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Uo(s.ctx.common.issues));return Te(n,{code:Se.invalid_union,unionErrors:o}),Ge}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 c of r){const f={...n,common:{...n.common,issues:[]},parent:null},h=c._parseSync({data:n.data,path:n.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,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 s=o.map(c=>new Uo(c));return Te(n,{code:Se.invalid_union,unionErrors:s}),Ge}}get options(){return this._def.options}}qb.create=(e,t)=>new qb({options:e,typeName:Ke.ZodUnion,...at(t)});function gM(e,t){const n=Ws(e),r=Ws(t);if(e===t)return{valid:!0,data:e};if(n===Re.object&&r===Re.object){const i=St.objectKeys(t),a=St.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=gM(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===Re.array&&r===Re.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=gM(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===Re.date&&r===Re.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class zb extends bt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(D4(a)||D4(o))return Ge;const s=gM(a.value,o.value);return s.valid?((I4(a)||I4(o))&&n.dirty(),{status:n.value,value:s.data}):(Te(r,{code:Se.invalid_intersection_types}),Ge)};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}))}}zb.create=(e,t,n)=>new zb({left:e,right:t,typeName:Ke.ZodIntersection,...at(n)});class Vc extends bt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Re.array)return Te(r,{code:Se.invalid_type,expected:Re.array,received:r.parsedType}),Ge;if(r.data.length<this._def.items.length)return Te(r,{code:Se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ge;!this._def.rest&&r.data.length>this._def.items.length&&(Te(r,{code:Se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Al(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>si.mergeArray(n,o)):si.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Vc({...this._def,rest:t})}}Vc.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vc({items:e,typeName:Ke.ZodTuple,rest:null,...at(t)})};class H4 extends bt{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!==Re.map)return Te(r,{code:Se.invalid_type,expected:Re.map,received:r.parsedType}),Ge;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,c],f)=>({key:i._parse(new Al(r,s,r.path,[f,"key"])),value:a._parse(new Al(r,c,r.path,[f,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const f=await c.key,h=await c.value;if(f.status==="aborted"||h.status==="aborted")return Ge;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(f.value,h.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const f=c.key,h=c.value;if(f.status==="aborted"||h.status==="aborted")return Ge;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(f.value,h.value)}return{status:n.value,value:s}}}}H4.create=(e,t,n)=>new H4({valueType:t,keyType:e,typeName:Ke.ZodMap,...at(n)});class im extends bt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Re.set)return Te(r,{code:Se.invalid_type,expected:Re.set,received:r.parsedType}),Ge;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Te(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&&(Te(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(c){const f=new Set;for(const h of c){if(h.status==="aborted")return Ge;h.status==="dirty"&&n.dirty(),f.add(h.value)}return{status:n.value,value:f}}const s=[...r.data.values()].map((c,f)=>a._parse(new Al(r,c,r.path,f)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new im({...this._def,minSize:{value:t,message:ke.toString(n)}})}max(t,n){return new im({...this._def,maxSize:{value:t,message:ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}im.create=(e,t)=>new im({valueType:e,minSize:null,maxSize:null,typeName:Ke.ZodSet,...at(t)});class G4 extends bt{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})}}G4.create=(e,t)=>new G4({getter:e,typeName:Ke.ZodLazy,...at(t)});class K4 extends bt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Te(n,{received:n.data,code:Se.invalid_literal,expected:this._def.value}),Ge}return{status:"valid",value:t.data}}get value(){return this._def.value}}K4.create=(e,t)=>new K4({value:e,typeName:Ke.ZodLiteral,...at(t)});function MK(e,t){return new ed({values:e,typeName:Ke.ZodEnum,...at(t)})}class ed extends bt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Te(n,{expected:St.joinValues(r),received:n.parsedType,code:Se.invalid_type}),Ge}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 Te(n,{received:n.data,code:Se.invalid_enum_value,options:r}),Ge}return Bi(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 ed.create(t,{...this._def,...n})}exclude(t,n=this._def){return ed.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ed.create=MK;class W4 extends bt{_parse(t){const n=St.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Re.string&&r.parsedType!==Re.number){const i=St.objectValues(n);return Te(r,{expected:St.joinValues(i),received:r.parsedType,code:Se.invalid_type}),Ge}if(this._cache||(this._cache=new Set(St.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=St.objectValues(n);return Te(r,{received:r.data,code:Se.invalid_enum_value,options:i}),Ge}return Bi(t.data)}get enum(){return this._def.values}}W4.create=(e,t)=>new W4({values:e,typeName:Ke.ZodNativeEnum,...at(t)});class Fb extends bt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Re.promise&&n.common.async===!1)return Te(n,{code:Se.invalid_type,expected:Re.promise,received:n.parsedType}),Ge;const r=n.parsedType===Re.promise?n.data:Promise.resolve(n.data);return Bi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Fb.create=(e,t)=>new Fb({type:e,typeName:Ke.ZodPromise,...at(t)});class td extends bt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ke.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=>{Te(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 s=>{if(n.value==="aborted")return Ge;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Ge:c.status==="dirty"||n.value==="dirty"?Tp(c.value):c});{if(n.value==="aborted")return Ge;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Ge:s.status==="dirty"||n.value==="dirty"?Tp(s.value):s}}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ge:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Ge:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.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(!Zf(o))return Ge;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Zf(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):Ge);St.assertNever(i)}}td.create=(e,t,n)=>new td({schema:e,typeName:Ke.ZodEffects,effect:t,...at(n)});td.createWithPreprocess=(e,t,n)=>new td({schema:t,effect:{type:"preprocess",transform:e},typeName:Ke.ZodEffects,...at(n)});class vl extends bt{_parse(t){return this._getType(t)===Re.undefined?Bi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vl.create=(e,t)=>new vl({innerType:e,typeName:Ke.ZodOptional,...at(t)});class nd extends bt{_parse(t){return this._getType(t)===Re.null?Bi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}nd.create=(e,t)=>new nd({innerType:e,typeName:Ke.ZodNullable,...at(t)});class vM extends bt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Re.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}vM.create=(e,t)=>new vM({innerType:e,typeName:Ke.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...at(t)});class yM extends bt{_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 $b(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Uo(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Uo(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}yM.create=(e,t)=>new yM({innerType:e,typeName:Ke.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...at(t)});class Y4 extends bt{_parse(t){if(this._getType(t)!==Re.nan){const r=this._getOrReturnCtx(t);return Te(r,{code:Se.invalid_type,expected:Re.nan,received:r.parsedType}),Ge}return{status:"valid",value:t.data}}}Y4.create=e=>new Y4({typeName:Ke.ZodNaN,...at(e)});class Ude extends bt{_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 l2 extends bt{_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"?Ge:a.status==="dirty"?(n.dirty(),Tp(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"?Ge: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 l2({in:t,out:n,typeName:Ke.ZodPipeline})}}class bM extends bt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Zf(i)&&(i.value=Object.freeze(i.value)),i);return $b(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}bM.create=(e,t)=>new bM({innerType:e,typeName:Ke.ZodReadonly,...at(t)});var Ke;(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"})(Ke||(Ke={}));const yl=ul.create,X4=Jf.create;Cl.create;La.create;const wg=_n.create;qb.create;zb.create;Vc.create;const D0=ed.create;Fb.create;vl.create;nd.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 Hde=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),RK=(...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 Gde={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 Kde=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},c)=>j.createElement("svg",{ref:c,...Gde,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:RK("lucide",i),...s},[...o.map(([f,h])=>j.createElement(f,h)),...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 $e=(e,t)=>{const n=j.forwardRef(({className:r,...i},a)=>j.createElement(Kde,{ref:a,iconNode:t,className:RK(`lucide-${Hde(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 c2=$e("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 PK=$e("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 Wde=$e("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 Yde=$e("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 kK=$e("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 am=$e("Bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);/**
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 Xde=$e("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"}]]);/**
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 DK=$e("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"}]]);/**
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 Vd=$e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
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 Sg=$e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 rd=$e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
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 Qde=$e("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
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 Va=$e("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"}]]);/**
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 u2=$e("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
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 Qo=$e("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
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 _g=$e("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"}]]);/**
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 G_=$e("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
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 Pi=$e("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
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 Zde=$e("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"}]]);/**
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 I0=$e("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"}]]);/**
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 Jde=$e("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"}]]);/**
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 K_=$e("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"}]]);/**
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 IK=$e("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
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 ehe=$e("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"}]]);/**
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 the=$e("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"}]]);/**
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 Uc=$e("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"}]]);/**
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 f2=$e("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"}]]);/**
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 nhe=$e("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"}]]);/**
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 rhe=$e("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"}]]);/**
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 ihe=$e("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"}]]);/**
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 ahe=$e("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"}]]);/**
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 ohe=$e("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
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 d2=$e("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"}]]);/**
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 LK=$e("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
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 Dc=$e("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
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 $K=$e("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
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 BK=$e("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
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 Hc=$e("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"}]]);/**
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 she=$e("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"}]]);/**
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 lhe=$e("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
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 qK=$e("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"}]]);/**
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 om=$e("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
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 Cy=$e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
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 L0=$e("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"}]]);/**
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 h2=$e("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"}]]);/**
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 che=$e("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
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 sm=$e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
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 uhe=$e("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
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 zK=$e("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"}]]);/**
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 Q4=$e("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"}]]);/**
336
+ * @license lucide-react v0.468.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const id=$e("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"}]]);/**
341
+ * @license lucide-react v0.468.0 - ISC
342
+ *
343
+ * This source code is licensed under the ISC license.
344
+ * See the LICENSE file in the root directory of this source tree.
345
+ */const FK=$e("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"}]]);/**
346
+ * @license lucide-react v0.468.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const Vb=$e("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"}]]);/**
351
+ * @license lucide-react v0.468.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const fhe=$e("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/**
356
+ * @license lucide-react v0.468.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const lm=$e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
361
+ * @license lucide-react v0.468.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const p2=$e("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 dhe=Symbol.for("react.lazy"),Ub=IP[" use ".trim().toString()];function hhe(e){return typeof e=="object"&&e!==null&&"then"in e}function VK(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===dhe&&"_payload"in e&&hhe(e._payload)}function UK(e){const t=phe(e),n=j.forwardRef((r,i)=>{let{children:a,...o}=r;VK(a)&&typeof Ub=="function"&&(a=Ub(a._payload));const s=j.Children.toArray(a),c=s.find(ghe);if(c){const f=c.props.children,h=s.map(d=>d===c?j.Children.count(f)>1?j.Children.only(null):j.isValidElement(f)?f.props.children:null:d);return g.jsx(t,{...o,ref:i,children:j.isValidElement(f)?j.cloneElement(f,void 0,h):null})}return g.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var Ud=UK("Slot");function phe(e){const t=j.forwardRef((n,r)=>{let{children:i,...a}=n;if(VK(i)&&typeof Ub=="function"&&(i=Ub(i._payload)),j.isValidElement(i)){const o=yhe(i),s=vhe(a,i.props);return i.type!==j.Fragment&&(s.ref=r?za(r,o):o),j.cloneElement(i,s)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mhe=Symbol("radix.slottable");function ghe(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mhe}function vhe(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]=(...s)=>{const c=a(...s);return i(...s),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function yhe(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 Z4=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,J4=gt,Eg=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return J4(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 h=n==null?void 0:n[f],d=a==null?void 0:a[f];if(h===null)return null;const m=Z4(h)||Z4(d);return i[f][m]}),s=n&&Object.entries(n).reduce((f,h)=>{let[d,m]=h;return m===void 0||(f[d]=m),f},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,h)=>{let{class:d,className:m,...v}=h;return Object.entries(v).every(x=>{let[w,b]=x;return Array.isArray(b)?b.includes({...a,...s}[w]):{...a,...s}[w]===b})?[...f,d,m]:f},[]);return J4(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},m2=Eg("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"}}),it=j.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?Ud:"button";return g.jsx(o,{className:ge(m2({variant:t,size:n,className:e})),ref:a,...i})});it.displayName="Button";const ra=j.forwardRef(({className:e,type:t,...n},r)=>g.jsx("input",{type:t,className:ge("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}));ra.displayName="Input";var bhe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Zo=bhe.reduce((e,t)=>{const n=UK(`Primitive.${t}`),r=j.forwardRef((i,a)=>{const{asChild:o,...s}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),xhe="Separator",eB="horizontal",whe=["horizontal","vertical"],HK=j.forwardRef((e,t)=>{const{decorative:n,orientation:r=eB,...i}=e,a=She(r)?r:eB,s=n?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return g.jsx(Zo.div,{"data-orientation":a,...s,...i,ref:t})});HK.displayName=xhe;function She(e){return whe.includes(e)}var GK=HK;const KK=j.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},i)=>g.jsx(GK,{ref:i,decorative:n,orientation:t,className:ge("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));KK.displayName=GK.displayName;const _he=768;function Ehe(){const[e,t]=j.useState(!1);return j.useEffect(()=>{const n=()=>{t(window.innerWidth<_he)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}var W_="focusScope.autoFocusOnMount",Y_="focusScope.autoFocusOnUnmount",tB={bubbles:!1,cancelable:!0},Ahe="FocusScope",$0=j.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=j.useState(null),f=Fa(i),h=Fa(a),d=j.useRef(null),m=yt(t,w=>c(w)),v=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let w=function(_){if(v.paused||!s)return;const A=_.target;s.contains(A)?d.current=A:Vs(d.current,{select:!0})},b=function(_){if(v.paused||!s)return;const A=_.relatedTarget;A!==null&&(s.contains(A)||Vs(d.current,{select:!0}))},S=function(_){if(document.activeElement===document.body)for(const C of _)C.removedNodes.length>0&&Vs(s)};document.addEventListener("focusin",w),document.addEventListener("focusout",b);const E=new MutationObserver(S);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",b),E.disconnect()}}},[r,s,v.paused]),j.useEffect(()=>{if(s){rB.add(v);const w=document.activeElement;if(!s.contains(w)){const S=new CustomEvent(W_,tB);s.addEventListener(W_,f),s.dispatchEvent(S),S.defaultPrevented||(Che(Mhe(WK(s)),{select:!0}),document.activeElement===w&&Vs(s))}return()=>{s.removeEventListener(W_,f),setTimeout(()=>{const S=new CustomEvent(Y_,tB);s.addEventListener(Y_,h),s.dispatchEvent(S),S.defaultPrevented||Vs(w??document.body,{select:!0}),s.removeEventListener(Y_,h),rB.remove(v)},0)}}},[s,f,h,v]);const x=j.useCallback(w=>{if(!n&&!r||v.paused)return;const b=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,S=document.activeElement;if(b&&S){const E=w.currentTarget,[_,A]=The(E);_&&A?!w.shiftKey&&S===A?(w.preventDefault(),n&&Vs(_,{select:!0})):w.shiftKey&&S===_&&(w.preventDefault(),n&&Vs(A,{select:!0})):S===E&&w.preventDefault()}},[n,r,v.paused]);return g.jsx(Ue.div,{tabIndex:-1,...o,ref:m,onKeyDown:x})});$0.displayName=Ahe;function Che(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Vs(r,{select:t}),document.activeElement!==n)return}function The(e){const t=WK(e),n=nB(t,e),r=nB(t.reverse(),e);return[n,r]}function WK(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 nB(e,t){for(const n of e)if(!jhe(n,{upTo:t}))return n}function jhe(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 Nhe(e){return e instanceof HTMLInputElement&&"select"in e}function Vs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Nhe(e)&&t&&e.select()}}var rB=Ohe();function Ohe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=iB(e,t),e.unshift(t)},remove(t){var n;e=iB(e,t),(n=e[0])==null||n.resume()}}}function iB(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Mhe(e){return e.filter(t=>t.tagName!=="A")}var X_=0;function g2(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??aB()),document.body.insertAdjacentElement("beforeend",e[1]??aB()),X_++,()=>{X_===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),X_--}},[])}function aB(){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 Ra=function(){return Ra=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},Ra.apply(this,arguments)};function YK(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 Rhe(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 fb="right-scroll-bar-position",db="width-before-scroll-bar",Phe="with-scroll-bars-hidden",khe="--removed-body-scroll-bar-size";function Q_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Dhe(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Ihe=typeof window<"u"?j.useLayoutEffect:j.useEffect,oB=new WeakMap;function Lhe(e,t){var n=Dhe(null,function(r){return e.forEach(function(i){return Q_(i,r)})});return Ihe(function(){var r=oB.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||Q_(s,null)}),a.forEach(function(s){i.has(s)||Q_(s,o)})}oB.set(n,e)},[e]),n}function $he(e){return e}function Bhe(e,t){t===void 0&&(t=$he);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(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var c=function(){var h=o;o=[],h.forEach(a)},f=function(){return Promise.resolve().then(c)};f(),n={push:function(h){o.push(h),f()},filter:function(h){return o=o.filter(h),n}}}};return i}function qhe(e){e===void 0&&(e={});var t=Bhe(null);return t.options=Ra({async:!0,ssr:!1},e),t}var XK=function(e){var t=e.sideCar,n=YK(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return j.createElement(r,Ra({},n))};XK.isSideCarExport=!0;function zhe(e,t){return e.useMedium(t),XK}var QK=qhe(),Z_=function(){},B0=j.forwardRef(function(e,t){var n=j.useRef(null),r=j.useState({onScrollCapture:Z_,onWheelCapture:Z_,onTouchMoveCapture:Z_}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,f=e.removeScrollBar,h=e.enabled,d=e.shards,m=e.sideCar,v=e.noRelative,x=e.noIsolation,w=e.inert,b=e.allowPinchZoom,S=e.as,E=S===void 0?"div":S,_=e.gapMode,A=YK(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,N=Lhe([n,t]),M=Ra(Ra({},A),i);return j.createElement(j.Fragment,null,h&&j.createElement(C,{sideCar:QK,removeScrollBar:f,shards:d,noRelative:v,noIsolation:x,inert:w,setCallbacks:a,allowPinchZoom:!!b,lockRef:n,gapMode:_}),o?j.cloneElement(j.Children.only(s),Ra(Ra({},M),{ref:N})):j.createElement(E,Ra({},M,{className:c,ref:N}),s))});B0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};B0.classNames={fullWidth:db,zeroRight:fb};var Fhe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Vhe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fhe();return t&&e.setAttribute("nonce",t),e}function Uhe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hhe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Ghe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Vhe())&&(Uhe(t,n),Hhe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Khe=function(){var e=Ghe();return function(t,n){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ZK=function(){var e=Khe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Whe={left:0,top:0,right:0,gap:0},J_=function(e){return parseInt(e||"",10)||0},Yhe=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[J_(n),J_(r),J_(i)]},Xhe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Whe;var t=Yhe(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])}},Qhe=ZK(),Nf="data-scroll-locked",Zhe=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
366
+ .`.concat(Phe,` {
367
+ overflow: hidden `).concat(r,`;
368
+ padding-right: `).concat(s,"px ").concat(r,`;
369
+ }
370
+ body[`).concat(Nf,`] {
371
+ overflow: hidden `).concat(r,`;
372
+ overscroll-behavior: contain;
373
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
374
+ padding-left: `.concat(i,`px;
375
+ padding-top: `).concat(a,`px;
376
+ padding-right: `).concat(o,`px;
377
+ margin-left:0;
378
+ margin-top:0;
379
+ margin-right: `).concat(s,"px ").concat(r,`;
380
+ `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
381
+ }
382
+
383
+ .`).concat(fb,` {
384
+ right: `).concat(s,"px ").concat(r,`;
385
+ }
386
+
387
+ .`).concat(db,` {
388
+ margin-right: `).concat(s,"px ").concat(r,`;
389
+ }
390
+
391
+ .`).concat(fb," .").concat(fb,` {
392
+ right: 0 `).concat(r,`;
393
+ }
394
+
395
+ .`).concat(db," .").concat(db,` {
396
+ margin-right: 0 `).concat(r,`;
397
+ }
398
+
399
+ body[`).concat(Nf,`] {
400
+ `).concat(khe,": ").concat(s,`px;
401
+ }
402
+ `)},sB=function(){var e=parseInt(document.body.getAttribute(Nf)||"0",10);return isFinite(e)?e:0},Jhe=function(){j.useEffect(function(){return document.body.setAttribute(Nf,(sB()+1).toString()),function(){var e=sB()-1;e<=0?document.body.removeAttribute(Nf):document.body.setAttribute(Nf,e.toString())}},[])},epe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Jhe();var a=j.useMemo(function(){return Xhe(i)},[i]);return j.createElement(Qhe,{styles:Zhe(a,!t,i,n?"":"!important")})},xM=!1;if(typeof window<"u")try{var Ty=Object.defineProperty({},"passive",{get:function(){return xM=!0,!0}});window.addEventListener("test",Ty,Ty),window.removeEventListener("test",Ty,Ty)}catch{xM=!1}var nf=xM?{passive:!1}:!1,tpe=function(e){return e.tagName==="TEXTAREA"},JK=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!tpe(e)&&n[t]==="visible")},npe=function(e){return JK(e,"overflowY")},rpe=function(e){return JK(e,"overflowX")},lB=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=eW(e,r);if(i){var a=tW(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ipe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ape=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},eW=function(e,t){return e==="v"?npe(t):rpe(t)},tW=function(e,t){return e==="v"?ipe(t):ape(t)},ope=function(e,t){return e==="h"&&t==="rtl"?-1:1},spe=function(e,t,n,r,i){var a=ope(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),f=!1,h=o>0,d=0,m=0;do{if(!s)break;var v=tW(e,s),x=v[0],w=v[1],b=v[2],S=w-b-a*x;(x||S)&&eW(e,s)&&(d+=S,m+=x);var E=s.parentNode;s=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(h&&Math.abs(d)<1||!h&&Math.abs(m)<1)&&(f=!0),f},jy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},cB=function(e){return[e.deltaX,e.deltaY]},uB=function(e){return e&&"current"in e?e.current:e},lpe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},cpe=function(e){return`
403
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
404
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
405
+ `)},upe=0,rf=[];function fpe(e){var t=j.useRef([]),n=j.useRef([0,0]),r=j.useRef(),i=j.useState(upe++)[0],a=j.useState(ZK)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=Rhe([e.lockRef.current],(e.shards||[]).map(uB),!0).filter(Boolean);return w.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=j.useCallback(function(w,b){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var S=jy(w),E=n.current,_="deltaX"in w?w.deltaX:E[0]-S[0],A="deltaY"in w?w.deltaY:E[1]-S[1],C,N=w.target,M=Math.abs(_)>Math.abs(A)?"h":"v";if("touches"in w&&M==="h"&&N.type==="range")return!1;var R=window.getSelection(),P=R&&R.anchorNode,$=P?P===N||P.contains(N):!1;if($)return!1;var L=lB(M,N);if(!L)return!0;if(L?C=M:(C=M==="v"?"h":"v",L=lB(M,N)),!L)return!1;if(!r.current&&"changedTouches"in w&&(_||A)&&(r.current=C),!C)return!0;var D=r.current||C;return spe(D,b,w,D==="h"?_:A)},[]),c=j.useCallback(function(w){var b=w;if(!(!rf.length||rf[rf.length-1]!==a)){var S="deltaY"in b?cB(b):jy(b),E=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&lpe(C.delta,S)})[0];if(E&&E.should){b.cancelable&&b.preventDefault();return}if(!E){var _=(o.current.shards||[]).map(uB).filter(Boolean).filter(function(C){return C.contains(b.target)}),A=_.length>0?s(b,_[0]):!o.current.noIsolation;A&&b.cancelable&&b.preventDefault()}}},[]),f=j.useCallback(function(w,b,S,E){var _={name:w,delta:b,target:S,should:E,shadowParent:dpe(S)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(A){return A!==_})},1)},[]),h=j.useCallback(function(w){n.current=jy(w),r.current=void 0},[]),d=j.useCallback(function(w){f(w.type,cB(w),w.target,s(w,e.lockRef.current))},[]),m=j.useCallback(function(w){f(w.type,jy(w),w.target,s(w,e.lockRef.current))},[]);j.useEffect(function(){return rf.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:m}),document.addEventListener("wheel",c,nf),document.addEventListener("touchmove",c,nf),document.addEventListener("touchstart",h,nf),function(){rf=rf.filter(function(w){return w!==a}),document.removeEventListener("wheel",c,nf),document.removeEventListener("touchmove",c,nf),document.removeEventListener("touchstart",h,nf)}},[]);var v=e.removeScrollBar,x=e.inert;return j.createElement(j.Fragment,null,x?j.createElement(a,{styles:cpe(i)}):null,v?j.createElement(epe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dpe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hpe=zhe(QK,fpe);var q0=j.forwardRef(function(e,t){return j.createElement(B0,Ra({},e,{ref:t,sideCar:hpe}))});q0.classNames=B0.classNames;var ppe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},af=new WeakMap,Ny=new WeakMap,Oy={},eE=0,nW=function(e){return e&&(e.host||nW(e.parentNode))},mpe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=nW(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})},gpe=function(e,t,n,r){var i=mpe(t,Array.isArray(e)?e:[e]);Oy[n]||(Oy[n]=new WeakMap);var a=Oy[n],o=[],s=new Set,c=new Set(i),f=function(d){!d||s.has(d)||(s.add(d),f(d.parentNode))};i.forEach(f);var h=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(s.has(m))h(m);else try{var v=m.getAttribute(r),x=v!==null&&v!=="false",w=(af.get(m)||0)+1,b=(a.get(m)||0)+1;af.set(m,w),a.set(m,b),o.push(m),w===1&&x&&Ny.set(m,!0),b===1&&m.setAttribute(n,"true"),x||m.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return h(t),s.clear(),eE++,function(){o.forEach(function(d){var m=af.get(d)-1,v=a.get(d)-1;af.set(d,m),a.set(d,v),m||(Ny.has(d)||d.removeAttribute(r),Ny.delete(d)),v||d.removeAttribute(n)}),eE--,eE||(af=new WeakMap,af=new WeakMap,Ny=new WeakMap,Oy={})}},v2=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=ppe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),gpe(r,i,n,"aria-hidden")):function(){return null}},z0="Dialog",[rW,iW]=$i(z0),[vpe,ha]=rW(z0),aW=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=j.useRef(null),c=j.useRef(null),[f,h]=Vo({prop:r,defaultProp:i??!1,onChange:a,caller:z0});return g.jsx(vpe,{scope:t,triggerRef:s,contentRef:c,contentId:Hn(),titleId:Hn(),descriptionId:Hn(),open:f,onOpenChange:h,onOpenToggle:j.useCallback(()=>h(d=>!d),[h]),modal:o,children:n})};aW.displayName=z0;var oW="DialogTrigger",sW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ha(oW,n),a=yt(t,i.triggerRef);return g.jsx(Ue.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":x2(i.open),...r,ref:a,onClick:je(e.onClick,i.onOpenToggle)})});sW.displayName=oW;var y2="DialogPortal",[ype,lW]=rW(y2,{forceMount:void 0}),cW=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=ha(y2,t);return g.jsx(ype,{scope:t,forceMount:n,children:j.Children.map(r,o=>g.jsx(di,{present:n||a.open,children:g.jsx(vg,{asChild:!0,container:i,children:o})}))})};cW.displayName=y2;var Hb="DialogOverlay",uW=j.forwardRef((e,t)=>{const n=lW(Hb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ha(Hb,e.__scopeDialog);return a.modal?g.jsx(di,{present:r||a.open,children:g.jsx(xpe,{...i,ref:t})}):null});uW.displayName=Hb;var bpe=Yf("DialogOverlay.RemoveScroll"),xpe=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ha(Hb,n);return g.jsx(q0,{as:bpe,allowPinchZoom:!0,shards:[i.contentRef],children:g.jsx(Ue.div,{"data-state":x2(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Gc="DialogContent",fW=j.forwardRef((e,t)=>{const n=lW(Gc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ha(Gc,e.__scopeDialog);return g.jsx(di,{present:r||a.open,children:a.modal?g.jsx(wpe,{...i,ref:t}):g.jsx(Spe,{...i,ref:t})})});fW.displayName=Gc;var wpe=j.forwardRef((e,t)=>{const n=ha(Gc,e.__scopeDialog),r=j.useRef(null),i=yt(t,n.contentRef,r);return j.useEffect(()=>{const a=r.current;if(a)return v2(a)},[]),g.jsx(dW,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:je(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:je(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:je(e.onFocusOutside,a=>a.preventDefault())})}),Spe=j.forwardRef((e,t)=>{const n=ha(Gc,e.__scopeDialog),r=j.useRef(!1),i=j.useRef(!1);return g.jsx(dW,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,f;(c=e.onInteractOutside)==null||c.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()}})}),dW=j.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=ha(Gc,n),c=j.useRef(null),f=yt(t,c);return g2(),g.jsxs(g.Fragment,{children:[g.jsx($0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:g.jsx(mg,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":x2(s.open),...o,ref:f,onDismiss:()=>s.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(Epe,{titleId:s.titleId}),g.jsx(Cpe,{contentRef:c,descriptionId:s.descriptionId})]})]})}),b2="DialogTitle",hW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ha(b2,n);return g.jsx(Ue.h2,{id:i.titleId,...r,ref:t})});hW.displayName=b2;var pW="DialogDescription",mW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ha(pW,n);return g.jsx(Ue.p,{id:i.descriptionId,...r,ref:t})});mW.displayName=pW;var gW="DialogClose",vW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ha(gW,n);return g.jsx(Ue.button,{type:"button",...r,ref:t,onClick:je(e.onClick,()=>i.onOpenChange(!1))})});vW.displayName=gW;function x2(e){return e?"open":"closed"}var yW="DialogTitleWarning",[_pe,bW]=Lce(yW,{contentName:Gc,titleName:b2,docsSlug:"dialog"}),Epe=({titleId:e})=>{const t=bW(yW),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
406
+
407
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
408
+
409
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ape="DialogDescriptionWarning",Cpe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bW(Ape).contentName}}.`;return j.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},F0=aW,Tpe=sW,V0=cW,Hd=uW,Gd=fW,Ag=hW,Cg=mW,U0=vW;const jpe=F0,Npe=V0,xW=j.forwardRef(({className:e,...t},n)=>g.jsx(Hd,{className:ge("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}));xW.displayName=Hd.displayName;const Ope=Eg("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"}}),wW=j.forwardRef(({side:e="right",className:t,children:n,...r},i)=>g.jsxs(Npe,{children:[g.jsx(xW,{}),g.jsxs(Gd,{ref:i,className:ge(Ope({side:e}),t),...r,children:[g.jsxs(U0,{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:[g.jsx(lm,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));wW.displayName=Gd.displayName;const Mpe=j.forwardRef(({className:e,...t},n)=>g.jsx(Ag,{ref:n,className:ge("text-lg font-semibold text-foreground",e),...t}));Mpe.displayName=Ag.displayName;const Rpe=j.forwardRef(({className:e,...t},n)=>g.jsx(Cg,{ref:n,className:ge("text-sm text-muted-foreground",e),...t}));Rpe.displayName=Cg.displayName;function Jt({className:e,...t}){return g.jsx("div",{className:ge("animate-pulse bg-primary/10",e),...t})}const SW="sidebar_state",Ppe=3600*24*7,kpe="16rem",Dpe="18rem",Ipe="3rem",Lpe="b";function $pe(e){if(typeof document>"u")return e;const t=document.cookie.match(`(?:^|; )${SW}=([^;]*)`);return(t==null?void 0:t[1])==="true"?!0:(t==null?void 0:t[1])==="false"?!1:e}const _W=j.createContext(null);function Tg(){const e=j.useContext(_W);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const EW=j.forwardRef(({defaultOpen:e=!1,open:t,onOpenChange:n,className:r,style:i,children:a,...o},s)=>{const c=Ehe(),[f,h]=j.useState(!1),[d,m]=j.useState(()=>$pe(e)),v=t??d,x=j.useCallback(E=>{const _=typeof E=="function"?E(v):E;n?n(_):m(_),document.cookie=`${SW}=${_}; path=/; max-age=${Ppe}`},[n,v]),w=j.useCallback(()=>c?h(E=>!E):x(E=>!E),[c,x,h]);j.useEffect(()=>{const E=_=>{_.key===Lpe&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),w())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[w]);const b=v?"expanded":"collapsed",S=j.useMemo(()=>({state:b,open:v,setOpen:x,isMobile:c,openMobile:f,setOpenMobile:h,toggleSidebar:w}),[b,v,x,c,f,h,w]);return g.jsx(_W.Provider,{value:S,children:g.jsx(jK,{delayDuration:0,children:g.jsx("div",{style:{"--sidebar-width":kpe,"--sidebar-width-icon":Ipe,...i},className:ge("group/sidebar-wrapper flex h-full min-h-0 w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:s,...o,children:a})})})});EW.displayName="SidebarProvider";const Bpe=j.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:i,...a},o)=>{const{isMobile:s,state:c,openMobile:f,setOpenMobile:h}=Tg();return n==="none"?g.jsx("div",{className:ge("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:o,...a,children:i}):s?g.jsx(jpe,{open:f,onOpenChange:h,...a,children:g.jsx(wW,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Dpe},side:e,children:g.jsx("div",{className:"flex h-full w-full flex-col",children:i})})}):g.jsxs("div",{ref:o,className:"group peer hidden md:block text-sidebar-foreground","data-state":c,"data-collapsible":c==="collapsed"?n:"","data-variant":t,"data-side":e,children:[g.jsx("div",{className:ge("duration-200 relative h-full w-[var(--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-[var(--sidebar-width-icon)]")}),g.jsx("div",{className:ge("duration-200 fixed inset-y-0 z-10 hidden h-full w-[var(--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-[var(--sidebar-width-icon)] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...a,children:g.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})})]})});Bpe.displayName="Sidebar";const qpe=j.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:i}=Tg();return g.jsxs(it,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:ge("h-7 w-7",e),onClick:a=>{t==null||t(a),i()},...n,children:[g.jsx(lhe,{}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});qpe.displayName="SidebarTrigger";const AW=j.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=Tg();return g.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:ge("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})});AW.displayName="SidebarRail";const CW=j.forwardRef(({className:e,...t},n)=>g.jsx("main",{ref:n,className:ge("relative flex min-h-0 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}));CW.displayName="SidebarInset";const zpe=j.forwardRef(({className:e,...t},n)=>g.jsx(ra,{ref:n,"data-sidebar":"input",className:ge("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));zpe.displayName="SidebarInput";const TW=j.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"header",className:ge("flex flex-col gap-2 p-2",e),...t}));TW.displayName="SidebarHeader";const jW=j.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"footer",className:ge("flex flex-col gap-2 p-2",e),...t}));jW.displayName="SidebarFooter";const NW=j.forwardRef(({className:e,...t},n)=>g.jsx(KK,{ref:n,"data-sidebar":"separator",className:ge("mx-2 w-auto bg-sidebar-border",e),...t}));NW.displayName="SidebarSeparator";const OW=j.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"content",className:ge("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));OW.displayName="SidebarContent";const MW=j.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"group",className:ge("relative flex w-full min-w-0 flex-col p-2",e),...t}));MW.displayName="SidebarGroup";const RW=j.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const i=t?Ud:"div";return g.jsx(i,{ref:r,"data-sidebar":"group-label",className:ge("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})});RW.displayName="SidebarGroupLabel";const Fpe=j.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const i=t?Ud:"button";return g.jsx(i,{ref:r,"data-sidebar":"group-action",className:ge("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})});Fpe.displayName="SidebarGroupAction";const PW=j.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"group-content",className:ge("w-full text-sm",e),...t}));PW.displayName="SidebarGroupContent";const Gb=j.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,"data-sidebar":"menu",className:ge("flex w-full min-w-0 flex-col gap-1",e),...t}));Gb.displayName="SidebarMenu";const cm=j.forwardRef(({className:e,...t},n)=>g.jsx("li",{ref:n,"data-sidebar":"menu-item",className:ge("group/menu-item relative",e),...t}));cm.displayName="SidebarMenuItem";const Vpe=Eg("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"}}),w2=j.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:i,className:a,...o},s)=>{const c=e?Ud:"button",{isMobile:f,state:h}=Tg(),d=g.jsx(c,{ref:s,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:ge(Vpe({variant:n,size:r}),a),...o});return i?(typeof i=="string"&&(i={children:i}),g.jsxs(bg,{children:[g.jsx(xg,{asChild:!0,children:d}),g.jsx(Fd,{side:"right",align:"center",hidden:h!=="collapsed"||f,...i})]})):d});w2.displayName="SidebarMenuButton";const Upe=j.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},i)=>{const a=t?Ud:"button";return g.jsx(a,{ref:i,"data-sidebar":"menu-action",className:ge("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})});Upe.displayName="SidebarMenuAction";const Hpe=j.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:ge("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}));Hpe.displayName="SidebarMenuBadge";const Gpe=j.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const i=j.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return g.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:ge(" h-8 flex gap-2 px-2 items-center",e),...n,children:[t&&g.jsx(Jt,{className:"size-4 ","data-sidebar":"menu-skeleton-icon"}),g.jsx(Jt,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":i}})]})});Gpe.displayName="SidebarMenuSkeleton";const Kpe=j.forwardRef(({className:e,...t},n)=>g.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:ge("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}));Kpe.displayName="SidebarMenuSub";const Wpe=j.forwardRef(({...e},t)=>g.jsx("li",{ref:t,...e}));Wpe.displayName="SidebarMenuSubItem";const Ype=j.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...i},a)=>{const o=e?Ud:"a";return g.jsx(o,{ref:a,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:ge("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})});Ype.displayName="SidebarMenuSubButton";function kW(){var e;return typeof window<"u"&&((e=window.__WORKBENCH_RUNTIME__)!=null&&e.apiBase)?Qpe(window.__WORKBENCH_RUNTIME__.apiBase):""}function Xpe(){const e=kW();return e?`${e}/config`:"./config"}function Qpe(e){return e.endsWith("/")?e.slice(0,-1):e}const nt={toString(){const e=kW();return e?`${e}/api`:"./api"}},Zpe=6e4,fp=12e4;async function et(e,t){const{timeout:n=Zpe,signal:r,...i}=t||{},a=new AbortController,o=setTimeout(()=>a.abort(),n);let s;r&&"any"in AbortSignal?s=AbortSignal.any([r,a.signal]):(r&&(r.aborted?a.abort():r.addEventListener("abort",()=>a.abort())),s=a.signal);try{const c=await fetch(e,{...i,signal:s,headers:{"Content-Type":"application/json",...i==null?void 0:i.headers}});if(!c.ok){const f=await c.json().catch(()=>({}));throw new Error(f.error||`HTTP ${c.status}`)}return c.json()}catch(c){throw c instanceof Error&&c.name==="AbortError"?r!=null&&r.aborted?c:new Error(`Request timed out after ${n/1e3}s`):c}finally{clearTimeout(o)}}const ot={async refresh(){return et(`${nt}/refresh`,{method:"POST"})},async getOverview(e){return et(`${nt}/overview`,{signal:e,timeout:fp})},async getCounts(e){return et(`${nt}/counts`,{signal:e})},async getQueueNames(e){return et(`${nt}/queue-names`,{signal:e})},async getQueues(e){return et(`${nt}/queues`,{signal:e})},async getMetrics(e){return et(`${nt}/metrics`,{signal:e,timeout:fp})},async getActivityStats(e){return et(`${nt}/activity`,{signal:e,timeout:fp})},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 et(`${nt}/queues/${encodeURIComponent(e)}/jobs${r?`?${r}`:""}`)},async getJob(e,t){return et(`${nt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},async getJobLogs(e,t){return et(`${nt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/logs`)},async retryJob(e,t){await et(`${nt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/retry`,{method:"POST"})},async removeJob(e,t){await et(`${nt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/remove`,{method:"POST"})},async promoteJob(e,t){await et(`${nt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/promote`,{method:"POST"})},async runScheduler(e,t){return et(`${nt}/schedulers/${encodeURIComponent(e)}/${encodeURIComponent(t)}/run`,{method:"POST"})},async search(e,t){const n=new URLSearchParams({q:e});return t&&n.set("limit",String(t)),et(`${nt}/search?${n.toString()}`)},async cleanJobs(e,t,n){return et(`${nt}/queues/${encodeURIComponent(e)}/clean`,{method:"POST",body:JSON.stringify({status:t,grace:n})})},async getConfig(){return et(Xpe())},async getTagValues(e,t){const n=new URLSearchParams;t&&n.set("limit",String(t));const r=n.toString();return et(`${nt}/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 et(`${nt}/runs${r?`?${r}`:""}`,{signal:t,timeout:fp})},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 et(`${nt}/schedulers${n?`?${n}`:""}`)},async getRepeatableSchedulers(e){const{repeatable:t}=await this.getSchedulers({repeatableSort:e});return t},async getDelayedSchedulers(e){const{delayed:t}=await this.getSchedulers({delayedSort:e});return t},async testJob(e){const t={queueName:e.queueName,jobName:e.name,data:e.data,opts:e.delay!==void 0?{delay:e.delay}:void 0};return et(`${nt}/test`,{method:"POST",body:JSON.stringify(t)})},async cleanQueue(e,t,n){return et(`${nt}/queues/${encodeURIComponent(e)}/clean`,{method:"POST",body:JSON.stringify({status:t,grace:n})})},async bulkRetry(e){return et(`${nt}/bulk/retry`,{method:"POST",body:JSON.stringify({jobs:e})})},async bulkDelete(e){return et(`${nt}/bulk/delete`,{method:"POST",body:JSON.stringify({jobs:e})})},async bulkPromote(e){return et(`${nt}/bulk/promote`,{method:"POST",body:JSON.stringify({jobs:e})})},async pauseQueue(e){return et(`${nt}/queues/${encodeURIComponent(e)}/pause`,{method:"POST"})},async resumeQueue(e){return et(`${nt}/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 et(`${nt}/flows${r?`?${r}`:""}`,{signal:t,timeout:fp})},async getFlow(e,t){return et(`${nt}/flows/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},async createFlow(e){return et(`${nt}/flows`,{method:"POST",body:JSON.stringify(e)})},async getAlertStatus(){return et(`${nt}/alerts/status`)},async getAlertContactPoints(){return et(`${nt}/alerts/contact-points`)},async createAlertContactPoint(e){return et(`${nt}/alerts/contact-points`,{method:"POST",body:JSON.stringify(e)})},async updateAlertContactPoint(e,t){return et(`${nt}/alerts/contact-points/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})},async deleteAlertContactPoint(e){return et(`${nt}/alerts/contact-points/${encodeURIComponent(e)}`,{method:"DELETE"})},async testAlertContactPoint(e){return et(`${nt}/alerts/contact-points/${encodeURIComponent(e)}/test`,{method:"POST"})},async getAlertRules(){return et(`${nt}/alerts/rules`)},async createAlertRule(e){return et(`${nt}/alerts/rules`,{method:"POST",body:JSON.stringify(e)})},async updateAlertRule(e,t){return et(`${nt}/alerts/rules/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(t)})},async deleteAlertRule(e){return et(`${nt}/alerts/rules/${encodeURIComponent(e)}`,{method:"DELETE"})},async previewAlertRule(e){return et(`${nt}/alerts/rules/${encodeURIComponent(e)}/preview`,{method:"POST"})}},Le={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],alerts:{status:["alerts","status"],contactPoints:["alerts","contact-points"],rules:["alerts","rules"]}};function fu(){return nr({queryKey:Le.config,queryFn:()=>ot.getConfig(),staleTime:Number.POSITIVE_INFINITY})}function Jpe(){return nr({queryKey:Le.overview,queryFn:({signal:e})=>ot.getOverview(e),refetchInterval:5e3})}function eme(){return nr({queryKey:Le.queueNames,queryFn:({signal:e})=>ot.getQueueNames(e),staleTime:6e4})}function S2(){return nr({queryKey:Le.queues,queryFn:({signal:e})=>ot.getQueues(e),refetchInterval:5e3})}function tme(e){const{data:t}=S2();return j.useMemo(()=>t==null?void 0:t.find(n=>n.name===e),[t,e])}function DW(){return nr({queryKey:Le.metrics,queryFn:({signal:e})=>ot.getMetrics(e),refetchInterval:3e4})}function nme(){return nr({queryKey:Le.activity,queryFn:({signal:e})=>ot.getActivityStats(e),refetchInterval:3e4})}function rme(e,t,n){return l7({queryKey:Le.jobs(e,t,n),queryFn:({pageParam:r})=>ot.getJobs(e,{status:t,limit:50,cursor:r,sort:n}),getNextPageParam:r=>r.cursor,initialPageParam:void 0,refetchInterval:5e3})}function ime(e,t){return nr({queryKey:Le.job(e,t),queryFn:()=>ot.getJob(e,t),refetchInterval:5e3})}function ame(e,t,n){return nr({queryKey:Le.jobLogs(e,t),queryFn:()=>ot.getJobLogs(e,t),enabled:(n==null?void 0:n.enabled)??!0,refetchInterval:n!=null&&n.pollWhileActive?5e3:!1})}function ome(e,t){return l7({queryKey:Le.runs(e,t),queryFn:({pageParam:n,signal:r})=>ot.getRuns({limit:30,cursor:n,sort:e,...t},r),getNextPageParam:n=>n.cursor,initialPageParam:void 0,refetchInterval:5e3,staleTime:3e3})}function sme(e){return nr({queryKey:Le.schedulers.repeatable(e),queryFn:()=>ot.getRepeatableSchedulers(e),refetchInterval:5e3})}function lme(e){return nr({queryKey:Le.schedulers.delayed(e),queryFn:()=>ot.getDelayedSchedulers(e),refetchInterval:5e3})}function cme(e){return nr({queryKey:Le.search(e),queryFn:()=>ot.search(e),enabled:e.trim().length>0,staleTime:1e3*30})}function IW(e,t=!0){return nr({queryKey:Le.tagValues(e),queryFn:()=>ot.getTagValues(e),enabled:t&&e.length>0,staleTime:1e3*60})}function _2(){const e=nn();return Dn({mutationFn:()=>ot.refresh(),onSuccess:()=>{e.invalidateQueries()}})}function ume(){const e=nn();return Dn({mutationFn:({queueName:t,jobId:n})=>ot.retryJob(t,n),onSuccess:(t,{queueName:n,jobId:r})=>{e.invalidateQueries({queryKey:Le.job(n,r)}),e.invalidateQueries({queryKey:Le.jobsAll(n)}),e.invalidateQueries({queryKey:Le.runsAll})}})}function fme(){const e=nn();return Dn({mutationFn:({queueName:t,jobId:n})=>ot.removeJob(t,n),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:Le.jobsAll(n)}),e.invalidateQueries({queryKey:Le.runsAll}),e.invalidateQueries({queryKey:Le.queues})}})}function dme(){const e=nn();return Dn({mutationFn:({queueName:t,jobId:n})=>ot.promoteJob(t,n),onSuccess:(t,{queueName:n,jobId:r})=>{e.invalidateQueries({queryKey:Le.job(n,r)}),e.invalidateQueries({queryKey:Le.jobsAll(n)}),e.invalidateQueries({queryKey:Le.runsAll}),e.invalidateQueries({queryKey:Le.schedulers.all})}})}function hme(){const e=nn();return Dn({mutationFn:({queueName:t,schedulerKey:n})=>ot.runScheduler(t,n),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:Le.jobsAll(n)}),e.invalidateQueries({queryKey:Le.runsAll}),e.invalidateQueries({queryKey:Le.queues})}})}function pme(){const e=nn();return Dn({mutationFn:t=>ot.testJob(t),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:Le.jobsAll(n)}),e.invalidateQueries({queryKey:Le.runsAll}),e.invalidateQueries({queryKey:Le.queues})}})}function mme(){const e=nn();return Dn({mutationFn:({queueName:t,status:n,grace:r})=>ot.cleanQueue(t,n,r),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:Le.jobsAll(n)}),e.invalidateQueries({queryKey:Le.runsAll}),e.invalidateQueries({queryKey:Le.queues}),e.invalidateQueries({queryKey:Le.overview})}})}function LW(){const e=nn();return Dn({mutationFn:({jobs:t})=>ot.bulkRetry(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.runsAll}),e.invalidateQueries({queryKey:Le.queues})}})}function $W(){const e=nn();return Dn({mutationFn:({jobs:t})=>ot.bulkDelete(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.runsAll}),e.invalidateQueries({queryKey:Le.queues})}})}function BW(){const e=nn();return Dn({mutationFn:({jobs:t})=>ot.bulkPromote(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.runsAll}),e.invalidateQueries({queryKey:Le.queues}),e.invalidateQueries({queryKey:Le.schedulers.all})}})}function gme(){const e=nn();return Dn({mutationFn:t=>ot.pauseQueue(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.queues})}})}function vme(){const e=nn();return Dn({mutationFn:t=>ot.resumeQueue(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.queues})}})}function yme(){return nr({queryKey:Le.flows,queryFn:({signal:e})=>ot.getFlows(void 0,e),refetchInterval:5e3})}function bme(e,t){return nr({queryKey:Le.flow(e,t),queryFn:()=>ot.getFlow(e,t),enabled:!!e&&!!t,retry:!1,refetchInterval:5e3})}function xme(){return nr({queryKey:Le.alerts.status,queryFn:()=>ot.getAlertStatus(),refetchInterval:1e4,retry:!1})}function wme(){return nr({queryKey:Le.alerts.contactPoints,queryFn:()=>ot.getAlertContactPoints(),retry:!1})}function Sme(){return nr({queryKey:Le.alerts.rules,queryFn:()=>ot.getAlertRules(),retry:!1})}function _me(){const e=nn();return Dn({mutationFn:t=>ot.createAlertContactPoint(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.alerts.contactPoints})}})}function Eme(){const e=nn();return Dn({mutationFn:({id:t,...n})=>ot.updateAlertContactPoint(t,n),onSuccess:()=>{e.invalidateQueries({queryKey:Le.alerts.contactPoints})}})}function Ame(){const e=nn();return Dn({mutationFn:t=>ot.deleteAlertContactPoint(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.alerts.contactPoints}),e.invalidateQueries({queryKey:Le.alerts.rules})}})}function Cme(){const e=nn();return Dn({mutationFn:t=>ot.testAlertContactPoint(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.alerts.status})}})}function Tme(){const e=nn();return Dn({mutationFn:t=>ot.createAlertRule(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.alerts.rules})}})}function jme(){const e=nn();return Dn({mutationFn:({id:t,...n})=>ot.updateAlertRule(t,n),onSuccess:()=>{e.invalidateQueries({queryKey:Le.alerts.rules})}})}function Nme(){const e=nn();return Dn({mutationFn:t=>ot.deleteAlertRule(t),onSuccess:()=>{e.invalidateQueries({queryKey:Le.alerts.rules})}})}const qW="https://cdn-may.com/assets/may-square-512x512.png",zW="May/BarberFlow",Ome=[{id:"overview",title:"Overview",icon:LK},{id:"runs",title:"Runs",icon:om},{id:"metrics",title:"Metrics",icon:DK},{id:"schedulers",title:"Schedulers",icon:Pi},{id:"flows",title:"Flows",icon:Hc},{id:"alerts",title:"Alerts",icon:am},{id:"test",title:"Test",icon:f2}];function Mme({queues:e,queueGroups:t=[],pausedQueues:n=new Set,activeNav:r,activeQueue:i,onNavSelect:a,onQueueSelect:o,isDark:s,onToggleTheme:c,title:f=zW,logo:h=qW}){const{setOpen:d,state:m}=Tg(),v=j.useMemo(()=>kme(e,t),[e,t]);return g.jsxs("aside",{className:ge("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",m==="collapsed"?"w-12":"w-64"),"data-state":m,"data-collapsible":m==="collapsed"?"icon":"","data-variant":"sidebar","data-side":"left",children:[g.jsxs(TW,{className:"h-14 flex-row items-center gap-2 border-b border-sidebar-border",children:[g.jsx(Gb,{children:g.jsx(cm,{children:g.jsxs(w2,{size:"lg",tooltip:f,onClick:()=>a("overview"),className:"h-10",children:[g.jsx("img",{src:h,alt:f,className:"size-8 shrink-0"}),g.jsxs("span",{className:"grid min-w-0 flex-1 leading-tight group-data-[collapsible=icon]:hidden",children:[g.jsx("span",{className:"truncate text-sm font-semibold",children:f}),g.jsx("span",{className:"truncate text-xs text-muted-foreground",children:"BullMQ Dashboard"})]})]})})}),g.jsx("div",{className:"group-data-[collapsible=icon]:hidden",children:g.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:g.jsx(she,{className:"size-4"})})})]}),g.jsxs(OW,{children:[g.jsx(fB,{label:"Monitor",children:Ome.map(x=>g.jsx(tE,{icon:x.icon,label:x.title,active:r===x.id,onClick:()=>a(x.id)},x.id))}),g.jsx(NW,{}),g.jsxs(fB,{label:"Queues",children:[g.jsx(tE,{icon:d2,label:"All Queues",active:r==="queues"&&!i,onClick:()=>a("queues")}),v.map(x=>g.jsx(Rme,{group:x,activeQueue:i,pausedQueues:n,onQueueSelect:o},x.name))]})]}),g.jsx(jW,{className:"border-t border-sidebar-border",children:g.jsx(Gb,{children:g.jsx(tE,{icon:s?zK:BK,label:s?"Light mode":"Dark mode",onClick:c})})}),g.jsx(AW,{})]})}function fB({label:e,children:t}){return g.jsxs(MW,{children:[g.jsx(RW,{children:e}),g.jsx(PW,{children:g.jsx(Gb,{children:t})})]})}function tE({icon:e,label:t,active:n,onClick:r}){return g.jsx(cm,{children:g.jsxs(w2,{type:"button",onClick:r,isActive:n,tooltip:t,className:"h-9",children:[g.jsx(e,{className:"size-4 shrink-0"}),g.jsx("span",{children:t})]})})}function Rme({group:e,activeQueue:t,pausedQueues:n,onQueueSelect:r}){return g.jsxs(g.Fragment,{children:[g.jsx(cm,{className:"group-data-[collapsible=icon]:hidden",children:g.jsxs("div",{className:"flex h-8 items-center gap-2 px-2 text-sm font-medium",children:[g.jsx(nhe,{className:"size-4 shrink-0 text-muted-foreground"}),g.jsx("span",{className:"truncate",children:e.name})]})}),g.jsx(cm,{className:"group-data-[collapsible=icon]:hidden",children:g.jsx("div",{className:"ml-4 border-l border-sidebar-border pl-2",children:e.queues.map(i=>g.jsx(Pme,{queue:i,active:t===i,paused:n.has(i),onClick:()=>r(i)},i))})})]})}function Pme({queue:e,active:t,paused:n,onClick:r}){const i=tme(e),a=(i==null?void 0:i.counts.active)||0,o=(i==null?void 0:i.counts.failed)||0;return g.jsxs("button",{type:"button",onClick:r,className:ge("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:[g.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:e}),g.jsxs("span",{className:"flex shrink-0 items-center gap-1",children:[a>0&&g.jsx("span",{className:"font-mono text-[10px] text-chart-2",children:a}),o>0&&g.jsx("span",{className:"font-mono text-[10px] text-destructive",children:o}),n&&g.jsx("span",{className:"size-1.5 bg-amber-500"}),!n&&a===0&&o===0&&g.jsx(u2,{className:"size-3 text-muted-foreground"})]})]})}function kme(e,t){const n=new Set(e),r=new Set,i=t.map(o=>{const s=o.queues.filter(c=>n.has(c));for(const c of s)r.add(c);return{name:o.name,queues:s}}).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 dB=[{value:"all",label:"All statuses"},{value:"active",label:"Active"},{value:"waiting",label:"Waiting"},{value:"waiting-children",label:"Waiting Children"},{value:"prioritized",label:"Prioritized"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"delayed",label:"Delayed"}];function E2(e){const t={},n=[],r=/(\w+):(?:"([^"]+)"|(\S+))/g;let i=0,a;for(;a=r.exec(e),!!a;){if(a.index>i){const c=e.slice(i,a.index).trim();c&&n.push(c)}const o=a[1],s=a[2]||a[3];o==="status"||(t[o]=s),i=r.lastIndex}if(i<e.length){const o=e.slice(i).trim();o&&n.push(o)}return{tags:t,text:n.join(" ")}}function Dme(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 Ime({value:e,status:t,onChange:n,className:r}){const{data:i}=fu(),[a,o]=j.useState(e),[s,c]=j.useState(!1),[f,h]=j.useState(0),d=j.useRef(null),m=j.useRef(null),v=(i==null?void 0:i.tags)??[],x="Search runs...",{currentToken:w,tokenType:b,tokenPrefix:S}=j.useMemo(()=>{var G;const I=((G=d.current)==null?void 0:G.selectionStart)??a.length,q=a.slice(0,I),k=q.lastIndexOf(" "),z=q.slice(k+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:_}=IW(E??"",!!E),A=(_==null?void 0:_.values)??[],C=j.useMemo(()=>{const I=[];if(b==="key"&&w){const q=w.toLowerCase();for(const k of v)k.toLowerCase().startsWith(q)&&I.push({type:"key",label:`${k}:`,value:`${k}:`});"status".startsWith(q)&&I.push({type:"key",label:"status:",value:"status:"});for(const k of dB)k.value!=="all"&&(k.value.toLowerCase().startsWith(q)||k.label.toLowerCase().startsWith(q))&&I.push({type:"status",label:`status:${k.value}`,value:`status:${k.value}`})}else if(b==="value"&&S){const{key:q,valuePrefix:k}=S,z=k.toLowerCase();if(q==="status")for(const H of dB)H.value!=="all"&&H.value.toLowerCase().startsWith(z)&&I.push({type:"status",label:H.label,value:H.value});else for(const H of A)H.value.toLowerCase().startsWith(z)&&I.push({type:"value",label:`${H.value} (${H.count})`,value:H.value})}else if(!w){for(const q of v.slice(0,4))I.push({type:"key",label:`${q}:`,value:`${q}:`});v.includes("status")||I.push({type:"key",label:"status:",value:"status:"})}return I.slice(0,8)},[w,b,S,v,A,a]),N=j.useMemo(()=>E2(a),[a]),M=I=>{o(I.target.value),c(!0),h(0)},R=I=>{var V,X;const q=((V=d.current)==null?void 0:V.selectionStart)??a.length,k=a.slice(0,q),z=a.slice(q),G=k.lastIndexOf(" ")+1;let Q,U=t;if(I.type==="status")U=I.value.replace("status:",""),Q=k.slice(0,G)+z.trimStart();else if(I.type==="key")Q=k.slice(0,G)+I.value+z;else{const W=(S==null?void 0:S.key)??"";Q=`${k.slice(0,G)}${W}:${I.value}${z.startsWith(" ")?z:` ${z.trimStart()}`}`}o(Q.trim()),c(!1),n(Q.trim(),U),(X=d.current)==null||X.focus()},P=I=>{if(!s||C.length===0){I.key==="Enter"&&(I.preventDefault(),n(a,t));return}switch(I.key){case"ArrowDown":I.preventDefault(),h(q=>(q+1)%C.length);break;case"ArrowUp":I.preventDefault(),h(q=>(q-1+C.length)%C.length);break;case"Enter":case"Tab":I.preventDefault(),R(C[f]);break;case"Escape":c(!1);break}},$=I=>{const q={...N};delete q.tags[I];const k=Dme(q);o(k),n(k,t)},L=()=>{n(a,"all")};j.useEffect(()=>{e!==a&&o(e)},[e]),j.useEffect(()=>{const I=q=>{m.current&&!m.current.contains(q.target)&&c(!1)};return document.addEventListener("mousedown",I),()=>document.removeEventListener("mousedown",I)},[]);const D=Object.keys(N.tags).length>0||t&&t!=="all",F=()=>{c(!1),n(a,t)};return g.jsxs("div",{className:ge("space-y-2",r),children:[g.jsxs("div",{ref:m,className:"relative",children:[g.jsxs("div",{className:"relative",children:[g.jsx(sm,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),g.jsx("input",{ref:d,type:"text",value:a,onChange:M,onKeyDown:P,onFocus:()=>c(!0),placeholder:x,className:"h-9 w-full border bg-transparent pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:outline-none"})]}),s&&g.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:[g.jsxs("button",{type:"button",onClick:F,className:ge("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:[g.jsx("span",{children:"Confirm search"}),g.jsx("span",{className:"text-muted-foreground",children:"↵"})]}),C.length>0&&g.jsx("div",{className:"flex flex-wrap gap-2 p-3",children:C.map((I,q)=>g.jsx("button",{type:"button",onClick:()=>R(I),className:ge(" 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:I.label},`${I.type}-${I.value}`))})]})]}),D&&g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t&&t!=="all"&&g.jsxs("button",{type:"button",onClick:L,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:[g.jsxs("span",{className:"font-mono",children:["status:",t]}),g.jsx(lm,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]}),Object.entries(N.tags).map(([I,q])=>g.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:[g.jsxs("span",{className:"font-mono",children:[I,":",q.length>16?`${q.slice(0,16)}...`:q]}),g.jsx(lm,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},I)),g.jsx("button",{type:"button",onClick:()=>{o(""),n("","all")},className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]})]})}var hB=1,Lme=.9,$me=.8,Bme=.17,nE=.1,rE=.999,qme=.9999,zme=.99,Fme=/[\\\/_+.#"@\[\(\{&]/,Vme=/[\\\/_+.#"@\[\(\{&]/g,Ume=/[\s-]/,FW=/[\s-]/g;function wM(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?hB:zme;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),f=n.indexOf(c,i),h=0,d,m,v,x;f>=0;)d=wM(e,t,n,r,f+1,a+1,o),d>h&&(f===i?d*=hB:Fme.test(e.charAt(f-1))?(d*=$me,v=e.slice(i,f-1).match(Vme),v&&i>0&&(d*=Math.pow(rE,v.length))):Ume.test(e.charAt(f-1))?(d*=Lme,x=e.slice(i,f-1).match(FW),x&&i>0&&(d*=Math.pow(rE,x.length))):(d*=Bme,i>0&&(d*=Math.pow(rE,f-i))),e.charAt(f)!==t.charAt(a)&&(d*=qme)),(d<nE&&n.charAt(f-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(f-1)!==r.charAt(a))&&(m=wM(e,t,n,r,f+1,a+2,o),m*nE>d&&(d=m*nE)),d>h&&(h=d),f=n.indexOf(c,f+1);return o[s]=h,h}function pB(e){return e.toLowerCase().replace(FW," ")}function Hme(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,wM(e,t,pB(e),pB(t),0,0,{})}var dp='[cmdk-group=""]',iE='[cmdk-group-items=""]',Gme='[cmdk-group-heading=""]',VW='[cmdk-item=""]',mB=`${VW}:not([aria-disabled="true"])`,SM="cmdk-item-select",pf="data-value",Kme=(e,t,n)=>Hme(e,t,n),UW=j.createContext(void 0),jg=()=>j.useContext(UW),HW=j.createContext(void 0),A2=()=>j.useContext(HW),GW=j.createContext(void 0),KW=j.forwardRef((e,t)=>{let n=mf(()=>{var V,X;return{search:"",value:(X=(V=e.value)!=null?V:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=mf(()=>new Set),i=mf(()=>new Map),a=mf(()=>new Map),o=mf(()=>new Set),s=WW(e),{label:c,children:f,value:h,onValueChange:d,filter:m,shouldFilter:v,loop:x,disablePointerSelection:w=!1,vimBindings:b=!0,...S}=e,E=Hn(),_=Hn(),A=Hn(),C=j.useRef(null),N=ige();Kc(()=>{if(h!==void 0){let V=h.trim();n.current.value=V,M.emit()}},[h]),Kc(()=>{N(6,F)},[]);let M=j.useMemo(()=>({subscribe:V=>(o.current.add(V),()=>o.current.delete(V)),snapshot:()=>n.current,setState:(V,X,W)=>{var K,J,ee,te;if(!Object.is(n.current[V],X)){if(n.current[V]=X,V==="search")D(),$(),N(1,L);else if(V==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ne=document.getElementById(A);ne?ne.focus():(K=document.getElementById(E))==null||K.focus()}if(N(7,()=>{var ne;n.current.selectedItemId=(ne=I())==null?void 0:ne.id,M.emit()}),W||N(5,F),((J=s.current)==null?void 0:J.value)!==void 0){let ne=X??"";(te=(ee=s.current).onValueChange)==null||te.call(ee,ne);return}}M.emit()}},emit:()=>{o.current.forEach(V=>V())}}),[]),R=j.useMemo(()=>({value:(V,X,W)=>{var K;X!==((K=a.current.get(V))==null?void 0:K.value)&&(a.current.set(V,{value:X,keywords:W}),n.current.filtered.items.set(V,P(X,W)),N(2,()=>{$(),M.emit()}))},item:(V,X)=>(r.current.add(V),X&&(i.current.has(X)?i.current.get(X).add(V):i.current.set(X,new Set([V]))),N(3,()=>{D(),$(),n.current.value||L(),M.emit()}),()=>{a.current.delete(V),r.current.delete(V),n.current.filtered.items.delete(V);let W=I();N(4,()=>{D(),(W==null?void 0:W.getAttribute("id"))===V&&L(),M.emit()})}),group:V=>(i.current.has(V)||i.current.set(V,new Set),()=>{a.current.delete(V),i.current.delete(V)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:E,inputId:A,labelId:_,listInnerRef:C}),[]);function P(V,X){var W,K;let J=(K=(W=s.current)==null?void 0:W.filter)!=null?K:Kme;return V?J(V,n.current.search,X):0}function $(){if(!n.current.search||s.current.shouldFilter===!1)return;let V=n.current.filtered.items,X=[];n.current.filtered.groups.forEach(K=>{let J=i.current.get(K),ee=0;J.forEach(te=>{let ne=V.get(te);ee=Math.max(ne,ee)}),X.push([K,ee])});let W=C.current;q().sort((K,J)=>{var ee,te;let ne=K.getAttribute("id"),se=J.getAttribute("id");return((ee=V.get(se))!=null?ee:0)-((te=V.get(ne))!=null?te:0)}).forEach(K=>{let J=K.closest(iE);J?J.appendChild(K.parentElement===J?K:K.closest(`${iE} > *`)):W.appendChild(K.parentElement===W?K:K.closest(`${iE} > *`))}),X.sort((K,J)=>J[1]-K[1]).forEach(K=>{var J;let ee=(J=C.current)==null?void 0:J.querySelector(`${dp}[${pf}="${encodeURIComponent(K[0])}"]`);ee==null||ee.parentElement.appendChild(ee)})}function L(){let V=q().find(W=>W.getAttribute("aria-disabled")!=="true"),X=V==null?void 0:V.getAttribute(pf);M.setState("value",X||void 0)}function D(){var V,X,W,K;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let J=0;for(let ee of r.current){let te=(X=(V=a.current.get(ee))==null?void 0:V.value)!=null?X:"",ne=(K=(W=a.current.get(ee))==null?void 0:W.keywords)!=null?K:[],se=P(te,ne);n.current.filtered.items.set(ee,se),se>0&&J++}for(let[ee,te]of i.current)for(let ne of te)if(n.current.filtered.items.get(ne)>0){n.current.filtered.groups.add(ee);break}n.current.filtered.count=J}function F(){var V,X,W;let K=I();K&&(((V=K.parentElement)==null?void 0:V.firstChild)===K&&((W=(X=K.closest(dp))==null?void 0:X.querySelector(Gme))==null||W.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function I(){var V;return(V=C.current)==null?void 0:V.querySelector(`${VW}[aria-selected="true"]`)}function q(){var V;return Array.from(((V=C.current)==null?void 0:V.querySelectorAll(mB))||[])}function k(V){let X=q()[V];X&&M.setState("value",X.getAttribute(pf))}function z(V){var X;let W=I(),K=q(),J=K.findIndex(te=>te===W),ee=K[J+V];(X=s.current)!=null&&X.loop&&(ee=J+V<0?K[K.length-1]:J+V===K.length?K[0]:K[J+V]),ee&&M.setState("value",ee.getAttribute(pf))}function H(V){let X=I(),W=X==null?void 0:X.closest(dp),K;for(;W&&!K;)W=V>0?nge(W,dp):rge(W,dp),K=W==null?void 0:W.querySelector(mB);K?M.setState("value",K.getAttribute(pf)):z(V)}let G=()=>k(q().length-1),Q=V=>{V.preventDefault(),V.metaKey?G():V.altKey?H(1):z(1)},U=V=>{V.preventDefault(),V.metaKey?k(0):V.altKey?H(-1):z(-1)};return j.createElement(Zo.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:V=>{var X;(X=S.onKeyDown)==null||X.call(S,V);let W=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||W))switch(V.key){case"n":case"j":{b&&V.ctrlKey&&Q(V);break}case"ArrowDown":{Q(V);break}case"p":case"k":{b&&V.ctrlKey&&U(V);break}case"ArrowUp":{U(V);break}case"Home":{V.preventDefault(),k(0);break}case"End":{V.preventDefault(),G();break}case"Enter":{V.preventDefault();let K=I();if(K){let J=new Event(SM);K.dispatchEvent(J)}}}}},j.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:oge},c),H0(e,V=>j.createElement(HW.Provider,{value:M},j.createElement(UW.Provider,{value:R},V))))}),Wme=j.forwardRef((e,t)=>{var n,r;let i=Hn(),a=j.useRef(null),o=j.useContext(GW),s=jg(),c=WW(e),f=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;Kc(()=>{if(!f)return s.item(i,o==null?void 0:o.id)},[f]);let h=YW(i,a,[e.value,e.children,a],e.keywords),d=A2(),m=Tl(N=>N.value&&N.value===h.current),v=Tl(N=>f||s.filter()===!1?!0:N.search?N.filtered.items.get(i)>0:!0);j.useEffect(()=>{let N=a.current;if(!(!N||e.disabled))return N.addEventListener(SM,x),()=>N.removeEventListener(SM,x)},[v,e.onSelect,e.disabled]);function x(){var N,M;w(),(M=(N=c.current).onSelect)==null||M.call(N,h.current)}function w(){d.setState("value",h.current,!0)}if(!v)return null;let{disabled:b,value:S,onSelect:E,forceMount:_,keywords:A,...C}=e;return j.createElement(Zo.div,{ref:za(a,t),...C,id:i,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!m,"data-disabled":!!b,"data-selected":!!m,onPointerMove:b||s.getDisablePointerSelection()?void 0:w,onClick:b?void 0:x},e.children)}),Yme=j.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=Hn(),s=j.useRef(null),c=j.useRef(null),f=Hn(),h=jg(),d=Tl(v=>i||h.filter()===!1?!0:v.search?v.filtered.groups.has(o):!0);Kc(()=>h.group(o),[]),YW(o,s,[e.value,e.heading,c]);let m=j.useMemo(()=>({id:o,forceMount:i}),[i]);return j.createElement(Zo.div,{ref:za(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&j.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),H0(e,v=>j.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},j.createElement(GW.Provider,{value:m},v))))}),Xme=j.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=j.useRef(null),a=Tl(o=>!o.search);return!n&&!a?null:j.createElement(Zo.div,{ref:za(i,t),...r,"cmdk-separator":"",role:"separator"})}),Qme=j.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=A2(),o=Tl(f=>f.search),s=Tl(f=>f.selectedItemId),c=jg();return j.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),j.createElement(Zo.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:i?e.value:o,onChange:f=>{i||a.setState("search",f.target.value),n==null||n(f.target.value)}})}),Zme=j.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=j.useRef(null),o=j.useRef(null),s=Tl(f=>f.selectedItemId),c=jg();return j.useEffect(()=>{if(o.current&&a.current){let f=o.current,h=a.current,d,m=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let v=f.offsetHeight;h.style.setProperty("--cmdk-list-height",v.toFixed(1)+"px")})});return m.observe(f),()=>{cancelAnimationFrame(d),m.unobserve(f)}}},[]),j.createElement(Zo.div,{ref:za(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},H0(e,f=>j.createElement("div",{ref:za(o,c.listInnerRef),"cmdk-list-sizer":""},f)))}),Jme=j.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return j.createElement(F0,{open:n,onOpenChange:r},j.createElement(V0,{container:o},j.createElement(Hd,{"cmdk-overlay":"",className:i}),j.createElement(Gd,{"aria-label":e.label,"cmdk-dialog":"",className:a},j.createElement(KW,{ref:t,...s}))))}),ege=j.forwardRef((e,t)=>Tl(n=>n.filtered.count===0)?j.createElement(Zo.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),tge=j.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return j.createElement(Zo.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},H0(e,o=>j.createElement("div",{"aria-hidden":!0},o)))}),qr=Object.assign(KW,{List:Zme,Item:Wme,Input:Qme,Group:Yme,Separator:Xme,Dialog:Jme,Empty:ege,Loading:tge});function nge(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function rge(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function WW(e){let t=j.useRef(e);return Kc(()=>{t.current=e}),t}var Kc=typeof window>"u"?j.useEffect:j.useLayoutEffect;function mf(e){let t=j.useRef();return t.current===void 0&&(t.current=e()),t}function Tl(e){let t=A2(),n=()=>e(t.snapshot());return j.useSyncExternalStore(t.subscribe,n,n)}function YW(e,t,n,r=[]){let i=j.useRef(),a=jg();return Kc(()=>{var o;let s=(()=>{var f;for(let h of n){if(typeof h=="string")return h.trim();if(typeof h=="object"&&"current"in h)return h.current?(f=h.current.textContent)==null?void 0:f.trim():i.current}})(),c=r.map(f=>f.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(pf,s),i.current=s}),i}var ige=()=>{let[e,t]=j.useState(),n=mf(()=>new Map);return Kc(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function age(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function H0({asChild:e,children:t},n){return e&&j.isValidElement(t)?j.cloneElement(age(t),{ref:t.ref},n(t.props.children)):n(t)}var oge={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const G0=F0,sge=V0,XW=j.forwardRef(({className:e,...t},n)=>g.jsx(Hd,{ref:n,className:ge("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}));XW.displayName=Hd.displayName;const Ng=j.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(sge,{children:[g.jsx(XW,{}),g.jsxs(Gd,{ref:r,className:ge("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,g.jsxs(U0,{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:[g.jsx(lm,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ng.displayName=Gd.displayName;const K0=({className:e,...t})=>g.jsx("div",{className:ge("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});K0.displayName="DialogHeader";const W0=({className:e,...t})=>g.jsx("div",{className:ge("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});W0.displayName="DialogFooter";const Y0=j.forwardRef(({className:e,...t},n)=>g.jsx(Ag,{ref:n,className:ge("text-lg font-semibold leading-none tracking-tight",e),...t}));Y0.displayName=Ag.displayName;const QW=j.forwardRef(({className:e,...t},n)=>g.jsx(Cg,{ref:n,className:ge("text-sm text-muted-foreground",e),...t}));QW.displayName=Cg.displayName;const ZW=j.forwardRef(({className:e,...t},n)=>g.jsx(qr,{ref:n,className:ge("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}));ZW.displayName=qr.displayName;const lge=({children:e,...t})=>g.jsx(G0,{...t,children:g.jsx(Ng,{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:g.jsx(ZW,{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})})}),JW=j.forwardRef(({className:e,...t},n)=>g.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[g.jsx(sm,{className:"mr-2 h-4 w-4 shrink-0 text-foreground/60"}),g.jsx(qr.Input,{ref:n,className:ge("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})]}));JW.displayName=qr.Input.displayName;const eY=j.forwardRef(({className:e,...t},n)=>g.jsx(qr.List,{ref:n,className:ge("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));eY.displayName=qr.List.displayName;const tY=j.forwardRef((e,t)=>g.jsx(qr.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));tY.displayName=qr.Empty.displayName;const lc=j.forwardRef(({className:e,...t},n)=>g.jsx(qr.Group,{ref:n,className:ge("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}));lc.displayName=qr.Group.displayName;const nY=j.forwardRef(({className:e,...t},n)=>g.jsx(qr.Separator,{ref:n,className:ge("-mx-1 h-px bg-border",e),...t}));nY.displayName=qr.Separator.displayName;const Us=j.forwardRef(({className:e,...t},n)=>g.jsx(qr.Item,{ref:n,className:ge("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}));Us.displayName=qr.Item.displayName;const gB=[{id:"overview",label:"Overview",path:"/",icon:g.jsx(LK,{className:"h-4 w-4"}),keywords:["overview","home","dashboard","command center"]},{id:"runs",label:"Runs",path:"/runs",icon:g.jsx(Uc,{className:"h-4 w-4"}),keywords:["runs","jobs","all"]},{id:"metrics",label:"Metrics",path:"/metrics",icon:g.jsx(DK,{className:"h-4 w-4"}),keywords:["metrics","stats","analytics","dashboard"]},{id:"schedulers",label:"Schedulers",path:"/schedulers",icon:g.jsx(Xde,{className:"h-4 w-4"}),keywords:["schedulers","scheduled","cron","repeatable","delayed"]},{id:"flows",label:"Flows",path:"/flows",icon:g.jsx(Hc,{className:"h-4 w-4"}),keywords:["flows","workflows","graph"]},{id:"alerts",label:"Alerts",path:"/alerts",icon:g.jsx(am,{className:"h-4 w-4"}),keywords:["alerts","notifications","slack","webhook"]},{id:"test",label:"Test",path:"/test",icon:g.jsx(f2,{className:"h-4 w-4"}),keywords:["test","testing","try"]}];function cge({open:e,onOpenChange:t,queues:n,searchQuery:r,onSearchQueryChange:i,isDark:a,onToggleTheme:o,onSelectQueue:s,onSelectJob:c,onNavigate:f}){const{data:h}=fu(),[d,m]=j.useState(r),v=(h==null?void 0:h.tags)??[];j.useEffect(()=>{e&&m(r)},[e,r]);const x=D=>{m(D),i(D)};j.useMemo(()=>E2(d),[d]);const{currentToken:w,tokenType:b,tokenPrefix:S}=j.useMemo(()=>{const D=d.length,F=d.slice(0,D),I=F.lastIndexOf(" "),q=F.slice(I+1),k=q.indexOf(":");if(k>0){const z=q.slice(0,k),H=q.slice(k+1);return{currentToken:q,tokenType:"value",tokenPrefix:{key:z,valuePrefix:H}}}return{currentToken:q,tokenType:"key",tokenPrefix:null}},[d]),E=b==="value"?S==null?void 0:S.key:void 0,{data:_}=IW(E??"",!!E&&v.includes(E??"")),A=(_==null?void 0:_.values)??[],{data:C,isLoading:N}=cme(d),M=(C==null?void 0:C.results)??[],R=j.useMemo(()=>{if(!d.trim())return gB;const D=d.toLowerCase();return gB.filter(F=>F.label.toLowerCase().includes(D)||F.keywords.some(I=>I.toLowerCase().includes(D)))},[d]),P=j.useMemo(()=>{if(!d.trim())return n;const D=d.toLowerCase();return n.filter(F=>F.toLowerCase().includes(D))},[d,n]),$=j.useMemo(()=>b!=="key"||!w?[]:v.filter(D=>D.toLowerCase().startsWith(w.toLowerCase())),[b,w,v]),L=j.useMemo(()=>{if(b!=="value"||!S)return[];const D=S.valuePrefix.toLowerCase();return A.filter(F=>F.value.toLowerCase().startsWith(D)).slice(0,10)},[b,S,A]);return R.length>0||P.length>0||M.length>0||$.length>0||L.length>0,g.jsxs(lge,{open:e,onOpenChange:t,children:[g.jsx(JW,{placeholder:"Search jobs, queues, tags, or navigate...",value:d,onValueChange:x}),g.jsxs(eY,{children:[g.jsx(tY,{children:N?"Searching...":"No results found."}),$.length>0&&g.jsx(lc,{heading:"Tag Fields",children:$.map(D=>g.jsxs(Us,{value:`tag-key-${D}`,onSelect:()=>{const F=d.replace(w,`${D}:`);x(F)},children:[g.jsx(sm,{className:"mr-2 h-4 w-4"}),g.jsxs("span",{className:"font-mono",children:[D,":"]}),g.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"tag field"})]},D))}),L.length>0&&g.jsx(lc,{heading:`${S==null?void 0:S.key} values`,children:L.map(D=>{const F=`${S==null?void 0:S.key}:${D.value}`;return g.jsxs(Us,{value:`tag-value-${D.value}`,onSelect:()=>{const q=`${d.slice(0,d.lastIndexOf(w))}${F} `.trim();x(q)},children:[g.jsx(sm,{className:"mr-2 h-4 w-4"}),g.jsx("span",{className:"font-mono",children:F}),D.count>0&&g.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:[D.count," jobs"]})]},D.value)})}),R.length>0&&g.jsx(lc,{heading:"Navigation",children:R.map(D=>g.jsxs(Us,{value:`nav-${D.id}`,onSelect:()=>{f(D.path),t(!1)},children:[D.icon,g.jsx("span",{children:D.label}),g.jsx(Wde,{className:"ml-auto h-4 w-4 text-muted-foreground"})]},D.id))}),P.length>0&&g.jsx(lc,{heading:"Queues",children:P.map(D=>g.jsxs(Us,{value:`queue-${D}`,onSelect:()=>{s(D),t(!1)},children:[g.jsx(d2,{className:"mr-2 h-4 w-4"}),g.jsx("span",{className:"font-mono",children:D})]},D))}),M.length>0&&g.jsx(lc,{heading:`Jobs (${M.length})`,children:M.map(D=>g.jsxs(Us,{value:`job-${D.job.id}`,onSelect:()=>{c(D.queue,D.job.id),t(!1)},children:[g.jsx(Uc,{className:"mr-2 h-4 w-4"}),g.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"font-medium",children:D.job.name}),g.jsx("span",{className:"text-xs text-muted-foreground",children:TK(D.job.timestamp)})]}),g.jsxs("span",{className:"truncate font-mono text-xs text-muted-foreground",children:[Lp(D.job.id,30)," · ",D.queue]})]}),g.jsx(uge,{status:D.job.status})]},`${D.queue}-${D.job.id}`))}),!d.trim()&&g.jsxs(g.Fragment,{children:[g.jsx(nY,{}),g.jsxs(lc,{heading:"Actions",children:[g.jsxs(Us,{value:"refresh",onSelect:()=>{window.location.reload()},children:[g.jsx(L0,{className:"mr-2 h-4 w-4"}),g.jsx("span",{children:"Refresh"}),g.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:[g.jsx("span",{className:"text-xs",children:"⌘"}),"R"]})]}),g.jsxs(Us,{value:"theme",onSelect:()=>{o()},children:[a?g.jsx(zK,{className:"mr-2 h-4 w-4"}):g.jsx(BK,{className:"mr-2 h-4 w-4"}),g.jsx("span",{children:"Toggle Theme"}),g.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:[g.jsx("span",{className:"text-xs",children:"⌘"}),"⇧T"]})]})]})]})]})]})}function uge({status:e}){const t={active:"bg-warning",waiting:"bg-muted-foreground","waiting-children":"bg-muted-foreground",prioritized:"bg-muted-foreground",completed:"bg-success",failed:"bg-destructive",delayed:"bg-muted-foreground"};return g.jsx("span",{className:`h-2 w-2 rounded-full ${t[e]||"bg-muted-foreground"}`})}function fge({value:e,onValueChange:t,onFocus:n,placeholder:r="Search anything...",className:i}){const a=j.useRef(null),o=s=>{(s.metaKey||s.ctrlKey)&&s.key==="k"&&(s.preventDefault(),n==null||n())};return g.jsxs("div",{className:ge("relative flex items-center",i),children:[g.jsx(sm,{className:"absolute left-2 h-4 w-4 text-foreground/60 pointer-events-none"}),g.jsx(ra,{ref:a,type:"text",value:e,onChange:s=>t(s.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"}),g.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:[g.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]})}function dge(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const hge=e=>{switch(e){case"success":return gge;case"info":return yge;case"warning":return vge;case"error":return bge;default:return null}},pge=Array(12).fill(0),mge=({visible:e,className:t})=>Z.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},Z.createElement("div",{className:"sonner-spinner"},pge.map((n,r)=>Z.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),gge=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Z.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),vge=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},Z.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),yge=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Z.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),bge=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},Z.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),xge=Z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},Z.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Z.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),wge=()=>{const[e,t]=Z.useState(document.hidden);return Z.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let _M=1;class Sge{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:_M++,o=this.toasts.find(c=>c.id===a),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),o?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...t,id:a,title:r}),{...c,...t,id:a,dismissible:s,title:r}):c):this.addToast({title:r,...i,dismissible:s,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,o;const s=i.then(async f=>{if(o=["resolve",f],Z.isValidElement(f))a=!1,this.create({id:r,type:"default",message:f});else if(Ege(f)&&!f.ok){a=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,x=typeof d=="object"&&!Z.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:m,...x})}else if(f instanceof Error){a=!1;const d=typeof n.error=="function"?await n.error(f):n.error,m=typeof n.description=="function"?await n.description(f):n.description,x=typeof d=="object"&&!Z.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:m,...x})}else if(n.success!==void 0){a=!1;const d=typeof n.success=="function"?await n.success(f):n.success,m=typeof n.description=="function"?await n.description(f):n.description,x=typeof d=="object"&&!Z.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:m,...x})}}).catch(async f=>{if(o=["reject",f],n.error!==void 0){a=!1;const h=typeof n.error=="function"?await n.error(f):n.error,d=typeof n.description=="function"?await n.description(f):n.description,v=typeof h=="object"&&!Z.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:d,...v})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((f,h)=>s.then(()=>o[0]==="reject"?h(o[1]):f(o[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||_M++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Pr=new Sge,_ge=(e,t)=>{const n=(t==null?void 0:t.id)||_M++;return Pr.addToast({title:e,...t,id:n}),n},Ege=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Age=_ge,Cge=()=>Pr.toasts,Tge=()=>Pr.getActiveToasts(),$p=Object.assign(Age,{success:Pr.success,info:Pr.info,warning:Pr.warning,error:Pr.error,custom:Pr.custom,message:Pr.message,promise:Pr.promise,dismiss:Pr.dismiss,loading:Pr.loading},{getHistory:Cge,getToasts:Tge});dge("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function My(e){return e.label!==void 0}const jge=3,Nge="24px",Oge="16px",vB=4e3,Mge=356,Rge=14,Pge=45,kge=200;function Aa(...e){return e.filter(Boolean).join(" ")}function Dge(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Ige=e=>{var t,n,r,i,a,o,s,c,f;const{invert:h,toast:d,unstyled:m,interacting:v,setHeights:x,visibleToasts:w,heights:b,index:S,toasts:E,expanded:_,removeToast:A,defaultRichColors:C,closeButton:N,style:M,cancelButtonStyle:R,actionButtonStyle:P,className:$="",descriptionClassName:L="",duration:D,position:F,gap:I,expandByDefault:q,classNames:k,icons:z,closeButtonAriaLabel:H="Close toast"}=e,[G,Q]=Z.useState(null),[U,V]=Z.useState(null),[X,W]=Z.useState(!1),[K,J]=Z.useState(!1),[ee,te]=Z.useState(!1),[ne,se]=Z.useState(!1),[ce,oe]=Z.useState(!1),[be,xe]=Z.useState(0),[we,Ae]=Z.useState(0),Ee=Z.useRef(d.duration||D||vB),rt=Z.useRef(null),Ve=Z.useRef(null),Pt=S===0,Ft=S+1<=w,Xe=d.type,ht=d.dismissible!==!1,Tt=d.className||"",We=d.descriptionClassName||"",Et=Z.useMemo(()=>b.findIndex(Fe=>Fe.toastId===d.id)||0,[b,d.id]),hn=Z.useMemo(()=>{var Fe;return(Fe=d.closeButton)!=null?Fe:N},[d.closeButton,N]),Tn=Z.useMemo(()=>d.duration||D||vB,[d.duration,D]),ya=Z.useRef(0),rr=Z.useRef(0),is=Z.useRef(0),zr=Z.useRef(null),[Ln,Ht]=F.split("-"),Fr=Z.useMemo(()=>b.reduce((Fe,Vt,gn)=>gn>=Et?Fe:Fe+Vt.height,0),[b,Et]),$n=wge(),dh=d.invert||h,$l=Xe==="loading";rr.current=Z.useMemo(()=>Et*I+Fr,[Et,Fr]),Z.useEffect(()=>{Ee.current=Tn},[Tn]),Z.useEffect(()=>{W(!0)},[]),Z.useEffect(()=>{const Fe=Ve.current;if(Fe){const Vt=Fe.getBoundingClientRect().height;return Ae(Vt),x(gn=>[{toastId:d.id,height:Vt,position:d.position},...gn]),()=>x(gn=>gn.filter(Bn=>Bn.toastId!==d.id))}},[x,d.id]),Z.useLayoutEffect(()=>{if(!X)return;const Fe=Ve.current,Vt=Fe.style.height;Fe.style.height="auto";const gn=Fe.getBoundingClientRect().height;Fe.style.height=Vt,Ae(gn),x(Bn=>Bn.find(Gt=>Gt.toastId===d.id)?Bn.map(Gt=>Gt.toastId===d.id?{...Gt,height:gn}:Gt):[{toastId:d.id,height:gn,position:d.position},...Bn])},[X,d.title,d.description,x,d.id,d.jsx,d.action,d.cancel]);const hi=Z.useCallback(()=>{J(!0),xe(rr.current),x(Fe=>Fe.filter(Vt=>Vt.toastId!==d.id)),setTimeout(()=>{A(d)},kge)},[d,A,x,rr]);Z.useEffect(()=>{if(d.promise&&Xe==="loading"||d.duration===1/0||d.type==="loading")return;let Fe;return _||v||$n?(()=>{if(is.current<ya.current){const Bn=new Date().getTime()-ya.current;Ee.current=Ee.current-Bn}is.current=new Date().getTime()})():(()=>{Ee.current!==1/0&&(ya.current=new Date().getTime(),Fe=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),hi()},Ee.current))})(),()=>clearTimeout(Fe)},[_,v,d,Xe,$n,hi]),Z.useEffect(()=>{d.delete&&(hi(),d.onDismiss==null||d.onDismiss.call(d,d))},[hi,d.delete]);function as(){var Fe;if(z!=null&&z.loading){var Vt;return Z.createElement("div",{className:Aa(k==null?void 0:k.loader,d==null||(Vt=d.classNames)==null?void 0:Vt.loader,"sonner-loader"),"data-visible":Xe==="loading"},z.loading)}return Z.createElement(mge,{className:Aa(k==null?void 0:k.loader,d==null||(Fe=d.classNames)==null?void 0:Fe.loader),visible:Xe==="loading"})}const os=d.icon||(z==null?void 0:z[Xe])||hge(Xe);var Qa,pi;return Z.createElement("li",{tabIndex:0,ref:Ve,className:Aa($,Tt,k==null?void 0:k.toast,d==null||(t=d.classNames)==null?void 0:t.toast,k==null?void 0:k.default,k==null?void 0:k[Xe],d==null||(n=d.classNames)==null?void 0:n[Xe]),"data-sonner-toast":"","data-rich-colors":(Qa=d.richColors)!=null?Qa:C,"data-styled":!(d.jsx||d.unstyled||m),"data-mounted":X,"data-promise":!!d.promise,"data-swiped":ce,"data-removed":K,"data-visible":Ft,"data-y-position":Ln,"data-x-position":Ht,"data-index":S,"data-front":Pt,"data-swiping":ee,"data-dismissible":ht,"data-type":Xe,"data-invert":dh,"data-swipe-out":ne,"data-swipe-direction":U,"data-expanded":!!(_||q&&X),"data-testid":d.testId,style:{"--index":S,"--toasts-before":S,"--z-index":E.length-S,"--offset":`${K?be:rr.current}px`,"--initial-height":q?"auto":`${we}px`,...M,...d.style},onDragEnd:()=>{te(!1),Q(null),zr.current=null},onPointerDown:Fe=>{Fe.button!==2&&($l||!ht||(rt.current=new Date,xe(rr.current),Fe.target.setPointerCapture(Fe.pointerId),Fe.target.tagName!=="BUTTON"&&(te(!0),zr.current={x:Fe.clientX,y:Fe.clientY})))},onPointerUp:()=>{var Fe,Vt,gn;if(ne||!ht)return;zr.current=null;const Bn=Number(((Fe=Ve.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ba=Number(((Vt=Ve.current)==null?void 0:Vt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Gt=new Date().getTime()-((gn=rt.current)==null?void 0:gn.getTime()),ir=G==="x"?Bn:ba,Za=Math.abs(ir)/Gt;if(Math.abs(ir)>=Pge||Za>.11){xe(rr.current),d.onDismiss==null||d.onDismiss.call(d,d),V(G==="x"?Bn>0?"right":"left":ba>0?"down":"up"),hi(),se(!0);return}else{var ar,or;(ar=Ve.current)==null||ar.style.setProperty("--swipe-amount-x","0px"),(or=Ve.current)==null||or.style.setProperty("--swipe-amount-y","0px")}oe(!1),te(!1),Q(null)},onPointerMove:Fe=>{var Vt,gn,Bn;if(!zr.current||!ht||((Vt=window.getSelection())==null?void 0:Vt.toString().length)>0)return;const Gt=Fe.clientY-zr.current.y,ir=Fe.clientX-zr.current.x;var Za;const ar=(Za=e.swipeDirections)!=null?Za:Dge(F);!G&&(Math.abs(ir)>1||Math.abs(Gt)>1)&&Q(Math.abs(ir)>Math.abs(Gt)?"x":"y");let or={x:0,y:0};const ss=Vr=>1/(1.5+Math.abs(Vr)/20);if(G==="y"){if(ar.includes("top")||ar.includes("bottom"))if(ar.includes("top")&&Gt<0||ar.includes("bottom")&&Gt>0)or.y=Gt;else{const Vr=Gt*ss(Gt);or.y=Math.abs(Vr)<Math.abs(Gt)?Vr:Gt}}else if(G==="x"&&(ar.includes("left")||ar.includes("right")))if(ar.includes("left")&&ir<0||ar.includes("right")&&ir>0)or.x=ir;else{const Vr=ir*ss(ir);or.x=Math.abs(Vr)<Math.abs(ir)?Vr:ir}(Math.abs(or.x)>0||Math.abs(or.y)>0)&&oe(!0),(gn=Ve.current)==null||gn.style.setProperty("--swipe-amount-x",`${or.x}px`),(Bn=Ve.current)==null||Bn.style.setProperty("--swipe-amount-y",`${or.y}px`)}},hn&&!d.jsx&&Xe!=="loading"?Z.createElement("button",{"aria-label":H,"data-disabled":$l,"data-close-button":!0,onClick:$l||!ht?()=>{}:()=>{hi(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Aa(k==null?void 0:k.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(pi=z==null?void 0:z.close)!=null?pi:xge):null,(Xe||d.icon||d.promise)&&d.icon!==null&&((z==null?void 0:z[Xe])!==null||d.icon)?Z.createElement("div",{"data-icon":"",className:Aa(k==null?void 0:k.icon,d==null||(i=d.classNames)==null?void 0:i.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||as():null,d.type!=="loading"?os:null):null,Z.createElement("div",{"data-content":"",className:Aa(k==null?void 0:k.content,d==null||(a=d.classNames)==null?void 0:a.content)},Z.createElement("div",{"data-title":"",className:Aa(k==null?void 0:k.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?Z.createElement("div",{"data-description":"",className:Aa(L,We,k==null?void 0:k.description,d==null||(s=d.classNames)==null?void 0:s.description)},typeof d.description=="function"?d.description():d.description):null),Z.isValidElement(d.cancel)?d.cancel:d.cancel&&My(d.cancel)?Z.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||R,onClick:Fe=>{My(d.cancel)&&ht&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Fe),hi())},className:Aa(k==null?void 0:k.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,Z.isValidElement(d.action)?d.action:d.action&&My(d.action)?Z.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||P,onClick:Fe=>{My(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Fe),!Fe.defaultPrevented&&hi())},className:Aa(k==null?void 0:k.actionButton,d==null||(f=d.classNames)==null?void 0:f.actionButton)},d.action.label):null)};function yB(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Lge(e,t){const n={};return[e,t].forEach((r,i)=>{const a=i===1,o=a?"--mobile-offset":"--offset",s=a?Oge:Nge;function c(f){["top","right","bottom","left"].forEach(h=>{n[`${o}-${h}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${o}-${f}`]=s:n[`${o}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):c(s)}),n}const $ge=Z.forwardRef(function(t,n){const{id:r,invert:i,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:c,className:f,offset:h,mobileOffset:d,theme:m="light",richColors:v,duration:x,style:w,visibleToasts:b=jge,toastOptions:S,dir:E=yB(),gap:_=Rge,icons:A,containerAriaLabel:C="Notifications"}=t,[N,M]=Z.useState([]),R=Z.useMemo(()=>r?N.filter(X=>X.toasterId===r):N.filter(X=>!X.toasterId),[N,r]),P=Z.useMemo(()=>Array.from(new Set([a].concat(R.filter(X=>X.position).map(X=>X.position)))),[R,a]),[$,L]=Z.useState([]),[D,F]=Z.useState(!1),[I,q]=Z.useState(!1),[k,z]=Z.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=Z.useRef(null),G=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=Z.useRef(null),U=Z.useRef(!1),V=Z.useCallback(X=>{M(W=>{var K;return(K=W.find(J=>J.id===X.id))!=null&&K.delete||Pr.dismiss(X.id),W.filter(({id:J})=>J!==X.id)})},[]);return Z.useEffect(()=>Pr.subscribe(X=>{if(X.dismiss){requestAnimationFrame(()=>{M(W=>W.map(K=>K.id===X.id?{...K,delete:!0}:K))});return}setTimeout(()=>{P7.flushSync(()=>{M(W=>{const K=W.findIndex(J=>J.id===X.id);return K!==-1?[...W.slice(0,K),{...W[K],...X},...W.slice(K+1)]:[X,...W]})})})}),[N]),Z.useEffect(()=>{if(m!=="system"){z(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;const X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:W})=>{z(W?"dark":"light")})}catch{X.addListener(({matches:K})=>{try{z(K?"dark":"light")}catch(J){console.error(J)}})}},[m]),Z.useEffect(()=>{N.length<=1&&F(!1)},[N]),Z.useEffect(()=>{const X=W=>{var K;if(o.every(te=>W[te]||W.code===te)){var ee;F(!0),(ee=H.current)==null||ee.focus()}W.code==="Escape"&&(document.activeElement===H.current||(K=H.current)!=null&&K.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[o]),Z.useEffect(()=>{if(H.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,U.current=!1)}},[H.current]),Z.createElement("section",{ref:n,"aria-label":`${C} ${G}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((X,W)=>{var K;const[J,ee]=X.split("-");return R.length?Z.createElement("ol",{key:X,dir:E==="auto"?yB():E,tabIndex:-1,ref:H,className:f,"data-sonner-toaster":!0,"data-sonner-theme":k,"data-y-position":J,"data-x-position":ee,style:{"--front-toast-height":`${((K=$[0])==null?void 0:K.height)||0}px`,"--width":`${Mge}px`,"--gap":`${_}px`,...w,...Lge(h,d)},onBlur:te=>{U.current&&!te.currentTarget.contains(te.relatedTarget)&&(U.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||U.current||(U.current=!0,Q.current=te.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{I||F(!1)},onDragEnd:()=>F(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||q(!0)},onPointerUp:()=>q(!1)},R.filter(te=>!te.position&&W===0||te.position===X).map((te,ne)=>{var se,ce;return Z.createElement(Ige,{key:te.id,icons:A,index:ne,toast:te,defaultRichColors:v,duration:(se=S==null?void 0:S.duration)!=null?se:x,className:S==null?void 0:S.className,descriptionClassName:S==null?void 0:S.descriptionClassName,invert:i,visibleToasts:b,closeButton:(ce=S==null?void 0:S.closeButton)!=null?ce:c,interacting:I,position:X,style:S==null?void 0:S.style,unstyled:S==null?void 0:S.unstyled,classNames:S==null?void 0:S.classNames,cancelButtonStyle:S==null?void 0:S.cancelButtonStyle,actionButtonStyle:S==null?void 0:S.actionButtonStyle,closeButtonAriaLabel:S==null?void 0:S.closeButtonAriaLabel,removeToast:V,toasts:R.filter(oe=>oe.position==te.position),heights:$.filter(oe=>oe.position==te.position),setHeights:L,expandByDefault:s,gap:_,expanded:D,swipeDirections:t.swipeDirections})})):null}))}),Bge=({...e})=>{const t=typeof document<"u"&&document.documentElement.classList.contains("dark");return g.jsx($ge,{theme:t?"dark":"light",className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};function pr({icon:e,title:t,description:n,action:r,className:i}){return g.jsxs("div",{className:ge("flex flex-col items-center justify-center py-12 text-center",i),children:[g.jsx("div",{className:"bg-muted p-4 mb-4",children:g.jsx(e,{className:"h-8 w-8 text-muted-foreground"})}),g.jsx("h3",{className:"font-medium text-lg mb-1",children:t}),n&&g.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mb-4",children:n}),r]})}const qge=Eg("relative w-full border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-card text-foreground border-border",destructive:"border-status-error/30 bg-status-error/5 text-foreground [&>svg]:text-status-error",warning:"border-status-warning/30 bg-status-warning/5 text-foreground [&>svg]:text-status-warning"}},defaultVariants:{variant:"default"}}),X0=j.forwardRef(({className:e,variant:t,...n},r)=>g.jsx("div",{ref:r,role:"alert",className:ge(qge({variant:t}),e),...n}));X0.displayName="Alert";const Q0=j.forwardRef(({className:e,...t},n)=>g.jsx("h5",{ref:n,className:ge("mb-1 font-medium leading-none tracking-tight",e),...t}));Q0.displayName="AlertTitle";const Z0=j.forwardRef(({className:e,...t},n)=>g.jsx("div",{ref:n,className:ge("text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t}));Z0.displayName="AlertDescription";var rY="AlertDialog",[zge]=$i(rY,[iW]),Jo=iW(),iY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Jo(t);return g.jsx(F0,{...r,...n,modal:!0})};iY.displayName=rY;var Fge="AlertDialogTrigger",aY=j.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Jo(n);return g.jsx(Tpe,{...i,...r,ref:t})});aY.displayName=Fge;var Vge="AlertDialogPortal",oY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Jo(t);return g.jsx(V0,{...r,...n})};oY.displayName=Vge;var Uge="AlertDialogOverlay",sY=j.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Jo(n);return g.jsx(Hd,{...i,...r,ref:t})});sY.displayName=Uge;var Of="AlertDialogContent",[Hge,Gge]=zge(Of),Kge=$7("AlertDialogContent"),lY=j.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,a=Jo(n),o=j.useRef(null),s=yt(t,o),c=j.useRef(null);return g.jsx(_pe,{contentName:Of,titleName:cY,docsSlug:"alert-dialog",children:g.jsx(Hge,{scope:n,cancelRef:c,children:g.jsxs(Gd,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:je(i.onOpenAutoFocus,f=>{var h;f.preventDefault(),(h=c.current)==null||h.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[g.jsx(Kge,{children:r}),g.jsx(Yge,{contentRef:o})]})})})});lY.displayName=Of;var cY="AlertDialogTitle",uY=j.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Jo(n);return g.jsx(Ag,{...i,...r,ref:t})});uY.displayName=cY;var fY="AlertDialogDescription",dY=j.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Jo(n);return g.jsx(Cg,{...i,...r,ref:t})});dY.displayName=fY;var Wge="AlertDialogAction",hY=j.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Jo(n);return g.jsx(U0,{...i,...r,ref:t})});hY.displayName=Wge;var pY="AlertDialogCancel",mY=j.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Gge(pY,n),a=Jo(n),o=yt(t,i);return g.jsx(U0,{...a,...r,ref:o})});mY.displayName=pY;var Yge=({contentRef:e})=>{const t=`\`${Of}\` requires a description for the component to be accessible for screen reader users.
410
+
411
+ You can add a description to the \`${Of}\` by passing a \`${fY}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
412
+
413
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Of}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
414
+
415
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return j.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Xge=iY,Qge=aY,Zge=oY,gY=sY,vY=lY,yY=hY,bY=mY,xY=uY,wY=dY;const EM=Xge,bB=Qge,Jge=Zge,SY=j.forwardRef(({className:e,...t},n)=>g.jsx(gY,{className:ge("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,ref:n}));SY.displayName=gY.displayName;const Kb=j.forwardRef(({className:e,...t},n)=>g.jsxs(Jge,{children:[g.jsx(SY,{}),g.jsx(vY,{ref:n,className:ge("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),...t})]}));Kb.displayName=vY.displayName;const Wb=({className:e,...t})=>g.jsx("div",{className:ge("flex flex-col space-y-2 text-center sm:text-left",e),...t});Wb.displayName="AlertDialogHeader";const Yb=({className:e,...t})=>g.jsx("div",{className:ge("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yb.displayName="AlertDialogFooter";const Xb=j.forwardRef(({className:e,...t},n)=>g.jsx(xY,{ref:n,className:ge("text-lg font-semibold",e),...t}));Xb.displayName=xY.displayName;const C2=j.forwardRef(({className:e,...t},n)=>g.jsx(wY,{ref:n,className:ge("text-sm text-muted-foreground",e),...t}));C2.displayName=wY.displayName;const Qb=j.forwardRef(({className:e,...t},n)=>g.jsx(yY,{ref:n,className:ge(m2(),e),...t}));Qb.displayName=yY.displayName;const Zb=j.forwardRef(({className:e,...t},n)=>g.jsx(bY,{ref:n,className:ge(m2({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Zb.displayName=bY.displayName;const eve=Eg("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 Un({className:e,variant:t,...n}){return g.jsx("span",{"data-slot":"badge",className:ge(eve({variant:t}),e),...n})}function xB(e,[t,n]){return Math.min(n,Math.max(t,e))}function T2(e){const t=e+"CollectionProvider",[n,r]=$i(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=w=>{const{scope:b,children:S}=w,E=Z.useRef(null),_=Z.useRef(new Map).current;return g.jsx(i,{scope:b,itemMap:_,collectionRef:E,children:S})};o.displayName=t;const s=e+"CollectionSlot",c=Yf(s),f=Z.forwardRef((w,b)=>{const{scope:S,children:E}=w,_=a(s,S),A=yt(b,_.collectionRef);return g.jsx(c,{ref:A,children:E})});f.displayName=s;const h=e+"CollectionItemSlot",d="data-radix-collection-item",m=Yf(h),v=Z.forwardRef((w,b)=>{const{scope:S,children:E,..._}=w,A=Z.useRef(null),C=yt(b,A),N=a(h,S);return Z.useEffect(()=>(N.itemMap.set(A,{ref:A,..._}),()=>void N.itemMap.delete(A))),g.jsx(m,{[d]:"",ref:C,children:E})});v.displayName=h;function x(w){const b=a(e+"CollectionConsumer",w);return Z.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const _=Array.from(E.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((N,M)=>_.indexOf(N.ref.current)-_.indexOf(M.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:o,Slot:f,ItemSlot:v},x,r]}var tve=j.createContext(void 0);function J0(e){const t=j.useContext(tve);return e||t||"ltr"}function _Y(e){const t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var nve=[" ","Enter","ArrowUp","ArrowDown"],rve=[" ","Enter"],Wc="Select",[ew,tw,ive]=T2(Wc),[Kd]=$i(Wc,[ive,qd]),nw=qd(),[ave,Ml]=Kd(Wc),[ove,sve]=Kd(Wc),EY=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:f,name:h,autoComplete:d,disabled:m,required:v,form:x}=e,w=nw(t),[b,S]=j.useState(null),[E,_]=j.useState(null),[A,C]=j.useState(!1),N=J0(f),[M,R]=Vo({prop:r,defaultProp:i??!1,onChange:a,caller:Wc}),[P,$]=Vo({prop:o,defaultProp:s,onChange:c,caller:Wc}),L=j.useRef(null),D=b?x||!!b.closest("form"):!0,[F,I]=j.useState(new Set),q=Array.from(F).map(k=>k.props.value).join(";");return g.jsx(t2,{...w,children:g.jsxs(ave,{required:v,scope:t,trigger:b,onTriggerChange:S,valueNode:E,onValueNodeChange:_,valueNodeHasChildren:A,onValueNodeHasChildrenChange:C,contentId:Hn(),value:P,onValueChange:$,open:M,onOpenChange:R,dir:N,triggerPointerDownPosRef:L,disabled:m,children:[g.jsx(ew.Provider,{scope:t,children:g.jsx(ove,{scope:e.__scopeSelect,onNativeOptionAdd:j.useCallback(k=>{I(z=>new Set(z).add(k))},[]),onNativeOptionRemove:j.useCallback(k=>{I(z=>{const H=new Set(z);return H.delete(k),H})},[]),children:n})}),D?g.jsxs(WY,{"aria-hidden":!0,required:v,tabIndex:-1,name:h,autoComplete:d,value:P,onChange:k=>$(k.target.value),disabled:m,form:x,children:[P===void 0?g.jsx("option",{value:""}):null,Array.from(F)]},q):null]})})};EY.displayName=Wc;var AY="SelectTrigger",CY=j.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=nw(n),o=Ml(AY,n),s=o.disabled||r,c=yt(t,o.onTriggerChange),f=tw(n),h=j.useRef("touch"),[d,m,v]=XY(w=>{const b=f().filter(_=>!_.disabled),S=b.find(_=>_.value===o.value),E=QY(b,w,S);E!==void 0&&o.onValueChange(E.value)}),x=w=>{s||(o.onOpenChange(!0),v()),w&&(o.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return g.jsx(n2,{asChild:!0,...a,children:g.jsx(Ue.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:s,"data-disabled":s?"":void 0,"data-placeholder":YY(o.value)?"":void 0,...i,ref:c,onClick:je(i.onClick,w=>{w.currentTarget.focus(),h.current!=="mouse"&&x(w)}),onPointerDown:je(i.onPointerDown,w=>{h.current=w.pointerType;const b=w.target;b.hasPointerCapture(w.pointerId)&&b.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(x(w),w.preventDefault())}),onKeyDown:je(i.onKeyDown,w=>{const b=d.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&m(w.key),!(b&&w.key===" ")&&nve.includes(w.key)&&(x(),w.preventDefault())})})})});CY.displayName=AY;var TY="SelectValue",jY=j.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...s}=e,c=Ml(TY,n),{onValueNodeHasChildrenChange:f}=c,h=a!==void 0,d=yt(t,c.onValueNodeChange);return tr(()=>{f(h)},[f,h]),g.jsx(Ue.span,{...s,ref:d,style:{pointerEvents:"none"},children:YY(c.value)?g.jsx(g.Fragment,{children:o}):a})});jY.displayName=TY;var lve="SelectIcon",NY=j.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return g.jsx(Ue.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});NY.displayName=lve;var cve="SelectPortal",OY=e=>g.jsx(vg,{asChild:!0,...e});OY.displayName=cve;var Yc="SelectContent",MY=j.forwardRef((e,t)=>{const n=Ml(Yc,e.__scopeSelect),[r,i]=j.useState();if(tr(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?uu.createPortal(g.jsx(RY,{scope:e.__scopeSelect,children:g.jsx(ew.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),a):null}return g.jsx(PY,{...e,ref:t})});MY.displayName=Yc;var Xi=10,[RY,Rl]=Kd(Yc),uve="SelectContentImpl",fve=Yf("SelectContent.RemoveScroll"),PY=j.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:f,alignOffset:h,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:w,avoidCollisions:b,...S}=e,E=Ml(Yc,n),[_,A]=j.useState(null),[C,N]=j.useState(null),M=yt(t,ee=>A(ee)),[R,P]=j.useState(null),[$,L]=j.useState(null),D=tw(n),[F,I]=j.useState(!1),q=j.useRef(!1);j.useEffect(()=>{if(_)return v2(_)},[_]),g2();const k=j.useCallback(ee=>{const[te,...ne]=D().map(oe=>oe.ref.current),[se]=ne.slice(-1),ce=document.activeElement;for(const oe of ee)if(oe===ce||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===te&&C&&(C.scrollTop=0),oe===se&&C&&(C.scrollTop=C.scrollHeight),oe==null||oe.focus(),document.activeElement!==ce))return},[D,C]),z=j.useCallback(()=>k([R,_]),[k,R,_]);j.useEffect(()=>{F&&z()},[F,z]);const{onOpenChange:H,triggerPointerDownPosRef:G}=E;j.useEffect(()=>{if(_){let ee={x:0,y:0};const te=se=>{var ce,oe;ee={x:Math.abs(Math.round(se.pageX)-(((ce=G.current)==null?void 0:ce.x)??0)),y:Math.abs(Math.round(se.pageY)-(((oe=G.current)==null?void 0:oe.y)??0))}},ne=se=>{ee.x<=10&&ee.y<=10?se.preventDefault():_.contains(se.target)||H(!1),document.removeEventListener("pointermove",te),G.current=null};return G.current!==null&&(document.addEventListener("pointermove",te),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",te),document.removeEventListener("pointerup",ne,{capture:!0})}}},[_,H,G]),j.useEffect(()=>{const ee=()=>H(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[H]);const[Q,U]=XY(ee=>{const te=D().filter(ce=>!ce.disabled),ne=te.find(ce=>ce.ref.current===document.activeElement),se=QY(te,ee,ne);se&&setTimeout(()=>se.ref.current.focus())}),V=j.useCallback((ee,te,ne)=>{const se=!q.current&&!ne;(E.value!==void 0&&E.value===te||se)&&(P(ee),se&&(q.current=!0))},[E.value]),X=j.useCallback(()=>_==null?void 0:_.focus(),[_]),W=j.useCallback((ee,te,ne)=>{const se=!q.current&&!ne;(E.value!==void 0&&E.value===te||se)&&L(ee)},[E.value]),K=r==="popper"?AM:kY,J=K===AM?{side:s,sideOffset:c,align:f,alignOffset:h,arrowPadding:d,collisionBoundary:m,collisionPadding:v,sticky:x,hideWhenDetached:w,avoidCollisions:b}:{};return g.jsx(RY,{scope:n,content:_,viewport:C,onViewportChange:N,itemRefCallback:V,selectedItem:R,onItemLeave:X,itemTextRefCallback:W,focusSelectedItem:z,selectedItemText:$,position:r,isPositioned:F,searchRef:Q,children:g.jsx(q0,{as:fve,allowPinchZoom:!0,children:g.jsx($0,{asChild:!0,trapped:E.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:je(i,ee=>{var te;(te=E.trigger)==null||te.focus({preventScroll:!0}),ee.preventDefault()}),children:g.jsx(mg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:g.jsx(K,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:ee=>ee.preventDefault(),...S,...J,onPlaced:()=>I(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:je(S.onKeyDown,ee=>{const te=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!te&&ee.key.length===1&&U(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let se=D().filter(ce=>!ce.disabled).map(ce=>ce.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(se=se.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const ce=ee.target,oe=se.indexOf(ce);se=se.slice(oe+1)}setTimeout(()=>k(se)),ee.preventDefault()}})})})})})})});PY.displayName=uve;var dve="SelectItemAlignedPosition",kY=j.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=Ml(Yc,n),o=Rl(Yc,n),[s,c]=j.useState(null),[f,h]=j.useState(null),d=yt(t,M=>h(M)),m=tw(n),v=j.useRef(!1),x=j.useRef(!0),{viewport:w,selectedItem:b,selectedItemText:S,focusSelectedItem:E}=o,_=j.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&f&&w&&b&&S){const M=a.trigger.getBoundingClientRect(),R=f.getBoundingClientRect(),P=a.valueNode.getBoundingClientRect(),$=S.getBoundingClientRect();if(a.dir!=="rtl"){const ce=$.left-R.left,oe=P.left-ce,be=M.left-oe,xe=M.width+be,we=Math.max(xe,R.width),Ae=window.innerWidth-Xi,Ee=xB(oe,[Xi,Math.max(Xi,Ae-we)]);s.style.minWidth=xe+"px",s.style.left=Ee+"px"}else{const ce=R.right-$.right,oe=window.innerWidth-P.right-ce,be=window.innerWidth-M.right-oe,xe=M.width+be,we=Math.max(xe,R.width),Ae=window.innerWidth-Xi,Ee=xB(oe,[Xi,Math.max(Xi,Ae-we)]);s.style.minWidth=xe+"px",s.style.right=Ee+"px"}const L=m(),D=window.innerHeight-Xi*2,F=w.scrollHeight,I=window.getComputedStyle(f),q=parseInt(I.borderTopWidth,10),k=parseInt(I.paddingTop,10),z=parseInt(I.borderBottomWidth,10),H=parseInt(I.paddingBottom,10),G=q+k+F+H+z,Q=Math.min(b.offsetHeight*5,G),U=window.getComputedStyle(w),V=parseInt(U.paddingTop,10),X=parseInt(U.paddingBottom,10),W=M.top+M.height/2-Xi,K=D-W,J=b.offsetHeight/2,ee=b.offsetTop+J,te=q+k+ee,ne=G-te;if(te<=W){const ce=L.length>0&&b===L[L.length-1].ref.current;s.style.bottom="0px";const oe=f.clientHeight-w.offsetTop-w.offsetHeight,be=Math.max(K,J+(ce?X:0)+oe+z),xe=te+be;s.style.height=xe+"px"}else{const ce=L.length>0&&b===L[0].ref.current;s.style.top="0px";const be=Math.max(W,q+w.offsetTop+(ce?V:0)+J)+ne;s.style.height=be+"px",w.scrollTop=te-W+w.offsetTop}s.style.margin=`${Xi}px 0`,s.style.minHeight=Q+"px",s.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[m,a.trigger,a.valueNode,s,f,w,b,S,a.dir,r]);tr(()=>_(),[_]);const[A,C]=j.useState();tr(()=>{f&&C(window.getComputedStyle(f).zIndex)},[f]);const N=j.useCallback(M=>{M&&x.current===!0&&(_(),E==null||E(),x.current=!1)},[_,E]);return g.jsx(pve,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:v,onScrollButtonChange:N,children:g.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:g.jsx(Ue.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});kY.displayName=dve;var hve="SelectPopperPosition",AM=j.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Xi,...a}=e,o=nw(n);return g.jsx(r2,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});AM.displayName=hve;var[pve,j2]=Kd(Yc,{}),CM="SelectViewport",DY=j.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=Rl(CM,n),o=j2(CM,n),s=yt(t,a.onViewportChange),c=j.useRef(0);return g.jsxs(g.Fragment,{children:[g.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}),g.jsx(ew.Slot,{scope:n,children:g.jsx(Ue.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:je(i.onScroll,f=>{const h=f.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&d){const v=Math.abs(c.current-h.scrollTop);if(v>0){const x=window.innerHeight-Xi*2,w=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),S=Math.max(w,b);if(S<x){const E=S+v,_=Math.min(x,E),A=E-_;d.style.height=_+"px",d.style.bottom==="0px"&&(h.scrollTop=A>0?A:0,d.style.justifyContent="flex-end")}}}c.current=h.scrollTop})})})]})});DY.displayName=CM;var IY="SelectGroup",[mve,gve]=Kd(IY),vve=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Hn();return g.jsx(mve,{scope:n,id:i,children:g.jsx(Ue.div,{role:"group","aria-labelledby":i,...r,ref:t})})});vve.displayName=IY;var LY="SelectLabel",$Y=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=gve(LY,n);return g.jsx(Ue.div,{id:i.id,...r,ref:t})});$Y.displayName=LY;var Jb="SelectItem",[yve,BY]=Kd(Jb),qY=j.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=Ml(Jb,n),c=Rl(Jb,n),f=s.value===r,[h,d]=j.useState(a??""),[m,v]=j.useState(!1),x=yt(t,E=>{var _;return(_=c.itemRefCallback)==null?void 0:_.call(c,E,r,i)}),w=Hn(),b=j.useRef("touch"),S=()=>{i||(s.onValueChange(r),s.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 g.jsx(yve,{scope:n,value:r,disabled:i,textId:w,isSelected:f,onItemTextChange:j.useCallback(E=>{d(_=>_||((E==null?void 0:E.textContent)??"").trim())},[]),children:g.jsx(ew.ItemSlot,{scope:n,value:r,disabled:i,textValue:h,children:g.jsx(Ue.div,{role:"option","aria-labelledby":w,"data-highlighted":m?"":void 0,"aria-selected":f&&m,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:x,onFocus:je(o.onFocus,()=>v(!0)),onBlur:je(o.onBlur,()=>v(!1)),onClick:je(o.onClick,()=>{b.current!=="mouse"&&S()}),onPointerUp:je(o.onPointerUp,()=>{b.current==="mouse"&&S()}),onPointerDown:je(o.onPointerDown,E=>{b.current=E.pointerType}),onPointerMove:je(o.onPointerMove,E=>{var _;b.current=E.pointerType,i?(_=c.onItemLeave)==null||_.call(c):b.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:je(o.onPointerLeave,E=>{var _;E.currentTarget===document.activeElement&&((_=c.onItemLeave)==null||_.call(c))}),onKeyDown:je(o.onKeyDown,E=>{var A;((A=c.searchRef)==null?void 0:A.current)!==""&&E.key===" "||(rve.includes(E.key)&&S(),E.key===" "&&E.preventDefault())})})})})});qY.displayName=Jb;var jp="SelectItemText",zY=j.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=Ml(jp,n),s=Rl(jp,n),c=BY(jp,n),f=sve(jp,n),[h,d]=j.useState(null),m=yt(t,S=>d(S),c.onItemTextChange,S=>{var E;return(E=s.itemTextRefCallback)==null?void 0:E.call(s,S,c.value,c.disabled)}),v=h==null?void 0:h.textContent,x=j.useMemo(()=>g.jsx("option",{value:c.value,disabled:c.disabled,children:v},c.value),[c.disabled,c.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:b}=f;return tr(()=>(w(x),()=>b(x)),[w,b,x]),g.jsxs(g.Fragment,{children:[g.jsx(Ue.span,{id:c.textId,...a,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?uu.createPortal(a.children,o.valueNode):null]})});zY.displayName=jp;var FY="SelectItemIndicator",VY=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return BY(FY,n).isSelected?g.jsx(Ue.span,{"aria-hidden":!0,...r,ref:t}):null});VY.displayName=FY;var TM="SelectScrollUpButton",UY=j.forwardRef((e,t)=>{const n=Rl(TM,e.__scopeSelect),r=j2(TM,e.__scopeSelect),[i,a]=j.useState(!1),o=yt(t,r.onScrollButtonChange);return tr(()=>{if(n.viewport&&n.isPositioned){let s=function(){const f=c.scrollTop>0;a(f)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?g.jsx(GY,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});UY.displayName=TM;var jM="SelectScrollDownButton",HY=j.forwardRef((e,t)=>{const n=Rl(jM,e.__scopeSelect),r=j2(jM,e.__scopeSelect),[i,a]=j.useState(!1),o=yt(t,r.onScrollButtonChange);return tr(()=>{if(n.viewport&&n.isPositioned){let s=function(){const f=c.scrollHeight-c.clientHeight,h=Math.ceil(c.scrollTop)<f;a(h)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?g.jsx(GY,{...e,ref:o,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});HY.displayName=jM;var GY=j.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Rl("SelectScrollButton",n),o=j.useRef(null),s=tw(n),c=j.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return j.useEffect(()=>()=>c(),[c]),tr(()=>{var h;const f=s().find(d=>d.ref.current===document.activeElement);(h=f==null?void 0:f.ref.current)==null||h.scrollIntoView({block:"nearest"})},[s]),g.jsx(Ue.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:je(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:je(i.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:je(i.onPointerLeave,()=>{c()})})}),bve="SelectSeparator",KY=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(Ue.div,{"aria-hidden":!0,...r,ref:t})});KY.displayName=bve;var NM="SelectArrow",xve=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=nw(n),a=Ml(NM,n),o=Rl(NM,n);return a.open&&o.position==="popper"?g.jsx(i2,{...i,...r,ref:t}):null});xve.displayName=NM;var wve="SelectBubbleInput",WY=j.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=j.useRef(null),a=yt(r,i),o=_Y(t);return j.useEffect(()=>{const s=i.current;if(!s)return;const c=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&h){const d=new Event("change",{bubbles:!0});h.call(s,t),s.dispatchEvent(d)}},[o,t]),g.jsx(Ue.select,{...n,style:{...uK,...n.style},ref:a,defaultValue:t})});WY.displayName=wve;function YY(e){return e===""||e===void 0}function XY(e){const t=Fa(e),n=j.useRef(""),r=j.useRef(0),i=j.useCallback(o=>{const s=n.current+o;t(s),(function c(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(s)},[t]),a=j.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return j.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function QY(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=Sve(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==n));const c=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function Sve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _ve=EY,ZY=CY,Eve=jY,Ave=NY,Cve=OY,JY=MY,Tve=DY,eX=$Y,tX=qY,jve=zY,Nve=VY,nX=UY,rX=HY,iX=KY;const ex=_ve,tx=Eve,um=j.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(ZY,{ref:r,className:ge("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,g.jsx(Ave,{asChild:!0,children:g.jsx(Sg,{className:"h-4 w-4 opacity-50"})})]}));um.displayName=ZY.displayName;const aX=j.forwardRef(({className:e,...t},n)=>g.jsx(nX,{ref:n,className:ge("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(Qde,{className:"h-4 w-4"})}));aX.displayName=nX.displayName;const oX=j.forwardRef(({className:e,...t},n)=>g.jsx(rX,{ref:n,className:ge("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(Sg,{className:"h-4 w-4"})}));oX.displayName=rX.displayName;const fm=j.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>g.jsx(Cve,{children:g.jsxs(JY,{ref:i,className:ge("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:[g.jsx(aX,{}),g.jsx(Tve,{className:ge("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),g.jsx(oX,{})]})}));fm.displayName=JY.displayName;const Ove=j.forwardRef(({className:e,...t},n)=>g.jsx(eX,{ref:n,className:ge("px-2 py-1.5 text-sm font-semibold",e),...t}));Ove.displayName=eX.displayName;const dm=j.forwardRef(({className:e,children:t,...n},r)=>g.jsxs(tX,{ref:r,className:ge("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:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(Nve,{children:g.jsx(Vd,{className:"h-4 w-4"})})}),g.jsx(jve,{children:t})]}));dm.displayName=tX.displayName;const Mve=j.forwardRef(({className:e,...t},n)=>g.jsx(iX,{ref:n,className:ge("-mx-1 my-1 h-px bg-muted",e),...t}));Mve.displayName=iX.displayName;var aE="rovingFocusGroup.onEntryFocus",Rve={bubbles:!1,cancelable:!0},Og="RovingFocusGroup",[OM,sX,Pve]=T2(Og),[kve,rw]=$i(Og,[Pve]),[Dve,Ive]=kve(Og),lX=j.forwardRef((e,t)=>g.jsx(OM.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(OM.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(Lve,{...e,ref:t})})}));lX.displayName=Og;var Lve=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...d}=e,m=j.useRef(null),v=yt(t,m),x=J0(a),[w,b]=Vo({prop:o,defaultProp:s??null,onChange:c,caller:Og}),[S,E]=j.useState(!1),_=Fa(f),A=sX(n),C=j.useRef(!1),[N,M]=j.useState(0);return j.useEffect(()=>{const R=m.current;if(R)return R.addEventListener(aE,_),()=>R.removeEventListener(aE,_)},[_]),g.jsx(Dve,{scope:n,orientation:r,dir:x,loop:i,currentTabStopId:w,onItemFocus:j.useCallback(R=>b(R),[b]),onItemShiftTab:j.useCallback(()=>E(!0),[]),onFocusableItemAdd:j.useCallback(()=>M(R=>R+1),[]),onFocusableItemRemove:j.useCallback(()=>M(R=>R-1),[]),children:g.jsx(Ue.div,{tabIndex:S||N===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:je(e.onMouseDown,()=>{C.current=!0}),onFocus:je(e.onFocus,R=>{const P=!C.current;if(R.target===R.currentTarget&&P&&!S){const $=new CustomEvent(aE,Rve);if(R.currentTarget.dispatchEvent($),!$.defaultPrevented){const L=A().filter(k=>k.focusable),D=L.find(k=>k.active),F=L.find(k=>k.id===w),q=[D,F,...L].filter(Boolean).map(k=>k.ref.current);fX(q,h)}}C.current=!1}),onBlur:je(e.onBlur,()=>E(!1))})})}),cX="RovingFocusGroupItem",uX=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Hn(),f=a||c,h=Ive(cX,n),d=h.currentTabStopId===f,m=sX(n),{onFocusableItemAdd:v,onFocusableItemRemove:x,currentTabStopId:w}=h;return j.useEffect(()=>{if(r)return v(),()=>x()},[r,v,x]),g.jsx(OM.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:g.jsx(Ue.span,{tabIndex:d?0:-1,"data-orientation":h.orientation,...s,ref:t,onMouseDown:je(e.onMouseDown,b=>{r?h.onItemFocus(f):b.preventDefault()}),onFocus:je(e.onFocus,()=>h.onItemFocus(f)),onKeyDown:je(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){h.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const S=qve(b,h.orientation,h.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);_=h.loop?zve(_,A+1):_.slice(A+1)}setTimeout(()=>fX(_))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:w!=null}):o})})});uX.displayName=cX;var $ve={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Bve(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function qve(e,t,n){const r=Bve(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $ve[r]}function fX(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function zve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dX=lX,hX=uX,iw="Tabs",[Fve]=$i(iw,[rw]),pX=rw(),[Vve,N2]=Fve(iw),mX=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:s,activationMode:c="automatic",...f}=e,h=J0(s),[d,m]=Vo({prop:r,onChange:i,defaultProp:a??"",caller:iw});return g.jsx(Vve,{scope:n,baseId:Hn(),value:d,onValueChange:m,orientation:o,dir:h,activationMode:c,children:g.jsx(Ue.div,{dir:h,"data-orientation":o,...f,ref:t})})});mX.displayName=iw;var gX="TabsList",vX=j.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=N2(gX,n),o=pX(n);return g.jsx(dX,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:g.jsx(Ue.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});vX.displayName=gX;var yX="TabsTrigger",bX=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=N2(yX,n),s=pX(n),c=SX(o.baseId,r),f=_X(o.baseId,r),h=r===o.value;return g.jsx(hX,{asChild:!0,...s,focusable:!i,active:h,children:g.jsx(Ue.button,{type:"button",role:"tab","aria-selected":h,"aria-controls":f,"data-state":h?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:t,onMouseDown:je(e.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?o.onValueChange(r):d.preventDefault()}),onKeyDown:je(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(r)}),onFocus:je(e.onFocus,()=>{const d=o.activationMode!=="manual";!h&&!i&&d&&o.onValueChange(r)})})})});bX.displayName=yX;var xX="TabsContent",wX=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=N2(xX,n),c=SX(s.baseId,r),f=_X(s.baseId,r),h=r===s.value,d=j.useRef(h);return j.useEffect(()=>{const m=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(m)},[]),g.jsx(di,{present:i||h,children:({present:m})=>g.jsx(Ue.div,{"data-state":h?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:f,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:m&&a})})});wX.displayName=xX;function SX(e,t){return`${e}-trigger-${t}`}function _X(e,t){return`${e}-content-${t}`}var Uve=mX,EX=vX,AX=bX,CX=wX;const Mg=Uve,Wd=j.forwardRef(({className:e,...t},n)=>g.jsx(EX,{ref:n,className:ge("inline-flex h-9 items-center gap-1 bg-muted p-1 text-muted-foreground",e),...t}));Wd.displayName=EX.displayName;const kr=j.forwardRef(({className:e,...t},n)=>g.jsx(AX,{ref:n,className:ge("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}));kr.displayName=AX.displayName;const ni=j.forwardRef(({className:e,...t},n)=>g.jsx(CX,{ref:n,className:ge("mt-2 focus-visible:outline-none",e),...t}));ni.displayName=CX.displayName;const TX=[{value:"job_failed",label:"Job failed",description:"A job throws an error"},{value:"job_stalled",label:"Job stalled",description:"A job stops making progress"},{value:"retries_exhausted",label:"Retries exhausted",description:"A job used all retry attempts"},{value:"failed_backlog",label:"Failed backlog",description:"Failed job count crosses a threshold"},{value:"no_workers_with_backlog",label:"No workers with backlog",description:"Waiting jobs but no active workers"}],Hve=["critical","warning","info"],MM=[{value:"slack",label:"Slack",description:"Incoming webhook to a channel"},{value:"webhook",label:"Webhook",description:"Custom HTTPS endpoint (JSON payload)"}];function jX(e){var t;return((t=MM.find(n=>n.value===e))==null?void 0:t.label)??e}function Gve(e){var t;return((t=TX.find(n=>n.value===e))==null?void 0:t.label)??e}function Kve(e){const t=Math.round((e??3e5)/6e4);return t<60?`${t} min`:t%60===0?`${t/60} hr`:`${(t/60).toFixed(1)} hr`}function NX({severity:e}){const t=e==="critical"?"destructive":e==="warning"?"secondary":"outline";return g.jsx(Un,{variant:t,children:e})}function Wve({open:e,onOpenChange:t,initial:n,onSubmit:r}){var m;const[i,a]=j.useState((n==null?void 0:n.name)??""),[o,s]=j.useState((n==null?void 0:n.preset)??"slack"),[c,f]=j.useState(""),[h,d]=j.useState((n==null?void 0:n.displayName)??"");return j.useEffect(()=>{e&&(a((n==null?void 0:n.name)??""),s((n==null?void 0:n.preset)??"slack"),f(""),d((n==null?void 0:n.displayName)??""))},[e,n]),g.jsx(G0,{open:e,onOpenChange:t,children:g.jsxs(Ng,{className:"sm:max-w-md",children:[g.jsx(K0,{children:g.jsx(Y0,{children:n?"Edit destination":"Add destination"})}),g.jsxs("div",{className:"space-y-3 py-2",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Name"}),g.jsx(ra,{value:i,onChange:v=>a(v.target.value),placeholder:"Ops Slack"})]}),g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Type"}),g.jsxs(ex,{value:o,onValueChange:v=>s(v),children:[g.jsx(um,{children:g.jsx(tx,{})}),g.jsx(fm,{children:MM.map(v=>g.jsx(dm,{value:v.value,children:v.label},v.value))})]}),g.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:(m=MM.find(v=>v.value===o))==null?void 0:m.description})]}),o==="slack"&&g.jsxs(X0,{children:[g.jsx(Q0,{children:"Slack incoming webhook"}),g.jsx(Z0,{className:"text-xs space-y-2",children:g.jsxs("ol",{className:"list-decimal list-inside space-y-1",children:[g.jsxs("li",{children:["Open"," ",g.jsx("a",{href:"https://api.slack.com/apps",target:"_blank",rel:"noreferrer",className:"underline",children:"api.slack.com/apps"})," ","and create or select an app"]}),g.jsxs("li",{children:["Enable ",g.jsx("strong",{children:"Incoming Webhooks"})," and add a webhook to your channel"]}),g.jsxs("li",{children:["Copy the URL (",g.jsx("code",{className:"text-[10px]",children:"https://hooks.slack.com/services/…"}),") and paste it below"]}),g.jsxs("li",{children:["Save, then use ",g.jsx("strong",{children:"Test"})," to verify delivery"]})]})})]}),g.jsxs("div",{children:[g.jsxs("p",{className:"text-xs text-muted-foreground mb-1",children:[o==="slack"?"Slack webhook URL":"Webhook URL",n?" (leave blank to keep current)":""]}),g.jsx(ra,{type:"url",placeholder:o==="slack"?"https://hooks.slack.com/services/...":"https://...",value:c,onChange:v=>f(v.target.value)})]}),g.jsxs("div",{children:[g.jsxs("p",{className:"text-xs text-muted-foreground mb-1",children:["Sender name"," ",g.jsx("span",{className:"text-muted-foreground/80",children:"(optional)"})]}),g.jsx(ra,{placeholder:"Workbench",value:h,onChange:v=>d(v.target.value)}),g.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Shown on Slack messages when your workspace allows it."})]})]}),g.jsxs(W0,{children:[g.jsx(it,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),g.jsx(it,{onClick:()=>{!i||!n&&!c||(r({name:i,preset:o,url:c,displayName:h||void 0,enabled:(n==null?void 0:n.enabled)??!0}),t(!1))},disabled:!i||!n&&!c,children:"Save"})]})]})})}function Yve({open:e,onOpenChange:t,initial:n,contactPoints:r,queues:i,onSubmit:a}){var C;const[o,s]=j.useState((n==null?void 0:n.name)??""),[c,f]=j.useState((n==null?void 0:n.trigger)??"job_failed"),[h,d]=j.useState((n==null?void 0:n.severity)??"warning"),[m,v]=j.useState(String((n==null?void 0:n.threshold)??1)),[x,w]=j.useState(String(Math.round(((n==null?void 0:n.cooldownMs)??3e5)/6e4))),[b,S]=j.useState((n==null?void 0:n.contactPointIds)??[]),[E,_]=j.useState(((C=n==null?void 0:n.queues)==null?void 0:C.join(", "))??"");j.useEffect(()=>{var N;e&&(s((n==null?void 0:n.name)??""),f((n==null?void 0:n.trigger)??"job_failed"),d((n==null?void 0:n.severity)??"warning"),v(String((n==null?void 0:n.threshold)??1)),w(String(Math.round(((n==null?void 0:n.cooldownMs)??3e5)/6e4))),S((n==null?void 0:n.contactPointIds)??[]),_(((N=n==null?void 0:n.queues)==null?void 0:N.join(", "))??""))},[e,n]);const A=c==="failed_backlog"||c==="no_workers_with_backlog";return g.jsx(G0,{open:e,onOpenChange:t,children:g.jsxs(Ng,{className:"sm:max-w-lg",children:[g.jsx(K0,{children:g.jsx(Y0,{children:n?"Edit alert rule":"New alert rule"})}),g.jsxs("div",{className:"space-y-3 py-2 max-h-[60vh] overflow-y-auto",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Name"}),g.jsx(ra,{value:o,onChange:N=>s(N.target.value),placeholder:"Failed jobs in production"})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"When"}),g.jsxs(ex,{value:c,onValueChange:N=>f(N),children:[g.jsx(um,{children:g.jsx(tx,{})}),g.jsx(fm,{children:TX.map(N=>g.jsx(dm,{value:N.value,children:N.label},N.value))})]})]}),g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Severity"}),g.jsxs(ex,{value:h,onValueChange:N=>d(N),children:[g.jsx(um,{children:g.jsx(tx,{})}),g.jsx(fm,{children:Hve.map(N=>g.jsx(dm,{value:N,children:N},N))})]})]})]}),A&&g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Threshold"}),g.jsx(ra,{type:"number",min:1,value:m,onChange:N=>v(N.target.value)})]}),g.jsxs("div",{children:[g.jsxs("p",{className:"text-xs text-muted-foreground mb-1",children:["Queues"," ",g.jsx("span",{className:"text-muted-foreground/80",children:"(optional)"})]}),g.jsx(ra,{placeholder:"All queues",value:E,onChange:N=>_(N.target.value)}),g.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Comma-separated names. Leave empty to watch every queue."})]}),g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Cooldown (minutes)"}),g.jsx(ra,{type:"number",min:0,value:x,onChange:N=>w(N.target.value)}),g.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Minimum wait before the same alert can fire again."})]}),g.jsxs("div",{children:[g.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Send to"}),g.jsx("div",{className:"space-y-1.5",children:r.length===0?g.jsx("p",{className:"text-xs text-muted-foreground",children:"Add a destination first, then link it here."}):r.map(N=>g.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:b.includes(N.id),onChange:M=>{S(R=>M.target.checked?[...R,N.id]:R.filter(P=>P!==N.id))}}),N.name," ",g.jsxs("span",{className:"text-muted-foreground",children:["(",jX(N.preset),")"]})]},N.id))})]})]}),g.jsxs(W0,{children:[g.jsx(it,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),g.jsx(it,{onClick:()=>{if(!o||b.length===0)return;const N=E.split(",").map(M=>M.trim()).filter(Boolean);a({name:o,enabled:(n==null?void 0:n.enabled)??!0,trigger:c,severity:h,threshold:A?Number(m):void 0,queues:N.length>0?N:void 0,contactPointIds:b,cooldownMs:Number(x)*6e4||void 0}),t(!1)},disabled:!o||b.length===0,children:"Save"})]})]})})}function Xve({hasDestinations:e,hasRules:t}){if(e&&t)return null;const n=[{done:e,label:"Add a destination",detail:"Slack channel or webhook URL"},{done:t,label:"Create an alert rule",detail:"Choose when to notify"}];return g.jsxs("div",{className:"rounded-md border border-dashed bg-muted/20 px-4 py-3",children:[g.jsx("p",{className:"text-sm font-medium mb-2",children:"Getting started"}),g.jsx("ol",{className:"space-y-2",children:n.map((r,i)=>g.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[g.jsx("span",{className:ge("mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full text-xs font-medium",r.done?"bg-chart-success/15 text-chart-success":"bg-muted text-muted-foreground"),children:r.done?"✓":i+1}),g.jsxs("span",{children:[g.jsx("span",{className:r.done?"text-muted-foreground":"",children:r.label}),!r.done&&g.jsx("span",{className:"block text-xs text-muted-foreground",children:r.detail})]})]},r.label))})]})}function Qve({preset:e}){const t=e==="slack"?am:fhe;return g.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:g.jsx(t,{className:"size-4 text-muted-foreground"})})}function Zve({status:e}){return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground mb-3",children:"Event listeners"}),e.listeners.length===0?g.jsx("p",{className:"text-sm text-muted-foreground",children:"No queues connected yet."}):g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2",children:e.listeners.map(t=>g.jsxs("div",{className:"flex items-center justify-between border bg-card px-3 py-2 text-sm",children:[g.jsx("span",{className:"truncate font-medium",children:t.queue}),t.connected?g.jsx(Un,{variant:"outline",className:"text-chart-success",children:"Active"}):g.jsx(Un,{variant:"destructive",children:"Disconnected"})]},t.queue))})]}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground mb-3",children:"Recent alerts"}),e.recentEvents.length===0?g.jsx("p",{className:"text-sm text-muted-foreground",children:"Nothing has fired yet. Alerts appear here when a rule matches."}):g.jsx("div",{className:"space-y-2",children:e.recentEvents.slice(0,20).map(t=>g.jsxs("div",{className:"border bg-card px-3 py-2 text-sm",children:[g.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[g.jsx(NX,{severity:t.severity}),g.jsx("span",{className:"font-medium",children:t.ruleName}),g.jsx(Un,{variant:"outline",children:t.status})]}),g.jsx("p",{className:"text-muted-foreground text-xs",children:t.message})]},t.id))})]}),g.jsxs("div",{children:[g.jsx("h3",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground mb-3",children:"Delivery log"}),e.lastDeliveries.length===0?g.jsx("p",{className:"text-sm text-muted-foreground",children:"Test messages and alert deliveries will show up here."}):g.jsx("div",{className:"space-y-1",children:e.lastDeliveries.slice(0,10).map(t=>g.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[t.success?g.jsx(Qo,{className:"size-3.5 text-chart-success"}):g.jsx(_g,{className:"size-3.5 text-destructive"}),g.jsx("span",{children:t.contactPointName}),t.error&&g.jsx("span",{className:"text-destructive",children:t.error})]},`${t.contactPointId}-${t.at}-${t.error??"ok"}`))})]})]})}function Jve(){const{data:e}=fu(),{data:t,isLoading:n}=xme(),{data:r=[],isLoading:i}=wme(),{data:a=[],isLoading:o}=Sme(),s=_me(),c=Eme(),f=Ame(),h=Cme(),d=Tme(),m=jme(),v=Nme(),[x,w]=j.useState(!1),[b,S]=j.useState(),[E,_]=j.useState(!1),[A,C]=j.useState(),N=e==null?void 0:e.readonly,M=(e==null?void 0:e.queues)??[];return n||i||o?g.jsxs("div",{className:"space-y-4",children:[g.jsx(Jt,{className:"h-9 w-64"}),g.jsx(Jt,{className:"h-40 w-full"})]}):g.jsxs("div",{className:"space-y-6",children:[g.jsx(Xve,{hasDestinations:r.length>0,hasRules:a.length>0}),g.jsxs(Mg,{defaultValue:"destinations",children:[g.jsxs(Wd,{children:[g.jsxs(kr,{value:"destinations",children:["Destinations",r.length>0&&g.jsx("span",{className:"ml-1.5 text-xs text-muted-foreground tabular-nums",children:r.length})]}),g.jsxs(kr,{value:"rules",children:["Rules",a.length>0&&g.jsx("span",{className:"ml-1.5 text-xs text-muted-foreground tabular-nums",children:a.length})]}),g.jsx(kr,{value:"activity",children:"Activity"})]}),g.jsxs(ni,{value:"destinations",className:"space-y-4 mt-4",children:[!N&&g.jsxs(it,{size:"sm",onClick:()=>{S(void 0),w(!0)},children:[g.jsx(Cy,{className:"size-4 mr-1"}),"Add destination"]}),r.length===0?g.jsx(pr,{icon:am,title:"No destinations yet",description:"Connect Slack or a webhook URL where notifications should be delivered.",action:N?void 0:g.jsxs(it,{size:"sm",onClick:()=>{S(void 0),w(!0)},children:[g.jsx(Cy,{className:"size-4 mr-1"}),"Add destination"]})}):g.jsx("div",{className:"space-y-2",children:r.map(R=>g.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 border bg-card px-4 py-3",children:[g.jsx(Qve,{preset:R.preset}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"font-medium",children:R.name}),g.jsx(Un,{variant:"outline",children:jX(R.preset)}),!R.enabled&&g.jsx(Un,{variant:"secondary",children:"Paused"})]}),g.jsxs("p",{className:"text-xs text-muted-foreground mt-1 truncate",children:[R.urlMasked,R.displayName?` · sends as ${R.displayName}`:""]})]}),g.jsx("div",{className:"flex items-center gap-2 shrink-0 sm:ml-auto",children:!N&&g.jsxs(g.Fragment,{children:[g.jsxs(it,{variant:"outline",size:"sm",disabled:h.isPending,onClick:async()=>{try{const P=await h.mutateAsync(R.id);P.success?$p.success(`Test message sent to ${R.name}`):$p.error(P.error??"Test message failed")}catch(P){$p.error(P instanceof Error?P.message:"Test message failed")}},children:[h.isPending?g.jsx(Dc,{className:"size-3.5 animate-spin"}):g.jsx(uhe,{className:"size-3.5"}),g.jsx("span",{className:"ml-1.5",children:"Send test"})]}),g.jsx(it,{variant:"outline",size:"sm",onClick:()=>{S(R),w(!0)},children:"Edit"}),g.jsxs(EM,{children:[g.jsx(bB,{asChild:!0,children:g.jsx(it,{variant:"outline",size:"sm",children:g.jsx(id,{className:"size-3.5"})})}),g.jsxs(Kb,{children:[g.jsxs(Wb,{children:[g.jsx(Xb,{children:"Delete destination?"}),g.jsxs(C2,{children:["Rules linked to ",R.name," will stop sending there."]})]}),g.jsxs(Yb,{children:[g.jsx(Zb,{children:"Cancel"}),g.jsx(Qb,{onClick:()=>f.mutate(R.id),children:"Delete"})]})]})]})]})})]},R.id))})]}),g.jsxs(ni,{value:"rules",className:"space-y-4 mt-4",children:[!N&&g.jsxs(it,{size:"sm",onClick:()=>{C(void 0),_(!0)},disabled:r.length===0,children:[g.jsx(Cy,{className:"size-4 mr-1"}),"Add rule"]}),r.length===0&&!N&&g.jsx("p",{className:"text-xs text-muted-foreground",children:"Add a destination before creating rules."}),a.length===0?g.jsx(pr,{icon:am,title:"No alert rules yet",description:"Rules watch your queues and send to destinations when something goes wrong.",action:!N&&r.length>0?g.jsxs(it,{size:"sm",onClick:()=>{C(void 0),_(!0)},children:[g.jsx(Cy,{className:"size-4 mr-1"}),"Add rule"]}):void 0}):g.jsx("div",{className:"space-y-2",children:a.map(R=>{var P;return g.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 border bg-card px-4 py-3",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"font-medium",children:R.name}),g.jsx(NX,{severity:R.severity}),g.jsx(Un,{variant:"outline",children:Gve(R.trigger)}),!R.enabled&&g.jsx(Un,{variant:"secondary",children:"Paused"})]}),g.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[(P=R.queues)!=null&&P.length?`Queues: ${R.queues.join(", ")}`:"All queues",R.threshold!==void 0?` · threshold ${R.threshold}`:"",R.cooldownMs!==void 0?` · cooldown ${Kve(R.cooldownMs)}`:""]})]}),!N&&g.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.jsx(it,{variant:"outline",size:"sm",onClick:()=>m.mutate({id:R.id,enabled:!R.enabled}),children:R.enabled?"Disable":"Enable"}),g.jsx(it,{variant:"outline",size:"sm",onClick:()=>{C(R),_(!0)},children:"Edit"}),g.jsxs(EM,{children:[g.jsx(bB,{asChild:!0,children:g.jsx(it,{variant:"outline",size:"sm",children:g.jsx(id,{className:"size-3.5"})})}),g.jsxs(Kb,{children:[g.jsx(Wb,{children:g.jsx(Xb,{children:"Delete rule?"})}),g.jsxs(Yb,{children:[g.jsx(Zb,{children:"Cancel"}),g.jsx(Qb,{onClick:()=>v.mutate(R.id),children:"Delete"})]})]})]})]})]},R.id)})})]}),g.jsx(ni,{value:"activity",className:"mt-4",children:t?g.jsx(Zve,{status:t}):g.jsx("p",{className:"text-sm text-muted-foreground",children:"Unable to load status."})})]}),g.jsx(Wve,{open:x,onOpenChange:w,initial:b,onSubmit:R=>{b?c.mutate({id:b.id,name:R.name,preset:R.preset,displayName:R.displayName,enabled:R.enabled,...R.url?{url:R.url}:{}}):s.mutate(R)}}),g.jsx(Yve,{open:E,onOpenChange:_,initial:A,contactPoints:r,queues:M,onSubmit:R=>{A?m.mutate({id:A.id,...R}):d.mutate(R)}})]})}function Cn(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=Cn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var eye={value:()=>{}};function aw(){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 hb(n)}function hb(e){this._=e}function tye(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}})}hb.prototype=aw.prototype={constructor:hb,on:function(e,t){var n=this._,r=tye(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=nye(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]=wB(n[i],e.name,t);else if(t==null)for(i in n)n[i]=wB(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 hb(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 nye(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function wB(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=eye,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var RM="http://www.w3.org/1999/xhtml";const SB={svg:"http://www.w3.org/2000/svg",xhtml:RM,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ow(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),SB.hasOwnProperty(t)?{space:SB[t],local:e}:e}function rye(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===RM&&t.documentElement.namespaceURI===RM?t.createElement(e):t.createElementNS(n,e)}}function iye(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function OX(e){var t=ow(e);return(t.local?iye:rye)(t)}function aye(){}function O2(e){return e==null?aye:function(){return this.querySelector(e)}}function oye(e){typeof e!="function"&&(e=O2(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,s=r[i]=new Array(o),c,f,h=0;h<o;++h)(c=a[h])&&(f=e.call(c,c.__data__,h,a))&&("__data__"in c&&(f.__data__=c.__data__),s[h]=f);return new li(r,this._parents)}function sye(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function lye(){return[]}function MX(e){return e==null?lye:function(){return this.querySelectorAll(e)}}function cye(e){return function(){return sye(e.apply(this,arguments))}}function uye(e){typeof e=="function"?e=cye(e):e=MX(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,f=0;f<s;++f)(c=o[f])&&(r.push(e.call(c,c.__data__,f,o)),i.push(c));return new li(r,i)}function RX(e){return function(){return this.matches(e)}}function PX(e){return function(t){return t.matches(e)}}var fye=Array.prototype.find;function dye(e){return function(){return fye.call(this.children,e)}}function hye(){return this.firstElementChild}function pye(e){return this.select(e==null?hye:dye(typeof e=="function"?e:PX(e)))}var mye=Array.prototype.filter;function gye(){return Array.from(this.children)}function vye(e){return function(){return mye.call(this.children,e)}}function yye(e){return this.selectAll(e==null?gye:vye(typeof e=="function"?e:PX(e)))}function bye(e){typeof e!="function"&&(e=RX(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,s=r[i]=[],c,f=0;f<o;++f)(c=a[f])&&e.call(c,c.__data__,f,a)&&s.push(c);return new li(r,this._parents)}function kX(e){return new Array(e.length)}function xye(){return new li(this._enter||this._groups.map(kX),this._parents)}function nx(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}nx.prototype={constructor:nx,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 wye(e){return function(){return e}}function Sye(e,t,n,r,i,a){for(var o=0,s,c=t.length,f=a.length;o<f;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new nx(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function _ye(e,t,n,r,i,a,o){var s,c,f=new Map,h=t.length,d=a.length,m=new Array(h),v;for(s=0;s<h;++s)(c=t[s])&&(m[s]=v=o.call(c,c.__data__,s,t)+"",f.has(v)?i[s]=c:f.set(v,c));for(s=0;s<d;++s)v=o.call(e,a[s],s,a)+"",(c=f.get(v))?(r[s]=c,c.__data__=a[s],f.delete(v)):n[s]=new nx(e,a[s]);for(s=0;s<h;++s)(c=t[s])&&f.get(m[s])===c&&(i[s]=c)}function Eye(e){return e.__data__}function Aye(e,t){if(!arguments.length)return Array.from(this,Eye);var n=t?_ye:Sye,r=this._parents,i=this._groups;typeof e!="function"&&(e=wye(e));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),f=0;f<a;++f){var h=r[f],d=i[f],m=d.length,v=Cye(e.call(h,h&&h.__data__,f,r)),x=v.length,w=s[f]=new Array(x),b=o[f]=new Array(x),S=c[f]=new Array(m);n(h,d,w,b,S,v,t);for(var E=0,_=0,A,C;E<x;++E)if(A=w[E]){for(E>=_&&(_=E+1);!(C=b[_])&&++_<x;);A._next=C||null}}return o=new li(o,r),o._enter=s,o._exit=c,o}function Cye(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Tye(){return new li(this._exit||this._groups.map(kX),this._parents)}function jye(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 Nye(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),s=new Array(i),c=0;c<o;++c)for(var f=n[c],h=r[c],d=f.length,m=s[c]=new Array(d),v,x=0;x<d;++x)(v=f[x]||h[x])&&(m[x]=v);for(;c<i;++c)s[c]=n[c];return new li(s,this._parents)}function Oye(){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 Mye(e){e||(e=Rye);function t(d,m){return d&&m?e(d.__data__,m.__data__):!d-!m}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=new Array(s),f,h=0;h<s;++h)(f=o[h])&&(c[h]=f);c.sort(t)}return new li(i,this._parents).order()}function Rye(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Pye(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function kye(){return Array.from(this)}function Dye(){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 Iye(){let e=0;for(const t of this)++e;return e}function Lye(){return!this.node()}function $ye(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Bye(e){return function(){this.removeAttribute(e)}}function qye(e){return function(){this.removeAttributeNS(e.space,e.local)}}function zye(e,t){return function(){this.setAttribute(e,t)}}function Fye(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Vye(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Uye(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 Hye(e,t){var n=ow(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?qye:Bye:typeof t=="function"?n.local?Uye:Vye:n.local?Fye:zye)(n,t))}function DX(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Gye(e){return function(){this.style.removeProperty(e)}}function Kye(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Wye(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Yye(e,t,n){return arguments.length>1?this.each((t==null?Gye:typeof t=="function"?Wye:Kye)(e,t,n??"")):ad(this.node(),e)}function ad(e,t){return e.style.getPropertyValue(t)||DX(e).getComputedStyle(e,null).getPropertyValue(t)}function Xye(e){return function(){delete this[e]}}function Qye(e,t){return function(){this[e]=t}}function Zye(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Jye(e,t){return arguments.length>1?this.each((t==null?Xye:typeof t=="function"?Zye:Qye)(e,t)):this.node()[e]}function IX(e){return e.trim().split(/^|\s+/)}function M2(e){return e.classList||new LX(e)}function LX(e){this._node=e,this._names=IX(e.getAttribute("class")||"")}LX.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 $X(e,t){for(var n=M2(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function BX(e,t){for(var n=M2(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function ebe(e){return function(){$X(this,e)}}function tbe(e){return function(){BX(this,e)}}function nbe(e,t){return function(){(t.apply(this,arguments)?$X:BX)(this,e)}}function rbe(e,t){var n=IX(e+"");if(arguments.length<2){for(var r=M2(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?nbe:t?ebe:tbe)(n,t))}function ibe(){this.textContent=""}function abe(e){return function(){this.textContent=e}}function obe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function sbe(e){return arguments.length?this.each(e==null?ibe:(typeof e=="function"?obe:abe)(e)):this.node().textContent}function lbe(){this.innerHTML=""}function cbe(e){return function(){this.innerHTML=e}}function ube(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function fbe(e){return arguments.length?this.each(e==null?lbe:(typeof e=="function"?ube:cbe)(e)):this.node().innerHTML}function dbe(){this.nextSibling&&this.parentNode.appendChild(this)}function hbe(){return this.each(dbe)}function pbe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mbe(){return this.each(pbe)}function gbe(e){var t=typeof e=="function"?e:OX(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function vbe(){return null}function ybe(e,t){var n=typeof e=="function"?e:OX(e),r=t==null?vbe:typeof t=="function"?t:O2(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function bbe(){var e=this.parentNode;e&&e.removeChild(this)}function xbe(){return this.each(bbe)}function wbe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Sbe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _be(e){return this.select(e?Sbe:wbe)}function Ebe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Abe(e){return function(t){e.call(this,t,this.__data__)}}function Cbe(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 Tbe(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 jbe(e,t,n){return function(){var r=this.__on,i,a=Abe(t);if(r){for(var o=0,s=r.length;o<s;++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 Nbe(e,t,n){var r=Cbe(e+""),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,f=s.length,h;c<f;++c)for(i=0,h=s[c];i<a;++i)if((o=r[i]).type===h.type&&o.name===h.name)return h.value}return}for(s=t?jbe:Tbe,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function qX(e,t,n){var r=DX(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 Obe(e,t){return function(){return qX(this,e,t)}}function Mbe(e,t){return function(){return qX(this,e,t.apply(this,arguments))}}function Rbe(e,t){return this.each((typeof t=="function"?Mbe:Obe)(e,t))}function*Pbe(){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 zX=[null];function li(e,t){this._groups=e,this._parents=t}function Rg(){return new li([[document.documentElement]],zX)}function kbe(){return this}li.prototype=Rg.prototype={constructor:li,select:oye,selectAll:uye,selectChild:pye,selectChildren:yye,filter:bye,data:Aye,enter:xye,exit:Tye,join:jye,merge:Nye,selection:kbe,order:Oye,sort:Mye,call:Pye,nodes:kye,node:Dye,size:Iye,empty:Lye,each:$ye,attr:Hye,style:Yye,property:Jye,classed:rbe,text:sbe,html:fbe,raise:hbe,lower:mbe,append:gbe,insert:ybe,remove:xbe,clone:_be,datum:Ebe,on:Nbe,dispatch:Rbe,[Symbol.iterator]:Pbe};function ri(e){return typeof e=="string"?new li([[document.querySelector(e)]],[document.documentElement]):new li([[e]],zX)}function Dbe(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ji(e,t){if(e=Dbe(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 Ibe={passive:!1},hm={capture:!0,passive:!1};function oE(e){e.stopImmediatePropagation()}function Mf(e){e.preventDefault(),e.stopImmediatePropagation()}function FX(e){var t=e.document.documentElement,n=ri(e).on("dragstart.drag",Mf,hm);"onselectstart"in t?n.on("selectstart.drag",Mf,hm):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function VX(e,t){var n=e.document.documentElement,r=ri(e).on("dragstart.drag",null);t&&(r.on("click.drag",Mf,hm),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 Ry=e=>()=>e;function PM(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:f,dispatch:h}){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:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:h}})}PM.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Lbe(e){return!e.ctrlKey&&!e.button}function $be(){return this.parentNode}function Bbe(e,t){return t??{x:e.x,y:e.y}}function qbe(){return navigator.maxTouchPoints||"ontouchstart"in this}function UX(){var e=Lbe,t=$be,n=Bbe,r=qbe,i={},a=aw("start","drag","end"),o=0,s,c,f,h,d=0;function m(A){A.on("mousedown.drag",v).filter(r).on("touchstart.drag",b).on("touchmove.drag",S,Ibe).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(A,C){if(!(h||!e.call(this,A,C))){var N=_(this,t.call(this,A,C),A,C,"mouse");N&&(ri(A.view).on("mousemove.drag",x,hm).on("mouseup.drag",w,hm),FX(A.view),oE(A),f=!1,s=A.clientX,c=A.clientY,N("start",A))}}function x(A){if(Mf(A),!f){var C=A.clientX-s,N=A.clientY-c;f=C*C+N*N>d}i.mouse("drag",A)}function w(A){ri(A.view).on("mousemove.drag mouseup.drag",null),VX(A.view,f),Mf(A),i.mouse("end",A)}function b(A,C){if(e.call(this,A,C)){var N=A.changedTouches,M=t.call(this,A,C),R=N.length,P,$;for(P=0;P<R;++P)($=_(this,M,A,C,N[P].identifier,N[P]))&&(oE(A),$("start",A,N[P]))}}function S(A){var C=A.changedTouches,N=C.length,M,R;for(M=0;M<N;++M)(R=i[C[M].identifier])&&(Mf(A),R("drag",A,C[M]))}function E(A){var C=A.changedTouches,N=C.length,M,R;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),M=0;M<N;++M)(R=i[C[M].identifier])&&(oE(A),R("end",A,C[M]))}function _(A,C,N,M,R,P){var $=a.copy(),L=Ji(P||N,C),D,F,I;if((I=n.call(A,new PM("beforestart",{sourceEvent:N,target:m,identifier:R,active:o,x:L[0],y:L[1],dx:0,dy:0,dispatch:$}),M))!=null)return D=I.x-L[0]||0,F=I.y-L[1]||0,function q(k,z,H){var G=L,Q;switch(k){case"start":i[R]=q,Q=o++;break;case"end":delete i[R],--o;case"drag":L=Ji(H||z,C),Q=o;break}$.call(k,A,new PM(k,{sourceEvent:z,subject:I,target:m,identifier:R,active:Q,x:L[0]+D,y:L[1]+F,dx:L[0]-G[0],dy:L[1]-G[1],dispatch:$}),M)}}return m.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Ry(!!A),m):e},m.container=function(A){return arguments.length?(t=typeof A=="function"?A:Ry(A),m):t},m.subject=function(A){return arguments.length?(n=typeof A=="function"?A:Ry(A),m):n},m.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Ry(!!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?(d=(A=+A)*A,m):Math.sqrt(d)},m}function R2(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function HX(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Pg(){}var pm=.7,rx=1/pm,Rf="\\s*([+-]?\\d+)\\s*",mm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",$a="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zbe=/^#([0-9a-f]{3,8})$/,Fbe=new RegExp(`^rgb\\(${Rf},${Rf},${Rf}\\)$`),Vbe=new RegExp(`^rgb\\(${$a},${$a},${$a}\\)$`),Ube=new RegExp(`^rgba\\(${Rf},${Rf},${Rf},${mm}\\)$`),Hbe=new RegExp(`^rgba\\(${$a},${$a},${$a},${mm}\\)$`),Gbe=new RegExp(`^hsl\\(${mm},${$a},${$a}\\)$`),Kbe=new RegExp(`^hsla\\(${mm},${$a},${$a},${mm}\\)$`),_B={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};R2(Pg,Xc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:EB,formatHex:EB,formatHex8:Wbe,formatHsl:Ybe,formatRgb:AB,toString:AB});function EB(){return this.rgb().formatHex()}function Wbe(){return this.rgb().formatHex8()}function Ybe(){return GX(this).formatHsl()}function AB(){return this.rgb().formatRgb()}function Xc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=zbe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?CB(t):n===3?new Ir(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Py(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Py(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=Fbe.exec(e))?new Ir(t[1],t[2],t[3],1):(t=Vbe.exec(e))?new Ir(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ube.exec(e))?Py(t[1],t[2],t[3],t[4]):(t=Hbe.exec(e))?Py(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Gbe.exec(e))?NB(t[1],t[2]/100,t[3]/100,1):(t=Kbe.exec(e))?NB(t[1],t[2]/100,t[3]/100,t[4]):_B.hasOwnProperty(e)?CB(_B[e]):e==="transparent"?new Ir(NaN,NaN,NaN,0):null}function CB(e){return new Ir(e>>16&255,e>>8&255,e&255,1)}function Py(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ir(e,t,n,r)}function Xbe(e){return e instanceof Pg||(e=Xc(e)),e?(e=e.rgb(),new Ir(e.r,e.g,e.b,e.opacity)):new Ir}function kM(e,t,n,r){return arguments.length===1?Xbe(e):new Ir(e,t,n,r??1)}function Ir(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}R2(Ir,kM,HX(Pg,{brighter(e){return e=e==null?rx:Math.pow(rx,e),new Ir(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pm:Math.pow(pm,e),new Ir(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ir(Ic(this.r),Ic(this.g),Ic(this.b),ix(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:TB,formatHex:TB,formatHex8:Qbe,formatRgb:jB,toString:jB}));function TB(){return`#${gc(this.r)}${gc(this.g)}${gc(this.b)}`}function Qbe(){return`#${gc(this.r)}${gc(this.g)}${gc(this.b)}${gc((isNaN(this.opacity)?1:this.opacity)*255)}`}function jB(){const e=ix(this.opacity);return`${e===1?"rgb(":"rgba("}${Ic(this.r)}, ${Ic(this.g)}, ${Ic(this.b)}${e===1?")":`, ${e})`}`}function ix(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ic(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function gc(e){return e=Ic(e),(e<16?"0":"")+e.toString(16)}function NB(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new na(e,t,n,r)}function GX(e){if(e instanceof na)return new na(e.h,e.s,e.l,e.opacity);if(e instanceof Pg||(e=Xc(e)),!e)return new na;if(e instanceof na)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,s=a-i,c=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new na(o,s,c,e.opacity)}function Zbe(e,t,n,r){return arguments.length===1?GX(e):new na(e,t,n,r??1)}function na(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}R2(na,Zbe,HX(Pg,{brighter(e){return e=e==null?rx:Math.pow(rx,e),new na(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pm:Math.pow(pm,e),new na(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 Ir(sE(e>=240?e-240:e+120,i,r),sE(e,i,r),sE(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new na(OB(this.h),ky(this.s),ky(this.l),ix(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=ix(this.opacity);return`${e===1?"hsl(":"hsla("}${OB(this.h)}, ${ky(this.s)*100}%, ${ky(this.l)*100}%${e===1?")":`, ${e})`}`}}));function OB(e){return e=(e||0)%360,e<0?e+360:e}function ky(e){return Math.max(0,Math.min(1,e||0))}function sE(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 P2=e=>()=>e;function Jbe(e,t){return function(n){return e+n*t}}function exe(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 txe(e){return(e=+e)==1?KX:function(t,n){return n-t?exe(t,n,e):P2(isNaN(t)?n:t)}}function KX(e,t){var n=t-e;return n?Jbe(e,n):P2(isNaN(e)?t:e)}const ax=(function e(t){var n=txe(t);function r(i,a){var o=n((i=kM(i)).r,(a=kM(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),f=KX(i.opacity,a.opacity);return function(h){return i.r=o(h),i.g=s(h),i.b=c(h),i.opacity=f(h),i+""}}return r.gamma=e,r})(1);function nxe(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 rxe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ixe(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]=Do(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function axe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ta(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function oxe(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]=Do(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var DM=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,lE=new RegExp(DM.source,"g");function sxe(e){return function(){return e}}function lxe(e){return function(t){return e(t)+""}}function WX(e,t){var n=DM.lastIndex=lE.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(r=DM.exec(e))&&(i=lE.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:ta(r,i)})),n=lE.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?lxe(c[0].x):sxe(t):(t=c.length,function(f){for(var h=0,d;h<t;++h)s[(d=c[h]).i]=d.x(f);return s.join("")})}function Do(e,t){var n=typeof t,r;return t==null||n==="boolean"?P2(t):(n==="number"?ta:n==="string"?(r=Xc(t))?(t=r,ax):WX:t instanceof Xc?ax:t instanceof Date?axe:rxe(t)?nxe:Array.isArray(t)?ixe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?oxe:ta)(e,t)}function k2(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var MB=180/Math.PI,IM={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function YX(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*MB,skewX:Math.atan(c)*MB,scaleX:o,scaleY:s}}var Dy;function cxe(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?IM:YX(t.a,t.b,t.c,t.d,t.e,t.f)}function uxe(e){return e==null||(Dy||(Dy=document.createElementNS("http://www.w3.org/2000/svg","g")),Dy.setAttribute("transform",e),!(e=Dy.transform.baseVal.consolidate()))?IM:(e=e.matrix,YX(e.a,e.b,e.c,e.d,e.e,e.f))}function XX(e,t,n,r){function i(f){return f.length?f.pop()+" ":""}function a(f,h,d,m,v,x){if(f!==d||h!==m){var w=v.push("translate(",null,t,null,n);x.push({i:w-4,x:ta(f,d)},{i:w-2,x:ta(h,m)})}else(d||m)&&v.push("translate("+d+t+m+n)}function o(f,h,d,m){f!==h?(f-h>180?h+=360:h-f>180&&(f+=360),m.push({i:d.push(i(d)+"rotate(",null,r)-2,x:ta(f,h)})):h&&d.push(i(d)+"rotate("+h+r)}function s(f,h,d,m){f!==h?m.push({i:d.push(i(d)+"skewX(",null,r)-2,x:ta(f,h)}):h&&d.push(i(d)+"skewX("+h+r)}function c(f,h,d,m,v,x){if(f!==d||h!==m){var w=v.push(i(v)+"scale(",null,",",null,")");x.push({i:w-4,x:ta(f,d)},{i:w-2,x:ta(h,m)})}else(d!==1||m!==1)&&v.push(i(v)+"scale("+d+","+m+")")}return function(f,h){var d=[],m=[];return f=e(f),h=e(h),a(f.translateX,f.translateY,h.translateX,h.translateY,d,m),o(f.rotate,h.rotate,d,m),s(f.skewX,h.skewX,d,m),c(f.scaleX,f.scaleY,h.scaleX,h.scaleY,d,m),f=h=null,function(v){for(var x=-1,w=m.length,b;++x<w;)d[(b=m[x]).i]=b.x(v);return d.join("")}}}var fxe=XX(cxe,"px, ","px)","deg)"),dxe=XX(uxe,", ",")",")"),hxe=1e-12;function RB(e){return((e=Math.exp(e))+1/e)/2}function pxe(e){return((e=Math.exp(e))-1/e)/2}function mxe(e){return((e=Math.exp(2*e))-1)/(e+1)}const pb=(function e(t,n,r){function i(a,o){var s=a[0],c=a[1],f=a[2],h=o[0],d=o[1],m=o[2],v=h-s,x=d-c,w=v*v+x*x,b,S;if(w<hxe)S=Math.log(m/f)/t,b=function(M){return[s+M*v,c+M*x,f*Math.exp(t*M*S)]};else{var E=Math.sqrt(w),_=(m*m-f*f+r*w)/(2*f*n*E),A=(m*m-f*f-r*w)/(2*m*n*E),C=Math.log(Math.sqrt(_*_+1)-_),N=Math.log(Math.sqrt(A*A+1)-A);S=(N-C)/t,b=function(M){var R=M*S,P=RB(C),$=f/(n*E)*(P*mxe(t*R+C)-pxe(C));return[s+$*v,c+$*x,f*P/RB(t*R+C)]}}return b.duration=S*1e3*t/Math.SQRT2,b}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,c=s*s;return e(o,s,c)},i})(Math.SQRT2,2,4);function gxe(e,t){t===void 0&&(t=e,e=Do);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 s=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[s](o-s)}}var od=0,Np=0,hp=0,QX=1e3,ox,Op,sx=0,Qc=0,sw=0,gm=typeof performance=="object"&&performance.now?performance:Date,ZX=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function D2(){return Qc||(ZX(vxe),Qc=gm.now()+sw)}function vxe(){Qc=0}function lx(){this._call=this._time=this._next=null}lx.prototype=JX.prototype={constructor:lx,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?D2():+n)+(t==null?0:+t),!this._next&&Op!==this&&(Op?Op._next=this:ox=this,Op=this),this._call=e,this._time=n,LM()},stop:function(){this._call&&(this._call=null,this._time=1/0,LM())}};function JX(e,t,n){var r=new lx;return r.restart(e,t,n),r}function yxe(){D2(),++od;for(var e=ox,t;e;)(t=Qc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--od}function PB(){Qc=(sx=gm.now())+sw,od=Np=0;try{yxe()}finally{od=0,xxe(),Qc=0}}function bxe(){var e=gm.now(),t=e-sx;t>QX&&(sw-=t,sx=e)}function xxe(){for(var e,t=ox,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:ox=n);Op=e,LM(r)}function LM(e){if(!od){Np&&(Np=clearTimeout(Np));var t=e-Qc;t>24?(e<1/0&&(Np=setTimeout(PB,e-gm.now()-sw)),hp&&(hp=clearInterval(hp))):(hp||(sx=gm.now(),hp=setInterval(bxe,QX)),od=1,ZX(PB))}}function kB(e,t,n){var r=new lx;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var wxe=aw("start","end","cancel","interrupt"),Sxe=[],eQ=0,DB=1,$M=2,mb=3,IB=4,BM=5,gb=6;function lw(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;_xe(e,n,{name:t,index:r,group:i,on:wxe,tween:Sxe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:eQ})}function I2(e,t){var n=pa(e,t);if(n.state>eQ)throw new Error("too late; already scheduled");return n}function Ya(e,t){var n=pa(e,t);if(n.state>mb)throw new Error("too late; already running");return n}function pa(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _xe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=JX(a,0,n.time);function a(f){n.state=DB,n.timer.restart(o,n.delay,n.time),n.delay<=f&&o(f-n.delay)}function o(f){var h,d,m,v;if(n.state!==DB)return c();for(h in r)if(v=r[h],v.name===n.name){if(v.state===mb)return kB(o);v.state===IB?(v.state=gb,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete r[h]):+h<t&&(v.state=gb,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete r[h])}if(kB(function(){n.state===mb&&(n.state=IB,n.timer.restart(s,n.delay,n.time),s(f))}),n.state=$M,n.on.call("start",e,e.__data__,n.index,n.group),n.state===$M){for(n.state=mb,i=new Array(m=n.tween.length),h=0,d=-1;h<m;++h)(v=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=v);i.length=d+1}}function s(f){for(var h=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(c),n.state=BM,1),d=-1,m=i.length;++d<m;)i[d].call(e,h);n.state===BM&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=gb,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function vb(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>$M&&r.state<BM,r.state=gb,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Exe(e){return this.each(function(){vb(this,e)})}function Axe(e,t){var n,r;return function(){var i=Ya(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Cxe(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=Ya(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,f=i.length;c<f;++c)if(i[c].name===t){i[c]=s;break}c===f&&i.push(s)}a.tween=i}}function Txe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=pa(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?Axe:Cxe)(n,e,t))}function L2(e,t,n){var r=e._id;return e.each(function(){var i=Ya(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return pa(i,r).value[t]}}function tQ(e,t){var n;return(typeof t=="number"?ta:t instanceof Xc?ax:(n=Xc(t))?(t=n,ax):WX)(e,t)}function jxe(e){return function(){this.removeAttribute(e)}}function Nxe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Oxe(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 Mxe(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 Rxe(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Pxe(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+"",o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function kxe(e,t){var n=ow(e),r=n==="transform"?dxe:tQ;return this.attrTween(e,typeof t=="function"?(n.local?Pxe:Rxe)(n,r,L2(this,"attr."+e,t)):t==null?(n.local?Nxe:jxe)(n):(n.local?Mxe:Oxe)(n,r,t))}function Dxe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Ixe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Lxe(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Ixe(e,a)),n}return i._value=t,i}function $xe(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Dxe(e,a)),n}return i._value=t,i}function Bxe(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=ow(e);return this.tween(n,(r.local?Lxe:$xe)(r,t))}function qxe(e,t){return function(){I2(this,e).delay=+t.apply(this,arguments)}}function zxe(e,t){return t=+t,function(){I2(this,e).delay=t}}function Fxe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?qxe:zxe)(t,e)):pa(this.node(),t).delay}function Vxe(e,t){return function(){Ya(this,e).duration=+t.apply(this,arguments)}}function Uxe(e,t){return t=+t,function(){Ya(this,e).duration=t}}function Hxe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Vxe:Uxe)(t,e)):pa(this.node(),t).duration}function Gxe(e,t){if(typeof t!="function")throw new Error;return function(){Ya(this,e).ease=t}}function Kxe(e){var t=this._id;return arguments.length?this.each(Gxe(t,e)):pa(this.node(),t).ease}function Wxe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ya(this,e).ease=n}}function Yxe(e){if(typeof e!="function")throw new Error;return this.each(Wxe(this._id,e))}function Xxe(e){typeof e!="function"&&(e=RX(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,s=r[i]=[],c,f=0;f<o;++f)(c=a[f])&&e.call(c,c.__data__,f,a)&&s.push(c);return new Ho(r,this._parents,this._name,this._id)}function Qxe(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),s=0;s<a;++s)for(var c=t[s],f=n[s],h=c.length,d=o[s]=new Array(h),m,v=0;v<h;++v)(m=c[v]||f[v])&&(d[v]=m);for(;s<r;++s)o[s]=t[s];return new Ho(o,this._parents,this._name,this._id)}function Zxe(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 Jxe(e,t,n){var r,i,a=Zxe(t)?I2:Ya;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function e0e(e,t){var n=this._id;return arguments.length<2?pa(this.node(),n).on.on(e):this.each(Jxe(n,e,t))}function t0e(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function n0e(){return this.on("end.remove",t0e(this._id))}function r0e(e){var t=this._name,n=this._id;typeof e!="function"&&(e=O2(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,f=a[o]=new Array(c),h,d,m=0;m<c;++m)(h=s[m])&&(d=e.call(h,h.__data__,m,s))&&("__data__"in h&&(d.__data__=h.__data__),f[m]=d,lw(f[m],t,n,m,f,pa(h,n)));return new Ho(a,this._parents,t,n)}function i0e(e){var t=this._name,n=this._id;typeof e!="function"&&(e=MX(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],f=c.length,h,d=0;d<f;++d)if(h=c[d]){for(var m=e.call(h,h.__data__,d,c),v,x=pa(h,n),w=0,b=m.length;w<b;++w)(v=m[w])&&lw(v,t,n,w,m,x);a.push(m),o.push(h)}return new Ho(a,o,t,n)}var a0e=Rg.prototype.constructor;function o0e(){return new a0e(this._groups,this._parents)}function s0e(e,t){var n,r,i;return function(){var a=ad(this,e),o=(this.style.removeProperty(e),ad(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function nQ(e){return function(){this.style.removeProperty(e)}}function l0e(e,t,n){var r,i=n+"",a;return function(){var o=ad(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function c0e(e,t,n){var r,i,a;return function(){var o=ad(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),ad(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function u0e(e,t){var n,r,i,a="style."+t,o="end."+a,s;return function(){var c=Ya(this,e),f=c.on,h=c.value[a]==null?s||(s=nQ(t)):void 0;(f!==n||i!==h)&&(r=(n=f).copy()).on(o,i=h),c.on=r}}function f0e(e,t,n){var r=(e+="")=="transform"?fxe:tQ;return t==null?this.styleTween(e,s0e(e,r)).on("end.style."+e,nQ(e)):typeof t=="function"?this.styleTween(e,c0e(e,r,L2(this,"style."+e,t))).each(u0e(this._id,e)):this.styleTween(e,l0e(e,r,t),n).on("end.style."+e,null)}function d0e(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function h0e(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&d0e(e,o,n)),r}return a._value=t,a}function p0e(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,h0e(e,t,n??""))}function m0e(e){return function(){this.textContent=e}}function g0e(e){return function(){var t=e(this);this.textContent=t??""}}function v0e(e){return this.tween("text",typeof e=="function"?g0e(L2(this,"text",e)):m0e(e==null?"":e+""))}function y0e(e){return function(t){this.textContent=e.call(this,t)}}function b0e(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&y0e(i)),t}return r._value=e,r}function x0e(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,b0e(e))}function w0e(){for(var e=this._name,t=this._id,n=rQ(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,f=0;f<s;++f)if(c=o[f]){var h=pa(c,t);lw(c,e,n,f,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ho(r,this._parents,e,n)}function S0e(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var f=Ya(this,r),h=f.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),f.on=t}),i===0&&a()})}var _0e=0;function Ho(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function rQ(){return++_0e}var wo=Rg.prototype;Ho.prototype={constructor:Ho,select:r0e,selectAll:i0e,selectChild:wo.selectChild,selectChildren:wo.selectChildren,filter:Xxe,merge:Qxe,selection:o0e,transition:w0e,call:wo.call,nodes:wo.nodes,node:wo.node,size:wo.size,empty:wo.empty,each:wo.each,on:e0e,attr:kxe,attrTween:Bxe,style:f0e,styleTween:p0e,text:v0e,textTween:x0e,remove:n0e,tween:Txe,delay:Fxe,duration:Hxe,ease:Kxe,easeVarying:Yxe,end:S0e,[Symbol.iterator]:wo[Symbol.iterator]};function E0e(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var A0e={time:null,delay:0,duration:250,ease:E0e};function C0e(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 T0e(e){var t,n;e instanceof Ho?(t=e._id,e=e._name):(t=rQ(),(n=A0e).time=D2(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,f=0;f<s;++f)(c=o[f])&&lw(c,e,t,f,o,n||C0e(c,t));return new Ho(r,this._parents,e,t)}Rg.prototype.interrupt=Exe;Rg.prototype.transition=T0e;const Iy=e=>()=>e;function j0e(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 Oo(e,t,n){this.k=e,this.x=t,this.y=n}Oo.prototype={constructor:Oo,scale:function(e){return e===1?this:new Oo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Oo(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 cw=new Oo(1,0,0);iQ.prototype=Oo.prototype;function iQ(e){for(;!e.__zoom;)if(!(e=e.parentNode))return cw;return e.__zoom}function cE(e){e.stopImmediatePropagation()}function pp(e){e.preventDefault(),e.stopImmediatePropagation()}function N0e(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function O0e(){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 LB(){return this.__zoom||cw}function M0e(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function R0e(){return navigator.maxTouchPoints||"ontouchstart"in this}function P0e(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 aQ(){var e=N0e,t=O0e,n=P0e,r=M0e,i=R0e,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,c=pb,f=aw("start","zoom","end"),h,d,m,v=500,x=150,w=0,b=10;function S(I){I.property("__zoom",LB).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",$).filter(i).on("touchstart.zoom",L).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(I,q,k,z){var H=I.selection?I.selection():I;H.property("__zoom",LB),I!==H?C(I,q,k,z):H.interrupt().each(function(){N(this,arguments).event(z).start().zoom(null,typeof q=="function"?q.apply(this,arguments):q).end()})},S.scaleBy=function(I,q,k,z){S.scaleTo(I,function(){var H=this.__zoom.k,G=typeof q=="function"?q.apply(this,arguments):q;return H*G},k,z)},S.scaleTo=function(I,q,k,z){S.transform(I,function(){var H=t.apply(this,arguments),G=this.__zoom,Q=k==null?A(H):typeof k=="function"?k.apply(this,arguments):k,U=G.invert(Q),V=typeof q=="function"?q.apply(this,arguments):q;return n(_(E(G,V),Q,U),H,o)},k,z)},S.translateBy=function(I,q,k,z){S.transform(I,function(){return n(this.__zoom.translate(typeof q=="function"?q.apply(this,arguments):q,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),o)},null,z)},S.translateTo=function(I,q,k,z,H){S.transform(I,function(){var G=t.apply(this,arguments),Q=this.__zoom,U=z==null?A(G):typeof z=="function"?z.apply(this,arguments):z;return n(cw.translate(U[0],U[1]).scale(Q.k).translate(typeof q=="function"?-q.apply(this,arguments):-q,typeof k=="function"?-k.apply(this,arguments):-k),G,o)},z,H)};function E(I,q){return q=Math.max(a[0],Math.min(a[1],q)),q===I.k?I:new Oo(q,I.x,I.y)}function _(I,q,k){var z=q[0]-k[0]*I.k,H=q[1]-k[1]*I.k;return z===I.x&&H===I.y?I:new Oo(I.k,z,H)}function A(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function C(I,q,k,z){I.on("start.zoom",function(){N(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(z).end()}).tween("zoom",function(){var H=this,G=arguments,Q=N(H,G).event(z),U=t.apply(H,G),V=k==null?A(U):typeof k=="function"?k.apply(H,G):k,X=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),W=H.__zoom,K=typeof q=="function"?q.apply(H,G):q,J=c(W.invert(V).concat(X/W.k),K.invert(V).concat(X/K.k));return function(ee){if(ee===1)ee=K;else{var te=J(ee),ne=X/te[2];ee=new Oo(ne,V[0]-te[0]*ne,V[1]-te[1]*ne)}Q.zoom(null,ee)}})}function N(I,q,k){return!k&&I.__zooming||new M(I,q)}function M(I,q){this.that=I,this.args=q,this.active=0,this.sourceEvent=null,this.extent=t.apply(I,q),this.taps=0}M.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,q){return this.mouse&&I!=="mouse"&&(this.mouse[1]=q.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=q.invert(this.touch0[0])),this.touch1&&I!=="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(I){var q=ri(this.that).datum();f.call(I,this.that,new j0e(I,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:f}),q)}};function R(I,...q){if(!e.apply(this,arguments))return;var k=N(this,q).event(I),z=this.__zoom,H=Math.max(a[0],Math.min(a[1],z.k*Math.pow(2,r.apply(this,arguments)))),G=Ji(I);if(k.wheel)(k.mouse[0][0]!==G[0]||k.mouse[0][1]!==G[1])&&(k.mouse[1]=z.invert(k.mouse[0]=G)),clearTimeout(k.wheel);else{if(z.k===H)return;k.mouse=[G,z.invert(G)],vb(this),k.start()}pp(I),k.wheel=setTimeout(Q,x),k.zoom("mouse",n(_(E(z,H),k.mouse[0],k.mouse[1]),k.extent,o));function Q(){k.wheel=null,k.end()}}function P(I,...q){if(m||!e.apply(this,arguments))return;var k=I.currentTarget,z=N(this,q,!0).event(I),H=ri(I.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",X,!0),G=Ji(I,k),Q=I.clientX,U=I.clientY;FX(I.view),cE(I),z.mouse=[G,this.__zoom.invert(G)],vb(this),z.start();function V(W){if(pp(W),!z.moved){var K=W.clientX-Q,J=W.clientY-U;z.moved=K*K+J*J>w}z.event(W).zoom("mouse",n(_(z.that.__zoom,z.mouse[0]=Ji(W,k),z.mouse[1]),z.extent,o))}function X(W){H.on("mousemove.zoom mouseup.zoom",null),VX(W.view,z.moved),pp(W),z.event(W).end()}}function $(I,...q){if(e.apply(this,arguments)){var k=this.__zoom,z=Ji(I.changedTouches?I.changedTouches[0]:I,this),H=k.invert(z),G=k.k*(I.shiftKey?.5:2),Q=n(_(E(k,G),z,H),t.apply(this,q),o);pp(I),s>0?ri(this).transition().duration(s).call(C,Q,z,I):ri(this).call(S.transform,Q,z,I)}}function L(I,...q){if(e.apply(this,arguments)){var k=I.touches,z=k.length,H=N(this,q,I.changedTouches.length===z).event(I),G,Q,U,V;for(cE(I),Q=0;Q<z;++Q)U=k[Q],V=Ji(U,this),V=[V,this.__zoom.invert(V),U.identifier],H.touch0?!H.touch1&&H.touch0[2]!==V[2]&&(H.touch1=V,H.taps=0):(H.touch0=V,G=!0,H.taps=1+!!h);h&&(h=clearTimeout(h)),G&&(H.taps<2&&(d=V[0],h=setTimeout(function(){h=null},v)),vb(this),H.start())}}function D(I,...q){if(this.__zooming){var k=N(this,q).event(I),z=I.changedTouches,H=z.length,G,Q,U,V;for(pp(I),G=0;G<H;++G)Q=z[G],U=Ji(Q,this),k.touch0&&k.touch0[2]===Q.identifier?k.touch0[0]=U:k.touch1&&k.touch1[2]===Q.identifier&&(k.touch1[0]=U);if(Q=k.that.__zoom,k.touch1){var X=k.touch0[0],W=k.touch0[1],K=k.touch1[0],J=k.touch1[1],ee=(ee=K[0]-X[0])*ee+(ee=K[1]-X[1])*ee,te=(te=J[0]-W[0])*te+(te=J[1]-W[1])*te;Q=E(Q,Math.sqrt(ee/te)),U=[(X[0]+K[0])/2,(X[1]+K[1])/2],V=[(W[0]+J[0])/2,(W[1]+J[1])/2]}else if(k.touch0)U=k.touch0[0],V=k.touch0[1];else return;k.zoom("touch",n(_(Q,U,V),k.extent,o))}}function F(I,...q){if(this.__zooming){var k=N(this,q).event(I),z=I.changedTouches,H=z.length,G,Q;for(cE(I),m&&clearTimeout(m),m=setTimeout(function(){m=null},v),G=0;G<H;++G)Q=z[G],k.touch0&&k.touch0[2]===Q.identifier?delete k.touch0:k.touch1&&k.touch1[2]===Q.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(Q=Ji(Q,this),Math.hypot(d[0]-Q[0],d[1]-Q[1])<b)){var U=ri(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return S.wheelDelta=function(I){return arguments.length?(r=typeof I=="function"?I:Iy(+I),S):r},S.filter=function(I){return arguments.length?(e=typeof I=="function"?I:Iy(!!I),S):e},S.touchable=function(I){return arguments.length?(i=typeof I=="function"?I:Iy(!!I),S):i},S.extent=function(I){return arguments.length?(t=typeof I=="function"?I:Iy([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),S):t},S.scaleExtent=function(I){return arguments.length?(a[0]=+I[0],a[1]=+I[1],S):[a[0],a[1]]},S.translateExtent=function(I){return arguments.length?(o[0][0]=+I[0][0],o[1][0]=+I[1][0],o[0][1]=+I[0][1],o[1][1]=+I[1][1],S):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},S.constrain=function(I){return arguments.length?(n=I,S):n},S.duration=function(I){return arguments.length?(s=+I,S):s},S.interpolate=function(I){return arguments.length?(c=I,S):c},S.on=function(){var I=f.on.apply(f,arguments);return I===f?S:I},S.clickDistance=function(I){return arguments.length?(w=(I=+I)*I,S):Math.sqrt(w)},S.tapDistance=function(I){return arguments.length?(b=+I,S):b},S}const Ua={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."},vm=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],oQ=["Enter"," ","Escape"],sQ={"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 sd;(function(e){e.Strict="strict",e.Loose="loose"})(sd||(sd={}));var Lc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Lc||(Lc={}));var ym;(function(e){e.Partial="partial",e.Full="full"})(ym||(ym={}));const lQ={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Xs;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Xs||(Xs={}));var cx;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(cx||(cx={}));var Ie;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ie||(Ie={}));const $B={[Ie.Left]:Ie.Right,[Ie.Right]:Ie.Left,[Ie.Top]:Ie.Bottom,[Ie.Bottom]:Ie.Top};function cQ(e){return e===null?null:e?"valid":"invalid"}const uQ=e=>"id"in e&&"source"in e&&"target"in e,k0e=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),$2=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),kg=(e,t=[0,0])=>{const{width:n,height:r}=es(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},D0e=(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):$2(i)?i:t.nodeLookup.get(i.id));const s=o?ux(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return uw(r,s)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return fw(n)},Dg=(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=uw(n,ux(i)),r=!0)}),r?fw(n):{x:0,y:0,width:0,height:0}},B2=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{const s={...Lg(t,[n,r,i]),width:t.width/i,height:t.height/i},c=[];for(const f of e.values()){const{measured:h,selectable:d=!0,hidden:m=!1}=f;if(o&&!d||m)continue;const v=h.width??f.width??f.initialWidth??null,x=h.height??f.height??f.initialHeight??null,w=bm(s,cd(f)),b=(v??0)*(x??0),S=a&&w>0;(!f.internals.handleBounds||S||w>=b||f.dragging)&&c.push(f)}return c},I0e=(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 L0e(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 $0e({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);const s=L0e(e,o),c=Dg(s),f=q2(c,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 fQ({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){const o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:f}=s?s.internals.positionAbsolute:{x:0,y:0},h=o.origin??r;let d=o.extent||i;if(o.extent==="parent"&&!o.expandParent)if(!s)a==null||a("005",Ua.error005());else{const v=s.measured.width,x=s.measured.height;v&&x&&(d=[[c,f],[c+v,f+x]])}else s&&ud(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+f],[o.extent[1][0]+c,o.extent[1][1]+f]]);const m=ud(d)?Zc(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",Ua.error015())),{position:{x:m.x-c+(o.measured.width??0)*h[0],y:m.y-f+(o.measured.height??0)*h[1]},positionAbsolute:m}}async function B0e({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 v=a.has(m.id),x=!v&&m.parentId&&o.find(w=>w.id===m.parentId);(v||x)&&o.push(m)}const s=new Set(t.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),h=I0e(o,c);for(const m of c)s.has(m.id)&&!h.find(x=>x.id===m.id)&&h.push(m);if(!i)return{edges:h,nodes:o};const d=await i({nodes:o,edges:h});return typeof d=="boolean"?d?{edges:h,nodes:o}:{edges:[],nodes:[]}:d}const ld=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Zc=(e={x:0,y:0},t,n)=>({x:ld(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:ld(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function dQ(e,t,n){const{width:r,height:i}=es(n),{x:a,y:o}=n.internals.positionAbsolute;return Zc(e,[[a,o],[a+r,o+i]],t)}const BB=(e,t,n)=>e<t?ld(Math.abs(e-t),1,t)/t:e>n?-ld(Math.abs(e-n),1,t)/t:0,hQ=(e,t,n=15,r=40)=>{const i=BB(e.x,r,t.width-r)*n,a=BB(e.y,r,t.height-r)*n;return[i,a]},uw=(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)}),qM=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),fw=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),cd=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=$2(e)?e.internals.positionAbsolute:kg(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}},ux=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=$2(e)?e.internals.positionAbsolute:kg(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)}},pQ=(e,t)=>fw(uw(qM(e),qM(t))),bm=(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)},qB=e=>ia(e.width)&&ia(e.height)&&ia(e.x)&&ia(e.y),ia=e=>!isNaN(e)&&isFinite(e),q0e=(e,t)=>{},Ig=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Lg=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{const s={x:(e-n)/i,y:(t-r)/i};return a?Ig(s,o):s},fx=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function of(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 z0e(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=of(e,n),i=of(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=of(e.top??e.y??0,n),i=of(e.bottom??e.y??0,n),a=of(e.left??e.x??0,t),o=of(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 F0e(e,t,n,r,i,a){const{x:o,y:s}=fx(e,[t,n,r]),{x:c,y:f}=fx({x:e.x+e.width,y:e.y+e.height},[t,n,r]),h=i-c,d=a-f;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(h),bottom:Math.floor(d)}}const q2=(e,t,n,r,i,a)=>{const o=z0e(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,f=Math.min(s,c),h=ld(f,r,i),d=e.x+e.width/2,m=e.y+e.height/2,v=t/2-d*h,x=n/2-m*h,w=F0e(e,v,x,h,t,n),b={left:Math.min(w.left-o.left,0),top:Math.min(w.top-o.top,0),right:Math.min(w.right-o.right,0),bottom:Math.min(w.bottom-o.bottom,0)};return{x:v-b.left+b.right,y:x-b.top+b.bottom,zoom:h}},xm=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function ud(e){return e!=null&&e!=="parent"}function es(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 mQ(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 gQ(e,t={width:0,height:0},n,r,i){const a={...e},o=r.get(n);if(o){const s=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*s[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*s[1]}return a}function zB(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function V0e(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function U0e(e){return{...sQ,...e||{}}}function Bp(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:a,y:o}=aa(e),s=Lg({x:a-((i==null?void 0:i.left)??0),y:o-((i==null?void 0:i.top)??0)},r),{x:c,y:f}=n?Ig(s,t):s;return{xSnapped:c,ySnapped:f,...s}}const z2=e=>({width:e.offsetWidth,height:e.offsetHeight}),vQ=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},H0e=["INPUT","SELECT","TEXTAREA"];function yQ(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:H0e.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const bQ=e=>"clientX"in e,aa=(e,t)=>{var a,o;const n=bQ(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)}},FB=(e,t,n,r,i)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const s=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:i,position:o.getAttribute("data-handlepos"),x:(s.left-n.left)/r,y:(s.top-n.top)/r,...z2(o)}})};function xQ({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){const c=e*.125+i*.375+o*.375+n*.125,f=t*.125+a*.375+s*.375+r*.125,h=Math.abs(c-e),d=Math.abs(f-t);return[c,f,h,d]}function Ly(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function VB({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case Ie.Left:return[t-Ly(t-r,a),n];case Ie.Right:return[t+Ly(r-t,a),n];case Ie.Top:return[t,n-Ly(n-i,a)];case Ie.Bottom:return[t,n+Ly(i-n,a)]}}function wQ({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top,curvature:o=.25}){const[s,c]=VB({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[f,h]=VB({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,m,v,x]=xQ({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:f,targetControlY:h});return[`M${e},${t} C${s},${c} ${f},${h} ${r},${i}`,d,m,v,x]}function SQ({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,s=r<t?r+o:r-o;return[a,s,i,o]}function G0e({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,s=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return o+s}function K0e({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const a=uw(ux(e),ux(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 bm(o,fw(a))>0}const W0e=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Y0e=(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)),X0e=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||W0e;let i;return uQ(e)?i={...e}:i={...e,id:r(e)},Y0e(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function _Q({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,a,o,s]=SQ({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}const UB={[Ie.Left]:{x:-1,y:0},[Ie.Right]:{x:1,y:0},[Ie.Top]:{x:0,y:-1},[Ie.Bottom]:{x:0,y:1}},Q0e=({source:e,sourcePosition:t=Ie.Bottom,target:n})=>t===Ie.Left||t===Ie.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},HB=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Z0e({source:e,sourcePosition:t=Ie.Bottom,target:n,targetPosition:r=Ie.Top,center:i,offset:a,stepPosition:o}){const s=UB[t],c=UB[r],f={x:e.x+s.x*a,y:e.y+s.y*a},h={x:n.x+c.x*a,y:n.y+c.y*a},d=Q0e({source:f,sourcePosition:t,target:h}),m=d.x!==0?"x":"y",v=d[m];let x=[],w,b;const S={x:0,y:0},E={x:0,y:0},[,,_,A]=SQ({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[m]*c[m]===-1){m==="x"?(w=i.x??f.x+(h.x-f.x)*o,b=i.y??(f.y+h.y)/2):(w=i.x??(f.x+h.x)/2,b=i.y??f.y+(h.y-f.y)*o);const R=[{x:w,y:f.y},{x:w,y:h.y}],P=[{x:f.x,y:b},{x:h.x,y:b}];s[m]===v?x=m==="x"?R:P:x=m==="x"?P:R}else{const R=[{x:f.x,y:h.y}],P=[{x:h.x,y:f.y}];if(m==="x"?x=s.x===v?P:R:x=s.y===v?R:P,t===r){const I=Math.abs(e[m]-n[m]);if(I<=a){const q=Math.min(a-1,a-I);s[m]===v?S[m]=(f[m]>e[m]?-1:1)*q:E[m]=(h[m]>n[m]?-1:1)*q}}if(t!==r){const I=m==="x"?"y":"x",q=s[m]===c[I],k=f[I]>h[I],z=f[I]<h[I];(s[m]===1&&(!q&&k||q&&z)||s[m]!==1&&(!q&&z||q&&k))&&(x=m==="x"?R:P)}const $={x:f.x+S.x,y:f.y+S.y},L={x:h.x+E.x,y:h.y+E.y},D=Math.max(Math.abs($.x-x[0].x),Math.abs(L.x-x[0].x)),F=Math.max(Math.abs($.y-x[0].y),Math.abs(L.y-x[0].y));D>=F?(w=($.x+L.x)/2,b=x[0].y):(w=x[0].x,b=($.y+L.y)/2)}const C={x:f.x+S.x,y:f.y+S.y},N={x:h.x+E.x,y:h.y+E.y};return[[e,...C.x!==x[0].x||C.y!==x[0].y?[C]:[],...x,...N.x!==x[x.length-1].x||N.y!==x[x.length-1].y?[N]:[],n],w,b,_,A]}function J0e(e,t,n,r){const i=Math.min(HB(e,t)/2,HB(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,h=e.y<n.y?1:-1;return`L ${a+i*f},${o}Q ${a},${o} ${a},${o+i*h}`}const s=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${a},${o+i*c}Q ${a},${o} ${a+i*s},${o}`}function zM({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top,borderRadius:o=5,centerX:s,centerY:c,offset:f=20,stepPosition:h=.5}){const[d,m,v,x,w]=Z0e({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:f,stepPosition:h});let b=`M${d[0].x} ${d[0].y}`;for(let S=1;S<d.length-1;S++)b+=J0e(d[S-1],d[S],d[S+1],o);return b+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[b,m,v,x,w]}function GB(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function ewe(e){var d;const{sourceNode:t,targetNode:n}=e;if(!GB(t)||!GB(n))return null;const r=t.internals.handleBounds||KB(t.handles),i=n.internals.handleBounds||KB(n.handles),a=WB((r==null?void 0:r.source)??[],e.sourceHandle),o=WB(e.connectionMode===sd.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(d=e.onError)==null||d.call(e,"008",Ua.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const s=(a==null?void 0:a.position)||Ie.Bottom,c=(o==null?void 0:o.position)||Ie.Top,f=Jc(t,a,s),h=Jc(n,o,c);return{sourceX:f.x,sourceY:f.y,targetX:h.x,targetY:h.y,sourcePosition:s,targetPosition:c}}function KB(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 Jc(e,t,n=Ie.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??es(e);if(r)return{x:i+o/2,y:a+s/2};switch((t==null?void 0:t.position)??n){case Ie.Top:return{x:i+o/2,y:a};case Ie.Right:return{x:i+o,y:a+s/2};case Ie.Bottom:return{x:i+o/2,y:a+s};case Ie.Left:return{x:i,y:a+s/2}}}function WB(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function FM(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function twe(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const a=new Set;return e.reduce((o,s)=>([s.markerStart||r,s.markerEnd||i].forEach(c=>{if(c&&typeof c=="object"){const f=FM(c,t);a.has(f)||(o.push({id:f,color:c.color||n,...c}),a.add(f))}}),o),[]).sort((o,s)=>o.id.localeCompare(s.id))}const EQ=1e3,nwe=10,F2={nodeOrigin:[0,0],nodeExtent:vm,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},rwe={...F2,checkEquality:!0};function V2(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function iwe(e,t,n){const r=V2(F2,n);for(const i of e.values())if(i.parentId)H2(i,e,t,r);else{const a=kg(i,r.nodeOrigin),o=ud(i.extent)?i.extent:r.nodeExtent,s=Zc(a,o,es(i));i.internals.positionAbsolute=s}}function awe(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 U2(e){return e==="manual"}function VM(e,t,n,r={}){var h,d;const i=V2(rwe,r),a={i:0},o=new Map(t),s=i!=null&&i.elevateNodesOnSelect&&!U2(i.zIndexMode)?EQ:0;let c=e.length>0,f=!1;t.clear(),n.clear();for(const m of e){let v=o.get(m.id);if(i.checkEquality&&m===(v==null?void 0:v.internals.userNode))t.set(m.id,v);else{const x=kg(m,i.nodeOrigin),w=ud(m.extent)?m.extent:i.nodeExtent,b=Zc(x,w,es(m));v={...i.defaults,...m,measured:{width:(h=m.measured)==null?void 0:h.width,height:(d=m.measured)==null?void 0:d.height},internals:{positionAbsolute:b,handleBounds:awe(m,v),z:AQ(m,s,i.zIndexMode),userNode:m}},t.set(m.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(c=!1),m.parentId&&H2(v,t,n,r,a),f||(f=m.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:f}}function owe(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 H2(e,t,n,r,i){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:s,zIndexMode:c}=V2(F2,r),f=e.parentId,h=t.get(f);if(!h){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}owe(e,n),i&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++i.i,h.internals.z=h.internals.z+i.i*nwe),i&&h.internals.rootParentIndex!==void 0&&(i.i=h.internals.rootParentIndex);const d=a&&!U2(c)?EQ:0,{x:m,y:v,z:x}=swe(e,h,o,s,d,c),{positionAbsolute:w}=e.internals,b=m!==w.x||v!==w.y;(b||x!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:m,y:v}:w,z:x}})}function AQ(e,t,n){const r=ia(e.zIndex)?e.zIndex:0;return U2(n)?r:r+(e.selected?t:0)}function swe(e,t,n,r,i,a){const{x:o,y:s}=t.internals.positionAbsolute,c=es(e),f=kg(e,n),h=ud(e.extent)?Zc(f,e.extent,c):f;let d=Zc({x:o+h.x,y:s+h.y},r,c);e.extent==="parent"&&(d=dQ(d,c,t));const m=AQ(e,i,a),v=t.internals.z??0;return{x:d.x,y:d.y,z:v>=m?v+1:m}}function G2(e,t,n,r=[0,0]){var o;const i=[],a=new Map;for(const s of e){const c=t.get(s.parentId);if(!c)continue;const f=((o=a.get(s.parentId))==null?void 0:o.expandedRect)??cd(c),h=pQ(f,s.rect);a.set(s.parentId,{expandedRect:h,parent:c})}return a.size>0&&a.forEach(({expandedRect:s,parent:c},f)=>{var _;const h=c.internals.positionAbsolute,d=es(c),m=c.origin??r,v=s.x<h.x?Math.round(Math.abs(h.x-s.x)):0,x=s.y<h.y?Math.round(Math.abs(h.y-s.y)):0,w=Math.max(d.width,Math.round(s.width)),b=Math.max(d.height,Math.round(s.height)),S=(w-d.width)*m[0],E=(b-d.height)*m[1];(v>0||x>0||S||E)&&(i.push({id:f,type:"position",position:{x:c.position.x-v+S,y:c.position.y-x+E}}),(_=n.get(f))==null||_.forEach(A=>{e.some(C=>C.id===A.id)||i.push({id:A.id,type:"position",position:{x:A.position.x+v,y:A.position.y+x}})})),(d.width<s.width||d.height<s.height||v||x)&&i.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:w+(v?m[0]*v-S:0),height:b+(x?m[1]*x-E:0)}})}),i}function lwe(e,t,n,r,i,a,o){const s=r==null?void 0:r.querySelector(".xyflow__viewport");let c=!1;if(!s)return{changes:[],updatedInternals:c};const f=[],h=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(h.transform),m=[];for(const v of e.values()){const x=t.get(v.id);if(!x)continue;if(x.hidden){t.set(x.id,{...x,internals:{...x.internals,handleBounds:void 0}}),c=!0;continue}const w=z2(v.nodeElement),b=x.measured.width!==w.width||x.measured.height!==w.height;if(!!(w.width&&w.height&&(b||!x.internals.handleBounds||v.force))){const E=v.nodeElement.getBoundingClientRect(),_=ud(x.extent)?x.extent:a;let{positionAbsolute:A}=x.internals;x.parentId&&x.extent==="parent"?A=dQ(A,w,t.get(x.parentId)):_&&(A=Zc(A,_,w));const C={...x,measured:w,internals:{...x.internals,positionAbsolute:A,handleBounds:{source:FB("source",v.nodeElement,E,d,x.id),target:FB("target",v.nodeElement,E,d,x.id)}}};t.set(x.id,C),x.parentId&&H2(C,t,n,{nodeOrigin:i,zIndexMode:o}),c=!0,b&&(f.push({id:x.id,type:"dimensions",dimensions:w}),x.expandParent&&x.parentId&&m.push({id:x.id,parentId:x.parentId,rect:cd(C,i)}))}}if(m.length>0){const v=G2(m,t,n,i);f.push(...v)}return{changes:f,updatedInternals:c}}async function cwe({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),s=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(s)}function YB(e,t,n,r,i,a){let o=i;const s=r.get(o)||new Map;r.set(o,s.set(n,t)),o=`${i}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),a){o=`${i}-${e}-${a}`;const f=r.get(o)||new Map;r.set(o,f.set(n,t))}}function CQ(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:a,sourceHandle:o=null,targetHandle:s=null}=r,c={edgeId:r.id,source:i,target:a,sourceHandle:o,targetHandle:s},f=`${i}-${o}--${a}-${s}`,h=`${a}-${s}--${i}-${o}`;YB("source",c,h,e,i,o),YB("target",c,f,e,a,s),t.set(r.id,r)}}function TQ(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:TQ(n,t):!1}function XB(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 uwe(e,t,n,r){const i=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!TQ(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const s=e.get(a);s&&i.set(a,{id:a,position:s.position||{x:0,y:0},distance:{x:n.x-s.internals.positionAbsolute.x,y:n.y-s.internals.positionAbsolute.y},extent:s.extent,parentId:s.parentId,origin:s.origin,expandParent:s.expandParent,internals:{positionAbsolute:s.internals.positionAbsolute||{x:0,y:0}},measured:{width:s.measured.width??0,height:s.measured.height??0}})}return i}function uE({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,s,c;const i=[];for(const[f,h]of t){const d=(o=n.get(f))==null?void 0:o.internals.userNode;d&&i.push({...d,position:h.position,dragging:r})}if(!e)return[i[0],i];const a=(s=n.get(e))==null?void 0:s.internals.userNode;return[a?{...a,position:((c=t.get(e))==null?void 0:c.position)||a.position,dragging:r}:i[0],i]}function fwe({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=Ig(a,t);return{x:o.x-a.x,y:o.y-a.y}}function dwe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,f={x:0,y:0},h=null,d=!1,m=null,v=!1,x=!1,w=null;function b({noDragClassName:E,handleSelector:_,domNode:A,isSelectable:C,nodeId:N,nodeClickDistance:M=0}){m=ri(A);function R({x:D,y:F}){const{nodeLookup:I,nodeExtent:q,snapGrid:k,snapToGrid:z,nodeOrigin:H,onNodeDrag:G,onSelectionDrag:Q,onError:U,updateNodePositions:V}=t();a={x:D,y:F};let X=!1;const W=s.size>1,K=W&&q?qM(Dg(s)):null,J=W&&z?fwe({dragItems:s,snapGrid:k,x:D,y:F}):null;for(const[ee,te]of s){if(!I.has(ee))continue;let ne={x:D-te.distance.x,y:F-te.distance.y};z&&(ne=J?{x:Math.round(ne.x+J.x),y:Math.round(ne.y+J.y)}:Ig(ne,k));let se=null;if(W&&q&&!te.extent&&K){const{positionAbsolute:be}=te.internals,xe=be.x-K.x+q[0][0],we=be.x+te.measured.width-K.x2+q[1][0],Ae=be.y-K.y+q[0][1],Ee=be.y+te.measured.height-K.y2+q[1][1];se=[[xe,Ae],[we,Ee]]}const{position:ce,positionAbsolute:oe}=fQ({nodeId:ee,nextPosition:ne,nodeLookup:I,nodeExtent:se||q,nodeOrigin:H,onError:U});X=X||te.position.x!==ce.x||te.position.y!==ce.y,te.position=ce,te.internals.positionAbsolute=oe}if(x=x||X,!!X&&(V(s,!0),w&&(r||G||!N&&Q))){const[ee,te]=uE({nodeId:N,dragItems:s,nodeLookup:I});r==null||r(w,s,ee,te),G==null||G(w,ee,te),N||Q==null||Q(w,te)}}async function P(){if(!h)return;const{transform:D,panBy:F,autoPanSpeed:I,autoPanOnNodeDrag:q}=t();if(!q){c=!1,cancelAnimationFrame(o);return}const[k,z]=hQ(f,h,I);(k!==0||z!==0)&&(a.x=(a.x??0)-k/D[2],a.y=(a.y??0)-z/D[2],await F({x:k,y:z})&&R(a)),o=requestAnimationFrame(P)}function $(D){var W;const{nodeLookup:F,multiSelectionActive:I,nodesDraggable:q,transform:k,snapGrid:z,snapToGrid:H,selectNodesOnDrag:G,onNodeDragStart:Q,onSelectionDragStart:U,unselectNodesAndEdges:V}=t();d=!0,(!G||!C)&&!I&&N&&((W=F.get(N))!=null&&W.selected||V()),C&&G&&N&&(e==null||e(N));const X=Bp(D.sourceEvent,{transform:k,snapGrid:z,snapToGrid:H,containerBounds:h});if(a=X,s=uwe(F,q,X,N),s.size>0&&(n||Q||!N&&U)){const[K,J]=uE({nodeId:N,dragItems:s,nodeLookup:F});n==null||n(D.sourceEvent,s,K,J),Q==null||Q(D.sourceEvent,K,J),N||U==null||U(D.sourceEvent,J)}}const L=UX().clickDistance(M).on("start",D=>{const{domNode:F,nodeDragThreshold:I,transform:q,snapGrid:k,snapToGrid:z}=t();h=(F==null?void 0:F.getBoundingClientRect())||null,v=!1,x=!1,w=D.sourceEvent,I===0&&$(D),a=Bp(D.sourceEvent,{transform:q,snapGrid:k,snapToGrid:z,containerBounds:h}),f=aa(D.sourceEvent,h)}).on("drag",D=>{const{autoPanOnNodeDrag:F,transform:I,snapGrid:q,snapToGrid:k,nodeDragThreshold:z,nodeLookup:H}=t(),G=Bp(D.sourceEvent,{transform:I,snapGrid:q,snapToGrid:k,containerBounds:h});if(w=D.sourceEvent,(D.sourceEvent.type==="touchmove"&&D.sourceEvent.touches.length>1||N&&!H.has(N))&&(v=!0),!v){if(!c&&F&&d&&(c=!0,P()),!d){const Q=aa(D.sourceEvent,h),U=Q.x-f.x,V=Q.y-f.y;Math.sqrt(U*U+V*V)>z&&$(D)}(a.x!==G.xSnapped||a.y!==G.ySnapped)&&s&&d&&(f=aa(D.sourceEvent,h),R(G))}}).on("end",D=>{if(!(!d||v)&&(c=!1,d=!1,cancelAnimationFrame(o),s.size>0)){const{nodeLookup:F,updateNodePositions:I,onNodeDragStop:q,onSelectionDragStop:k}=t();if(x&&(I(s,!1),x=!1),i||q||!N&&k){const[z,H]=uE({nodeId:N,dragItems:s,nodeLookup:F,dragging:!1});i==null||i(D.sourceEvent,s,z,H),q==null||q(D.sourceEvent,z,H),N||k==null||k(D.sourceEvent,H)}}}).filter(D=>{const F=D.target;return!D.button&&(!E||!XB(F,`.${E}`,A))&&(!_||XB(F,_,A))});m.call(L)}function S(){m==null||m.on(".drag",null)}return{update:b,destroy:S}}function hwe(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())bm(i,cd(a))>0&&r.push(a);return r}const pwe=250;function mwe(e,t,n,r){var s,c;let i=[],a=1/0;const o=hwe(e,n,t+pwe);for(const f of o){const h=[...((s=f.internals.handleBounds)==null?void 0:s.source)??[],...((c=f.internals.handleBounds)==null?void 0:c.target)??[]];for(const d of h){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:m,y:v}=Jc(f,d,d.position,!0),x=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(v-e.y,2));x>t||(x<a?(i=[{...d,x:m,y:v}],a=x):x===a&&i.push({...d,x:m,y:v}))}}if(!i.length)return null;if(i.length>1){const f=r.type==="source"?"target":"source";return i.find(h=>h.type===f)??i[0]}return i[0]}function jQ(e,t,n,r,i,a=!1){var f,h,d;const o=r.get(e);if(!o)return null;const s=i==="strict"?(f=o.internals.handleBounds)==null?void 0:f[t]:[...((h=o.internals.handleBounds)==null?void 0:h.source)??[],...((d=o.internals.handleBounds)==null?void 0:d.target)??[]],c=(n?s==null?void 0:s.find(m=>m.id===n):s==null?void 0:s[0])??null;return c&&a?{...c,...Jc(o,c,c.position,!0)}:c}function NQ(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function gwe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const OQ=()=>!0;function vwe(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:f,autoPanOnConnect:h,flowId:d,panBy:m,cancelConnection:v,onConnectStart:x,onConnect:w,onConnectEnd:b,isValidConnection:S=OQ,onReconnectEnd:E,updateConnection:_,getTransform:A,getFromHandle:C,autoPanSpeed:N,dragThreshold:M=1,handleDomNode:R}){const P=vQ(e.target);let $=0,L;const{x:D,y:F}=aa(e),I=NQ(a,R),q=s==null?void 0:s.getBoundingClientRect();let k=!1;if(!q||!I)return;const z=jQ(i,I,r,c,t);if(!z)return;let H=aa(e,q),G=!1,Q=null,U=!1,V=null;function X(){if(!h||!q)return;const[ce,oe]=hQ(H,q,N);m({x:ce,y:oe}),$=requestAnimationFrame(X)}const W={...z,nodeId:i,type:I,position:z.position},K=c.get(i);let ee={inProgress:!0,isValid:null,from:Jc(K,W,Ie.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:K,to:H,toHandle:null,toPosition:$B[W.position],toNode:null,pointer:H};function te(){k=!0,_(ee),x==null||x(e,{nodeId:i,handleId:r,handleType:I})}M===0&&te();function ne(ce){if(!k){const{x:Ee,y:rt}=aa(ce),Ve=Ee-D,Pt=rt-F;if(!(Ve*Ve+Pt*Pt>M*M))return;te()}if(!C()||!W){se(ce);return}const oe=A();H=aa(ce,q),L=mwe(Lg(H,oe,!1,[1,1]),n,c,W),G||(X(),G=!0);const be=MQ(ce,{handle:L,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:S,doc:P,lib:f,flowId:d,nodeLookup:c});V=be.handleDomNode,Q=be.connection,U=gwe(!!L,be.isValid);const xe=c.get(i),we=xe?Jc(xe,W,Ie.Left,!0):ee.from,Ae={...ee,from:we,isValid:U,to:be.toHandle&&U?fx({x:be.toHandle.x,y:be.toHandle.y},oe):H,toHandle:be.toHandle,toPosition:U&&be.toHandle?be.toHandle.position:$B[W.position],toNode:be.toHandle?c.get(be.toHandle.nodeId):null,pointer:H};_(Ae),ee=Ae}function se(ce){if(!("touches"in ce&&ce.touches.length>0)){if(k){(L||V)&&Q&&U&&(w==null||w(Q));const{inProgress:oe,...be}=ee,xe={...be,toPosition:ee.toHandle?ee.toPosition:null};b==null||b(ce,xe),a&&(E==null||E(ce,xe))}v(),cancelAnimationFrame($),G=!1,U=!1,Q=null,V=null,P.removeEventListener("mousemove",ne),P.removeEventListener("mouseup",se),P.removeEventListener("touchmove",ne),P.removeEventListener("touchend",se)}}P.addEventListener("mousemove",ne),P.addEventListener("mouseup",se),P.addEventListener("touchmove",ne),P.addEventListener("touchend",se)}function MQ(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:f=OQ,nodeLookup:h}){const d=a==="target",m=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:v,y:x}=aa(e),w=o.elementFromPoint(v,x),b=w!=null&&w.classList.contains(`${s}-flow__handle`)?w:m,S={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const E=NQ(void 0,b),_=b.getAttribute("data-nodeid"),A=b.getAttribute("data-handleid"),C=b.classList.contains("connectable"),N=b.classList.contains("connectableend");if(!_||!E)return S;const M={source:d?_:r,sourceHandle:d?A:i,target:d?r:_,targetHandle:d?i:A};S.connection=M;const P=C&&N&&(n===sd.Strict?d&&E==="source"||!d&&E==="target":_!==r||A!==i);S.isValid=P&&f(M),S.toHandle=jQ(_,E,A,h,n,!0)}return S}const UM={onPointerDown:vwe,isValid:MQ};function ywe({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=ri(e);function a({translateExtent:s,width:c,height:f,zoomStep:h=1,pannable:d=!0,zoomable:m=!0,inversePan:v=!1}){const x=_=>{if(_.sourceEvent.type!=="wheel"||!t)return;const A=n(),C=_.sourceEvent.ctrlKey&&xm()?10:1,N=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*h,M=A[2]*Math.pow(2,N*C);t.scaleTo(M)};let w=[0,0];const b=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(w=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY])},S=_=>{const A=n();if(_.sourceEvent.type!=="mousemove"&&_.sourceEvent.type!=="touchmove"||!t)return;const C=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],N=[C[0]-w[0],C[1]-w[1]];w=C;const M=r()*Math.max(A[2],Math.log(A[2]))*(v?-1:1),R={x:A[0]-N[0]*M,y:A[1]-N[1]*M},P=[[0,0],[c,f]];t.setViewportConstrained({x:R.x,y:R.y,zoom:A[2]},P,s)},E=aQ().on("start",b).on("zoom",d?S:null).on("zoom.wheel",m?x:null);i.call(E,{})}function o(){i.on("zoom",null)}return{update:a,destroy:o,pointer:Ji}}const dw=e=>({x:e.x,y:e.y,zoom:e.k}),fE=({x:e,y:t,zoom:n})=>cw.translate(e,t).scale(n),vf=(e,t)=>e.target.closest(`.${t}`),RQ=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),bwe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,dE=(e,t=0,n=bwe,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},PQ=e=>{const t=e.ctrlKey&&xm()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function xwe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:f}){return h=>{if(vf(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(h.ctrlKey&&o){const b=Ji(h),S=PQ(h),E=d*Math.pow(2,S);r.scaleTo(n,E,b,h);return}const m=h.deltaMode===1?20:1;let v=i===Lc.Vertical?0:h.deltaX*m,x=i===Lc.Horizontal?0:h.deltaY*m;!xm()&&h.shiftKey&&i!==Lc.Vertical&&(v=h.deltaY*m,x=0),r.translateBy(n,-(v/d)*a,-(x/d)*a,{internal:!0});const w=dw(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,w),e.panScrollTimeout=setTimeout(()=>{f==null||f(h,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s==null||s(h,w))}}function wwe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const a=r.type==="wheel",o=!t&&a&&!r.ctrlKey,s=vf(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function Swe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var a,o,s;if((a=r.sourceEvent)!=null&&a.internal)return;const i=dw(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((s=r.sourceEvent)==null?void 0:s.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function _we({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{var o,s;e.usedRightMouseButton=!!(n&&RQ(t,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!((s=a.sourceEvent)!=null&&s.internal)&&(i==null||i(a.sourceEvent,dw(a.transform)))}}function Ewe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{var s;if(!((s=o.sourceEvent)!=null&&s.internal)&&(e.isZoomingOrPanning=!1,a&&RQ(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const c=dw(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,c)},n?150:0)}}}function Awe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:s,noPanClassName:c,lib:f,connectionInProgress:h}){return d=>{var b;const m=e||t,v=n&&d.ctrlKey,x=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(vf(d,`${f}-flow__node`)||vf(d,`${f}-flow__edge`)))return!0;if(!r&&!m&&!i&&!a&&!n||o||h&&!x||vf(d,s)&&x||vf(d,c)&&(!x||i&&x&&!e)||!n&&d.ctrlKey&&x)return!1;if(!n&&d.type==="touchstart"&&((b=d.touches)==null?void 0:b.length)>1)return d.preventDefault(),!1;if(!m&&!i&&!v&&x||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||x)&&w}}function Cwe({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),d=aQ().scaleExtent([t,n]).translateExtent(r),m=ri(e).call(d);E({x:i.x,y:i.y,zoom:ld(i.zoom,t,n)},[[0,0],[h.width,h.height]],r);const v=m.on("wheel.zoom"),x=m.on("dblclick.zoom");d.wheelDelta(PQ);function w(L,D){return m?new Promise(F=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Do:pb).transform(dE(m,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>F(!0)),L)}):Promise.resolve(!1)}function b({noWheelClassName:L,noPanClassName:D,onPaneContextMenu:F,userSelectionActive:I,panOnScroll:q,panOnDrag:k,panOnScrollMode:z,panOnScrollSpeed:H,preventScrolling:G,zoomOnPinch:Q,zoomOnScroll:U,zoomOnDoubleClick:V,zoomActivationKeyPressed:X,lib:W,onTransformChange:K,connectionInProgress:J,paneClickDistance:ee,selectionOnDrag:te}){I&&!f.isZoomingOrPanning&&S();const ne=q&&!X&&!I;d.clickDistance(te?1/0:!ia(ee)||ee<0?0:ee);const se=ne?xwe({zoomPanValues:f,noWheelClassName:L,d3Selection:m,d3Zoom:d,panOnScrollMode:z,panOnScrollSpeed:H,zoomOnPinch:Q,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):wwe({noWheelClassName:L,preventScrolling:G,d3ZoomHandler:v});if(m.on("wheel.zoom",se,{passive:!1}),!I){const oe=Swe({zoomPanValues:f,onDraggingChange:c,onPanZoomStart:o});d.on("start",oe);const be=_we({zoomPanValues:f,panOnDrag:k,onPaneContextMenu:!!F,onPanZoom:a,onTransformChange:K});d.on("zoom",be);const xe=Ewe({zoomPanValues:f,panOnDrag:k,panOnScroll:q,onPaneContextMenu:F,onPanZoomEnd:s,onDraggingChange:c});d.on("end",xe)}const ce=Awe({zoomActivationKeyPressed:X,panOnDrag:k,zoomOnScroll:U,panOnScroll:q,zoomOnDoubleClick:V,zoomOnPinch:Q,userSelectionActive:I,noPanClassName:D,noWheelClassName:L,lib:W,connectionInProgress:J});d.filter(ce),V?m.on("dblclick.zoom",x):m.on("dblclick.zoom",null)}function S(){d.on("zoom",null)}async function E(L,D,F){const I=fE(L),q=d==null?void 0:d.constrain()(I,D,F);return q&&await w(q),new Promise(k=>k(q))}async function _(L,D){const F=fE(L);return await w(F,D),new Promise(I=>I(F))}function A(L){if(m){const D=fE(L),F=m.property("__zoom");(F.k!==L.zoom||F.x!==L.x||F.y!==L.y)&&(d==null||d.transform(m,D,null,{sync:!0}))}}function C(){const L=m?iQ(m.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}function N(L,D){return m?new Promise(F=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Do:pb).scaleTo(dE(m,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>F(!0)),L)}):Promise.resolve(!1)}function M(L,D){return m?new Promise(F=>{d==null||d.interpolate((D==null?void 0:D.interpolate)==="linear"?Do:pb).scaleBy(dE(m,D==null?void 0:D.duration,D==null?void 0:D.ease,()=>F(!0)),L)}):Promise.resolve(!1)}function R(L){d==null||d.scaleExtent(L)}function P(L){d==null||d.translateExtent(L)}function $(L){const D=!ia(L)||L<0?0:L;d==null||d.clickDistance(D)}return{update:b,destroy:S,setViewport:_,setViewportConstrained:E,getViewport:C,scaleTo:N,scaleBy:M,setScaleExtent:R,setTranslateExtent:P,syncViewport:A,setClickDistance:$}}var fd;(function(e){e.Line="line",e.Handle="handle"})(fd||(fd={}));function Twe({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){const o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]=c[0]*-1),s&&a&&(c[1]=c[1]*-1),c}function QB(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 Bs(e,t){return Math.max(0,t-e)}function qs(e,t){return Math.max(0,e-t)}function $y(e,t,n){return Math.max(0,t-e,e-n)}function ZB(e,t){return e?!t:t}function jwe(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:f}=t;const{isHorizontal:h,isVertical:d}=t,m=h&&d,{xSnapped:v,ySnapped:x}=n,{minWidth:w,maxWidth:b,minHeight:S,maxHeight:E}=r,{x:_,y:A,width:C,height:N,aspectRatio:M}=e;let R=Math.floor(h?v-e.pointerX:0),P=Math.floor(d?x-e.pointerY:0);const $=C+(c?-R:R),L=N+(f?-P:P),D=-a[0]*C,F=-a[1]*N;let I=$y($,w,b),q=$y(L,S,E);if(o){let H=0,G=0;c&&R<0?H=Bs(_+R+D,o[0][0]):!c&&R>0&&(H=qs(_+$+D,o[1][0])),f&&P<0?G=Bs(A+P+F,o[0][1]):!f&&P>0&&(G=qs(A+L+F,o[1][1])),I=Math.max(I,H),q=Math.max(q,G)}if(s){let H=0,G=0;c&&R>0?H=qs(_+R,s[0][0]):!c&&R<0&&(H=Bs(_+$,s[1][0])),f&&P>0?G=qs(A+P,s[0][1]):!f&&P<0&&(G=Bs(A+L,s[1][1])),I=Math.max(I,H),q=Math.max(q,G)}if(i){if(h){const H=$y($/M,S,E)*M;if(I=Math.max(I,H),o){let G=0;!c&&!f||c&&!f&&m?G=qs(A+F+$/M,o[1][1])*M:G=Bs(A+F+(c?R:-R)/M,o[0][1])*M,I=Math.max(I,G)}if(s){let G=0;!c&&!f||c&&!f&&m?G=Bs(A+$/M,s[1][1])*M:G=qs(A+(c?R:-R)/M,s[0][1])*M,I=Math.max(I,G)}}if(d){const H=$y(L*M,w,b)/M;if(q=Math.max(q,H),o){let G=0;!c&&!f||f&&!c&&m?G=qs(_+L*M+D,o[1][0])/M:G=Bs(_+(f?P:-P)*M+D,o[0][0])/M,q=Math.max(q,G)}if(s){let G=0;!c&&!f||f&&!c&&m?G=Bs(_+L*M,s[1][0])/M:G=qs(_+(f?P:-P)*M,s[0][0])/M,q=Math.max(q,G)}}}P=P+(P<0?q:-q),R=R+(R<0?I:-I),i&&(m?$>L*M?P=(ZB(c,f)?-R:R)/M:R=(ZB(c,f)?-P:P)*M:h?(P=R/M,f=c):(R=P*M,c=f));const k=c?_+R:_,z=f?A+P:A;return{width:C+(c?-R:R),height:N+(f?-P:P),x:a[0]*R*(c?-1:1)+k,y:a[1]*P*(f?-1:1)+z}}const kQ={width:0,height:0,x:0,y:0},Nwe={...kQ,pointerX:0,pointerY:0,aspectRatio:1};function Owe(e){return[[0,0],[e.measured.width,e.measured.height]]}function Mwe(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,s=n[0]*a,c=n[1]*o;return[[r-s,i-c],[r+a-s,i+o-c]]}function Rwe({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const a=ri(e);let o={controlDirection:QB("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:f,boundaries:h,keepAspectRatio:d,resizeDirection:m,onResizeStart:v,onResize:x,onResizeEnd:w,shouldResize:b}){let S={...kQ},E={...Nwe};o={boundaries:h,resizeDirection:m,keepAspectRatio:d,controlDirection:QB(f)};let _,A=null,C=[],N,M,R,P=!1;const $=UX().on("start",L=>{const{nodeLookup:D,transform:F,snapGrid:I,snapToGrid:q,nodeOrigin:k,paneDomNode:z}=n();if(_=D.get(t),!_)return;A=(z==null?void 0:z.getBoundingClientRect())??null;const{xSnapped:H,ySnapped:G}=Bp(L.sourceEvent,{transform:F,snapGrid:I,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:G,aspectRatio:S.width/S.height},N=void 0,_.parentId&&(_.extent==="parent"||_.expandParent)&&(N=D.get(_.parentId),M=N&&_.extent==="parent"?Owe(N):void 0),C=[],R=void 0;for(const[Q,U]of D)if(U.parentId===t&&(C.push({id:Q,position:{...U.position},extent:U.extent}),U.extent==="parent"||U.expandParent)){const V=Mwe(U,_,U.origin??k);R?R=[[Math.min(V[0][0],R[0][0]),Math.min(V[0][1],R[0][1])],[Math.max(V[1][0],R[1][0]),Math.max(V[1][1],R[1][1])]]:R=V}v==null||v(L,{...S})}).on("drag",L=>{const{transform:D,snapGrid:F,snapToGrid:I,nodeOrigin:q}=n(),k=Bp(L.sourceEvent,{transform:D,snapGrid:F,snapToGrid:I,containerBounds:A}),z=[];if(!_)return;const{x:H,y:G,width:Q,height:U}=S,V={},X=_.origin??q,{width:W,height:K,x:J,y:ee}=jwe(E,o.controlDirection,k,o.boundaries,o.keepAspectRatio,X,M,R),te=W!==Q,ne=K!==U,se=J!==H&&te,ce=ee!==G&&ne;if(!se&&!ce&&!te&&!ne)return;if((se||ce||X[0]===1||X[1]===1)&&(V.x=se?J:S.x,V.y=ce?ee:S.y,S.x=V.x,S.y=V.y,C.length>0)){const we=J-H,Ae=ee-G;for(const Ee of C)Ee.position={x:Ee.position.x-we+X[0]*(W-Q),y:Ee.position.y-Ae+X[1]*(K-U)},z.push(Ee)}if((te||ne)&&(V.width=te&&(!o.resizeDirection||o.resizeDirection==="horizontal")?W:S.width,V.height=ne&&(!o.resizeDirection||o.resizeDirection==="vertical")?K:S.height,S.width=V.width,S.height=V.height),N&&_.expandParent){const we=X[0]*(V.width??0);V.x&&V.x<we&&(S.x=we,E.x=E.x-(V.x-we));const Ae=X[1]*(V.height??0);V.y&&V.y<Ae&&(S.y=Ae,E.y=E.y-(V.y-Ae))}const oe=Twe({width:S.width,prevWidth:Q,height:S.height,prevHeight:U,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),be={...S,direction:oe};(b==null?void 0:b(L,be))!==!1&&(P=!0,x==null||x(L,be),r(V,z))}).on("end",L=>{P&&(w==null||w(L,{...S}),i==null||i({...S}),P=!1)});a.call($)}function c(){a.on(".drag",null)}return{update:s,destroy:c}}const Pwe={},JB=e=>{let t;const n=new Set,r=(h,d)=>{const m=typeof h=="function"?h(t):h;if(!Object.is(m,t)){const v=t;t=d??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(x=>x(t,v))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(Pwe?"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,c);return c},kwe=e=>e?JB(e):JB,{useDebugValue:Dwe}=Z,{useSyncExternalStoreWithSelector:Iwe}=sce,Lwe=e=>e;function DQ(e,t=Lwe,n){const r=Iwe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Dwe(r),r}const eq=(e,t)=>{const n=kwe(e),r=(i,a=t)=>DQ(n,i,a);return Object.assign(r,n),r},$we=(e,t)=>e?eq(e,t):eq;function tn(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 hw=j.createContext(null),Bwe=hw.Provider,IQ=Ua.error001();function vt(e,t){const n=j.useContext(hw);if(n===null)throw new Error(IQ);return DQ(n,e,t)}function rn(){const e=j.useContext(hw);if(e===null)throw new Error(IQ);return j.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const tq={display:"none"},qwe={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},LQ="react-flow__node-desc",$Q="react-flow__edge-desc",zwe="react-flow__aria-live",Fwe=e=>e.ariaLiveMessage,Vwe=e=>e.ariaLabelConfig;function Uwe({rfId:e}){const t=vt(Fwe);return g.jsx("div",{id:`${zwe}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:qwe,children:t})}function Hwe({rfId:e,disableKeyboardA11y:t}){const n=vt(Vwe);return g.jsxs(g.Fragment,{children:[g.jsx("div",{id:`${LQ}-${e}`,style:tq,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),g.jsx("div",{id:`${$Q}-${e}`,style:tq,children:n["edge.a11yDescription.default"]}),!t&&g.jsx(Uwe,{rfId:e})]})}const pw=j.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},a)=>{const o=`${e}`.split("-");return g.jsx("div",{className:Cn(["react-flow__panel",n,...o]),style:r,ref:a,...i,children:t})});pw.displayName="Panel";function Gwe({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:g.jsx(pw,{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:g.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Kwe=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}},By=e=>e.id;function Wwe(e,t){return tn(e.selectedNodes.map(By),t.selectedNodes.map(By))&&tn(e.selectedEdges.map(By),t.selectedEdges.map(By))}function Ywe({onSelectionChange:e}){const t=rn(),{selectedNodes:n,selectedEdges:r}=vt(Kwe,Wwe);return j.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,r,e]),null}const Xwe=e=>!!e.onSelectionChangeHandlers;function Qwe({onSelectionChange:e}){const t=vt(Xwe);return e||t?g.jsx(Ywe,{onSelectionChange:e}):null}const HM=typeof window<"u"?j.useLayoutEffect:j.useEffect,BQ=[0,0],Zwe={x:0,y:0,zoom:1},Jwe=["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"],nq=[...Jwe,"rfId"],e1e=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}),rq={translateExtent:vm,nodeOrigin:BQ,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function t1e(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:s,setDefaultNodesAndEdges:c}=vt(e1e,tn),f=rn();HM(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=rq,s()}),[]);const h=j.useRef(rq);return HM(()=>{for(const d of nq){const m=e[d],v=h.current[d];m!==v&&(typeof e[d]>"u"||(d==="nodes"?t(m):d==="edges"?n(m):d==="minZoom"?r(m):d==="maxZoom"?i(m):d==="translateExtent"?a(m):d==="nodeExtent"?o(m):d==="ariaLabelConfig"?f.setState({ariaLabelConfig:U0e(m)}):d==="fitView"?f.setState({fitViewQueued:m}):d==="fitViewOptions"?f.setState({fitViewOptions:m}):f.setState({[d]:m})))}h.current=e},nq.map(d=>e[d])),null}function iq(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function n1e(e){var r;const[t,n]=j.useState(e==="system"?null:e);return j.useEffect(()=>{if(e!=="system"){n(e);return}const i=iq(),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=iq())!=null&&r.matches?"dark":"light"}const aq=typeof document<"u"?document:null;function wm(e=null,t={target:aq,actInsideInputWithModifier:!0}){const[n,r]=j.useState(!1),i=j.useRef(!1),a=j.useRef(new Set([])),[o,s]=j.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
416
+ `).replace(`
417
+
418
+ `,`
419
+ +`).split(`
420
+ `)),h=f.reduce((d,m)=>d.concat(...m),[]);return[f,h]}return[[],[]]},[e]);return j.useEffect(()=>{const c=(t==null?void 0:t.target)??aq,f=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const h=v=>{var b,S;if(i.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!i.current||i.current&&!f)&&yQ(v))return!1;const w=sq(v.code,s);if(a.current.add(v[w]),oq(o,a.current,!1)){const E=((S=(b=v.composedPath)==null?void 0:b.call(v))==null?void 0:S[0])||v.target,_=(E==null?void 0:E.nodeName)==="BUTTON"||(E==null?void 0:E.nodeName)==="A";t.preventDefault!==!1&&(i.current||!_)&&v.preventDefault(),r(!0)}},d=v=>{const x=sq(v.code,s);oq(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(v[x]),v.key==="Meta"&&a.current.clear(),i.current=!1},m=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",d),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",d),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),n}function oq(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function sq(e,t){return t.includes(e)?"code":"key"}const r1e=()=>{const e=rn();return j.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:a,maxZoom:o,panZoom:s}=e.getState(),c=q2(t,r,i,a,o,(n==null?void 0:n.padding)??.1);return s?(await s.setViewport(c,{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:s,y:c}=o.getBoundingClientRect(),f={x:t.x-s,y:t.y-c},h=n.snapGrid??i,d=n.snapToGrid??a;return Lg(f,r,d,h)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:a}=r.getBoundingClientRect(),o=fx(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function qQ(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 s={...a};for(const c of o)i1e(c,s);n.push(s)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function i1e(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 a1e(e,t){return qQ(e,t)}function o1e(e,t){return qQ(e,t)}function cc(e,t){return{id:e,type:"select",selected:t}}function yf(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(cc(a.id,o)))}return r}function lq({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 s=t.get(o.id),c=((i=s==null?void 0:s.internals)==null?void 0:i.userNode)??s;c!==void 0&&c!==o&&n.push({id:o.id,item:o,type:"replace"}),c===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 cq(e){return{id:e.id,type:"remove"}}const uq=e=>k0e(e),s1e=e=>uQ(e);function zQ(e){return j.forwardRef(e)}function fq(e){const[t,n]=j.useState(BigInt(0)),[r]=j.useState(()=>l1e(()=>n(i=>i+BigInt(1))));return HM(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function l1e(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const FQ=j.createContext(null);function c1e({children:e}){const t=rn(),n=j.useCallback(s=>{const{nodes:c=[],setNodes:f,hasDefaultNodes:h,onNodesChange:d,nodeLookup:m,fitViewQueued:v,onNodesChangeMiddlewareMap:x}=t.getState();let w=c;for(const S of s)w=typeof S=="function"?S(w):S;let b=lq({items:w,lookup:m});for(const S of x.values())b=S(b);h&&f(w),b.length>0?d==null||d(b):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:S,nodes:E,setNodes:_}=t.getState();S&&_(E)})},[]),r=fq(n),i=j.useCallback(s=>{const{edges:c=[],setEdges:f,hasDefaultEdges:h,onEdgesChange:d,edgeLookup:m}=t.getState();let v=c;for(const x of s)v=typeof x=="function"?x(v):x;h?f(v):d&&d(lq({items:v,lookup:m}))},[]),a=fq(i),o=j.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return g.jsx(FQ.Provider,{value:o,children:e})}function u1e(){const e=j.useContext(FQ);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const f1e=e=>!!e.panZoom;function K2(){const e=r1e(),t=rn(),n=u1e(),r=vt(f1e),i=j.useMemo(()=>{const a=d=>t.getState().nodeLookup.get(d),o=d=>{n.nodeQueue.push(d)},s=d=>{n.edgeQueue.push(d)},c=d=>{var S,E;const{nodeLookup:m,nodeOrigin:v}=t.getState(),x=uq(d)?d:m.get(d.id),w=x.parentId?gQ(x.position,x.measured,x.parentId,m,v):x.position,b={...x,position:w,width:((S=x.measured)==null?void 0:S.width)??x.width,height:((E=x.measured)==null?void 0:E.height)??x.height};return cd(b)},f=(d,m,v={replace:!1})=>{o(x=>x.map(w=>{if(w.id===d){const b=typeof m=="function"?m(w):m;return v.replace&&uq(b)?b:{...w,...b}}return w}))},h=(d,m,v={replace:!1})=>{s(x=>x.map(w=>{if(w.id===d){const b=typeof m=="function"?m(w):m;return v.replace&&s1e(b)?b:{...w,...b}}return w}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>{var m;return(m=a(d))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:d=[]}=t.getState();return d.map(m=>({...m}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:o,setEdges:s,addNodes:d=>{const m=Array.isArray(d)?d:[d];n.nodeQueue.push(v=>[...v,...m])},addEdges:d=>{const m=Array.isArray(d)?d:[d];n.edgeQueue.push(v=>[...v,...m])},toObject:()=>{const{nodes:d=[],edges:m=[],transform:v}=t.getState(),[x,w,b]=v;return{nodes:d.map(S=>({...S})),edges:m.map(S=>({...S})),viewport:{x,y:w,zoom:b}}},deleteElements:async({nodes:d=[],edges:m=[]})=>{const{nodes:v,edges:x,onNodesDelete:w,onEdgesDelete:b,triggerNodeChanges:S,triggerEdgeChanges:E,onDelete:_,onBeforeDelete:A}=t.getState(),{nodes:C,edges:N}=await B0e({nodesToRemove:d,edgesToRemove:m,nodes:v,edges:x,onBeforeDelete:A}),M=N.length>0,R=C.length>0;if(M){const P=N.map(cq);b==null||b(N),E(P)}if(R){const P=C.map(cq);w==null||w(C),S(P)}return(R||M)&&(_==null||_({nodes:C,edges:N})),{deletedNodes:C,deletedEdges:N}},getIntersectingNodes:(d,m=!0,v)=>{const x=qB(d),w=x?d:c(d),b=v!==void 0;return w?(v||t.getState().nodes).filter(S=>{const E=t.getState().nodeLookup.get(S.id);if(E&&!x&&(S.id===d.id||!E.internals.positionAbsolute))return!1;const _=cd(b?S:E),A=bm(_,w);return m&&A>0||A>=_.width*_.height||A>=w.width*w.height}):[]},isNodeIntersecting:(d,m,v=!0)=>{const w=qB(d)?d:c(d);if(!w)return!1;const b=bm(w,m);return v&&b>0||b>=m.width*m.height||b>=w.width*w.height},updateNode:f,updateNodeData:(d,m,v={replace:!1})=>{f(d,x=>{const w=typeof m=="function"?m(x):m;return v.replace?{...x,data:w}:{...x,data:{...x.data,...w}}},v)},updateEdge:h,updateEdgeData:(d,m,v={replace:!1})=>{h(d,x=>{const w=typeof m=="function"?m(x):m;return v.replace?{...x,data:w}:{...x,data:{...x.data,...w}}},v)},getNodesBounds:d=>{const{nodeLookup:m,nodeOrigin:v}=t.getState();return D0e(d,{nodeLookup:m,nodeOrigin:v})},getHandleConnections:({type:d,id:m,nodeId:v})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${v}-${d}${m?`-${m}`:""}`))==null?void 0:x.values())??[])},getNodeConnections:({type:d,handleId:m,nodeId:v})=>{var x;return Array.from(((x=t.getState().connectionLookup.get(`${v}${d?m?`-${d}-${m}`:`-${d}`:""}`))==null?void 0:x.values())??[])},fitView:async d=>{const m=t.getState().fitViewResolver??V0e();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:m}),n.nodeQueue.push(v=>[...v]),m.promise}}},[]);return j.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const dq=e=>e.selected,d1e=typeof window<"u"?window:void 0;function h1e({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=rn(),{deleteElements:r}=K2(),i=wm(e,{actInsideInputWithModifier:!1}),a=wm(t,{target:d1e});j.useEffect(()=>{if(i){const{edges:o,nodes:s}=n.getState();r({nodes:s.filter(dq),edges:o.filter(dq)}),n.setState({nodesSelectionActive:!1})}},[i]),j.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function p1e(e){const t=rn();j.useEffect(()=>{const n=()=>{var i,a,o,s;if(!e.current||!(((a=(i=e.current).checkVisibility)==null?void 0:a.call(i))??!0))return!1;const r=z2(e.current);(r.height===0||r.width===0)&&((s=(o=t.getState()).onError)==null||s.call(o,"004",Ua.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 mw={position:"absolute",width:"100%",height:"100%",top:0,left:0},m1e=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function g1e({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=Lc.Free,zoomOnDoubleClick:o=!0,panOnDrag:s=!0,defaultViewport:c,translateExtent:f,minZoom:h,maxZoom:d,zoomActivationKeyCode:m,preventScrolling:v=!0,children:x,noWheelClassName:w,noPanClassName:b,onViewportChange:S,isControlledViewport:E,paneClickDistance:_,selectionOnDrag:A}){const C=rn(),N=j.useRef(null),{userSelectionActive:M,lib:R,connectionInProgress:P}=vt(m1e,tn),$=wm(m),L=j.useRef();p1e(N);const D=j.useCallback(F=>{S==null||S({x:F[0],y:F[1],zoom:F[2]}),E||C.setState({transform:F})},[S,E]);return j.useEffect(()=>{if(N.current){L.current=Cwe({domNode:N.current,minZoom:h,maxZoom:d,translateExtent:f,viewport:c,onDraggingChange:k=>C.setState(z=>z.paneDragging===k?z:{paneDragging:k}),onPanZoomStart:(k,z)=>{const{onViewportChangeStart:H,onMoveStart:G}=C.getState();G==null||G(k,z),H==null||H(z)},onPanZoom:(k,z)=>{const{onViewportChange:H,onMove:G}=C.getState();G==null||G(k,z),H==null||H(z)},onPanZoomEnd:(k,z)=>{const{onViewportChangeEnd:H,onMoveEnd:G}=C.getState();G==null||G(k,z),H==null||H(z)}});const{x:F,y:I,zoom:q}=L.current.getViewport();return C.setState({panZoom:L.current,transform:[F,I,q],domNode:N.current.closest(".react-flow")}),()=>{var k;(k=L.current)==null||k.destroy()}}},[]),j.useEffect(()=>{var F;(F=L.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:s,zoomActivationKeyPressed:$,preventScrolling:v,noPanClassName:b,userSelectionActive:M,noWheelClassName:w,lib:R,onTransformChange:D,connectionInProgress:P,selectionOnDrag:A,paneClickDistance:_})},[e,t,n,r,i,a,o,s,$,v,b,M,w,R,D,P,A,_]),g.jsx("div",{className:"react-flow__renderer",ref:N,style:mw,children:x})}const v1e=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function y1e(){const{userSelectionActive:e,userSelectionRect:t}=vt(v1e,tn);return e&&t?g.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 hE=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},b1e=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function x1e({isSelecting:e,selectionKeyPressed:t,selectionMode:n=ym.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:s,onPaneClick:c,onPaneContextMenu:f,onPaneScroll:h,onPaneMouseEnter:d,onPaneMouseMove:m,onPaneMouseLeave:v,children:x}){const w=rn(),{userSelectionActive:b,elementsSelectable:S,dragging:E,connectionInProgress:_}=vt(b1e,tn),A=S&&(e||b),C=j.useRef(null),N=j.useRef(),M=j.useRef(new Set),R=j.useRef(new Set),P=j.useRef(!1),$=H=>{if(P.current||_){P.current=!1;return}c==null||c(H),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},L=H=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){H.preventDefault();return}f==null||f(H)},D=h?H=>h(H):void 0,F=H=>{P.current&&(H.stopPropagation(),P.current=!1)},I=H=>{var K,J;const{domNode:G}=w.getState();if(N.current=G==null?void 0:G.getBoundingClientRect(),!N.current)return;const Q=H.target===C.current;if(!Q&&!!H.target.closest(".nokey")||!e||!(a&&Q||t)||H.button!==0||!H.isPrimary)return;(J=(K=H.target)==null?void 0:K.setPointerCapture)==null||J.call(K,H.pointerId),P.current=!1;const{x:X,y:W}=aa(H.nativeEvent,N.current);w.setState({userSelectionRect:{width:0,height:0,startX:X,startY:W,x:X,y:W}}),Q||(H.stopPropagation(),H.preventDefault())},q=H=>{const{userSelectionRect:G,transform:Q,nodeLookup:U,edgeLookup:V,connectionLookup:X,triggerNodeChanges:W,triggerEdgeChanges:K,defaultEdgeOptions:J,resetSelectedElements:ee}=w.getState();if(!N.current||!G)return;const{x:te,y:ne}=aa(H.nativeEvent,N.current),{startX:se,startY:ce}=G;if(!P.current){const Ae=t?0:i;if(Math.hypot(te-se,ne-ce)<=Ae)return;ee(),o==null||o(H)}P.current=!0;const oe={startX:se,startY:ce,x:te<se?te:se,y:ne<ce?ne:ce,width:Math.abs(te-se),height:Math.abs(ne-ce)},be=M.current,xe=R.current;M.current=new Set(B2(U,oe,Q,n===ym.Partial,!0).map(Ae=>Ae.id)),R.current=new Set;const we=(J==null?void 0:J.selectable)??!0;for(const Ae of M.current){const Ee=X.get(Ae);if(Ee)for(const{edgeId:rt}of Ee.values()){const Ve=V.get(rt);Ve&&(Ve.selectable??we)&&R.current.add(rt)}}if(!zB(be,M.current)){const Ae=yf(U,M.current,!0);W(Ae)}if(!zB(xe,R.current)){const Ae=yf(V,R.current);K(Ae)}w.setState({userSelectionRect:oe,userSelectionActive:!0,nodesSelectionActive:!1})},k=H=>{var G,Q;H.button===0&&((Q=(G=H.target)==null?void 0:G.releasePointerCapture)==null||Q.call(G,H.pointerId),!b&&H.target===C.current&&w.getState().userSelectionRect&&($==null||$(H)),w.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(s==null||s(H),w.setState({nodesSelectionActive:M.current.size>0})))},z=r===!0||Array.isArray(r)&&r.includes(0);return g.jsxs("div",{className:Cn(["react-flow__pane",{draggable:z,dragging:E,selection:e}]),onClick:A?void 0:hE($,C),onContextMenu:hE(L,C),onWheel:hE(D,C),onPointerEnter:A?void 0:d,onPointerMove:A?q:m,onPointerUp:A?k:void 0,onPointerDownCapture:A?I:void 0,onClickCapture:A?F:void 0,onPointerLeave:v,ref:C,style:mw,children:[x,g.jsx(y1e,{})]})}function GM({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:s,onError:c}=t.getState(),f=s.get(e);if(!f){c==null||c("012",Ua.error012(e));return}t.setState({nodesSelectionActive:!1}),f.selected?(n||f.selected&&o)&&(a({nodes:[f],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):i([e])}function VQ({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){const s=rn(),[c,f]=j.useState(!1),h=j.useRef();return j.useEffect(()=>{h.current=dwe({getStoreItems:()=>s.getState(),onNodeMouseDown:d=>{GM({id:d,store:s,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),j.useEffect(()=>{if(!(t||!e.current||!h.current))return h.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{var d;(d=h.current)==null||d.destroy()}},[n,r,t,a,e,i,o]),c}const w1e=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function UQ(){const e=rn();return j.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:a,nodesDraggable:o,onError:s,updateNodePositions:c,nodeLookup:f,nodeOrigin:h}=e.getState(),d=new Map,m=w1e(o),v=i?a[0]:5,x=i?a[1]:5,w=n.direction.x*v*n.factor,b=n.direction.y*x*n.factor;for(const[,S]of f){if(!m(S))continue;let E={x:S.internals.positionAbsolute.x+w,y:S.internals.positionAbsolute.y+b};i&&(E=Ig(E,a));const{position:_,positionAbsolute:A}=fQ({nodeId:S.id,nextPosition:E,nodeLookup:f,nodeExtent:r,nodeOrigin:h,onError:s});S.position=_,S.internals.positionAbsolute=A,d.set(S.id,S)}c(d)},[])}const W2=j.createContext(null),S1e=W2.Provider;W2.Consumer;const HQ=()=>j.useContext(W2),_1e=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),E1e=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:s,toHandle:c,isValid:f}=o,h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===n,connectingTo:h,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:a===sd.Strict?(s==null?void 0:s.type)!==n:e!==(s==null?void 0:s.nodeId)||t!==(s==null?void 0:s.id),connectionInProcess:!!s,clickConnectionInProcess:!!i,valid:h&&f}};function A1e({type:e="source",position:t=Ie.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:c,className:f,onMouseDown:h,onTouchStart:d,...m},v){var q,k;const x=o||null,w=e==="target",b=rn(),S=HQ(),{connectOnClick:E,noPanClassName:_,rfId:A}=vt(_1e,tn),{connectingFrom:C,connectingTo:N,clickConnecting:M,isPossibleEndHandle:R,connectionInProcess:P,clickConnectionInProcess:$,valid:L}=vt(E1e(S,x,e),tn);S||(k=(q=b.getState()).onError)==null||k.call(q,"010",Ua.error010());const D=z=>{const{defaultEdgeOptions:H,onConnect:G,hasDefaultEdges:Q}=b.getState(),U={...H,...z};if(Q){const{edges:V,setEdges:X}=b.getState();X(X0e(U,V))}G==null||G(U),s==null||s(U)},F=z=>{if(!S)return;const H=bQ(z.nativeEvent);if(i&&(H&&z.button===0||!H)){const G=b.getState();UM.onPointerDown(z.nativeEvent,{handleDomNode:z.currentTarget,autoPanOnConnect:G.autoPanOnConnect,connectionMode:G.connectionMode,connectionRadius:G.connectionRadius,domNode:G.domNode,nodeLookup:G.nodeLookup,lib:G.lib,isTarget:w,handleId:x,nodeId:S,flowId:G.rfId,panBy:G.panBy,cancelConnection:G.cancelConnection,onConnectStart:G.onConnectStart,onConnectEnd:(...Q)=>{var U,V;return(V=(U=b.getState()).onConnectEnd)==null?void 0:V.call(U,...Q)},updateConnection:G.updateConnection,onConnect:D,isValidConnection:n||((...Q)=>{var U,V;return((V=(U=b.getState()).isValidConnection)==null?void 0:V.call(U,...Q))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:G.autoPanSpeed,dragThreshold:G.connectionDragThreshold})}H?h==null||h(z):d==null||d(z)},I=z=>{const{onClickConnectStart:H,onClickConnectEnd:G,connectionClickStartHandle:Q,connectionMode:U,isValidConnection:V,lib:X,rfId:W,nodeLookup:K,connection:J}=b.getState();if(!S||!Q&&!i)return;if(!Q){H==null||H(z.nativeEvent,{nodeId:S,handleId:x,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:S,type:e,id:x}});return}const ee=vQ(z.target),te=n||V,{connection:ne,isValid:se}=UM.isValid(z.nativeEvent,{handle:{nodeId:S,id:x,type:e},connectionMode:U,fromNodeId:Q.nodeId,fromHandleId:Q.id||null,fromType:Q.type,isValidConnection:te,flowId:W,doc:ee,lib:X,nodeLookup:K});se&&ne&&D(ne);const ce=structuredClone(J);delete ce.inProgress,ce.toPosition=ce.toHandle?ce.toHandle.position:null,G==null||G(z,ce),b.setState({connectionClickStartHandle:null})};return g.jsx("div",{"data-handleid":x,"data-nodeid":S,"data-handlepos":t,"data-id":`${A}-${S}-${x}-${e}`,className:Cn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",_,f,{source:!w,target:w,connectable:r,connectablestart:i,connectableend:a,clickconnecting:M,connectingfrom:C,connectingto:N,valid:L,connectionindicator:r&&(!P||R)&&(P||$?a:i)}]),onMouseDown:F,onTouchStart:F,onClick:E?I:void 0,ref:v,...m,children:c})}const dd=j.memo(zQ(A1e));function C1e({data:e,isConnectable:t,sourcePosition:n=Ie.Bottom}){return g.jsxs(g.Fragment,{children:[e==null?void 0:e.label,g.jsx(dd,{type:"source",position:n,isConnectable:t})]})}function T1e({data:e,isConnectable:t,targetPosition:n=Ie.Top,sourcePosition:r=Ie.Bottom}){return g.jsxs(g.Fragment,{children:[g.jsx(dd,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,g.jsx(dd,{type:"source",position:r,isConnectable:t})]})}function j1e(){return null}function N1e({data:e,isConnectable:t,targetPosition:n=Ie.Top}){return g.jsxs(g.Fragment,{children:[g.jsx(dd,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const dx={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},hq={input:C1e,default:T1e,output:N1e,group:j1e};function O1e(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 M1e=e=>{const{width:t,height:n,x:r,y:i}=Dg(e.nodeLookup,{filter:a=>!!a.selected});return{width:ia(t)?t:null,height:ia(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 R1e({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=rn(),{width:i,height:a,transformString:o,userSelectionActive:s}=vt(M1e,tn),c=UQ(),f=j.useRef(null);j.useEffect(()=>{var v;n||(v=f.current)==null||v.focus({preventScroll:!0})},[n]);const h=!s&&i!==null&&a!==null;if(VQ({nodeRef:f,disabled:!h}),!h)return null;const d=e?v=>{const x=r.getState().nodes.filter(w=>w.selected);e(v,x)}:void 0,m=v=>{Object.prototype.hasOwnProperty.call(dx,v.key)&&(v.preventDefault(),c({direction:dx[v.key],factor:v.shiftKey?4:1}))};return g.jsx("div",{className:Cn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:g.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:m,style:{width:i,height:a}})})}const pq=typeof window<"u"?window:void 0,P1e=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function GQ({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:f,selectionOnDrag:h,selectionMode:d,onSelectionStart:m,onSelectionEnd:v,multiSelectionKeyCode:x,panActivationKeyCode:w,zoomActivationKeyCode:b,elementsSelectable:S,zoomOnScroll:E,zoomOnPinch:_,panOnScroll:A,panOnScrollSpeed:C,panOnScrollMode:N,zoomOnDoubleClick:M,panOnDrag:R,defaultViewport:P,translateExtent:$,minZoom:L,maxZoom:D,preventScrolling:F,onSelectionContextMenu:I,noWheelClassName:q,noPanClassName:k,disableKeyboardA11y:z,onViewportChange:H,isControlledViewport:G}){const{nodesSelectionActive:Q,userSelectionActive:U}=vt(P1e,tn),V=wm(f,{target:pq}),X=wm(w,{target:pq}),W=X||R,K=X||A,J=h&&W!==!0,ee=V||U||J;return h1e({deleteKeyCode:c,multiSelectionKeyCode:x}),g.jsx(g1e,{onPaneContextMenu:a,elementsSelectable:S,zoomOnScroll:E,zoomOnPinch:_,panOnScroll:K,panOnScrollSpeed:C,panOnScrollMode:N,zoomOnDoubleClick:M,panOnDrag:!V&&W,defaultViewport:P,translateExtent:$,minZoom:L,maxZoom:D,zoomActivationKeyCode:b,preventScrolling:F,noWheelClassName:q,noPanClassName:k,onViewportChange:H,isControlledViewport:G,paneClickDistance:s,selectionOnDrag:J,children:g.jsxs(x1e,{onSelectionStart:m,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:W,isSelecting:!!ee,selectionMode:d,selectionKeyPressed:V,paneClickDistance:s,selectionOnDrag:J,children:[e,Q&&g.jsx(R1e,{onSelectionContextMenu:I,noPanClassName:k,disableKeyboardA11y:z})]})})}GQ.displayName="FlowRenderer";const k1e=j.memo(GQ),D1e=e=>t=>e?B2(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 I1e(e){return vt(j.useCallback(D1e(e),[e]),tn)}const L1e=e=>e.updateNodeInternals;function $1e(){const e=vt(L1e),[t]=j.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const a=i.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:i.target,force:!0})}),e(r)}));return j.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function B1e({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=rn(),a=j.useRef(null),o=j.useRef(null),s=j.useRef(e.sourcePosition),c=j.useRef(e.targetPosition),f=j.useRef(t),h=n&&!!e.internals.handleBounds;return j.useEffect(()=>{a.current&&!e.hidden&&(!h||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[h,e.hidden]),j.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),j.useEffect(()=>{if(a.current){const d=f.current!==t,m=s.current!==e.sourcePosition,v=c.current!==e.targetPosition;(d||m||v)&&(f.current=t,s.current=e.sourcePosition,c.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 q1e({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:s,elementsSelectable:c,nodesConnectable:f,nodesFocusable:h,resizeObserver:d,noDragClassName:m,noPanClassName:v,disableKeyboardA11y:x,rfId:w,nodeTypes:b,nodeClickDistance:S,onError:E}){const{node:_,internals:A,isParent:C}=vt(te=>{const ne=te.nodeLookup.get(e),se=te.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:se}},tn);let N=_.type||"default",M=(b==null?void 0:b[N])||hq[N];M===void 0&&(E==null||E("003",Ua.error003(N)),N="default",M=(b==null?void 0:b.default)||hq.default);const R=!!(_.draggable||s&&typeof _.draggable>"u"),P=!!(_.selectable||c&&typeof _.selectable>"u"),$=!!(_.connectable||f&&typeof _.connectable>"u"),L=!!(_.focusable||h&&typeof _.focusable>"u"),D=rn(),F=mQ(_),I=B1e({node:_,nodeType:N,hasDimensions:F,resizeObserver:d}),q=VQ({nodeRef:I,disabled:_.hidden||!R,noDragClassName:m,handleSelector:_.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:S}),k=UQ();if(_.hidden)return null;const z=es(_),H=O1e(_),G=P||R||t||n||r||i,Q=n?te=>n(te,{...A.userNode}):void 0,U=r?te=>r(te,{...A.userNode}):void 0,V=i?te=>i(te,{...A.userNode}):void 0,X=a?te=>a(te,{...A.userNode}):void 0,W=o?te=>o(te,{...A.userNode}):void 0,K=te=>{const{selectNodesOnDrag:ne,nodeDragThreshold:se}=D.getState();P&&(!ne||!R||se>0)&&GM({id:e,store:D,nodeRef:I}),t&&t(te,{...A.userNode})},J=te=>{if(!(yQ(te.nativeEvent)||x)){if(oQ.includes(te.key)&&P){const ne=te.key==="Escape";GM({id:e,store:D,unselect:ne,nodeRef:I})}else if(R&&_.selected&&Object.prototype.hasOwnProperty.call(dx,te.key)){te.preventDefault();const{ariaLabelConfig:ne}=D.getState();D.setState({ariaLiveMessage:ne["node.a11yDescription.ariaLiveMessage"]({direction:te.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),k({direction:dx[te.key],factor:te.shiftKey?4:1})}}},ee=()=>{var xe;if(x||!((xe=I.current)!=null&&xe.matches(":focus-visible")))return;const{transform:te,width:ne,height:se,autoPanOnNodeFocus:ce,setCenter:oe}=D.getState();if(!ce)return;B2(new Map([[e,_]]),{x:0,y:0,width:ne,height:se},te,!0).length>0||oe(_.position.x+z.width/2,_.position.y+z.height/2,{zoom:te[2]})};return g.jsx("div",{className:Cn(["react-flow__node",`react-flow__node-${N}`,{[v]:R},_.className,{selected:_.selected,selectable:P,parent:C,draggable:R,dragging:q}]),ref:I,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:G?"all":"none",visibility:F?"visible":"hidden",..._.style,...H},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:Q,onMouseMove:U,onMouseLeave:V,onContextMenu:X,onClick:K,onDoubleClick:W,onKeyDown:L?J:void 0,tabIndex:L?0:void 0,onFocus:L?ee:void 0,role:_.ariaRole??(L?"group":void 0),"aria-roledescription":"node","aria-describedby":x?void 0:`${LQ}-${w}`,"aria-label":_.ariaLabel,..._.domAttributes,children:g.jsx(S1e,{value:e,children:g.jsx(M,{id:e,data:_.data,type:N,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 z1e=j.memo(q1e);const F1e=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function KQ(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=vt(F1e,tn),o=I1e(e.onlyRenderVisibleElements),s=$1e();return g.jsx("div",{className:"react-flow__nodes",style:mw,children:o.map(c=>g.jsx(z1e,{id:c,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:s,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}KQ.displayName="NodeRenderer";const V1e=j.memo(KQ);function U1e(e){return vt(j.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const a=n.nodeLookup.get(i.source),o=n.nodeLookup.get(i.target);a&&o&&K0e({sourceNode:a,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),tn)}const H1e=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return g.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},G1e=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return g.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},mq={[cx.Arrow]:H1e,[cx.ArrowClosed]:G1e};function K1e(e){const t=rn();return j.useMemo(()=>{var i,a;return Object.prototype.hasOwnProperty.call(mq,e)?mq[e]:((a=(i=t.getState()).onError)==null||a.call(i,"009",Ua.error009(e)),null)},[e])}const W1e=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:s="auto-start-reverse"})=>{const c=K1e(t);return c?g.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:s,refX:"0",refY:"0",children:g.jsx(c,{color:n,strokeWidth:o})}):null},WQ=({defaultColor:e,rfId:t})=>{const n=vt(a=>a.edges),r=vt(a=>a.defaultEdgeOptions),i=j.useMemo(()=>twe(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?g.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:g.jsx("defs",{children:i.map(a=>g.jsx(W1e,{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};WQ.displayName="MarkerDefinitions";var Y1e=j.memo(WQ);function YQ({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:c,className:f,...h}){const[d,m]=j.useState({x:1,y:0,width:0,height:0}),v=Cn(["react-flow__edge-textwrapper",f]),x=j.useRef(null);return j.useEffect(()=>{if(x.current){const w=x.current.getBBox();m({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?g.jsxs("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:v,visibility:d.width?"visible":"hidden",...h,children:[i&&g.jsx("rect",{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:s,ry:s}),g.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:x,style:r,children:n}),c]}):null}YQ.displayName="EdgeText";const X1e=j.memo(YQ);function gw({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:f=20,...h}){return g.jsxs(g.Fragment,{children:[g.jsx("path",{...h,d:e,fill:"none",className:Cn(["react-flow__edge-path",h.className])}),f?g.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}):null,r&&ia(t)&&ia(n)?g.jsx(X1e,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function gq({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Ie.Left||e===Ie.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function XQ({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top}){const[o,s]=gq({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,f]=gq({pos:a,x1:r,y1:i,x2:e,y2:t}),[h,d,m,v]=xQ({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:f});return[`M${e},${t} C${o},${s} ${c},${f} ${r},${i}`,h,d,m,v]}function QQ(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:s,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:b,interactionWidth:S})=>{const[E,_,A]=XQ({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s}),C=e.isInternal?void 0:t;return g.jsx(gw,{id:C,path:E,labelX:_,labelY:A,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:b,interactionWidth:S})})}const Q1e=QQ({isInternal:!1}),ZQ=QQ({isInternal:!0});Q1e.displayName="SimpleBezierEdge";ZQ.displayName="SimpleBezierEdgeInternal";function JQ(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:m,sourcePosition:v=Ie.Bottom,targetPosition:x=Ie.Top,markerEnd:w,markerStart:b,pathOptions:S,interactionWidth:E})=>{const[_,A,C]=zM({sourceX:n,sourceY:r,sourcePosition:v,targetX:i,targetY:a,targetPosition:x,borderRadius:S==null?void 0:S.borderRadius,offset:S==null?void 0:S.offset,stepPosition:S==null?void 0:S.stepPosition}),N=e.isInternal?void 0:t;return g.jsx(gw,{id:N,path:_,labelX:A,labelY:C,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:m,markerEnd:w,markerStart:b,interactionWidth:E})})}const eZ=JQ({isInternal:!1}),tZ=JQ({isInternal:!0});eZ.displayName="SmoothStepEdge";tZ.displayName="SmoothStepEdgeInternal";function nZ(e){return j.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return g.jsx(eZ,{...n,id:r,pathOptions:j.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const Z1e=nZ({isInternal:!1}),rZ=nZ({isInternal:!0});Z1e.displayName="StepEdge";rZ.displayName="StepEdgeInternal";function iZ(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:m,markerEnd:v,markerStart:x,interactionWidth:w})=>{const[b,S,E]=_Q({sourceX:n,sourceY:r,targetX:i,targetY:a}),_=e.isInternal?void 0:t;return g.jsx(gw,{id:_,path:b,labelX:S,labelY:E,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:d,style:m,markerEnd:v,markerStart:x,interactionWidth:w})})}const J1e=iZ({isInternal:!1}),aZ=iZ({isInternal:!0});J1e.displayName="StraightEdge";aZ.displayName="StraightEdgeInternal";function oZ(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=Ie.Bottom,targetPosition:s=Ie.Top,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:b,pathOptions:S,interactionWidth:E})=>{const[_,A,C]=wQ({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:s,curvature:S==null?void 0:S.curvature}),N=e.isInternal?void 0:t;return g.jsx(gw,{id:N,path:_,labelX:A,labelY:C,label:c,labelStyle:f,labelShowBg:h,labelBgStyle:d,labelBgPadding:m,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:b,interactionWidth:E})})}const eSe=oZ({isInternal:!1}),sZ=oZ({isInternal:!0});eSe.displayName="BezierEdge";sZ.displayName="BezierEdgeInternal";const vq={default:sZ,straight:aZ,step:rZ,smoothstep:tZ,simplebezier:ZQ},yq={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},tSe=(e,t,n)=>n===Ie.Left?e-t:n===Ie.Right?e+t:e,nSe=(e,t,n)=>n===Ie.Top?e-t:n===Ie.Bottom?e+t:e,bq="react-flow__edgeupdater";function xq({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s}){return g.jsx("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:Cn([bq,`${bq}-${s}`]),cx:tSe(t,r,e),cy:nSe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function rSe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:s,targetPosition:c,onReconnect:f,onReconnectStart:h,onReconnectEnd:d,setReconnecting:m,setUpdateHover:v}){const x=rn(),w=(A,C)=>{if(A.button!==0)return;const{autoPanOnConnect:N,domNode:M,connectionMode:R,connectionRadius:P,lib:$,onConnectStart:L,cancelConnection:D,nodeLookup:F,rfId:I,panBy:q,updateConnection:k}=x.getState(),z=C.type==="target",H=(U,V)=>{m(!1),d==null||d(U,n,C.type,V)},G=U=>f==null?void 0:f(n,U),Q=(U,V)=>{m(!0),h==null||h(A,n,C.type),L==null||L(U,V)};UM.onPointerDown(A.nativeEvent,{autoPanOnConnect:N,connectionMode:R,connectionRadius:P,domNode:M,handleId:C.id,nodeId:C.nodeId,nodeLookup:F,isTarget:z,edgeUpdaterType:C.type,lib:$,flowId:I,cancelConnection:D,panBy:q,isValidConnection:(...U)=>{var V,X;return((X=(V=x.getState()).isValidConnection)==null?void 0:X.call(V,...U))??!0},onConnect:G,onConnectStart:Q,onConnectEnd:(...U)=>{var V,X;return(X=(V=x.getState()).onConnectEnd)==null?void 0:X.call(V,...U)},onReconnectEnd:H,updateConnection:k,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,dragThreshold:x.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},b=A=>w(A,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),S=A=>w(A,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),E=()=>v(!0),_=()=>v(!1);return g.jsxs(g.Fragment,{children:[(e===!0||e==="source")&&g.jsx(xq,{position:s,centerX:r,centerY:i,radius:t,onMouseDown:b,onMouseEnter:E,onMouseOut:_,type:"source"}),(e===!0||e==="target")&&g.jsx(xq,{position:c,centerX:a,centerY:o,radius:t,onMouseDown:S,onMouseEnter:E,onMouseOut:_,type:"target"})]})}function iSe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:f,reconnectRadius:h,onReconnect:d,onReconnectStart:m,onReconnectEnd:v,rfId:x,edgeTypes:w,noPanClassName:b,onError:S,disableKeyboardA11y:E}){let _=vt(oe=>oe.edgeLookup.get(e));const A=vt(oe=>oe.defaultEdgeOptions);_=A?{...A,..._}:_;let C=_.type||"default",N=(w==null?void 0:w[C])||vq[C];N===void 0&&(S==null||S("011",Ua.error011(C)),C="default",N=(w==null?void 0:w.default)||vq.default);const M=!!(_.focusable||t&&typeof _.focusable>"u"),R=typeof d<"u"&&(_.reconnectable||n&&typeof _.reconnectable>"u"),P=!!(_.selectable||r&&typeof _.selectable>"u"),$=j.useRef(null),[L,D]=j.useState(!1),[F,I]=j.useState(!1),q=rn(),{zIndex:k,sourceX:z,sourceY:H,targetX:G,targetY:Q,sourcePosition:U,targetPosition:V}=vt(j.useCallback(oe=>{const be=oe.nodeLookup.get(_.source),xe=oe.nodeLookup.get(_.target);if(!be||!xe)return{zIndex:_.zIndex,...yq};const we=ewe({id:e,sourceNode:be,targetNode:xe,sourceHandle:_.sourceHandle||null,targetHandle:_.targetHandle||null,connectionMode:oe.connectionMode,onError:S});return{zIndex:G0e({selected:_.selected,zIndex:_.zIndex,sourceNode:be,targetNode:xe,elevateOnSelect:oe.elevateEdgesOnSelect,zIndexMode:oe.zIndexMode}),...we||yq}},[_.source,_.target,_.sourceHandle,_.targetHandle,_.selected,_.zIndex]),tn),X=j.useMemo(()=>_.markerStart?`url('#${FM(_.markerStart,x)}')`:void 0,[_.markerStart,x]),W=j.useMemo(()=>_.markerEnd?`url('#${FM(_.markerEnd,x)}')`:void 0,[_.markerEnd,x]);if(_.hidden||z===null||H===null||G===null||Q===null)return null;const K=oe=>{var Ae;const{addSelectedEdges:be,unselectNodesAndEdges:xe,multiSelectionActive:we}=q.getState();P&&(q.setState({nodesSelectionActive:!1}),_.selected&&we?(xe({nodes:[],edges:[_]}),(Ae=$.current)==null||Ae.blur()):be([e])),i&&i(oe,_)},J=a?oe=>{a(oe,{..._})}:void 0,ee=o?oe=>{o(oe,{..._})}:void 0,te=s?oe=>{s(oe,{..._})}:void 0,ne=c?oe=>{c(oe,{..._})}:void 0,se=f?oe=>{f(oe,{..._})}:void 0,ce=oe=>{var be;if(!E&&oQ.includes(oe.key)&&P){const{unselectNodesAndEdges:xe,addSelectedEdges:we}=q.getState();oe.key==="Escape"?((be=$.current)==null||be.blur(),xe({edges:[_]})):we([e])}};return g.jsx("svg",{style:{zIndex:k},children:g.jsxs("g",{className:Cn(["react-flow__edge",`react-flow__edge-${C}`,_.className,b,{selected:_.selected,animated:_.animated,inactive:!P&&!i,updating:L,selectable:P}]),onClick:K,onDoubleClick:J,onContextMenu:ee,onMouseEnter:te,onMouseMove:ne,onMouseLeave:se,onKeyDown:M?ce: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?`${$Q}-${x}`:void 0,ref:$,..._.domAttributes,children:[!F&&g.jsx(N,{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:G,targetY:Q,sourcePosition:U,targetPosition:V,data:_.data,style:_.style,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerStart:X,markerEnd:W,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth}),R&&g.jsx(rSe,{edge:_,isReconnectable:R,reconnectRadius:h,onReconnect:d,onReconnectStart:m,onReconnectEnd:v,sourceX:z,sourceY:H,targetX:G,targetY:Q,sourcePosition:U,targetPosition:V,setUpdateHover:D,setReconnecting:I})]})})}var aSe=j.memo(iSe);const oSe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function lZ({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:f,onEdgeClick:h,reconnectRadius:d,onEdgeDoubleClick:m,onReconnectStart:v,onReconnectEnd:x,disableKeyboardA11y:w}){const{edgesFocusable:b,edgesReconnectable:S,elementsSelectable:E,onError:_}=vt(oSe,tn),A=U1e(t);return g.jsxs("div",{className:"react-flow__edges",children:[g.jsx(Y1e,{defaultColor:e,rfId:n}),A.map(C=>g.jsx(aSe,{id:C,edgesFocusable:b,edgesReconnectable:S,elementsSelectable:E,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:f,onClick:h,reconnectRadius:d,onDoubleClick:m,onReconnectStart:v,onReconnectEnd:x,rfId:n,onError:_,edgeTypes:r,disableKeyboardA11y:w},C))]})}lZ.displayName="EdgeRenderer";const sSe=j.memo(lZ),lSe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function cSe({children:e}){const t=vt(lSe);return g.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function uSe(e){const t=K2(),n=j.useRef(!1);j.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const fSe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function dSe(e){const t=vt(fSe),n=rn();return j.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function hSe(e){return e.connection.inProgress?{...e.connection,to:Lg(e.connection.to,e.transform)}:{...e.connection}}function pSe(e){return hSe}function mSe(e){const t=pSe();return vt(t,tn)}const gSe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function vSe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:a,height:o,isValid:s,inProgress:c}=vt(gSe,tn);return!(a&&i&&c)?null:g.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:g.jsx("g",{className:Cn(["react-flow__connection",cQ(s)]),children:g.jsx(cZ,{style:t,type:n,CustomComponent:r,isValid:s})})})}const cZ=({style:e,type:t=Xs.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:a,fromNode:o,fromHandle:s,fromPosition:c,to:f,toNode:h,toHandle:d,toPosition:m,pointer:v}=mSe();if(!i)return;if(n)return g.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:s,fromX:a.x,fromY:a.y,toX:f.x,toY:f.y,fromPosition:c,toPosition:m,connectionStatus:cQ(r),toNode:h,toHandle:d,pointer:v});let x="";const w={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:f.x,targetY:f.y,targetPosition:m};switch(t){case Xs.Bezier:[x]=wQ(w);break;case Xs.SimpleBezier:[x]=XQ(w);break;case Xs.Step:[x]=zM({...w,borderRadius:0});break;case Xs.SmoothStep:[x]=zM(w);break;default:[x]=_Q(w)}return g.jsx("path",{d:x,fill:"none",className:"react-flow__connection-path",style:e})};cZ.displayName="ConnectionLine";const ySe={};function wq(e=ySe){j.useRef(e),rn(),j.useEffect(()=>{},[e])}function bSe(){rn(),j.useRef(!1),j.useEffect(()=>{},[])}function uZ({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:h,onSelectionContextMenu:d,onSelectionStart:m,onSelectionEnd:v,connectionLineType:x,connectionLineStyle:w,connectionLineComponent:b,connectionLineContainerStyle:S,selectionKeyCode:E,selectionOnDrag:_,selectionMode:A,multiSelectionKeyCode:C,panActivationKeyCode:N,zoomActivationKeyCode:M,deleteKeyCode:R,onlyRenderVisibleElements:P,elementsSelectable:$,defaultViewport:L,translateExtent:D,minZoom:F,maxZoom:I,preventScrolling:q,defaultMarkerColor:k,zoomOnScroll:z,zoomOnPinch:H,panOnScroll:G,panOnScrollSpeed:Q,panOnScrollMode:U,zoomOnDoubleClick:V,panOnDrag:X,onPaneClick:W,onPaneMouseEnter:K,onPaneMouseMove:J,onPaneMouseLeave:ee,onPaneScroll:te,onPaneContextMenu:ne,paneClickDistance:se,nodeClickDistance:ce,onEdgeContextMenu:oe,onEdgeMouseEnter:be,onEdgeMouseMove:xe,onEdgeMouseLeave:we,reconnectRadius:Ae,onReconnect:Ee,onReconnectStart:rt,onReconnectEnd:Ve,noDragClassName:Pt,noWheelClassName:Ft,noPanClassName:Xe,disableKeyboardA11y:ht,nodeExtent:Tt,rfId:We,viewport:Et,onViewportChange:hn}){return wq(e),wq(t),bSe(),uSe(n),dSe(Et),g.jsx(k1e,{onPaneClick:W,onPaneMouseEnter:K,onPaneMouseMove:J,onPaneMouseLeave:ee,onPaneContextMenu:ne,onPaneScroll:te,paneClickDistance:se,deleteKeyCode:R,selectionKeyCode:E,selectionOnDrag:_,selectionMode:A,onSelectionStart:m,onSelectionEnd:v,multiSelectionKeyCode:C,panActivationKeyCode:N,zoomActivationKeyCode:M,elementsSelectable:$,zoomOnScroll:z,zoomOnPinch:H,zoomOnDoubleClick:V,panOnScroll:G,panOnScrollSpeed:Q,panOnScrollMode:U,panOnDrag:X,defaultViewport:L,translateExtent:D,minZoom:F,maxZoom:I,onSelectionContextMenu:d,preventScrolling:q,noDragClassName:Pt,noWheelClassName:Ft,noPanClassName:Xe,disableKeyboardA11y:ht,onViewportChange:hn,isControlledViewport:!!Et,children:g.jsxs(cSe,{children:[g.jsx(sSe,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:Ee,onReconnectStart:rt,onReconnectEnd:Ve,onlyRenderVisibleElements:P,onEdgeContextMenu:oe,onEdgeMouseEnter:be,onEdgeMouseMove:xe,onEdgeMouseLeave:we,reconnectRadius:Ae,defaultMarkerColor:k,noPanClassName:Xe,disableKeyboardA11y:ht,rfId:We}),g.jsx(vSe,{style:w,type:x,component:b,containerStyle:S}),g.jsx("div",{className:"react-flow__edgelabel-renderer"}),g.jsx(V1e,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:f,onNodeContextMenu:h,nodeClickDistance:ce,onlyRenderVisibleElements:P,noPanClassName:Xe,noDragClassName:Pt,disableKeyboardA11y:ht,nodeExtent:Tt,rfId:We}),g.jsx("div",{className:"react-flow__viewport-portal"})]})})}uZ.displayName="GraphView";const xSe=j.memo(uZ),Sq=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:f=2,nodeOrigin:h,nodeExtent:d,zIndexMode:m="basic"}={})=>{const v=new Map,x=new Map,w=new Map,b=new Map,S=r??t??[],E=n??e??[],_=h??[0,0],A=d??vm;CQ(w,b,S);const{nodesInitialized:C}=VM(E,v,x,{nodeOrigin:_,nodeExtent:A,zIndexMode:m});let N=[0,0,1];if(o&&i&&a){const M=Dg(v,{filter:L=>!!((L.width||L.initialWidth)&&(L.height||L.initialHeight))}),{x:R,y:P,zoom:$}=q2(M,i,a,c,f,(s==null?void 0:s.padding)??.1);N=[R,P,$]}return{rfId:"1",width:i??0,height:a??0,transform:N,nodes:E,nodesInitialized:C,nodeLookup:v,parentLookup:x,edges:S,edgeLookup:b,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:f,translateExtent:vm,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:sd.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:s,fitViewResolver:null,connection:{...lQ},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:q0e,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:sQ,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},wSe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:f,nodeOrigin:h,nodeExtent:d,zIndexMode:m})=>$we((v,x)=>{async function w(){const{nodeLookup:b,panZoom:S,fitViewOptions:E,fitViewResolver:_,width:A,height:C,minZoom:N,maxZoom:M}=x();S&&(await $0e({nodes:b,width:A,height:C,panZoom:S,minZoom:N,maxZoom:M},E),_==null||_.resolve(!0),v({fitViewResolver:null}))}return{...Sq({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c,maxZoom:f,nodeOrigin:h,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:m}),setNodes:b=>{const{nodeLookup:S,parentLookup:E,nodeOrigin:_,elevateNodesOnSelect:A,fitViewQueued:C,zIndexMode:N,nodesSelectionActive:M}=x(),{nodesInitialized:R,hasSelectedNodes:P}=VM(b,S,E,{nodeOrigin:_,nodeExtent:d,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:N}),$=M&&P;C&&R?(w(),v({nodes:b,nodesInitialized:R,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:$})):v({nodes:b,nodesInitialized:R,nodesSelectionActive:$})},setEdges:b=>{const{connectionLookup:S,edgeLookup:E}=x();CQ(S,E,b),v({edges:b})},setDefaultNodesAndEdges:(b,S)=>{if(b){const{setNodes:E}=x();E(b),v({hasDefaultNodes:!0})}if(S){const{setEdges:E}=x();E(S),v({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:S,nodeLookup:E,parentLookup:_,domNode:A,nodeOrigin:C,nodeExtent:N,debug:M,fitViewQueued:R,zIndexMode:P}=x(),{changes:$,updatedInternals:L}=lwe(b,E,_,A,C,N,P);L&&(iwe(E,_,{nodeOrigin:C,nodeExtent:N,zIndexMode:P}),R?(w(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),($==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:C,connection:N,updateConnection:M,onNodesChangeMiddlewareMap:R}=x();for(const[P,$]of b){const L=A.get(P),D=!!(L!=null&&L.expandParent&&(L!=null&&L.parentId)&&($!=null&&$.position)),F={id:P,type:"position",position:D?{x:Math.max(0,$.position.x),y:Math.max(0,$.position.y)}:$.position,dragging:S};if(L&&N.inProgress&&N.fromNode.id===L.id){const I=Jc(L,N.fromHandle,Ie.Left,!0);M({...N,from:I})}D&&L.parentId&&E.push({id:P,parentId:L.parentId,rect:{...$.internals.positionAbsolute,width:$.measured.width??0,height:$.measured.height??0}}),_.push(F)}if(E.length>0){const{parentLookup:P,nodeOrigin:$}=x(),L=G2(E,A,P,$);_.push(...L)}for(const P of R.values())_=P(_);C(_)},triggerNodeChanges:b=>{const{onNodesChange:S,setNodes:E,nodes:_,hasDefaultNodes:A,debug:C}=x();if(b!=null&&b.length){if(A){const N=a1e(b,_);E(N)}C&&console.log("React Flow: trigger node changes",b),S==null||S(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:S,setEdges:E,edges:_,hasDefaultEdges:A,debug:C}=x();if(b!=null&&b.length){if(A){const N=o1e(b,_);E(N)}C&&console.log("React Flow: trigger edge changes",b),S==null||S(b)}},addSelectedNodes:b=>{const{multiSelectionActive:S,edgeLookup:E,nodeLookup:_,triggerNodeChanges:A,triggerEdgeChanges:C}=x();if(S){const N=b.map(M=>cc(M,!0));A(N);return}A(yf(_,new Set([...b]),!0)),C(yf(E))},addSelectedEdges:b=>{const{multiSelectionActive:S,edgeLookup:E,nodeLookup:_,triggerNodeChanges:A,triggerEdgeChanges:C}=x();if(S){const N=b.map(M=>cc(M,!0));C(N);return}C(yf(E,new Set([...b]))),A(yf(_,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:S}={})=>{const{edges:E,nodes:_,nodeLookup:A,triggerNodeChanges:C,triggerEdgeChanges:N}=x(),M=b||_,R=S||E,P=[];for(const L of M){if(!L.selected)continue;const D=A.get(L.id);D&&(D.selected=!1),P.push(cc(L.id,!1))}const $=[];for(const L of R)L.selected&&$.push(cc(L.id,!1));C(P),N($)},setMinZoom:b=>{const{panZoom:S,maxZoom:E}=x();S==null||S.setScaleExtent([b,E]),v({minZoom:b})},setMaxZoom:b=>{const{panZoom:S,minZoom:E}=x();S==null||S.setScaleExtent([E,b]),v({maxZoom:b})},setTranslateExtent:b=>{var S;(S=x().panZoom)==null||S.setTranslateExtent(b),v({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:S,triggerNodeChanges:E,triggerEdgeChanges:_,elementsSelectable:A}=x();if(!A)return;const C=S.reduce((M,R)=>R.selected?[...M,cc(R.id,!1)]:M,[]),N=b.reduce((M,R)=>R.selected?[...M,cc(R.id,!1)]:M,[]);E(C),_(N)},setNodeExtent:b=>{const{nodes:S,nodeLookup:E,parentLookup:_,nodeOrigin:A,elevateNodesOnSelect:C,nodeExtent:N,zIndexMode:M}=x();b[0][0]===N[0][0]&&b[0][1]===N[0][1]&&b[1][0]===N[1][0]&&b[1][1]===N[1][1]||(VM(S,E,_,{nodeOrigin:A,nodeExtent:b,elevateNodesOnSelect:C,checkEquality:!1,zIndexMode:M}),v({nodeExtent:b}))},panBy:b=>{const{transform:S,width:E,height:_,panZoom:A,translateExtent:C}=x();return cwe({delta:b,panZoom:A,transform:S,translateExtent:C,width:E,height:_})},setCenter:async(b,S,E)=>{const{width:_,height:A,maxZoom:C,panZoom:N}=x();if(!N)return Promise.resolve(!1);const M=typeof(E==null?void 0:E.zoom)<"u"?E.zoom:C;return await N.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:()=>{v({connection:{...lQ}})},updateConnection:b=>{v({connection:b})},reset:()=>v({...Sq()})}},Object.is);function SSe({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:s,initialFitViewOptions:c,fitView:f,nodeOrigin:h,nodeExtent:d,zIndexMode:m,children:v}){const[x]=j.useState(()=>wSe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:f,minZoom:o,maxZoom:s,fitViewOptions:c,nodeOrigin:h,nodeExtent:d,zIndexMode:m}));return g.jsx(Bwe,{value:x,children:g.jsx(c1e,{children:v})})}function _Se({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:s,fitViewOptions:c,minZoom:f,maxZoom:h,nodeOrigin:d,nodeExtent:m,zIndexMode:v}){return j.useContext(hw)?g.jsx(g.Fragment,{children:e}):g.jsx(SSe,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:s,initialFitViewOptions:c,initialMinZoom:f,initialMaxZoom:h,nodeOrigin:d,nodeExtent:m,zIndexMode:v,children:e})}const ESe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function ASe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:s,onEdgeClick:c,onInit:f,onMove:h,onMoveStart:d,onMoveEnd:m,onConnect:v,onConnectStart:x,onConnectEnd:w,onClickConnectStart:b,onClickConnectEnd:S,onNodeMouseEnter:E,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:C,onNodeDoubleClick:N,onNodeDragStart:M,onNodeDrag:R,onNodeDragStop:P,onNodesDelete:$,onEdgesDelete:L,onDelete:D,onSelectionChange:F,onSelectionDragStart:I,onSelectionDrag:q,onSelectionDragStop:k,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:G,onBeforeDelete:Q,connectionMode:U,connectionLineType:V=Xs.Bezier,connectionLineStyle:X,connectionLineComponent:W,connectionLineContainerStyle:K,deleteKeyCode:J="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:te=!1,selectionMode:ne=ym.Full,panActivationKeyCode:se="Space",multiSelectionKeyCode:ce=xm()?"Meta":"Control",zoomActivationKeyCode:oe=xm()?"Meta":"Control",snapToGrid:be,snapGrid:xe,onlyRenderVisibleElements:we=!1,selectNodesOnDrag:Ae,nodesDraggable:Ee,autoPanOnNodeFocus:rt,nodesConnectable:Ve,nodesFocusable:Pt,nodeOrigin:Ft=BQ,edgesFocusable:Xe,edgesReconnectable:ht,elementsSelectable:Tt=!0,defaultViewport:We=Zwe,minZoom:Et=.5,maxZoom:hn=2,translateExtent:Tn=vm,preventScrolling:ya=!0,nodeExtent:rr,defaultMarkerColor:is="#b1b1b7",zoomOnScroll:zr=!0,zoomOnPinch:Ln=!0,panOnScroll:Ht=!1,panOnScrollSpeed:Fr=.5,panOnScrollMode:$n=Lc.Free,zoomOnDoubleClick:dh=!0,panOnDrag:$l=!0,onPaneClick:hi,onPaneMouseEnter:as,onPaneMouseMove:os,onPaneMouseLeave:Qa,onPaneScroll:pi,onPaneContextMenu:Fe,paneClickDistance:Vt=1,nodeClickDistance:gn=0,children:Bn,onReconnect:ba,onReconnectStart:Gt,onReconnectEnd:ir,onEdgeContextMenu:Za,onEdgeDoubleClick:ar,onEdgeMouseEnter:or,onEdgeMouseMove:ss,onEdgeMouseLeave:Vr,reconnectRadius:hh=10,onNodesChange:Jg,onEdgesChange:xa,noDragClassName:jn="nodrag",noWheelClassName:sr="nowheel",noPanClassName:Ja="nopan",fitView:xu,fitViewOptions:ev,connectOnClick:h1,attributionPosition:tv,proOptions:Bl,defaultEdgeOptions:ph,elevateNodesOnSelect:ls=!0,elevateEdgesOnSelect:cs=!1,disableKeyboardA11y:us=!1,autoPanOnConnect:fs,autoPanOnNodeDrag:vn,autoPanSpeed:nv,connectionRadius:rv,isValidConnection:eo,onError:ds,style:p1,id:mh,nodeDragThreshold:iv,connectionDragThreshold:m1,viewport:wu,onViewportChange:Su,width:Ui,height:_r,colorMode:av="light",debug:g1,onScroll:hs,ariaLabelConfig:ov,zIndexMode:ql="basic",...v1},Er){const zl=mh||"1",sv=n1e(av),gh=j.useCallback(to=>{to.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),hs==null||hs(to)},[hs]);return g.jsx("div",{"data-testid":"rf__wrapper",...v1,onScroll:gh,style:{...p1,...ESe},ref:Er,className:Cn(["react-flow",i,sv]),id:mh,role:"application",children:g.jsxs(_Se,{nodes:e,edges:t,width:Ui,height:_r,fitView:xu,fitViewOptions:ev,minZoom:Et,maxZoom:hn,nodeOrigin:Ft,nodeExtent:rr,zIndexMode:ql,children:[g.jsx(t1e,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:v,onConnectStart:x,onConnectEnd:w,onClickConnectStart:b,onClickConnectEnd:S,nodesDraggable:Ee,autoPanOnNodeFocus:rt,nodesConnectable:Ve,nodesFocusable:Pt,edgesFocusable:Xe,edgesReconnectable:ht,elementsSelectable:Tt,elevateNodesOnSelect:ls,elevateEdgesOnSelect:cs,minZoom:Et,maxZoom:hn,nodeExtent:rr,onNodesChange:Jg,onEdgesChange:xa,snapToGrid:be,snapGrid:xe,connectionMode:U,translateExtent:Tn,connectOnClick:h1,defaultEdgeOptions:ph,fitView:xu,fitViewOptions:ev,onNodesDelete:$,onEdgesDelete:L,onDelete:D,onNodeDragStart:M,onNodeDrag:R,onNodeDragStop:P,onSelectionDrag:q,onSelectionDragStart:I,onSelectionDragStop:k,onMove:h,onMoveStart:d,onMoveEnd:m,noPanClassName:Ja,nodeOrigin:Ft,rfId:zl,autoPanOnConnect:fs,autoPanOnNodeDrag:vn,autoPanSpeed:nv,onError:ds,connectionRadius:rv,isValidConnection:eo,selectNodesOnDrag:Ae,nodeDragThreshold:iv,connectionDragThreshold:m1,onBeforeDelete:Q,debug:g1,ariaLabelConfig:ov,zIndexMode:ql}),g.jsx(xSe,{onInit:f,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:E,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:C,onNodeDoubleClick:N,nodeTypes:a,edgeTypes:o,connectionLineType:V,connectionLineStyle:X,connectionLineComponent:W,connectionLineContainerStyle:K,selectionKeyCode:ee,selectionOnDrag:te,selectionMode:ne,deleteKeyCode:J,multiSelectionKeyCode:ce,panActivationKeyCode:se,zoomActivationKeyCode:oe,onlyRenderVisibleElements:we,defaultViewport:We,translateExtent:Tn,minZoom:Et,maxZoom:hn,preventScrolling:ya,zoomOnScroll:zr,zoomOnPinch:Ln,zoomOnDoubleClick:dh,panOnScroll:Ht,panOnScrollSpeed:Fr,panOnScrollMode:$n,panOnDrag:$l,onPaneClick:hi,onPaneMouseEnter:as,onPaneMouseMove:os,onPaneMouseLeave:Qa,onPaneScroll:pi,onPaneContextMenu:Fe,paneClickDistance:Vt,nodeClickDistance:gn,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:G,onReconnect:ba,onReconnectStart:Gt,onReconnectEnd:ir,onEdgeContextMenu:Za,onEdgeDoubleClick:ar,onEdgeMouseEnter:or,onEdgeMouseMove:ss,onEdgeMouseLeave:Vr,reconnectRadius:hh,defaultMarkerColor:is,noDragClassName:jn,noWheelClassName:sr,noPanClassName:Ja,rfId:zl,disableKeyboardA11y:us,nodeExtent:rr,viewport:wu,onViewportChange:Su}),g.jsx(Qwe,{onSelectionChange:F}),Bn,g.jsx(Gwe,{proOptions:Bl,position:tv}),g.jsx(Hwe,{rfId:zl,disableKeyboardA11y:us})]})})}var CSe=zQ(ASe);function TSe({dimensions:e,lineWidth:t,variant:n,className:r}){return g.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Cn(["react-flow__background-pattern",n,r])})}function jSe({radius:e,className:t}){return g.jsx("circle",{cx:e,cy:e,r:e,className:Cn(["react-flow__background-pattern","dots",t])})}var bl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(bl||(bl={}));const NSe={[bl.Dots]:1,[bl.Lines]:1,[bl.Cross]:6},OSe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function fZ({id:e,variant:t=bl.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:s,style:c,className:f,patternClassName:h}){const d=j.useRef(null),{transform:m,patternId:v}=vt(OSe,tn),x=r||NSe[t],w=t===bl.Dots,b=t===bl.Cross,S=Array.isArray(n)?n:[n,n],E=[S[0]*m[2]||1,S[1]*m[2]||1],_=x*m[2],A=Array.isArray(a)?a:[a,a],C=b?[_,_]:E,N=[A[0]*m[2]||1+C[0]/2,A[1]*m[2]||1+C[1]/2],M=`${v}${e||""}`;return g.jsxs("svg",{className:Cn(["react-flow__background",f]),style:{...c,...mw,"--xy-background-color-props":s,"--xy-background-pattern-color-props":o},ref:d,"data-testid":"rf__background",children:[g.jsx("pattern",{id:M,x:m[0]%E[0],y:m[1]%E[1],width:E[0],height:E[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${N[0]},-${N[1]})`,children:w?g.jsx(jSe,{radius:_/2,className:h}):g.jsx(TSe,{dimensions:C,lineWidth:i,variant:t,className:h})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${M})`})]})}fZ.displayName="Background";j.memo(fZ);function MSe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:g.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function RSe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:g.jsx("path",{d:"M0 0h32v4.2H0z"})})}function PSe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:g.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 kSe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.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 DSe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.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 qy({children:e,className:t,...n}){return g.jsx("button",{type:"button",className:Cn(["react-flow__controls-button",t]),...n,children:e})}const ISe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function dZ({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:c,className:f,children:h,position:d="bottom-left",orientation:m="vertical","aria-label":v}){const x=rn(),{isInteractive:w,minZoomReached:b,maxZoomReached:S,ariaLabelConfig:E}=vt(ISe,tn),{zoomIn:_,zoomOut:A,fitView:C}=K2(),N=()=>{_(),a==null||a()},M=()=>{A(),o==null||o()},R=()=>{C(i),s==null||s()},P=()=>{x.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),c==null||c(!w)},$=m==="horizontal"?"horizontal":"vertical";return g.jsxs(pw,{className:Cn(["react-flow__controls",$,f]),position:d,style:e,"data-testid":"rf__controls","aria-label":v??E["controls.ariaLabel"],children:[t&&g.jsxs(g.Fragment,{children:[g.jsx(qy,{onClick:N,className:"react-flow__controls-zoomin",title:E["controls.zoomIn.ariaLabel"],"aria-label":E["controls.zoomIn.ariaLabel"],disabled:S,children:g.jsx(MSe,{})}),g.jsx(qy,{onClick:M,className:"react-flow__controls-zoomout",title:E["controls.zoomOut.ariaLabel"],"aria-label":E["controls.zoomOut.ariaLabel"],disabled:b,children:g.jsx(RSe,{})})]}),n&&g.jsx(qy,{className:"react-flow__controls-fitview",onClick:R,title:E["controls.fitView.ariaLabel"],"aria-label":E["controls.fitView.ariaLabel"],children:g.jsx(PSe,{})}),r&&g.jsx(qy,{className:"react-flow__controls-interactive",onClick:P,title:E["controls.interactive.ariaLabel"],"aria-label":E["controls.interactive.ariaLabel"],children:w?g.jsx(DSe,{}):g.jsx(kSe,{})}),h]})}dZ.displayName="Controls";j.memo(dZ);function LSe({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:c,className:f,borderRadius:h,shapeRendering:d,selected:m,onClick:v}){const{background:x,backgroundColor:w}=a||{},b=o||x||w;return g.jsx("rect",{className:Cn(["react-flow__minimap-node",{selected:m},f]),x:t,y:n,rx:h,ry:h,width:r,height:i,style:{fill:b,stroke:s,strokeWidth:c},shapeRendering:d,onClick:v?S=>v(S,e):void 0})}const $Se=j.memo(LSe),BSe=e=>e.nodes.map(t=>t.id),pE=e=>e instanceof Function?e:()=>e;function qSe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=$Se,onClick:o}){const s=vt(BSe,tn),c=pE(t),f=pE(e),h=pE(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return g.jsx(g.Fragment,{children:s.map(m=>g.jsx(FSe,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:f,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:d},m))})}function zSe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:s,onClick:c}){const{node:f,x:h,y:d,width:m,height:v}=vt(x=>{const w=x.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const b=w.internals.userNode,{x:S,y:E}=w.internals.positionAbsolute,{width:_,height:A}=es(b);return{node:b,x:S,y:E,width:_,height:A}},tn);return!f||f.hidden||!mQ(f)?null:g.jsx(s,{x:h,y:d,width:m,height:v,style:f.style,selected:!!f.selected,className:r(f),color:t(f),borderRadius:i,strokeColor:n(f),strokeWidth:a,shapeRendering:o,onClick:c,id:f.id})}const FSe=j.memo(zSe);var VSe=j.memo(qSe);const USe=200,HSe=150,GSe=e=>!e.hidden,KSe=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?pQ(Dg(e.nodeLookup,{filter:GSe}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},WSe="react-flow__minimap-desc";function hZ({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:s,bgColor:c,maskColor:f,maskStrokeColor:h,maskStrokeWidth:d,position:m="bottom-right",onClick:v,onNodeClick:x,pannable:w=!1,zoomable:b=!1,ariaLabel:S,inversePan:E,zoomStep:_=1,offsetScale:A=5}){const C=rn(),N=j.useRef(null),{boundingRect:M,viewBB:R,rfId:P,panZoom:$,translateExtent:L,flowWidth:D,flowHeight:F,ariaLabelConfig:I}=vt(KSe,tn),q=(e==null?void 0:e.width)??USe,k=(e==null?void 0:e.height)??HSe,z=M.width/q,H=M.height/k,G=Math.max(z,H),Q=G*q,U=G*k,V=A*G,X=M.x-(Q-M.width)/2-V,W=M.y-(U-M.height)/2-V,K=Q+V*2,J=U+V*2,ee=`${WSe}-${P}`,te=j.useRef(0),ne=j.useRef();te.current=G,j.useEffect(()=>{if(N.current&&$)return ne.current=ywe({domNode:N.current,panZoom:$,getTransform:()=>C.getState().transform,getViewScale:()=>te.current}),()=>{var be;(be=ne.current)==null||be.destroy()}},[$]),j.useEffect(()=>{var be;(be=ne.current)==null||be.update({translateExtent:L,width:D,height:F,inversePan:E,pannable:w,zoomStep:_,zoomable:b})},[w,b,E,_,L,D,F]);const se=v?be=>{var Ae;const[xe,we]=((Ae=ne.current)==null?void 0:Ae.pointer(be))||[0,0];v(be,{x:xe,y:we})}:void 0,ce=x?j.useCallback((be,xe)=>{const we=C.getState().nodeLookup.get(xe).internals.userNode;x(be,we)},[]):void 0,oe=S??I["minimap.ariaLabel"];return g.jsx(pw,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*G: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:Cn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:g.jsxs("svg",{width:q,height:k,viewBox:`${X} ${W} ${K} ${J}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:N,onClick:se,children:[oe&&g.jsx("title",{id:ee,children:oe}),g.jsx(VSe,{onClick:ce,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),g.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-V},${W-V}h${K+V*2}v${J+V*2}h${-K-V*2}z
421
+ M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}hZ.displayName="MiniMap";j.memo(hZ);const YSe=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,XSe={[fd.Line]:"right",[fd.Handle]:"bottom-right"};function QSe({nodeId:e,position:t,variant:n=fd.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:s=10,minHeight:c=10,maxWidth:f=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:m,autoScale:v=!0,shouldResize:x,onResizeStart:w,onResize:b,onResizeEnd:S}){const E=HQ(),_=typeof e=="string"?e:E,A=rn(),C=j.useRef(null),N=n===fd.Handle,M=vt(j.useCallback(YSe(N&&v),[N,v]),tn),R=j.useRef(null),P=t??XSe[n];j.useEffect(()=>{if(!(!C.current||!_))return R.current||(R.current=Rwe({domNode:C.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:L,transform:D,snapGrid:F,snapToGrid:I,nodeOrigin:q,domNode:k}=A.getState();return{nodeLookup:L,transform:D,snapGrid:F,snapToGrid:I,nodeOrigin:q,paneDomNode:k}},onChange:(L,D)=>{const{triggerNodeChanges:F,nodeLookup:I,parentLookup:q,nodeOrigin:k}=A.getState(),z=[],H={x:L.x,y:L.y},G=I.get(_);if(G&&G.expandParent&&G.parentId){const Q=G.origin??k,U=L.width??G.measured.width??0,V=L.height??G.measured.height??0,X={id:G.id,parentId:G.parentId,rect:{width:U,height:V,...gQ({x:L.x??G.position.x,y:L.y??G.position.y},{width:U,height:V},G.parentId,I,Q)}},W=G2([X],I,q,k);z.push(...W),H.x=L.x?Math.max(Q[0]*U,L.x):void 0,H.y=L.y?Math.max(Q[1]*V,L.y):void 0}if(H.x!==void 0&&H.y!==void 0){const Q={id:_,type:"position",position:{...H}};z.push(Q)}if(L.width!==void 0&&L.height!==void 0){const U={id:_,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:L.width,height:L.height}};z.push(U)}for(const Q of D){const U={...Q,type:"position"};z.push(U)}F(z)},onEnd:({width:L,height:D})=>{const F={id:_,type:"dimensions",resizing:!1,dimensions:{width:L,height:D}};A.getState().triggerNodeChanges([F])}})),R.current.update({controlPosition:P,boundaries:{minWidth:s,minHeight:c,maxWidth:f,maxHeight:h},keepAspectRatio:d,resizeDirection:m,onResizeStart:w,onResize:b,onResizeEnd:S,shouldResize:x}),()=>{var L;(L=R.current)==null||L.destroy()}},[P,s,c,f,h,d,w,b,S,x]);const $=P.split("-");return g.jsx("div",{className:Cn(["react-flow__resize-control","nodrag",...$,n,r]),ref:C,style:{...i,scale:M,...o&&{[N?"backgroundColor":"borderColor"]:o}},children:a})}j.memo(QSe);function Y2(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 mE,_q;function ZSe(){if(_q)return mE;_q=1;function e(){this.__data__=[],this.size=0}return mE=e,mE}var gE,Eq;function Yd(){if(Eq)return gE;Eq=1;function e(t,n){return t===n||t!==t&&n!==n}return gE=e,gE}var vE,Aq;function vw(){if(Aq)return vE;Aq=1;var e=Yd();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return vE=t,vE}var yE,Cq;function JSe(){if(Cq)return yE;Cq=1;var e=vw(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():n.call(a,o,1),--this.size,!0}return yE=r,yE}var bE,Tq;function e_e(){if(Tq)return bE;Tq=1;var e=vw();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return bE=t,bE}var xE,jq;function t_e(){if(jq)return xE;jq=1;var e=vw();function t(n){return e(this.__data__,n)>-1}return xE=t,xE}var wE,Nq;function n_e(){if(Nq)return wE;Nq=1;var e=vw();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 wE=t,wE}var SE,Oq;function yw(){if(Oq)return SE;Oq=1;var e=ZSe(),t=JSe(),n=e_e(),r=t_e(),i=n_e();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var f=o[s];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,SE=a,SE}var _E,Mq;function r_e(){if(Mq)return _E;Mq=1;var e=yw();function t(){this.__data__=new e,this.size=0}return _E=t,_E}var EE,Rq;function i_e(){if(Rq)return EE;Rq=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return EE=e,EE}var AE,Pq;function a_e(){if(Pq)return AE;Pq=1;function e(t){return this.__data__.get(t)}return AE=e,AE}var CE,kq;function o_e(){if(kq)return CE;kq=1;function e(t){return this.__data__.has(t)}return CE=e,CE}var TE,Dq;function pZ(){if(Dq)return TE;Dq=1;var e=typeof yy=="object"&&yy&&yy.Object===Object&&yy;return TE=e,TE}var jE,Iq;function ma(){if(Iq)return jE;Iq=1;var e=pZ(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return jE=n,jE}var NE,Lq;function Xd(){if(Lq)return NE;Lq=1;var e=ma(),t=e.Symbol;return NE=t,NE}var OE,$q;function s_e(){if($q)return OE;$q=1;var e=Xd(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=n.call(o,i),c=o[i];try{o[i]=void 0;var f=!0}catch{}var h=r.call(o);return f&&(s?o[i]=c:delete o[i]),h}return OE=a,OE}var ME,Bq;function l_e(){if(Bq)return ME;Bq=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return ME=n,ME}var RE,qq;function ts(){if(qq)return RE;qq=1;var e=Xd(),t=s_e(),n=l_e(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:r:a&&a in Object(s)?t(s):n(s)}return RE=o,RE}var PE,zq;function wr(){if(zq)return PE;zq=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return PE=e,PE}var kE,Fq;function Qd(){if(Fq)return kE;Fq=1;var e=ts(),t=wr(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!t(s))return!1;var c=e(s);return c==r||c==i||c==n||c==a}return kE=o,kE}var DE,Vq;function c_e(){if(Vq)return DE;Vq=1;var e=ma(),t=e["__core-js_shared__"];return DE=t,DE}var IE,Uq;function u_e(){if(Uq)return IE;Uq=1;var e=c_e(),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 IE=n,IE}var LE,Hq;function mZ(){if(Hq)return LE;Hq=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 LE=n,LE}var $E,Gq;function f_e(){if(Gq)return $E;Gq=1;var e=Qd(),t=u_e(),n=wr(),r=mZ(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,c=o.toString,f=s.hasOwnProperty,h=RegExp("^"+c.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(m){if(!n(m)||t(m))return!1;var v=e(m)?h:a;return v.test(r(m))}return $E=d,$E}var BE,Kq;function d_e(){if(Kq)return BE;Kq=1;function e(t,n){return t==null?void 0:t[n]}return BE=e,BE}var qE,Wq;function du(){if(Wq)return qE;Wq=1;var e=f_e(),t=d_e();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return qE=n,qE}var zE,Yq;function X2(){if(Yq)return zE;Yq=1;var e=du(),t=ma(),n=e(t,"Map");return zE=n,zE}var FE,Xq;function bw(){if(Xq)return FE;Xq=1;var e=du(),t=e(Object,"create");return FE=t,FE}var VE,Qq;function h_e(){if(Qq)return VE;Qq=1;var e=bw();function t(){this.__data__=e?e(null):{},this.size=0}return VE=t,VE}var UE,Zq;function p_e(){if(Zq)return UE;Zq=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return UE=e,UE}var HE,Jq;function m_e(){if(Jq)return HE;Jq=1;var e=bw(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var s=o[a];return s===t?void 0:s}return r.call(o,a)?o[a]:void 0}return HE=i,HE}var GE,e5;function g_e(){if(e5)return GE;e5=1;var e=bw(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return GE=r,GE}var KE,t5;function v_e(){if(t5)return KE;t5=1;var e=bw(),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 KE=n,KE}var WE,n5;function y_e(){if(n5)return WE;n5=1;var e=h_e(),t=p_e(),n=m_e(),r=g_e(),i=v_e();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var f=o[s];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,WE=a,WE}var YE,r5;function b_e(){if(r5)return YE;r5=1;var e=y_e(),t=yw(),n=X2();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return YE=r,YE}var XE,i5;function x_e(){if(i5)return XE;i5=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return XE=e,XE}var QE,a5;function xw(){if(a5)return QE;a5=1;var e=x_e();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return QE=t,QE}var ZE,o5;function w_e(){if(o5)return ZE;o5=1;var e=xw();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return ZE=t,ZE}var JE,s5;function S_e(){if(s5)return JE;s5=1;var e=xw();function t(n){return e(this,n).get(n)}return JE=t,JE}var eA,l5;function __e(){if(l5)return eA;l5=1;var e=xw();function t(n){return e(this,n).has(n)}return eA=t,eA}var tA,c5;function E_e(){if(c5)return tA;c5=1;var e=xw();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 tA=t,tA}var nA,u5;function Q2(){if(u5)return nA;u5=1;var e=b_e(),t=w_e(),n=S_e(),r=__e(),i=E_e();function a(o){var s=-1,c=o==null?0:o.length;for(this.clear();++s<c;){var f=o[s];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,nA=a,nA}var rA,f5;function A_e(){if(f5)return rA;f5=1;var e=yw(),t=X2(),n=Q2(),r=200;function i(a,o){var s=this.__data__;if(s instanceof e){var c=s.__data__;if(!t||c.length<r-1)return c.push([a,o]),this.size=++s.size,this;s=this.__data__=new n(c)}return s.set(a,o),this.size=s.size,this}return rA=i,rA}var iA,d5;function ww(){if(d5)return iA;d5=1;var e=yw(),t=r_e(),n=i_e(),r=a_e(),i=o_e(),a=A_e();function o(s){var c=this.__data__=new e(s);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,iA=o,iA}var aA,h5;function Z2(){if(h5)return aA;h5=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 aA=e,aA}var oA,p5;function gZ(){if(p5)return oA;p5=1;var e=du(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return oA=t,oA}var sA,m5;function Sw(){if(m5)return sA;m5=1;var e=gZ();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return sA=t,sA}var lA,g5;function _w(){if(g5)return lA;g5=1;var e=Sw(),t=Yd(),n=Object.prototype,r=n.hasOwnProperty;function i(a,o,s){var c=a[o];(!(r.call(a,o)&&t(c,s))||s===void 0&&!(o in a))&&e(a,o,s)}return lA=i,lA}var cA,v5;function $g(){if(v5)return cA;v5=1;var e=_w(),t=Sw();function n(r,i,a,o){var s=!a;a||(a={});for(var c=-1,f=i.length;++c<f;){var h=i[c],d=o?o(a[h],r[h],h,a,r):void 0;d===void 0&&(d=r[h]),s?t(a,h,d):e(a,h,d)}return a}return cA=n,cA}var uA,y5;function C_e(){if(y5)return uA;y5=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return uA=e,uA}var fA,b5;function qi(){if(b5)return fA;b5=1;function e(t){return t!=null&&typeof t=="object"}return fA=e,fA}var dA,x5;function T_e(){if(x5)return dA;x5=1;var e=ts(),t=qi(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return dA=r,dA}var hA,w5;function Bg(){if(w5)return hA;w5=1;var e=T_e(),t=qi(),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 hA=a,hA}var pA,S5;function dn(){if(S5)return pA;S5=1;var e=Array.isArray;return pA=e,pA}var Mp={exports:{}},mA,_5;function j_e(){if(_5)return mA;_5=1;function e(){return!1}return mA=e,mA}Mp.exports;var E5;function Zd(){return E5||(E5=1,(function(e,t){var n=ma(),r=j_e(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,c=s?s.isBuffer:void 0,f=c||r;e.exports=f})(Mp,Mp.exports)),Mp.exports}var gA,A5;function Ew(){if(A5)return gA;A5=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 gA=n,gA}var vA,C5;function J2(){if(C5)return vA;C5=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return vA=t,vA}var yA,T5;function N_e(){if(T5)return yA;T5=1;var e=ts(),t=J2(),n=qi(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",c="[object Function]",f="[object Map]",h="[object Number]",d="[object Object]",m="[object RegExp]",v="[object Set]",x="[object String]",w="[object WeakMap]",b="[object ArrayBuffer]",S="[object DataView]",E="[object Float32Array]",_="[object Float64Array]",A="[object Int8Array]",C="[object Int16Array]",N="[object Int32Array]",M="[object Uint8Array]",R="[object Uint8ClampedArray]",P="[object Uint16Array]",$="[object Uint32Array]",L={};L[E]=L[_]=L[A]=L[C]=L[N]=L[M]=L[R]=L[P]=L[$]=!0,L[r]=L[i]=L[b]=L[a]=L[S]=L[o]=L[s]=L[c]=L[f]=L[h]=L[d]=L[m]=L[v]=L[x]=L[w]=!1;function D(F){return n(F)&&t(F.length)&&!!L[e(F)]}return yA=D,yA}var bA,j5;function Aw(){if(j5)return bA;j5=1;function e(t){return function(n){return t(n)}}return bA=e,bA}var Rp={exports:{}};Rp.exports;var N5;function ek(){return N5||(N5=1,(function(e,t){var n=pZ(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=(function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=s})(Rp,Rp.exports)),Rp.exports}var xA,O5;function qg(){if(O5)return xA;O5=1;var e=N_e(),t=Aw(),n=ek(),r=n&&n.isTypedArray,i=r?t(r):e;return xA=i,xA}var wA,M5;function vZ(){if(M5)return wA;M5=1;var e=C_e(),t=Bg(),n=dn(),r=Zd(),i=Ew(),a=qg(),o=Object.prototype,s=o.hasOwnProperty;function c(f,h){var d=n(f),m=!d&&t(f),v=!d&&!m&&r(f),x=!d&&!m&&!v&&a(f),w=d||m||v||x,b=w?e(f.length,String):[],S=b.length;for(var E in f)(h||s.call(f,E))&&!(w&&(E=="length"||v&&(E=="offset"||E=="parent")||x&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||i(E,S)))&&b.push(E);return b}return wA=c,wA}var SA,R5;function Cw(){if(R5)return SA;R5=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return SA=t,SA}var _A,P5;function yZ(){if(P5)return _A;P5=1;function e(t,n){return function(r){return t(n(r))}}return _A=e,_A}var EA,k5;function O_e(){if(k5)return EA;k5=1;var e=yZ(),t=e(Object.keys,Object);return EA=t,EA}var AA,D5;function tk(){if(D5)return AA;D5=1;var e=Cw(),t=O_e(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var s in Object(a))r.call(a,s)&&s!="constructor"&&o.push(s);return o}return AA=i,AA}var CA,I5;function ns(){if(I5)return CA;I5=1;var e=Qd(),t=J2();function n(r){return r!=null&&t(r.length)&&!e(r)}return CA=n,CA}var TA,L5;function Pl(){if(L5)return TA;L5=1;var e=vZ(),t=tk(),n=ns();function r(i){return n(i)?e(i):t(i)}return TA=r,TA}var jA,$5;function M_e(){if($5)return jA;$5=1;var e=$g(),t=Pl();function n(r,i){return r&&e(i,t(i),r)}return jA=n,jA}var NA,B5;function R_e(){if(B5)return NA;B5=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return NA=e,NA}var OA,q5;function P_e(){if(q5)return OA;q5=1;var e=wr(),t=Cw(),n=R_e(),r=Object.prototype,i=r.hasOwnProperty;function a(o){if(!e(o))return n(o);var s=t(o),c=[];for(var f in o)f=="constructor"&&(s||!i.call(o,f))||c.push(f);return c}return OA=a,OA}var MA,z5;function hu(){if(z5)return MA;z5=1;var e=vZ(),t=P_e(),n=ns();function r(i){return n(i)?e(i,!0):t(i)}return MA=r,MA}var RA,F5;function k_e(){if(F5)return RA;F5=1;var e=$g(),t=hu();function n(r,i){return r&&e(i,t(i),r)}return RA=n,RA}var Pp={exports:{}};Pp.exports;var V5;function bZ(){return V5||(V5=1,(function(e,t){var n=ma(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;function c(f,h){if(h)return f.slice();var d=f.length,m=s?s(d):new f.constructor(d);return f.copy(m),m}e.exports=c})(Pp,Pp.exports)),Pp.exports}var PA,U5;function xZ(){if(U5)return PA;U5=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 PA=e,PA}var kA,H5;function wZ(){if(H5)return kA;H5=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var s=t[r];n(s,r,t)&&(o[a++]=s)}return o}return kA=e,kA}var DA,G5;function SZ(){if(G5)return DA;G5=1;function e(){return[]}return DA=e,DA}var IA,K5;function nk(){if(K5)return IA;K5=1;var e=wZ(),t=SZ(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(s){return r.call(o,s)}))}:t;return IA=a,IA}var LA,W5;function D_e(){if(W5)return LA;W5=1;var e=$g(),t=nk();function n(r,i){return e(r,t(r),i)}return LA=n,LA}var $A,Y5;function rk(){if(Y5)return $A;Y5=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 $A=e,$A}var BA,X5;function Tw(){if(X5)return BA;X5=1;var e=yZ(),t=e(Object.getPrototypeOf,Object);return BA=t,BA}var qA,Q5;function _Z(){if(Q5)return qA;Q5=1;var e=rk(),t=Tw(),n=nk(),r=SZ(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var s=[];o;)e(s,n(o)),o=t(o);return s}:r;return qA=a,qA}var zA,Z5;function I_e(){if(Z5)return zA;Z5=1;var e=$g(),t=_Z();function n(r,i){return e(r,t(r),i)}return zA=n,zA}var FA,J5;function EZ(){if(J5)return FA;J5=1;var e=rk(),t=dn();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return FA=n,FA}var VA,ez;function AZ(){if(ez)return VA;ez=1;var e=EZ(),t=nk(),n=Pl();function r(i){return e(i,n,t)}return VA=r,VA}var UA,tz;function L_e(){if(tz)return UA;tz=1;var e=EZ(),t=_Z(),n=hu();function r(i){return e(i,n,t)}return UA=r,UA}var HA,nz;function $_e(){if(nz)return HA;nz=1;var e=du(),t=ma(),n=e(t,"DataView");return HA=n,HA}var GA,rz;function B_e(){if(rz)return GA;rz=1;var e=du(),t=ma(),n=e(t,"Promise");return GA=n,GA}var KA,iz;function CZ(){if(iz)return KA;iz=1;var e=du(),t=ma(),n=e(t,"Set");return KA=n,KA}var WA,az;function q_e(){if(az)return WA;az=1;var e=du(),t=ma(),n=e(t,"WeakMap");return WA=n,WA}var YA,oz;function Jd(){if(oz)return YA;oz=1;var e=$_e(),t=X2(),n=B_e(),r=CZ(),i=q_e(),a=ts(),o=mZ(),s="[object Map]",c="[object Object]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",m="[object DataView]",v=o(e),x=o(t),w=o(n),b=o(r),S=o(i),E=a;return(e&&E(new e(new ArrayBuffer(1)))!=m||t&&E(new t)!=s||n&&E(n.resolve())!=f||r&&E(new r)!=h||i&&E(new i)!=d)&&(E=function(_){var A=a(_),C=A==c?_.constructor:void 0,N=C?o(C):"";if(N)switch(N){case v:return m;case x:return s;case w:return f;case b:return h;case S:return d}return A}),YA=E,YA}var XA,sz;function z_e(){if(sz)return XA;sz=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 XA=n,XA}var QA,lz;function TZ(){if(lz)return QA;lz=1;var e=ma(),t=e.Uint8Array;return QA=t,QA}var ZA,cz;function ik(){if(cz)return ZA;cz=1;var e=TZ();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return ZA=t,ZA}var JA,uz;function F_e(){if(uz)return JA;uz=1;var e=ik();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return JA=t,JA}var eC,fz;function V_e(){if(fz)return eC;fz=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return eC=t,eC}var tC,dz;function U_e(){if(dz)return tC;dz=1;var e=Xd(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return tC=r,tC}var nC,hz;function jZ(){if(hz)return nC;hz=1;var e=ik();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return nC=t,nC}var rC,pz;function H_e(){if(pz)return rC;pz=1;var e=ik(),t=F_e(),n=V_e(),r=U_e(),i=jZ(),a="[object Boolean]",o="[object Date]",s="[object Map]",c="[object Number]",f="[object RegExp]",h="[object Set]",d="[object String]",m="[object Symbol]",v="[object ArrayBuffer]",x="[object DataView]",w="[object Float32Array]",b="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",_="[object Int32Array]",A="[object Uint8Array]",C="[object Uint8ClampedArray]",N="[object Uint16Array]",M="[object Uint32Array]";function R(P,$,L){var D=P.constructor;switch($){case v:return e(P);case a:case o:return new D(+P);case x:return t(P,L);case w:case b:case S:case E:case _:case A:case C:case N:case M:return i(P,L);case s:return new D;case c:case d:return new D(P);case f:return n(P);case h:return new D;case m:return r(P)}}return rC=R,rC}var iC,mz;function NZ(){if(mz)return iC;mz=1;var e=wr(),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 iC=n,iC}var aC,gz;function OZ(){if(gz)return aC;gz=1;var e=NZ(),t=Tw(),n=Cw();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return aC=r,aC}var oC,vz;function G_e(){if(vz)return oC;vz=1;var e=Jd(),t=qi(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return oC=r,oC}var sC,yz;function K_e(){if(yz)return sC;yz=1;var e=G_e(),t=Aw(),n=ek(),r=n&&n.isMap,i=r?t(r):e;return sC=i,sC}var lC,bz;function W_e(){if(bz)return lC;bz=1;var e=Jd(),t=qi(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return lC=r,lC}var cC,xz;function Y_e(){if(xz)return cC;xz=1;var e=W_e(),t=Aw(),n=ek(),r=n&&n.isSet,i=r?t(r):e;return cC=i,cC}var uC,wz;function MZ(){if(wz)return uC;wz=1;var e=ww(),t=Z2(),n=_w(),r=M_e(),i=k_e(),a=bZ(),o=xZ(),s=D_e(),c=I_e(),f=AZ(),h=L_e(),d=Jd(),m=z_e(),v=H_e(),x=OZ(),w=dn(),b=Zd(),S=K_e(),E=wr(),_=Y_e(),A=Pl(),C=hu(),N=1,M=2,R=4,P="[object Arguments]",$="[object Array]",L="[object Boolean]",D="[object Date]",F="[object Error]",I="[object Function]",q="[object GeneratorFunction]",k="[object Map]",z="[object Number]",H="[object Object]",G="[object RegExp]",Q="[object Set]",U="[object String]",V="[object Symbol]",X="[object WeakMap]",W="[object ArrayBuffer]",K="[object DataView]",J="[object Float32Array]",ee="[object Float64Array]",te="[object Int8Array]",ne="[object Int16Array]",se="[object Int32Array]",ce="[object Uint8Array]",oe="[object Uint8ClampedArray]",be="[object Uint16Array]",xe="[object Uint32Array]",we={};we[P]=we[$]=we[W]=we[K]=we[L]=we[D]=we[J]=we[ee]=we[te]=we[ne]=we[se]=we[k]=we[z]=we[H]=we[G]=we[Q]=we[U]=we[V]=we[ce]=we[oe]=we[be]=we[xe]=!0,we[F]=we[I]=we[X]=!1;function Ae(Ee,rt,Ve,Pt,Ft,Xe){var ht,Tt=rt&N,We=rt&M,Et=rt&R;if(Ve&&(ht=Ft?Ve(Ee,Pt,Ft,Xe):Ve(Ee)),ht!==void 0)return ht;if(!E(Ee))return Ee;var hn=w(Ee);if(hn){if(ht=m(Ee),!Tt)return o(Ee,ht)}else{var Tn=d(Ee),ya=Tn==I||Tn==q;if(b(Ee))return a(Ee,Tt);if(Tn==H||Tn==P||ya&&!Ft){if(ht=We||ya?{}:x(Ee),!Tt)return We?c(Ee,i(ht,Ee)):s(Ee,r(ht,Ee))}else{if(!we[Tn])return Ft?Ee:{};ht=v(Ee,Tn,Tt)}}Xe||(Xe=new e);var rr=Xe.get(Ee);if(rr)return rr;Xe.set(Ee,ht),_(Ee)?Ee.forEach(function(Ln){ht.add(Ae(Ln,rt,Ve,Ln,Ee,Xe))}):S(Ee)&&Ee.forEach(function(Ln,Ht){ht.set(Ht,Ae(Ln,rt,Ve,Ht,Ee,Xe))});var is=Et?We?h:f:We?C:A,zr=hn?void 0:is(Ee);return t(zr||Ee,function(Ln,Ht){zr&&(Ht=Ln,Ln=Ee[Ht]),n(ht,Ht,Ae(Ln,rt,Ve,Ht,Ee,Xe))}),ht}return uC=Ae,uC}var fC,Sz;function X_e(){if(Sz)return fC;Sz=1;var e=MZ(),t=4;function n(r){return e(r,t)}return fC=n,fC}var dC,_z;function ak(){if(_z)return dC;_z=1;function e(t){return function(){return t}}return dC=e,dC}var hC,Ez;function Q_e(){if(Ez)return hC;Ez=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),s=i(n),c=s.length;c--;){var f=s[t?c:++a];if(r(o[f],f,o)===!1)break}return n}}return hC=e,hC}var pC,Az;function ok(){if(Az)return pC;Az=1;var e=Q_e(),t=e();return pC=t,pC}var mC,Cz;function sk(){if(Cz)return mC;Cz=1;var e=ok(),t=Pl();function n(r,i){return r&&e(r,i,t)}return mC=n,mC}var gC,Tz;function Z_e(){if(Tz)return gC;Tz=1;var e=ns();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,s=r?o:-1,c=Object(i);(r?s--:++s<o)&&a(c[s],s,c)!==!1;);return i}}return gC=t,gC}var vC,jz;function eh(){if(jz)return vC;jz=1;var e=sk(),t=Z_e(),n=t(e);return vC=n,vC}var yC,Nz;function pu(){if(Nz)return yC;Nz=1;function e(t){return t}return yC=e,yC}var bC,Oz;function RZ(){if(Oz)return bC;Oz=1;var e=pu();function t(n){return typeof n=="function"?n:e}return bC=t,bC}var xC,Mz;function PZ(){if(Mz)return xC;Mz=1;var e=Z2(),t=eh(),n=RZ(),r=dn();function i(a,o){var s=r(a)?e:t;return s(a,n(o))}return xC=i,xC}var wC,Rz;function kZ(){return Rz||(Rz=1,wC=PZ()),wC}var SC,Pz;function J_e(){if(Pz)return SC;Pz=1;var e=eh();function t(n,r){var i=[];return e(n,function(a,o,s){r(a,o,s)&&i.push(a)}),i}return SC=t,SC}var _C,kz;function eEe(){if(kz)return _C;kz=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return _C=t,_C}var EC,Dz;function tEe(){if(Dz)return EC;Dz=1;function e(t){return this.__data__.has(t)}return EC=e,EC}var AC,Iz;function DZ(){if(Iz)return AC;Iz=1;var e=Q2(),t=eEe(),n=tEe();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,AC=r,AC}var CC,Lz;function IZ(){if(Lz)return CC;Lz=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 CC=e,CC}var TC,$z;function LZ(){if($z)return TC;$z=1;function e(t,n){return t.has(n)}return TC=e,TC}var jC,Bz;function $Z(){if(Bz)return jC;Bz=1;var e=DZ(),t=IZ(),n=LZ(),r=1,i=2;function a(o,s,c,f,h,d){var m=c&r,v=o.length,x=s.length;if(v!=x&&!(m&&x>v))return!1;var w=d.get(o),b=d.get(s);if(w&&b)return w==s&&b==o;var S=-1,E=!0,_=c&i?new e:void 0;for(d.set(o,s),d.set(s,o);++S<v;){var A=o[S],C=s[S];if(f)var N=m?f(C,A,S,s,o,d):f(A,C,S,o,s,d);if(N!==void 0){if(N)continue;E=!1;break}if(_){if(!t(s,function(M,R){if(!n(_,R)&&(A===M||h(A,M,c,f,d)))return _.push(R)})){E=!1;break}}else if(!(A===C||h(A,C,c,f,d))){E=!1;break}}return d.delete(o),d.delete(s),E}return jC=a,jC}var NC,qz;function nEe(){if(qz)return NC;qz=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return NC=e,NC}var OC,zz;function lk(){if(zz)return OC;zz=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return OC=e,OC}var MC,Fz;function rEe(){if(Fz)return MC;Fz=1;var e=Xd(),t=TZ(),n=Yd(),r=$Z(),i=nEe(),a=lk(),o=1,s=2,c="[object Boolean]",f="[object Date]",h="[object Error]",d="[object Map]",m="[object Number]",v="[object RegExp]",x="[object Set]",w="[object String]",b="[object Symbol]",S="[object ArrayBuffer]",E="[object DataView]",_=e?e.prototype:void 0,A=_?_.valueOf:void 0;function C(N,M,R,P,$,L,D){switch(R){case E:if(N.byteLength!=M.byteLength||N.byteOffset!=M.byteOffset)return!1;N=N.buffer,M=M.buffer;case S:return!(N.byteLength!=M.byteLength||!L(new t(N),new t(M)));case c:case f:case m:return n(+N,+M);case h:return N.name==M.name&&N.message==M.message;case v:case w:return N==M+"";case d:var F=i;case x:var I=P&o;if(F||(F=a),N.size!=M.size&&!I)return!1;var q=D.get(N);if(q)return q==M;P|=s,D.set(N,M);var k=r(F(N),F(M),P,$,L,D);return D.delete(N),k;case b:if(A)return A.call(N)==A.call(M)}return!1}return MC=C,MC}var RC,Vz;function iEe(){if(Vz)return RC;Vz=1;var e=AZ(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,s,c,f,h){var d=s&t,m=e(a),v=m.length,x=e(o),w=x.length;if(v!=w&&!d)return!1;for(var b=v;b--;){var S=m[b];if(!(d?S in o:r.call(o,S)))return!1}var E=h.get(a),_=h.get(o);if(E&&_)return E==o&&_==a;var A=!0;h.set(a,o),h.set(o,a);for(var C=d;++b<v;){S=m[b];var N=a[S],M=o[S];if(c)var R=d?c(M,N,S,o,a,h):c(N,M,S,a,o,h);if(!(R===void 0?N===M||f(N,M,s,c,h):R)){A=!1;break}C||(C=S=="constructor")}if(A&&!C){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 h.delete(a),h.delete(o),A}return RC=i,RC}var PC,Uz;function aEe(){if(Uz)return PC;Uz=1;var e=ww(),t=$Z(),n=rEe(),r=iEe(),i=Jd(),a=dn(),o=Zd(),s=qg(),c=1,f="[object Arguments]",h="[object Array]",d="[object Object]",m=Object.prototype,v=m.hasOwnProperty;function x(w,b,S,E,_,A){var C=a(w),N=a(b),M=C?h:i(w),R=N?h:i(b);M=M==f?d:M,R=R==f?d:R;var P=M==d,$=R==d,L=M==R;if(L&&o(w)){if(!o(b))return!1;C=!0,P=!1}if(L&&!P)return A||(A=new e),C||s(w)?t(w,b,S,E,_,A):n(w,b,M,S,E,_,A);if(!(S&c)){var D=P&&v.call(w,"__wrapped__"),F=$&&v.call(b,"__wrapped__");if(D||F){var I=D?w.value():w,q=F?b.value():b;return A||(A=new e),_(I,q,S,E,A)}}return L?(A||(A=new e),r(w,b,S,E,_,A)):!1}return PC=x,PC}var kC,Hz;function ck(){if(Hz)return kC;Hz=1;var e=aEe(),t=qi();function n(r,i,a,o,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,s)}return kC=n,kC}var DC,Gz;function oEe(){if(Gz)return DC;Gz=1;var e=ww(),t=ck(),n=1,r=2;function i(a,o,s,c){var f=s.length,h=f,d=!c;if(a==null)return!h;for(a=Object(a);f--;){var m=s[f];if(d&&m[2]?m[1]!==a[m[0]]:!(m[0]in a))return!1}for(;++f<h;){m=s[f];var v=m[0],x=a[v],w=m[1];if(d&&m[2]){if(x===void 0&&!(v in a))return!1}else{var b=new e;if(c)var S=c(x,w,v,a,o,b);if(!(S===void 0?t(w,x,n|r,c,b):S))return!1}}return!0}return DC=i,DC}var IC,Kz;function BZ(){if(Kz)return IC;Kz=1;var e=wr();function t(n){return n===n&&!e(n)}return IC=t,IC}var LC,Wz;function sEe(){if(Wz)return LC;Wz=1;var e=BZ(),t=Pl();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],s=r[o];i[a]=[o,s,e(s)]}return i}return LC=n,LC}var $C,Yz;function qZ(){if(Yz)return $C;Yz=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return $C=e,$C}var BC,Xz;function lEe(){if(Xz)return BC;Xz=1;var e=oEe(),t=sEe(),n=qZ();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 BC=r,BC}var qC,Qz;function th(){if(Qz)return qC;Qz=1;var e=ts(),t=qi(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return qC=r,qC}var zC,Zz;function uk(){if(Zz)return zC;Zz=1;var e=dn(),t=th(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return zC=i,zC}var FC,Jz;function zZ(){if(Jz)return FC;Jz=1;var e=Q2(),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,s=i?i.apply(this,o):o[0],c=a.cache;if(c.has(s))return c.get(s);var f=r.apply(this,o);return a.cache=c.set(s,f)||c,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,FC=n,FC}var VC,eF;function cEe(){if(eF)return VC;eF=1;var e=zZ(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return VC=n,VC}var UC,tF;function uEe(){if(tF)return UC;tF=1;var e=cEe(),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,s,c,f){a.push(c?f.replace(n,"$1"):s||o)}),a});return UC=r,UC}var HC,nF;function jw(){if(nF)return HC;nF=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 HC=e,HC}var GC,rF;function fEe(){if(rF)return GC;rF=1;var e=Xd(),t=jw(),n=dn(),r=th(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(s){if(typeof s=="string")return s;if(n(s))return t(s,o)+"";if(r(s))return a?a.call(s):"";var c=s+"";return c=="0"&&1/s==-1/0?"-0":c}return GC=o,GC}var KC,iF;function fk(){if(iF)return KC;iF=1;var e=fEe();function t(n){return n==null?"":e(n)}return KC=t,KC}var WC,aF;function Nw(){if(aF)return WC;aF=1;var e=dn(),t=uk(),n=uEe(),r=fk();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return WC=i,WC}var YC,oF;function zg(){if(oF)return YC;oF=1;var e=th();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return YC=t,YC}var XC,sF;function Ow(){if(sF)return XC;sF=1;var e=Nw(),t=zg();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 XC=n,XC}var QC,lF;function FZ(){if(lF)return QC;lF=1;var e=Ow();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return QC=t,QC}var ZC,cF;function dEe(){if(cF)return ZC;cF=1;function e(t,n){return t!=null&&n in Object(t)}return ZC=e,ZC}var JC,uF;function VZ(){if(uF)return JC;uF=1;var e=Nw(),t=Bg(),n=dn(),r=Ew(),i=J2(),a=zg();function o(s,c,f){c=e(c,s);for(var h=-1,d=c.length,m=!1;++h<d;){var v=a(c[h]);if(!(m=s!=null&&f(s,v)))break;s=s[v]}return m||++h!=d?m:(d=s==null?0:s.length,!!d&&i(d)&&r(v,d)&&(n(s)||t(s)))}return JC=o,JC}var eT,fF;function UZ(){if(fF)return eT;fF=1;var e=dEe(),t=VZ();function n(r,i){return r!=null&&t(r,i,e)}return eT=n,eT}var tT,dF;function hEe(){if(dF)return tT;dF=1;var e=ck(),t=FZ(),n=UZ(),r=uk(),i=BZ(),a=qZ(),o=zg(),s=1,c=2;function f(h,d){return r(h)&&i(d)?a(o(h),d):function(m){var v=t(m,h);return v===void 0&&v===d?n(m,h):e(d,v,s|c)}}return tT=f,tT}var nT,hF;function HZ(){if(hF)return nT;hF=1;function e(t){return function(n){return n==null?void 0:n[t]}}return nT=e,nT}var rT,pF;function pEe(){if(pF)return rT;pF=1;var e=Ow();function t(n){return function(r){return e(r,n)}}return rT=t,rT}var iT,mF;function mEe(){if(mF)return iT;mF=1;var e=HZ(),t=pEe(),n=uk(),r=zg();function i(a){return n(a)?e(r(a)):t(a)}return iT=i,iT}var aT,gF;function zi(){if(gF)return aT;gF=1;var e=lEe(),t=hEe(),n=pu(),r=dn(),i=mEe();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 aT=a,aT}var oT,vF;function GZ(){if(vF)return oT;vF=1;var e=wZ(),t=J_e(),n=zi(),r=dn();function i(a,o){var s=r(a)?e:t;return s(a,n(o,3))}return oT=i,oT}var sT,yF;function gEe(){if(yF)return sT;yF=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return sT=n,sT}var lT,bF;function KZ(){if(bF)return lT;bF=1;var e=gEe(),t=VZ();function n(r,i){return r!=null&&t(r,i,e)}return lT=n,lT}var cT,xF;function vEe(){if(xF)return cT;xF=1;var e=tk(),t=Jd(),n=Bg(),r=dn(),i=ns(),a=Zd(),o=Cw(),s=qg(),c="[object Map]",f="[object Set]",h=Object.prototype,d=h.hasOwnProperty;function m(v){if(v==null)return!0;if(i(v)&&(r(v)||typeof v=="string"||typeof v.splice=="function"||a(v)||s(v)||n(v)))return!v.length;var x=t(v);if(x==c||x==f)return!v.size;if(o(v))return!e(v).length;for(var w in v)if(d.call(v,w))return!1;return!0}return cT=m,cT}var uT,wF;function WZ(){if(wF)return uT;wF=1;function e(t){return t===void 0}return uT=e,uT}var fT,SF;function YZ(){if(SF)return fT;SF=1;var e=eh(),t=ns();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(s,c,f){o[++a]=i(s,c,f)}),o}return fT=n,fT}var dT,_F;function dk(){if(_F)return dT;_F=1;var e=jw(),t=zi(),n=YZ(),r=dn();function i(a,o){var s=r(a)?e:n;return s(a,t(o,3))}return dT=i,dT}var hT,EF;function yEe(){if(EF)return hT;EF=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 hT=e,hT}var pT,AF;function bEe(){if(AF)return pT;AF=1;function e(t,n,r,i,a){return a(t,function(o,s,c){r=i?(i=!1,o):n(r,o,s,c)}),r}return pT=e,pT}var mT,CF;function XZ(){if(CF)return mT;CF=1;var e=yEe(),t=eh(),n=zi(),r=bEe(),i=dn();function a(o,s,c){var f=i(o)?e:r,h=arguments.length<3;return f(o,n(s,4),c,h,t)}return mT=a,mT}var gT,TF;function QZ(){if(TF)return gT;TF=1;var e=ts(),t=dn(),n=qi(),r="[object String]";function i(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return gT=i,gT}var vT,jF;function xEe(){if(jF)return vT;jF=1;var e=HZ(),t=e("length");return vT=t,vT}var yT,NF;function hk(){if(NF)return yT;NF=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+e+i+a+"]");function c(f){return s.test(f)}return yT=c,yT}var bT,OF;function wEe(){if(OF)return bT;OF=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+s+"|"+c+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",x=f+"?",w="["+a+"]?",b="(?:"+v+"(?:"+[h,d,m].join("|")+")"+w+x+")*",S=w+x+b,E="(?:"+[h+s+"?",s,d,m,o].join("|")+")",_=RegExp(c+"(?="+c+")|"+E+S,"g");function A(C){for(var N=_.lastIndex=0;_.test(C);)++N;return N}return bT=A,bT}var xT,MF;function SEe(){if(MF)return xT;MF=1;var e=xEe(),t=hk(),n=wEe();function r(i){return t(i)?n(i):e(i)}return xT=r,xT}var wT,RF;function _Ee(){if(RF)return wT;RF=1;var e=tk(),t=Jd(),n=ns(),r=QZ(),i=SEe(),a="[object Map]",o="[object Set]";function s(c){if(c==null)return 0;if(n(c))return r(c)?i(c):c.length;var f=t(c);return f==a||f==o?c.size:e(c).length}return wT=s,wT}var ST,PF;function EEe(){if(PF)return ST;PF=1;var e=Z2(),t=NZ(),n=sk(),r=zi(),i=Tw(),a=dn(),o=Zd(),s=Qd(),c=wr(),f=qg();function h(d,m,v){var x=a(d),w=x||o(d)||f(d);if(m=r(m,4),v==null){var b=d&&d.constructor;w?v=x?new b:[]:c(d)?v=s(b)?t(i(d)):{}:v={}}return(w?e:n)(d,function(S,E,_){return m(v,S,E,_)}),v}return ST=h,ST}var _T,kF;function AEe(){if(kF)return _T;kF=1;var e=Xd(),t=Bg(),n=dn(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return _T=i,_T}var ET,DF;function Mw(){if(DF)return ET;DF=1;var e=rk(),t=AEe();function n(r,i,a,o,s){var c=-1,f=r.length;for(a||(a=t),s||(s=[]);++c<f;){var h=r[c];i>0&&a(h)?i>1?n(h,i-1,a,o,s):e(s,h):o||(s[s.length]=h)}return s}return ET=n,ET}var AT,IF;function CEe(){if(IF)return AT;IF=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 AT=e,AT}var CT,LF;function ZZ(){if(LF)return CT;LF=1;var e=CEe(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,s=-1,c=t(o.length-i,0),f=Array(c);++s<c;)f[s]=o[i+s];s=-1;for(var h=Array(i+1);++s<i;)h[s]=o[s];return h[i]=a(f),e(r,this,h)}}return CT=n,CT}var TT,$F;function TEe(){if($F)return TT;$F=1;var e=ak(),t=gZ(),n=pu(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return TT=r,TT}var jT,BF;function jEe(){if(BF)return jT;BF=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var s=n(),c=t-(s-o);if(o=s,c>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return jT=r,jT}var NT,qF;function JZ(){if(qF)return NT;qF=1;var e=TEe(),t=jEe(),n=t(e);return NT=n,NT}var OT,zF;function Rw(){if(zF)return OT;zF=1;var e=pu(),t=ZZ(),n=JZ();function r(i,a){return n(t(i,a,e),i+"")}return OT=r,OT}var MT,FF;function eJ(){if(FF)return MT;FF=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 MT=e,MT}var RT,VF;function NEe(){if(VF)return RT;VF=1;function e(t){return t!==t}return RT=e,RT}var PT,UF;function OEe(){if(UF)return PT;UF=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 PT=e,PT}var kT,HF;function MEe(){if(HF)return kT;HF=1;var e=eJ(),t=NEe(),n=OEe();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return kT=r,kT}var DT,GF;function REe(){if(GF)return DT;GF=1;var e=MEe();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return DT=t,DT}var IT,KF;function PEe(){if(KF)return IT;KF=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 IT=e,IT}var LT,WF;function kEe(){if(WF)return LT;WF=1;function e(){}return LT=e,LT}var $T,YF;function DEe(){if(YF)return $T;YF=1;var e=CZ(),t=kEe(),n=lk(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return $T=i,$T}var BT,XF;function tJ(){if(XF)return BT;XF=1;var e=DZ(),t=REe(),n=PEe(),r=LZ(),i=DEe(),a=lk(),o=200;function s(c,f,h){var d=-1,m=t,v=c.length,x=!0,w=[],b=w;if(h)x=!1,m=n;else if(v>=o){var S=f?null:i(c);if(S)return a(S);x=!1,m=r,b=new e}else b=f?[]:w;e:for(;++d<v;){var E=c[d],_=f?f(E):E;if(E=h||E!==0?E:0,x&&_===_){for(var A=b.length;A--;)if(b[A]===_)continue e;f&&b.push(_),w.push(E)}else m(b,_,h)||(b!==w&&b.push(_),w.push(E))}return w}return BT=s,BT}var qT,QF;function nJ(){if(QF)return qT;QF=1;var e=ns(),t=qi();function n(r){return t(r)&&e(r)}return qT=n,qT}var zT,ZF;function IEe(){if(ZF)return zT;ZF=1;var e=Mw(),t=Rw(),n=tJ(),r=nJ(),i=t(function(a){return n(e(a,1,r,!0))});return zT=i,zT}var FT,JF;function LEe(){if(JF)return FT;JF=1;var e=jw();function t(n,r){return e(r,function(i){return n[i]})}return FT=t,FT}var VT,e6;function rJ(){if(e6)return VT;e6=1;var e=LEe(),t=Pl();function n(r){return r==null?[]:e(r,t(r))}return VT=n,VT}var UT,t6;function Fi(){if(t6)return UT;t6=1;var e;if(typeof Y2=="function")try{e={clone:X_e(),constant:ak(),each:kZ(),filter:GZ(),has:KZ(),isArray:dn(),isEmpty:vEe(),isFunction:Qd(),isUndefined:WZ(),keys:Pl(),map:dk(),reduce:XZ(),size:_Ee(),transform:EEe(),union:IEe(),values:rJ()}}catch{}return e||(e=window._),UT=e,UT}var HT,n6;function pk(){if(n6)return HT;n6=1;var e=Fi();HT=i;var t="\0",n="\0",r="";function i(h){this._isDirected=e.has(h,"directed")?h.directed:!0,this._isMultigraph=e.has(h,"multigraph")?h.multigraph:!1,this._isCompound=e.has(h,"compound")?h.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(h){return this._label=h,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultNodeLabelFn=h,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var h=this;return e.filter(this.nodes(),function(d){return e.isEmpty(h._in[d])})},i.prototype.sinks=function(){var h=this;return e.filter(this.nodes(),function(d){return e.isEmpty(h._out[d])})},i.prototype.setNodes=function(h,d){var m=arguments,v=this;return e.each(h,function(x){m.length>1?v.setNode(x,d):v.setNode(x)}),this},i.prototype.setNode=function(h,d){return e.has(this._nodes,h)?(arguments.length>1&&(this._nodes[h]=d),this):(this._nodes[h]=arguments.length>1?d:this._defaultNodeLabelFn(h),this._isCompound&&(this._parent[h]=n,this._children[h]={},this._children[n][h]=!0),this._in[h]={},this._preds[h]={},this._out[h]={},this._sucs[h]={},++this._nodeCount,this)},i.prototype.node=function(h){return this._nodes[h]},i.prototype.hasNode=function(h){return e.has(this._nodes,h)},i.prototype.removeNode=function(h){var d=this;if(e.has(this._nodes,h)){var m=function(v){d.removeEdge(d._edgeObjs[v])};delete this._nodes[h],this._isCompound&&(this._removeFromParentsChildList(h),delete this._parent[h],e.each(this.children(h),function(v){d.setParent(v)}),delete this._children[h]),e.each(e.keys(this._in[h]),m),delete this._in[h],delete this._preds[h],e.each(e.keys(this._out[h]),m),delete this._out[h],delete this._sucs[h],--this._nodeCount}return this},i.prototype.setParent=function(h,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(d))d=n;else{d+="";for(var m=d;!e.isUndefined(m);m=this.parent(m))if(m===h)throw new Error("Setting "+d+" as parent of "+h+" would create a cycle");this.setNode(d)}return this.setNode(h),this._removeFromParentsChildList(h),this._parent[h]=d,this._children[d][h]=!0,this},i.prototype._removeFromParentsChildList=function(h){delete this._children[this._parent[h]][h]},i.prototype.parent=function(h){if(this._isCompound){var d=this._parent[h];if(d!==n)return d}},i.prototype.children=function(h){if(e.isUndefined(h)&&(h=n),this._isCompound){var d=this._children[h];if(d)return e.keys(d)}else{if(h===n)return this.nodes();if(this.hasNode(h))return[]}},i.prototype.predecessors=function(h){var d=this._preds[h];if(d)return e.keys(d)},i.prototype.successors=function(h){var d=this._sucs[h];if(d)return e.keys(d)},i.prototype.neighbors=function(h){var d=this.predecessors(h);if(d)return e.union(d,this.successors(h))},i.prototype.isLeaf=function(h){var d;return this.isDirected()?d=this.successors(h):d=this.neighbors(h),d.length===0},i.prototype.filterNodes=function(h){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var m=this;e.each(this._nodes,function(w,b){h(b)&&d.setNode(b,w)}),e.each(this._edgeObjs,function(w){d.hasNode(w.v)&&d.hasNode(w.w)&&d.setEdge(w,m.edge(w))});var v={};function x(w){var b=m.parent(w);return b===void 0||d.hasNode(b)?(v[w]=b,b):b in v?v[b]:x(b)}return this._isCompound&&e.each(d.nodes(),function(w){d.setParent(w,x(w))}),d},i.prototype.setDefaultEdgeLabel=function(h){return e.isFunction(h)||(h=e.constant(h)),this._defaultEdgeLabelFn=h,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(h,d){var m=this,v=arguments;return e.reduce(h,function(x,w){return v.length>1?m.setEdge(x,w,d):m.setEdge(x,w),w}),this},i.prototype.setEdge=function(){var h,d,m,v,x=!1,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(h=w.v,d=w.w,m=w.name,arguments.length===2&&(v=arguments[1],x=!0)):(h=w,d=arguments[1],m=arguments[3],arguments.length>2&&(v=arguments[2],x=!0)),h=""+h,d=""+d,e.isUndefined(m)||(m=""+m);var b=s(this._isDirected,h,d,m);if(e.has(this._edgeLabels,b))return x&&(this._edgeLabels[b]=v),this;if(!e.isUndefined(m)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(h),this.setNode(d),this._edgeLabels[b]=x?v:this._defaultEdgeLabelFn(h,d,m);var S=c(this._isDirected,h,d,m);return h=S.v,d=S.w,Object.freeze(S),this._edgeObjs[b]=S,a(this._preds[d],h),a(this._sucs[h],d),this._in[d][b]=S,this._out[h][b]=S,this._edgeCount++,this},i.prototype.edge=function(h,d,m){var v=arguments.length===1?f(this._isDirected,arguments[0]):s(this._isDirected,h,d,m);return this._edgeLabels[v]},i.prototype.hasEdge=function(h,d,m){var v=arguments.length===1?f(this._isDirected,arguments[0]):s(this._isDirected,h,d,m);return e.has(this._edgeLabels,v)},i.prototype.removeEdge=function(h,d,m){var v=arguments.length===1?f(this._isDirected,arguments[0]):s(this._isDirected,h,d,m),x=this._edgeObjs[v];return x&&(h=x.v,d=x.w,delete this._edgeLabels[v],delete this._edgeObjs[v],o(this._preds[d],h),o(this._sucs[h],d),delete this._in[d][v],delete this._out[h][v],this._edgeCount--),this},i.prototype.inEdges=function(h,d){var m=this._in[h];if(m){var v=e.values(m);return d?e.filter(v,function(x){return x.v===d}):v}},i.prototype.outEdges=function(h,d){var m=this._out[h];if(m){var v=e.values(m);return d?e.filter(v,function(x){return x.w===d}):v}},i.prototype.nodeEdges=function(h,d){var m=this.inEdges(h,d);if(m)return m.concat(this.outEdges(h,d))};function a(h,d){h[d]?h[d]++:h[d]=1}function o(h,d){--h[d]||delete h[d]}function s(h,d,m,v){var x=""+d,w=""+m;if(!h&&x>w){var b=x;x=w,w=b}return x+r+w+r+(e.isUndefined(v)?t:v)}function c(h,d,m,v){var x=""+d,w=""+m;if(!h&&x>w){var b=x;x=w,w=b}var S={v:x,w};return v&&(S.name=v),S}function f(h,d){return s(h,d.v,d.w,d.name)}return HT}var GT,r6;function $Ee(){return r6||(r6=1,GT="2.1.8"),GT}var KT,i6;function BEe(){return i6||(i6=1,KT={Graph:pk(),version:$Ee()}),KT}var WT,a6;function qEe(){if(a6)return WT;a6=1;var e=Fi(),t=pk();WT={write:n,read:a};function n(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:r(o),edges:i(o)};return e.isUndefined(o.graph())||(s.value=e.clone(o.graph())),s}function r(o){return e.map(o.nodes(),function(s){var c=o.node(s),f=o.parent(s),h={v:s};return e.isUndefined(c)||(h.value=c),e.isUndefined(f)||(h.parent=f),h})}function i(o){return e.map(o.edges(),function(s){var c=o.edge(s),f={v:s.v,w:s.w};return e.isUndefined(s.name)||(f.name=s.name),e.isUndefined(c)||(f.value=c),f})}function a(o){var s=new t(o.options).setGraph(o.value);return e.each(o.nodes,function(c){s.setNode(c.v,c.value),c.parent&&s.setParent(c.v,c.parent)}),e.each(o.edges,function(c){s.setEdge({v:c.v,w:c.w,name:c.name},c.value)}),s}return WT}var YT,o6;function zEe(){if(o6)return YT;o6=1;var e=Fi();YT=t;function t(n){var r={},i=[],a;function o(s){e.has(r,s)||(r[s]=!0,a.push(s),e.each(n.successors(s),o),e.each(n.predecessors(s),o))}return e.each(n.nodes(),function(s){a=[],o(s),a.length&&i.push(a)}),i}return YT}var XT,s6;function iJ(){if(s6)return XT;s6=1;var e=Fi();XT=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],s=i[r];i[n]=s,i[r]=o,a[s.key]=n,a[o.key]=r},XT}var QT,l6;function aJ(){if(l6)return QT;l6=1;var e=Fi(),t=iJ();QT=r;var n=e.constant(1);function r(a,o,s,c){return i(a,String(o),s||n,c||function(f){return a.outEdges(f)})}function i(a,o,s,c){var f={},h=new t,d,m,v=function(x){var w=x.v!==d?x.v:x.w,b=f[w],S=s(x),E=m.distance+S;if(S<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+S);E<b.distance&&(b.distance=E,b.predecessor=d,h.decrease(w,E))};for(a.nodes().forEach(function(x){var w=x===o?0:Number.POSITIVE_INFINITY;f[x]={distance:w},h.add(x,w)});h.size()>0&&(d=h.removeMin(),m=f[d],m.distance!==Number.POSITIVE_INFINITY);)c(d).forEach(v);return f}return QT}var ZT,c6;function FEe(){if(c6)return ZT;c6=1;var e=aJ(),t=Fi();ZT=n;function n(r,i,a){return t.transform(r.nodes(),function(o,s){o[s]=e(r,s,i,a)},{})}return ZT}var JT,u6;function oJ(){if(u6)return JT;u6=1;var e=Fi();JT=t;function t(n){var r=0,i=[],a={},o=[];function s(c){var f=a[c]={onStack:!0,lowlink:r,index:r++};if(i.push(c),n.successors(c).forEach(function(m){e.has(a,m)?a[m].onStack&&(f.lowlink=Math.min(f.lowlink,a[m].index)):(s(m),f.lowlink=Math.min(f.lowlink,a[m].lowlink))}),f.lowlink===f.index){var h=[],d;do d=i.pop(),a[d].onStack=!1,h.push(d);while(c!==d);o.push(h)}}return n.nodes().forEach(function(c){e.has(a,c)||s(c)}),o}return JT}var ej,f6;function VEe(){if(f6)return ej;f6=1;var e=Fi(),t=oJ();ej=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 ej}var tj,d6;function UEe(){if(d6)return tj;d6=1;var e=Fi();tj=n;var t=e.constant(1);function n(i,a,o){return r(i,a||t,o||function(s){return i.outEdges(s)})}function r(i,a,o){var s={},c=i.nodes();return c.forEach(function(f){s[f]={},s[f][f]={distance:0},c.forEach(function(h){f!==h&&(s[f][h]={distance:Number.POSITIVE_INFINITY})}),o(f).forEach(function(h){var d=h.v===f?h.w:h.v,m=a(h);s[f][d]={distance:m,predecessor:f}})}),c.forEach(function(f){var h=s[f];c.forEach(function(d){var m=s[d];c.forEach(function(v){var x=m[f],w=h[v],b=m[v],S=x.distance+w.distance;S<b.distance&&(b.distance=S,b.predecessor=w.predecessor)})})}),s}return tj}var nj,h6;function sJ(){if(h6)return nj;h6=1;var e=Fi();nj=t,t.CycleException=n;function t(r){var i={},a={},o=[];function s(c){if(e.has(a,c))throw new n;e.has(i,c)||(a[c]=!0,i[c]=!0,e.each(r.predecessors(c),s),delete a[c],o.push(c))}if(e.each(r.sinks(),s),e.size(i)!==r.nodeCount())throw new n;return o}function n(){}return n.prototype=new Error,nj}var rj,p6;function HEe(){if(p6)return rj;p6=1;var e=sJ();rj=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return rj}var ij,m6;function lJ(){if(m6)return ij;m6=1;var e=Fi();ij=t;function t(r,i,a){e.isArray(i)||(i=[i]);var o=(r.isDirected()?r.successors:r.neighbors).bind(r),s=[],c={};return e.each(i,function(f){if(!r.hasNode(f))throw new Error("Graph does not have node: "+f);n(r,f,a==="post",c,o,s)}),s}function n(r,i,a,o,s,c){e.has(o,i)||(o[i]=!0,a||c.push(i),e.each(s(i),function(f){n(r,f,a,o,s,c)}),a&&c.push(i))}return ij}var aj,g6;function GEe(){if(g6)return aj;g6=1;var e=lJ();aj=t;function t(n,r){return e(n,r,"post")}return aj}var oj,v6;function KEe(){if(v6)return oj;v6=1;var e=lJ();oj=t;function t(n,r){return e(n,r,"pre")}return oj}var sj,y6;function WEe(){if(y6)return sj;y6=1;var e=Fi(),t=pk(),n=iJ();sj=r;function r(i,a){var o=new t,s={},c=new n,f;function h(m){var v=m.v===f?m.w:m.v,x=c.priority(v);if(x!==void 0){var w=a(m);w<x&&(s[v]=f,c.decrease(v,w))}}if(i.nodeCount()===0)return o;e.each(i.nodes(),function(m){c.add(m,Number.POSITIVE_INFINITY),o.setNode(m)}),c.decrease(i.nodes()[0],0);for(var d=!1;c.size()>0;){if(f=c.removeMin(),e.has(s,f))o.setEdge(f,s[f]);else{if(d)throw new Error("Input graph is not connected: "+i);d=!0}i.nodeEdges(f).forEach(h)}return o}return sj}var lj,b6;function YEe(){return b6||(b6=1,lj={components:zEe(),dijkstra:aJ(),dijkstraAll:FEe(),findCycles:VEe(),floydWarshall:UEe(),isAcyclic:HEe(),postorder:GEe(),preorder:KEe(),prim:WEe(),tarjan:oJ(),topsort:sJ()}),lj}var cj,x6;function XEe(){if(x6)return cj;x6=1;var e=BEe();return cj={Graph:e.Graph,json:qEe(),alg:YEe(),version:e.version},cj}var uj,w6;function fa(){if(w6)return uj;w6=1;var e;if(typeof Y2=="function")try{e=XEe()}catch{}return e||(e=window.graphlib),uj=e,uj}var fj,S6;function QEe(){if(S6)return fj;S6=1;var e=MZ(),t=1,n=4;function r(i){return e(i,t|n)}return fj=r,fj}var dj,_6;function nh(){if(_6)return dj;_6=1;var e=Yd(),t=ns(),n=Ew(),r=wr();function i(a,o,s){if(!r(s))return!1;var c=typeof o;return(c=="number"?t(s)&&n(o,s.length):c=="string"&&o in s)?e(s[o],a):!1}return dj=i,dj}var hj,E6;function ZEe(){if(E6)return hj;E6=1;var e=Rw(),t=Yd(),n=nh(),r=hu(),i=Object.prototype,a=i.hasOwnProperty,o=e(function(s,c){s=Object(s);var f=-1,h=c.length,d=h>2?c[2]:void 0;for(d&&n(c[0],c[1],d)&&(h=1);++f<h;)for(var m=c[f],v=r(m),x=-1,w=v.length;++x<w;){var b=v[x],S=s[b];(S===void 0||t(S,i[b])&&!a.call(s,b))&&(s[b]=m[b])}return s});return hj=o,hj}var pj,A6;function JEe(){if(A6)return pj;A6=1;var e=zi(),t=ns(),n=Pl();function r(i){return function(a,o,s){var c=Object(a);if(!t(a)){var f=e(o,3);a=n(a),o=function(d){return f(c[d],d,c)}}var h=i(a,o,s);return h>-1?c[f?a[h]:h]:void 0}}return pj=r,pj}var mj,C6;function eAe(){if(C6)return mj;C6=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return mj=t,mj}var gj,T6;function tAe(){if(T6)return gj;T6=1;var e=eAe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return gj=n,gj}var vj,j6;function cJ(){if(j6)return vj;j6=1;var e=tAe(),t=wr(),n=th(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function c(f){if(typeof f=="number")return f;if(n(f))return r;if(t(f)){var h=typeof f.valueOf=="function"?f.valueOf():f;f=t(h)?h+"":h}if(typeof f!="string")return f===0?f:+f;f=e(f);var d=a.test(f);return d||o.test(f)?s(f.slice(2),d?2:8):i.test(f)?r:+f}return vj=c,vj}var yj,N6;function uJ(){if(N6)return yj;N6=1;var e=cJ(),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 yj=r,yj}var bj,O6;function nAe(){if(O6)return bj;O6=1;var e=uJ();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return bj=t,bj}var xj,M6;function rAe(){if(M6)return xj;M6=1;var e=eJ(),t=zi(),n=nAe(),r=Math.max;function i(a,o,s){var c=a==null?0:a.length;if(!c)return-1;var f=s==null?0:n(s);return f<0&&(f=r(c+f,0)),e(a,t(o,3),f)}return xj=i,xj}var wj,R6;function fJ(){if(R6)return wj;R6=1;var e=JEe(),t=rAe(),n=e(t);return wj=n,wj}var Sj,P6;function dJ(){if(P6)return Sj;P6=1;var e=Mw();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Sj=t,Sj}var _j,k6;function iAe(){if(k6)return _j;k6=1;var e=ok(),t=RZ(),n=hu();function r(i,a){return i==null?i:e(i,t(a),n)}return _j=r,_j}var Ej,D6;function hJ(){if(D6)return Ej;D6=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Ej=e,Ej}var Aj,I6;function pJ(){if(I6)return Aj;I6=1;var e=Sw(),t=sk(),n=zi();function r(i,a){var o={};return a=n(a,3),t(i,function(s,c,f){e(o,c,a(s,c,f))}),o}return Aj=r,Aj}var Cj,L6;function mk(){if(L6)return Cj;L6=1;var e=th();function t(n,r,i){for(var a=-1,o=n.length;++a<o;){var s=n[a],c=r(s);if(c!=null&&(f===void 0?c===c&&!e(c):i(c,f)))var f=c,h=s}return h}return Cj=t,Cj}var Tj,$6;function aAe(){if($6)return Tj;$6=1;function e(t,n){return t>n}return Tj=e,Tj}var jj,B6;function mJ(){if(B6)return jj;B6=1;var e=mk(),t=aAe(),n=pu();function r(i){return i&&i.length?e(i,n,t):void 0}return jj=r,jj}var Nj,q6;function gJ(){if(q6)return Nj;q6=1;var e=Sw(),t=Yd();function n(r,i,a){(a!==void 0&&!t(r[i],a)||a===void 0&&!(i in r))&&e(r,i,a)}return Nj=n,Nj}var Oj,z6;function vJ(){if(z6)return Oj;z6=1;var e=ts(),t=Tw(),n=qi(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,c=o.call(Object);function f(h){if(!n(h)||e(h)!=r)return!1;var d=t(h);if(d===null)return!0;var m=s.call(d,"constructor")&&d.constructor;return typeof m=="function"&&m instanceof m&&o.call(m)==c}return Oj=f,Oj}var Mj,F6;function yJ(){if(F6)return Mj;F6=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return Mj=e,Mj}var Rj,V6;function oAe(){if(V6)return Rj;V6=1;var e=$g(),t=hu();function n(r){return e(r,t(r))}return Rj=n,Rj}var Pj,U6;function sAe(){if(U6)return Pj;U6=1;var e=gJ(),t=bZ(),n=jZ(),r=xZ(),i=OZ(),a=Bg(),o=dn(),s=nJ(),c=Zd(),f=Qd(),h=wr(),d=vJ(),m=qg(),v=yJ(),x=oAe();function w(b,S,E,_,A,C,N){var M=v(b,E),R=v(S,E),P=N.get(R);if(P){e(b,E,P);return}var $=C?C(M,R,E+"",b,S,N):void 0,L=$===void 0;if(L){var D=o(R),F=!D&&c(R),I=!D&&!F&&m(R);$=R,D||F||I?o(M)?$=M:s(M)?$=r(M):F?(L=!1,$=t(R,!0)):I?(L=!1,$=n(R,!0)):$=[]:d(R)||a(R)?($=M,a(M)?$=x(M):(!h(M)||f(M))&&($=i(R))):L=!1}L&&(N.set(R,$),A($,R,_,C,N),N.delete(R)),e(b,E,$)}return Pj=w,Pj}var kj,H6;function lAe(){if(H6)return kj;H6=1;var e=ww(),t=gJ(),n=ok(),r=sAe(),i=wr(),a=hu(),o=yJ();function s(c,f,h,d,m){c!==f&&n(f,function(v,x){if(m||(m=new e),i(v))r(c,f,x,h,s,d,m);else{var w=d?d(o(c,x),v,x+"",c,f,m):void 0;w===void 0&&(w=v),t(c,x,w)}},a)}return kj=s,kj}var Dj,G6;function cAe(){if(G6)return Dj;G6=1;var e=Rw(),t=nh();function n(r){return e(function(i,a){var o=-1,s=a.length,c=s>1?a[s-1]:void 0,f=s>2?a[2]:void 0;for(c=r.length>3&&typeof c=="function"?(s--,c):void 0,f&&t(a[0],a[1],f)&&(c=s<3?void 0:c,s=1),i=Object(i);++o<s;){var h=a[o];h&&r(i,h,o,c)}return i})}return Dj=n,Dj}var Ij,K6;function uAe(){if(K6)return Ij;K6=1;var e=lAe(),t=cAe(),n=t(function(r,i,a){e(r,i,a)});return Ij=n,Ij}var Lj,W6;function bJ(){if(W6)return Lj;W6=1;function e(t,n){return t<n}return Lj=e,Lj}var $j,Y6;function xJ(){if(Y6)return $j;Y6=1;var e=mk(),t=bJ(),n=pu();function r(i){return i&&i.length?e(i,n,t):void 0}return $j=r,$j}var Bj,X6;function fAe(){if(X6)return Bj;X6=1;var e=mk(),t=zi(),n=bJ();function r(i,a){return i&&i.length?e(i,t(a,2),n):void 0}return Bj=r,Bj}var qj,Q6;function wJ(){if(Q6)return qj;Q6=1;var e=ma(),t=function(){return e.Date.now()};return qj=t,qj}var zj,Z6;function dAe(){if(Z6)return zj;Z6=1;var e=_w(),t=Nw(),n=Ew(),r=wr(),i=zg();function a(o,s,c,f){if(!r(o))return o;s=t(s,o);for(var h=-1,d=s.length,m=d-1,v=o;v!=null&&++h<d;){var x=i(s[h]),w=c;if(x==="__proto__"||x==="constructor"||x==="prototype")return o;if(h!=m){var b=v[x];w=f?f(b,x,v):void 0,w===void 0&&(w=r(b)?b:n(s[h+1])?[]:{})}e(v,x,w),v=v[x]}return o}return zj=a,zj}var Fj,J6;function hAe(){if(J6)return Fj;J6=1;var e=Ow(),t=dAe(),n=Nw();function r(i,a,o){for(var s=-1,c=a.length,f={};++s<c;){var h=a[s],d=e(i,h);o(d,h)&&t(f,n(h,i),d)}return f}return Fj=r,Fj}var Vj,eV;function pAe(){if(eV)return Vj;eV=1;var e=hAe(),t=UZ();function n(r,i){return e(r,i,function(a,o){return t(r,o)})}return Vj=n,Vj}var Uj,tV;function mAe(){if(tV)return Uj;tV=1;var e=dJ(),t=ZZ(),n=JZ();function r(i){return n(t(i,void 0,e),i+"")}return Uj=r,Uj}var Hj,nV;function gAe(){if(nV)return Hj;nV=1;var e=pAe(),t=mAe(),n=t(function(r,i){return r==null?{}:e(r,i)});return Hj=n,Hj}var Gj,rV;function vAe(){if(rV)return Gj;rV=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var s=-1,c=t(e((i-r)/(a||1)),0),f=Array(c);c--;)f[o?c:++s]=r,r+=a;return f}return Gj=n,Gj}var Kj,iV;function yAe(){if(iV)return Kj;iV=1;var e=vAe(),t=nh(),n=uJ();function r(i){return function(a,o,s){return s&&typeof s!="number"&&t(a,o,s)&&(o=s=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),s=s===void 0?a<o?1:-1:n(s),e(a,o,s,i)}}return Kj=r,Kj}var Wj,aV;function SJ(){if(aV)return Wj;aV=1;var e=yAe(),t=e();return Wj=t,Wj}var Yj,oV;function bAe(){if(oV)return Yj;oV=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Yj=e,Yj}var Xj,sV;function xAe(){if(sV)return Xj;sV=1;var e=th();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,s=e(n),c=r!==void 0,f=r===null,h=r===r,d=e(r);if(!f&&!d&&!s&&n>r||s&&c&&h&&!f&&!d||a&&c&&h||!i&&h||!o)return 1;if(!a&&!s&&!d&&n<r||d&&i&&o&&!a&&!s||f&&i&&o||!c&&o||!h)return-1}return 0}return Xj=t,Xj}var Qj,lV;function wAe(){if(lV)return Qj;lV=1;var e=xAe();function t(n,r,i){for(var a=-1,o=n.criteria,s=r.criteria,c=o.length,f=i.length;++a<c;){var h=e(o[a],s[a]);if(h){if(a>=f)return h;var d=i[a];return h*(d=="desc"?-1:1)}}return n.index-r.index}return Qj=t,Qj}var Zj,cV;function SAe(){if(cV)return Zj;cV=1;var e=jw(),t=Ow(),n=zi(),r=YZ(),i=bAe(),a=Aw(),o=wAe(),s=pu(),c=dn();function f(h,d,m){d.length?d=e(d,function(w){return c(w)?function(b){return t(b,w.length===1?w[0]:w)}:w}):d=[s];var v=-1;d=e(d,a(n));var x=r(h,function(w,b,S){var E=e(d,function(_){return _(w)});return{criteria:E,index:++v,value:w}});return i(x,function(w,b){return o(w,b,m)})}return Zj=f,Zj}var Jj,uV;function _J(){if(uV)return Jj;uV=1;var e=Mw(),t=SAe(),n=Rw(),r=nh(),i=n(function(a,o){if(a==null)return[];var s=o.length;return s>1&&r(a,o[0],o[1])?o=[]:s>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return Jj=i,Jj}var eN,fV;function _Ae(){if(fV)return eN;fV=1;var e=fk(),t=0;function n(r){var i=++t;return e(r)+i}return eN=n,eN}var tN,dV;function EAe(){if(dV)return tN;dV=1;function e(t,n,r){for(var i=-1,a=t.length,o=n.length,s={};++i<a;){var c=i<o?n[i]:void 0;r(s,t[i],c)}return s}return tN=e,tN}var nN,hV;function AAe(){if(hV)return nN;hV=1;var e=_w(),t=EAe();function n(r,i){return t(r||[],i||[],e)}return nN=n,nN}var rN,pV;function an(){if(pV)return rN;pV=1;var e;if(typeof Y2=="function")try{e={cloneDeep:QEe(),constant:ak(),defaults:ZEe(),each:kZ(),filter:GZ(),find:fJ(),flatten:dJ(),forEach:PZ(),forIn:iAe(),has:KZ(),isUndefined:WZ(),last:hJ(),map:dk(),mapValues:pJ(),max:mJ(),merge:uAe(),min:xJ(),minBy:fAe(),now:wJ(),pick:gAe(),range:SJ(),reduce:XZ(),sortBy:_J(),uniqueId:_Ae(),values:rJ(),zipObject:AAe()}}catch{}return e||(e=window._),rN=e,rN}var iN,mV;function CAe(){if(mV)return iN;mV=1,iN=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 iN}var aN,gV;function TAe(){if(gV)return aN;gV=1;var e=an(),t=fa().Graph,n=CAe();aN=i;var r=e.constant(1);function i(f,h){if(f.nodeCount()<=1)return[];var d=s(f,h||r),m=a(d.graph,d.buckets,d.zeroIdx);return e.flatten(e.map(m,function(v){return f.outEdges(v.v,v.w)}),!0)}function a(f,h,d){for(var m=[],v=h[h.length-1],x=h[0],w;f.nodeCount();){for(;w=x.dequeue();)o(f,h,d,w);for(;w=v.dequeue();)o(f,h,d,w);if(f.nodeCount()){for(var b=h.length-2;b>0;--b)if(w=h[b].dequeue(),w){m=m.concat(o(f,h,d,w,!0));break}}}return m}function o(f,h,d,m,v){var x=v?[]:void 0;return e.forEach(f.inEdges(m.v),function(w){var b=f.edge(w),S=f.node(w.v);v&&x.push({v:w.v,w:w.w}),S.out-=b,c(h,d,S)}),e.forEach(f.outEdges(m.v),function(w){var b=f.edge(w),S=w.w,E=f.node(S);E.in-=b,c(h,d,E)}),f.removeNode(m.v),x}function s(f,h){var d=new t,m=0,v=0;e.forEach(f.nodes(),function(b){d.setNode(b,{v:b,in:0,out:0})}),e.forEach(f.edges(),function(b){var S=d.edge(b.v,b.w)||0,E=h(b),_=S+E;d.setEdge(b.v,b.w,_),v=Math.max(v,d.node(b.v).out+=E),m=Math.max(m,d.node(b.w).in+=E)});var x=e.range(v+m+3).map(function(){return new n}),w=m+1;return e.forEach(d.nodes(),function(b){c(x,w,d.node(b))}),{graph:d,buckets:x,zeroIdx:w}}function c(f,h,d){d.out?d.in?f[d.out-d.in+h].enqueue(d):f[f.length-1].enqueue(d):f[0].enqueue(d)}return aN}var oN,vV;function jAe(){if(vV)return oN;vV=1;var e=an(),t=TAe();oN={run:n,undo:i};function n(a){var o=a.graph().acyclicer==="greedy"?t(a,s(a)):r(a);e.forEach(o,function(c){var f=a.edge(c);a.removeEdge(c),f.forwardName=c.name,f.reversed=!0,a.setEdge(c.w,c.v,f,e.uniqueId("rev"))});function s(c){return function(f){return c.edge(f).weight}}}function r(a){var o=[],s={},c={};function f(h){e.has(c,h)||(c[h]=!0,s[h]=!0,e.forEach(a.outEdges(h),function(d){e.has(s,d.w)?o.push(d):f(d.w)}),delete s[h])}return e.forEach(a.nodes(),f),o}function i(a){e.forEach(a.edges(),function(o){var s=a.edge(o);if(s.reversed){a.removeEdge(o);var c=s.forwardName;delete s.reversed,delete s.forwardName,a.setEdge(o.w,o.v,s,c)}})}return oN}var sN,yV;function $r(){if(yV)return sN;yV=1;var e=an(),t=fa().Graph;sN={addDummyNode:n,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:s,buildLayerMatrix:c,normalizeRanks:f,removeEmptyRanks:h,addBorderNode:d,maxRank:m,partition:v,time:x,notime:w};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 s(b,S){var E=b.x,_=b.y,A=S.x-E,C=S.y-_,N=b.width/2,M=b.height/2;if(!A&&!C)throw new Error("Not possible to find intersection inside of the rectangle");var R,P;return Math.abs(C)*N>Math.abs(A)*M?(C<0&&(M=-M),R=M*A/C,P=M):(A<0&&(N=-N),R=N,P=N*C/A),{x:E+R,y:_+P}}function c(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 h(b){var S=e.min(e.map(b.nodes(),function(C){return b.node(C).rank})),E=[];e.forEach(b.nodes(),function(C){var N=b.node(C).rank-S;E[N]||(E[N]=[]),E[N].push(C)});var _=0,A=b.graph().nodeRankFactor;e.forEach(E,function(C,N){e.isUndefined(C)&&N%A!==0?--_:_&&e.forEach(C,function(M){b.node(M).rank+=_})})}function d(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 v(b,S){var E={lhs:[],rhs:[]};return e.forEach(b,function(_){S(_)?E.lhs.push(_):E.rhs.push(_)}),E}function x(b,S){var E=e.now();try{return S()}finally{console.log(b+" time: "+(e.now()-E)+"ms")}}function w(b,S){return S()}return sN}var lN,bV;function NAe(){if(bV)return lN;bV=1;var e=an(),t=$r();lN={run:n,undo:i};function n(a){a.graph().dummyChains=[],e.forEach(a.edges(),function(o){r(a,o)})}function r(a,o){var s=o.v,c=a.node(s).rank,f=o.w,h=a.node(f).rank,d=o.name,m=a.edge(o),v=m.labelRank;if(h!==c+1){a.removeEdge(o);var x,w,b;for(b=0,++c;c<h;++b,++c)m.points=[],w={width:0,height:0,edgeLabel:m,edgeObj:o,rank:c},x=t.addDummyNode(a,"edge",w,"_d"),c===v&&(w.width=m.width,w.height=m.height,w.dummy="edge-label",w.labelpos=m.labelpos),a.setEdge(s,x,{weight:m.weight},d),b===0&&a.graph().dummyChains.push(x),s=x;a.setEdge(s,f,{weight:m.weight},d)}}function i(a){e.forEach(a.graph().dummyChains,function(o){var s=a.node(o),c=s.edgeLabel,f;for(a.setEdge(s.edgeObj,c);s.dummy;)f=a.successors(o)[0],a.removeNode(o),c.points.push({x:s.x,y:s.y}),s.dummy==="edge-label"&&(c.x=s.x,c.y=s.y,c.width=s.width,c.height=s.height),o=f,s=a.node(o)})}return lN}var cN,xV;function hx(){if(xV)return cN;xV=1;var e=an();cN={longestPath:t,slack:n};function t(r){var i={};function a(o){var s=r.node(o);if(e.has(i,o))return s.rank;i[o]=!0;var c=e.min(e.map(r.outEdges(o),function(f){return a(f.w)-r.edge(f).minlen}));return(c===Number.POSITIVE_INFINITY||c===void 0||c===null)&&(c=0),s.rank=c}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 cN}var uN,wV;function EJ(){if(wV)return uN;wV=1;var e=an(),t=fa().Graph,n=hx().slack;uN=r;function r(s){var c=new t({directed:!1}),f=s.nodes()[0],h=s.nodeCount();c.setNode(f,{});for(var d,m;i(c,s)<h;)d=a(c,s),m=c.hasNode(d.v)?n(s,d):-n(s,d),o(c,s,m);return c}function i(s,c){function f(h){e.forEach(c.nodeEdges(h),function(d){var m=d.v,v=h===m?d.w:m;!s.hasNode(v)&&!n(c,d)&&(s.setNode(v,{}),s.setEdge(h,v,{}),f(v))})}return e.forEach(s.nodes(),f),s.nodeCount()}function a(s,c){return e.minBy(c.edges(),function(f){if(s.hasNode(f.v)!==s.hasNode(f.w))return n(c,f)})}function o(s,c,f){e.forEach(s.nodes(),function(h){c.node(h).rank+=f})}return uN}var fN,SV;function OAe(){if(SV)return fN;SV=1;var e=an(),t=EJ(),n=hx().slack,r=hx().longestPath,i=fa().alg.preorder,a=fa().alg.postorder,o=$r().simplify;fN=s,s.initLowLimValues=d,s.initCutValues=c,s.calcCutValue=h,s.leaveEdge=v,s.enterEdge=x,s.exchangeEdges=w;function s(_){_=o(_),r(_);var A=t(_);d(A),c(A,_);for(var C,N;C=v(A);)N=x(A,_,C),w(A,_,C,N)}function c(_,A){var C=a(_,_.nodes());C=C.slice(0,C.length-1),e.forEach(C,function(N){f(_,A,N)})}function f(_,A,C){var N=_.node(C),M=N.parent;_.edge(C,M).cutvalue=h(_,A,C)}function h(_,A,C){var N=_.node(C),M=N.parent,R=!0,P=A.edge(C,M),$=0;return P||(R=!1,P=A.edge(M,C)),$=P.weight,e.forEach(A.nodeEdges(C),function(L){var D=L.v===C,F=D?L.w:L.v;if(F!==M){var I=D===R,q=A.edge(L).weight;if($+=I?q:-q,S(_,C,F)){var k=_.edge(C,F).cutvalue;$+=I?-k:k}}}),$}function d(_,A){arguments.length<2&&(A=_.nodes()[0]),m(_,{},1,A)}function m(_,A,C,N,M){var R=C,P=_.node(N);return A[N]=!0,e.forEach(_.neighbors(N),function($){e.has(A,$)||(C=m(_,A,C,$,N))}),P.low=R,P.lim=C++,M?P.parent=M:delete P.parent,C}function v(_){return e.find(_.edges(),function(A){return _.edge(A).cutvalue<0})}function x(_,A,C){var N=C.v,M=C.w;A.hasEdge(N,M)||(N=C.w,M=C.v);var R=_.node(N),P=_.node(M),$=R,L=!1;R.lim>P.lim&&($=P,L=!0);var D=e.filter(A.edges(),function(F){return L===E(_,_.node(F.v),$)&&L!==E(_,_.node(F.w),$)});return e.minBy(D,function(F){return n(A,F)})}function w(_,A,C,N){var M=C.v,R=C.w;_.removeEdge(M,R),_.setEdge(N.v,N.w,{}),d(_),c(_,A),b(_,A)}function b(_,A){var C=e.find(_.nodes(),function(M){return!A.node(M).parent}),N=i(_,C);N=N.slice(1),e.forEach(N,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,C){return _.hasEdge(A,C)}function E(_,A,C){return C.low<=A.lim&&A.lim<=C.lim}return fN}var dN,_V;function MAe(){if(_V)return dN;_V=1;var e=hx(),t=e.longestPath,n=EJ(),r=OAe();dN=i;function i(c){switch(c.graph().ranker){case"network-simplex":s(c);break;case"tight-tree":o(c);break;case"longest-path":a(c);break;default:s(c)}}var a=t;function o(c){t(c),n(c)}function s(c){r(c)}return dN}var hN,EV;function RAe(){if(EV)return hN;EV=1;var e=an();hN=t;function t(i){var a=r(i);e.forEach(i.graph().dummyChains,function(o){for(var s=i.node(o),c=s.edgeObj,f=n(i,a,c.v,c.w),h=f.path,d=f.lca,m=0,v=h[m],x=!0;o!==c.w;){if(s=i.node(o),x){for(;(v=h[m])!==d&&i.node(v).maxRank<s.rank;)m++;v===d&&(x=!1)}if(!x){for(;m<h.length-1&&i.node(v=h[m+1]).minRank<=s.rank;)m++;v=h[m]}i.setParent(o,v),o=i.successors(o)[0]}})}function n(i,a,o,s){var c=[],f=[],h=Math.min(a[o].low,a[s].low),d=Math.max(a[o].lim,a[s].lim),m,v;m=o;do m=i.parent(m),c.push(m);while(m&&(a[m].low>h||d>a[m].lim));for(v=m,m=s;(m=i.parent(m))!==v;)f.push(m);return{path:c.concat(f.reverse()),lca:v}}function r(i){var a={},o=0;function s(c){var f=o;e.forEach(i.children(c),s),a[c]={low:f,lim:o++}}return e.forEach(i.children(),s),a}return hN}var pN,AV;function PAe(){if(AV)return pN;AV=1;var e=an(),t=$r();pN={run:n,cleanup:o};function n(s){var c=t.addDummyNode(s,"root",{},"_root"),f=i(s),h=e.max(e.values(f))-1,d=2*h+1;s.graph().nestingRoot=c,e.forEach(s.edges(),function(v){s.edge(v).minlen*=d});var m=a(s)+1;e.forEach(s.children(),function(v){r(s,c,d,m,h,f,v)}),s.graph().nodeRankFactor=d}function r(s,c,f,h,d,m,v){var x=s.children(v);if(!x.length){v!==c&&s.setEdge(c,v,{weight:0,minlen:f});return}var w=t.addBorderNode(s,"_bt"),b=t.addBorderNode(s,"_bb"),S=s.node(v);s.setParent(w,v),S.borderTop=w,s.setParent(b,v),S.borderBottom=b,e.forEach(x,function(E){r(s,c,f,h,d,m,E);var _=s.node(E),A=_.borderTop?_.borderTop:E,C=_.borderBottom?_.borderBottom:E,N=_.borderTop?h:2*h,M=A!==C?1:d-m[v]+1;s.setEdge(w,A,{weight:N,minlen:M,nestingEdge:!0}),s.setEdge(C,b,{weight:N,minlen:M,nestingEdge:!0})}),s.parent(v)||s.setEdge(c,w,{weight:0,minlen:d+m[v]})}function i(s){var c={};function f(h,d){var m=s.children(h);m&&m.length&&e.forEach(m,function(v){f(v,d+1)}),c[h]=d}return e.forEach(s.children(),function(h){f(h,1)}),c}function a(s){return e.reduce(s.edges(),function(c,f){return c+s.edge(f).weight},0)}function o(s){var c=s.graph();s.removeNode(c.nestingRoot),delete c.nestingRoot,e.forEach(s.edges(),function(f){var h=s.edge(f);h.nestingEdge&&s.removeEdge(f)})}return pN}var mN,CV;function kAe(){if(CV)return mN;CV=1;var e=an(),t=$r();mN=n;function n(i){function a(o){var s=i.children(o),c=i.node(o);if(s.length&&e.forEach(s,a),e.has(c,"minRank")){c.borderLeft=[],c.borderRight=[];for(var f=c.minRank,h=c.maxRank+1;f<h;++f)r(i,"borderLeft","_bl",o,c,f),r(i,"borderRight","_br",o,c,f)}}e.forEach(i.children(),a)}function r(i,a,o,s,c,f){var h={width:0,height:0,rank:f,borderType:a},d=c[a][f-1],m=t.addDummyNode(i,"border",h,o);c[a][f]=m,i.setParent(m,s),d&&i.setEdge(d,m,{weight:1})}return mN}var gN,TV;function DAe(){if(TV)return gN;TV=1;var e=an();gN={adjust:t,undo:n};function t(f){var h=f.graph().rankdir.toLowerCase();(h==="lr"||h==="rl")&&r(f)}function n(f){var h=f.graph().rankdir.toLowerCase();(h==="bt"||h==="rl")&&a(f),(h==="lr"||h==="rl")&&(s(f),r(f))}function r(f){e.forEach(f.nodes(),function(h){i(f.node(h))}),e.forEach(f.edges(),function(h){i(f.edge(h))})}function i(f){var h=f.width;f.width=f.height,f.height=h}function a(f){e.forEach(f.nodes(),function(h){o(f.node(h))}),e.forEach(f.edges(),function(h){var d=f.edge(h);e.forEach(d.points,o),e.has(d,"y")&&o(d)})}function o(f){f.y=-f.y}function s(f){e.forEach(f.nodes(),function(h){c(f.node(h))}),e.forEach(f.edges(),function(h){var d=f.edge(h);e.forEach(d.points,c),e.has(d,"x")&&c(d)})}function c(f){var h=f.x;f.x=f.y,f.y=h}return gN}var vN,jV;function IAe(){if(jV)return vN;jV=1;var e=an();vN=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 s(f){if(!e.has(r,f)){r[f]=!0;var h=n.node(f);o[h.rank].push(f),e.forEach(n.successors(f),s)}}var c=e.sortBy(i,function(f){return n.node(f).rank});return e.forEach(c,s),o}return vN}var yN,NV;function LAe(){if(NV)return yN;NV=1;var e=an();yN=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,v){return v})),s=e.flatten(e.map(i,function(m){return e.sortBy(e.map(r.outEdges(m),function(v){return{pos:o[v.w],weight:r.edge(v).weight}}),"pos")}),!0),c=1;c<a.length;)c<<=1;var f=2*c-1;c-=1;var h=e.map(new Array(f),function(){return 0}),d=0;return e.forEach(s.forEach(function(m){var v=m.pos+c;h[v]+=m.weight;for(var x=0;v>0;)v%2&&(x+=h[v+1]),v=v-1>>1,h[v]+=m.weight;d+=m.weight*x})),d}return yN}var bN,OV;function $Ae(){if(OV)return bN;OV=1;var e=an();bN=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(s,c){var f=n.edge(c),h=n.node(c.v);return{sum:s.sum+f.weight*h.order,weight:s.weight+f.weight}},{sum:0,weight:0});return{v:i,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:i}})}return bN}var xN,MV;function BAe(){if(MV)return xN;MV=1;var e=an();xN=t;function t(i,a){var o={};e.forEach(i,function(c,f){var h=o[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:f};e.isUndefined(c.barycenter)||(h.barycenter=c.barycenter,h.weight=c.weight)}),e.forEach(a.edges(),function(c){var f=o[c.v],h=o[c.w];!e.isUndefined(f)&&!e.isUndefined(h)&&(h.indegree++,f.out.push(o[c.w]))});var s=e.filter(o,function(c){return!c.indegree});return n(s)}function n(i){var a=[];function o(f){return function(h){h.merged||(e.isUndefined(h.barycenter)||e.isUndefined(f.barycenter)||h.barycenter>=f.barycenter)&&r(f,h)}}function s(f){return function(h){h.in.push(f),--h.indegree===0&&i.push(h)}}for(;i.length;){var c=i.pop();a.push(c),e.forEach(c.in.reverse(),o(c)),e.forEach(c.out,s(c))}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,s=0;i.weight&&(o+=i.barycenter*i.weight,s+=i.weight),a.weight&&(o+=a.barycenter*a.weight,s+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=o/s,i.weight=s,i.i=Math.min(a.i,i.i),a.merged=!0}return xN}var wN,RV;function qAe(){if(RV)return wN;RV=1;var e=an(),t=$r();wN=n;function n(a,o){var s=t.partition(a,function(w){return e.has(w,"barycenter")}),c=s.lhs,f=e.sortBy(s.rhs,function(w){return-w.i}),h=[],d=0,m=0,v=0;c.sort(i(!!o)),v=r(h,f,v),e.forEach(c,function(w){v+=w.vs.length,h.push(w.vs),d+=w.barycenter*w.weight,m+=w.weight,v=r(h,f,v)});var x={vs:e.flatten(h,!0)};return m&&(x.barycenter=d/m,x.weight=m),x}function r(a,o,s){for(var c;o.length&&(c=e.last(o)).i<=s;)o.pop(),a.push(c.vs),s++;return s}function i(a){return function(o,s){return o.barycenter<s.barycenter?-1:o.barycenter>s.barycenter?1:a?s.i-o.i:o.i-s.i}}return wN}var SN,PV;function zAe(){if(PV)return SN;PV=1;var e=an(),t=$Ae(),n=BAe(),r=qAe();SN=i;function i(s,c,f,h){var d=s.children(c),m=s.node(c),v=m?m.borderLeft:void 0,x=m?m.borderRight:void 0,w={};v&&(d=e.filter(d,function(C){return C!==v&&C!==x}));var b=t(s,d);e.forEach(b,function(C){if(s.children(C.v).length){var N=i(s,C.v,f,h);w[C.v]=N,e.has(N,"barycenter")&&o(C,N)}});var S=n(b,f);a(S,w);var E=r(S,h);if(v&&(E.vs=e.flatten([v,E.vs,x],!0),s.predecessors(v).length)){var _=s.node(s.predecessors(v)[0]),A=s.node(s.predecessors(x)[0]);e.has(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+_.order+A.order)/(E.weight+2),E.weight+=2}return E}function a(s,c){e.forEach(s,function(f){f.vs=e.flatten(f.vs.map(function(h){return c[h]?c[h].vs:h}),!0)})}function o(s,c){e.isUndefined(s.barycenter)?(s.barycenter=c.barycenter,s.weight=c.weight):(s.barycenter=(s.barycenter*s.weight+c.barycenter*c.weight)/(s.weight+c.weight),s.weight+=c.weight)}return SN}var _N,kV;function FAe(){if(kV)return _N;kV=1;var e=an(),t=fa().Graph;_N=n;function n(i,a,o){var s=r(i),c=new t({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(f){return i.node(f)});return e.forEach(i.nodes(),function(f){var h=i.node(f),d=i.parent(f);(h.rank===a||h.minRank<=a&&a<=h.maxRank)&&(c.setNode(f),c.setParent(f,d||s),e.forEach(i[o](f),function(m){var v=m.v===f?m.w:m.v,x=c.edge(v,f),w=e.isUndefined(x)?0:x.weight;c.setEdge(v,f,{weight:i.edge(m).weight+w})}),e.has(h,"minRank")&&c.setNode(f,{borderLeft:h.borderLeft[a],borderRight:h.borderRight[a]}))}),c}function r(i){for(var a;i.hasNode(a=e.uniqueId("_root")););return a}return _N}var EN,DV;function VAe(){if(DV)return EN;DV=1;var e=an();EN=t;function t(n,r,i){var a={},o;e.forEach(i,function(s){for(var c=n.parent(s),f,h;c;){if(f=n.parent(c),f?(h=a[f],a[f]=c):(h=o,o=c),h&&h!==c){r.setEdge(h,c);return}c=f}})}return EN}var AN,IV;function UAe(){if(IV)return AN;IV=1;var e=an(),t=IAe(),n=LAe(),r=zAe(),i=FAe(),a=VAe(),o=fa().Graph,s=$r();AN=c;function c(m){var v=s.maxRank(m),x=f(m,e.range(1,v+1),"inEdges"),w=f(m,e.range(v-1,-1,-1),"outEdges"),b=t(m);d(m,b);for(var S=Number.POSITIVE_INFINITY,E,_=0,A=0;A<4;++_,++A){h(_%2?x:w,_%4>=2),b=s.buildLayerMatrix(m);var C=n(m,b);C<S&&(A=0,E=e.cloneDeep(b),S=C)}d(m,E)}function f(m,v,x){return e.map(v,function(w){return i(m,w,x)})}function h(m,v){var x=new o;e.forEach(m,function(w){var b=w.graph().root,S=r(w,b,x,v);e.forEach(S.vs,function(E,_){w.node(E).order=_}),a(w,x,S.vs)})}function d(m,v){e.forEach(v,function(x){e.forEach(x,function(w,b){m.node(w).order=b})})}return AN}var CN,LV;function HAe(){if(LV)return CN;LV=1;var e=an(),t=fa().Graph,n=$r();CN={positionX:x,findType1Conflicts:r,findType2Conflicts:i,addConflict:o,hasConflict:s,verticalAlignment:c,horizontalCompaction:f,alignCoordinates:m,findSmallestWidthAlignment:d,balance:v};function r(S,E){var _={};function A(C,N){var M=0,R=0,P=C.length,$=e.last(N);return e.forEach(N,function(L,D){var F=a(S,L),I=F?S.node(F).order:P;(F||L===$)&&(e.forEach(N.slice(R,D+1),function(q){e.forEach(S.predecessors(q),function(k){var z=S.node(k),H=z.order;(H<M||I<H)&&!(z.dummy&&S.node(q).dummy)&&o(_,k,q)})}),R=D+1,M=I)}),N}return e.reduce(E,A),_}function i(S,E){var _={};function A(N,M,R,P,$){var L;e.forEach(e.range(M,R),function(D){L=N[D],S.node(L).dummy&&e.forEach(S.predecessors(L),function(F){var I=S.node(F);I.dummy&&(I.order<P||I.order>$)&&o(_,F,L)})})}function C(N,M){var R=-1,P,$=0;return e.forEach(M,function(L,D){if(S.node(L).dummy==="border"){var F=S.predecessors(L);F.length&&(P=S.node(F[0]).order,A(M,$,D,R,P),$=D,R=P)}A(M,$,M.length,P,N.length)}),M}return e.reduce(E,C),_}function a(S,E){if(S.node(E).dummy)return e.find(S.predecessors(E),function(_){return S.node(_).dummy})}function o(S,E,_){if(E>_){var A=E;E=_,_=A}var C=S[E];C||(S[E]=C={}),C[_]=!0}function s(S,E,_){if(E>_){var A=E;E=_,_=A}return e.has(S[E],_)}function c(S,E,_,A){var C={},N={},M={};return e.forEach(E,function(R){e.forEach(R,function(P,$){C[P]=P,N[P]=P,M[P]=$})}),e.forEach(E,function(R){var P=-1;e.forEach(R,function($){var L=A($);if(L.length){L=e.sortBy(L,function(k){return M[k]});for(var D=(L.length-1)/2,F=Math.floor(D),I=Math.ceil(D);F<=I;++F){var q=L[F];N[$]===$&&P<M[q]&&!s(_,$,q)&&(N[q]=$,N[$]=C[$]=C[q],P=M[q])}}})}),{root:C,align:N}}function f(S,E,_,A,C){var N={},M=h(S,E,_,C),R=C?"borderLeft":"borderRight";function P(D,F){for(var I=M.nodes(),q=I.pop(),k={};q;)k[q]?D(q):(k[q]=!0,I.push(q),I=I.concat(F(q))),q=I.pop()}function $(D){N[D]=M.inEdges(D).reduce(function(F,I){return Math.max(F,N[I.v]+M.edge(I))},0)}function L(D){var F=M.outEdges(D).reduce(function(q,k){return Math.min(q,N[k.w]-M.edge(k))},Number.POSITIVE_INFINITY),I=S.node(D);F!==Number.POSITIVE_INFINITY&&I.borderType!==R&&(N[D]=Math.max(N[D],F))}return P($,M.predecessors.bind(M)),P(L,M.successors.bind(M)),e.forEach(A,function(D){N[D]=N[_[D]]}),N}function h(S,E,_,A){var C=new t,N=S.graph(),M=w(N.nodesep,N.edgesep,A);return e.forEach(E,function(R){var P;e.forEach(R,function($){var L=_[$];if(C.setNode(L),P){var D=_[P],F=C.edge(D,L);C.setEdge(D,L,Math.max(M(S,$,P),F||0))}P=$})}),C}function d(S,E){return e.minBy(e.values(E),function(_){var A=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY;return e.forIn(_,function(N,M){var R=b(S,M)/2;A=Math.max(N+R,A),C=Math.min(N-R,C)}),A-C})}function m(S,E){var _=e.values(E),A=e.min(_),C=e.max(_);e.forEach(["u","d"],function(N){e.forEach(["l","r"],function(M){var R=N+M,P=S[R],$;if(P!==E){var L=e.values(P);$=M==="l"?A-e.min(L):C-e.max(L),$&&(S[R]=e.mapValues(P,function(D){return D+$}))}})})}function v(S,E){return e.mapValues(S.ul,function(_,A){if(E)return S[E.toLowerCase()][A];var C=e.sortBy(e.map(S,A));return(C[1]+C[2])/2})}function x(S){var E=n.buildLayerMatrix(S),_=e.merge(r(S,E),i(S,E)),A={},C;e.forEach(["u","d"],function(M){C=M==="u"?E:e.values(E).reverse(),e.forEach(["l","r"],function(R){R==="r"&&(C=e.map(C,function(D){return e.values(D).reverse()}));var P=(M==="u"?S.predecessors:S.successors).bind(S),$=c(S,C,_,P),L=f(S,C,$.root,$.align,R==="r");R==="r"&&(L=e.mapValues(L,function(D){return-D})),A[M+R]=L})});var N=d(S,A);return m(A,N),v(A,S.graph().align)}function w(S,E,_){return function(A,C,N){var M=A.node(C),R=A.node(N),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 CN}var TN,$V;function GAe(){if($V)return TN;$V=1;var e=an(),t=$r(),n=HAe().positionX;TN=r;function r(a){a=t.asNonCompoundGraph(a),i(a),e.forEach(n(a),function(o,s){a.node(s).x=o})}function i(a){var o=t.buildLayerMatrix(a),s=a.graph().ranksep,c=0;e.forEach(o,function(f){var h=e.max(e.map(f,function(d){return a.node(d).height}));e.forEach(f,function(d){a.node(d).y=c+h/2}),c+=h+s})}return TN}var jN,BV;function KAe(){if(BV)return jN;BV=1;var e=an(),t=jAe(),n=NAe(),r=MAe(),i=$r().normalizeRanks,a=RAe(),o=$r().removeEmptyRanks,s=PAe(),c=kAe(),f=DAe(),h=UAe(),d=GAe(),m=$r(),v=fa().Graph;jN=x;function x(W,K){var J=K&&K.debugTiming?m.time:m.notime;J("layout",function(){var ee=J(" buildLayoutGraph",function(){return P(W)});J(" runLayout",function(){w(ee,J)}),J(" updateInputGraph",function(){b(W,ee)})})}function w(W,K){K(" makeSpaceForEdgeLabels",function(){$(W)}),K(" removeSelfEdges",function(){G(W)}),K(" acyclic",function(){t.run(W)}),K(" nestingGraph.run",function(){s.run(W)}),K(" rank",function(){r(m.asNonCompoundGraph(W))}),K(" injectEdgeLabelProxies",function(){L(W)}),K(" removeEmptyRanks",function(){o(W)}),K(" nestingGraph.cleanup",function(){s.cleanup(W)}),K(" normalizeRanks",function(){i(W)}),K(" assignRankMinMax",function(){D(W)}),K(" removeEdgeLabelProxies",function(){F(W)}),K(" normalize.run",function(){n.run(W)}),K(" parentDummyChains",function(){a(W)}),K(" addBorderSegments",function(){c(W)}),K(" order",function(){h(W)}),K(" insertSelfEdges",function(){Q(W)}),K(" adjustCoordinateSystem",function(){f.adjust(W)}),K(" position",function(){d(W)}),K(" positionSelfEdges",function(){U(W)}),K(" removeBorderNodes",function(){H(W)}),K(" normalize.undo",function(){n.undo(W)}),K(" fixupEdgeLabelCoords",function(){k(W)}),K(" undoCoordinateSystem",function(){f.undo(W)}),K(" translateGraph",function(){I(W)}),K(" assignNodeIntersects",function(){q(W)}),K(" reversePoints",function(){z(W)}),K(" acyclic.undo",function(){t.undo(W)})}function b(W,K){e.forEach(W.nodes(),function(J){var ee=W.node(J),te=K.node(J);ee&&(ee.x=te.x,ee.y=te.y,K.children(J).length&&(ee.width=te.width,ee.height=te.height))}),e.forEach(W.edges(),function(J){var ee=W.edge(J),te=K.edge(J);ee.points=te.points,e.has(te,"x")&&(ee.x=te.x,ee.y=te.y)}),W.graph().width=K.graph().width,W.graph().height=K.graph().height}var S=["nodesep","edgesep","ranksep","marginx","marginy"],E={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],A=["width","height"],C={width:0,height:0},N=["minlen","weight","width","height","labeloffset"],M={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},R=["labelpos"];function P(W){var K=new v({multigraph:!0,compound:!0}),J=X(W.graph());return K.setGraph(e.merge({},E,V(J,S),e.pick(J,_))),e.forEach(W.nodes(),function(ee){var te=X(W.node(ee));K.setNode(ee,e.defaults(V(te,A),C)),K.setParent(ee,W.parent(ee))}),e.forEach(W.edges(),function(ee){var te=X(W.edge(ee));K.setEdge(ee,e.merge({},M,V(te,N),e.pick(te,R)))}),K}function $(W){var K=W.graph();K.ranksep/=2,e.forEach(W.edges(),function(J){var ee=W.edge(J);ee.minlen*=2,ee.labelpos.toLowerCase()!=="c"&&(K.rankdir==="TB"||K.rankdir==="BT"?ee.width+=ee.labeloffset:ee.height+=ee.labeloffset)})}function L(W){e.forEach(W.edges(),function(K){var J=W.edge(K);if(J.width&&J.height){var ee=W.node(K.v),te=W.node(K.w),ne={rank:(te.rank-ee.rank)/2+ee.rank,e:K};m.addDummyNode(W,"edge-proxy",ne,"_ep")}})}function D(W){var K=0;e.forEach(W.nodes(),function(J){var ee=W.node(J);ee.borderTop&&(ee.minRank=W.node(ee.borderTop).rank,ee.maxRank=W.node(ee.borderBottom).rank,K=e.max(K,ee.maxRank))}),W.graph().maxRank=K}function F(W){e.forEach(W.nodes(),function(K){var J=W.node(K);J.dummy==="edge-proxy"&&(W.edge(J.e).labelRank=J.rank,W.removeNode(K))})}function I(W){var K=Number.POSITIVE_INFINITY,J=0,ee=Number.POSITIVE_INFINITY,te=0,ne=W.graph(),se=ne.marginx||0,ce=ne.marginy||0;function oe(be){var xe=be.x,we=be.y,Ae=be.width,Ee=be.height;K=Math.min(K,xe-Ae/2),J=Math.max(J,xe+Ae/2),ee=Math.min(ee,we-Ee/2),te=Math.max(te,we+Ee/2)}e.forEach(W.nodes(),function(be){oe(W.node(be))}),e.forEach(W.edges(),function(be){var xe=W.edge(be);e.has(xe,"x")&&oe(xe)}),K-=se,ee-=ce,e.forEach(W.nodes(),function(be){var xe=W.node(be);xe.x-=K,xe.y-=ee}),e.forEach(W.edges(),function(be){var xe=W.edge(be);e.forEach(xe.points,function(we){we.x-=K,we.y-=ee}),e.has(xe,"x")&&(xe.x-=K),e.has(xe,"y")&&(xe.y-=ee)}),ne.width=J-K+se,ne.height=te-ee+ce}function q(W){e.forEach(W.edges(),function(K){var J=W.edge(K),ee=W.node(K.v),te=W.node(K.w),ne,se;J.points?(ne=J.points[0],se=J.points[J.points.length-1]):(J.points=[],ne=te,se=ee),J.points.unshift(m.intersectRect(ee,ne)),J.points.push(m.intersectRect(te,se))})}function k(W){e.forEach(W.edges(),function(K){var J=W.edge(K);if(e.has(J,"x"))switch((J.labelpos==="l"||J.labelpos==="r")&&(J.width-=J.labeloffset),J.labelpos){case"l":J.x-=J.width/2+J.labeloffset;break;case"r":J.x+=J.width/2+J.labeloffset;break}})}function z(W){e.forEach(W.edges(),function(K){var J=W.edge(K);J.reversed&&J.points.reverse()})}function H(W){e.forEach(W.nodes(),function(K){if(W.children(K).length){var J=W.node(K),ee=W.node(J.borderTop),te=W.node(J.borderBottom),ne=W.node(e.last(J.borderLeft)),se=W.node(e.last(J.borderRight));J.width=Math.abs(se.x-ne.x),J.height=Math.abs(te.y-ee.y),J.x=ne.x+J.width/2,J.y=ee.y+J.height/2}}),e.forEach(W.nodes(),function(K){W.node(K).dummy==="border"&&W.removeNode(K)})}function G(W){e.forEach(W.edges(),function(K){if(K.v===K.w){var J=W.node(K.v);J.selfEdges||(J.selfEdges=[]),J.selfEdges.push({e:K,label:W.edge(K)}),W.removeEdge(K)}})}function Q(W){var K=m.buildLayerMatrix(W);e.forEach(K,function(J){var ee=0;e.forEach(J,function(te,ne){var se=W.node(te);se.order=ne+ee,e.forEach(se.selfEdges,function(ce){m.addDummyNode(W,"selfedge",{width:ce.label.width,height:ce.label.height,rank:se.rank,order:ne+ ++ee,e:ce.e,label:ce.label},"_se")}),delete se.selfEdges})})}function U(W){e.forEach(W.nodes(),function(K){var J=W.node(K);if(J.dummy==="selfedge"){var ee=W.node(J.e.v),te=ee.x+ee.width/2,ne=ee.y,se=J.x-te,ce=ee.height/2;W.setEdge(J.e,J.label),W.removeNode(K),J.label.points=[{x:te+2*se/3,y:ne-ce},{x:te+5*se/6,y:ne-ce},{x:te+se,y:ne},{x:te+5*se/6,y:ne+ce},{x:te+2*se/3,y:ne+ce}],J.label.x=J.x,J.label.y=J.y}})}function V(W,K){return e.mapValues(e.pick(W,K),Number)}function X(W){var K={};return e.forEach(W,function(J,ee){K[ee.toLowerCase()]=J}),K}return jN}var NN,qV;function WAe(){if(qV)return NN;qV=1;var e=an(),t=$r(),n=fa().Graph;NN={debugOrdering:r};function r(i){var a=t.buildLayerMatrix(i),o=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(s){o.setNode(s,{label:s}),o.setParent(s,"layer"+i.node(s).rank)}),e.forEach(i.edges(),function(s){o.setEdge(s.v,s.w,{},s.name)}),e.forEach(a,function(s,c){var f="layer"+c;o.setNode(f,{rank:"same"}),e.reduce(s,function(h,d){return o.setEdge(h,d,{style:"invis"}),d})}),o}return NN}var ON,zV;function YAe(){return zV||(zV=1,ON="0.8.5"),ON}var MN,FV;function XAe(){return FV||(FV=1,MN={graphlib:fa(),layout:KAe(),debug:WAe(),util:{time:$r().time,notime:$r().notime},version:YAe()}),MN}var QAe=XAe();const VV=Ct(QAe),UV={active:{icon:Dc,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:G_,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},"waiting-children":{icon:G_,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},prioritized:{icon:Pi,color:"text-amber-600 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-500/10",border:"border-amber-200 dark:border-amber-500/20"},completed:{icon:Qo,color:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-500/10",border:"border-emerald-200 dark:border-emerald-500/20"},failed:{icon:_g,color:"text-destructive",bg:"bg-red-50 dark:bg-red-500/10",border:"border-red-200 dark:border-red-500/20"},delayed:{icon:Pi,color:"text-amber-600 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-500/10",border:"border-amber-200 dark:border-amber-500/20"},paused:{icon:qK,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},unknown:{icon:G_,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"}};function ZAe(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`}function JAe({data:e}){const{flowNode:t,onClick:n}=e,{job:r,queueName:i}=t,a=UV[r.status]||UV.unknown,o=a.icon;return g.jsxs("div",{className:ge("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:[g.jsx(dd,{type:"target",position:Ie.Top,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-0"}),g.jsxs("div",{className:"flex items-start gap-2.5",children:[g.jsx("div",{className:ge("p-1.5 shrink-0",a.bg),children:g.jsx(o,{className:ge("h-3.5 w-3.5",a.color,a.animate&&"animate-spin")})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("div",{className:"font-medium text-sm truncate text-foreground",children:r.name}),g.jsx("div",{className:"text-[11px] text-muted-foreground truncate mt-0.5",children:i}),r.duration!==void 0&&g.jsx("div",{className:"text-[11px] text-muted-foreground mt-1 font-mono tabular-nums",children:ZAe(r.duration)})]})]}),g.jsx("div",{className:ge("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}),g.jsx(dd,{type:"source",position:Ie.Bottom,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-0"})]})}const eCe=j.memo(JAe),tCe={flowNode:eCe},HV=200,GV=80;function nCe(e,t){const n=[],r=[],i=new VV.graphlib.Graph;i.setGraph({rankdir:"TB",nodesep:50,ranksep:80}),i.setDefaultEdgeLabel(()=>({}));function a(o,s){const c=`${o.queueName}:${o.job.id}`;if(i.setNode(c,{width:HV,height:GV}),s&&(i.setEdge(s,c),r.push({id:`${s}->${c}`,source:s,target:c,type:"smoothstep",animated:o.job.status==="active",style:{stroke:"hsl(var(--border))",strokeWidth:2}})),n.push({id:c,type:"flowNode",position:{x:0,y:0},data:{flowNode:o,onClick:t}}),o.children)for(const f of o.children)a(f,c)}a(e),VV.layout(i);for(const o of n){const s=i.node(o.id);s&&(o.position={x:s.x-HV/2,y:s.y-GV/2})}return{nodes:n,edges:r}}function rCe({flow:e,onNodeClick:t}){const{nodes:n,edges:r}=j.useMemo(()=>nCe(e,t),[e,t]),i=j.useCallback((a,o)=>{o.data.onClick&&o.data.flowNode&&o.data.onClick(o.data.flowNode)},[]);return g.jsx("div",{className:"w-full h-full",children:g.jsx(CSe,{nodes:n,edges:r,nodeTypes:tCe,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"}})})}const px={active:{label:"Active",dotClass:"bg-status-active",textClass:"text-status-active",bgClass:"bg-status-active/10"},waiting:{label:"Waiting",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"},"waiting-children":{label:"Waiting Children",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"},prioritized:{label:"Prioritized",dotClass:"bg-status-warning",textClass:"text-status-warning",bgClass:"bg-status-warning/10"},completed:{label:"Completed",dotClass:"bg-status-success",textClass:"text-status-success",bgClass:"bg-status-success/10"},failed:{label:"Failed",dotClass:"bg-status-error",textClass:"text-status-error",bgClass:"bg-status-error/10"},delayed:{label:"Delayed",dotClass:"bg-status-warning",textClass:"text-status-warning",bgClass:"bg-status-warning/10"},paused:{label:"Paused",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"},unknown:{label:"Unknown",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"}};function Fg({status:e,duration:t,className:n}){const r=px[e]||px.unknown;return g.jsxs("span",{className:ge("inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium",r.bgClass,n),children:[g.jsx("span",{className:ge("h-1.5 w-1.5 rounded-full",r.dotClass)}),g.jsx("span",{className:r.textClass,children:r.label})]})}function iCe({status:e,className:t}){const n=px[e]||px.unknown;return g.jsx("span",{className:ge("h-2 w-2 rounded-full",n.dotClass,t)})}function aCe({queueName:e,jobId:t}){const n=fi(),{data:r,isLoading:i,error:a}=bme(e,t),o=c=>{n({to:"/queues/$queueName/jobs/$jobId",params:{queueName:c.queueName,jobId:c.job.id}})};if(i)return g.jsxs("div",{className:"flex flex-col h-full -mb-6",children:[g.jsxs("div",{className:"pb-4 border-b border-border shrink-0",children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"h-6 w-32 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-5 w-20 animate-pulse rounded bg-muted"})]})}),g.jsxs("div",{className:"flex items-center gap-6",children:[g.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})]})]}),g.jsx("div",{className:"flex-1 -mx-6 -mb-6 mt-6 flex items-center justify-center dotted-bg",children:g.jsx(Dc,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]});if(a||!r)return g.jsx(pr,{icon:Va,title:"Failed to load flow",description:(a==null?void 0:a.message)||"Flow not found or jobs have been cleaned up"});const s=AJ(r);return g.jsxs("div",{className:"flex flex-col h-full -mb-6",children:[g.jsxs("div",{className:"pb-4 border-b border-border shrink-0",children:[g.jsx("div",{className:"flex items-center justify-between mb-4",children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(Hc,{className:"h-5 w-5 text-muted-foreground"}),g.jsx(Fg,{status:r.job.status})]})}),g.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2 text-sm",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-muted-foreground",children:"Queue:"}),g.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})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(rhe,{className:"h-4 w-4 text-muted-foreground"}),g.jsxs("span",{className:"text-muted-foreground",children:[s.total," job",s.total!==1?"s":""]})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Qo,{className:"h-4 w-4 text-emerald-500"}),g.jsxs("span",{className:"text-muted-foreground",children:[s.completed," completed"]})]}),s.failed>0&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(_g,{className:"h-4 w-4 text-red-500"}),g.jsxs("span",{className:"text-red-500",children:[s.failed," failed"]})]}),r.job.duration!==void 0&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Pi,{className:"h-4 w-4 text-muted-foreground"}),g.jsx("span",{className:"text-muted-foreground",children:Lr(r.job.duration)})]})]})]}),g.jsx("div",{className:"flex-1 -mx-6 -mb-6 mt-6 dotted-bg",children:g.jsx(rCe,{flow:r,onNodeClick:o})})]})}function AJ(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=AJ(i);t+=a.total,n+=a.completed,r+=a.failed}return{total:t,completed:n,failed:r}}function eu({timestamp:e,className:t}){return g.jsxs(bg,{children:[g.jsx(xg,{asChild:!0,children:g.jsx("span",{className:t,children:TK(e)})}),g.jsx(Fd,{children:g.jsx("span",{className:"font-mono text-xs",children:ub(e)})})]})}function CJ({className:e,containerClassName:t,...n}){return g.jsx("div",{"data-slot":"table-container",className:ge("relative w-full overflow-x-auto",t),children:g.jsx("table",{"data-slot":"table",className:ge("w-full caption-bottom text-sm",e),...n})})}function TJ({className:e,...t}){return g.jsx("thead",{"data-slot":"table-header",className:ge("[&_tr]:border-b",e),...t})}function jJ({className:e,...t}){return g.jsx("tbody",{"data-slot":"table-body",className:ge("[&_tr:last-child]:border-0",e),...t})}function mx({className:e,...t}){return g.jsx("tr",{"data-slot":"table-row",className:ge("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function ji({className:e,...t}){return g.jsx("th",{"data-slot":"table-head",className:ge("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 Ni({className:e,...t}){return g.jsx("td",{"data-slot":"table-cell",className:ge("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const KV=[{value:"all",label:"All"},{value:"waiting",label:"Waiting"},{value:"active",label:"Active"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}];function oCe({onFlowSelect:e}){const t=fi(),{data:n,isLoading:r,error:i}=yme(),[a,o]=j.useState("all"),s=d=>{t({to:"/queues/$queueName",params:{queueName:d}})},c=(n==null?void 0:n.flows)||[],f=j.useMemo(()=>{const d={all:c.length,waiting:0,active:0,completed:0,failed:0};for(const m of c)m.status in d&&(d[m.status]+=1);return d},[c]),h=j.useMemo(()=>a==="all"?c:c.filter(d=>d.status===a),[c,a]);return r&&c.length===0?g.jsx(cCe,{}):i?g.jsx("div",{className:"flex h-64 items-center justify-center",children:g.jsx(pr,{icon:Va,title:"Failed to load flows",description:i.message})}):c.length===0?g.jsx("div",{className:"flex h-64 items-center justify-center",children:g.jsx(pr,{icon:Hc,title:"No flows found",description:"Flows are created when you use BullMQ's FlowProducer"})}):g.jsxs(Mg,{value:a,onValueChange:d=>o(d),className:"flex h-full min-h-0 flex-col gap-4",children:[g.jsx(Wd,{className:"shrink-0 self-start",children:KV.map(d=>g.jsxs(kr,{value:d.value,children:[d.label," (",f[d.value],")"]},d.value))}),KV.map(d=>g.jsx(ni,{value:d.value,className:"mt-0 min-h-0 flex-1 data-[state=active]:flex data-[state=active]:flex-col",children:h.length===0?g.jsx("div",{className:"flex h-48 items-center justify-center",children:g.jsx(pr,{icon:Hc,title:`No ${d.value==="all"?"":d.label.toLowerCase()} flows`,description:"Try selecting a different status filter"})}):g.jsx(sCe,{flows:h,onFlowSelect:e,onQueueClick:s})},d.value))]})}function sCe({flows:e,onFlowSelect:t,onQueueClick:n}){return g.jsxs(CJ,{containerClassName:"min-h-0 flex-1 overflow-auto",children:[g.jsx(TJ,{className:"sticky top-0 z-10 bg-background",children:g.jsxs(mx,{children:[g.jsx(ji,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Flow"}),g.jsx(ji,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Queue"}),g.jsx(ji,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Status"}),g.jsx(ji,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Progress"}),g.jsx(ji,{className:"text-[11px] uppercase tracking-wider text-muted-foreground",children:"Created"}),g.jsx(ji,{className:"w-8"})]})}),g.jsx(jJ,{children:e.map(r=>g.jsx(lCe,{flow:r,onClick:()=>t(r.queueName,r.id),onQueueClick:n},`${r.queueName}:${r.id}`))})]})}function lCe({flow:e,onClick:t,onQueueClick:n}){const r=i=>{i.stopPropagation(),n(e.queueName)};return g.jsxs(mx,{onClick:t,className:"group cursor-pointer",children:[g.jsx(Ni,{className:"min-w-0",children:g.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[g.jsx(Hc,{className:"h-4 w-4 text-muted-foreground shrink-0"}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"truncate font-medium text-sm",children:e.name}),g.jsx("div",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.id})]})]})}),g.jsx(Ni,{children:g.jsx("button",{type:"button",onClick:r,className:"truncate font-mono text-[11px] text-primary hover:underline",children:e.queueName})}),g.jsx(Ni,{children:g.jsx(Fg,{status:e.status})}),g.jsx(Ni,{children:g.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(Qo,{className:"h-3.5 w-3.5 text-emerald-600 dark:text-emerald-400"}),g.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.completedJobs})]}),g.jsx("span",{className:"text-muted-foreground",children:"/"}),g.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.totalJobs}),e.failedJobs>0&&g.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[g.jsx(_g,{className:"h-3.5 w-3.5 text-destructive"}),g.jsx("span",{className:"text-destructive tabular-nums",children:e.failedJobs})]})]})}),g.jsx(Ni,{children:g.jsx(eu,{timestamp:e.timestamp})}),g.jsx(Ni,{className:"w-8",children:g.jsx(rd,{className:"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})})]})}function cCe(){return g.jsxs(CJ,{children:[g.jsx(TJ,{children:g.jsxs(mx,{children:[g.jsx(ji,{children:"Flow"}),g.jsx(ji,{children:"Queue"}),g.jsx(ji,{children:"Status"}),g.jsx(ji,{children:"Progress"}),g.jsx(ji,{children:"Created"}),g.jsx(ji,{className:"w-8"})]})}),g.jsx(jJ,{children:[...Array(12)].map((e,t)=>g.jsxs(mx,{children:[g.jsx(Ni,{children:g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"})]})}),g.jsx(Ni,{children:g.jsx("div",{className:"h-4 w-16 animate-pulse rounded bg-muted"})}),g.jsx(Ni,{children:g.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),g.jsx(Ni,{children:g.jsx("div",{className:"h-4 w-16 animate-pulse rounded bg-muted"})}),g.jsx(Ni,{children:g.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),g.jsx(Ni,{className:"w-8"})]},t.toString()))})]})}function WV({data:e,className:t,defaultExpanded:n=!0}){const[r,i]=j.useState(!1),a=()=>{navigator.clipboard.writeText(JSON.stringify(e,null,2)),i(!0),setTimeout(()=>i(!1),2e3)};return g.jsxs("div",{className:ge("relative group",t),children:[g.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?g.jsx(Vd,{size:16,className:"h-4 w-4 text-status-success"}):g.jsx(I0,{className:"h-4 w-4 text-muted-foreground"})}),g.jsx("div",{className:"max-h-96 overflow-auto p-4 font-mono text-sm",children:g.jsx(KM,{data:e,level:0,defaultExpanded:n})})]})}function KM({data:e,level:t,defaultExpanded:n,keyName:r}){const[i,a]=j.useState(n),o=({name:s})=>g.jsxs("span",{className:"text-primary",children:['"',s,'"']});if(e===null)return g.jsxs("span",{children:[r&&g.jsxs(g.Fragment,{children:[g.jsx(o,{name:r}),g.jsx("span",{className:"text-foreground",children:": "})]}),g.jsx("span",{className:"text-muted-foreground italic",children:"null"})]});if(e===void 0)return g.jsxs("span",{children:[r&&g.jsxs(g.Fragment,{children:[g.jsx(o,{name:r}),g.jsx("span",{className:"text-foreground",children:": "})]}),g.jsx("span",{className:"text-muted-foreground italic",children:"undefined"})]});if(typeof e=="boolean")return g.jsxs("span",{children:[r&&g.jsxs(g.Fragment,{children:[g.jsx(o,{name:r}),g.jsx("span",{className:"text-foreground",children:": "})]}),g.jsx("span",{className:"text-status-warning",children:String(e)})]});if(typeof e=="number")return g.jsxs("span",{children:[r&&g.jsxs(g.Fragment,{children:[g.jsx(o,{name:r}),g.jsx("span",{className:"text-foreground",children:": "})]}),g.jsx("span",{className:"text-status-success",children:e})]});if(typeof e=="string")return g.jsxs("span",{children:[r&&g.jsxs(g.Fragment,{children:[g.jsx(o,{name:r}),g.jsx("span",{className:"text-foreground",children:": "})]}),g.jsxs("span",{className:"text-chart-5",children:['"',e,'"']})]});if(Array.isArray(e))return e.length===0?g.jsxs("span",{children:[r&&g.jsxs(g.Fragment,{children:[g.jsx(o,{name:r}),g.jsx("span",{className:"text-foreground",children:": "})]}),g.jsx("span",{className:"text-muted-foreground",children:"[]"})]}):g.jsxs("div",{children:[g.jsxs("button",{type:"button",onClick:()=>a(!i),className:"inline-flex items-center gap-1 hover:opacity-70",children:[g.jsx(rd,{className:ge("h-3 w-3 text-muted-foreground transition-transform",i&&"rotate-90")}),r&&g.jsxs(g.Fragment,{children:[g.jsx(o,{name:r}),g.jsx("span",{className:"text-foreground",children:": "})]}),g.jsxs("span",{className:"text-muted-foreground",children:["Array(",e.length,")"]})]}),i&&g.jsx("div",{className:"ml-4 mt-1 space-y-1 border-l border-border pl-3",children:e.map((s,c)=>g.jsx("div",{children:g.jsx(KM,{data:s,level:t+1,defaultExpanded:t<1,keyName:String(c)})},c.toString()))})]});if(typeof e=="object"){const s=Object.entries(e);return s.length===0?g.jsxs("span",{children:[r&&g.jsxs(g.Fragment,{children:[g.jsx(o,{name:r}),g.jsx("span",{className:"text-foreground",children:": "})]}),g.jsx("span",{className:"text-muted-foreground",children:"{}"})]}):g.jsxs("div",{children:[g.jsxs("button",{type:"button",onClick:()=>a(!i),className:"inline-flex items-center gap-1 hover:opacity-70",children:[g.jsx(rd,{className:ge("h-3 w-3 text-muted-foreground transition-transform",i&&"rotate-90")}),r&&g.jsxs(g.Fragment,{children:[g.jsx(o,{name:r}),g.jsx("span",{className:"text-foreground",children:": "})]}),g.jsxs("span",{className:"text-muted-foreground",children:["Object(",s.length,")"]})]}),i&&g.jsx("div",{className:"ml-4 mt-1 space-y-1 border-l border-border pl-3",children:s.map(([c,f])=>g.jsx("div",{children:g.jsx(KM,{data:f,level:t+1,defaultExpanded:t<1,keyName:c})},c))})]})}return g.jsx("span",{children:String(e)})}function uCe({queueName:e,jobId:t,readonly:n,search:r,onSearchChange:i,onBack:a,onClone:o}){const s=fi(),{data:c,isLoading:f,error:h}=ime(e,t),d=r.tab||((c==null?void 0:c.status)==="failed"?"error":"payload"),m=d==="logs",{data:v}=ame(e,t,{enabled:m,pollWhileActive:(c==null?void 0:c.status)==="active"}),x=ume(),w=fme(),b=dme(),[S,E]=j.useState(!1),_=x.isPending||w.isPending||b.isPending,A=async()=>{await navigator.clipboard.writeText(t),E(!0),setTimeout(()=>E(!1),2e3)},C=()=>{x.mutate({queueName:e,jobId:t})},N=()=>{w.mutate({queueName:e,jobId:t},{onSuccess:()=>a()})},M=()=>{b.mutate({queueName:e,jobId:t})},R=()=>{if(!c)return;const $={id:c.id,name:c.name,queueName:e,status:c.status,data:c.data,returnvalue:c.returnvalue,failedReason:c.failedReason,stacktrace:c.stacktrace,attemptsMade:c.attemptsMade,opts:c.opts,timestamp:c.timestamp,processedOn:c.processedOn,finishedOn:c.finishedOn,duration:c.duration,progress:c.progress,tags:c.tags},L=new Blob([JSON.stringify($,null,2)],{type:"application/json"}),D=URL.createObjectURL(L),F=document.createElement("a");F.href=D,F.download=`job-${c.name}-${t}.json`,F.click(),URL.revokeObjectURL(D)},P=()=>{if(!c)return;const $=JSON.stringify(c.data,null,2);o(e,c.name,$)};return f&&!c?g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:" border bg-card",children:[g.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"h-6 w-32 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"h-8 w-8 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-8 w-8 animate-pulse rounded bg-muted"})]})]}),g.jsxs("div",{className:"flex items-center gap-6 px-4 py-3",children:[g.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})]})]}),g.jsxs("div",{className:" border bg-card p-4",children:[g.jsx("div",{className:"h-5 w-16 animate-pulse rounded bg-muted mb-3"}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"})]})]})]}):h||!c?g.jsx(pr,{icon:Va,title:"Job not found",description:(h==null?void 0:h.message)||"This job may have been removed",action:g.jsx(it,{variant:"outline",onClick:a,children:"Go back"})}):g.jsxs("div",{className:"flex h-full flex-col gap-4",children:[g.jsxs("div",{className:" border bg-card",children:[g.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("div",{className:"flex items-center gap-2 bg-muted px-2.5 py-1 text-sm font-medium",children:c.name}),g.jsx(Fg,{status:c.status})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs(it,{variant:"outline",size:"sm",onClick:R,children:[g.jsx(Jde,{className:"mr-1.5 h-3.5 w-3.5"}),"Export"]}),!n&&g.jsxs(g.Fragment,{children:[g.jsxs(it,{variant:"outline",size:"sm",onClick:P,children:[g.jsx(Zde,{className:"mr-1.5 h-3.5 w-3.5"}),"Clone"]}),c.status==="failed"&&g.jsxs(it,{variant:"outline",size:"sm",onClick:C,disabled:_,children:[g.jsx(L0,{className:"mr-1.5 h-3.5 w-3.5"}),"Retry"]}),c.status==="delayed"&&g.jsxs(it,{variant:"outline",size:"sm",onClick:M,disabled:_,children:[g.jsx(the,{className:"mr-1.5 h-3.5 w-3.5"}),"Run Now"]}),g.jsxs(it,{variant:"outline",size:"sm",onClick:N,disabled:_,className:"text-destructive hover:bg-destructive/10 hover:text-destructive",children:[g.jsx(id,{className:"mr-1.5 h-3.5 w-3.5"}),"Remove"]})]})]})]}),c.status==="active"&&g.jsxs("div",{className:"border-b px-4 py-2",children:[g.jsxs("div",{className:"mb-1 flex items-center justify-between text-xs text-muted-foreground",children:[g.jsx("span",{children:"Progress"}),g.jsx("span",{children:typeof c.progress=="number"?`${Math.round(c.progress)}%`:"Running"})]}),g.jsx("div",{className:"h-1 bg-muted",children:g.jsx("div",{className:"h-full bg-chart-2 transition-all duration-300",style:{width:`${typeof c.progress=="number"?Math.min(100,Math.max(0,c.progress)):100}%`}})})]}),g.jsxs("div",{className:"divide-y text-sm",children:[g.jsx(sf,{icon:ihe,label:"Job ID",mono:!0,children:g.jsxs("span",{className:"flex items-center gap-2",children:[t,g.jsx("button",{type:"button",onClick:A,className:"rounded p-1 hover:bg-muted",children:S?g.jsx(Vd,{className:"h-3.5 w-3.5 text-status-success"}):g.jsx(I0,{className:"h-3.5 w-3.5 text-muted-foreground"})})]})}),g.jsx(sf,{icon:d2,label:"Queue",children:g.jsx("button",{type:"button",onClick:()=>s({to:"/queues/$queueName",params:{queueName:e}}),className:"font-mono text-xs text-primary hover:underline",children:e})}),c.parent&&g.jsx(sf,{icon:Hc,label:"Part of Flow",children:g.jsxs("button",{type:"button",onClick:()=>s({to:"/flows/$queueName/$jobId",params:{queueName:c.parent.queueName,jobId:c.parent.id}}),className:"flex items-center gap-1.5 text-primary hover:underline",children:[g.jsx("span",{className:"font-mono text-xs",children:c.parent.id}),g.jsx(ehe,{className:"h-3 w-3"})]})}),g.jsx(sf,{icon:Pi,label:"Created",children:ub(c.timestamp)}),c.processedOn&&g.jsx(sf,{icon:Pi,label:"Started",children:ub(c.processedOn)}),c.finishedOn&&g.jsx(sf,{icon:Pi,label:"Finished",children:ub(c.finishedOn)})]}),g.jsxs("div",{className:"flex items-center gap-6 border-t px-4 py-3 text-sm",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-muted-foreground",children:"Duration"}),g.jsx("span",{className:"font-mono font-medium",children:c.duration?Lr(c.duration):"-"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(h2,{className:"h-3.5 w-3.5 text-muted-foreground"}),g.jsx("span",{className:"text-muted-foreground",children:"Attempts"}),g.jsxs("span",{className:"font-mono font-medium",children:[c.attemptsMade," / ",c.opts.attempts||3]}),c.attemptsMade>1&&g.jsx(Un,{variant:"secondary",className:"bg-amber-500/10 text-amber-600 text-[10px] px-1.5",children:"Retried"})]}),c.opts.delay&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-muted-foreground",children:"Delay"}),g.jsx("span",{className:"font-mono font-medium",children:Lr(c.opts.delay)})]})]})]}),g.jsxs(Mg,{value:d,onValueChange:$=>i({...r,tab:$}),className:"flex-1",children:[g.jsxs(Wd,{children:[g.jsx(kr,{value:"payload",children:"Payload"}),g.jsx(kr,{value:"output",children:"Output"}),c.failedReason&&g.jsx(kr,{value:"error",className:"text-status-error",children:"Error"}),c.attemptsMade>1&&c.stacktrace&&c.stacktrace.length>0&&g.jsxs(kr,{value:"retries",children:["Retries (",c.attemptsMade-1,")"]}),g.jsx(kr,{value:"timeline",children:"Timeline"}),g.jsxs(kr,{value:"logs",className:"gap-1.5",children:["Logs",c.status==="active"&&g.jsxs(Un,{variant:"secondary",className:"gap-1 px-1.5 py-0 text-[10px] font-normal",children:[g.jsxs("span",{className:"relative flex h-1.5 w-1.5",children:[g.jsx("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-chart-2 opacity-75"}),g.jsx("span",{className:"relative inline-flex h-1.5 w-1.5 rounded-full bg-chart-2"})]}),"Live"]}),v&&v.count>0&&g.jsx(Un,{variant:"secondary",className:"px-1.5 py-0 text-[10px] font-mono",children:v.count})]})]}),g.jsx(ni,{value:"payload",className:"mt-4",children:g.jsx("div",{className:" border",children:g.jsx(WV,{data:c.data})})}),g.jsx(ni,{value:"output",className:"mt-4",children:g.jsx("div",{className:" border",children:c.returnvalue?g.jsx(WV,{data:c.returnvalue}):g.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No output data"})})}),c.failedReason&&g.jsx(ni,{value:"error",className:"mt-4 flex flex-col",style:{maxHeight:"calc(100vh - 480px)",minHeight:"200px"},children:g.jsx(fCe,{error:c.failedReason,stacktrace:c.stacktrace,jobName:c.name,queueName:e})}),c.attemptsMade>1&&c.stacktrace&&c.stacktrace.length>0&&g.jsx(ni,{value:"retries",className:"mt-4",children:g.jsx(pCe,{attemptsMade:c.attemptsMade,maxAttempts:c.opts.attempts||3,stacktraces:c.stacktrace,status:c.status})}),g.jsx(ni,{value:"timeline",className:"mt-4",children:g.jsx(hCe,{job:c})}),g.jsx(ni,{value:"logs",className:"mt-4",children:g.jsx(dCe,{logs:v==null?void 0:v.logs,count:v==null?void 0:v.count})})]})]})}function sf({icon:e,label:t,children:n,mono:r}){return g.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",children:[g.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[g.jsx(e,{className:"h-4 w-4"}),t]}),g.jsx("div",{className:ge(r&&"font-mono"),children:n})]})}function fCe({error:e,stacktrace:t,jobName:n,queueName:r}){const[i,a]=j.useState(!0),[o,s]=j.useState(!1),c=async()=>{const h=t?`${e}
422
+
423
+ ${t.join(`
424
+ `)}`:e;await navigator.clipboard.writeText(h),s(!0),setTimeout(()=>s(!1),2e3)},f=()=>{const h=t?`${e}
425
+
426
+ ${t.join(`
427
+ `)}`:e,d=`Debug this error from job "${n||"unknown"}" in queue "${r||"unknown"}":
428
+
429
+ ${h}
430
+
431
+ Help me understand what caused this error and how to fix it.`,m=`https://cursor.com/link/prompt?text=${encodeURIComponent(d)}`;window.open(m,"_blank")};return g.jsxs("div",{className:"flex flex-col h-full overflow-hidden border border-status-error/30 bg-status-error/5",children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-status-error/30 px-4 py-2 shrink-0",children:[g.jsx("span",{className:"font-medium text-status-error",children:e}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.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:[g.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:g.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"})}),g.jsx("span",{children:"Fix in Cursor"})]}),g.jsx("div",{className:"h-4 w-px bg-border"}),g.jsx("button",{type:"button",onClick:c,className:"rounded p-1.5 hover:bg-status-error/10",title:"Copy error",children:o?g.jsx(Vd,{className:"h-4 w-4 text-status-success"}):g.jsx(I0,{className:"h-4 w-4 text-muted-foreground"})}),t&&t.length>0&&g.jsx("button",{type:"button",onClick:()=>a(!i),className:"rounded p-1.5 hover:bg-status-error/10",title:i?"Collapse":"Expand",children:g.jsx(Sg,{className:ge("h-4 w-4 text-muted-foreground transition-transform",i&&"rotate-180")})})]})]}),i&&t&&t.length>0&&g.jsx("div",{className:"flex-1 overflow-auto p-4 min-h-0",children:g.jsx("pre",{className:"font-mono text-xs text-muted-foreground",children:t.join(`
432
+ `)})})]})}function dCe({logs:e,count:t}){const n=j.useRef(null),[r,i]=j.useState(!1);j.useEffect(()=>{const o=n.current;o&&(o.scrollTop=o.scrollHeight)},[e==null?void 0:e.length]);const a=async()=>{e!=null&&e.length&&(await navigator.clipboard.writeText(e.join(`
433
+ `)),i(!0),setTimeout(()=>i(!1),2e3))};return e!=null&&e.length?g.jsxs("div",{className:"flex flex-col overflow-hidden border bg-card",children:[g.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-2",children:[g.jsxs("span",{className:"text-sm text-muted-foreground",children:[t??e.length," log"," ",(t??e.length)===1?"entry":"entries"]}),g.jsxs("button",{type:"button",onClick:a,className:"inline-flex items-center gap-1.5 rounded px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:"Copy logs",children:[r?g.jsx(Vd,{className:"h-3.5 w-3.5 text-status-success"}):g.jsx(I0,{className:"h-3.5 w-3.5"}),"Copy"]})]}),g.jsx("div",{ref:n,className:"max-h-[calc(100vh-480px)] overflow-auto p-4",children:g.jsx("div",{className:"font-mono text-xs leading-relaxed text-foreground",children:e.map((o,s)=>g.jsxs("div",{className:"flex gap-3 whitespace-pre-wrap",children:[g.jsx("span",{className:"w-8 shrink-0 select-none text-right text-muted-foreground/60",children:s+1}),g.jsx("span",{children:o})]},s.toString()))})})]}):g.jsxs("div",{className:"flex h-32 flex-col items-center justify-center gap-2 border bg-card text-muted-foreground",children:[g.jsx(che,{className:"h-5 w-5"}),g.jsx("p",{className:"text-sm",children:"No logs yet"}),g.jsxs("p",{className:"text-xs",children:["Use ",g.jsx("code",{className:"font-mono",children:'await job.log("...")'})," ","in your worker"]})]})}function hCe({job:e}){const[t,n]=j.useState({root:!0,attempt:!0}),{spans:r,timeRange:i}=j.useMemo(()=>{var m,v,x,w;const c=e.timestamp,f=e.finishedOn||e.processedOn||Date.now(),h=f-c,d={id:"root",label:e.name,icon:e.status==="completed"?Qo:e.status==="failed"?_g:om,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=d.children)==null||m.push({id:"wait",label:"Queued",icon:Pi,iconColor:"text-muted-foreground",startTime:e.timestamp,endTime:e.processedOn,status:"waiting"})),e.processedOn){const b={id:"exec",label:"run()",icon:om,iconColor:"text-blue-500",startTime:e.processedOn,endTime:e.finishedOn,status:e.status==="completed"?"success":e.status==="failed"?"error":"running",badge:e.duration?Lr(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)(v=b.children)==null||v.push({id:`log-${b.children.length}`,label:E.message,icon:ohe,iconColor:"text-blue-400",startTime:E.time||e.processedOn,status:"success",isLog:!0})}e.status==="failed"&&e.failedReason&&((x=b.children)==null||x.push({id:"error",label:e.failedReason,icon:Va,iconColor:"text-status-error",startTime:e.finishedOn||e.processedOn,status:"error",isLog:!0})),(w=d.children)==null||w.push(b)}return{spans:[d],timeRange:{start:c,end:f,duration:h}}},[e]),a=c=>{n(f=>({...f,[c]:!f[c]}))},o=j.useMemo(()=>{const{duration:c}=i,f=[],h=5;for(let d=0;d<=h;d++){const m=c/h*d,v=m/c*100;f.push({position:v,label:Lr(m)})}return f},[i]),s=(c,f=0)=>{var b;const h=c.children&&c.children.length>0,d=t[c.id]!==!1,m=c.icon,v=(c.startTime-i.start)/i.duration*100,x=c.endTime?(c.endTime-i.start)/i.duration*100:100,w=Math.max(x-v,.5);return g.jsxs(j.Fragment,{children:[g.jsxs("div",{className:"group flex min-h-[36px] items-center border-b border-border/50 hover:bg-muted/30",children:[g.jsxs("div",{className:"flex w-[45%] min-w-0 items-center gap-1 py-2 pr-4",style:{paddingLeft:`${f*20+12}px`},children:[h?g.jsx("button",{type:"button",onClick:()=>a(c.id),className:"flex h-5 w-5 shrink-0 items-center justify-center rounded hover:bg-muted",children:g.jsx(rd,{className:ge("h-3.5 w-3.5 text-muted-foreground transition-transform",d&&"rotate-90")})}):g.jsx("div",{className:"w-5 shrink-0"}),g.jsx(m,{className:ge("h-4 w-4 shrink-0",c.iconColor)}),g.jsx("span",{className:ge("truncate text-sm",c.isLog?"text-muted-foreground":"font-medium"),children:c.label}),c.badge&&g.jsx("span",{className:"ml-2 shrink-0 rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:c.badge})]}),g.jsx("div",{className:"relative h-full flex-1 py-2 pr-4",children:c.isLog?g.jsx("div",{className:"absolute top-1/2 h-2 w-2 -translate-y-1/2 rounded-full bg-muted-foreground/40",style:{left:`${v}%`}}):g.jsx("div",{className:ge("absolute top-1/2 h-5 -translate-y-1/2 ",c.status==="success"&&"bg-status-success",c.status==="error"&&"bg-status-error",c.status==="running"&&"bg-status-warning",c.status==="waiting"&&"bg-muted-foreground/30"),style:{left:`${v}%`,width:`${w}%`,minWidth:"2px"},children:w>8&&c.endTime&&g.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-[10px] font-medium text-white",children:Lr(c.endTime-c.startTime)})})})]}),h&&d&&((b=c.children)==null?void 0:b.map(S=>s(S,f+1)))]},c.id)};return g.jsxs("div",{className:"flex flex-col border bg-card overflow-hidden h-full",children:[g.jsxs("div",{className:"flex border-b bg-muted/30 shrink-0",children:[g.jsx("div",{className:"w-[45%] shrink-0 flex items-center py-2 pr-4",style:{paddingLeft:"12px"},children:g.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Span"})}),g.jsx("div",{className:"relative flex-1 py-2 pr-4 flex items-center",children:o.map((c,f)=>g.jsx("span",{className:"absolute font-mono text-[10px] text-muted-foreground",style:{left:`${c.position}%`,transform:f===0?"translateX(0)":f===o.length-1?"translateX(-100%)":"translateX(-50%)"},children:c.label},f.toString()))})]}),g.jsx("div",{className:"flex-1 overflow-auto min-h-0",children:r.map(c=>s(c))})]})}function pCe({attemptsMade:e,maxAttempts:t,stacktraces:n,status:r}){return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center gap-4 border bg-muted/30 px-4 py-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(h2,{className:"h-4 w-4 text-amber-500"}),g.jsx("span",{className:"font-medium",children:"Retry History"})]}),g.jsxs("div",{className:"text-sm text-muted-foreground",children:[e," of ",t," attempts"]}),g.jsx(Un,{variant:r==="completed"?"default":"destructive",className:"ml-auto",children:r==="completed"?"Eventually succeeded":"All attempts failed"})]}),g.jsx("div",{className:"space-y-3",children:n.map((i,a)=>g.jsx(mCe,{attemptNumber:a+1,isLast:a===n.length-1,stacktrace:i,succeeded:r==="completed"&&a===n.length-1},a.toString()))})]})}function mCe({attemptNumber:e,isLast:t,stacktrace:n,succeeded:r}){const[i,a]=j.useState(t),o=n.split(`
434
+ `)[0]||"Unknown error";return g.jsxs("div",{className:ge("overflow-hidden border",r?"border-status-success/30 bg-status-success/5":"border-status-error/30 bg-status-error/5"),children:[g.jsxs("button",{type:"button",onClick:()=>a(!i),className:"flex w-full items-center gap-3 px-4 py-2.5 text-left",children:[g.jsx("div",{className:ge("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}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("span",{className:"text-sm font-medium",children:["Attempt ",e]}),r?g.jsx(Un,{variant:"secondary",className:"bg-status-success/10 text-status-success text-[10px]",children:"Success"}):g.jsx(Un,{variant:"secondary",className:"bg-status-error/10 text-status-error text-[10px]",children:"Failed"})]}),!r&&g.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o})]}),g.jsx(Sg,{className:ge("h-4 w-4 text-muted-foreground transition-transform",i&&"rotate-180")})]}),i&&!r&&g.jsx("div",{className:"border-t border-inherit px-4 py-3",children:g.jsx("pre",{className:"max-h-48 overflow-auto font-mono text-xs text-muted-foreground whitespace-pre-wrap",children:n})}),i&&r&&g.jsx("div",{className:"border-t border-inherit px-4 py-3 text-sm text-status-success",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(Qo,{className:"h-4 w-4"}),"Job completed successfully on this attempt"]})})]})}function gCe({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,s=24,c=e.map((w,b)=>{const S=b/(e.length-1)*o,E=s-(w-i)/a*s;return`${S},${E}`}),f=`M ${c.join(" L ")}`,h=[`0,${s}`,...c,`${o},${s}`].join(" "),d={default:"text-chart-1",success:"text-chart-success",danger:"text-chart-error",warning:"text-chart-4"}[n],m=`sparkline-${n}-pattern`,v={default:"fill-chart-1",success:"fill-chart-success",danger:"fill-chart-error",warning:"fill-chart-4"}[n],x={default:"stroke-chart-1",success:"stroke-chart-success",danger:"stroke-chart-error",warning:"stroke-chart-4"}[n];return g.jsxs("svg",{viewBox:`0 0 ${o} ${s}`,className:ge("w-20 h-6",t),preserveAspectRatio:"none",children:[g.jsx("defs",{children:g.jsxs("pattern",{id:m,x:"0",y:"0",width:"4",height:"4",patternUnits:"userSpaceOnUse",children:[g.jsx("rect",{width:"4",height:"4",className:ge(v,"opacity-15")}),g.jsx("path",{d:"M0,0 L4,4 M-1,3 L3,7 M-1,-1 L5,5",className:x,strokeWidth:"0.75",opacity:"0.4"})]})}),g.jsx("polygon",{points:h,fill:`url(#${m})`}),g.jsx("path",{d:f,fill:"none",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:ge("stroke-current",d)})]})}function vCe({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?g.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[g.jsx($K,{className:"h-3 w-3 mr-0.5"}),"0%"]}):g.jsxs("span",{className:ge("inline-flex items-center text-xs font-medium",o?"text-chart-success":"text-chart-error"),children:[i?g.jsx(kK,{className:"h-3 w-3 mr-0.5"}):g.jsx(PK,{className:"h-3 w-3 mr-0.5"}),Math.abs(r).toFixed(0),"%"]})}function fl({title:e,value:t,subtitle:n,sparklineData:r,sparklineColor:i="default",trend:a,className:o,icon:s}){return g.jsxs("div",{className:ge("border border-dashed bg-card p-4 flex flex-col gap-2",o),children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:e}),s&&g.jsx("span",{className:"text-muted-foreground",children:s})]}),g.jsxs("div",{className:"flex items-end justify-between gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:t}),n&&g.jsx("span",{className:"text-xs text-muted-foreground",children:n}),a&&g.jsx(vCe,{current:a.current,previous:a.previous,higherIsBetter:a.higherIsBetter})]}),r&&r.length>0&&g.jsx(gCe,{data:r,color:i})]})]})}var yCe=FZ();const ki=Ct(yCe);var RN,YV;function bCe(){if(YV)return RN;YV=1;function e(t){return t==null}return RN=e,RN}var xCe=bCe();const dt=Ct(xCe);var wCe=QZ();const tu=Ct(wCe);var SCe=Qd();const tt=Ct(SCe);var _Ce=wr();const rh=Ct(_Ce);var PN={exports:{}},jt={};/**
435
+ * @license React
436
+ * react-is.production.min.js
437
+ *
438
+ * Copyright (c) Facebook, Inc. and its affiliates.
439
+ *
440
+ * This source code is licensed under the MIT license found in the
441
+ * LICENSE file in the root directory of this source tree.
442
+ */var XV;function ECe(){if(XV)return jt;XV=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"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),x;x=Symbol.for("react.module.reference");function w(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 h:return b;default:switch(b=b&&b.$$typeof,b){case s:case o:case c:case m:case d:case a:return b;default:return S}}case t:return S}}}return jt.ContextConsumer=o,jt.ContextProvider=a,jt.Element=e,jt.ForwardRef=c,jt.Fragment=n,jt.Lazy=m,jt.Memo=d,jt.Portal=t,jt.Profiler=i,jt.StrictMode=r,jt.Suspense=f,jt.SuspenseList=h,jt.isAsyncMode=function(){return!1},jt.isConcurrentMode=function(){return!1},jt.isContextConsumer=function(b){return w(b)===o},jt.isContextProvider=function(b){return w(b)===a},jt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},jt.isForwardRef=function(b){return w(b)===c},jt.isFragment=function(b){return w(b)===n},jt.isLazy=function(b){return w(b)===m},jt.isMemo=function(b){return w(b)===d},jt.isPortal=function(b){return w(b)===t},jt.isProfiler=function(b){return w(b)===i},jt.isStrictMode=function(b){return w(b)===r},jt.isSuspense=function(b){return w(b)===f},jt.isSuspenseList=function(b){return w(b)===h},jt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===f||b===h||b===v||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===d||b.$$typeof===a||b.$$typeof===o||b.$$typeof===c||b.$$typeof===x||b.getModuleId!==void 0)},jt.typeOf=w,jt}var QV;function ACe(){return QV||(QV=1,PN.exports=ECe()),PN.exports}var CCe=ACe(),kN,ZV;function NJ(){if(ZV)return kN;ZV=1;var e=ts(),t=qi(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return kN=r,kN}var DN,JV;function TCe(){if(JV)return DN;JV=1;var e=NJ();function t(n){return e(n)&&n!=+n}return DN=t,DN}var jCe=TCe();const ih=Ct(jCe);var NCe=NJ();const OCe=Ct(NCe);var oa=function(t){return t===0?0:t>0?1:-1},vc=function(t){return tu(t)&&t.indexOf("%")===t.length-1},_e=function(t){return OCe(t)&&!ih(t)},MCe=function(t){return dt(t)},kn=function(t){return _e(t)||tu(t)},RCe=0,Vg=function(t){var n=++RCe;return"".concat(t||"").concat(n)},nu=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(vc(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return ih(a)&&(a=r),i&&a>n&&(a=n),a},Qs=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},PCe=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},Oi=function(t,n){return _e(t)&&_e(n)?function(r){return t+r*(n-t)}:function(){return n}};function gx(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ki(r,t))===n})}var kCe=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 Pf(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 WM(e){"@babel/helpers - typeof";return WM=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},WM(e)}var DCe=["viewBox","children"],ICe=["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"],eU=["points","pathLength"],IN={svg:DCe,polygon:eU,polyline:eU},gk=["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"],vx=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(j.isValidElement(t)&&(r=t.props),!rh(r))return null;var i={};return Object.keys(r).forEach(function(a){gk.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},LCe=function(t,n,r){return function(i){return t(n,r,i),null}},yx=function(t,n,r){if(!rh(t)||WM(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];gk.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=LCe(o,n,r))}),i},$Ce=["children"],BCe=["children"];function tU(e,t){if(e==null)return{};var n=qCe(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 qCe(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 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)}var nU={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"},Io=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},rU=null,LN=null,vk=function e(t){if(t===rU&&Array.isArray(LN))return LN;var n=[];return j.Children.forEach(t,function(r){dt(r)||(CCe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),LN=n,rU=t,n};function sa(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Io(i)}):r=[Io(t)],vk(e).forEach(function(i){var a=ki(i,"type.displayName")||ki(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function Zr(e,t){var n=sa(e,t);return n&&n[0]}var iU=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)},zCe=["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"],FCe=function(t){return t&&t.type&&tu(t.type)&&zCe.indexOf(t.type)>=0},VCe=function(t){return t&&YM(t)==="object"&&"clipDot"in t},UCe=function(t,n,r,i){var a,o=(a=IN==null?void 0:IN[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!tt(t)&&(i&&o.includes(n)||ICe.includes(n))||r&&gk.includes(n)},ct=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(j.isValidElement(t)&&(i=t.props),!rh(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;UCe((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},XM=function e(t,n){if(t===n)return!0;var r=j.Children.count(t);if(r!==j.Children.count(n))return!1;if(r===0)return!0;if(r===1)return aU(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(!aU(a,o))return!1}return!0},aU=function(t,n){if(dt(t)&&dt(n))return!0;if(!dt(t)&&!dt(n)){var r=t.props||{},i=r.children,a=tU(r,$Ce),o=n.props||{},s=o.children,c=tU(o,BCe);return i&&s?Pf(a,c)&&XM(i,s):!i&&!s?Pf(a,c):!1}return!1},oU=function(t,n){var r=[],i={};return vk(t).forEach(function(a,o){if(FCe(a))r.push(a);else if(a){var s=Io(a.type),c=n[s]||{},f=c.handler,h=c.once;if(f&&(!h||!i[s])){var d=f(a,s,o);r.push(d),i[s]=!0}}}),r},HCe=function(t){var n=t&&t.type;return n&&nU[n]?nU[n]:null},GCe=function(t,n){return vk(n).indexOf(t)},KCe=["children","width","height","viewBox","className","style","title","desc"];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 WCe(e,t){if(e==null)return{};var n=YCe(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 YCe(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 ZM(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,c=e.desc,f=WCe(e,KCe),h=i||{width:n,height:r,x:0,y:0},d=gt("recharts-surface",a);return Z.createElement("svg",QM({},ct(f,!0,"svg"),{className:d,width:n,height:r,style:o,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),Z.createElement("title",null,s),Z.createElement("desc",null,c),t)}var XCe=["children","className"];function JM(){return JM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JM.apply(this,arguments)}function QCe(e,t){if(e==null)return{};var n=ZCe(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 ZCe(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 on=Z.forwardRef(function(e,t){var n=e.children,r=e.className,i=QCe(e,XCe),a=gt("recharts-layer",r);return Z.createElement("g",JM({className:a},ct(i,!0),{ref:t}),n)}),Lo=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]},$N,sU;function JCe(){if(sU)return $N;sU=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 $N=e,$N}var BN,lU;function eTe(){if(lU)return BN;lU=1;var e=JCe();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 BN=t,BN}var qN,cU;function tTe(){if(cU)return qN;cU=1;function e(t){return t.split("")}return qN=e,qN}var zN,uU;function nTe(){if(uU)return zN;uU=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",s="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",f="(?:"+s+"|"+c+")",h="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",x=f+"?",w="["+a+"]?",b="(?:"+v+"(?:"+[h,d,m].join("|")+")"+w+x+")*",S=w+x+b,E="(?:"+[h+s+"?",s,d,m,o].join("|")+")",_=RegExp(c+"(?="+c+")|"+E+S,"g");function A(C){return C.match(_)||[]}return zN=A,zN}var FN,fU;function rTe(){if(fU)return FN;fU=1;var e=tTe(),t=hk(),n=nTe();function r(i){return t(i)?n(i):e(i)}return FN=r,FN}var VN,dU;function iTe(){if(dU)return VN;dU=1;var e=eTe(),t=hk(),n=rTe(),r=fk();function i(a){return function(o){o=r(o);var s=t(o)?n(o):void 0,c=s?s[0]:o.charAt(0),f=s?e(s,1).join(""):o.slice(1);return c[a]()+f}}return VN=i,VN}var UN,hU;function aTe(){if(hU)return UN;hU=1;var e=iTe(),t=e("toUpperCase");return UN=t,UN}var oTe=aTe();const Pw=Ct(oTe);function Ut(e){return function(){return e}}const OJ=Math.cos,bx=Math.sin,ga=Math.sqrt,xx=Math.PI,kw=2*xx,eR=Math.PI,tR=2*eR,uc=1e-6,sTe=tR-uc;function MJ(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function lTe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return MJ;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 cTe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?MJ:lTe(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,s=this._y1,c=r-t,f=i-n,h=o-t,d=s-n,m=h*h+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(m>uc)if(!(Math.abs(d*c-f*h)>uc)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-o,x=i-s,w=c*c+f*f,b=v*v+x*x,S=Math.sqrt(w),E=Math.sqrt(m),_=a*Math.tan((eR-Math.acos((w+m-b)/(2*S*E)))/2),A=_/E,C=_/S;Math.abs(A-1)>uc&&this._append`L${t+A*h},${n+A*d}`,this._append`A${a},${a},0,0,${+(d*v>h*x)},${this._x1=t+C*c},${this._y1=n+C*f}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),f=t+s,h=n+c,d=1^o,m=o?i-a:a-i;this._x1===null?this._append`M${f},${h}`:(Math.abs(this._x1-f)>uc||Math.abs(this._y1-h)>uc)&&this._append`L${f},${h}`,r&&(m<0&&(m=m%tR+tR),m>sTe?this._append`A${r},${r},0,1,${d},${t-s},${n-c}A${r},${r},0,1,${d},${this._x1=f},${this._y1=h}`:m>uc&&this._append`A${r},${r},0,${+(m>=eR)},${d},${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 yk(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 cTe(t)}function bk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function RJ(e){this._context=e}RJ.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 Dw(e){return new RJ(e)}function PJ(e){return e[0]}function kJ(e){return e[1]}function DJ(e,t){var n=Ut(!0),r=null,i=Dw,a=null,o=yk(s);e=typeof e=="function"?e:e===void 0?PJ:Ut(e),t=typeof t=="function"?t:t===void 0?kJ:Ut(t);function s(c){var f,h=(c=bk(c)).length,d,m=!1,v;for(r==null&&(a=i(v=o())),f=0;f<=h;++f)!(f<h&&n(d=c[f],f,c))===m&&((m=!m)?a.lineStart():a.lineEnd()),m&&a.point(+e(d,f,c),+t(d,f,c));if(v)return a=null,v+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ut(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ut(+c),s):t},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ut(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),s):r},s}function zy(e,t,n){var r=null,i=Ut(!0),a=null,o=Dw,s=null,c=yk(f);e=typeof e=="function"?e:e===void 0?PJ:Ut(+e),t=typeof t=="function"?t:Ut(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?kJ:Ut(+n);function f(d){var m,v,x,w=(d=bk(d)).length,b,S=!1,E,_=new Array(w),A=new Array(w);for(a==null&&(s=o(E=c())),m=0;m<=w;++m){if(!(m<w&&i(b=d[m],m,d))===S)if(S=!S)v=m,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),x=m-1;x>=v;--x)s.point(_[x],A[x]);s.lineEnd(),s.areaEnd()}S&&(_[m]=+e(b,m,d),A[m]=+t(b,m,d),s.point(r?+r(b,m,d):_[m],n?+n(b,m,d):A[m]))}if(E)return s=null,E+""||null}function h(){return DJ().defined(i).curve(o).context(a)}return f.x=function(d){return arguments.length?(e=typeof d=="function"?d:Ut(+d),r=null,f):e},f.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Ut(+d),f):e},f.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Ut(+d),f):r},f.y=function(d){return arguments.length?(t=typeof d=="function"?d:Ut(+d),n=null,f):t},f.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Ut(+d),f):t},f.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Ut(+d),f):n},f.lineX0=f.lineY0=function(){return h().x(e).y(t)},f.lineY1=function(){return h().x(e).y(n)},f.lineX1=function(){return h().x(r).y(t)},f.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Ut(!!d),f):i},f.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),f):o},f.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),f):a},f}class IJ{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 uTe(e){return new IJ(e,!0)}function fTe(e){return new IJ(e,!1)}const xk={draw(e,t){const n=ga(t/xx);e.moveTo(n,0),e.arc(0,0,n,0,kw)}},dTe={draw(e,t){const n=ga(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()}},LJ=ga(1/3),hTe=LJ*2,pTe={draw(e,t){const n=ga(t/hTe),r=n*LJ;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},mTe={draw(e,t){const n=ga(t),r=-n/2;e.rect(r,r,n,n)}},gTe=.8908130915292852,$J=bx(xx/10)/bx(7*xx/10),vTe=bx(kw/10)*$J,yTe=-OJ(kw/10)*$J,bTe={draw(e,t){const n=ga(t*gTe),r=vTe*n,i=yTe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=kw*a/5,s=OJ(o),c=bx(o);e.lineTo(c*n,-s*n),e.lineTo(s*r-c*i,c*r+s*i)}e.closePath()}},HN=ga(3),xTe={draw(e,t){const n=-ga(t/(HN*3));e.moveTo(0,n*2),e.lineTo(-HN*n,-n),e.lineTo(HN*n,-n),e.closePath()}},_i=-.5,Ei=ga(3)/2,nR=1/ga(12),wTe=(nR/2+1)*3,STe={draw(e,t){const n=ga(t/wTe),r=n/2,i=n*nR,a=r,o=n*nR+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(_i*r-Ei*i,Ei*r+_i*i),e.lineTo(_i*a-Ei*o,Ei*a+_i*o),e.lineTo(_i*s-Ei*c,Ei*s+_i*c),e.lineTo(_i*r+Ei*i,_i*i-Ei*r),e.lineTo(_i*a+Ei*o,_i*o-Ei*a),e.lineTo(_i*s+Ei*c,_i*c-Ei*s),e.closePath()}};function _Te(e,t){let n=null,r=yk(i);e=typeof e=="function"?e:Ut(e||xk),t=typeof t=="function"?t:Ut(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:Ut(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ut(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function wx(){}function Sx(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 BJ(e){this._context=e}BJ.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:Sx(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:Sx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ETe(e){return new BJ(e)}function qJ(e){this._context=e}qJ.prototype={areaStart:wx,areaEnd:wx,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:Sx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ATe(e){return new qJ(e)}function zJ(e){this._context=e}zJ.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:Sx(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function CTe(e){return new zJ(e)}function FJ(e){this._context=e}FJ.prototype={areaStart:wx,areaEnd:wx,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 TTe(e){return new FJ(e)}function pU(e){return e<0?-1:1}function mU(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),s=(a*i+o*r)/(r+i);return(pU(a)+pU(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function gU(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function GN(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function _x(e){this._context=e}_x.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:GN(this,this._t0,gU(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,GN(this,gU(this,n=mU(this,e,t)),n);break;default:GN(this,this._t0,n=mU(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function VJ(e){this._context=new UJ(e)}(VJ.prototype=Object.create(_x.prototype)).point=function(e,t){_x.prototype.point.call(this,t,e)};function UJ(e){this._context=e}UJ.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 jTe(e){return new _x(e)}function NTe(e){return new VJ(e)}function HJ(e){this._context=e}HJ.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=vU(e),i=vU(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 vU(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 OTe(e){return new HJ(e)}function Iw(e,t){this._context=e,this._t=t}Iw.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 MTe(e){return new Iw(e,.5)}function RTe(e){return new Iw(e,0)}function PTe(e){return new Iw(e,1)}function hd(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function rR(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function kTe(e,t){return e[t]}function DTe(e){const t=[];return t.key=e,t}function ITe(){var e=Ut([]),t=rR,n=hd,r=kTe;function i(a){var o=Array.from(e.apply(this,arguments),DTe),s,c=o.length,f=-1,h;for(const d of a)for(s=0,++f;s<c;++s)(o[s][f]=[0,+r(d,o[s].key,f,a)]).data=d;for(s=0,h=bk(t(o));s<c;++s)o[h[s]].index=s;return n(o,h),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ut(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:Ut(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?rR:typeof a=="function"?a:Ut(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??hd,i):n},i}function LTe(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}hd(e,t)}}function $Te(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,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}hd(e,t)}}function BTe(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 s=0,c=0,f=0;s<o;++s){for(var h=e[t[s]],d=h[r][1]||0,m=h[r-1][1]||0,v=(d-m)/2,x=0;x<s;++x){var w=e[t[x]],b=w[r][1]||0,S=w[r-1][1]||0;v+=b-S}c+=d,f+=v*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=f/c)}i[r-1][1]+=i[r-1][0]=n,hd(e,t)}}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)}var qTe=["type","size","sizeType"];function iR(){return iR=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},iR.apply(this,arguments)}function yU(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 bU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yU(Object(n),!0).forEach(function(r){zTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zTe(e,t,n){return t=FTe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FTe(e){var t=VTe(e,"string");return Sm(t)=="symbol"?t:t+""}function VTe(e,t){if(Sm(e)!="object"||!e)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)}function UTe(e,t){if(e==null)return{};var n=HTe(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 HTe(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 GJ={symbolCircle:xk,symbolCross:dTe,symbolDiamond:pTe,symbolSquare:mTe,symbolStar:bTe,symbolTriangle:xTe,symbolWye:STe},GTe=Math.PI/180,KTe=function(t){var n="symbol".concat(Pw(t));return GJ[n]||xk},WTe=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*GTe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},YTe=function(t,n){GJ["symbol".concat(Pw(t))]=n},wk=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,c=UTe(t,qTe),f=bU(bU({},c),{},{type:r,size:a,sizeType:s}),h=function(){var b=KTe(r),S=_Te().type(b).size(WTe(a,s,r));return S()},d=f.className,m=f.cx,v=f.cy,x=ct(f,!0);return m===+m&&v===+v&&a===+a?Z.createElement("path",iR({},x,{className:gt("recharts-symbols",d),transform:"translate(".concat(m,", ").concat(v,")"),d:h()})):null};wk.registerSymbol=YTe;function pd(e){"@babel/helpers - typeof";return pd=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},pd(e)}function aR(){return aR=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},aR.apply(this,arguments)}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 XTe(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){_m(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 QTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZTe(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 JTe(e,t,n){return t&&ZTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function eje(e,t,n){return t=Ex(t),tje(e,KJ()?Reflect.construct(t,n||[],Ex(e).constructor):t.apply(e,n))}function tje(e,t){if(t&&(pd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nje(e)}function nje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KJ=function(){return!!e})()}function Ex(e){return Ex=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ex(e)}function rje(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&&oR(e,t)}function oR(e,t){return oR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},oR(e,t)}function _m(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=ije(e,"string");return pd(t)=="symbol"?t:t+""}function ije(e,t){if(pd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ai=32,Sk=(function(e){function t(){return QTe(this,t),eje(this,t,arguments)}return rje(t,e),JTe(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=Ai/2,o=Ai/6,s=Ai/3,c=r.inactive?i:r.color;if(r.type==="plainline")return Z.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:Ai,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return Z.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(s,`
443
+ A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(a,`
444
+ H`).concat(Ai,"M").concat(2*s,",").concat(a,`
445
+ A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return Z.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Ai/8,"h").concat(Ai,"v").concat(Ai*3/4,"h").concat(-Ai,"z"),className:"recharts-legend-icon"});if(Z.isValidElement(r.legendIcon)){var f=XTe({},r);return delete f.legendIcon,Z.cloneElement(r.legendIcon,f)}return Z.createElement(wk,{fill:c,cx:a,cy:a,size:Ai,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,o=i.iconSize,s=i.layout,c=i.formatter,f=i.inactiveColor,h={x:0,y:0,width:Ai,height:Ai},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(v,x){var w=v.formatter||c,b=gt(_m(_m({"recharts-legend-item":!0},"legend-item-".concat(x),!0),"inactive",v.inactive));if(v.type==="none")return null;var S=tt(v.value)?null:v.value;Lo(!tt(v.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var E=v.inactive?f:v.color;return Z.createElement("li",aR({className:b,style:d,key:"legend-item-".concat(x)},yx(r.props,v,x)),Z.createElement(ZM,{width:o,height:o,viewBox:h,style:m},r.renderIcon(v)),Z.createElement("span",{className:"recharts-legend-item-text",style:{color:E}},w?w(S,v,x):S))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return Z.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])})(j.PureComponent);_m(Sk,"displayName","Legend");_m(Sk,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var KN,wU;function aje(){if(wU)return KN;wU=1;var e=zi(),t=tJ();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return KN=n,KN}var oje=aje();const SU=Ct(oje);function YJ(e,t,n){return t===!0?SU(e,n):tt(t)?SU(e,t):e}function md(e){"@babel/helpers - typeof";return md=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},md(e)}var sje=["ref"];function _U(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 So(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_U(Object(n),!0).forEach(function(r){Lw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_U(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QJ(r.key),r)}}function cje(e,t,n){return t&&EU(e.prototype,t),n&&EU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function uje(e,t,n){return t=Ax(t),fje(e,XJ()?Reflect.construct(t,n||[],Ax(e).constructor):t.apply(e,n))}function fje(e,t){if(t&&(md(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dje(e)}function dje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XJ=function(){return!!e})()}function Ax(e){return Ax=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ax(e)}function hje(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&&sR(e,t)}function sR(e,t){return sR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sR(e,t)}function Lw(e,t,n){return t=QJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QJ(e){var t=pje(e,"string");return md(t)=="symbol"?t:t+""}function pje(e,t){if(md(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(md(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function mje(e,t){if(e==null)return{};var n=gje(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 gje(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 vje(e){return e.value}function yje(e,t){if(Z.isValidElement(e))return Z.cloneElement(e,t);if(typeof e=="function")return Z.createElement(e,t);t.ref;var n=mje(t,sje);return Z.createElement(Sk,n)}var AU=1,$o=(function(e){function t(){var n;lje(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=uje(this,t,[].concat(i)),Lw(n,"lastBoundingBox",{width:-1,height:-1}),n}return hje(t,e),cje(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)>AU||Math.abs(i.height-this.lastBoundingBox.height)>AU)&&(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?So({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,c=i.margin,f=i.chartWidth,h=i.chartHeight,d,m;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();d={left:((f||0)-v.width)/2}}else d=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var x=this.getBBoxSnapshot();m={top:((h||0)-x.height)/2}}else m=s==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return So(So({},d),m)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,s=i.height,c=i.wrapperStyle,f=i.payloadUniqBy,h=i.payload,d=So(So({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(c)),c);return Z.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(v){r.wrapperNode=v}},yje(a,So(So({},this.props),{},{payload:YJ(h,f,vje)})))}}],[{key:"getWithHeight",value:function(r,i){var a=So(So({},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}}])})(j.PureComponent);Lw($o,"displayName","Legend");Lw($o,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var bje=_J();const _k=Ct(bje);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 lR(){return lR=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},lR.apply(this,arguments)}function xje(e,t){return Eje(e)||_je(e,t)||Sje(e,t)||wje()}function wje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
446
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Sje(e,t){if(e){if(typeof e=="string")return CU(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 CU(e,t)}}function CU(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _je(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function Eje(e){if(Array.isArray(e))return e}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 WN(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){Aje(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 Aje(e,t,n){return t=Cje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cje(e){var t=Tje(e,"string");return Em(t)=="symbol"?t:t+""}function Tje(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 jje(e){return Array.isArray(e)&&kn(e[0])&&kn(e[1])?e.join(" ~ "):e}var Nje=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,s=o===void 0?{}:o,c=t.labelStyle,f=c===void 0?{}:c,h=t.payload,d=t.formatter,m=t.itemSorter,v=t.wrapperClassName,x=t.labelClassName,w=t.label,b=t.labelFormatter,S=t.accessibilityLayer,E=S===void 0?!1:S,_=function(){if(h&&h.length){var D={padding:0,margin:0},F=(m?_k(h,m):h).map(function(I,q){if(I.type==="none")return null;var k=WN({display:"block",paddingTop:4,paddingBottom:4,color:I.color||"#000"},s),z=I.formatter||d||jje,H=I.value,G=I.name,Q=H,U=G;if(z&&Q!=null&&U!=null){var V=z(H,G,I,q,h);if(Array.isArray(V)){var X=xje(V,2);Q=X[0],U=X[1]}else Q=V}return Z.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(q),style:k},kn(U)?Z.createElement("span",{className:"recharts-tooltip-item-name"},U):null,kn(U)?Z.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,Z.createElement("span",{className:"recharts-tooltip-item-value"},Q),Z.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return Z.createElement("ul",{className:"recharts-tooltip-item-list",style:D},F)}return null},A=WN({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),C=WN({margin:0},f),N=!dt(w),M=N?w:"",R=gt("recharts-default-tooltip",v),P=gt("recharts-tooltip-label",x);N&&b&&h!==void 0&&h!==null&&(M=b(w,h));var $=E?{role:"status","aria-live":"assertive"}:{};return Z.createElement("div",lR({className:R,style:A},$),Z.createElement("p",{className:P,style:C},Z.isValidElement(M)?M:"".concat(M)),_())};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 Fy(e,t,n){return t=Oje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oje(e){var t=Mje(e,"string");return Am(t)=="symbol"?t:t+""}function Mje(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 mp="recharts-tooltip-wrapper",Rje={visibility:"hidden"};function Pje(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return gt(mp,Fy(Fy(Fy(Fy({},"".concat(mp,"-right"),_e(n)&&t&&_e(t.x)&&n>=t.x),"".concat(mp,"-left"),_e(n)&&t&&_e(t.x)&&n<t.x),"".concat(mp,"-bottom"),_e(r)&&t&&_e(t.y)&&r>=t.y),"".concat(mp,"-top"),_e(r)&&t&&_e(t.y)&&r<t.y))}function jU(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,f=e.viewBoxDimension;if(a&&_e(a[r]))return a[r];var h=n[r]-s-i,d=n[r]+i;if(t[r])return o[r]?h:d;if(o[r]){var m=h,v=c[r];return m<v?Math.max(d,c[r]):Math.max(h,c[r])}var x=d+s,w=c[r]+f;return x>w?Math.max(h,c[r]):Math.max(d,c[r])}function kje(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 Dje(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,c=e.viewBox,f,h,d;return o.height>0&&o.width>0&&n?(h=jU({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=jU({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),f=kje({translateX:h,translateY:d,useTranslate3d:s})):f=Rje,{cssProperties:f,cssClasses:Pje({translateX:h,translateY:d,coordinate:n})}}function gd(e){"@babel/helpers - typeof";return gd=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},gd(e)}function NU(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 OU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NU(Object(n),!0).forEach(function(r){uR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ije(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lje(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,JJ(r.key),r)}}function $je(e,t,n){return t&&Lje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bje(e,t,n){return t=Cx(t),qje(e,ZJ()?Reflect.construct(t,n||[],Cx(e).constructor):t.apply(e,n))}function qje(e,t){if(t&&(gd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zje(e)}function zje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZJ=function(){return!!e})()}function Cx(e){return Cx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cx(e)}function Fje(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&&cR(e,t)}function cR(e,t){return cR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cR(e,t)}function uR(e,t,n){return t=JJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JJ(e){var t=Vje(e,"string");return gd(t)=="symbol"?t:t+""}function Vje(e,t){if(gd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MU=1,Uje=(function(e){function t(){var n;Ije(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Bje(this,t,[].concat(i)),uR(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),uR(n,"handleKeyDown",function(o){if(o.key==="Escape"){var s,c,f,h;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(s=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&s!==void 0?s:0,y:(f=(h=n.props.coordinate)===null||h===void 0?void 0:h.y)!==null&&f!==void 0?f:0}})}}),n}return Fje(t,e),$je(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>MU||Math.abs(r.height-this.state.lastBoundingBox.height)>MU)&&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,s=i.animationDuration,c=i.animationEasing,f=i.children,h=i.coordinate,d=i.hasPayload,m=i.isAnimationActive,v=i.offset,x=i.position,w=i.reverseDirection,b=i.useTranslate3d,S=i.viewBox,E=i.wrapperStyle,_=Dje({allowEscapeViewBox:o,coordinate:h,offsetTopLeft:v,position:x,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:S}),A=_.cssClasses,C=_.cssProperties,N=OU(OU({transition:m&&a?"transform ".concat(s,"ms ").concat(c):void 0},C),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},E);return Z.createElement("div",{tabIndex:-1,className:A,style:N,ref:function(R){r.wrapperNode=R}},f)}}])})(j.PureComponent),Hje=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ah={isSsr:Hje()};function vd(e){"@babel/helpers - typeof";return vd=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},vd(e)}function RU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RU(Object(n),!0).forEach(function(r){Ek(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kje(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,tee(r.key),r)}}function Wje(e,t,n){return t&&Kje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Yje(e,t,n){return t=Tx(t),Xje(e,eee()?Reflect.construct(t,n||[],Tx(e).constructor):t.apply(e,n))}function Xje(e,t){if(t&&(vd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qje(e)}function Qje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eee=function(){return!!e})()}function Tx(e){return Tx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tx(e)}function Zje(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&&fR(e,t)}function fR(e,t){return fR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},fR(e,t)}function Ek(e,t,n){return t=tee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tee(e){var t=Jje(e,"string");return vd(t)=="symbol"?t:t+""}function Jje(e,t){if(vd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function eNe(e){return e.dataKey}function tNe(e,t){return Z.isValidElement(e)?Z.cloneElement(e,t):typeof e=="function"?Z.createElement(e,t):Z.createElement(Nje,t)}var Ti=(function(e){function t(){return Gje(this,t),Yje(this,t,arguments)}return Zje(t,e),Wje(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,c=i.animationEasing,f=i.content,h=i.coordinate,d=i.filterNull,m=i.isAnimationActive,v=i.offset,x=i.payload,w=i.payloadUniqBy,b=i.position,S=i.reverseDirection,E=i.useTranslate3d,_=i.viewBox,A=i.wrapperStyle,C=x??[];d&&C.length&&(C=YJ(x.filter(function(M){return M.value!=null&&(M.hide!==!0||r.props.includeHidden)}),w,eNe));var N=C.length>0;return Z.createElement(Uje,{allowEscapeViewBox:o,animationDuration:s,animationEasing:c,isAnimationActive:m,active:a,coordinate:h,hasPayload:N,offset:v,position:b,reverseDirection:S,useTranslate3d:E,viewBox:_,wrapperStyle:A},tNe(f,PU(PU({},this.props),{},{payload:C})))}}])})(j.PureComponent);Ek(Ti,"displayName","Tooltip");Ek(Ti,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ah.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 YN,kU;function nNe(){if(kU)return YN;kU=1;var e=wr(),t=wJ(),n=cJ(),r="Expected a function",i=Math.max,a=Math.min;function o(s,c,f){var h,d,m,v,x,w,b=0,S=!1,E=!1,_=!0;if(typeof s!="function")throw new TypeError(r);c=n(c)||0,e(f)&&(S=!!f.leading,E="maxWait"in f,m=E?i(n(f.maxWait)||0,c):m,_="trailing"in f?!!f.trailing:_);function A(F){var I=h,q=d;return h=d=void 0,b=F,v=s.apply(q,I),v}function C(F){return b=F,x=setTimeout(R,c),S?A(F):v}function N(F){var I=F-w,q=F-b,k=c-I;return E?a(k,m-q):k}function M(F){var I=F-w,q=F-b;return w===void 0||I>=c||I<0||E&&q>=m}function R(){var F=t();if(M(F))return P(F);x=setTimeout(R,N(F))}function P(F){return x=void 0,_&&h?A(F):(h=d=void 0,v)}function $(){x!==void 0&&clearTimeout(x),b=0,h=w=d=x=void 0}function L(){return x===void 0?v:P(t())}function D(){var F=t(),I=M(F);if(h=arguments,d=this,w=F,I){if(x===void 0)return C(w);if(E)return clearTimeout(x),x=setTimeout(R,c),A(w)}return x===void 0&&(x=setTimeout(R,c)),v}return D.cancel=$,D.flush=L,D}return YN=o,YN}var XN,DU;function rNe(){if(DU)return XN;DU=1;var e=nNe(),t=wr(),n="Expected a function";function r(i,a,o){var s=!0,c=!0;if(typeof i!="function")throw new TypeError(n);return t(o)&&(s="leading"in o?!!o.leading:s,c="trailing"in o?!!o.trailing:c),e(i,a,{leading:s,maxWait:a,trailing:c})}return XN=r,XN}var iNe=rNe();const nee=Ct(iNe);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)}function IU(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 Vy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IU(Object(n),!0).forEach(function(r){aNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aNe(e,t,n){return t=oNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oNe(e){var t=sNe(e,"string");return Cm(t)=="symbol"?t:t+""}function sNe(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 lNe(e,t){return dNe(e)||fNe(e,t)||uNe(e,t)||cNe()}function cNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
447
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uNe(e,t){if(e){if(typeof e=="string")return LU(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 LU(e,t)}}function LU(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 fNe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function dNe(e){if(Array.isArray(e))return e}var hNe=j.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?"100%":a,s=e.height,c=s===void 0?"100%":s,f=e.minWidth,h=f===void 0?0:f,d=e.minHeight,m=e.maxHeight,v=e.children,x=e.debounce,w=x===void 0?0:x,b=e.id,S=e.className,E=e.onResize,_=e.style,A=_===void 0?{}:_,C=j.useRef(null),N=j.useRef();N.current=E,j.useImperativeHandle(t,function(){return Object.defineProperty(C.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),C.current},configurable:!0})});var M=j.useState({containerWidth:i.width,containerHeight:i.height}),R=lNe(M,2),P=R[0],$=R[1],L=j.useCallback(function(F,I){$(function(q){var k=Math.round(F),z=Math.round(I);return q.containerWidth===k&&q.containerHeight===z?q:{containerWidth:k,containerHeight:z}})},[]);j.useEffect(function(){var F=function(G){var Q,U=G[0].contentRect,V=U.width,X=U.height;L(V,X),(Q=N.current)===null||Q===void 0||Q.call(N,V,X)};w>0&&(F=nee(F,w,{trailing:!0,leading:!1}));var I=new ResizeObserver(F),q=C.current.getBoundingClientRect(),k=q.width,z=q.height;return L(k,z),I.observe(C.current),function(){I.disconnect()}},[L,w]);var D=j.useMemo(function(){var F=P.containerWidth,I=P.containerHeight;if(F<0||I<0)return null;Lo(vc(o)||vc(c),`The width(%s) and height(%s) are both fixed numbers,
448
+ maybe you don't need to use a ResponsiveContainer.`,o,c),Lo(!n||n>0,"The aspect(%s) must be greater than zero.",n);var q=vc(o)?F:o,k=vc(c)?I:c;n&&n>0&&(q?k=q/n:k&&(q=k*n),m&&k>m&&(k=m)),Lo(q>0||k>0,`The width(%s) and height(%s) of chart should be greater than 0,
449
+ please check the style of container, or the props width(%s) and height(%s),
450
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
451
+ height and width.`,q,k,o,c,h,d,n);var z=!Array.isArray(v)&&Io(v.type).endsWith("Chart");return Z.Children.map(v,function(H){return Z.isValidElement(H)?j.cloneElement(H,Vy({width:q,height:k},z?{style:Vy({height:"100%",width:"100%",maxHeight:k,maxWidth:q},H.props.style)}:{})):H})},[n,v,c,m,d,h,P,o]);return Z.createElement("div",{id:b?"".concat(b):void 0,className:gt("recharts-responsive-container",S),style:Vy(Vy({},A),{},{width:o,height:c,minWidth:h,minHeight:d,maxHeight:m}),ref:C},D)}),ree=function(t){return null};ree.displayName="Cell";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 $U(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 dR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$U(Object(n),!0).forEach(function(r){pNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$U(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pNe(e,t,n){return t=mNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mNe(e){var t=gNe(e,"string");return Tm(t)=="symbol"?t:t+""}function gNe(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 lf={widthCache:{},cacheCount:0},vNe=2e3,yNe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},BU="recharts_measurement_span";function bNe(e){var t=dR({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var qp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ah.isSsr)return{width:0,height:0};var r=bNe(n),i=JSON.stringify({text:t,copyStyle:r});if(lf.widthCache[i])return lf.widthCache[i];try{var a=document.getElementById(BU);a||(a=document.createElement("span"),a.setAttribute("id",BU),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=dR(dR({},yNe),r);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),c={width:s.width,height:s.height};return lf.widthCache[i]=c,++lf.cacheCount>vNe&&(lf.cacheCount=0,lf.widthCache={}),c}catch{return{width:0,height:0}}},xNe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function jm(e){"@babel/helpers - typeof";return jm=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},jm(e)}function jx(e,t){return ENe(e)||_Ne(e,t)||SNe(e,t)||wNe()}function wNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
452
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SNe(e,t){if(e){if(typeof e=="string")return qU(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 qU(e,t)}}function qU(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 _Ne(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function ENe(e){if(Array.isArray(e))return e}function ANe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zU(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,TNe(r.key),r)}}function CNe(e,t,n){return t&&zU(e.prototype,t),n&&zU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function TNe(e){var t=jNe(e,"string");return jm(t)=="symbol"?t:t+""}function jNe(e,t){if(jm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var FU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,VU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,NNe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ONe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,iee={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},MNe=Object.keys(iee),bf="NaN";function RNe(e,t){return e*iee[t]}var Uy=(function(){function e(t,n){ANe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!NNe.test(n)&&(this.num=NaN,this.unit=""),MNe.includes(n)&&(this.num=RNe(t,n),this.unit="px")}return CNe(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=ONe.exec(n))!==null&&r!==void 0?r:[],a=jx(i,3),o=a[1],s=a[2];return new e(parseFloat(o),s??"")}}])})();function aee(e){if(e.includes(bf))return bf;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=FU.exec(t))!==null&&n!==void 0?n:[],i=jx(r,4),a=i[1],o=i[2],s=i[3],c=Uy.parse(a??""),f=Uy.parse(s??""),h=o==="*"?c.multiply(f):c.divide(f);if(h.isNaN())return bf;t=t.replace(FU,h.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,m=(d=VU.exec(t))!==null&&d!==void 0?d:[],v=jx(m,4),x=v[1],w=v[2],b=v[3],S=Uy.parse(x??""),E=Uy.parse(b??""),_=w==="+"?S.add(E):S.subtract(E);if(_.isNaN())return bf;t=t.replace(VU,_.toString())}return t}var UU=/\(([^()]*)\)/;function PNe(e){for(var t=e;t.includes("(");){var n=UU.exec(t),r=jx(n,2),i=r[1];t=t.replace(UU,aee(i))}return t}function kNe(e){var t=e.replace(/\s+/g,"");return t=PNe(t),t=aee(t),t}function DNe(e){try{return kNe(e)}catch{return bf}}function QN(e){var t=DNe(e.slice(5,-1));return t===bf?"":t}var INe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],LNe=["dx","dy","angle","className","breakAll"];function hR(){return hR=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},hR.apply(this,arguments)}function HU(e,t){if(e==null)return{};var n=$Ne(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 $Ne(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 GU(e,t){return FNe(e)||zNe(e,t)||qNe(e,t)||BNe()}function BNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
453
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qNe(e,t){if(e){if(typeof e=="string")return KU(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 KU(e,t)}}function KU(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 zNe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function FNe(e){if(Array.isArray(e))return e}var oee=/[ \f\n\r\t\v\u2028\u2029]+/,see=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];dt(n)||(r?a=n.toString().split(""):a=n.toString().split(oee));var o=a.map(function(c){return{word:c,width:qp(c,i).width}}),s=r?0:qp(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:s}}catch{return null}},VNe=function(t,n,r,i,a){var o=t.maxLines,s=t.children,c=t.style,f=t.breakAll,h=_e(o),d=s,m=function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return q.reduce(function(k,z){var H=z.word,G=z.width,Q=k[k.length-1];if(Q&&(i==null||a||Q.width+G+r<Number(i)))Q.words.push(H),Q.width+=G+r;else{var U={words:[H],width:G};k.push(U)}return k},[])},v=m(n),x=function(q){return q.reduce(function(k,z){return k.width>z.width?k:z})};if(!h)return v;for(var w="…",b=function(q){var k=d.slice(0,q),z=see({breakAll:f,style:c,children:k+w}).wordsWithComputedWidth,H=m(z),G=H.length>o||x(H).width>Number(i);return[G,H]},S=0,E=d.length-1,_=0,A;S<=E&&_<=d.length-1;){var C=Math.floor((S+E)/2),N=C-1,M=b(N),R=GU(M,2),P=R[0],$=R[1],L=b(C),D=GU(L,1),F=D[0];if(!P&&!F&&(S=C+1),P&&F&&(E=C-1),!P&&F){A=$;break}_++}return A||v},WU=function(t){var n=dt(t)?[]:t.toString().split(oee);return[{words:n}]},UNe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((n||r)&&!ah.isSsr){var c,f,h=see({breakAll:o,children:i,style:a});if(h){var d=h.wordsWithComputedWidth,m=h.spaceWidth;c=d,f=m}else return WU(i);return VNe({breakAll:o,children:i,maxLines:s,style:a},c,f,n,r)}return WU(i)},YU="#808080",Nx=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,c=t.capHeight,f=c===void 0?"0.71em":c,h=t.scaleToFit,d=h===void 0?!1:h,m=t.textAnchor,v=m===void 0?"start":m,x=t.verticalAnchor,w=x===void 0?"end":x,b=t.fill,S=b===void 0?YU:b,E=HU(t,INe),_=j.useMemo(function(){return UNe({breakAll:E.breakAll,children:E.children,maxLines:E.maxLines,scaleToFit:d,style:E.style,width:E.width})},[E.breakAll,E.children,E.maxLines,d,E.style,E.width]),A=E.dx,C=E.dy,N=E.angle,M=E.className,R=E.breakAll,P=HU(E,LNe);if(!kn(r)||!kn(a))return null;var $=r+(_e(A)?A:0),L=a+(_e(C)?C:0),D;switch(w){case"start":D=QN("calc(".concat(f,")"));break;case"middle":D=QN("calc(".concat((_.length-1)/2," * -").concat(s," + (").concat(f," / 2))"));break;default:D=QN("calc(".concat(_.length-1," * -").concat(s,")"));break}var F=[];if(d){var I=_[0].width,q=E.width;F.push("scale(".concat((_e(q)?q/I:1)/I,")"))}return N&&F.push("rotate(".concat(N,", ").concat($,", ").concat(L,")")),F.length&&(P.transform=F.join(" ")),Z.createElement("text",hR({},ct(P,!0),{x:$,y:L,className:gt("recharts-text",M),textAnchor:v,fill:S.includes("url")?YU:S}),_.map(function(k,z){var H=k.words.join(R?"":" ");return Z.createElement("tspan",{x:$,dy:z===0?D:s,key:"".concat(H,"-").concat(z)},H)}))};function xl(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function HNe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ak(e){let t,n,r;e.length!==2?(t=xl,n=(s,c)=>xl(e(s),c),r=(s,c)=>e(s)-c):(t=e===xl||e===HNe?e:GNe,n=e,r=e);function i(s,c,f=0,h=s.length){if(f<h){if(t(c,c)!==0)return h;do{const d=f+h>>>1;n(s[d],c)<0?f=d+1:h=d}while(f<h)}return f}function a(s,c,f=0,h=s.length){if(f<h){if(t(c,c)!==0)return h;do{const d=f+h>>>1;n(s[d],c)<=0?f=d+1:h=d}while(f<h)}return f}function o(s,c,f=0,h=s.length){const d=i(s,c,f,h-1);return d>f&&r(s[d-1],c)>-r(s[d],c)?d-1:d}return{left:i,center:o,right:a}}function GNe(){return 0}function lee(e){return e===null?NaN:+e}function*KNe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const WNe=Ak(xl),Ug=WNe.right;Ak(lee).center;class XU extends Map{constructor(t,n=QNe){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(QU(this,t))}has(t){return super.has(QU(this,t))}set(t,n){return super.set(YNe(this,t),n)}delete(t){return super.delete(XNe(this,t))}}function QU({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function YNe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function XNe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function QNe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ZNe(e=xl){if(e===xl)return cee;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 cee(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const JNe=Math.sqrt(50),eOe=Math.sqrt(10),tOe=Math.sqrt(2);function Ox(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>=JNe?10:a>=eOe?5:a>=tOe?2:1;let s,c,f;return i<0?(f=Math.pow(10,-i)/o,s=Math.round(e*f),c=Math.round(t*f),s/f<e&&++s,c/f>t&&--c,f=-f):(f=Math.pow(10,i)*o,s=Math.round(e/f),c=Math.round(t/f),s*f<e&&++s,c*f>t&&--c),c<s&&.5<=n&&n<2?Ox(e,t,n*2):[s,c,f]}function pR(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?Ox(t,e,n):Ox(e,t,n);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let f=0;f<s;++f)c[f]=(a-f)/-o;else for(let f=0;f<s;++f)c[f]=(a-f)*o;else if(o<0)for(let f=0;f<s;++f)c[f]=(i+f)/-o;else for(let f=0;f<s;++f)c[f]=(i+f)*o;return c}function mR(e,t,n){return t=+t,e=+e,n=+n,Ox(e,t,n)[2]}function gR(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?mR(t,e,n):mR(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ZU(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function JU(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function uee(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?cee:ZNe(i);r>n;){if(r-n>600){const c=r-n+1,f=t-n+1,h=Math.log(c),d=.5*Math.exp(2*h/3),m=.5*Math.sqrt(h*d*(c-d)/c)*(f-c/2<0?-1:1),v=Math.max(n,Math.floor(t-f*d/c+m)),x=Math.min(r,Math.floor(t+(c-f)*d/c+m));uee(e,t,v,x,i)}const a=e[t];let o=n,s=r;for(gp(e,n,t),i(e[r],a)>0&&gp(e,n,r);o<s;){for(gp(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?gp(e,n,s):(++s,gp(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function gp(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function nOe(e,t,n){if(e=Float64Array.from(KNe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return JU(e);if(t>=1)return ZU(e);var r,i=(r-1)*t,a=Math.floor(i),o=ZU(uee(e,a).subarray(0,a+1)),s=JU(e.subarray(a+1));return o+(s-o)*(i-a)}}function rOe(e,t,n=lee){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),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function iOe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Vi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function rs(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 vR=Symbol("implicit");function Ck(){var e=new XU,t=[],n=[],r=vR;function i(a){let o=e.get(a);if(o===void 0){if(r!==vR)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 XU;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 Ck(t,n).unknown(r)},Vi.apply(i,arguments),i}function Nm(){var e=Ck().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,f=0,h=.5;delete e.unknown;function d(){var m=t().length,v=i<r,x=v?i:r,w=v?r:i;a=(w-x)/Math.max(1,m-c+f*2),s&&(a=Math.floor(a)),x+=(w-x-a*(m-c))*h,o=a*(1-c),s&&(x=Math.round(x),o=Math.round(o));var b=iOe(m).map(function(S){return x+a*S});return n(v?b.reverse():b)}return e.domain=function(m){return arguments.length?(t(m),d()):t()},e.range=function(m){return arguments.length?([r,i]=m,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(m){return[r,i]=m,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(m){return arguments.length?(s=!!m,d()):s},e.padding=function(m){return arguments.length?(c=Math.min(1,f=+m),d()):c},e.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),d()):c},e.paddingOuter=function(m){return arguments.length?(f=+m,d()):f},e.align=function(m){return arguments.length?(h=Math.max(0,Math.min(1,m)),d()):h},e.copy=function(){return Nm(t(),[r,i]).round(s).paddingInner(c).paddingOuter(f).align(h)},Vi.apply(d(),arguments)}function fee(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return fee(t())},e}function zp(){return fee(Nm.apply(null,arguments).paddingInner(1))}function aOe(e){return function(){return e}}function Mx(e){return+e}var e8=[0,1];function yr(e){return e}function yR(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:aOe(isNaN(t)?NaN:.5)}function oOe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function sOe(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=yR(i,r),a=n(o,a)):(r=yR(r,i),a=n(a,o)),function(s){return a(r(s))}}function lOe(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]=yR(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var c=Ug(e,s,1,r)-1;return a[c](i[c](s))}}function Hg(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function $w(){var e=e8,t=e8,n=Do,r,i,a,o=yr,s,c,f;function h(){var m=Math.min(e.length,t.length);return o!==yr&&(o=oOe(e[0],e[m-1])),s=m>2?lOe:sOe,c=f=null,d}function d(m){return m==null||isNaN(m=+m)?a:(c||(c=s(e.map(r),t,n)))(r(o(m)))}return d.invert=function(m){return o(i((f||(f=s(t,e.map(r),ta)))(m)))},d.domain=function(m){return arguments.length?(e=Array.from(m,Mx),h()):e.slice()},d.range=function(m){return arguments.length?(t=Array.from(m),h()):t.slice()},d.rangeRound=function(m){return t=Array.from(m),n=k2,h()},d.clamp=function(m){return arguments.length?(o=m?!0:yr,h()):o!==yr},d.interpolate=function(m){return arguments.length?(n=m,h()):n},d.unknown=function(m){return arguments.length?(a=m,d):a},function(m,v){return r=m,i=v,h()}}function Tk(){return $w()(yr,yr)}function cOe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rx(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 yd(e){return e=Rx(Math.abs(e)),e?e[1]:NaN}function uOe(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function fOe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var dOe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Om(e){if(!(t=dOe.exec(e)))throw new Error("invalid format: "+e);var t;return new jk({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]})}Om.prototype=jk.prototype;function jk(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+""}jk.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 hOe(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 Px;function pOe(e,t){var n=Rx(e,t);if(!n)return Px=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Px=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")+Rx(e,Math.max(0,t+a-1))[0]}function t8(e,t){var n=Rx(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 n8={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:cOe,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)=>t8(e*100,t),r:t8,s:pOe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function r8(e){return e}var i8=Array.prototype.map,a8=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mOe(e){var t=e.grouping===void 0||e.thousands===void 0?r8:uOe(i8.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?r8:fOe(i8.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function f(d,m){d=Om(d);var v=d.fill,x=d.align,w=d.sign,b=d.symbol,S=d.zero,E=d.width,_=d.comma,A=d.precision,C=d.trim,N=d.type;N==="n"?(_=!0,N="g"):n8[N]||(A===void 0&&(A=12),C=!0,N="g"),(S||v==="0"&&x==="=")&&(S=!0,v="0",x="=");var M=(m&&m.prefix!==void 0?m.prefix:"")+(b==="$"?n:b==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),R=(b==="$"?r:/[%p]/.test(N)?o:"")+(m&&m.suffix!==void 0?m.suffix:""),P=n8[N],$=/[defgprs%]/.test(N);A=A===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function L(D){var F=M,I=R,q,k,z;if(N==="c")I=P(D)+I,D="";else{D=+D;var H=D<0||1/D<0;if(D=isNaN(D)?c:P(Math.abs(D),A),C&&(D=hOe(D)),H&&+D==0&&w!=="+"&&(H=!1),F=(H?w==="("?w:s:w==="-"||w==="("?"":w)+F,I=(N==="s"&&!isNaN(D)&&Px!==void 0?a8[8+Px/3]:"")+I+(H&&w==="("?")":""),$){for(q=-1,k=D.length;++q<k;)if(z=D.charCodeAt(q),48>z||z>57){I=(z===46?i+D.slice(q+1):D.slice(q))+I,D=D.slice(0,q);break}}}_&&!S&&(D=t(D,1/0));var G=F.length+D.length+I.length,Q=G<E?new Array(E-G+1).join(v):"";switch(_&&S&&(D=t(Q+D,Q.length?E-I.length:1/0),Q=""),x){case"<":D=F+D+I+Q;break;case"=":D=F+Q+D+I;break;case"^":D=Q.slice(0,G=Q.length>>1)+F+D+I+Q.slice(G);break;default:D=Q+F+D+I;break}return a(D)}return L.toString=function(){return d+""},L}function h(d,m){var v=Math.max(-8,Math.min(8,Math.floor(yd(m)/3)))*3,x=Math.pow(10,-v),w=f((d=Om(d),d.type="f",d),{suffix:a8[8+v/3]});return function(b){return w(x*b)}}return{format:f,formatPrefix:h}}var Hy,Nk,dee;gOe({thousands:",",grouping:[3],currency:["$",""]});function gOe(e){return Hy=mOe(e),Nk=Hy.format,dee=Hy.formatPrefix,Hy}function vOe(e){return Math.max(0,-yd(Math.abs(e)))}function yOe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yd(t)/3)))*3-yd(Math.abs(e)))}function bOe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yd(t)-yd(e))+1}function hee(e,t,n,r){var i=gR(e,t,n),a;switch(r=Om(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=yOe(i,o))&&(r.precision=a),dee(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=bOe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=vOe(i))&&(r.precision=a-(r.type==="%")*2);break}}return Nk(r)}function kl(e){var t=e.domain;return e.ticks=function(n){var r=t();return pR(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return hee(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],s=r[a],c,f,h=10;for(s<o&&(f=o,o=s,s=f,f=i,i=a,a=f);h-- >0;){if(f=mR(o,s,n),f===c)return r[i]=o,r[a]=s,t(r);if(f>0)o=Math.floor(o/f)*f,s=Math.ceil(s/f)*f;else if(f<0)o=Math.ceil(o*f)/f,s=Math.floor(s*f)/f;else break;c=f}return e},e}function kx(){var e=Tk();return e.copy=function(){return Hg(e,kx())},Vi.apply(e,arguments),kl(e)}function pee(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,Mx),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return pee(e).unknown(t)},e=arguments.length?Array.from(e,Mx):[0,1],kl(n)}function mee(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 o8(e){return Math.log(e)}function s8(e){return Math.exp(e)}function xOe(e){return-Math.log(-e)}function wOe(e){return-Math.exp(-e)}function SOe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function _Oe(e){return e===10?SOe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function EOe(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 l8(e){return(t,n)=>-e(-t,n)}function Ok(e){const t=e(o8,s8),n=t.domain;let r=10,i,a;function o(){return i=EOe(r),a=_Oe(r),n()[0]<0?(i=l8(i),a=l8(a),e(xOe,wOe)):e(o8,s8),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const c=n();let f=c[0],h=c[c.length-1];const d=h<f;d&&([f,h]=[h,f]);let m=i(f),v=i(h),x,w;const b=s==null?10:+s;let S=[];if(!(r%1)&&v-m<b){if(m=Math.floor(m),v=Math.ceil(v),f>0){for(;m<=v;++m)for(x=1;x<r;++x)if(w=m<0?x/a(-m):x*a(m),!(w<f)){if(w>h)break;S.push(w)}}else for(;m<=v;++m)for(x=r-1;x>=1;--x)if(w=m>0?x/a(-m):x*a(m),!(w<f)){if(w>h)break;S.push(w)}S.length*2<b&&(S=pR(f,h,b))}else S=pR(m,v,Math.min(v-m,b)).map(a);return d?S.reverse():S},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Om(c)).precision==null&&(c.trim=!0),c=Nk(c)),s===1/0)return c;const f=Math.max(1,r*s/t.ticks().length);return h=>{let d=h/a(Math.round(i(h)));return d*r<r-.5&&(d*=r),d<=f?c(h):""}},t.nice=()=>n(mee(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function gee(){const e=Ok($w()).domain([1,10]);return e.copy=()=>Hg(e,gee()).base(e.base()),Vi.apply(e,arguments),e}function c8(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function u8(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Mk(e){var t=1,n=e(c8(t),u8(t));return n.constant=function(r){return arguments.length?e(c8(t=+r),u8(t)):t},kl(n)}function vee(){var e=Mk($w());return e.copy=function(){return Hg(e,vee()).constant(e.constant())},Vi.apply(e,arguments)}function f8(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function AOe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function COe(e){return e<0?-e*e:e*e}function Rk(e){var t=e(yr,yr),n=1;function r(){return n===1?e(yr,yr):n===.5?e(AOe,COe):e(f8(n),f8(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},kl(t)}function Pk(){var e=Rk($w());return e.copy=function(){return Hg(e,Pk()).exponent(e.exponent())},Vi.apply(e,arguments),e}function TOe(){return Pk.apply(null,arguments).exponent(.5)}function d8(e){return Math.sign(e)*e*e}function jOe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function yee(){var e=Tk(),t=[0,1],n=!1,r;function i(a){var o=jOe(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(d8(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,Mx)).map(d8)),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 yee(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Vi.apply(i,arguments),kl(i)}function bee(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o<s;)n[o-1]=rOe(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Ug(n,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(xl),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 bee().domain(e).range(t).unknown(r)},Vi.apply(a,arguments)}function xee(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[Ug(r,c,0,n)]:a}function s(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,s()):[e,t]},o.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,s()):i.slice()},o.invertExtent=function(c){var f=i.indexOf(c);return f<0?[NaN,NaN]:f<1?[e,r[0]]:f>=n?[r[n-1],t]:[r[f-1],r[f]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return xee().domain([e,t]).range(i).unknown(a)},Vi.apply(kl(o),arguments)}function wee(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Ug(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 wee().domain(e).range(t).unknown(n)},Vi.apply(i,arguments)}const ZN=new Date,JN=new Date;function In(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),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;let f;do c.push(f=new Date(+a)),t(a,s),e(a);while(f<a&&a<o);return c},i.filter=a=>In(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(ZN.setTime(+a),JN.setTime(+o),e(ZN),e(JN),Math.floor(n(ZN,JN))),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 Dx=In(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Dx.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?In(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Dx);Dx.range;const Mo=1e3,Mi=Mo*60,Ro=Mi*60,Go=Ro*24,kk=Go*7,h8=Go*30,eO=Go*365,yc=In(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Mo)},(e,t)=>(t-e)/Mo,e=>e.getUTCSeconds());yc.range;const Dk=In(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mo)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getMinutes());Dk.range;const Ik=In(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Mi)},(e,t)=>(t-e)/Mi,e=>e.getUTCMinutes());Ik.range;const Lk=In(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Mo-e.getMinutes()*Mi)},(e,t)=>{e.setTime(+e+t*Ro)},(e,t)=>(t-e)/Ro,e=>e.getHours());Lk.range;const $k=In(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ro)},(e,t)=>(t-e)/Ro,e=>e.getUTCHours());$k.range;const Gg=In(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Mi)/Go,e=>e.getDate()-1);Gg.range;const Bw=In(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Go,e=>e.getUTCDate()-1);Bw.range;const See=In(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Go,e=>Math.floor(e/Go));See.range;function mu(e){return In(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())*Mi)/kk)}const qw=mu(0),Ix=mu(1),NOe=mu(2),OOe=mu(3),bd=mu(4),MOe=mu(5),ROe=mu(6);qw.range;Ix.range;NOe.range;OOe.range;bd.range;MOe.range;ROe.range;function gu(e){return In(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)/kk)}const zw=gu(0),Lx=gu(1),POe=gu(2),kOe=gu(3),xd=gu(4),DOe=gu(5),IOe=gu(6);zw.range;Lx.range;POe.range;kOe.range;xd.range;DOe.range;IOe.range;const Bk=In(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());Bk.range;const qk=In(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());qk.range;const Ko=In(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());Ko.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:In(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)});Ko.range;const Wo=In(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());Wo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:In(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)});Wo.range;function _ee(e,t,n,r,i,a){const o=[[yc,1,Mo],[yc,5,5*Mo],[yc,15,15*Mo],[yc,30,30*Mo],[a,1,Mi],[a,5,5*Mi],[a,15,15*Mi],[a,30,30*Mi],[i,1,Ro],[i,3,3*Ro],[i,6,6*Ro],[i,12,12*Ro],[r,1,Go],[r,2,2*Go],[n,1,kk],[t,1,h8],[t,3,3*h8],[e,1,eO]];function s(f,h,d){const m=h<f;m&&([f,h]=[h,f]);const v=d&&typeof d.range=="function"?d:c(f,h,d),x=v?v.range(f,+h+1):[];return m?x.reverse():x}function c(f,h,d){const m=Math.abs(h-f)/d,v=Ak(([,,b])=>b).right(o,m);if(v===o.length)return e.every(gR(f/eO,h/eO,d));if(v===0)return Dx.every(Math.max(gR(f,h,d),1));const[x,w]=o[m/o[v-1][2]<o[v][2]/m?v-1:v];return x.every(w)}return[s,c]}const[LOe,$Oe]=_ee(Wo,qk,zw,See,$k,Ik),[BOe,qOe]=_ee(Ko,Bk,qw,Gg,Lk,Dk);function tO(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 nO(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 vp(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function zOe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,f=yp(i),h=bp(i),d=yp(a),m=bp(a),v=yp(o),x=bp(o),w=yp(s),b=bp(s),S=yp(c),E=bp(c),_={a:z,A:H,b:G,B:Q,c:null,d:b8,e:b8,f:uMe,g:xMe,G:SMe,H:sMe,I:lMe,j:cMe,L:Eee,m:fMe,M:dMe,p:U,q:V,Q:S8,s:_8,S:hMe,u:pMe,U:mMe,V:gMe,w:vMe,W:yMe,x:null,X:null,y:bMe,Y:wMe,Z:_Me,"%":w8},A={a:X,A:W,b:K,B:J,c:null,d:x8,e:x8,f:TMe,g:LMe,G:BMe,H:EMe,I:AMe,j:CMe,L:Cee,m:jMe,M:NMe,p:ee,q:te,Q:S8,s:_8,S:OMe,u:MMe,U:RMe,V:PMe,w:kMe,W:DMe,x:null,X:null,y:IMe,Y:$Me,Z:qMe,"%":w8},C={a:$,A:L,b:D,B:F,c:I,d:v8,e:v8,f:rMe,g:g8,G:m8,H:y8,I:y8,j:JOe,L:nMe,m:ZOe,M:eMe,p:P,q:QOe,Q:aMe,s:oMe,S:tMe,u:GOe,U:KOe,V:WOe,w:HOe,W:YOe,x:q,X:k,y:g8,Y:m8,Z:XOe,"%":iMe};_.x=N(n,_),_.X=N(r,_),_.c=N(t,_),A.x=N(n,A),A.X=N(r,A),A.c=N(t,A);function N(ne,se){return function(ce){var oe=[],be=-1,xe=0,we=ne.length,Ae,Ee,rt;for(ce instanceof Date||(ce=new Date(+ce));++be<we;)ne.charCodeAt(be)===37&&(oe.push(ne.slice(xe,be)),(Ee=p8[Ae=ne.charAt(++be)])!=null?Ae=ne.charAt(++be):Ee=Ae==="e"?" ":"0",(rt=se[Ae])&&(Ae=rt(ce,Ee)),oe.push(Ae),xe=be+1);return oe.push(ne.slice(xe,be)),oe.join("")}}function M(ne,se){return function(ce){var oe=vp(1900,void 0,1),be=R(oe,ne,ce+="",0),xe,we;if(be!=ce.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(se&&!("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=nO(vp(oe.y,0,1)),we=xe.getUTCDay(),xe=we>4||we===0?Lx.ceil(xe):Lx(xe),xe=Bw.offset(xe,(oe.V-1)*7),oe.y=xe.getUTCFullYear(),oe.m=xe.getUTCMonth(),oe.d=xe.getUTCDate()+(oe.w+6)%7):(xe=tO(vp(oe.y,0,1)),we=xe.getDay(),xe=we>4||we===0?Ix.ceil(xe):Ix(xe),xe=Gg.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?nO(vp(oe.y,0,1)).getUTCDay():tO(vp(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,nO(oe)):tO(oe)}}function R(ne,se,ce,oe){for(var be=0,xe=se.length,we=ce.length,Ae,Ee;be<xe;){if(oe>=we)return-1;if(Ae=se.charCodeAt(be++),Ae===37){if(Ae=se.charAt(be++),Ee=C[Ae in p8?se.charAt(be++):Ae],!Ee||(oe=Ee(ne,ce,oe))<0)return-1}else if(Ae!=ce.charCodeAt(oe++))return-1}return oe}function P(ne,se,ce){var oe=f.exec(se.slice(ce));return oe?(ne.p=h.get(oe[0].toLowerCase()),ce+oe[0].length):-1}function $(ne,se,ce){var oe=v.exec(se.slice(ce));return oe?(ne.w=x.get(oe[0].toLowerCase()),ce+oe[0].length):-1}function L(ne,se,ce){var oe=d.exec(se.slice(ce));return oe?(ne.w=m.get(oe[0].toLowerCase()),ce+oe[0].length):-1}function D(ne,se,ce){var oe=S.exec(se.slice(ce));return oe?(ne.m=E.get(oe[0].toLowerCase()),ce+oe[0].length):-1}function F(ne,se,ce){var oe=w.exec(se.slice(ce));return oe?(ne.m=b.get(oe[0].toLowerCase()),ce+oe[0].length):-1}function I(ne,se,ce){return R(ne,t,se,ce)}function q(ne,se,ce){return R(ne,n,se,ce)}function k(ne,se,ce){return R(ne,r,se,ce)}function z(ne){return o[ne.getDay()]}function H(ne){return a[ne.getDay()]}function G(ne){return c[ne.getMonth()]}function Q(ne){return s[ne.getMonth()]}function U(ne){return i[+(ne.getHours()>=12)]}function V(ne){return 1+~~(ne.getMonth()/3)}function X(ne){return o[ne.getUTCDay()]}function W(ne){return a[ne.getUTCDay()]}function K(ne){return c[ne.getUTCMonth()]}function J(ne){return s[ne.getUTCMonth()]}function ee(ne){return i[+(ne.getUTCHours()>=12)]}function te(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var se=N(ne+="",_);return se.toString=function(){return ne},se},parse:function(ne){var se=M(ne+="",!1);return se.toString=function(){return ne},se},utcFormat:function(ne){var se=N(ne+="",A);return se.toString=function(){return ne},se},utcParse:function(ne){var se=M(ne+="",!0);return se.toString=function(){return ne},se}}}var p8={"-":"",_:" ",0:"0"},Gn=/^\s*\d+/,FOe=/^%/,VOe=/[\\^$*+?|[\]().{}]/g;function _t(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 UOe(e){return e.replace(VOe,"\\$&")}function yp(e){return new RegExp("^(?:"+e.map(UOe).join("|")+")","i")}function bp(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function HOe(e,t,n){var r=Gn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function GOe(e,t,n){var r=Gn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function KOe(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function WOe(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function YOe(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function m8(e,t,n){var r=Gn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function g8(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function XOe(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 QOe(e,t,n){var r=Gn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function ZOe(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function v8(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function JOe(e,t,n){var r=Gn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function y8(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function eMe(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function tMe(e,t,n){var r=Gn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function nMe(e,t,n){var r=Gn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function rMe(e,t,n){var r=Gn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function iMe(e,t,n){var r=FOe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function aMe(e,t,n){var r=Gn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function oMe(e,t,n){var r=Gn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function b8(e,t){return _t(e.getDate(),t,2)}function sMe(e,t){return _t(e.getHours(),t,2)}function lMe(e,t){return _t(e.getHours()%12||12,t,2)}function cMe(e,t){return _t(1+Gg.count(Ko(e),e),t,3)}function Eee(e,t){return _t(e.getMilliseconds(),t,3)}function uMe(e,t){return Eee(e,t)+"000"}function fMe(e,t){return _t(e.getMonth()+1,t,2)}function dMe(e,t){return _t(e.getMinutes(),t,2)}function hMe(e,t){return _t(e.getSeconds(),t,2)}function pMe(e){var t=e.getDay();return t===0?7:t}function mMe(e,t){return _t(qw.count(Ko(e)-1,e),t,2)}function Aee(e){var t=e.getDay();return t>=4||t===0?bd(e):bd.ceil(e)}function gMe(e,t){return e=Aee(e),_t(bd.count(Ko(e),e)+(Ko(e).getDay()===4),t,2)}function vMe(e){return e.getDay()}function yMe(e,t){return _t(Ix.count(Ko(e)-1,e),t,2)}function bMe(e,t){return _t(e.getFullYear()%100,t,2)}function xMe(e,t){return e=Aee(e),_t(e.getFullYear()%100,t,2)}function wMe(e,t){return _t(e.getFullYear()%1e4,t,4)}function SMe(e,t){var n=e.getDay();return e=n>=4||n===0?bd(e):bd.ceil(e),_t(e.getFullYear()%1e4,t,4)}function _Me(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+_t(t/60|0,"0",2)+_t(t%60,"0",2)}function x8(e,t){return _t(e.getUTCDate(),t,2)}function EMe(e,t){return _t(e.getUTCHours(),t,2)}function AMe(e,t){return _t(e.getUTCHours()%12||12,t,2)}function CMe(e,t){return _t(1+Bw.count(Wo(e),e),t,3)}function Cee(e,t){return _t(e.getUTCMilliseconds(),t,3)}function TMe(e,t){return Cee(e,t)+"000"}function jMe(e,t){return _t(e.getUTCMonth()+1,t,2)}function NMe(e,t){return _t(e.getUTCMinutes(),t,2)}function OMe(e,t){return _t(e.getUTCSeconds(),t,2)}function MMe(e){var t=e.getUTCDay();return t===0?7:t}function RMe(e,t){return _t(zw.count(Wo(e)-1,e),t,2)}function Tee(e){var t=e.getUTCDay();return t>=4||t===0?xd(e):xd.ceil(e)}function PMe(e,t){return e=Tee(e),_t(xd.count(Wo(e),e)+(Wo(e).getUTCDay()===4),t,2)}function kMe(e){return e.getUTCDay()}function DMe(e,t){return _t(Lx.count(Wo(e)-1,e),t,2)}function IMe(e,t){return _t(e.getUTCFullYear()%100,t,2)}function LMe(e,t){return e=Tee(e),_t(e.getUTCFullYear()%100,t,2)}function $Me(e,t){return _t(e.getUTCFullYear()%1e4,t,4)}function BMe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?xd(e):xd.ceil(e),_t(e.getUTCFullYear()%1e4,t,4)}function qMe(){return"+0000"}function w8(){return"%"}function S8(e){return+e}function _8(e){return Math.floor(+e/1e3)}var cf,jee,Nee;zMe({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 zMe(e){return cf=zOe(e),jee=cf.format,cf.parse,Nee=cf.utcFormat,cf.utcParse,cf}function FMe(e){return new Date(e)}function VMe(e){return e instanceof Date?+e:+new Date(+e)}function zk(e,t,n,r,i,a,o,s,c,f){var h=Tk(),d=h.invert,m=h.domain,v=f(".%L"),x=f(":%S"),w=f("%I:%M"),b=f("%I %p"),S=f("%a %d"),E=f("%b %d"),_=f("%B"),A=f("%Y");function C(N){return(c(N)<N?v:s(N)<N?x:o(N)<N?w:a(N)<N?b:r(N)<N?i(N)<N?S:E:n(N)<N?_:A)(N)}return h.invert=function(N){return new Date(d(N))},h.domain=function(N){return arguments.length?m(Array.from(N,VMe)):m().map(FMe)},h.ticks=function(N){var M=m();return e(M[0],M[M.length-1],N??10)},h.tickFormat=function(N,M){return M==null?C:f(M)},h.nice=function(N){var M=m();return(!N||typeof N.range!="function")&&(N=t(M[0],M[M.length-1],N??10)),N?m(mee(M,N)):h},h.copy=function(){return Hg(h,zk(e,t,n,r,i,a,o,s,c,f))},h}function UMe(){return Vi.apply(zk(BOe,qOe,Ko,Bk,qw,Gg,Lk,Dk,yc,jee).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function HMe(){return Vi.apply(zk(LOe,$Oe,Wo,qk,zw,Bw,$k,Ik,yc,Nee).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Fw(){var e=0,t=1,n,r,i,a,o=yr,s=!1,c;function f(d){return d==null||isNaN(d=+d)?c:o(i===0?.5:(d=(a(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}f.domain=function(d){return arguments.length?([e,t]=d,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),f):[e,t]},f.clamp=function(d){return arguments.length?(s=!!d,f):s},f.interpolator=function(d){return arguments.length?(o=d,f):o};function h(d){return function(m){var v,x;return arguments.length?([v,x]=m,o=d(v,x),f):[o(0),o(1)]}}return f.range=h(Do),f.rangeRound=h(k2),f.unknown=function(d){return arguments.length?(c=d,f):c},function(d){return a=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),f}}function Dl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Oee(){var e=kl(Fw()(yr));return e.copy=function(){return Dl(e,Oee())},rs.apply(e,arguments)}function Mee(){var e=Ok(Fw()).domain([1,10]);return e.copy=function(){return Dl(e,Mee()).base(e.base())},rs.apply(e,arguments)}function Ree(){var e=Mk(Fw());return e.copy=function(){return Dl(e,Ree()).constant(e.constant())},rs.apply(e,arguments)}function Fk(){var e=Rk(Fw());return e.copy=function(){return Dl(e,Fk()).exponent(e.exponent())},rs.apply(e,arguments)}function GMe(){return Fk.apply(null,arguments).exponent(.5)}function Pee(){var e=[],t=yr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Ug(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(xl),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)=>nOe(e,a/r))},n.copy=function(){return Pee(t).domain(e)},rs.apply(n,arguments)}function Vw(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,f=yr,h,d=!1,m;function v(w){return isNaN(w=+w)?m:(w=.5+((w=+h(w))-a)*(r*w<r*a?s:c),f(d?Math.max(0,Math.min(1,w)):w))}v.domain=function(w){return arguments.length?([e,t,n]=w,i=h(e=+e),a=h(t=+t),o=h(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,v):[e,t,n]},v.clamp=function(w){return arguments.length?(d=!!w,v):d},v.interpolator=function(w){return arguments.length?(f=w,v):f};function x(w){return function(b){var S,E,_;return arguments.length?([S,E,_]=b,f=gxe(w,[S,E,_]),v):[f(0),f(.5),f(1)]}}return v.range=x(Do),v.rangeRound=x(k2),v.unknown=function(w){return arguments.length?(m=w,v):m},function(w){return h=w,i=w(e),a=w(t),o=w(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,v}}function kee(){var e=kl(Vw()(yr));return e.copy=function(){return Dl(e,kee())},rs.apply(e,arguments)}function Dee(){var e=Ok(Vw()).domain([.1,1,10]);return e.copy=function(){return Dl(e,Dee()).base(e.base())},rs.apply(e,arguments)}function Iee(){var e=Mk(Vw());return e.copy=function(){return Dl(e,Iee()).constant(e.constant())},rs.apply(e,arguments)}function Vk(){var e=Rk(Vw());return e.copy=function(){return Dl(e,Vk()).exponent(e.exponent())},rs.apply(e,arguments)}function KMe(){return Vk.apply(null,arguments).exponent(.5)}const E8=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Nm,scaleDiverging:kee,scaleDivergingLog:Dee,scaleDivergingPow:Vk,scaleDivergingSqrt:KMe,scaleDivergingSymlog:Iee,scaleIdentity:pee,scaleImplicit:vR,scaleLinear:kx,scaleLog:gee,scaleOrdinal:Ck,scalePoint:zp,scalePow:Pk,scaleQuantile:bee,scaleQuantize:xee,scaleRadial:yee,scaleSequential:Oee,scaleSequentialLog:Mee,scaleSequentialPow:Fk,scaleSequentialQuantile:Pee,scaleSequentialSqrt:GMe,scaleSequentialSymlog:Ree,scaleSqrt:TOe,scaleSymlog:vee,scaleThreshold:wee,scaleTime:UMe,scaleUtc:HMe,tickFormat:hee},Symbol.toStringTag,{value:"Module"}));var WMe=mJ();const dl=Ct(WMe);var YMe=xJ();const Uw=Ct(YMe);var rO,A8;function XMe(){if(A8)return rO;A8=1;var e=Mw(),t=dk();function n(r,i){return e(t(r,i),1)}return rO=n,rO}var QMe=XMe();const ZMe=Ct(QMe);var iO,C8;function JMe(){if(C8)return iO;C8=1;var e=ck();function t(n,r){return e(n,r)}return iO=t,iO}var eRe=JMe();const Mm=Ct(eRe);var oh=1e9,tRe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Hk,en=!0,Li="[DecimalError] ",$c=Li+"Invalid argument: ",Uk=Li+"Exponent out of range: ",sh=Math.floor,fc=Math.pow,nRe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ii,Fn=1e7,Xt=7,Lee=9007199254740991,$x=sh(Lee/Xt),Ne={};Ne.absoluteValue=Ne.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ne.comparedTo=Ne.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};Ne.decimalPlaces=Ne.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Xt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ne.dividedBy=Ne.div=function(e){return Bo(this,new this.constructor(e))};Ne.dividedToIntegerBy=Ne.idiv=function(e){var t=this,n=t.constructor;return qt(Bo(t,new n(e),0,1),n.precision)};Ne.equals=Ne.eq=function(e){return!this.cmp(e)};Ne.exponent=function(){return An(this)};Ne.greaterThan=Ne.gt=function(e){return this.cmp(e)>0};Ne.greaterThanOrEqualTo=Ne.gte=function(e){return this.cmp(e)>=0};Ne.isInteger=Ne.isint=function(){return this.e>this.d.length-2};Ne.isNegative=Ne.isneg=function(){return this.s<0};Ne.isPositive=Ne.ispos=function(){return this.s>0};Ne.isZero=function(){return this.s===0};Ne.lessThan=Ne.lt=function(e){return this.cmp(e)<0};Ne.lessThanOrEqualTo=Ne.lte=function(e){return this.cmp(e)<1};Ne.logarithm=Ne.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(ii))throw Error(Li+"NaN");if(n.s<1)throw Error(Li+(n.s?"NaN":"-Infinity"));return n.eq(ii)?new r(0):(en=!1,t=Bo(Rm(n,a),Rm(e,a),a),en=!0,qt(t,i))};Ne.minus=Ne.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?qee(t,e):$ee(t,(e.s=-e.s,e))};Ne.modulo=Ne.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Li+"NaN");return n.s?(en=!1,t=Bo(n,e,0,1).times(e),en=!0,n.minus(t)):qt(new r(n),i)};Ne.naturalExponential=Ne.exp=function(){return Bee(this)};Ne.naturalLogarithm=Ne.ln=function(){return Rm(this)};Ne.negated=Ne.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ne.plus=Ne.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?$ee(t,e):qee(t,(e.s=-e.s,e))};Ne.precision=Ne.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($c+e);if(t=An(i)+1,r=i.d.length-1,n=r*Xt+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};Ne.squareRoot=Ne.sqrt=function(){var e,t,n,r,i,a,o,s=this,c=s.constructor;if(s.s<1){if(!s.s)return new c(0);throw Error(Li+"NaN")}for(e=An(s),en=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ka(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=sh((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 c(t)):r=new c(i.toString()),n=c.precision,i=o=n+3;;)if(a=r,r=a.plus(Bo(s,a,o+2)).times(.5),ka(a.d).slice(0,o)===(t=ka(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(qt(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return en=!0,qt(r,n)};Ne.times=Ne.mul=function(e){var t,n,r,i,a,o,s,c,f,h=this,d=h.constructor,m=h.d,v=(e=new d(e)).d;if(!h.s||!e.s)return new d(0);for(e.s*=h.s,n=h.e+e.e,c=m.length,f=v.length,c<f&&(a=m,m=v,v=a,o=c,c=f,f=o),a=[],o=c+f,r=o;r--;)a.push(0);for(r=f;--r>=0;){for(t=0,i=c+r;i>r;)s=a[i]+v[r]*m[i-r-1]+t,a[i--]=s%Fn|0,t=s/Fn|0;a[i]=(a[i]+t)%Fn|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,en?qt(e,d.precision):e};Ne.toDecimalPlaces=Ne.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ha(e,0,oh),t===void 0?t=r.rounding:Ha(t,0,8),qt(n,e+An(n)+1,t))};Ne.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=ru(r,!0):(Ha(e,0,oh),t===void 0?t=i.rounding:Ha(t,0,8),r=qt(new i(r),e+1,t),n=ru(r,!0,e+1)),n};Ne.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?ru(i):(Ha(e,0,oh),t===void 0?t=a.rounding:Ha(t,0,8),r=qt(new a(i),e+An(i)+1,t),n=ru(r.abs(),!1,e+An(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Ne.toInteger=Ne.toint=function(){var e=this,t=e.constructor;return qt(new t(e),An(e)+1,t.rounding)};Ne.toNumber=function(){return+this};Ne.toPower=Ne.pow=function(e){var t,n,r,i,a,o,s=this,c=s.constructor,f=12,h=+(e=new c(e));if(!e.s)return new c(ii);if(s=new c(s),!s.s){if(e.s<1)throw Error(Li+"Infinity");return s}if(s.eq(ii))return s;if(r=c.precision,e.eq(ii))return qt(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=h<0?-h:h)<=Lee){for(i=new c(ii),t=Math.ceil(r/Xt+4),en=!1;n%2&&(i=i.times(s),j8(i.d,t)),n=sh(n/2),n!==0;)s=s.times(s),j8(s.d,t);return en=!0,e.s<0?new c(ii).div(i):qt(i,r)}}else if(a<0)throw Error(Li+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,en=!1,i=e.times(Rm(s,r+f)),en=!0,i=Bee(i),i.s=a,i};Ne.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=An(i),r=ru(i,n<=a.toExpNeg||n>=a.toExpPos)):(Ha(e,1,oh),t===void 0?t=a.rounding:Ha(t,0,8),i=qt(new a(i),e,t),n=An(i),r=ru(i,e<=n||n<=a.toExpNeg,e)),r};Ne.toSignificantDigits=Ne.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ha(e,1,oh),t===void 0?t=r.rounding:Ha(t,0,8)),qt(new r(n),e,t)};Ne.toString=Ne.valueOf=Ne.val=Ne.toJSON=Ne[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=An(e),n=e.constructor;return ru(e,t<=n.toExpNeg||t>=n.toExpPos)};function $ee(e,t){var n,r,i,a,o,s,c,f,h=e.constructor,d=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),en?qt(t,d):t;if(c=e.d,f=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(r=c,a=-a,s=f.length):(r=f,i=o,s=c.length),o=Math.ceil(d/Xt),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=c.length,a=f.length,s-a<0&&(a=s,r=f,f=c,c=r),n=0;a;)n=(c[--a]=c[a]+f[a]+n)/Fn|0,c[a]%=Fn;for(n&&(c.unshift(n),++i),s=c.length;c[--s]==0;)c.pop();return t.d=c,t.e=i,en?qt(t,d):t}function Ha(e,t,n){if(e!==~~e||e<t||e>n)throw Error($c+e)}function ka(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=Xt-r.length,n&&(a+=Ys(n)),a+=r;o=e[t],r=o+"",n=Xt-r.length,n&&(a+=Ys(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Bo=(function(){function e(r,i){var a,o=0,s=r.length;for(r=r.slice();s--;)a=r[s]*i+o,r[s]=a%Fn|0,o=a/Fn|0;return o&&r.unshift(o),r}function t(r,i,a,o){var s,c;if(a!=o)c=a>o?1:-1;else for(s=c=0;s<a;s++)if(r[s]!=i[s]){c=r[s]>i[s]?1:-1;break}return c}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*Fn+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var s,c,f,h,d,m,v,x,w,b,S,E,_,A,C,N,M,R,P=r.constructor,$=r.s==i.s?1:-1,L=r.d,D=i.d;if(!r.s)return new P(r);if(!i.s)throw Error(Li+"Division by zero");for(c=r.e-i.e,M=D.length,C=L.length,v=new P($),x=v.d=[],f=0;D[f]==(L[f]||0);)++f;if(D[f]>(L[f]||0)&&--c,a==null?E=a=P.precision:o?E=a+(An(r)-An(i))+1:E=a,E<0)return new P(0);if(E=E/Xt+2|0,f=0,M==1)for(h=0,D=D[0],E++;(f<C||h)&&E--;f++)_=h*Fn+(L[f]||0),x[f]=_/D|0,h=_%D|0;else{for(h=Fn/(D[0]+1)|0,h>1&&(D=e(D,h),L=e(L,h),M=D.length,C=L.length),A=M,w=L.slice(0,M),b=w.length;b<M;)w[b++]=0;R=D.slice(),R.unshift(0),N=D[0],D[1]>=Fn/2&&++N;do h=0,s=t(D,w,M,b),s<0?(S=w[0],M!=b&&(S=S*Fn+(w[1]||0)),h=S/N|0,h>1?(h>=Fn&&(h=Fn-1),d=e(D,h),m=d.length,b=w.length,s=t(d,w,m,b),s==1&&(h--,n(d,M<m?R:D,m))):(h==0&&(s=h=1),d=D.slice()),m=d.length,m<b&&d.unshift(0),n(w,d,b),s==-1&&(b=w.length,s=t(D,w,M,b),s<1&&(h++,n(w,M<b?R:D,b))),b=w.length):s===0&&(h++,w=[0]),x[f++]=h,s&&w[0]?w[b++]=L[A]||0:(w=[L[A]],b=1);while((A++<C||w[0]!==void 0)&&E--)}return x[0]||x.shift(),v.e=c,qt(v,o?a+An(v)+1:a)}})();function Bee(e,t){var n,r,i,a,o,s,c=0,f=0,h=e.constructor,d=h.precision;if(An(e)>16)throw Error(Uk+An(e));if(!e.s)return new h(ii);for(en=!1,s=d,o=new h(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(r=Math.log(fc(2,f))/Math.LN10*2+5|0,s+=r,n=i=a=new h(ii),h.precision=s;;){if(i=qt(i.times(e),s),n=n.times(++c),o=a.plus(Bo(i,n,s)),ka(o.d).slice(0,s)===ka(a.d).slice(0,s)){for(;f--;)a=qt(a.times(a),s);return h.precision=d,t==null?(en=!0,qt(a,d)):a}a=o}}function An(e){for(var t=e.e*Xt,n=e.d[0];n>=10;n/=10)t++;return t}function aO(e,t,n){if(t>e.LN10.sd())throw en=!0,n&&(e.precision=n),Error(Li+"LN10 precision limit exceeded");return qt(new e(e.LN10),t)}function Ys(e){for(var t="";e--;)t+="0";return t}function Rm(e,t){var n,r,i,a,o,s,c,f,h,d=1,m=10,v=e,x=v.d,w=v.constructor,b=w.precision;if(v.s<1)throw Error(Li+(v.s?"NaN":"-Infinity"));if(v.eq(ii))return new w(0);if(t==null?(en=!1,f=b):f=t,v.eq(10))return t==null&&(en=!0),aO(w,f);if(f+=m,w.precision=f,n=ka(x),r=n.charAt(0),a=An(v),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=ka(v.d),r=n.charAt(0),d++;a=An(v),r>1?(v=new w("0."+n),a++):v=new w(r+"."+n.slice(1))}else return c=aO(w,f+2,b).times(a+""),v=Rm(new w(r+"."+n.slice(1)),f-m).plus(c),w.precision=b,t==null?(en=!0,qt(v,b)):v;for(s=o=v=Bo(v.minus(ii),v.plus(ii),f),h=qt(v.times(v),f),i=3;;){if(o=qt(o.times(h),f),c=s.plus(Bo(o,new w(i),f)),ka(c.d).slice(0,f)===ka(s.d).slice(0,f))return s=s.times(2),a!==0&&(s=s.plus(aO(w,f+2,b).times(a+""))),s=Bo(s,new w(d),f),w.precision=b,t==null?(en=!0,qt(s,b)):s;s=c,i+=2}}function T8(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=sh(n/Xt),e.d=[],r=(n+1)%Xt,n<0&&(r+=Xt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Xt;r<i;)e.d.push(+t.slice(r,r+=Xt));t=t.slice(r),r=Xt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),en&&(e.e>$x||e.e<-$x))throw Error(Uk+n)}else e.s=0,e.e=0,e.d=[0];return e}function qt(e,t,n){var r,i,a,o,s,c,f,h,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=Xt,i=t,f=d[h=0];else{if(h=Math.ceil((r+1)/Xt),a=d.length,h>=a)return e;for(f=a=d[h],o=1;a>=10;a/=10)o++;r%=Xt,i=r-Xt+o}if(n!==void 0&&(a=fc(10,o-i-1),s=f/a%10|0,c=t<0||d[h+1]!==void 0||f%a,c=n<4?(s||c)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||c||n==6&&(r>0?i>0?f/fc(10,o-i):0:d[h-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return c?(a=An(e),d.length=1,t=t-a-1,d[0]=fc(10,(Xt-t%Xt)%Xt),e.e=sh(-t/Xt)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=h,a=1,h--):(d.length=h+1,a=fc(10,Xt-r),d[h]=i>0?(f/fc(10,o-i)%fc(10,i)|0)*a:0),c)for(;;)if(h==0){(d[0]+=a)==Fn&&(d[0]=1,++e.e);break}else{if(d[h]+=a,d[h]!=Fn)break;d[h--]=0,a=1}for(r=d.length;d[--r]===0;)d.pop();if(en&&(e.e>$x||e.e<-$x))throw Error(Uk+An(e));return e}function qee(e,t){var n,r,i,a,o,s,c,f,h,d,m=e.constructor,v=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),en?qt(t,v):t;if(c=e.d,d=t.d,r=t.e,f=e.e,c=c.slice(),o=f-r,o){for(h=o<0,h?(n=c,o=-o,s=d.length):(n=d,r=f,s=c.length),i=Math.max(Math.ceil(v/Xt),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=c.length,s=d.length,h=i<s,h&&(s=i),i=0;i<s;i++)if(c[i]!=d[i]){h=c[i]<d[i];break}o=0}for(h&&(n=c,c=d,d=n,t.s=-t.s),s=c.length,i=d.length-s;i>0;--i)c[s++]=0;for(i=d.length;i>o;){if(c[--i]<d[i]){for(a=i;a&&c[--a]===0;)c[a]=Fn-1;--c[a],c[i]+=Fn}c[i]-=d[i]}for(;c[--s]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,en?qt(t,v):t):new m(0)}function ru(e,t,n){var r,i=An(e),a=ka(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+Ys(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ys(-i-1)+a,n&&(r=n-o)>0&&(a+=Ys(r))):i>=o?(a+=Ys(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Ys(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=Ys(r))),e.s<0?"-"+a:a}function j8(e,t){if(e.length>t)return e.length=t,!0}function zee(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($c+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 T8(o,a.toString())}else if(typeof a!="string")throw Error($c+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,nRe.test(a))T8(o,a);else throw Error($c+a)}if(i.prototype=Ne,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=zee,i.config=i.set=rRe,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 rRe(e){if(!e||typeof e!="object")throw Error(Li+"Object expected");var t,n,r,i=["precision",1,oh,"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(sh(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error($c+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error($c+n+": "+r);return this}var Hk=zee(tRe);ii=new Hk(1);const Lt=Hk;function iRe(e){return lRe(e)||sRe(e)||oRe(e)||aRe()}function aRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
454
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oRe(e,t){if(e){if(typeof e=="string")return bR(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 bR(e,t)}}function sRe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function lRe(e){if(Array.isArray(e))return bR(e)}function bR(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 cRe=function(t){return t},Fee={},Vee=function(t){return t===Fee},N8=function(t){return function n(){return arguments.length===0||arguments.length===1&&Vee(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},uRe=function e(t,n){return t===1?n:N8(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.filter(function(s){return s!==Fee}).length;return o>=t?n.apply(void 0,i):e(t-o,N8(function(){for(var s=arguments.length,c=new Array(s),f=0;f<s;f++)c[f]=arguments[f];var h=i.map(function(d){return Vee(d)?c.shift():d});return n.apply(void 0,iRe(h).concat(c))}))})},Hw=function(t){return uRe(t.length,t)},xR=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},fRe=Hw(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),dRe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return cRe;var i=n.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(s,c){return c(s)},a.apply(void 0,arguments))}},wR=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},Uee=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(s,c){return s===n[c]})||(n=a,r=t.apply(void 0,a)),r}};function hRe(e){var t;return e===0?t=1:t=Math.floor(new Lt(e).abs().log(10).toNumber())+1,t}function pRe(e,t,n){for(var r=new Lt(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var mRe=Hw(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),gRe=Hw(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),vRe=Hw(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Gw={rangeStep:pRe,getDigitCount:hRe,interpolateNumber:mRe,uninterpolateNumber:gRe,uninterpolateTruncation:vRe};function SR(e){return xRe(e)||bRe(e)||Hee(e)||yRe()}function yRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
455
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bRe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function xRe(e){if(Array.isArray(e))return _R(e)}function Pm(e,t){return _Re(e)||SRe(e,t)||Hee(e,t)||wRe()}function wRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
456
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hee(e,t){if(e){if(typeof e=="string")return _R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _R(e,t)}}function _R(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function SRe(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](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,a=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function _Re(e){if(Array.isArray(e))return e}function Gee(e){var t=Pm(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function Kee(e,t,n){if(e.lte(0))return new Lt(0);var r=Gw.getDigitCount(e.toNumber()),i=new Lt(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new Lt(Math.ceil(a.div(o).toNumber())).add(n).mul(o),c=s.mul(i);return t?c:new Lt(Math.ceil(c))}function ERe(e,t,n){var r=1,i=new Lt(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Lt(10).pow(Gw.getDigitCount(e)-1),i=new Lt(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Lt(Math.floor(e)))}else e===0?i=new Lt(Math.floor((t-1)/2)):n||(i=new Lt(Math.floor(e)));var o=Math.floor((t-1)/2),s=dRe(fRe(function(c){return i.add(new Lt(c-o).mul(r)).toNumber()}),xR);return s(0,t)}function Wee(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 Lt(0),tickMin:new Lt(0),tickMax:new Lt(0)};var a=Kee(new Lt(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Lt(0):(o=new Lt(e).add(t).div(2),o=o.sub(new Lt(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new Lt(t).sub(o).div(a).toNumber()),f=s+c+1;return f>n?Wee(e,t,n,r,i+1):(f<n&&(c=t>0?c+(n-f):c,s=t>0?s:s+(n-f)),{step:a,tickMin:o.sub(new Lt(s).mul(a)),tickMax:o.add(new Lt(c).mul(a))})}function ARe(e){var t=Pm(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),s=Gee([n,r]),c=Pm(s,2),f=c[0],h=c[1];if(f===-1/0||h===1/0){var d=h===1/0?[f].concat(SR(xR(0,i-1).map(function(){return 1/0}))):[].concat(SR(xR(0,i-1).map(function(){return-1/0})),[h]);return n>r?wR(d):d}if(f===h)return ERe(f,i,a);var m=Wee(f,h,o,a),v=m.step,x=m.tickMin,w=m.tickMax,b=Gw.rangeStep(x,w.add(new Lt(.1).mul(v)),v);return n>r?wR(b):b}function CRe(e,t){var n=Pm(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Gee([r,i]),s=Pm(o,2),c=s[0],f=s[1];if(c===-1/0||f===1/0)return[r,i];if(c===f)return[c];var h=Math.max(t,2),d=Kee(new Lt(f).sub(c).div(h-1),a,0),m=[].concat(SR(Gw.rangeStep(new Lt(c),new Lt(f).sub(new Lt(.99).mul(d)),d)),[f]);return r>i?wR(m):m}var TRe=Uee(ARe),jRe=Uee(CRe),NRe="Invariant failed";function iu(e,t){throw new Error(NRe)}var ORe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function wd(e){"@babel/helpers - typeof";return wd=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},wd(e)}function Bx(){return Bx=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},Bx.apply(this,arguments)}function MRe(e,t){return DRe(e)||kRe(e,t)||PRe(e,t)||RRe()}function RRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
457
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PRe(e,t){if(e){if(typeof e=="string")return O8(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 O8(e,t)}}function O8(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 kRe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function DRe(e){if(Array.isArray(e))return e}function IRe(e,t){if(e==null)return{};var n=LRe(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 LRe(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 $Re(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BRe(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,Qee(r.key),r)}}function qRe(e,t,n){return t&&BRe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function zRe(e,t,n){return t=qx(t),FRe(e,Yee()?Reflect.construct(t,n||[],qx(e).constructor):t.apply(e,n))}function FRe(e,t){if(t&&(wd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VRe(e)}function VRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Yee=function(){return!!e})()}function qx(e){return qx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qx(e)}function URe(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&&ER(e,t)}function ER(e,t){return ER=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ER(e,t)}function Xee(e,t,n){return t=Qee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qee(e){var t=HRe(e,"string");return wd(t)=="symbol"?t:t+""}function HRe(e,t){if(wd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Kw=(function(e){function t(){return $Re(this,t),zRe(this,t,arguments)}return URe(t,e),qRe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,o=r.width,s=r.dataKey,c=r.data,f=r.dataPointFormatter,h=r.xAxis,d=r.yAxis,m=IRe(r,ORe),v=ct(m,!1);this.props.direction==="x"&&h.type!=="number"&&iu();var x=c.map(function(w){var b=f(w,s),S=b.x,E=b.y,_=b.value,A=b.errorVal;if(!A)return null;var C=[],N,M;if(Array.isArray(A)){var R=MRe(A,2);N=R[0],M=R[1]}else N=M=A;if(a==="vertical"){var P=h.scale,$=E+i,L=$+o,D=$-o,F=P(_-N),I=P(_+M);C.push({x1:I,y1:L,x2:I,y2:D}),C.push({x1:F,y1:$,x2:I,y2:$}),C.push({x1:F,y1:L,x2:F,y2:D})}else if(a==="horizontal"){var q=d.scale,k=S+i,z=k-o,H=k+o,G=q(_-N),Q=q(_+M);C.push({x1:z,y1:Q,x2:H,y2:Q}),C.push({x1:k,y1:G,x2:k,y2:Q}),C.push({x1:z,y1:G,x2:H,y2:G})}return Z.createElement(on,Bx({className:"recharts-errorBar",key:"bar-".concat(C.map(function(U){return"".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))},v),C.map(function(U){return Z.createElement("line",Bx({},U,{key:"line-".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))}))});return Z.createElement(on,{className:"recharts-errorBars"},x)}}])})(Z.Component);Xee(Kw,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Xee(Kw,"displayName","ErrorBar");function km(e){"@babel/helpers - typeof";return km=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},km(e)}function M8(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 oc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M8(Object(n),!0).forEach(function(r){GRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GRe(e,t,n){return t=KRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KRe(e){var t=WRe(e,"string");return km(t)=="symbol"?t:t+""}function WRe(e,t){if(km(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(km(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zee=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=Zr(n,$o);if(!o)return null;var s=$o.defaultProps,c=s!==void 0?oc(oc({},s),o.props):{},f;return o.props&&o.props.payload?f=o.props&&o.props.payload:a==="children"?f=(r||[]).reduce(function(h,d){var m=d.item,v=d.props,x=v.sectors||v.data||[];return h.concat(x.map(function(w){return{type:o.props.iconType||m.props.legendType,value:w.name,color:w.fill,payload:w}}))},[]):f=(r||[]).map(function(h){var d=h.item,m=d.type.defaultProps,v=m!==void 0?oc(oc({},m),d.props):{},x=v.dataKey,w=v.name,b=v.legendType,S=v.hide;return{inactive:S,dataKey:x,type:c.iconType||b||"square",color:Gk(d),value:w||x,payload:v}}),oc(oc(oc({},c),$o.getWithHeight(o,i)),{},{payload:f,item:o})};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 R8(e){return ZRe(e)||QRe(e)||XRe(e)||YRe()}function YRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
458
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XRe(e,t){if(e){if(typeof e=="string")return AR(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 AR(e,t)}}function QRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZRe(e){if(Array.isArray(e))return AR(e)}function AR(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 P8(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 fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P8(Object(n),!0).forEach(function(r){kf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kf(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=ePe(e,"string");return Dm(t)=="symbol"?t:t+""}function ePe(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 ci(e,t,n){return dt(e)||dt(t)?n:kn(t)?ki(e,t,n):tt(t)?t(e):n}function Fp(e,t,n,r){var i=ZMe(e,function(s){return ci(s,t)});if(n==="number"){var a=i.filter(function(s){return _e(s)||parseFloat(s)});return a.length?[Uw(a),dl(a)]:[1/0,-1/0]}var o=r?i.filter(function(s){return!dt(s)}):i;return o.map(function(s){return kn(s)||s instanceof Date?s:""})}var tPe=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,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,f=0;f<s;f++){var h=f>0?i[f-1].coordinate:i[s-1].coordinate,d=i[f].coordinate,m=f>=s-1?i[0].coordinate:i[f+1].coordinate,v=void 0;if(oa(d-h)!==oa(m-d)){var x=[];if(oa(m-d)===oa(c[1]-c[0])){v=m;var w=d+c[1]-c[0];x[0]=Math.min(w,(w+h)/2),x[1]=Math.max(w,(w+h)/2)}else{v=h;var b=m+c[1]-c[0];x[0]=Math.min(d,(b+d)/2),x[1]=Math.max(d,(b+d)/2)}var S=[Math.min(d,(v+d)/2),Math.max(d,(v+d)/2)];if(t>S[0]&&t<=S[1]||t>=x[0]&&t<=x[1]){o=i[f].index;break}}else{var E=Math.min(h,m),_=Math.max(h,m);if(t>(E+d)/2&&t<=(_+d)/2){o=i[f].index;break}}}else for(var A=0;A<s;A++)if(A===0&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A>0&&A<s-1&&t>(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===s-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){o=r[A].index;break}return o},Gk=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?fn(fn({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:s;break;default:c=s;break}return c},nPe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),c=0,f=s.length;c<f;c++)for(var h=a[s[c]].stackGroups,d=Object.keys(h),m=0,v=d.length;m<v;m++){var x=h[d[m]],w=x.items,b=x.cateAxisId,S=w.filter(function(M){return Io(M.type).indexOf("Bar")>=0});if(S&&S.length){var E=S[0].type.defaultProps,_=E!==void 0?fn(fn({},E),S[0].props):S[0].props,A=_.barSize,C=_[b];o[C]||(o[C]=[]);var N=dt(A)?n:A;o[C].push({item:S[0],stackList:S.slice(1),barSize:dt(N)?void 0:nu(N,r,0)})}}return o},rPe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,c=o.length;if(c<1)return null;var f=nu(n,i,0,!0),h,d=[];if(o[0].barSize===+o[0].barSize){var m=!1,v=i/c,x=o.reduce(function(A,C){return A+C.barSize||0},0);x+=(c-1)*f,x>=i&&(x-=(c-1)*f,f=0),x>=i&&v>0&&(m=!0,v*=.9,x=c*v);var w=(i-x)/2>>0,b={offset:w-f,size:0};h=o.reduce(function(A,C){var N={item:C.item,position:{offset:b.offset+b.size+f,size:m?v:C.barSize}},M=[].concat(R8(A),[N]);return b=M[M.length-1].position,C.stackList&&C.stackList.length&&C.stackList.forEach(function(R){M.push({item:R,position:b})}),M},d)}else{var S=nu(r,i,0,!0);i-2*S-(c-1)*f<=0&&(f=0);var E=(i-2*S-(c-1)*f)/c;E>1&&(E>>=0);var _=s===+s?Math.min(E,s):E;h=o.reduce(function(A,C,N){var M=[].concat(R8(A),[{item:C.item,position:{offset:S+(E+f)*N+(E-_)/2,size:_}}]);return C.stackList&&C.stackList.length&&C.stackList.forEach(function(R){M.push({item:R,position:M[M.length-1].position})}),M},d)}return h},iPe=function(t,n,r,i){var a=r.children,o=r.width,s=r.margin,c=o-(s.left||0)-(s.right||0),f=Zee({children:a,legendWidth:c});if(f){var h=i||{},d=h.width,m=h.height,v=f.align,x=f.verticalAlign,w=f.layout;if((w==="vertical"||w==="horizontal"&&x==="middle")&&v!=="center"&&_e(t[v]))return fn(fn({},t),{},kf({},v,t[v]+(d||0)));if((w==="horizontal"||w==="vertical"&&v==="center")&&x!=="middle"&&_e(t[x]))return fn(fn({},t),{},kf({},x,t[x]+(m||0)))}return t},aPe=function(t,n,r){return dt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Jee=function(t,n,r,i,a){var o=n.props.children,s=sa(o,Kw).filter(function(f){return aPe(i,a,f.props.direction)});if(s&&s.length){var c=s.map(function(f){return f.props.dataKey});return t.reduce(function(f,h){var d=ci(h,r);if(dt(d))return f;var m=Array.isArray(d)?[Uw(d),dl(d)]:[d,d],v=c.reduce(function(x,w){var b=ci(h,w,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,x[0]),Math.max(E,x[1])]},[1/0,-1/0]);return[Math.min(v[0],f[0]),Math.max(v[1],f[1])]},[1/0,-1/0])}return null},oPe=function(t,n,r,i,a){var o=n.map(function(s){return Jee(t,s,r,a,i)}).filter(function(s){return!dt(s)});return o&&o.length?o.reduce(function(s,c){return[Math.min(s[0],c[0]),Math.max(s[1],c[1])]},[1/0,-1/0]):null},ete=function(t,n,r,i,a){var o=n.map(function(c){var f=c.props.dataKey;return r==="number"&&f&&Jee(t,c,f,i)||Fp(t,f,r,a)});if(r==="number")return o.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);var s={};return o.reduce(function(c,f){for(var h=0,d=f.length;h<d;h++)s[f[h]]||(s[f[h]]=!0,c.push(f[h]));return c},[])},tte=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},nte=function(t,n,r,i){if(i)return t.map(function(c){return c.coordinate});var a,o,s=t.map(function(c){return c.coordinate===n&&(a=!0),c.coordinate===r&&(o=!0),c.coordinate});return a||s.push(n),o||s.push(r),s},Po=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,s=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,f=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/c:0;if(f=t.axisType==="angleAxis"&&(s==null?void 0:s.length)>=2?oa(s[0]-s[1])*2*f:f,n&&(t.ticks||t.niceTicks)){var h=(t.ticks||t.niceTicks).map(function(d){var m=a?a.indexOf(d):d;return{coordinate:i(m)+f,value:d,offset:f}});return h.filter(function(d){return!ih(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,m){return{coordinate:i(d)+f,value:d,index:m,offset:f}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+f,value:d,offset:f}}):i.domain().map(function(d,m){return{coordinate:i(d)+f,value:a?a[d]:d,index:m,offset:f}})},oO=new WeakMap,Gy=function(t,n){if(typeof n!="function")return t;oO.has(t)||oO.set(t,new WeakMap);var r=oO.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},sPe=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Nm(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:kx(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:zp(),realScaleType:"point"}:a==="category"?{scale:Nm(),realScaleType:"band"}:{scale:kx(),realScaleType:"linear"};if(tu(i)){var c="scale".concat(Pw(i));return{scale:(E8[c]||zp)(),realScaleType:E8[c]?c:"point"}}return tt(i)?{scale:i}:{scale:zp(),realScaleType:"point"}},k8=1e-4,lPe=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])-k8,o=Math.max(i[0],i[1])+k8,s=t(n[0]),c=t(n[r-1]);(s<a||s>o||c<a||c>o)&&t.domain([n[0],n[r-1]])}},cPe=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},uPe=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},fPe=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,s=0;s<n;++s){var c=ih(t[s][r][1])?t[s][r][0]:t[s][r][1];c>=0?(t[s][r][0]=a,t[s][r][1]=a+c,a=t[s][r][1]):(t[s][r][0]=o,t[s][r][1]=o+c,o=t[s][r][1])}},dPe=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 s=ih(t[o][r][1])?t[o][r][0]:t[o][r][1];s>=0?(t[o][r][0]=a,t[o][r][1]=a+s,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},hPe={sign:fPe,expand:LTe,none:hd,silhouette:$Te,wiggle:BTe,positive:dPe},pPe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),a=hPe[r],o=ITe().keys(i).value(function(s,c){return+ci(s,c,0)}).order(rR).offset(a);return o(t)},mPe=function(t,n,r,i,a,o){if(!t)return null;var s=o?n.reverse():n,c={},f=s.reduce(function(d,m){var v,x=(v=m.type)!==null&&v!==void 0&&v.defaultProps?fn(fn({},m.type.defaultProps),m.props):m.props,w=x.stackId,b=x.hide;if(b)return d;var S=x[r],E=d[S]||{hasStack:!1,stackGroups:{}};if(kn(w)){var _=E.stackGroups[w]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(m),E.hasStack=!0,E.stackGroups[w]=_}else E.stackGroups[Vg("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[m]};return fn(fn({},d),{},kf({},S,E))},c),h={};return Object.keys(f).reduce(function(d,m){var v=f[m];if(v.hasStack){var x={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(w,b){var S=v.stackGroups[b];return fn(fn({},w),{},kf({},b,{numericAxisId:r,cateAxisId:i,items:S.items,stackedData:pPe(t,S.items,a)}))},x)}return fn(fn({},d),{},kf({},m,v))},h)},gPe=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var f=t.domain();if(!f.length)return null;var h=TRe(f,a,s);return t.domain([Uw(h),dl(h)]),{niceTicks:h}}if(a&&i==="number"){var d=t.domain(),m=jRe(d,a,s);return{niceTicks:m}}return null};function D8(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&&!dt(i[t.dataKey])){var s=gx(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var c=ci(i,dt(o)?t.dataKey:o);return dt(c)?null:t.scale(c)}var I8=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var c=ci(o,n.dataKey,n.domain[s]);return dt(c)?null:n.scale(c)-a/2+i},vPe=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]},yPe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?fn(fn({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(kn(a)){var o=n[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},bPe=function(t){return t.reduce(function(n,r){return[Uw(r.concat([n[0]]).filter(_e)),dl(r.concat([n[1]]).filter(_e))]},[1/0,-1/0])},rte=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,c=s.reduce(function(f,h){var d=bPe(h.slice(n,r+1));return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},L8=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,$8=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,CR=function(t,n,r){if(tt(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(L8.test(t[0])){var a=+L8.exec(t[0])[1];i[0]=n[0]-a}else tt(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($8.test(t[1])){var o=+$8.exec(t[1])[1];i[1]=n[1]+o}else tt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},zx=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=_k(n,function(d){return d.coordinate}),o=1/0,s=1,c=a.length;s<c;s++){var f=a[s],h=a[s-1];o=Math.min((f.coordinate||0)-(h.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},B8=function(t,n,r){return!t||!t.length||Mm(t,ki(r,"type.defaultProps.domain"))?n:t},ite=function(t,n){var r=t.type.defaultProps?fn(fn({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,o=r.unit,s=r.formatter,c=r.tooltipType,f=r.chartType,h=r.hide;return fn(fn({},ct(t,!1)),{},{dataKey:i,unit:o,formatter:s,name:a||i,color:Gk(t),value:ci(n,i),type:c,payload:n,chartType:f,hide:h})};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)}function q8(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 z8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q8(Object(n),!0).forEach(function(r){xPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xPe(e,t,n){return t=wPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wPe(e){var t=SPe(e,"string");return Im(t)=="symbol"?t:t+""}function SPe(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)}var Fx=Math.PI/180,_Pe=function(t){return t*180/Math.PI},Jn=function(t,n,r,i){return{x:t+Math.cos(-Fx*i)*r,y:n+Math.sin(-Fx*i)*r}},EPe=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))},APe=function(t,n){var r=t.x,i=t.y,a=n.cx,o=n.cy,s=EPe({x:r,y:i},{x:a,y:o});if(s<=0)return{radius:s};var c=(r-a)/s,f=Math.acos(c);return i>o&&(f=2*Math.PI-f),{radius:s,angle:_Pe(f),angleInRadian:f}},CPe=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}},TPe=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},F8=function(t,n){var r=t.x,i=t.y,a=APe({x:r,y:i},n),o=a.radius,s=a.angle,c=n.innerRadius,f=n.outerRadius;if(o<c||o>f)return!1;if(o===0)return!0;var h=CPe(n),d=h.startAngle,m=h.endAngle,v=s,x;if(d<=m){for(;v>m;)v-=360;for(;v<d;)v+=360;x=v>=d&&v<=m}else{for(;v>d;)v-=360;for(;v<m;)v+=360;x=v>=m&&v<=d}return x?z8(z8({},n),{},{radius:o,angle:TPe(v,n)}):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)}var jPe=["offset"];function NPe(e){return PPe(e)||RPe(e)||MPe(e)||OPe()}function OPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
459
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MPe(e,t){if(e){if(typeof e=="string")return TR(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 TR(e,t)}}function RPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PPe(e){if(Array.isArray(e))return TR(e)}function TR(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 kPe(e,t){if(e==null)return{};var n=DPe(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 DPe(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 V8(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 Mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V8(Object(n),!0).forEach(function(r){IPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IPe(e,t,n){return t=LPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LPe(e){var t=$Pe(e,"string");return Lm(t)=="symbol"?t:t+""}function $Pe(e,t){if(Lm(e)!="object"||!e)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 $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)}var BPe=function(t){var n=t.value,r=t.formatter,i=dt(t.children)?n:t.children;return tt(r)?r(i):i},qPe=function(t,n){var r=oa(n-t),i=Math.min(Math.abs(n-t),360);return r*i},zPe=function(t,n,r){var i=t.position,a=t.viewBox,o=t.offset,s=t.className,c=a,f=c.cx,h=c.cy,d=c.innerRadius,m=c.outerRadius,v=c.startAngle,x=c.endAngle,w=c.clockWise,b=(d+m)/2,S=qPe(v,x),E=S>=0?1:-1,_,A;i==="insideStart"?(_=v+E*o,A=w):i==="insideEnd"?(_=x-E*o,A=!w):i==="end"&&(_=x+E*o,A=w),A=S<=0?A:!A;var C=Jn(f,h,b,_),N=Jn(f,h,b,_+(A?1:-1)*359),M="M".concat(C.x,",").concat(C.y,`
460
+ A`).concat(b,",").concat(b,",0,1,").concat(A?0:1,`,
461
+ `).concat(N.x,",").concat(N.y),R=dt(t.id)?Vg("recharts-radial-line-"):t.id;return Z.createElement("text",$m({},r,{dominantBaseline:"central",className:gt("recharts-radial-bar-label",s)}),Z.createElement("defs",null,Z.createElement("path",{id:R,d:M})),Z.createElement("textPath",{xlinkHref:"#".concat(R)},n))},FPe=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,s=a.cy,c=a.innerRadius,f=a.outerRadius,h=a.startAngle,d=a.endAngle,m=(h+d)/2;if(i==="outside"){var v=Jn(o,s,f+r,m),x=v.x,w=v.y;return{x,y:w,textAnchor:x>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(c+f)/2,S=Jn(o,s,b,m),E=S.x,_=S.y;return{x:E,y:_,textAnchor:"middle",verticalAnchor:"middle"}},VPe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,s=o.x,c=o.y,f=o.width,h=o.height,d=h>=0?1:-1,m=d*i,v=d>0?"end":"start",x=d>0?"start":"end",w=f>=0?1:-1,b=w*i,S=w>0?"end":"start",E=w>0?"start":"end";if(a==="top"){var _={x:s+f/2,y:c-d*i,textAnchor:"middle",verticalAnchor:v};return Mn(Mn({},_),r?{height:Math.max(c-r.y,0),width:f}:{})}if(a==="bottom"){var A={x:s+f/2,y:c+h+m,textAnchor:"middle",verticalAnchor:x};return Mn(Mn({},A),r?{height:Math.max(r.y+r.height-(c+h),0),width:f}:{})}if(a==="left"){var C={x:s-b,y:c+h/2,textAnchor:S,verticalAnchor:"middle"};return Mn(Mn({},C),r?{width:Math.max(C.x-r.x,0),height:h}:{})}if(a==="right"){var N={x:s+f+b,y:c+h/2,textAnchor:E,verticalAnchor:"middle"};return Mn(Mn({},N),r?{width:Math.max(r.x+r.width-N.x,0),height:h}:{})}var M=r?{width:f,height:h}:{};return a==="insideLeft"?Mn({x:s+b,y:c+h/2,textAnchor:E,verticalAnchor:"middle"},M):a==="insideRight"?Mn({x:s+f-b,y:c+h/2,textAnchor:S,verticalAnchor:"middle"},M):a==="insideTop"?Mn({x:s+f/2,y:c+m,textAnchor:"middle",verticalAnchor:x},M):a==="insideBottom"?Mn({x:s+f/2,y:c+h-m,textAnchor:"middle",verticalAnchor:v},M):a==="insideTopLeft"?Mn({x:s+b,y:c+m,textAnchor:E,verticalAnchor:x},M):a==="insideTopRight"?Mn({x:s+f-b,y:c+m,textAnchor:S,verticalAnchor:x},M):a==="insideBottomLeft"?Mn({x:s+b,y:c+h-m,textAnchor:E,verticalAnchor:v},M):a==="insideBottomRight"?Mn({x:s+f-b,y:c+h-m,textAnchor:S,verticalAnchor:v},M):rh(a)&&(_e(a.x)||vc(a.x))&&(_e(a.y)||vc(a.y))?Mn({x:s+nu(a.x,f),y:c+nu(a.y,h),textAnchor:"end",verticalAnchor:"end"},M):Mn({x:s+f/2,y:c+h/2,textAnchor:"middle",verticalAnchor:"middle"},M)},UPe=function(t){return"cx"in t&&_e(t.cx)};function fr(e){var t=e.offset,n=t===void 0?5:t,r=kPe(e,jPe),i=Mn({offset:n},r),a=i.viewBox,o=i.position,s=i.value,c=i.children,f=i.content,h=i.className,d=h===void 0?"":h,m=i.textBreakAll;if(!a||dt(s)&&dt(c)&&!j.isValidElement(f)&&!tt(f))return null;if(j.isValidElement(f))return j.cloneElement(f,i);var v;if(tt(f)){if(v=j.createElement(f,i),j.isValidElement(v))return v}else v=BPe(i);var x=UPe(a),w=ct(i,!0);if(x&&(o==="insideStart"||o==="insideEnd"||o==="end"))return zPe(i,v,w);var b=x?FPe(i):VPe(i);return Z.createElement(Nx,$m({className:gt("recharts-label",d)},w,b,{breakAll:m}),v)}fr.displayName="Label";var ate=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,c=t.radius,f=t.innerRadius,h=t.outerRadius,d=t.x,m=t.y,v=t.top,x=t.left,w=t.width,b=t.height,S=t.clockWise,E=t.labelViewBox;if(E)return E;if(_e(w)&&_e(b)){if(_e(d)&&_e(m))return{x:d,y:m,width:w,height:b};if(_e(v)&&_e(x))return{x:v,y:x,width:w,height:b}}return _e(d)&&_e(m)?{x:d,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:h||c||s||0,clockWise:S}:t.viewBox?t.viewBox:{}},HPe=function(t,n){return t?t===!0?Z.createElement(fr,{key:"label-implicit",viewBox:n}):kn(t)?Z.createElement(fr,{key:"label-implicit",viewBox:n,value:t}):j.isValidElement(t)?t.type===fr?j.cloneElement(t,{key:"label-implicit",viewBox:n}):Z.createElement(fr,{key:"label-implicit",content:t,viewBox:n}):tt(t)?Z.createElement(fr,{key:"label-implicit",content:t,viewBox:n}):rh(t)?Z.createElement(fr,$m({viewBox:n},t,{key:"label-implicit"})):null:null},GPe=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=ate(t),o=sa(i,fr).map(function(c,f){return j.cloneElement(c,{viewBox:n||a,key:"label-".concat(f)})});if(!r)return o;var s=HPe(t.label,n||a);return[s].concat(NPe(o))};fr.parseViewBox=ate;fr.renderCallByParent=GPe;var KPe=hJ();const WPe=Ct(KPe);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)}var YPe=["valueAccessor"],XPe=["data","dataKey","clockWise","id","textBreakAll"];function QPe(e){return t2e(e)||e2e(e)||JPe(e)||ZPe()}function ZPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
462
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JPe(e,t){if(e){if(typeof e=="string")return jR(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 jR(e,t)}}function e2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function t2e(e){if(Array.isArray(e))return jR(e)}function jR(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 Vx(){return Vx=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},Vx.apply(this,arguments)}function U8(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 H8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U8(Object(n),!0).forEach(function(r){n2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n2e(e,t,n){return t=r2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r2e(e){var t=i2e(e,"string");return Bm(t)=="symbol"?t:t+""}function i2e(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 G8(e,t){if(e==null)return{};var n=a2e(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 a2e(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 o2e=function(t){return Array.isArray(t.value)?WPe(t.value):t.value};function wl(e){var t=e.valueAccessor,n=t===void 0?o2e:t,r=G8(e,YPe),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,c=r.textBreakAll,f=G8(r,XPe);return!i||!i.length?null:Z.createElement(on,{className:"recharts-label-list"},i.map(function(h,d){var m=dt(a)?n(h,d):ci(h&&h.payload,a),v=dt(s)?{}:{id:"".concat(s,"-").concat(d)};return Z.createElement(fr,Vx({},ct(h,!0),f,v,{parentViewBox:h.parentViewBox,value:m,textBreakAll:c,viewBox:fr.parseViewBox(dt(o)?h:H8(H8({},h),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}wl.displayName="LabelList";function s2e(e,t){return e?e===!0?Z.createElement(wl,{key:"labelList-implicit",data:t}):Z.isValidElement(e)||tt(e)?Z.createElement(wl,{key:"labelList-implicit",data:t,content:e}):rh(e)?Z.createElement(wl,Vx({data:t},e,{key:"labelList-implicit"})):null:null}function l2e(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=sa(r,wl).map(function(o,s){return j.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var a=s2e(e.label,t);return[a].concat(QPe(i))}wl.renderCallByParent=l2e;function qm(e){"@babel/helpers - typeof";return qm=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},qm(e)}function NR(){return NR=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},NR.apply(this,arguments)}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 W8(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){c2e(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 c2e(e,t,n){return t=u2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u2e(e){var t=f2e(e,"string");return qm(t)=="symbol"?t:t+""}function f2e(e,t){if(qm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var d2e=function(t,n){var r=oa(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Ky=function(t){var n=t.cx,r=t.cy,i=t.radius,a=t.angle,o=t.sign,s=t.isExternal,c=t.cornerRadius,f=t.cornerIsExternal,h=c*(s?1:-1)+i,d=Math.asin(c/h)/Fx,m=f?a:a+o*d,v=Jn(n,r,h,m),x=Jn(n,r,i,m),w=f?a-o*d:a,b=Jn(n,r,h*Math.cos(d*Fx),w);return{center:v,circleTangency:x,lineTangency:b,theta:d}},ote=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,s=t.endAngle,c=d2e(o,s),f=o+c,h=Jn(n,r,a,o),d=Jn(n,r,a,f),m="M ".concat(h.x,",").concat(h.y,`
463
+ A `).concat(a,",").concat(a,`,0,
464
+ `).concat(+(Math.abs(c)>180),",").concat(+(o>f),`,
465
+ `).concat(d.x,",").concat(d.y,`
466
+ `);if(i>0){var v=Jn(n,r,i,o),x=Jn(n,r,i,f);m+="L ".concat(x.x,",").concat(x.y,`
467
+ A `).concat(i,",").concat(i,`,0,
468
+ `).concat(+(Math.abs(c)>180),",").concat(+(o<=f),`,
469
+ `).concat(v.x,",").concat(v.y," Z")}else m+="L ".concat(n,",").concat(r," Z");return m},h2e=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,f=t.startAngle,h=t.endAngle,d=oa(h-f),m=Ky({cx:n,cy:r,radius:a,angle:f,sign:d,cornerRadius:o,cornerIsExternal:c}),v=m.circleTangency,x=m.lineTangency,w=m.theta,b=Ky({cx:n,cy:r,radius:a,angle:h,sign:-d,cornerRadius:o,cornerIsExternal:c}),S=b.circleTangency,E=b.lineTangency,_=b.theta,A=c?Math.abs(f-h):Math.abs(f-h)-w-_;if(A<0)return s?"M ".concat(x.x,",").concat(x.y,`
470
+ a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
471
+ a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
472
+ `):ote({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:f,endAngle:h});var C="M ".concat(x.x,",").concat(x.y,`
473
+ A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(v.x,",").concat(v.y,`
474
+ A`).concat(a,",").concat(a,",0,").concat(+(A>180),",").concat(+(d<0),",").concat(S.x,",").concat(S.y,`
475
+ A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(E.x,",").concat(E.y,`
476
+ `);if(i>0){var N=Ky({cx:n,cy:r,radius:i,angle:f,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),M=N.circleTangency,R=N.lineTangency,P=N.theta,$=Ky({cx:n,cy:r,radius:i,angle:h,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),L=$.circleTangency,D=$.lineTangency,F=$.theta,I=c?Math.abs(f-h):Math.abs(f-h)-P-F;if(I<0&&o===0)return"".concat(C,"L").concat(n,",").concat(r,"Z");C+="L".concat(D.x,",").concat(D.y,`
477
+ A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(L.x,",").concat(L.y,`
478
+ A`).concat(i,",").concat(i,",0,").concat(+(I>180),",").concat(+(d>0),",").concat(M.x,",").concat(M.y,`
479
+ A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(R.x,",").concat(R.y,"Z")}else C+="L".concat(n,",").concat(r,"Z");return C},p2e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},ste=function(t){var n=W8(W8({},p2e),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,c=n.forceCornerRadius,f=n.cornerIsExternal,h=n.startAngle,d=n.endAngle,m=n.className;if(o<a||h===d)return null;var v=gt("recharts-sector",m),x=o-a,w=nu(s,x,0,!0),b;return w>0&&Math.abs(h-d)<360?b=h2e({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,x/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:d}):b=ote({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:h,endAngle:d}),Z.createElement("path",NR({},ct(n,!0),{className:v,d:b,role:"img"}))};function zm(e){"@babel/helpers - typeof";return zm=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},zm(e)}function OR(){return OR=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},OR.apply(this,arguments)}function Y8(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 X8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y8(Object(n),!0).forEach(function(r){m2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y8(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function m2e(e,t,n){return t=g2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g2e(e){var t=v2e(e,"string");return zm(t)=="symbol"?t:t+""}function v2e(e,t){if(zm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Q8={curveBasisClosed:ATe,curveBasisOpen:CTe,curveBasis:ETe,curveBumpX:uTe,curveBumpY:fTe,curveLinearClosed:TTe,curveLinear:Dw,curveMonotoneX:jTe,curveMonotoneY:NTe,curveNatural:OTe,curveStep:MTe,curveStepAfter:PTe,curveStepBefore:RTe},Wy=function(t){return t.x===+t.x&&t.y===+t.y},xp=function(t){return t.x},wp=function(t){return t.y},y2e=function(t,n){if(tt(t))return t;var r="curve".concat(Pw(t));return(r==="curveMonotone"||r==="curveBump")&&n?Q8["".concat(r).concat(n==="vertical"?"Y":"X")]:Q8[r]||Dw},b2e=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,c=t.connectNulls,f=c===void 0?!1:c,h=y2e(r,s),d=f?a.filter(function(w){return Wy(w)}):a,m;if(Array.isArray(o)){var v=f?o.filter(function(w){return Wy(w)}):o,x=d.map(function(w,b){return X8(X8({},w),{},{base:v[b]})});return s==="vertical"?m=zy().y(wp).x1(xp).x0(function(w){return w.base.x}):m=zy().x(xp).y1(wp).y0(function(w){return w.base.y}),m.defined(Wy).curve(h),m(x)}return s==="vertical"&&_e(o)?m=zy().y(wp).x1(xp).x0(o):_e(o)?m=zy().x(xp).y1(wp).y0(o):m=DJ().x(xp).y(wp),m.defined(Wy).curve(h),m(d)},Vp=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?b2e(t):i;return j.createElement("path",OR({},ct(t,!1),vx(t),{className:gt("recharts-curve",n),d:o,ref:a}))},sO={exports:{}},lO,Z8;function x2e(){if(Z8)return lO;Z8=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lO=e,lO}var cO,J8;function w2e(){if(J8)return cO;J8=1;var e=x2e();function t(){}function n(){}return n.resetWarningCache=t,cO=function(){function r(o,s,c,f,h,d){if(d!==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},cO}var eH;function S2e(){return eH||(eH=1,sO.exports=w2e()()),sO.exports}var _2e=S2e();const Nt=Ct(_2e),{getOwnPropertyNames:E2e,getOwnPropertySymbols:A2e}=Object,{hasOwnProperty:C2e}=Object.prototype;function uO(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function Yy(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),s=a.get(r);if(o&&s)return o===r&&s===n;a.set(n,r),a.set(r,n);const c=e(n,r,i);return a.delete(n),a.delete(r),c}}function T2e(e){return e!=null?e[Symbol.toStringTag]:void 0}function tH(e){return E2e(e).concat(A2e(e))}const j2e=Object.hasOwn||((e,t)=>C2e.call(e,t));function vu(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const N2e="__v",O2e="__o",M2e="_owner",{getOwnPropertyDescriptor:nH,keys:rH}=Object;function R2e(e,t){return e.byteLength===t.byteLength&&Ux(new Uint8Array(e),new Uint8Array(t))}function P2e(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 k2e(e,t){return e.byteLength===t.byteLength&&Ux(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function D2e(e,t){return vu(e.getTime(),t.getTime())}function I2e(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function L2e(e,t){return e===t}function iH(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,s,c=0;for(;(o=a.next())&&!o.done;){const f=t.entries();let h=!1,d=0;for(;(s=f.next())&&!s.done;){if(i[d]){d++;continue}const m=o.value,v=s.value;if(n.equals(m[0],v[0],c,d,e,t,n)&&n.equals(m[1],v[1],m[0],v[0],e,t,n)){h=i[d]=!0;break}d++}if(!h)return!1;c++}return!0}const $2e=vu;function B2e(e,t,n){const r=rH(e);let i=r.length;if(rH(t).length!==i)return!1;for(;i-- >0;)if(!lte(e,t,n,r[i]))return!1;return!0}function Sp(e,t,n){const r=tH(e);let i=r.length;if(tH(t).length!==i)return!1;let a,o,s;for(;i-- >0;)if(a=r[i],!lte(e,t,n,a)||(o=nH(e,a),s=nH(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function q2e(e,t){return vu(e.valueOf(),t.valueOf())}function z2e(e,t){return e.source===t.source&&e.flags===t.flags}function aH(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,s;for(;(o=a.next())&&!o.done;){const c=t.values();let f=!1,h=0;for(;(s=c.next())&&!s.done;){if(!i[h]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){f=i[h]=!0;break}h++}if(!f)return!1}return!0}function Ux(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 F2e(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 lte(e,t,n,r){return(r===M2e||r===O2e||r===N2e)&&(e.$$typeof||t.$$typeof)?!0:j2e(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const V2e="[object ArrayBuffer]",U2e="[object Arguments]",H2e="[object Boolean]",G2e="[object DataView]",K2e="[object Date]",W2e="[object Error]",Y2e="[object Map]",X2e="[object Number]",Q2e="[object Object]",Z2e="[object RegExp]",J2e="[object Set]",eke="[object String]",tke={"[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},nke="[object URL]",rke=Object.prototype.toString;function ike({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:f,areRegExpsEqual:h,areSetsEqual:d,areTypedArraysEqual:m,areUrlsEqual:v,unknownTagComparators:x}){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"?s(b,S,E):_==="function"?a(b,S,E):!1;const A=b.constructor;if(A!==S.constructor)return!1;if(A===Object)return c(b,S,E);if(Array.isArray(b))return t(b,S,E);if(A===Date)return r(b,S,E);if(A===RegExp)return h(b,S,E);if(A===Map)return o(b,S,E);if(A===Set)return d(b,S,E);const C=rke.call(b);if(C===K2e)return r(b,S,E);if(C===Z2e)return h(b,S,E);if(C===Y2e)return o(b,S,E);if(C===J2e)return d(b,S,E);if(C===Q2e)return typeof b.then!="function"&&typeof S.then!="function"&&c(b,S,E);if(C===nke)return v(b,S,E);if(C===W2e)return i(b,S,E);if(C===U2e)return c(b,S,E);if(tke[C])return m(b,S,E);if(C===V2e)return e(b,S,E);if(C===G2e)return n(b,S,E);if(C===H2e||C===X2e||C===eke)return f(b,S,E);if(x){let N=x[C];if(!N){const M=T2e(b);M&&(N=x[M])}if(N)return N(b,S,E)}return!1}}function ake({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:R2e,areArraysEqual:n?Sp:P2e,areDataViewsEqual:k2e,areDatesEqual:D2e,areErrorsEqual:I2e,areFunctionsEqual:L2e,areMapsEqual:n?uO(iH,Sp):iH,areNumbersEqual:$2e,areObjectsEqual:n?Sp:B2e,arePrimitiveWrappersEqual:q2e,areRegExpsEqual:z2e,areSetsEqual:n?uO(aH,Sp):aH,areTypedArraysEqual:n?uO(Ux,Sp):Ux,areUrlsEqual:F2e,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Yy(r.areArraysEqual),a=Yy(r.areMapsEqual),o=Yy(r.areObjectsEqual),s=Yy(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:s})}return r}function oke(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function ske({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,c){const{cache:f=e?new WeakMap:void 0,meta:h}=n();return t(s,c,{cache:f,equals:r,meta:h,strict:i})};if(e)return function(s,c){return t(s,c,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(s,c){return t(s,c,a)}}const lke=Il();Il({strict:!0});Il({circular:!0});Il({circular:!0,strict:!0});Il({createInternalComparator:()=>vu});Il({strict:!0,createInternalComparator:()=>vu});Il({circular:!0,createInternalComparator:()=>vu});Il({circular:!0,createInternalComparator:()=>vu,strict:!0});function Il(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=ake(e),o=ike(a),s=n?n(o):oke(o);return ske({circular:t,comparator:o,createState:r,equals:s,strict:i})}function cke(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function oH(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):cke(i)};requestAnimationFrame(r)}function MR(e){"@babel/helpers - typeof";return MR=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},MR(e)}function uke(e){return pke(e)||hke(e)||dke(e)||fke()}function fke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
480
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dke(e,t){if(e){if(typeof e=="string")return sH(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 sH(e,t)}}function sH(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 hke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pke(e){if(Array.isArray(e))return e}function mke(){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,s=uke(o),c=s[0],f=s.slice(1);if(typeof c=="number"){oH(i.bind(null,f),c);return}i(c),oH(i.bind(null,f));return}MR(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 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 lH(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 cH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lH(Object(n),!0).forEach(function(r){cte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cte(e,t,n){return t=gke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gke(e){var t=vke(e,"string");return Fm(t)==="symbol"?t:String(t)}function vke(e,t){if(Fm(e)!=="object"||e===null)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 yke=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},bke=function(t){return t},xke=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Up=function(t,n){return Object.keys(n).reduce(function(r,i){return cH(cH({},r),{},cte({},i,t(i,n[i])))},{})},uH=function(t,n,r){return t.map(function(i){return"".concat(xke(i)," ").concat(n,"ms ").concat(r)}).join(",")};function wke(e,t){return Eke(e)||_ke(e,t)||ute(e,t)||Ske()}function Ske(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
481
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _ke(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function Eke(e){if(Array.isArray(e))return e}function Ake(e){return jke(e)||Tke(e)||ute(e)||Cke()}function Cke(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
482
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ute(e,t){if(e){if(typeof e=="string")return RR(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 RR(e,t)}}function Tke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jke(e){if(Array.isArray(e))return RR(e)}function RR(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 Hx=1e-4,fte=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},dte=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},fH=function(t,n){return function(r){var i=fte(t,n);return dte(i,r)}},Nke=function(t,n){return function(r){var i=fte(t,n),a=[].concat(Ake(i.map(function(o,s){return o*s}).slice(1)),[0]);return dte(a,r)}},dH=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],s=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var f=c[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),h=wke(f,4);i=h[0],a=h[1],o=h[2],s=h[3]}}}var d=fH(i,o),m=fH(a,s),v=Nke(i,o),x=function(S){return S>1?1:S<0?0:S},w=function(S){for(var E=S>1?1:S,_=E,A=0;A<8;++A){var C=d(_)-E,N=v(_);if(Math.abs(C-E)<Hx||N<Hx)return m(_);_=x(_-C/N)}return m(_)};return w.isStepper=!1,w},Oke=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,s=o===void 0?17:o,c=function(h,d,m){var v=-(h-d)*r,x=m*a,w=m+(v-x)*s/1e3,b=m*s/1e3+h;return Math.abs(b-d)<Hx&&Math.abs(w)<Hx?[d,0]:[b,w]};return c.isStepper=!0,c.dt=s,c},Mke=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 dH(i);case"spring":return Oke();default:if(i.split("(")[0]==="cubic-bezier")return dH(i)}return typeof i=="function"?i:null};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 hH(e){return kke(e)||Pke(e)||hte(e)||Rke()}function Rke(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
483
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kke(e){if(Array.isArray(e))return kR(e)}function pH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pH(Object(n),!0).forEach(function(r){PR(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PR(e,t,n){return t=Dke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dke(e){var t=Ike(e,"string");return Vm(t)==="symbol"?t:String(t)}function Ike(e,t){if(Vm(e)!=="object"||e===null)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 Lke(e,t){return qke(e)||Bke(e,t)||hte(e,t)||$ke()}function $ke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
484
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hte(e,t){if(e){if(typeof e=="string")return kR(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 kR(e,t)}}function kR(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 Bke(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function qke(e){if(Array.isArray(e))return e}var Gx=function(t,n,r){return t+(n-t)*r},DR=function(t){var n=t.from,r=t.to;return n!==r},zke=function e(t,n,r){var i=Up(function(a,o){if(DR(o)){var s=t(o.from,o.to,o.velocity),c=Lke(s,2),f=c[0],h=c[1];return Qn(Qn({},o),{},{from:f,velocity:h})}return o},n);return r<1?Up(function(a,o){return DR(o)?Qn(Qn({},o),{},{velocity:Gx(o.velocity,i[a].velocity,r),from:Gx(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const Fke=(function(e,t,n,r,i){var a=yke(e,t),o=a.reduce(function(b,S){return Qn(Qn({},b),{},PR({},S,[e[S],t[S]]))},{}),s=a.reduce(function(b,S){return Qn(Qn({},b),{},PR({},S,{from:e[S],velocity:0,to:t[S]}))},{}),c=-1,f,h,d=function(){return null},m=function(){return Up(function(S,E){return E.from},s)},v=function(){return!Object.values(s).filter(DR).length},x=function(S){f||(f=S);var E=S-f,_=E/n.dt;s=zke(n,s,_),i(Qn(Qn(Qn({},e),t),m())),f=S,v()||(c=requestAnimationFrame(d))},w=function(S){h||(h=S);var E=(S-h)/r,_=Up(function(C,N){return Gx.apply(void 0,hH(N).concat([n(E)]))},o);if(i(Qn(Qn(Qn({},e),t),_)),E<1)c=requestAnimationFrame(d);else{var A=Up(function(C,N){return Gx.apply(void 0,hH(N).concat([n(1)]))},o);i(Qn(Qn(Qn({},e),t),A))}};return d=n.isStepper?x:w,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}});function Sd(e){"@babel/helpers - typeof";return Sd=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},Sd(e)}var Vke=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Uke(e,t){if(e==null)return{};var n=Hke(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 Hke(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 fO(e){return Yke(e)||Wke(e)||Kke(e)||Gke()}function Gke(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
485
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Kke(e,t){if(e){if(typeof e=="string")return IR(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 IR(e,t)}}function Wke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yke(e){if(Array.isArray(e))return IR(e)}function IR(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 mH(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 Wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mH(Object(n),!0).forEach(function(r){kp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kp(e,t,n){return t=pte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xke(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,pte(r.key),r)}}function Zke(e,t,n){return t&&Qke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pte(e){var t=Jke(e,"string");return Sd(t)==="symbol"?t:String(t)}function Jke(e,t){if(Sd(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sd(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eDe(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&&LR(e,t)}function LR(e,t){return LR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},LR(e,t)}function tDe(e){var t=nDe();return function(){var r=Kx(e),i;if(t){var a=Kx(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return $R(this,i)}}function $R(e,t){if(t&&(Sd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BR(e)}function BR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nDe(){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 Kx(e){return Kx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kx(e)}var Yo=(function(e){eDe(n,e);var t=tDe(n);function n(r,i){var a;Xke(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,c=o.attributeName,f=o.from,h=o.to,d=o.steps,m=o.children,v=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(BR(a)),a.changeStyle=a.changeStyle.bind(BR(a)),!s||v<=0)return a.state={style:{}},typeof m=="function"&&(a.state={style:h}),$R(a);if(d&&d.length)a.state={style:d[0].style};else if(f){if(typeof m=="function")return a.state={style:f},$R(a);a.state={style:c?kp({},c,f):f}}else a.state={style:{}};return a}return Zke(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,s=a.canBegin,c=a.attributeName,f=a.shouldReAnimate,h=a.to,d=a.from,m=this.state.style;if(s){if(!o){var v={style:c?kp({},c,h):h};this.state&&m&&(c&&m[c]!==h||!c&&m!==h)&&this.setState(v);return}if(!(lke(i.to,h)&&i.canBegin&&i.isActive)){var x=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=x||f?d:i.to;if(this.state&&m){var b={style:c?kp({},c,w):w};(c&&m[c]!==w||!c&&m!==w)&&this.setState(b)}this.runAnimation(Wi(Wi({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,c=i.duration,f=i.easing,h=i.begin,d=i.onAnimationEnd,m=i.onAnimationStart,v=Fke(o,s,Mke(f),c,this.changeStyle),x=function(){a.stopJSAnimation=v()};this.manager.start([m,h,x,c,d])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,c=i.onAnimationStart,f=o[0],h=f.style,d=f.duration,m=d===void 0?0:d,v=function(w,b,S){if(S===0)return w;var E=b.duration,_=b.easing,A=_===void 0?"ease":_,C=b.style,N=b.properties,M=b.onAnimationEnd,R=S>0?o[S-1]:b,P=N||Object.keys(C);if(typeof A=="function"||A==="spring")return[].concat(fO(w),[a.runJSAnimation.bind(a,{from:R.style,to:C,duration:E,easing:A}),E]);var $=uH(P,E,A),L=Wi(Wi(Wi({},R.style),C),{},{transition:$});return[].concat(fO(w),[L,E,M]).filter(bke)};return this.manager.start([c].concat(fO(o.reduce(v,[h,Math.max(m,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=mke());var a=i.begin,o=i.duration,s=i.attributeName,c=i.to,f=i.easing,h=i.onAnimationStart,d=i.onAnimationEnd,m=i.steps,v=i.children,x=this.manager;if(this.unSubscribe=x.subscribe(this.handleStyleChange),typeof f=="function"||typeof v=="function"||f==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var w=s?kp({},s,c):c,b=uH(Object.keys(w),o,f);x.start([h,a,Wi(Wi({},w),{},{transition:b}),o,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=Uke(i,Vke),f=j.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!s||f===0||o<=0)return a;var d=function(v){var x=v.props,w=x.style,b=w===void 0?{}:w,S=x.className,E=j.cloneElement(v,Wi(Wi({},c),{},{style:Wi(Wi({},b),h),className:S}));return E};return f===1?d(j.Children.only(a)):Z.createElement("div",null,j.Children.map(a,function(m){return d(m)}))}}]),n})(j.PureComponent);Yo.displayName="Animate";Yo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Yo.propTypes={from:Nt.oneOfType([Nt.object,Nt.string]),to:Nt.oneOfType([Nt.object,Nt.string]),attributeName:Nt.string,duration:Nt.number,begin:Nt.number,easing:Nt.oneOfType([Nt.string,Nt.func]),steps:Nt.arrayOf(Nt.shape({duration:Nt.number.isRequired,style:Nt.object.isRequired,easing:Nt.oneOfType([Nt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Nt.func]),properties:Nt.arrayOf("string"),onAnimationEnd:Nt.func})),children:Nt.oneOfType([Nt.node,Nt.func]),isActive:Nt.bool,canBegin:Nt.bool,onAnimationEnd:Nt.func,shouldReAnimate:Nt.bool,onAnimationStart:Nt.func,onAnimationReStart:Nt.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 Wx(){return Wx=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},Wx.apply(this,arguments)}function rDe(e,t){return sDe(e)||oDe(e,t)||aDe(e,t)||iDe()}function iDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
486
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aDe(e,t){if(e){if(typeof e=="string")return gH(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 gH(e,t)}}function gH(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 oDe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function sDe(e){if(Array.isArray(e))return e}function vH(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 yH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vH(Object(n),!0).forEach(function(r){lDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lDe(e,t,n){return t=cDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cDe(e){var t=uDe(e,"string");return Um(t)=="symbol"?t:t+""}function uDe(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 bH=function(t,n,r,i,a){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),s=i>=0?1:-1,c=r>=0?1:-1,f=i>=0&&r>=0||i<0&&r<0?1:0,h;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],m=0,v=4;m<v;m++)d[m]=a[m]>o?o:a[m];h="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(h+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(f,",").concat(t+c*d[0],",").concat(n)),h+="L ".concat(t+r-c*d[1],",").concat(n),d[1]>0&&(h+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(f,`,
487
+ `).concat(t+r,",").concat(n+s*d[1])),h+="L ".concat(t+r,",").concat(n+i-s*d[2]),d[2]>0&&(h+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(f,`,
488
+ `).concat(t+r-c*d[2],",").concat(n+i)),h+="L ".concat(t+c*d[3],",").concat(n+i),d[3]>0&&(h+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(f,`,
489
+ `).concat(t,",").concat(n+i-s*d[3])),h+="Z"}else if(o>0&&a===+a&&a>0){var x=Math.min(o,a);h="M ".concat(t,",").concat(n+s*x,`
490
+ A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(t+c*x,",").concat(n,`
491
+ L `).concat(t+r-c*x,",").concat(n,`
492
+ A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(t+r,",").concat(n+s*x,`
493
+ L `).concat(t+r,",").concat(n+i-s*x,`
494
+ A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(t+r-c*x,",").concat(n+i,`
495
+ L `).concat(t+c*x,",").concat(n+i,`
496
+ A `).concat(x,",").concat(x,",0,0,").concat(f,",").concat(t,",").concat(n+i-s*x," Z")}else h="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return h},fDe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,c=n.height;if(Math.abs(s)>0&&Math.abs(c)>0){var f=Math.min(a,a+s),h=Math.max(a,a+s),d=Math.min(o,o+c),m=Math.max(o,o+c);return r>=f&&r<=h&&i>=d&&i<=m}return!1},dDe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Kk=function(t){var n=yH(yH({},dDe),t),r=j.useRef(),i=j.useState(-1),a=rDe(i,2),o=a[0],s=a[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&s(A)}catch{}},[]);var c=n.x,f=n.y,h=n.width,d=n.height,m=n.radius,v=n.className,x=n.animationEasing,w=n.animationDuration,b=n.animationBegin,S=n.isAnimationActive,E=n.isUpdateAnimationActive;if(c!==+c||f!==+f||h!==+h||d!==+d||h===0||d===0)return null;var _=gt("recharts-rectangle",v);return E?Z.createElement(Yo,{canBegin:o>0,from:{width:h,height:d,x:c,y:f},to:{width:h,height:d,x:c,y:f},duration:w,animationEasing:x,isActive:E},function(A){var C=A.width,N=A.height,M=A.x,R=A.y;return Z.createElement(Yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:w,isActive:S,easing:x},Z.createElement("path",Wx({},ct(n,!0),{className:_,d:bH(M,R,C,N,m),ref:r})))}):Z.createElement("path",Wx({},ct(n,!0),{className:_,d:bH(c,f,h,d,m)}))};function qR(){return qR=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},qR.apply(this,arguments)}var Wk=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=gt("recharts-dot",a);return n===+n&&r===+r&&i===+i?j.createElement("circle",qR({},ct(t,!1),vx(t),{className:o,cx:n,cy:r,r:i})):null};function Hm(e){"@babel/helpers - typeof";return Hm=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},Hm(e)}var hDe=["x","y","top","left","width","height","className"];function zR(){return zR=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},zR.apply(this,arguments)}function xH(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 pDe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xH(Object(n),!0).forEach(function(r){mDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mDe(e,t,n){return t=gDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gDe(e){var t=vDe(e,"string");return Hm(t)=="symbol"?t:t+""}function vDe(e,t){if(Hm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yDe(e,t){if(e==null)return{};var n=bDe(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 bDe(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 xDe=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},wDe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,c=t.left,f=c===void 0?0:c,h=t.width,d=h===void 0?0:h,m=t.height,v=m===void 0?0:m,x=t.className,w=yDe(t,hDe),b=pDe({x:r,y:a,top:s,left:f,width:d,height:v},w);return!_e(r)||!_e(a)||!_e(d)||!_e(v)||!_e(s)||!_e(f)?null:Z.createElement("path",zR({},ct(b,!0),{className:gt("recharts-cross",x),d:xDe(r,a,d,v,s,f)}))},SDe=vJ();const _De=Ct(SDe);var dO,wH;function EDe(){if(wH)return dO;wH=1;var e=ts(),t=qi(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return dO=r,dO}var ADe=EDe();const CDe=Ct(ADe);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 Yx(){return Yx=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},Yx.apply(this,arguments)}function TDe(e,t){return MDe(e)||ODe(e,t)||NDe(e,t)||jDe()}function jDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
497
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NDe(e,t){if(e){if(typeof e=="string")return SH(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 SH(e,t)}}function SH(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 ODe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function MDe(e){if(Array.isArray(e))return e}function _H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function EH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_H(Object(n),!0).forEach(function(r){RDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_H(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RDe(e,t,n){return t=PDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PDe(e){var t=kDe(e,"string");return Gm(t)=="symbol"?t:t+""}function kDe(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 AH=function(t,n,r,i,a){var o=r-i,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-o/2,",").concat(n+a),s+="L ".concat(t+r-o/2-i,",").concat(n+a),s+="L ".concat(t,",").concat(n," Z"),s},DDe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},IDe=function(t){var n=EH(EH({},DDe),t),r=j.useRef(),i=j.useState(-1),a=TDe(i,2),o=a[0],s=a[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&s(_)}catch{}},[]);var c=n.x,f=n.y,h=n.upperWidth,d=n.lowerWidth,m=n.height,v=n.className,x=n.animationEasing,w=n.animationDuration,b=n.animationBegin,S=n.isUpdateAnimationActive;if(c!==+c||f!==+f||h!==+h||d!==+d||m!==+m||h===0&&d===0||m===0)return null;var E=gt("recharts-trapezoid",v);return S?Z.createElement(Yo,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:m,x:c,y:f},to:{upperWidth:h,lowerWidth:d,height:m,x:c,y:f},duration:w,animationEasing:x,isActive:S},function(_){var A=_.upperWidth,C=_.lowerWidth,N=_.height,M=_.x,R=_.y;return Z.createElement(Yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:w,easing:x},Z.createElement("path",Yx({},ct(n,!0),{className:E,d:AH(M,R,A,C,N),ref:r})))}):Z.createElement("g",null,Z.createElement("path",Yx({},ct(n,!0),{className:E,d:AH(c,f,h,d,m)})))},LDe=["option","shapeType","propTransformer","activeClassName","isActive"];function Km(e){"@babel/helpers - typeof";return Km=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},Km(e)}function $De(e,t){if(e==null)return{};var n=BDe(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 BDe(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 CH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CH(Object(n),!0).forEach(function(r){qDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qDe(e,t,n){return t=zDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zDe(e){var t=FDe(e,"string");return Km(t)=="symbol"?t:t+""}function FDe(e,t){if(Km(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Km(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VDe(e,t){return Xx(Xx({},t),e)}function UDe(e,t){return e==="symbols"}function TH(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return Z.createElement(Kk,n);case"trapezoid":return Z.createElement(IDe,n);case"sector":return Z.createElement(ste,n);case"symbols":if(UDe(t))return Z.createElement(wk,n);break;default:return null}}function HDe(e){return j.isValidElement(e)?e.props:e}function GDe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?VDe:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,c=$De(e,LDe),f;if(j.isValidElement(t))f=j.cloneElement(t,Xx(Xx({},c),HDe(t)));else if(tt(t))f=t(c);else if(_De(t)&&!CDe(t)){var h=i(t,c);f=Z.createElement(TH,{shapeType:n,elementProps:h})}else{var d=c;f=Z.createElement(TH,{shapeType:n,elementProps:d})}return s?Z.createElement(on,{className:o},f):f}function Ww(e,t){return t!=null&&"trapezoids"in e.props}function Yw(e,t){return t!=null&&"sectors"in e.props}function Wm(e,t){return t!=null&&"points"in e.props}function KDe(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 WDe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function YDe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function XDe(e,t){var n;return Ww(e,t)?n=KDe:Yw(e,t)?n=WDe:Wm(e,t)&&(n=YDe),n}function QDe(e,t){var n;return Ww(e,t)?n="trapezoids":Yw(e,t)?n="sectors":Wm(e,t)&&(n="points"),n}function ZDe(e,t){if(Ww(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(Yw(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 Wm(e,t)?t.payload:{}}function JDe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=QDe(n,t),a=ZDe(n,t),o=r.filter(function(c,f){var h=Mm(a,c),d=n.props[i].filter(function(x){var w=XDe(n,t);return w(x,t)}),m=n.props[i].indexOf(d[d.length-1]),v=f===m;return h&&v}),s=r.indexOf(o[o.length-1]);return s}var eIe=SJ();const Qx=Ct(eIe);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 jH(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 NH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jH(Object(n),!0).forEach(function(r){mte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mte(e,t,n){return t=tIe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tIe(e){var t=nIe(e,"string");return Ym(t)=="symbol"?t:t+""}function nIe(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(t==="string"?String:Number)(e)}var rIe=["Webkit","Moz","O","ms"],iIe=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=rIe.reduce(function(a,o){return NH(NH({},a),{},mte({},o+r,n))},{});return i[t]=n,i};function _d(e){"@babel/helpers - typeof";return _d=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},_d(e)}function Zx(){return Zx=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},Zx.apply(this,arguments)}function OH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OH(Object(n),!0).forEach(function(r){Qr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MH(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,vte(r.key),r)}}function oIe(e,t,n){return t&&MH(e.prototype,t),n&&MH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sIe(e,t,n){return t=Jx(t),lIe(e,gte()?Reflect.construct(t,n||[],Jx(e).constructor):t.apply(e,n))}function lIe(e,t){if(t&&(_d(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cIe(e)}function cIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gte=function(){return!!e})()}function Jx(e){return Jx=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jx(e)}function uIe(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&&FR(e,t)}function FR(e,t){return FR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},FR(e,t)}function Qr(e,t,n){return t=vte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vte(e){var t=fIe(e,"string");return _d(t)=="symbol"?t:t+""}function fIe(e,t){if(_d(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_d(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dIe=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,f=zp().domain(Qx(0,c)).range([a,a+o-s]),h=f.domain().map(function(d){return f(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(r),endX:f(i),scale:f,scaleValues:h}},RH=function(t){return t.changedTouches&&!!t.changedTouches.length},Ed=(function(e){function t(n){var r;return aIe(this,t),r=sIe(this,t,[n]),Qr(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Qr(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Qr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),Qr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Qr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Qr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Qr(r,"handleSlideDragStart",function(i){var a=RH(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 uIe(t,e),oIe(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,s=this.props,c=s.gap,f=s.data,h=f.length-1,d=Math.min(i,a),m=Math.max(i,a),v=t.getIndexInRange(o,d),x=t.getIndexInRange(o,m);return{startIndex:v-v%c,endIndex:x===h?h:x-x%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,c=ci(a[r],s,r);return tt(o)?o(c,r):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,c=this.props,f=c.x,h=c.width,d=c.travellerWidth,m=c.startIndex,v=c.endIndex,x=c.onChange,w=r.pageX-a;w>0?w=Math.min(w,f+h-d-s,f+h-d-o):w<0&&(w=Math.max(w,f-o,f-s));var b=this.getIndex({startX:o+w,endX:s+w});(b.startIndex!==m||b.endIndex!==v)&&x&&x(b),this.setState({startX:o+w,endX:s+w,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=RH(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,s=i.endX,c=i.startX,f=this.state[o],h=this.props,d=h.x,m=h.width,v=h.travellerWidth,x=h.onChange,w=h.gap,b=h.data,S={startX:this.state.startX,endX:this.state.endX},E=r.pageX-a;E>0?E=Math.min(E,d+m-v-f):E<0&&(E=Math.max(E,d-f)),S[o]=f+E;var _=this.getIndex(S),A=_.startIndex,C=_.endIndex,N=function(){var R=b.length-1;return o==="startX"&&(s>c?A%w===0:C%w===0)||s<c&&C===R||o==="endX"&&(s>c?C%w===0:A%w===0)||s>c&&C===R};this.setState(Qr(Qr({},o,f+E),"brushMoveStartX",r.pageX),function(){x&&N()&&x(_)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,c=o.startX,f=o.endX,h=this.state[i],d=s.indexOf(h);if(d!==-1){var m=d+r;if(!(m===-1||m>=s.length)){var v=s[m];i==="startX"&&v>=f||i==="endX"&&v<=c||this.setState(Qr({},i,v),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,s=r.height,c=r.fill,f=r.stroke;return Z.createElement("rect",{stroke:f,fill:c,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,c=r.data,f=r.children,h=r.padding,d=j.Children.only(f);return d?Z.cloneElement(d,{x:i,y:a,width:o,height:s,margin:h,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,s=this,c=this.props,f=c.y,h=c.travellerWidth,d=c.height,m=c.traveller,v=c.ariaLabel,x=c.data,w=c.startIndex,b=c.endIndex,S=Math.max(r,this.props.x),E=hO(hO({},ct(this.props,!1)),{},{x:S,y:f,width:h,height:d}),_=v||"Min value: ".concat((a=x[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=x[b])===null||o===void 0?void 0:o.name);return Z.createElement(on,{tabIndex:0,role:"slider","aria-label":_,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(C){["ArrowLeft","ArrowRight"].includes(C.key)&&(C.preventDefault(),C.stopPropagation(),s.handleTravellerMoveKeyboard(C.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,E))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,c=a.stroke,f=a.travellerWidth,h=Math.min(r,i)+f,d=Math.max(Math.abs(i-r)-f,0);return Z.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:h,y:o,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,c=r.travellerWidth,f=r.stroke,h=this.state,d=h.startX,m=h.endX,v=5,x={pointerEvents:"none",fill:f};return Z.createElement(on,{className:"recharts-brush-texts"},Z.createElement(Nx,Zx({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,m)-v,y:o+s/2},x),this.getTextOfTick(i)),Z.createElement(Nx,Zx({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,m)+c+v,y:o+s/2},x),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,c=r.y,f=r.width,h=r.height,d=r.alwaysShowText,m=this.state,v=m.startX,x=m.endX,w=m.isTextActive,b=m.isSlideMoving,S=m.isTravellerMoving,E=m.isTravellerFocused;if(!i||!i.length||!_e(s)||!_e(c)||!_e(f)||!_e(h)||f<=0||h<=0)return null;var _=gt("recharts-brush",a),A=Z.Children.count(o)===1,C=iIe("userSelect","none");return Z.createElement(on,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:C},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(v,x),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(x,"endX"),(w||b||S||E||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,c=r.stroke,f=Math.floor(a+s/2)-1;return Z.createElement(Z.Fragment,null,Z.createElement("rect",{x:i,y:a,width:o,height:s,fill:c,stroke:"none"}),Z.createElement("line",{x1:i+1,y1:f,x2:i+o-1,y2:f,fill:"none",stroke:"#fff"}),Z.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 Z.isValidElement(r)?a=Z.cloneElement(r,i):tt(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,c=r.travellerWidth,f=r.updateId,h=r.startIndex,d=r.endIndex;if(a!==i.prevData||f!==i.prevUpdateId)return hO({prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:s,prevWidth:o},a&&a.length?dIe({data:a,width:o,x:s,travellerWidth:c,startIndex:h,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([s,s+o-c]);var m=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:f,prevX:s,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,s=a-1;s-o>1;){var c=Math.floor((o+s)/2);r[c]>i?s=c:o=c}return i>=r[s]?s:o}}])})(j.PureComponent);Qr(Ed,"displayName","Brush");Qr(Ed,"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 pO,PH;function hIe(){if(PH)return pO;PH=1;var e=eh();function t(n,r){var i;return e(n,function(a,o,s){return i=r(a,o,s),!i}),!!i}return pO=t,pO}var mO,kH;function pIe(){if(kH)return mO;kH=1;var e=IZ(),t=zi(),n=hIe(),r=dn(),i=nh();function a(o,s,c){var f=r(o)?e:n;return c&&i(o,s,c)&&(s=void 0),f(o,t(s,3))}return mO=a,mO}var mIe=pIe();const gIe=Ct(mIe);var Ba=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},vIe=pJ();const yIe=Ct(vIe);var gO,DH;function bIe(){if(DH)return gO;DH=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 gO=e,gO}var vO,IH;function xIe(){if(IH)return vO;IH=1;var e=eh();function t(n,r){var i=!0;return e(n,function(a,o,s){return i=!!r(a,o,s),i}),i}return vO=t,vO}var yO,LH;function wIe(){if(LH)return yO;LH=1;var e=bIe(),t=xIe(),n=zi(),r=dn(),i=nh();function a(o,s,c){var f=r(o)?e:t;return c&&i(o,s,c)&&(s=void 0),f(o,n(s,3))}return yO=a,yO}var SIe=wIe();const yte=Ct(SIe);var _Ie=["x","y"];function Xm(e){"@babel/helpers - typeof";return Xm=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},Xm(e)}function VR(){return VR=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},VR.apply(this,arguments)}function $H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _p(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$H(Object(n),!0).forEach(function(r){EIe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$H(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EIe(e,t,n){return t=AIe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AIe(e){var t=CIe(e,"string");return Xm(t)=="symbol"?t:t+""}function CIe(e,t){if(Xm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TIe(e,t){if(e==null)return{};var n=jIe(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 jIe(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 NIe(e,t){var n=e.x,r=e.y,i=TIe(e,_Ie),a="".concat(n),o=parseInt(a,10),s="".concat(r),c=parseInt(s,10),f="".concat(t.height||i.height),h=parseInt(f,10),d="".concat(t.width||i.width),m=parseInt(d,10);return _p(_p(_p(_p(_p({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:h,width:m,name:t.name,radius:t.radius})}function BH(e){return Z.createElement(GDe,VR({shapeType:"rectangle",propTransformer:NIe,activeClassName:"recharts-active-bar"},e))}var OIe=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)||MCe(r);return a?t(r,i):(a||iu(),n)}},MIe=["value","background"],bte;function Ad(e){"@babel/helpers - typeof";return Ad=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},Ad(e)}function RIe(e,t){if(e==null)return{};var n=PIe(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 PIe(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 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 qH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qH(Object(n),!0).forEach(function(r){hl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wte(r.key),r)}}function DIe(e,t,n){return t&&zH(e.prototype,t),n&&zH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IIe(e,t,n){return t=t0(t),LIe(e,xte()?Reflect.construct(t,n||[],t0(e).constructor):t.apply(e,n))}function LIe(e,t){if(t&&(Ad(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Ie(e)}function $Ie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xte=function(){return!!e})()}function t0(e){return t0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},t0(e)}function BIe(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&&UR(e,t)}function UR(e,t){return UR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UR(e,t)}function hl(e,t,n){return t=wte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wte(e){var t=qIe(e,"string");return Ad(t)=="symbol"?t:t+""}function qIe(e,t){if(Ad(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ad(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jl=(function(e){function t(){var n;kIe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=IIe(this,t,[].concat(i)),hl(n,"state",{isAnimationFinished:!1}),hl(n,"id",Vg("recharts-bar-")),hl(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),hl(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return BIe(t,e),DIe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,s=a.dataKey,c=a.activeIndex,f=a.activeBar,h=ct(this.props,!1);return r&&r.map(function(d,m){var v=m===c,x=v?f:o,w=Sn(Sn(Sn({},h),d),{},{isActive:v,option:x,index:m,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return Z.createElement(on,e0({className:"recharts-bar-rectangle"},yx(i.props,d,m),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(m)}),Z.createElement(BH,w))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,c=i.animationBegin,f=i.animationDuration,h=i.animationEasing,d=i.animationId,m=this.state.prevData;return Z.createElement(Yo,{begin:c,duration:f,isActive:s,easing:h,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(v){var x=v.t,w=a.map(function(b,S){var E=m&&m[S];if(E){var _=Oi(E.x,b.x),A=Oi(E.y,b.y),C=Oi(E.width,b.width),N=Oi(E.height,b.height);return Sn(Sn({},b),{},{x:_(x),y:A(x),width:C(x),height:N(x)})}if(o==="horizontal"){var M=Oi(0,b.height),R=M(x);return Sn(Sn({},b),{},{y:b.y+b.height-R,height:R})}var P=Oi(0,b.width),$=P(x);return Sn(Sn({},b),{},{width:$})});return Z.createElement(on,null,r.renderRectanglesStatically(w))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Mm(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,c=ct(this.props.background,!1);return a.map(function(f,h){f.value;var d=f.background,m=RIe(f,MIe);if(!d)return null;var v=Sn(Sn(Sn(Sn(Sn({},m),{},{fill:"#eee"},d),c),yx(r.props,f,h)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:h,className:"recharts-bar-background-rectangle"});return Z.createElement(BH,e0({key:"background-bar-".concat(h),option:r.props.background,isActive:h===s},v))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,c=a.yAxis,f=a.layout,h=a.children,d=sa(h,Kw);if(!d)return null;var m=f==="vertical"?o[0].height/2:o[0].width/2,v=function(b,S){var E=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:E,errorVal:ci(b,S)}},x={clipPath:r?"url(#clipPath-".concat(i,")"):null};return Z.createElement(on,x,d.map(function(w){return Z.cloneElement(w,{key:"error-bar-".concat(i,"-").concat(w.props.dataKey),data:o,xAxis:s,yAxis:c,layout:f,offset:m,dataPointFormatter:v})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,s=r.xAxis,c=r.yAxis,f=r.left,h=r.top,d=r.width,m=r.height,v=r.isAnimationActive,x=r.background,w=r.id;if(i||!a||!a.length)return null;var b=this.state.isAnimationFinished,S=gt("recharts-bar",o),E=s&&s.allowDataOverflow,_=c&&c.allowDataOverflow,A=E||_,C=dt(w)?this.id:w;return Z.createElement(on,{className:S},E||_?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(C)},Z.createElement("rect",{x:E?f:f-d/2,y:_?h:h-m/2,width:E?d:d*2,height:_?m:m*2}))):null,Z.createElement(on,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(C,")"):null},x?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,C),(!v||b)&&wl.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(j.PureComponent);bte=jl;hl(jl,"displayName","Bar");hl(jl,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ah.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});hl(jl,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,c=e.yAxisTicks,f=e.stackedData,h=e.dataStartIndex,d=e.displayedData,m=e.offset,v=cPe(r,n);if(!v)return null;var x=t.layout,w=n.type.defaultProps,b=w!==void 0?Sn(Sn({},w),n.props):n.props,S=b.dataKey,E=b.children,_=b.minPointSize,A=x==="horizontal"?o:a,C=f?A.scale.domain():null,N=vPe({numericAxis:A}),M=sa(E,ree),R=d.map(function(P,$){var L,D,F,I,q,k;f?L=uPe(f[h+$],C):(L=ci(P,S),Array.isArray(L)||(L=[N,L]));var z=OIe(_,bte.defaultProps.minPointSize)(L[1],$);if(x==="horizontal"){var H,G=[o.scale(L[0]),o.scale(L[1])],Q=G[0],U=G[1];D=I8({axis:a,ticks:s,bandSize:i,offset:v.offset,entry:P,index:$}),F=(H=U??Q)!==null&&H!==void 0?H:void 0,I=v.size;var V=Q-U;if(q=Number.isNaN(V)?0:V,k={x:D,y:o.y,width:I,height:o.height},Math.abs(z)>0&&Math.abs(q)<Math.abs(z)){var X=oa(q||z)*(Math.abs(z)-Math.abs(q));F-=X,q+=X}}else{var W=[a.scale(L[0]),a.scale(L[1])],K=W[0],J=W[1];if(D=K,F=I8({axis:o,ticks:c,bandSize:i,offset:v.offset,entry:P,index:$}),I=J-K,q=v.size,k={x:a.x,y:F,width:a.width,height:q},Math.abs(z)>0&&Math.abs(I)<Math.abs(z)){var ee=oa(I||z)*(Math.abs(z)-Math.abs(I));I+=ee}}return Sn(Sn(Sn({},P),{},{x:D,y:F,width:I,height:q,value:f?L:L[1],payload:P,background:k},M&&M[$]&&M[$].props),{},{tooltipPayload:[ite(n,P)],tooltipPosition:{x:D+I/2,y:F+q/2}})});return Sn({data:R,layout:x},m)});function Qm(e){"@babel/helpers - typeof";return Qm=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},Qm(e)}function zIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FH(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,Ste(r.key),r)}}function FIe(e,t,n){return t&&FH(e.prototype,t),n&&FH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function VH(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 ea(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VH(Object(n),!0).forEach(function(r){Xw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xw(e,t,n){return t=Ste(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ste(e){var t=VIe(e,"string");return Qm(t)=="symbol"?t:t+""}function VIe(e,t){if(Qm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _te=function(t,n,r,i,a){var o=t.width,s=t.height,c=t.layout,f=t.children,h=Object.keys(n),d={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},m=!!Zr(f,jl);return h.reduce(function(v,x){var w=n[x],b=w.orientation,S=w.domain,E=w.padding,_=E===void 0?{}:E,A=w.mirror,C=w.reversed,N="".concat(b).concat(A?"Mirror":""),M,R,P,$,L;if(w.type==="number"&&(w.padding==="gap"||w.padding==="no-gap")){var D=S[1]-S[0],F=1/0,I=w.categoricalDomain.sort(kCe);if(I.forEach(function(W,K){K>0&&(F=Math.min((W||0)-(I[K-1]||0),F))}),Number.isFinite(F)){var q=F/D,k=w.layout==="vertical"?r.height:r.width;if(w.padding==="gap"&&(M=q*k/2),w.padding==="no-gap"){var z=nu(t.barCategoryGap,q*k),H=q*k/2;M=H-z-(H-z)/k*z}}}i==="xAxis"?R=[r.left+(_.left||0)+(M||0),r.left+r.width-(_.right||0)-(M||0)]:i==="yAxis"?R=c==="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=w.range,C&&(R=[R[1],R[0]]);var G=sPe(w,a,m),Q=G.scale,U=G.realScaleType;Q.domain(S).range(R),lPe(Q);var V=gPe(Q,ea(ea({},w),{},{realScaleType:U}));i==="xAxis"?(L=b==="top"&&!A||b==="bottom"&&A,P=r.left,$=d[N]-L*w.height):i==="yAxis"&&(L=b==="left"&&!A||b==="right"&&A,P=d[N]-L*w.width,$=r.top);var X=ea(ea(ea({},w),V),{},{realScaleType:U,x:P,y:$,scale:Q,width:i==="xAxis"?r.width:w.width,height:i==="yAxis"?r.height:w.height});return X.bandSize=zx(X,V),!w.hide&&i==="xAxis"?d[N]+=(L?-1:1)*X.height:w.hide||(d[N]+=(L?-1:1)*X.width),ea(ea({},v),{},Xw({},x,X))},{})},Ete=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)}},UIe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return Ete({x:n,y:r},{x:i,y:a})},Ate=(function(){function e(t){zIe(this,e),this.scale=t}return FIe(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 s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}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)}}])})();Xw(Ate,"EPS",1e-4);var Yk=function(t){var n=Object.keys(t).reduce(function(r,i){return ea(ea({},r),{},Xw({},i,Ate.create(t[i])))},{});return ea(ea({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return yIe(i,function(c,f){return n[f].apply(c,{bandAware:o,position:s})})},isInRange:function(i){return yte(i,function(a,o){return n[o].isInRange(a)})}})};function HIe(e){return(e%180+180)%180}var GIe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=HIe(i),o=a*Math.PI/180,s=Math.atan(r/n),c=o>s&&o<Math.PI-s?r/Math.sin(o):n/Math.cos(o);return Math.abs(c)},KIe=fJ();const WIe=Ct(KIe);var YIe=zZ();const XIe=Ct(YIe);var QIe=XIe(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("")}),Xk=j.createContext(void 0),Qk=j.createContext(void 0),Cte=j.createContext(void 0),Tte=j.createContext({}),jte=j.createContext(void 0),Nte=j.createContext(0),Ote=j.createContext(0),UH=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,s=t.children,c=t.width,f=t.height,h=QIe(a);return Z.createElement(Xk.Provider,{value:r},Z.createElement(Qk.Provider,{value:i},Z.createElement(Tte.Provider,{value:a},Z.createElement(Cte.Provider,{value:h},Z.createElement(jte.Provider,{value:o},Z.createElement(Nte.Provider,{value:f},Z.createElement(Ote.Provider,{value:c},s)))))))},ZIe=function(){return j.useContext(jte)},Mte=function(t){var n=j.useContext(Xk);n==null&&iu();var r=n[t];return r==null&&iu(),r},JIe=function(){var t=j.useContext(Xk);return Qs(t)},eLe=function(){var t=j.useContext(Qk),n=WIe(t,function(r){return yte(r.domain,Number.isFinite)});return n||Qs(t)},Rte=function(t){var n=j.useContext(Qk);n==null&&iu();var r=n[t];return r==null&&iu(),r},tLe=function(){var t=j.useContext(Cte);return t},nLe=function(){return j.useContext(Tte)},Zk=function(){return j.useContext(Ote)},Jk=function(){return j.useContext(Nte)};function Cd(e){"@babel/helpers - typeof";return Cd=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},Cd(e)}function rLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iLe(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,kte(r.key),r)}}function aLe(e,t,n){return t&&iLe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oLe(e,t,n){return t=n0(t),sLe(e,Pte()?Reflect.construct(t,n||[],n0(e).constructor):t.apply(e,n))}function sLe(e,t){if(t&&(Cd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lLe(e)}function lLe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Pte=function(){return!!e})()}function n0(e){return n0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},n0(e)}function cLe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HR(e,t)}function HR(e,t){return HR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},HR(e,t)}function HH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function GH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HH(Object(n),!0).forEach(function(r){eD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eD(e,t,n){return t=kte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kte(e){var t=uLe(e,"string");return Cd(t)=="symbol"?t:t+""}function uLe(e,t){if(Cd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function fLe(e,t){return mLe(e)||pLe(e,t)||hLe(e,t)||dLe()}function dLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
498
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hLe(e,t){if(e){if(typeof e=="string")return KH(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 KH(e,t)}}function KH(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 pLe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function mLe(e){if(Array.isArray(e))return e}function GR(){return GR=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},GR.apply(this,arguments)}var gLe=function(t,n){var r;return Z.isValidElement(t)?r=Z.cloneElement(t,n):tt(t)?r=t(n):r=Z.createElement("line",GR({},n,{className:"recharts-reference-line-line"})),r},vLe=function(t,n,r,i,a,o,s,c,f){var h=a.x,d=a.y,m=a.width,v=a.height;if(r){var x=f.y,w=t.y.apply(x,{position:o});if(Ba(f,"discard")&&!t.y.isInRange(w))return null;var b=[{x:h+m,y:w},{x:h,y:w}];return c==="left"?b.reverse():b}if(n){var S=f.x,E=t.x.apply(S,{position:o});if(Ba(f,"discard")&&!t.x.isInRange(E))return null;var _=[{x:E,y:d+v},{x:E,y:d}];return s==="top"?_.reverse():_}if(i){var A=f.segment,C=A.map(function(N){return t.apply(N,{position:o})});return Ba(f,"discard")&&gIe(C,function(N){return!t.isInRange(N)})?null:C}return null};function yLe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,c=e.alwaysShow,f=ZIe(),h=Mte(i),d=Rte(a),m=tLe();if(!f||!m)return null;Lo(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=Yk({x:h.scale,y:d.scale}),x=kn(t),w=kn(n),b=r&&r.length===2,S=vLe(v,x,w,b,m,e.position,h.orientation,d.orientation,e);if(!S)return null;var E=fLe(S,2),_=E[0],A=_.x,C=_.y,N=E[1],M=N.x,R=N.y,P=Ba(e,"hidden")?"url(#".concat(f,")"):void 0,$=GH(GH({clipPath:P},ct(e,!0)),{},{x1:A,y1:C,x2:M,y2:R});return Z.createElement(on,{className:gt("recharts-reference-line",s)},gLe(o,$),fr.renderCallByParent(e,UIe({x1:A,y1:C,x2:M,y2:R})))}var tD=(function(e){function t(){return rLe(this,t),oLe(this,t,arguments)}return cLe(t,e),aLe(t,[{key:"render",value:function(){return Z.createElement(yLe,this.props)}}])})(Z.Component);eD(tD,"displayName","ReferenceLine");eD(tD,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function KR(){return KR=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},KR.apply(this,arguments)}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 WH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WH(Object(n),!0).forEach(function(r){Qw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xLe(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,Ite(r.key),r)}}function wLe(e,t,n){return t&&xLe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function SLe(e,t,n){return t=r0(t),_Le(e,Dte()?Reflect.construct(t,n||[],r0(e).constructor):t.apply(e,n))}function _Le(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 ELe(e)}function ELe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dte=function(){return!!e})()}function r0(e){return r0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},r0(e)}function ALe(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&&WR(e,t)}function WR(e,t){return WR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},WR(e,t)}function Qw(e,t,n){return t=Ite(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ite(e){var t=CLe(e,"string");return Td(t)=="symbol"?t:t+""}function CLe(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 TLe=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=Yk({x:i.scale,y:a.scale}),s=o.apply({x:n,y:r},{bandAware:!0});return Ba(t,"discard")&&!o.isInRange(s)?null:s},Zw=(function(e){function t(){return bLe(this,t),SLe(this,t,arguments)}return ALe(t,e),wLe(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,s=r.alwaysShow,c=r.clipPathId,f=kn(i),h=kn(a);if(Lo(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!h)return null;var d=TLe(this.props);if(!d)return null;var m=d.x,v=d.y,x=this.props,w=x.shape,b=x.className,S=Ba(this.props,"hidden")?"url(#".concat(c,")"):void 0,E=YH(YH({clipPath:S},ct(this.props,!0)),{},{cx:m,cy:v});return Z.createElement(on,{className:gt("recharts-reference-dot",b)},t.renderDot(w,E),fr.renderCallByParent(this.props,{x:m-o,y:v-o,width:2*o,height:2*o}))}}])})(Z.Component);Qw(Zw,"displayName","ReferenceDot");Qw(Zw,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Qw(Zw,"renderDot",function(e,t){var n;return Z.isValidElement(e)?n=Z.cloneElement(e,t):tt(e)?n=e(t):n=Z.createElement(Wk,KR({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function YR(){return YR=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},YR.apply(this,arguments)}function jd(e){"@babel/helpers - typeof";return jd=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},jd(e)}function XH(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 QH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XH(Object(n),!0).forEach(function(r){Jw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NLe(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,$te(r.key),r)}}function OLe(e,t,n){return t&&NLe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function MLe(e,t,n){return t=i0(t),RLe(e,Lte()?Reflect.construct(t,n||[],i0(e).constructor):t.apply(e,n))}function RLe(e,t){if(t&&(jd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PLe(e)}function PLe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lte=function(){return!!e})()}function i0(e){return i0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},i0(e)}function kLe(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&&XR(e,t)}function XR(e,t){return XR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},XR(e,t)}function Jw(e,t,n){return t=$te(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $te(e){var t=DLe(e,"string");return jd(t)=="symbol"?t:t+""}function DLe(e,t){if(jd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ILe=function(t,n,r,i,a){var o=a.x1,s=a.x2,c=a.y1,f=a.y2,h=a.xAxis,d=a.yAxis;if(!h||!d)return null;var m=Yk({x:h.scale,y:d.scale}),v={x:t?m.x.apply(o,{position:"start"}):m.x.rangeMin,y:r?m.y.apply(c,{position:"start"}):m.y.rangeMin},x={x:n?m.x.apply(s,{position:"end"}):m.x.rangeMax,y:i?m.y.apply(f,{position:"end"}):m.y.rangeMax};return Ba(a,"discard")&&(!m.isInRange(v)||!m.isInRange(x))?null:Ete(v,x)},e1=(function(e){function t(){return jLe(this,t),MLe(this,t,arguments)}return kLe(t,e),OLe(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,s=r.y2,c=r.className,f=r.alwaysShow,h=r.clipPathId;Lo(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=kn(i),m=kn(a),v=kn(o),x=kn(s),w=this.props.shape;if(!d&&!m&&!v&&!x&&!w)return null;var b=ILe(d,m,v,x,this.props);if(!b&&!w)return null;var S=Ba(this.props,"hidden")?"url(#".concat(h,")"):void 0;return Z.createElement(on,{className:gt("recharts-reference-area",c)},t.renderRect(w,QH(QH({clipPath:S},ct(this.props,!0)),b)),fr.renderCallByParent(this.props,b))}}])})(Z.Component);Jw(e1,"displayName","ReferenceArea");Jw(e1,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Jw(e1,"renderRect",function(e,t){var n;return Z.isValidElement(e)?n=Z.cloneElement(e,t):tt(e)?n=e(t):n=Z.createElement(Kk,YR({},t,{className:"recharts-reference-area-rect"})),n});function Bte(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 LLe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return GIe(r,n)}function $Le(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function a0(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 BLe(e,t){return Bte(e,t+1)}function qLe(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,f=1,h=o,d=function(){var x=r==null?void 0:r[c];if(x===void 0)return{v:Bte(r,f)};var w=c,b,S=function(){return b===void 0&&(b=n(x,w)),b},E=x.coordinate,_=c===0||a0(e,E,S,h,s);_||(c=0,h=o,f+=1),_&&(h=E+e*(S()/2+i),c+=f)},m;f<=a.length;)if(m=d(),m)return m.v;return[]}function Zm(e){"@babel/helpers - typeof";return Zm=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},Zm(e)}function ZH(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 ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ZH(Object(n),!0).forEach(function(r){zLe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zLe(e,t,n){return t=FLe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FLe(e){var t=VLe(e,"string");return Zm(t)=="symbol"?t:t+""}function VLe(e,t){if(Zm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ULe(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,c=t.end,f=function(m){var v=a[m],x,w=function(){return x===void 0&&(x=n(v,m)),x};if(m===o-1){var b=e*(v.coordinate+e*w()/2-c);a[m]=v=ur(ur({},v),{},{tickCoord:b>0?v.coordinate-b*e:v.coordinate})}else a[m]=v=ur(ur({},v),{},{tickCoord:v.coordinate});var S=a0(e,v.tickCoord,w,s,c);S&&(c=v.tickCoord-e*(w()/2+i),a[m]=ur(ur({},v),{},{isShow:!0}))},h=o-1;h>=0;h--)f(h);return a}function HLe(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,f=t.end;if(a){var h=r[s-1],d=n(h,s-1),m=e*(h.coordinate+e*d/2-f);o[s-1]=h=ur(ur({},h),{},{tickCoord:m>0?h.coordinate-m*e:h.coordinate});var v=a0(e,h.tickCoord,function(){return d},c,f);v&&(f=h.tickCoord-e*(d/2+i),o[s-1]=ur(ur({},h),{},{isShow:!0}))}for(var x=a?s-1:s,w=function(E){var _=o[E],A,C=function(){return A===void 0&&(A=n(_,E)),A};if(E===0){var N=e*(_.coordinate-e*C()/2-c);o[E]=_=ur(ur({},_),{},{tickCoord:N<0?_.coordinate-N*e:_.coordinate})}else o[E]=_=ur(ur({},_),{},{tickCoord:_.coordinate});var M=a0(e,_.tickCoord,C,c,f);M&&(c=_.tickCoord+e*(C()/2+i),o[E]=ur(ur({},_),{},{isShow:!0}))},b=0;b<x;b++)w(b);return o}function nD(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,f=e.tickFormatter,h=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(_e(c)||ah.isSsr)return BLe(i,typeof c=="number"&&_e(c)?c:0);var m=[],v=s==="top"||s==="bottom"?"width":"height",x=h&&v==="width"?qp(h,{fontSize:t,letterSpacing:n}):{width:0,height:0},w=function(_,A){var C=tt(f)?f(_.value,A):_.value;return v==="width"?LLe(qp(C,{fontSize:t,letterSpacing:n}),x,d):qp(C,{fontSize:t,letterSpacing:n})[v]},b=i.length>=2?oa(i[1].coordinate-i[0].coordinate):1,S=$Le(a,b,v);return c==="equidistantPreserveStart"?qLe(b,S,w,i,o):(c==="preserveStart"||c==="preserveStartEnd"?m=HLe(b,S,w,i,o,c==="preserveStartEnd"):m=ULe(b,S,w,i,o),m.filter(function(E){return E.isShow}))}var GLe=["viewBox"],KLe=["viewBox"],WLe=["ticks"];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 xf(){return xf=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},xf.apply(this,arguments)}function JH(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 On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JH(Object(n),!0).forEach(function(r){rD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bO(e,t){if(e==null)return{};var n=YLe(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 YLe(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 XLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e9(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,zte(r.key),r)}}function QLe(e,t,n){return t&&e9(e.prototype,t),n&&e9(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZLe(e,t,n){return t=o0(t),JLe(e,qte()?Reflect.construct(t,n||[],o0(e).constructor):t.apply(e,n))}function JLe(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 e$e(e)}function e$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qte=function(){return!!e})()}function o0(e){return o0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},o0(e)}function t$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&&QR(e,t)}function QR(e,t){return QR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},QR(e,t)}function rD(e,t,n){return t=zte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zte(e){var t=n$e(e,"string");return Nd(t)=="symbol"?t:t+""}function n$e(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)}var lh=(function(e){function t(n){var r;return XLe(this,t),r=ZLe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return t$e(t,e),QLe(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=bO(r,GLe),s=this.props,c=s.viewBox,f=bO(s,KLe);return!Pf(a,c)||!Pf(o,f)||!Pf(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,s=i.width,c=i.height,f=i.orientation,h=i.tickSize,d=i.mirror,m=i.tickMargin,v,x,w,b,S,E,_=d?-1:1,A=r.tickSize||h,C=_e(r.tickCoord)?r.tickCoord:r.coordinate;switch(f){case"top":v=x=r.coordinate,b=o+ +!d*c,w=b-_*A,E=w-_*m,S=C;break;case"left":w=b=r.coordinate,x=a+ +!d*s,v=x-_*A,S=v-_*m,E=C;break;case"right":w=b=r.coordinate,x=a+ +d*s,v=x+_*A,S=v+_*m,E=C;break;default:v=x=r.coordinate,b=o+ +d*c,w=b+_*A,E=w+_*m,S=C;break}return{line:{x1:v,y1:w,x2:x,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,s=r.height,c=r.orientation,f=r.mirror,h=r.axisLine,d=On(On(On({},ct(this.props,!1)),ct(h,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var m=+(c==="top"&&!f||c==="bottom"&&f);d=On(On({},d),{},{x1:i,y1:a+m*s,x2:i+o,y2:a+m*s})}else{var v=+(c==="left"&&!f||c==="right"&&f);d=On(On({},d),{},{x1:i+v*o,y1:a,x2:i+v*o,y2:a+s})}return Z.createElement("line",xf({},d,{className:gt("recharts-cartesian-axis-line",ki(h,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,s=this.props,c=s.tickLine,f=s.stroke,h=s.tick,d=s.tickFormatter,m=s.unit,v=nD(On(On({},this.props),{},{ticks:r}),i,a),x=this.getTickTextAnchor(),w=this.getTickVerticalAnchor(),b=ct(this.props,!1),S=ct(h,!1),E=On(On({},b),{},{fill:"none"},ct(c,!1)),_=v.map(function(A,C){var N=o.getTickLineCoord(A),M=N.line,R=N.tick,P=On(On(On(On({textAnchor:x,verticalAnchor:w},b),{},{stroke:"none",fill:f},S),R),{},{index:C,payload:A,visibleTicksCount:v.length,tickFormatter:d});return Z.createElement(on,xf({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},yx(o.props,A,C)),c&&Z.createElement("line",xf({},E,M,{className:gt("recharts-cartesian-axis-tick-line",ki(c,"className"))})),h&&t.renderTickItem(h,P,"".concat(tt(d)?d(A.value,C):A.value).concat(m||"")))});return Z.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,c=i.ticksGenerator,f=i.className,h=i.hide;if(h)return null;var d=this.props,m=d.ticks,v=bO(d,WLe),x=m;return tt(c)&&(x=m&&m.length>0?c(this.props):c(v)),o<=0||s<=0||!x||!x.length?null:Z.createElement(on,{className:gt("recharts-cartesian-axis",f),ref:function(b){r.layerReference=b}},a&&this.renderAxisLine(),this.renderTicks(x,this.state.fontSize,this.state.letterSpacing),fr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,s=gt(i.className,"recharts-cartesian-axis-tick-value");return Z.isValidElement(r)?o=Z.cloneElement(r,On(On({},i),{},{className:s})):tt(r)?o=r(On(On({},i),{},{className:s})):o=Z.createElement(Nx,xf({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(j.Component);rD(lh,"displayName","CartesianAxis");rD(lh,"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 r$e=["x1","y1","x2","y2","key"],i$e=["offset"];function au(e){"@babel/helpers - typeof";return au=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(e)}function t9(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 dr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?t9(Object(n),!0).forEach(function(r){a$e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t9(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a$e(e,t,n){return t=o$e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o$e(e){var t=s$e(e,"string");return au(t)=="symbol"?t:t+""}function s$e(e,t){if(au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bc(){return bc=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},bc.apply(this,arguments)}function n9(e,t){if(e==null)return{};var n=l$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 l$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 c$e=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,s=t.height,c=t.ry;return Z.createElement("rect",{x:i,y:a,ry:c,width:o,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Fte(e,t){var n;if(Z.isValidElement(e))n=Z.cloneElement(e,t);else if(tt(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,c=n9(t,r$e),f=ct(c,!1);f.offset;var h=n9(f,i$e);n=Z.createElement("line",bc({},h,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:s}))}return n}function u$e(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(s,c){var f=dr(dr({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(c),index:c});return Fte(i,f)});return Z.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function f$e(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(s,c){var f=dr(dr({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(c),index:c});return Fte(i,f)});return Z.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function d$e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal,f=c===void 0?!0:c;if(!f||!t||!t.length)return null;var h=s.map(function(m){return Math.round(m+i-i)}).sort(function(m,v){return m-v});i!==h[0]&&h.unshift(0);var d=h.map(function(m,v){var x=!h[v+1],w=x?i+o-m:h[v+1]-m;if(w<=0)return null;var b=v%t.length;return Z.createElement("rect",{key:"react-".concat(v),y:m,x:r,height:w,width:a,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function h$e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,c=e.height,f=e.verticalPoints;if(!n||!r||!r.length)return null;var h=f.map(function(m){return Math.round(m+a-a)}).sort(function(m,v){return m-v});a!==h[0]&&h.unshift(0);var d=h.map(function(m,v){var x=!h[v+1],w=x?a+s-m:h[v+1]-m;if(w<=0)return null;var b=v%r.length;return Z.createElement("rect",{key:"react-".concat(v),x:m,y:o,width:w,height:c,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return Z.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var p$e=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return nte(nD(dr(dr(dr({},lh.defaultProps),r),{},{ticks:Po(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},m$e=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return nte(nD(dr(dr(dr({},lh.defaultProps),r),{},{ticks:Po(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},uf={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function s0(e){var t,n,r,i,a,o,s=Zk(),c=Jk(),f=nLe(),h=dr(dr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:uf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:uf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:uf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:uf.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:uf.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:uf.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}),d=h.x,m=h.y,v=h.width,x=h.height,w=h.syncWithTicks,b=h.horizontalValues,S=h.verticalValues,E=JIe(),_=eLe();if(!_e(v)||v<=0||!_e(x)||x<=0||!_e(d)||d!==+d||!_e(m)||m!==+m)return null;var A=h.verticalCoordinatesGenerator||p$e,C=h.horizontalCoordinatesGenerator||m$e,N=h.horizontalPoints,M=h.verticalPoints;if((!N||!N.length)&&tt(C)){var R=b&&b.length,P=C({yAxis:_?dr(dr({},_),{},{ticks:R?b:_.ticks}):void 0,width:s,height:c,offset:f},R?!0:w);Lo(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(au(P),"]")),Array.isArray(P)&&(N=P)}if((!M||!M.length)&&tt(A)){var $=S&&S.length,L=A({xAxis:E?dr(dr({},E),{},{ticks:$?S:E.ticks}):void 0,width:s,height:c,offset:f},$?!0:w);Lo(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(au(L),"]")),Array.isArray(L)&&(M=L)}return Z.createElement("g",{className:"recharts-cartesian-grid"},Z.createElement(c$e,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),Z.createElement(u$e,bc({},h,{offset:f,horizontalPoints:N,xAxis:E,yAxis:_})),Z.createElement(f$e,bc({},h,{offset:f,verticalPoints:M,xAxis:E,yAxis:_})),Z.createElement(d$e,bc({},h,{horizontalPoints:N})),Z.createElement(h$e,bc({},h,{verticalPoints:M})))}s0.displayName="CartesianGrid";var g$e=["layout","type","stroke","connectNulls","isRange","ref"],v$e=["key"],Vte;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 Ute(e,t){if(e==null)return{};var n=y$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 y$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}function xc(){return xc=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},xc.apply(this,arguments)}function r9(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?r9(Object(n),!0).forEach(function(r){Da(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r9(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 i9(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,Gte(r.key),r)}}function x$e(e,t,n){return t&&i9(e.prototype,t),n&&i9(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function w$e(e,t,n){return t=l0(t),S$e(e,Hte()?Reflect.construct(t,n||[],l0(e).constructor):t.apply(e,n))}function S$e(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 _$e(e)}function _$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hte=function(){return!!e})()}function l0(e){return l0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},l0(e)}function E$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&&ZR(e,t)}function ZR(e,t){return ZR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ZR(e,t)}function Da(e,t,n){return t=Gte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gte(e){var t=A$e(e,"string");return Od(t)=="symbol"?t:t+""}function A$e(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 String(e)}var da=(function(e){function t(){var n;b$e(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=w$e(this,t,[].concat(i)),Da(n,"state",{isAnimationFinished:!0}),Da(n,"id",Vg("recharts-area-")),Da(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),tt(o)&&o()}),Da(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),tt(o)&&o()}),n}return E$e(t,e),x$e(t,[{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive,s=this.state.isAnimationFinished;if(o&&!s)return null;var c=this.props,f=c.dot,h=c.points,d=c.dataKey,m=ct(this.props,!1),v=ct(f,!0),x=h.map(function(b,S){var E=Hs(Hs(Hs({key:"dot-".concat(S),r:3},m),v),{},{index:S,cx:b.x,cy:b.y,dataKey:d,value:b.value,payload:b.payload,points:h});return t.renderDotItem(f,E)}),w={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return Z.createElement(on,xc({className:"recharts-area-dots"},w),x)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,c=o[0].x,f=o[o.length-1].x,h=r*Math.abs(c-f),d=dl(o.map(function(m){return m.y||0}));return _e(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(dl(a.map(function(m){return m.y||0})),d)),_e(d)?Z.createElement("rect",{x:c<f?c:c-h,y:0,width:h,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,s=i.strokeWidth,c=o[0].y,f=o[o.length-1].y,h=r*Math.abs(c-f),d=dl(o.map(function(m){return m.x||0}));return _e(a)&&typeof a=="number"?d=Math.max(a,d):a&&Array.isArray(a)&&a.length&&(d=Math.max(dl(a.map(function(m){return m.x||0})),d)),_e(d)?Z.createElement("rect",{x:0,y:c<f?c:c-h,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(h)}):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 s=this.props,c=s.layout,f=s.type,h=s.stroke,d=s.connectNulls,m=s.isRange;s.ref;var v=Ute(s,g$e);return Z.createElement(on,{clipPath:a?"url(#clipPath-".concat(o,")"):null},Z.createElement(Vp,xc({},ct(v,!0),{points:r,connectNulls:d,type:f,baseLine:i,layout:c,stroke:"none",className:"recharts-area-area"})),h!=="none"&&Z.createElement(Vp,xc({},ct(this.props,!1),{className:"recharts-area-curve",layout:c,type:f,connectNulls:d,fill:"none",points:r})),h!=="none"&&m&&Z.createElement(Vp,xc({},ct(this.props,!1),{className:"recharts-area-curve",layout:c,type:f,connectNulls:d,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var a=this,o=this.props,s=o.points,c=o.baseLine,f=o.isAnimationActive,h=o.animationBegin,d=o.animationDuration,m=o.animationEasing,v=o.animationId,x=this.state,w=x.prevPoints,b=x.prevBaseLine;return Z.createElement(Yo,{begin:h,duration:d,isActive:f,easing:m,from:{t:0},to:{t:1},key:"area-".concat(v),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var E=S.t;if(w){var _=w.length/s.length,A=s.map(function(R,P){var $=Math.floor(P*_);if(w[$]){var L=w[$],D=Oi(L.x,R.x),F=Oi(L.y,R.y);return Hs(Hs({},R),{},{x:D(E),y:F(E)})}return R}),C;if(_e(c)&&typeof c=="number"){var N=Oi(b,c);C=N(E)}else if(dt(c)||ih(c)){var M=Oi(b,0);C=M(E)}else C=c.map(function(R,P){var $=Math.floor(P*_);if(b[$]){var L=b[$],D=Oi(L.x,R.x),F=Oi(L.y,R.y);return Hs(Hs({},R),{},{x:D(E),y:F(E)})}return R});return a.renderAreaStatically(A,C,r,i)}return Z.createElement(on,null,Z.createElement("defs",null,Z.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(E))),Z.createElement(on,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(s,c,r,i)))})}},{key:"renderArea",value:function(r,i){var a=this.props,o=a.points,s=a.baseLine,c=a.isAnimationActive,f=this.state,h=f.prevPoints,d=f.prevBaseLine,m=f.totalLength;return c&&o&&o.length&&(!h&&m>0||!Mm(h,o)||!Mm(d,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,s,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,s=i.points,c=i.className,f=i.top,h=i.left,d=i.xAxis,m=i.yAxis,v=i.width,x=i.height,w=i.isAnimationActive,b=i.id;if(a||!s||!s.length)return null;var S=this.state.isAnimationFinished,E=s.length===1,_=gt("recharts-area",c),A=d&&d.allowDataOverflow,C=m&&m.allowDataOverflow,N=A||C,M=dt(b)?this.id:b,R=(r=ct(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},P=R.r,$=P===void 0?3:P,L=R.strokeWidth,D=L===void 0?2:L,F=VCe(o)?o:{},I=F.clipDot,q=I===void 0?!0:I,k=$*2+D;return Z.createElement(on,{className:_},A||C?Z.createElement("defs",null,Z.createElement("clipPath",{id:"clipPath-".concat(M)},Z.createElement("rect",{x:A?h:h-v/2,y:C?f:f-x/2,width:A?v:v*2,height:C?x:x*2})),!q&&Z.createElement("clipPath",{id:"clipPath-dots-".concat(M)},Z.createElement("rect",{x:h-k/2,y:f-k/2,width:v+k,height:x+k}))):null,E?null:this.renderArea(N,M),(o||E)&&this.renderDots(N,q,M),(!w||S)&&wl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(j.PureComponent);Vte=da;Da(da,"displayName","Area");Da(da,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ah.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Da(da,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(_e(s)&&typeof s=="number")return s;var c=i==="horizontal"?r:n,f=c.scale.domain();if(c.type==="number"){var h=Math.max(f[0],f[1]),d=Math.min(f[0],f[1]);return s==="dataMin"?d:s==="dataMax"||h<0?h:Math.max(Math.min(f[0],f[1]),0)}return s==="dataMin"?f[0]:s==="dataMax"?f[1]:f[0]});Da(da,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,c=e.dataKey,f=e.stackedData,h=e.dataStartIndex,d=e.displayedData,m=e.offset,v=t.layout,x=f&&f.length,w=Vte.getBaseValue(t,n,r,i),b=v==="horizontal",S=!1,E=d.map(function(A,C){var N;x?N=f[h+C]:(N=ci(A,c),Array.isArray(N)?S=!0:N=[w,N]);var M=N[1]==null||x&&ci(A,c)==null;return b?{x:D8({axis:r,ticks:a,bandSize:s,entry:A,index:C}),y:M?null:i.scale(N[1]),value:N,payload:A}:{x:M?null:r.scale(N[1]),y:D8({axis:i,ticks:o,bandSize:s,entry:A,index:C}),value:N,payload:A}}),_;return x||S?_=E.map(function(A){var C=Array.isArray(A.value)?A.value[0]:null;return b?{x:A.x,y:C!=null&&A.y!=null?i.scale(C):null}:{x:C!=null?r.scale(C):null,y:A.y}}):_=b?i.scale(w):r.scale(w),Hs({points:E,baseLine:_,layout:v,isRange:S},m)});Da(da,"renderDotItem",function(e,t){var n;if(Z.isValidElement(e))n=Z.cloneElement(e,t);else if(tt(e))n=e(t);else{var r=gt("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=Ute(t,v$e);n=Z.createElement(Wk,xc({},a,{key:i,className:r}))}return n});function Md(e){"@babel/helpers - typeof";return Md=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},Md(e)}function C$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T$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,Yte(r.key),r)}}function j$e(e,t,n){return t&&T$e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function N$e(e,t,n){return t=c0(t),O$e(e,Kte()?Reflect.construct(t,n||[],c0(e).constructor):t.apply(e,n))}function O$e(e,t){if(t&&(Md(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M$e(e)}function M$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kte=function(){return!!e})()}function c0(e){return c0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},c0(e)}function R$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&&JR(e,t)}function JR(e,t){return JR=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},JR(e,t)}function Wte(e,t,n){return t=Yte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yte(e){var t=P$e(e,"string");return Md(t)=="symbol"?t:t+""}function P$e(e,t){if(Md(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Md(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function eP(){return eP=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},eP.apply(this,arguments)}function k$e(e){var t=e.xAxisId,n=Zk(),r=Jk(),i=Mte(t);return i==null?null:j.createElement(lh,eP({},i,{className:gt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return Po(o,!0)}}))}var ou=(function(e){function t(){return C$e(this,t),N$e(this,t,arguments)}return R$e(t,e),j$e(t,[{key:"render",value:function(){return j.createElement(k$e,this.props)}}])})(j.Component);Wte(ou,"displayName","XAxis");Wte(ou,"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 Rd(e){"@babel/helpers - typeof";return Rd=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},Rd(e)}function D$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I$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,Zte(r.key),r)}}function L$e(e,t,n){return t&&I$e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $$e(e,t,n){return t=u0(t),B$e(e,Xte()?Reflect.construct(t,n||[],u0(e).constructor):t.apply(e,n))}function B$e(e,t){if(t&&(Rd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return q$e(e)}function q$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xte(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xte=function(){return!!e})()}function u0(e){return u0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},u0(e)}function z$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&&tP(e,t)}function tP(e,t){return tP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tP(e,t)}function Qte(e,t,n){return t=Zte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zte(e){var t=F$e(e,"string");return Rd(t)=="symbol"?t:t+""}function F$e(e,t){if(Rd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function nP(){return nP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nP.apply(this,arguments)}var V$e=function(t){var n=t.yAxisId,r=Zk(),i=Jk(),a=Rte(n);return a==null?null:j.createElement(lh,nP({},a,{className:gt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(s){return Po(s,!0)}}))},su=(function(e){function t(){return D$e(this,t),$$e(this,t,arguments)}return z$e(t,e),L$e(t,[{key:"render",value:function(){return j.createElement(V$e,this.props)}}])})(j.Component);Qte(su,"displayName","YAxis");Qte(su,"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 a9(e){return K$e(e)||G$e(e)||H$e(e)||U$e()}function U$e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
499
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H$e(e,t){if(e){if(typeof e=="string")return rP(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 rP(e,t)}}function G$e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K$e(e){if(Array.isArray(e))return rP(e)}function rP(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 iP=function(t,n,r,i,a){var o=sa(t,tD),s=sa(t,Zw),c=[].concat(a9(o),a9(s)),f=sa(t,e1),h="".concat(i,"Id"),d=i[0],m=n;if(c.length&&(m=c.reduce(function(w,b){if(b.props[h]===r&&Ba(b.props,"extendDomain")&&_e(b.props[d])){var S=b.props[d];return[Math.min(w[0],S),Math.max(w[1],S)]}return w},m)),f.length){var v="".concat(d,"1"),x="".concat(d,"2");m=f.reduce(function(w,b){if(b.props[h]===r&&Ba(b.props,"extendDomain")&&_e(b.props[v])&&_e(b.props[x])){var S=b.props[v],E=b.props[x];return[Math.min(w[0],S,E),Math.max(w[1],S,E)]}return w},m)}return a&&a.length&&(m=a.reduce(function(w,b){return _e(b)?[Math.min(w[0],b),Math.max(w[1],b)]:w},m)),m},xO={exports:{}},o9;function W$e(){return o9||(o9=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(c,f,h){this.fn=c,this.context=f,this.once=h||!1}function a(c,f,h,d,m){if(typeof h!="function")throw new TypeError("The listener must be a function");var v=new i(h,d||c,m),x=n?n+f:f;return c._events[x]?c._events[x].fn?c._events[x]=[c._events[x],v]:c._events[x].push(v):(c._events[x]=v,c._eventsCount++),c}function o(c,f){--c._eventsCount===0?c._events=new r:delete c._events[f]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var f=[],h,d;if(this._eventsCount===0)return f;for(d in h=this._events)t.call(h,d)&&f.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(h)):f},s.prototype.listeners=function(f){var h=n?n+f:f,d=this._events[h];if(!d)return[];if(d.fn)return[d.fn];for(var m=0,v=d.length,x=new Array(v);m<v;m++)x[m]=d[m].fn;return x},s.prototype.listenerCount=function(f){var h=n?n+f:f,d=this._events[h];return d?d.fn?1:d.length:0},s.prototype.emit=function(f,h,d,m,v,x){var w=n?n+f:f;if(!this._events[w])return!1;var b=this._events[w],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,h),!0;case 3:return b.fn.call(b.context,h,d),!0;case 4:return b.fn.call(b.context,h,d,m),!0;case 5:return b.fn.call(b.context,h,d,m,v),!0;case 6:return b.fn.call(b.context,h,d,m,v,x),!0}for(_=1,E=new Array(S-1);_<S;_++)E[_-1]=arguments[_];b.fn.apply(b.context,E)}else{var A=b.length,C;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,h);break;case 3:b[_].fn.call(b[_].context,h,d);break;case 4:b[_].fn.call(b[_].context,h,d,m);break;default:if(!E)for(C=1,E=new Array(S-1);C<S;C++)E[C-1]=arguments[C];b[_].fn.apply(b[_].context,E)}}return!0},s.prototype.on=function(f,h,d){return a(this,f,h,d,!1)},s.prototype.once=function(f,h,d){return a(this,f,h,d,!0)},s.prototype.removeListener=function(f,h,d,m){var v=n?n+f:f;if(!this._events[v])return this;if(!h)return o(this,v),this;var x=this._events[v];if(x.fn)x.fn===h&&(!m||x.once)&&(!d||x.context===d)&&o(this,v);else{for(var w=0,b=[],S=x.length;w<S;w++)(x[w].fn!==h||m&&!x[w].once||d&&x[w].context!==d)&&b.push(x[w]);b.length?this._events[v]=b.length===1?b[0]:b:o(this,v)}return this},s.prototype.removeAllListeners=function(f){var h;return f?(h=n?n+f:f,this._events[h]&&o(this,h)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(xO)),xO.exports}var Y$e=W$e();const X$e=Ct(Y$e);var wO=new X$e,SO="recharts.syncMouseEvents";function Jm(e){"@babel/helpers - typeof";return Jm=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},Jm(e)}function Q$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z$e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jte(r.key),r)}}function J$e(e,t,n){return t&&Z$e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _O(e,t,n){return t=Jte(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jte(e){var t=e3e(e,"string");return Jm(t)=="symbol"?t:t+""}function e3e(e,t){if(Jm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var t3e=(function(){function e(){Q$e(this,e),_O(this,"activeIndex",0),_O(this,"coordinateList",[]),_O(this,"layout","horizontal")}return J$e(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,s=o===void 0?null:o,c=n.layout,f=c===void 0?null:c,h=n.offset,d=h===void 0?null:h,m=n.mouseHandlerCallback,v=m===void 0?null:m;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=f??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=v??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(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,s=i.height,c=this.coordinateList[this.activeIndex].coordinate,f=((n=window)===null||n===void 0?void 0:n.scrollX)||0,h=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=a+c+f,m=o+this.offset.top+s/2+h;this.mouseHandlerCallback({pageX:d,pageY:m})}}}])})();function n3e(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 r3e(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 ene(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=Jn(t,n,r,i),s=Jn(t,n,r,a);return{points:[o,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function i3e(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 s=t.cx,c=t.cy,f=t.innerRadius,h=t.outerRadius,d=t.angle,m=Jn(s,c,f,d),v=Jn(s,c,h,d);r=m.x,i=m.y,a=v.x,o=v.y}else return ene(t);return[{x:r,y:i},{x:a,y:o}]}function eg(e){"@babel/helpers - typeof";return eg=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},eg(e)}function s9(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 Xy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s9(Object(n),!0).forEach(function(r){a3e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s9(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a3e(e,t,n){return t=o3e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o3e(e){var t=s3e(e,"string");return eg(t)=="symbol"?t:t+""}function s3e(e,t){if(eg(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(eg(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function l3e(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,c=e.offset,f=e.activeTooltipIndex,h=e.tooltipAxisBandSize,d=e.layout,m=e.chartName,v=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!v||!a||!o||m!=="ScatterChart"&&i!=="axis")return null;var x,w=Vp;if(m==="ScatterChart")x=o,w=wDe;else if(m==="BarChart")x=r3e(d,o,c,h),w=Kk;else if(d==="radial"){var b=ene(o),S=b.cx,E=b.cy,_=b.radius,A=b.startAngle,C=b.endAngle;x={cx:S,cy:E,startAngle:A,endAngle:C,innerRadius:_,outerRadius:_},w=ste}else x={points:i3e(d,o,c)},w=Vp;var N=Xy(Xy(Xy(Xy({stroke:"#ccc",pointerEvents:"none"},c),x),ct(v,!1)),{},{payload:s,payloadIndex:f,className:gt("recharts-tooltip-cursor",v.className)});return j.isValidElement(v)?j.cloneElement(v,N):j.createElement(w,N)}var c3e=["item"],u3e=["children","className","width","height","style","compact","title","desc"];function Pd(e){"@babel/helpers - typeof";return Pd=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},Pd(e)}function wf(){return wf=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},wf.apply(this,arguments)}function l9(e,t){return h3e(e)||d3e(e,t)||nne(e,t)||f3e()}function f3e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
500
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d3e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],c=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(h){f=!0,i=h}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return s}}function h3e(e){if(Array.isArray(e))return e}function c9(e,t){if(e==null)return{};var n=p3e(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 p3e(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 m3e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g3e(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,rne(r.key),r)}}function v3e(e,t,n){return t&&g3e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y3e(e,t,n){return t=f0(t),b3e(e,tne()?Reflect.construct(t,n||[],f0(e).constructor):t.apply(e,n))}function b3e(e,t){if(t&&(Pd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x3e(e)}function x3e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tne=function(){return!!e})()}function f0(e){return f0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},f0(e)}function w3e(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&&aP(e,t)}function aP(e,t){return aP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},aP(e,t)}function kd(e){return E3e(e)||_3e(e)||nne(e)||S3e()}function S3e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
501
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nne(e,t){if(e){if(typeof e=="string")return oP(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 oP(e,t)}}function _3e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function E3e(e){if(Array.isArray(e))return oP(e)}function oP(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 u9(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?u9(Object(n),!0).forEach(function(r){ze(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u9(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ze(e,t,n){return t=rne(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rne(e){var t=A3e(e,"string");return Pd(t)=="symbol"?t:t+""}function A3e(e,t){if(Pd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C3e={xAxis:["bottom","top"],yAxis:["left","right"]},T3e={width:"100%",height:"100%"},ine={x:0,y:0};function Qy(e){return e}var j3e=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},N3e=function(t,n,r,i){var a=n.find(function(h){return h&&h.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,s=i.radius;return me(me(me({},i),Jn(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var c=a.coordinate,f=i.angle;return me(me(me({},i),Jn(i.cx,i.cy,c,f)),{},{angle:f,radius:c})}return ine},t1=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(s,c){var f=c.props.data;return f&&f.length?[].concat(kd(s),kd(f)):s},[]);return o.length>0?o:t&&t.length&&_e(i)&&_e(a)?t.slice(i,a+1):[]};function ane(e){return e==="number"?[0,"auto"]:void 0}var sP=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=t1(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(c,f){var h,d=(h=f.props.data)!==null&&h!==void 0?h:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(o.dataKey&&!o.allowDuplicatedCategory){var v=d===void 0?s:d;m=gx(v,o.dataKey,i)}else m=d&&d[r]||s[r];return m?[].concat(kd(c),[ite(f,m)]):c},[])},f9=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=j3e(a,r),s=t.orderedTooltipTicks,c=t.tooltipAxis,f=t.tooltipTicks,h=tPe(o,s,f,c);if(h>=0&&f){var d=f[h]&&f[h].value,m=sP(t,n,h,d),v=N3e(r,s,h,a);return{activeTooltipIndex:h,activeLabel:d,activePayload:m,activeCoordinate:v}}return null},O3e=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,f=n.dataEndIndex,h=t.layout,d=t.children,m=t.stackOffset,v=tte(h,a);return r.reduce(function(x,w){var b,S=w.type.defaultProps!==void 0?me(me({},w.type.defaultProps),w.props):w.props,E=S.type,_=S.dataKey,A=S.allowDataOverflow,C=S.allowDuplicatedCategory,N=S.scale,M=S.ticks,R=S.includeHidden,P=S[o];if(x[P])return x;var $=t1(t.data,{graphicalItems:i.filter(function(V){var X,W=o in V.props?V.props[o]:(X=V.type.defaultProps)===null||X===void 0?void 0:X[o];return W===P}),dataStartIndex:c,dataEndIndex:f}),L=$.length,D,F,I;n3e(S.domain,A,E)&&(D=CR(S.domain,null,A),v&&(E==="number"||N!=="auto")&&(I=Fp($,_,"category")));var q=ane(E);if(!D||D.length===0){var k,z=(k=S.domain)!==null&&k!==void 0?k:q;if(_){if(D=Fp($,_,E),E==="category"&&v){var H=PCe(D);C&&H?(F=D,D=Qx(0,L)):C||(D=B8(z,D,w).reduce(function(V,X){return V.indexOf(X)>=0?V:[].concat(kd(V),[X])},[]))}else if(E==="category")C?D=D.filter(function(V){return V!==""&&!dt(V)}):D=B8(z,D,w).reduce(function(V,X){return V.indexOf(X)>=0||X===""||dt(X)?V:[].concat(kd(V),[X])},[]);else if(E==="number"){var G=oPe($,i.filter(function(V){var X,W,K=o in V.props?V.props[o]:(X=V.type.defaultProps)===null||X===void 0?void 0:X[o],J="hide"in V.props?V.props.hide:(W=V.type.defaultProps)===null||W===void 0?void 0:W.hide;return K===P&&(R||!J)}),_,a,h);G&&(D=G)}v&&(E==="number"||N!=="auto")&&(I=Fp($,_,"category"))}else v?D=Qx(0,L):s&&s[P]&&s[P].hasStack&&E==="number"?D=m==="expand"?[0,1]:rte(s[P].stackGroups,c,f):D=ete($,i.filter(function(V){var X=o in V.props?V.props[o]:V.type.defaultProps[o],W="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return X===P&&(R||!W)}),E,h,!0);if(E==="number")D=iP(d,D,P,a,M),z&&(D=CR(z,D,A));else if(E==="category"&&z){var Q=z,U=D.every(function(V){return Q.indexOf(V)>=0});U&&(D=Q)}}return me(me({},x),{},ze({},P,me(me({},S),{},{axisType:a,domain:D,categoricalDomain:I,duplicateDomain:F,originalDomain:(b=S.domain)!==null&&b!==void 0?b:q,isCategorical:v,layout:h})))},{})},M3e=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,c=n.dataStartIndex,f=n.dataEndIndex,h=t.layout,d=t.children,m=t1(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:f}),v=m.length,x=tte(h,a),w=-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=ane("number");if(!b[_]){w++;var C;return x?C=Qx(0,v):s&&s[_]&&s[_].hasStack?(C=rte(s[_].stackGroups,c,f),C=iP(d,C,_,a)):(C=CR(A,ete(m,r.filter(function(N){var M,R,P=o in N.props?N.props[o]:(M=N.type.defaultProps)===null||M===void 0?void 0:M[o],$="hide"in N.props?N.props.hide:(R=N.type.defaultProps)===null||R===void 0?void 0:R.hide;return P===_&&!$}),"number",h),i.defaultProps.allowDataOverflow),C=iP(d,C,_,a)),me(me({},b),{},ze({},_,me(me({axisType:a},i.defaultProps),{},{hide:!0,orientation:ki(C3e,"".concat(a,".").concat(w%2),null),domain:C,originalDomain:A,isCategorical:x,layout:h})))}return b},{})},R3e=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,c=n.dataStartIndex,f=n.dataEndIndex,h=t.children,d="".concat(i,"Id"),m=sa(h,a),v={};return m&&m.length?v=O3e(t,{axes:m,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:f}):o&&o.length&&(v=M3e(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:s,dataStartIndex:c,dataEndIndex:f})),v},P3e=function(t){var n=Qs(t),r=Po(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:_k(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:zx(n,r)}},d9=function(t){var n=t.children,r=t.defaultShowTooltip,i=Zr(n,Ed),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}},k3e=function(t){return!t||!t.length?!1:t.some(function(n){var r=Io(n&&n.type);return r&&r.indexOf("Bar")>=0})},h9=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"}},D3e=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,c=s===void 0?{}:s,f=r.width,h=r.height,d=r.children,m=r.margin||{},v=Zr(d,Ed),x=Zr(d,$o),w=Object.keys(c).reduce(function(C,N){var M=c[N],R=M.orientation;return!M.mirror&&!M.hide?me(me({},C),{},ze({},R,C[R]+M.width)):C},{left:m.left||0,right:m.right||0}),b=Object.keys(o).reduce(function(C,N){var M=o[N],R=M.orientation;return!M.mirror&&!M.hide?me(me({},C),{},ze({},R,ki(C,"".concat(R))+M.height)):C},{top:m.top||0,bottom:m.bottom||0}),S=me(me({},b),w),E=S.bottom;v&&(S.bottom+=v.props.height||Ed.defaultProps.height),x&&n&&(S=iPe(S,i,r,n));var _=f-S.left-S.right,A=h-S.top-S.bottom;return me(me({brushBottom:E},S),{},{width:Math.max(_,0),height:Math.max(A,0)})},I3e=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},one=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,c=t.axisComponents,f=t.legendContent,h=t.formatAxisMap,d=t.defaultProps,m=function(S,E){var _=E.graphicalItems,A=E.stackGroups,C=E.offset,N=E.updateId,M=E.dataStartIndex,R=E.dataEndIndex,P=S.barSize,$=S.layout,L=S.barGap,D=S.barCategoryGap,F=S.maxBarSize,I=h9($),q=I.numericAxisName,k=I.cateAxisName,z=k3e(_),H=[];return _.forEach(function(G,Q){var U=t1(S.data,{graphicalItems:[G],dataStartIndex:M,dataEndIndex:R}),V=G.type.defaultProps!==void 0?me(me({},G.type.defaultProps),G.props):G.props,X=V.dataKey,W=V.maxBarSize,K=V["".concat(q,"Id")],J=V["".concat(k,"Id")],ee={},te=c.reduce(function(Ft,Xe){var ht=E["".concat(Xe.axisType,"Map")],Tt=V["".concat(Xe.axisType,"Id")];ht&&ht[Tt]||Xe.axisType==="zAxis"||iu();var We=ht[Tt];return me(me({},Ft),{},ze(ze({},Xe.axisType,We),"".concat(Xe.axisType,"Ticks"),Po(We)))},ee),ne=te[k],se=te["".concat(k,"Ticks")],ce=A&&A[K]&&A[K].hasStack&&yPe(G,A[K].stackGroups),oe=Io(G.type).indexOf("Bar")>=0,be=zx(ne,se),xe=[],we=z&&nPe({barSize:P,stackGroups:A,totalSize:I3e(te,k)});if(oe){var Ae,Ee,rt=dt(W)?F:W,Ve=(Ae=(Ee=zx(ne,se,!0))!==null&&Ee!==void 0?Ee:rt)!==null&&Ae!==void 0?Ae:0;xe=rPe({barGap:L,barCategoryGap:D,bandSize:Ve!==be?Ve:be,sizeList:we[J],maxBarSize:rt}),Ve!==be&&(xe=xe.map(function(Ft){return me(me({},Ft),{},{position:me(me({},Ft.position),{},{offset:Ft.position.offset-Ve/2})})}))}var Pt=G&&G.type&&G.type.getComposedData;Pt&&H.push({props:me(me({},Pt(me(me({},te),{},{displayedData:U,props:S,dataKey:X,item:G,bandSize:be,barPosition:xe,offset:C,stackedData:ce,layout:$,dataStartIndex:M,dataEndIndex:R}))),{},ze(ze(ze({key:G.key||"item-".concat(Q)},q,te[q]),k,te[k]),"animationId",N)),childIndex:GCe(G,S.children),item:G})}),H},v=function(S,E){var _=S.props,A=S.dataStartIndex,C=S.dataEndIndex,N=S.updateId;if(!iU({props:_}))return null;var M=_.children,R=_.layout,P=_.stackOffset,$=_.data,L=_.reverseStackOrder,D=h9(R),F=D.numericAxisName,I=D.cateAxisName,q=sa(M,r),k=mPe($,q,"".concat(F,"Id"),"".concat(I,"Id"),P,L),z=c.reduce(function(V,X){var W="".concat(X.axisType,"Map");return me(me({},V),{},ze({},W,R3e(_,me(me({},X),{},{graphicalItems:q,stackGroups:X.axisType===F&&k,dataStartIndex:A,dataEndIndex:C}))))},{}),H=D3e(me(me({},z),{},{props:_,graphicalItems:q}),E==null?void 0:E.legendBBox);Object.keys(z).forEach(function(V){z[V]=h(_,z[V],H,V.replace("Map",""),n)});var G=z["".concat(I,"Map")],Q=P3e(G),U=m(_,me(me({},z),{},{dataStartIndex:A,dataEndIndex:C,updateId:N,graphicalItems:q,stackGroups:k,offset:H}));return me(me({formattedGraphicalItems:U,graphicalItems:q,offset:H,stackGroups:k},Q),z)},x=(function(b){function S(E){var _,A,C;return m3e(this,S),C=y3e(this,S,[E]),ze(C,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ze(C,"accessibilityManager",new t3e),ze(C,"handleLegendBBoxUpdate",function(N){if(N){var M=C.state,R=M.dataStartIndex,P=M.dataEndIndex,$=M.updateId;C.setState(me({legendBBox:N},v({props:C.props,dataStartIndex:R,dataEndIndex:P,updateId:$},me(me({},C.state),{},{legendBBox:N}))))}}),ze(C,"handleReceiveSyncEvent",function(N,M,R){if(C.props.syncId===N){if(R===C.eventEmitterSymbol&&typeof C.props.syncMethod!="function")return;C.applySyncEvent(M)}}),ze(C,"handleBrushChange",function(N){var M=N.startIndex,R=N.endIndex;if(M!==C.state.dataStartIndex||R!==C.state.dataEndIndex){var P=C.state.updateId;C.setState(function(){return me({dataStartIndex:M,dataEndIndex:R},v({props:C.props,dataStartIndex:M,dataEndIndex:R,updateId:P},C.state))}),C.triggerSyncEvent({dataStartIndex:M,dataEndIndex:R})}}),ze(C,"handleMouseEnter",function(N){var M=C.getMouseInfo(N);if(M){var R=me(me({},M),{},{isTooltipActive:!0});C.setState(R),C.triggerSyncEvent(R);var P=C.props.onMouseEnter;tt(P)&&P(R,N)}}),ze(C,"triggeredAfterMouseMove",function(N){var M=C.getMouseInfo(N),R=M?me(me({},M),{},{isTooltipActive:!0}):{isTooltipActive:!1};C.setState(R),C.triggerSyncEvent(R);var P=C.props.onMouseMove;tt(P)&&P(R,N)}),ze(C,"handleItemMouseEnter",function(N){C.setState(function(){return{isTooltipActive:!0,activeItem:N,activePayload:N.tooltipPayload,activeCoordinate:N.tooltipPosition||{x:N.cx,y:N.cy}}})}),ze(C,"handleItemMouseLeave",function(){C.setState(function(){return{isTooltipActive:!1}})}),ze(C,"handleMouseMove",function(N){N.persist(),C.throttleTriggeredAfterMouseMove(N)}),ze(C,"handleMouseLeave",function(N){C.throttleTriggeredAfterMouseMove.cancel();var M={isTooltipActive:!1};C.setState(M),C.triggerSyncEvent(M);var R=C.props.onMouseLeave;tt(R)&&R(M,N)}),ze(C,"handleOuterEvent",function(N){var M=HCe(N),R=ki(C.props,"".concat(M));if(M&&tt(R)){var P,$;/.*touch.*/i.test(M)?$=C.getMouseInfo(N.changedTouches[0]):$=C.getMouseInfo(N),R((P=$)!==null&&P!==void 0?P:{},N)}}),ze(C,"handleClick",function(N){var M=C.getMouseInfo(N);if(M){var R=me(me({},M),{},{isTooltipActive:!0});C.setState(R),C.triggerSyncEvent(R);var P=C.props.onClick;tt(P)&&P(R,N)}}),ze(C,"handleMouseDown",function(N){var M=C.props.onMouseDown;if(tt(M)){var R=C.getMouseInfo(N);M(R,N)}}),ze(C,"handleMouseUp",function(N){var M=C.props.onMouseUp;if(tt(M)){var R=C.getMouseInfo(N);M(R,N)}}),ze(C,"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.throttleTriggeredAfterMouseMove(N.changedTouches[0])}),ze(C,"handleTouchStart",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.handleMouseDown(N.changedTouches[0])}),ze(C,"handleTouchEnd",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.handleMouseUp(N.changedTouches[0])}),ze(C,"handleDoubleClick",function(N){var M=C.props.onDoubleClick;if(tt(M)){var R=C.getMouseInfo(N);M(R,N)}}),ze(C,"handleContextMenu",function(N){var M=C.props.onContextMenu;if(tt(M)){var R=C.getMouseInfo(N);M(R,N)}}),ze(C,"triggerSyncEvent",function(N){C.props.syncId!==void 0&&wO.emit(SO,C.props.syncId,N,C.eventEmitterSymbol)}),ze(C,"applySyncEvent",function(N){var M=C.props,R=M.layout,P=M.syncMethod,$=C.state.updateId,L=N.dataStartIndex,D=N.dataEndIndex;if(N.dataStartIndex!==void 0||N.dataEndIndex!==void 0)C.setState(me({dataStartIndex:L,dataEndIndex:D},v({props:C.props,dataStartIndex:L,dataEndIndex:D,updateId:$},C.state)));else if(N.activeTooltipIndex!==void 0){var F=N.chartX,I=N.chartY,q=N.activeTooltipIndex,k=C.state,z=k.offset,H=k.tooltipTicks;if(!z)return;if(typeof P=="function")q=P(H,N);else if(P==="value"){q=-1;for(var G=0;G<H.length;G++)if(H[G].value===N.activeLabel){q=G;break}}var Q=me(me({},z),{},{x:z.left,y:z.top}),U=Math.min(F,Q.x+Q.width),V=Math.min(I,Q.y+Q.height),X=H[q]&&H[q].value,W=sP(C.state,C.props.data,q),K=H[q]?{x:R==="horizontal"?H[q].coordinate:U,y:R==="horizontal"?V:H[q].coordinate}:ine;C.setState(me(me({},N),{},{activeLabel:X,activeCoordinate:K,activePayload:W,activeTooltipIndex:q}))}else C.setState(N)}),ze(C,"renderCursor",function(N){var M,R=C.state,P=R.isTooltipActive,$=R.activeCoordinate,L=R.activePayload,D=R.offset,F=R.activeTooltipIndex,I=R.tooltipAxisBandSize,q=C.getTooltipEventType(),k=(M=N.props.active)!==null&&M!==void 0?M:P,z=C.props.layout,H=N.key||"_recharts-cursor";return Z.createElement(l3e,{key:H,activeCoordinate:$,activePayload:L,activeTooltipIndex:F,chartName:n,element:N,isActive:k,layout:z,offset:D,tooltipAxisBandSize:I,tooltipEventType:q})}),ze(C,"renderPolarAxis",function(N,M,R){var P=ki(N,"type.axisType"),$=ki(C.state,"".concat(P,"Map")),L=N.type.defaultProps,D=L!==void 0?me(me({},L),N.props):N.props,F=$&&$[D["".concat(P,"Id")]];return j.cloneElement(N,me(me({},F),{},{className:gt(P,F.className),key:N.key||"".concat(M,"-").concat(R),ticks:Po(F,!0)}))}),ze(C,"renderPolarGrid",function(N){var M=N.props,R=M.radialLines,P=M.polarAngles,$=M.polarRadius,L=C.state,D=L.radiusAxisMap,F=L.angleAxisMap,I=Qs(D),q=Qs(F),k=q.cx,z=q.cy,H=q.innerRadius,G=q.outerRadius;return j.cloneElement(N,{polarAngles:Array.isArray(P)?P:Po(q,!0).map(function(Q){return Q.coordinate}),polarRadius:Array.isArray($)?$:Po(I,!0).map(function(Q){return Q.coordinate}),cx:k,cy:z,innerRadius:H,outerRadius:G,key:N.key||"polar-grid",radialLines:R})}),ze(C,"renderLegend",function(){var N=C.state.formattedGraphicalItems,M=C.props,R=M.children,P=M.width,$=M.height,L=C.props.margin||{},D=P-(L.left||0)-(L.right||0),F=Zee({children:R,formattedGraphicalItems:N,legendWidth:D,legendContent:f});if(!F)return null;var I=F.item,q=c9(F,c3e);return j.cloneElement(I,me(me({},q),{},{chartWidth:P,chartHeight:$,margin:L,onBBoxUpdate:C.handleLegendBBoxUpdate}))}),ze(C,"renderTooltip",function(){var N,M=C.props,R=M.children,P=M.accessibilityLayer,$=Zr(R,Ti);if(!$)return null;var L=C.state,D=L.isTooltipActive,F=L.activeCoordinate,I=L.activePayload,q=L.activeLabel,k=L.offset,z=(N=$.props.active)!==null&&N!==void 0?N:D;return j.cloneElement($,{viewBox:me(me({},k),{},{x:k.left,y:k.top}),active:z,label:q,payload:z?I:[],coordinate:F,accessibilityLayer:P})}),ze(C,"renderBrush",function(N){var M=C.props,R=M.margin,P=M.data,$=C.state,L=$.offset,D=$.dataStartIndex,F=$.dataEndIndex,I=$.updateId;return j.cloneElement(N,{key:N.key||"_recharts-brush",onChange:Gy(C.handleBrushChange,N.props.onChange),data:P,x:_e(N.props.x)?N.props.x:L.left,y:_e(N.props.y)?N.props.y:L.top+L.height+L.brushBottom-(R.bottom||0),width:_e(N.props.width)?N.props.width:L.width,startIndex:D,endIndex:F,updateId:"brush-".concat(I)})}),ze(C,"renderReferenceElement",function(N,M,R){if(!N)return null;var P=C,$=P.clipPathId,L=C.state,D=L.xAxisMap,F=L.yAxisMap,I=L.offset,q=N.type.defaultProps||{},k=N.props,z=k.xAxisId,H=z===void 0?q.xAxisId:z,G=k.yAxisId,Q=G===void 0?q.yAxisId:G;return j.cloneElement(N,{key:N.key||"".concat(M,"-").concat(R),xAxis:D[H],yAxis:F[Q],viewBox:{x:I.left,y:I.top,width:I.width,height:I.height},clipPathId:$})}),ze(C,"renderActivePoints",function(N){var M=N.item,R=N.activePoint,P=N.basePoint,$=N.childIndex,L=N.isRange,D=[],F=M.props.key,I=M.item.type.defaultProps!==void 0?me(me({},M.item.type.defaultProps),M.item.props):M.item.props,q=I.activeDot,k=I.dataKey,z=me(me({index:$,dataKey:k,cx:R.x,cy:R.y,r:4,fill:Gk(M.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},ct(q,!1)),vx(q));return D.push(S.renderActiveDot(q,z,"".concat(F,"-activePoint-").concat($))),P?D.push(S.renderActiveDot(q,me(me({},z),{},{cx:P.x,cy:P.y}),"".concat(F,"-basePoint-").concat($))):L&&D.push(null),D}),ze(C,"renderGraphicChild",function(N,M,R){var P=C.filterFormatItem(N,M,R);if(!P)return null;var $=C.getTooltipEventType(),L=C.state,D=L.isTooltipActive,F=L.tooltipAxis,I=L.activeTooltipIndex,q=L.activeLabel,k=C.props.children,z=Zr(k,Ti),H=P.props,G=H.points,Q=H.isRange,U=H.baseLine,V=P.item.type.defaultProps!==void 0?me(me({},P.item.type.defaultProps),P.item.props):P.item.props,X=V.activeDot,W=V.hide,K=V.activeBar,J=V.activeShape,ee=!!(!W&&D&&z&&(X||K||J)),te={};$!=="axis"&&z&&z.props.trigger==="click"?te={onClick:Gy(C.handleItemMouseEnter,N.props.onClick)}:$!=="axis"&&(te={onMouseLeave:Gy(C.handleItemMouseLeave,N.props.onMouseLeave),onMouseEnter:Gy(C.handleItemMouseEnter,N.props.onMouseEnter)});var ne=j.cloneElement(N,me(me({},P.props),te));function se(Xe){return typeof F.dataKey=="function"?F.dataKey(Xe.payload):null}if(ee)if(I>=0){var ce,oe;if(F.dataKey&&!F.allowDuplicatedCategory){var be=typeof F.dataKey=="function"?se:"payload.".concat(F.dataKey.toString());ce=gx(G,be,q),oe=Q&&U&&gx(U,be,q)}else ce=G==null?void 0:G[I],oe=Q&&U&&U[I];if(J||K){var xe=N.props.activeIndex!==void 0?N.props.activeIndex:I;return[j.cloneElement(N,me(me(me({},P.props),te),{},{activeIndex:xe})),null,null]}if(!dt(ce))return[ne].concat(kd(C.renderActivePoints({item:P,activePoint:ce,basePoint:oe,childIndex:I,isRange:Q})))}else{var we,Ae=(we=C.getItemByXY(C.state.activeCoordinate))!==null&&we!==void 0?we:{graphicalItem:ne},Ee=Ae.graphicalItem,rt=Ee.item,Ve=rt===void 0?N:rt,Pt=Ee.childIndex,Ft=me(me(me({},P.props),te),{},{activeIndex:Pt});return[j.cloneElement(Ve,Ft),null,null]}return Q?[ne,null,null]:[ne,null]}),ze(C,"renderCustomized",function(N,M,R){return j.cloneElement(N,me(me({key:"recharts-customized-".concat(R)},C.props),C.state))}),ze(C,"renderMap",{CartesianGrid:{handler:Qy,once:!0},ReferenceArea:{handler:C.renderReferenceElement},ReferenceLine:{handler:Qy},ReferenceDot:{handler:C.renderReferenceElement},XAxis:{handler:Qy},YAxis:{handler:Qy},Brush:{handler:C.renderBrush,once:!0},Bar:{handler:C.renderGraphicChild},Line:{handler:C.renderGraphicChild},Area:{handler:C.renderGraphicChild},Radar:{handler:C.renderGraphicChild},RadialBar:{handler:C.renderGraphicChild},Scatter:{handler:C.renderGraphicChild},Pie:{handler:C.renderGraphicChild},Funnel:{handler:C.renderGraphicChild},Tooltip:{handler:C.renderCursor,once:!0},PolarGrid:{handler:C.renderPolarGrid,once:!0},PolarAngleAxis:{handler:C.renderPolarAxis},PolarRadiusAxis:{handler:C.renderPolarAxis},Customized:{handler:C.renderCustomized}}),C.clipPathId="".concat((_=E.id)!==null&&_!==void 0?_:Vg("recharts"),"-clip"),C.throttleTriggeredAfterMouseMove=nee(C.triggeredAfterMouseMove,(A=E.throttleDelay)!==null&&A!==void 0?A:1e3/60),C.state={},C}return w3e(S,b),v3e(S,[{key:"componentDidMount",value:function(){var _,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var _=this.props,A=_.children,C=_.data,N=_.height,M=_.layout,R=Zr(A,Ti);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,L=sP(this.state,C,P,$),D=this.state.tooltipTicks[P].coordinate,F=(this.state.offset.top+N)/2,I=M==="horizontal",q=I?{x:D,y:F}:{y:D,x:F},k=this.state.formattedGraphicalItems.find(function(H){var G=H.item;return G.type.name==="Scatter"});k&&(q=me(me({},q),k.props.points[P].tooltipPosition),L=k.props.points[P].tooltipPayload);var z={activeTooltipIndex:P,isTooltipActive:!0,activeLabel:$,activePayload:L,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 C,N;this.accessibilityManager.setDetails({offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0}})}return null}},{key:"componentDidUpdate",value:function(_){XM([Zr(_.children,Ti)],[Zr(this.props.children,Ti)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=Zr(this.props.children,Ti);if(_&&typeof _.props.shared=="boolean"){var A=_.props.shared?"axis":"item";return s.indexOf(A)>=0?A:a}return a}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var A=this.container,C=A.getBoundingClientRect(),N=xNe(C),M={chartX:Math.round(_.pageX-N.left),chartY:Math.round(_.pageY-N.top)},R=C.width/A.offsetWidth||1,P=this.inRange(M.chartX,M.chartY,R);if(!P)return null;var $=this.state,L=$.xAxisMap,D=$.yAxisMap,F=this.getTooltipEventType(),I=f9(this.state,this.props.data,this.props.layout,P);if(F!=="axis"&&L&&D){var q=Qs(L).scale,k=Qs(D).scale,z=q&&q.invert?q.invert(M.chartX):null,H=k&&k.invert?k.invert(M.chartY):null;return me(me({},M),{},{xValue:z,yValue:H},I)}return I?me(me({},M),I):null}},{key:"inRange",value:function(_,A){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=this.props.layout,M=_/C,R=A/C;if(N==="horizontal"||N==="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 L=this.state,D=L.angleAxisMap,F=L.radiusAxisMap;if(D&&F){var I=Qs(D);return F8({x:M,y:R},I)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,A=this.getTooltipEventType(),C=Zr(_,Ti),N={};C&&A==="axis"&&(C.props.trigger==="click"?N={onClick:this.handleClick}:N={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=vx(this.props,this.handleOuterEvent);return me(me({},M),N)}},{key:"addListener",value:function(){wO.on(SO,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){wO.removeListener(SO,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,A,C){for(var N=this.state.formattedGraphicalItems,M=0,R=N.length;M<R;M++){var P=N[M];if(P.item===_||P.props.key===_.key||A===Io(P.item.type)&&C===P.childIndex)return P}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,A=this.state.offset,C=A.left,N=A.top,M=A.height,R=A.width;return Z.createElement("defs",null,Z.createElement("clipPath",{id:_},Z.createElement("rect",{x:C,y:N,height:M,width:R})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(A,C){var N=l9(C,2),M=N[0],R=N[1];return me(me({},A),{},ze({},M,R.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(A,C){var N=l9(C,2),M=N[0],R=N[1];return me(me({},A),{},ze({},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,C=A.formattedGraphicalItems,N=A.activeItem;if(C&&C.length)for(var M=0,R=C.length;M<R;M++){var P=C[M],$=P.props,L=P.item,D=L.type.defaultProps!==void 0?me(me({},L.type.defaultProps),L.props):L.props,F=Io(L.type);if(F==="Bar"){var I=($.data||[]).find(function(H){return fDe(_,H)});if(I)return{graphicalItem:P,payload:I}}else if(F==="RadialBar"){var q=($.data||[]).find(function(H){return F8(_,H)});if(q)return{graphicalItem:P,payload:q}}else if(Ww(P,N)||Yw(P,N)||Wm(P,N)){var k=JDe({graphicalItem:P,activeTooltipItem:N,itemData:D.data}),z=D.activeIndex===void 0?k:D.activeIndex;return{graphicalItem:me(me({},P),{},{childIndex:z}),payload:Wm(P,N)?D.data[k]:P.props.data[k]}}}return null}},{key:"render",value:function(){var _=this;if(!iU(this))return null;var A=this.props,C=A.children,N=A.className,M=A.width,R=A.height,P=A.style,$=A.compact,L=A.title,D=A.desc,F=c9(A,u3e),I=ct(F,!1);if($)return Z.createElement(UH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Z.createElement(ZM,wf({},I,{width:M,height:R,title:L,desc:D}),this.renderClipPath(),oU(C,this.renderMap)));if(this.props.accessibilityLayer){var q,k;I.tabIndex=(q=this.props.tabIndex)!==null&&q!==void 0?q:0,I.role=(k=this.props.role)!==null&&k!==void 0?k:"application",I.onKeyDown=function(H){_.accessibilityManager.keyboardEvent(H)},I.onFocus=function(){_.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return Z.createElement(UH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},Z.createElement("div",wf({className:gt("recharts-wrapper",N),style:me({position:"relative",cursor:"default",width:M,height:R},P)},z,{ref:function(G){_.container=G}}),Z.createElement(ZM,wf({},I,{width:M,height:R,title:L,desc:D,style:T3e}),this.renderClipPath(),oU(C,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(j.Component);ze(x,"displayName",n),ze(x,"defaultProps",me({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),ze(x,"getDerivedStateFromProps",function(b,S){var E=b.dataKey,_=b.data,A=b.children,C=b.width,N=b.height,M=b.layout,R=b.stackOffset,P=b.margin,$=S.dataStartIndex,L=S.dataEndIndex;if(S.updateId===void 0){var D=d9(b);return me(me(me({},D),{},{updateId:0},v(me(me({props:b},D),{},{updateId:0}),S)),{},{prevDataKey:E,prevData:_,prevWidth:C,prevHeight:N,prevLayout:M,prevStackOffset:R,prevMargin:P,prevChildren:A})}if(E!==S.prevDataKey||_!==S.prevData||C!==S.prevWidth||N!==S.prevHeight||M!==S.prevLayout||R!==S.prevStackOffset||!Pf(P,S.prevMargin)){var F=d9(b),I={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},q=me(me({},f9(S,_,M)),{},{updateId:S.updateId+1}),k=me(me(me({},F),I),q);return me(me(me({},k),v(me({props:b},k),S)),{},{prevDataKey:E,prevData:_,prevWidth:C,prevHeight:N,prevLayout:M,prevStackOffset:R,prevMargin:P,prevChildren:A})}if(!XM(A,S.prevChildren)){var z,H,G,Q,U=Zr(A,Ed),V=U&&(z=(H=U.props)===null||H===void 0?void 0:H.startIndex)!==null&&z!==void 0?z:$,X=U&&(G=(Q=U.props)===null||Q===void 0?void 0:Q.endIndex)!==null&&G!==void 0?G:L,W=V!==$||X!==L,K=!dt(_),J=K&&!W?S.updateId:S.updateId+1;return me(me({updateId:J},v(me(me({props:b},S),{},{updateId:J,dataStartIndex:V,dataEndIndex:X}),S)),{},{prevChildren:A,dataStartIndex:V,dataEndIndex:X})}return null}),ze(x,"renderActiveDot",function(b,S,E){var _;return j.isValidElement(b)?_=j.cloneElement(b,S):tt(b)?_=b(S):_=Z.createElement(Wk,S),Z.createElement(on,{className:"recharts-active-dot",key:E},_)});var w=j.forwardRef(function(S,E){return Z.createElement(x,wf({},S,{ref:E}))});return w.displayName=x.displayName,w},L3e=one({chartName:"BarChart",GraphicalChild:jl,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:ou},{axisType:"yAxis",AxisComp:su}],formatAxisMap:_te}),sne=one({chartName:"AreaChart",GraphicalChild:da,axisComponents:[{axisType:"xAxis",AxisComp:ou},{axisType:"yAxis",AxisComp:su}],formatAxisMap:_te});const lne=j.createContext(null);function $3e(){const e=j.useContext(lne);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const d0=j.forwardRef(({config:e,children:t,className:n,style:r,...i},a)=>{const o=j.useMemo(()=>{const s={};for(const[c,f]of Object.entries(e))f.color&&(s[`--color-${c}`]=f.color);return s},[e]);return g.jsx(lne.Provider,{value:{config:e},children:g.jsx("div",{ref:a,className:ge("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:g.jsx(hNe,{width:"100%",height:"100%",children:t})})})});d0.displayName="ChartContainer";const B3e=j.forwardRef(({active:e,payload:t,label:n,hideLabel:r=!1,indicator:i="dot",className:a},o)=>{const{config:s}=$3e();return!e||!(t!=null&&t.length)?null:g.jsxs("div",{ref:o,className:ge("border bg-background px-3 py-2 text-xs shadow-md",a),children:[!r&&n&&g.jsx("div",{className:"mb-1.5 font-medium",children:n}),g.jsx("div",{className:"flex flex-col gap-1",children:t.map((c,f)=>{const h=c.dataKey||c.name,d=s[h],m=c.color||(d==null?void 0:d.color);return g.jsxs("div",{className:"flex items-center gap-2",children:[i==="dot"&&g.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:m}}),i==="line"&&g.jsx("div",{className:"h-0.5 w-3",style:{backgroundColor:m}}),g.jsxs("span",{className:"text-muted-foreground",children:[(d==null?void 0:d.label)||h,":"]}),g.jsx("span",{className:"font-medium",children:c.value})]},f.toString())})})]})});B3e.displayName="ChartTooltipContent";const q3e={completed:{label:"Completed",color:"hsl(var(--chart-completed))"},failed:{label:"Failed",color:"hsl(var(--chart-failed))"}},z3e={duration:{label:"Duration",color:"hsl(var(--chart-duration))"},waitTime:{label:"Wait Time",color:"hsl(var(--chart-wait))"}};function cne(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function p9(e){return new Date(e).toLocaleTimeString([],{hour:"numeric"})}function une(e){return`${(e*100).toFixed(1)}%`}function F3e({active:e,payload:t,label:n}){return!e||!t||!n?null:g.jsxs("div",{className:" border bg-popover px-3 py-2 text-popover-foreground shadow-md",children:[g.jsx("p",{className:"text-xs font-medium mb-1.5",children:cne(n)}),g.jsx("div",{className:"space-y-1",children:t.map(r=>g.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[g.jsx("span",{className:"h-2 w-2 shrink-0",style:{backgroundColor:r.color}}),g.jsxs("span",{className:"text-muted-foreground",children:[r.name,":"]}),g.jsx("span",{className:"font-medium tabular-nums",children:r.value})]},r.name))})]})}function V3e({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 g.jsxs("div",{className:" border bg-popover px-3 py-2 text-popover-foreground shadow-md",children:[g.jsx("p",{className:"text-xs font-medium mb-1.5",children:cne(n)}),g.jsx("div",{className:"space-y-1",children:t.map(i=>{const a=i.dataKey?r(i.dataKey,i.color):i.color;return g.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[g.jsx("span",{className:"h-2 w-2 shrink-0",style:{backgroundColor:a}}),g.jsxs("span",{className:"text-muted-foreground",children:[i.name,":"]}),g.jsx("span",{className:"font-medium tabular-nums",children:Lr(i.value)})]},i.name)})})]})}function U3e({jobs:e}){return e.length===0?g.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No completed jobs in the last 24 hours"}):g.jsx("div",{className:"divide-y divide-border",children:e.map((t,n)=>g.jsxs(pg,{to:"/queues/$queueName/jobs/$jobId",params:{queueName:t.queueName,jobId:t.jobId},className:"flex items-center justify-between px-4 py-2.5",children:[g.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[g.jsx("span",{className:"text-xs text-muted-foreground w-5 tabular-nums shrink-0",children:n+1}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"text-sm font-medium truncate",children:t.name}),g.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:t.queueName})]})]}),g.jsx(Un,{variant:"outline",className:"font-mono text-xs shrink-0",children:Lr(t.duration)})]},`${t.queueName}-${t.jobId}`))})}function H3e({jobs:e}){return e.length===0?g.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No failed jobs in the last 24 hours"}):g.jsx("div",{className:"divide-y divide-border",children:e.map((t,n)=>g.jsxs(pg,{to:t.jobId?"/queues/$queueName/jobs/$jobId":"/queues/$queueName",params:{queueName:t.queueName,jobId:t.jobId},search:t.jobId?void 0:{status:"failed"},className:"flex items-center justify-between px-4 py-2.5 hover:bg-muted/30",children:[g.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[g.jsx("span",{className:"text-xs text-muted-foreground w-5 tabular-nums shrink-0",children:n+1}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"text-sm font-medium truncate",children:t.name}),g.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:t.queueName})]})]}),g.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[g.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[t.failCount,"/",t.totalCount]}),g.jsx(Un,{variant:"outline",className:ge("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:une(t.errorRate)})]})]},`${t.queueName}-${t.name}`))})}function G3e(){return g.jsxs("div",{className:"space-y-6",children:[g.jsx("div",{className:"grid grid-cols-4 gap-4",children:["throughput","error-rate","duration","wait-time"].map(e=>g.jsxs("div",{className:" border p-4 space-y-3",children:[g.jsx(Jt,{className:"h-4 w-20"}),g.jsx(Jt,{className:"h-8 w-24"}),g.jsx(Jt,{className:"h-6 w-20"})]},e))}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:" border p-4 space-y-3",children:[g.jsx(Jt,{className:"h-4 w-32"}),g.jsx(Jt,{className:"h-48 w-full"})]}),g.jsxs("div",{className:" border p-4 space-y-3",children:[g.jsx(Jt,{className:"h-4 w-32"}),g.jsx(Jt,{className:"h-48 w-full"})]})]})]})}function K3e(){const{data:e,isLoading:t,error:n}=DW();if(t)return g.jsx(G3e,{});if(n||!e)return g.jsx("div",{className:" border border-destructive/50 bg-destructive/10 p-4",children:g.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:s}=r,c=Math.floor(s.length/2),f=s.slice(0,c),h=s.slice(c),d=f.reduce((C,N)=>C+N.completed,0),m=h.reduce((C,N)=>C+N.completed,0),v=f.reduce((C,N)=>C+N.failed,0),x=h.reduce((C,N)=>C+N.failed,0),w=s.map(C=>({hour:C.hour,completed:C.completed,failed:C.failed})),b=s.map(C=>({hour:C.hour,duration:C.avgDuration,waitTime:C.avgWaitTime})),S=s.map(C=>C.completed+C.failed),E=s.map(C=>C.completed+C.failed>0?C.failed/(C.completed+C.failed):0),_=s.map(C=>C.avgDuration),A=s.map(C=>C.avgWaitTime);return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[g.jsx(fl,{title:"Throughput",value:o.throughputPerHour.toLocaleString(),subtitle:"jobs/hour avg",sparklineData:S,sparklineColor:"default",trend:{current:m+x,previous:d+v,higherIsBetter:!0},icon:g.jsx(FK,{className:"h-4 w-4"})}),g.jsx(fl,{title:"Error Rate",value:une(o.errorRate),subtitle:`${o.totalFailed} failed`,sparklineData:E,sparklineColor:o.errorRate>.1?"danger":"success",trend:{current:x,previous:v,higherIsBetter:!1},icon:g.jsx(Vb,{className:"h-4 w-4"})}),g.jsx(fl,{title:"Avg Duration",value:Lr(o.avgDuration),subtitle:"processing time",sparklineData:_,sparklineColor:"default",icon:g.jsx(p2,{className:"h-4 w-4"})}),g.jsx(fl,{title:"Avg Wait Time",value:Lr(o.avgWaitTime),subtitle:"queue delay",sparklineData:A,sparklineColor:o.avgWaitTime>6e4?"warning":"default",icon:g.jsx(ahe,{className:"h-4 w-4"})})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"border border-dashed bg-card p-4",children:[g.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[g.jsx(c2,{className:"h-4 w-4 text-muted-foreground"}),"Job Throughput"]}),g.jsx(d0,{config:q3e,className:"h-52 w-full",children:g.jsxs(sne,{data:w,children:[g.jsx(s0,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",strokeOpacity:.5}),g.jsx(ou,{dataKey:"hour",tickFormatter:p9,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),g.jsx(su,{tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:32}),g.jsx(Ti,{content:g.jsx(F3e,{})}),g.jsx($o,{verticalAlign:"top",height:32,iconType:"square",iconSize:8,wrapperStyle:{fontSize:12},formatter:C=>g.jsx("span",{style:{color:"hsl(var(--foreground))"},children:C})}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"completedGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"0%",stopColor:"var(--color-completed)",stopOpacity:.5}),g.jsx("stop",{offset:"100%",stopColor:"var(--color-completed)",stopOpacity:.05})]}),g.jsxs("pattern",{id:"failedPattern",x:"0",y:"0",width:"6",height:"6",patternUnits:"userSpaceOnUse",children:[g.jsx("rect",{width:"6",height:"6",fill:"var(--color-failed)",fillOpacity:.15}),g.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"})]})]}),g.jsx(da,{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"}}),g.jsx(da,{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"}})]})})]}),g.jsxs("div",{className:"border border-dashed bg-card p-4",children:[g.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[g.jsx(Pi,{className:"h-4 w-4 text-muted-foreground"}),"Processing Time"]}),g.jsx(d0,{config:z3e,className:"h-52 w-full",children:g.jsxs(L3e,{data:b,children:[g.jsx(s0,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",strokeOpacity:.5}),g.jsx(ou,{dataKey:"hour",tickFormatter:p9,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),g.jsx(su,{tickFormatter:C=>Lr(C),tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:48}),g.jsx(Ti,{content:g.jsx(V3e,{}),cursor:!1}),g.jsx($o,{verticalAlign:"top",height:32,iconType:"square",iconSize:8,wrapperStyle:{fontSize:12},formatter:C=>g.jsx("span",{style:{color:"hsl(var(--foreground))"},children:C})}),g.jsx(jl,{dataKey:"duration",name:"Duration",fill:"hsl(210, 90%, 50%)",radius:[0,0,0,0],style:{outline:"none"},isAnimationActive:!1}),g.jsx(jl,{dataKey:"waitTime",name:"Wait Time",fill:"hsl(45, 95%, 50%)",radius:[0,0,0,0],style:{outline:"none"},isAnimationActive:!1})]})})]})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"border border-dashed bg-card",children:[g.jsx("div",{className:"border-b border-dashed px-4 py-3",children:g.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[g.jsx(Pi,{className:"h-4 w-4 text-muted-foreground"}),"Slowest Jobs"]})}),g.jsx(U3e,{jobs:i})]}),g.jsxs("div",{className:"border border-dashed bg-card",children:[g.jsx("div",{className:"border-b border-dashed px-4 py-3",children:g.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[g.jsx(Vb,{className:"h-4 w-4 text-muted-foreground"}),"Most Failing Job Types"]})}),g.jsx(H3e,{jobs:a})]})]})]})}const W3e={completed:{label:"Completed",color:"hsl(var(--chart-completed))"},failed:{label:"Failed",color:"hsl(var(--chart-failed))"}};function Y3e(e){return new Date(e).toLocaleTimeString([],{hour:"numeric"})}function X3e({active:e,payload:t,label:n}){return!e||!t||!n?null:g.jsxs("div",{className:"border bg-popover px-3 py-2 text-popover-foreground shadow-md",children:[g.jsx("p",{className:"text-xs font-medium mb-1.5",children:new Date(n).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}),g.jsx("div",{className:"space-y-1",children:t.map(r=>g.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[g.jsx("span",{className:"h-2 w-2 shrink-0",style:{backgroundColor:r.color}}),g.jsxs("span",{className:"text-muted-foreground",children:[r.name,":"]}),g.jsx("span",{className:"font-medium tabular-nums",children:r.value})]},r.name))})]})}function Q3e({buckets:e,className:t,heightClass:n="h-40"}){const r=j.useId().replace(/:/g,""),i=e.map(a=>({hour:a.hour,completed:a.completed,failed:a.failed}));return g.jsxs("div",{className:ge("border border-dashed bg-card p-4",t),children:[g.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[g.jsx(c2,{className:"h-4 w-4 text-muted-foreground"}),"Fleet throughput (24h)"]}),g.jsx(d0,{config:W3e,className:ge("w-full",n),children:g.jsxs(sne,{data:i,children:[g.jsx(s0,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",strokeOpacity:.5}),g.jsx(ou,{dataKey:"hour",tickFormatter:Y3e,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),g.jsx(su,{tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:32}),g.jsx(Ti,{content:g.jsx(X3e,{})}),g.jsx($o,{verticalAlign:"top",height:32,iconType:"square",iconSize:8,wrapperStyle:{fontSize:12},formatter:a=>g.jsx("span",{style:{color:"hsl(var(--foreground))"},children:a})}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:`${r}-completedGradient`,x1:"0",y1:"0",x2:"0",y2:"1",children:[g.jsx("stop",{offset:"0%",stopColor:"var(--color-completed)",stopOpacity:.5}),g.jsx("stop",{offset:"100%",stopColor:"var(--color-completed)",stopOpacity:.05})]}),g.jsxs("pattern",{id:`${r}-failedPattern`,x:"0",y:"0",width:"6",height:"6",patternUnits:"userSpaceOnUse",children:[g.jsx("rect",{width:"6",height:"6",fill:"var(--color-failed)",fillOpacity:.15}),g.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"})]})]}),g.jsx(da,{type:"monotone",dataKey:"completed",name:"Completed",stackId:"1",stroke:"var(--color-completed)",fill:`url(#${r}-completedGradient)`,strokeWidth:2,dot:!1}),g.jsx(da,{type:"monotone",dataKey:"failed",name:"Failed",stackId:"1",stroke:"var(--color-failed)",fill:`url(#${r}-failedPattern)`,strokeWidth:2,dot:!1})]})})]})}var n1="Collapsible",[Z3e]=$i(n1),[J3e,iD]=Z3e(n1),fne=j.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,f]=Vo({prop:r,defaultProp:i??!1,onChange:o,caller:n1});return g.jsx(J3e,{scope:n,disabled:a,contentId:Hn(),open:c,onOpenToggle:j.useCallback(()=>f(h=>!h),[f]),children:g.jsx(Ue.div,{"data-state":oD(c),"data-disabled":a?"":void 0,...s,ref:t})})});fne.displayName=n1;var dne="CollapsibleTrigger",hne=j.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=iD(dne,n);return g.jsx(Ue.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":oD(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:je(e.onClick,i.onOpenToggle)})});hne.displayName=dne;var aD="CollapsibleContent",pne=j.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=iD(aD,e.__scopeCollapsible);return g.jsx(di,{present:n||i.open,children:({present:a})=>g.jsx(e4e,{...r,ref:t,present:a})})});pne.displayName=aD;var e4e=j.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=iD(aD,n),[s,c]=j.useState(r),f=j.useRef(null),h=yt(t,f),d=j.useRef(0),m=d.current,v=j.useRef(0),x=v.current,w=o.open||s,b=j.useRef(w),S=j.useRef(void 0);return j.useEffect(()=>{const E=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(E)},[]),tr(()=>{const E=f.current;if(E){S.current=S.current||{transitionDuration:E.style.transitionDuration,animationName:E.style.animationName},E.style.transitionDuration="0s",E.style.animationName="none";const _=E.getBoundingClientRect();d.current=_.height,v.current=_.width,b.current||(E.style.transitionDuration=S.current.transitionDuration,E.style.animationName=S.current.animationName),c(r)}},[o.open,r]),g.jsx(Ue.div,{"data-state":oD(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!w,...a,ref:h,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:w&&i})});function oD(e){return e?"open":"closed"}var t4e=fne;const n4e=t4e,r4e=hne,i4e=pne;function a4e(e,t,n){const r=[];for(const i of e){const a=i.counts.waiting+i.counts.prioritized+i.counts["waiting-children"];i.workerCount===0&&a>0&&i.workerCount!==null&&i.workerCount!==void 0&&r.push({id:`workers-${i.name}`,variant:"destructive",title:`${i.name}: no workers connected`,description:`${a.toLocaleString()} jobs waiting with zero workers processing this queue.`,actionLabel:"Open queue",onAction:()=>t(i.name)}),i.isPaused&&r.push({id:`paused-${i.name}`,variant:"warning",title:`${i.name} is paused`,description:"New jobs will not be processed until the queue is resumed.",actionLabel:"Open queue",onAction:()=>t(i.name)}),i.counts.failed>0&&r.push({id:`failed-${i.name}`,variant:"warning",title:`${i.counts.failed.toLocaleString()} failed jobs in ${i.name}`,description:"Review failures and retry or remove stale jobs.",actionLabel:"View failed",onAction:()=>n(i.name)})}return r}function m9({alert:e}){const t=e.variant==="destructive"?Va:e.variant==="warning"?Vb:Qo;return g.jsxs(X0,{variant:e.variant,className:"px-3 py-2.5 [&>svg]:left-3 [&>svg]:top-3 [&>svg~*]:pl-6",children:[g.jsx(t,{className:"size-3.5"}),g.jsxs("div",{className:"flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[g.jsxs("div",{className:"min-w-0 space-y-0.5",children:[g.jsx(Q0,{className:"mb-0 text-sm font-medium leading-snug",children:e.title}),g.jsx(Z0,{className:"text-[11px] leading-relaxed",children:e.description})]}),e.actionLabel&&e.onAction&&g.jsx(it,{type:"button",variant:"outline",size:"sm",className:"h-7 shrink-0 self-start px-2.5 text-xs sm:self-center",onClick:e.onAction,children:e.actionLabel})]})]})}function o4e({queues:e,onQueueSelect:t,onViewFailed:n}){const r=a4e(e,t,n);if(r.length===0)return g.jsxs(X0,{variant:"default",className:"px-3 py-2.5 [&>svg]:left-3 [&>svg]:top-3 [&>svg~*]:pl-6",children:[g.jsx(Qo,{className:"size-3.5"}),g.jsxs("div",{className:"min-w-0 space-y-0.5",children:[g.jsx(Q0,{className:"mb-0 text-sm font-medium leading-snug",children:"No issues detected"}),g.jsx(Z0,{className:"text-[11px] leading-relaxed",children:"All queues look healthy. Metrics refresh every few seconds while the dashboard is open."})]})]});const i=r.slice(0,3),a=r.slice(3);return g.jsxs("div",{className:"space-y-3",children:[g.jsx("h3",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Needs attention"}),i.map(o=>g.jsx(m9,{alert:o},o.id)),a.length>0&&g.jsxs(n4e,{children:[g.jsx(r4e,{asChild:!0,children:g.jsxs(it,{type:"button",variant:"ghost",size:"sm",className:"h-8 gap-1 px-2 text-xs text-muted-foreground",children:[g.jsx(Sg,{className:"h-3.5 w-3.5"}),"Show ",a.length," more"]})}),g.jsx(i4e,{className:"space-y-3 pt-3",children:a.map(o=>g.jsx(m9,{alert:o},o.id))})]})]})}function s4e({data:e}){if(e.length===0)return null;const t=Math.max(...e,1),n=120,r=28,i=e.map((a,o)=>{const s=e.length>1?o/(e.length-1)*n:n/2,c=r-a/t*r;return`${s},${c}`});return g.jsx("svg",{viewBox:`0 0 ${n} ${r}`,className:"h-7 w-full text-chart-2",preserveAspectRatio:"none",children:g.jsx("polyline",{fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",points:i.join(" ")})})}function l4e({queue:e,sparklineData:t,onSelect:n,onFailedClick:r}){const i=e.workerCount===null||e.workerCount===void 0?null:e.workerCount===0?"0 workers":`${e.workerCount} worker${e.workerCount===1?"":"s"}`;return g.jsxs("button",{type:"button",onClick:n,className:"text-left border bg-card p-4 hover:bg-accent/50 transition-colors min-w-0 flex flex-col gap-3",children:[g.jsxs("div",{className:"flex items-start justify-between gap-2 min-w-0",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("span",{className:"font-mono font-medium truncate block",title:e.name,children:e.name}),i&&g.jsx("span",{className:ge("text-[10px] mt-1 block",e.workerCount===0?"text-amber-600 dark:text-amber-400":"text-muted-foreground"),children:i})]}),g.jsx("div",{className:"flex shrink-0 gap-1",children:e.isPaused&&g.jsx(Un,{variant:"secondary",className:"bg-amber-500/10 text-amber-600 text-[10px]",children:"Paused"})})]}),(t==null?void 0:t.some(a=>a>0))&&g.jsx(s4e,{data:t}),g.jsxs("div",{className:"grid grid-cols-4 gap-2 text-sm",children:[g.jsx(Zy,{label:"Waiting",value:e.counts.waiting}),g.jsx(Zy,{label:"Active",value:e.counts.active,className:"text-warning"}),g.jsx(Zy,{label:"Failed",value:e.counts.failed,className:e.counts.failed>0?"text-destructive":void 0,onClick:e.counts.failed>0?r:void 0}),g.jsx(Zy,{label:"Delayed",value:e.counts.delayed})]})]})}function Zy({label:e,value:t,className:n,onClick:r}){const i=g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"text-muted-foreground text-[10px] uppercase tracking-wide",children:e}),g.jsx("div",{className:ge("font-medium tabular-nums",n),children:t.toLocaleString()})]});return r?g.jsx("div",{role:"presentation",onClick:a=>{a.stopPropagation(),r(a)},className:"hover:opacity-80",children:i}):g.jsx("div",{children:i})}function c4e(e){return e.map(t=>t.completed+t.failed)}function u4e(e){return`${(e*100).toFixed(1)}%`}function f4e(){return g.jsxs("div",{className:"space-y-6",children:[g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[...Array(4)].map((e,t)=>g.jsxs("div",{className:"border border-dashed bg-card p-4",children:[g.jsx(Jt,{className:"h-4 w-20 mb-3"}),g.jsx(Jt,{className:"h-8 w-24 mb-2"}),g.jsx(Jt,{className:"h-3 w-16"})]},t.toString()))}),g.jsxs("div",{className:"border border-dashed bg-card p-4",children:[g.jsx(Jt,{className:"h-4 w-32 mb-4"}),g.jsx(Jt,{className:"h-40 w-full"})]}),g.jsx(Jt,{className:"h-24 w-full"}),g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((e,t)=>g.jsxs("div",{className:"border bg-card p-4",children:[g.jsx(Jt,{className:"h-5 w-28 mb-3"}),g.jsx(Jt,{className:"h-7 w-full mb-3"}),g.jsx("div",{className:"grid grid-cols-4 gap-2",children:[...Array(4)].map((n,r)=>g.jsx(Jt,{className:"h-10"},r.toString()))})]},t.toString()))})]})}function d4e({onQueueSelect:e,onViewFailed:t}){const{data:n,isLoading:r,error:i}=Jpe(),{data:a,isLoading:o}=DW();if(r&&!n)return g.jsx(f4e,{});if(i)return g.jsx(pr,{icon:Va,title:"Failed to load overview",description:i.message});if(!n)return null;if(n.queues.length===0)return g.jsx(pr,{icon:c2,title:"No queues discovered",description:"Connect Workbench to a Redis instance with BullMQ queues, or pass Queue instances when mounting the dashboard.",action:g.jsx(it,{variant:"outline",size:"sm",asChild:!0,children:g.jsx("a",{href:"https://getworkbench.dev",target:"_blank",rel:"noopener noreferrer",children:"Read the docs"})})});const s=new Map((a==null?void 0:a.queues.map(A=>[A.queueName,A]))??[]),c=a==null?void 0:a.aggregate,f=(c==null?void 0:c.buckets)??[],h=c==null?void 0:c.summary,d=Math.floor(f.length/2),m=f.slice(0,d),v=f.slice(d),x=m.reduce((A,C)=>A+C.completed,0),w=v.reduce((A,C)=>A+C.completed,0),b=m.reduce((A,C)=>A+C.failed,0),S=v.reduce((A,C)=>A+C.failed,0),E=f.map(A=>A.completed+A.failed),_=f.map(A=>A.completed+A.failed>0?A.failed/(A.completed+A.failed):0);return g.jsxs("div",{className:"space-y-6",children:[g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:o||!h?[...Array(4)].map((A,C)=>g.jsxs("div",{className:"border border-dashed bg-card p-4",children:[g.jsx(Jt,{className:"h-4 w-20 mb-3"}),g.jsx(Jt,{className:"h-8 w-24"})]},C.toString())):g.jsxs(g.Fragment,{children:[g.jsx(fl,{title:"Throughput",value:h.throughputPerHour.toLocaleString(),subtitle:"jobs/hour avg",sparklineData:E,icon:g.jsx(FK,{className:"h-4 w-4"}),trend:{current:w+S,previous:x+b,higherIsBetter:!0}}),g.jsx(fl,{title:"Error rate",value:u4e(h.errorRate),subtitle:`${h.totalFailed} failed (24h)`,sparklineData:_,sparklineColor:h.errorRate>.1?"danger":"success",icon:g.jsx(Vb,{className:"h-4 w-4"}),trend:{current:S,previous:b,higherIsBetter:!1}}),g.jsx(fl,{title:"Active now",value:n.activeJobs.toLocaleString(),subtitle:"processing",icon:g.jsx(p2,{className:"h-4 w-4"})}),g.jsx(fl,{title:"Failed in queues",value:n.failedJobs.toLocaleString(),subtitle:"need review",sparklineColor:"danger",icon:g.jsx(Va,{className:"h-4 w-4"})})]})}),o||f.length===0?g.jsxs("div",{className:"border border-dashed bg-card p-4",children:[g.jsx(Jt,{className:"h-4 w-32 mb-4"}),g.jsx(Jt,{className:"h-40 w-full"})]}):g.jsx(Q3e,{buckets:f}),g.jsx(o4e,{queues:n.queues,onQueueSelect:e,onViewFailed:t}),g.jsxs("div",{children:[g.jsxs("div",{className:"mb-4 flex items-center justify-between gap-4",children:[g.jsx("h3",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Queues"}),g.jsx(it,{variant:"link",size:"sm",className:"h-auto p-0 text-xs",asChild:!0,children:g.jsx(pg,{to:"/metrics",children:"View full metrics →"})})]}),g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.queues.map(A=>{const C=s.get(A.name),N=C?c4e(C.buckets):void 0;return g.jsx(l4e,{queue:A,sparklineData:N,onSelect:()=>e(A.name),onFailedClick:()=>t(A.name)},A.name)})})]}),n.activeJobs===0&&n.failedJobs===0&&n.totalJobs===0&&g.jsxs("div",{className:"flex items-center gap-2 border border-dashed bg-card px-4 py-3 text-sm text-muted-foreground",children:[g.jsx(Qo,{className:"h-4 w-4 text-chart-success shrink-0"}),"All queues are empty — enqueue a test job from the Test page to see activity here."]})]})}const sD=j.createContext({});function lD(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const h4e=typeof window<"u",mne=h4e?j.useLayoutEffect:j.useEffect,r1=j.createContext(null);function cD(e,t){e.indexOf(t)===-1&&e.push(t)}function h0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ga=(e,t,n)=>n>t?t:n<e?e:n;let uD=()=>{};const Nl={},gne=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),vne=e=>typeof e=="object"&&e!==null,yne=e=>/^0[^.\s]+$/u.test(e);function bne(e){let t;return()=>(t===void 0&&(t=e()),t)}const Di=e=>e,Kg=(...e)=>e.reduce((t,n)=>r=>n(t(r))),tg=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};class fD{constructor(){this.subscriptions=[]}add(t){return cD(this.subscriptions,t),()=>h0(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 oi=e=>e*1e3,Ri=e=>e/1e3,xne=(e,t)=>t?e*(1e3/t):0,wne=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,p4e=1e-7,m4e=12;function g4e(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=wne(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>p4e&&++s<m4e);return o}function Wg(e,t,n,r){if(e===t&&n===r)return Di;const i=a=>g4e(a,0,1,e,n);return a=>a===0||a===1?a:wne(i(a),t,r)}const Sne=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,_ne=e=>t=>1-e(1-t),Ene=Wg(.33,1.53,.69,.99),dD=_ne(Ene),Ane=Sne(dD),Cne=e=>e>=1?1:(e*=2)<1?.5*dD(e):.5*(2-Math.pow(2,-10*(e-1))),hD=e=>1-Math.sin(Math.acos(e)),Tne=_ne(hD),jne=Sne(hD),v4e=Wg(.42,0,1,1),y4e=Wg(0,0,.58,1),Nne=Wg(.42,0,.58,1),b4e=e=>Array.isArray(e)&&typeof e[0]!="number",One=e=>Array.isArray(e)&&typeof e[0]=="number",x4e={linear:Di,easeIn:v4e,easeInOut:Nne,easeOut:y4e,circIn:hD,circInOut:jne,circOut:Tne,backIn:dD,backInOut:Ane,backOut:Ene,anticipate:Cne},w4e=e=>typeof e=="string",g9=e=>{if(One(e)){uD(e.length===4);const[t,n,r,i]=e;return Wg(t,n,r,i)}else if(w4e(e))return x4e[e];return e},Jy=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function S4e(e,t){let n=new Set,r=new Set,i=!1,a=!1;const o=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function c(h){o.has(h)&&(f.schedule(h),e()),h(s)}const f={schedule:(h,d=!1,m=!1)=>{const x=m&&i?n:r;return d&&o.add(h),x.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(s=h,i){a=!0;return}i=!0;const d=n;n=r,r=d,n.forEach(c),n.clear(),i=!1,a&&(a=!1,f.process(h))}};return f}const _4e=40;function Mne(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Jy.reduce((_,A)=>(_[A]=S4e(a),_),{}),{setup:s,read:c,resolveKeyframes:f,preUpdate:h,update:d,preRender:m,render:v,postRender:x}=o,w=()=>{const _=Nl.useManualTiming,A=_?i.timestamp:performance.now();n=!1,_||(i.delta=r?1e3/60:Math.max(Math.min(A-i.timestamp,_4e),1)),i.timestamp=A,i.isProcessing=!0,s.process(i),c.process(i),f.process(i),h.process(i),d.process(i),m.process(i),v.process(i),x.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(w))},b=()=>{n=!0,r=!0,i.isProcessing||e(w)};return{schedule:Jy.reduce((_,A)=>{const C=o[A];return _[A]=(N,M=!1,R=!1)=>(n||b(),C.schedule(N,M,R)),_},{}),cancel:_=>{for(let A=0;A<Jy.length;A++)o[Jy[A]].cancel(_)},state:i,steps:o}}const{schedule:zt,cancel:Ol,state:Zn,steps:EO}=Mne(typeof requestAnimationFrame<"u"?requestAnimationFrame:Di,!0);let yb;function E4e(){yb=void 0}const br={now:()=>(yb===void 0&&br.set(Zn.isProcessing||Nl.useManualTiming?Zn.timestamp:performance.now()),yb),set:e=>{yb=e,queueMicrotask(E4e)}},Rne=e=>t=>typeof t=="string"&&t.startsWith(e),Pne=Rne("--"),A4e=Rne("var(--"),pD=e=>A4e(e)?C4e.test(e.split("/*")[0].trim()):!1,C4e=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function v9(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ch={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ng={...ch,transform:e=>Ga(0,1,e)},eb={...ch,default:1},Hp=e=>Math.round(e*1e5)/1e5,mD=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function T4e(e){return e==null}const j4e=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,gD=(e,t)=>n=>!!(typeof n=="string"&&j4e.test(n)&&n.startsWith(e)||t&&!T4e(n)&&Object.prototype.hasOwnProperty.call(n,t)),kne=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(mD);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},N4e=e=>Ga(0,255,e),AO={...ch,transform:e=>Math.round(N4e(e))},wc={test:gD("rgb","red"),parse:kne("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+AO.transform(e)+", "+AO.transform(t)+", "+AO.transform(n)+", "+Hp(ng.transform(r))+")"};function O4e(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 lP={test:gD("#"),parse:O4e,transform:wc.transform},Yg=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Eo=Yg("deg"),qa=Yg("%"),Me=Yg("px"),M4e=Yg("vh"),R4e=Yg("vw"),y9={...qa,parse:e=>qa.parse(e)/100,transform:e=>qa.transform(e*100)},Sf={test:gD("hsl","hue"),parse:kne("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+qa.transform(Hp(t))+", "+qa.transform(Hp(n))+", "+Hp(ng.transform(r))+")"},En={test:e=>wc.test(e)||lP.test(e)||Sf.test(e),parse:e=>wc.test(e)?wc.parse(e):Sf.test(e)?Sf.parse(e):lP.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?wc.transform(e):Sf.transform(e),getAnimatableNone:e=>{const t=En.parse(e);return t.alpha=0,En.transform(t)}},P4e=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function k4e(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(mD))==null?void 0:t.length)||0)+(((n=e.match(P4e))==null?void 0:n.length)||0)>0}const Dne="number",Ine="color",D4e="var",I4e="var(",b9="${}",L4e=/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 Dd(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(L4e,c=>(En.test(c)?(r.color.push(a),i.push(Ine),n.push(En.parse(c))):c.startsWith(I4e)?(r.var.push(a),i.push(D4e),n.push(c)):(r.number.push(a),i.push(Dne),n.push(parseFloat(c))),++a,b9)).split(b9);return{values:n,split:s,indexes:r,types:i}}function $4e(e){return Dd(e).values}function Lne({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===Dne?i+=Hp(r[a]):o===Ine?i+=En.transform(r[a]):i+=r[a]}return i}}function B4e(e){return Lne(Dd(e))}const q4e=e=>typeof e=="number"?0:En.test(e)?En.getAnimatableNone(e):e,z4e=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:q4e(e);function F4e(e){const t=Dd(e);return Lne(t)(t.values.map((r,i)=>z4e(r,t.split[i])))}const la={test:k4e,parse:$4e,createTransformer:B4e,getAnimatableNone:F4e};function CO(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 V4e({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 s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;i=CO(c,s,e+1/3),a=CO(c,s,e),o=CO(c,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function p0(e,t){return n=>n>0?t:e}const Bt=(e,t,n)=>e+(t-e)*n,TO=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},U4e=[lP,wc,Sf],H4e=e=>U4e.find(t=>t.test(e));function x9(e){const t=H4e(e);if(!t)return!1;let n=t.parse(e);return t===Sf&&(n=V4e(n)),n}const w9=(e,t)=>{const n=x9(e),r=x9(t);if(!n||!r)return p0(e,t);const i={...n};return a=>(i.red=TO(n.red,r.red,a),i.green=TO(n.green,r.green,a),i.blue=TO(n.blue,r.blue,a),i.alpha=Bt(n.alpha,r.alpha,a),wc.transform(i))},cP=new Set(["none","hidden"]);function G4e(e,t){return cP.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function K4e(e,t){return n=>Bt(e,t,n)}function vD(e){return typeof e=="number"?K4e:typeof e=="string"?pD(e)?p0:En.test(e)?w9:X4e:Array.isArray(e)?$ne:typeof e=="object"?En.test(e)?w9:W4e:p0}function $ne(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>vD(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function W4e(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=vD(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function Y4e(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]],s=e.values[o]??0;n[i]=s,r[a]++}return n}const X4e=(e,t)=>{const n=la.createTransformer(t),r=Dd(e),i=Dd(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?cP.has(e)&&!i.values.length||cP.has(t)&&!r.values.length?G4e(e,t):Kg($ne(Y4e(r,i),i.values),n):p0(e,t)};function Bne(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Bt(e,t,n):vD(e)(e,t)}const Q4e=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>zt.update(t,n),stop:()=>Ol(t),now:()=>Zn.isProcessing?Zn.timestamp:br.now()}},qne=(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)})`},m0=2e4;function yD(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<m0;)t+=n,r=e.next(t);return t>=m0?1/0:t}function Z4e(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(yD(r),m0);return{type:"keyframes",ease:a=>r.next(i*a).value/t,duration:Ri(i)}}const un={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 uP(e,t){return e*Math.sqrt(1-t*t)}const J4e=12;function eBe(e,t,n){let r=n;for(let i=1;i<J4e;i++)r=r-e(r)/t(r);return r}const jO=.001;function tBe({duration:e=un.duration,bounce:t=un.bounce,velocity:n=un.velocity,mass:r=un.mass}){let i,a,o=1-t;o=Ga(un.minDamping,un.maxDamping,o),e=Ga(un.minDuration,un.maxDuration,Ri(e)),o<1?(i=f=>{const h=f*o,d=h*e,m=h-n,v=uP(f,o),x=Math.exp(-d);return jO-m/v*x},a=f=>{const d=f*o*e,m=d*n+n,v=Math.pow(o,2)*Math.pow(f,2)*e,x=Math.exp(-d),w=uP(Math.pow(f,2),o);return(-i(f)+jO>0?-1:1)*((m-v)*x)/w}):(i=f=>{const h=Math.exp(-f*e),d=(f-n)*e+1;return-jO+h*d},a=f=>{const h=Math.exp(-f*e),d=(n-f)*(e*e);return h*d});const s=5/e,c=eBe(i,a,s);if(e=oi(e),isNaN(c))return{stiffness:un.stiffness,damping:un.damping,duration:e};{const f=Math.pow(c,2)*r;return{stiffness:f,damping:o*2*Math.sqrt(r*f),duration:e}}}const nBe=["duration","bounce"],rBe=["stiffness","damping","mass"];function S9(e,t){return t.some(n=>e[n]!==void 0)}function iBe(e){let t={velocity:un.velocity,stiffness:un.stiffness,damping:un.damping,mass:un.mass,isResolvedFromDuration:!1,...e};if(!S9(e,rBe)&&S9(e,nBe))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Ga(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:un.mass,stiffness:i,damping:a}}else{const n=tBe({...e,velocity:0});t={...t,...n,mass:un.mass},t.isResolvedFromDuration=!0}return t}function g0(e=un.visualDuration,t=un.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],s={done:!1,value:a},{stiffness:c,damping:f,mass:h,duration:d,velocity:m,isResolvedFromDuration:v}=iBe({...n,velocity:-Ri(n.velocity||0)}),x=m||0,w=f/(2*Math.sqrt(c*h)),b=o-a,S=Ri(Math.sqrt(c/h)),E=Math.abs(b)<5;r||(r=E?un.restSpeed.granular:un.restSpeed.default),i||(i=E?un.restDelta.granular:un.restDelta.default);let _,A,C,N,M,R;if(w<1)C=uP(S,w),N=(x+w*S*b)/C,_=$=>{const L=Math.exp(-w*S*$);return o-L*(N*Math.sin(C*$)+b*Math.cos(C*$))},M=w*S*N+b*C,R=w*S*b-N*C,A=$=>Math.exp(-w*S*$)*(M*Math.sin(C*$)+R*Math.cos(C*$));else if(w===1){_=L=>o-Math.exp(-S*L)*(b+(x+S*b)*L);const $=x+S*b;A=L=>Math.exp(-S*L)*(S*$*L-x)}else{const $=S*Math.sqrt(w*w-1);_=I=>{const q=Math.exp(-w*S*I),k=Math.min($*I,300);return o-q*((x+w*S*b)*Math.sinh(k)+$*b*Math.cosh(k))/$};const L=(x+w*S*b)/$,D=w*S*L-b*$,F=w*S*b-L*$;A=I=>{const q=Math.exp(-w*S*I),k=Math.min($*I,300);return q*(D*Math.sinh(k)+F*Math.cosh(k))}}const P={calculatedDuration:v&&d||null,velocity:$=>oi(A($)),next:$=>{if(!v&&w<1){const D=Math.exp(-w*S*$),F=Math.sin(C*$),I=Math.cos(C*$),q=o-D*(N*F+b*I),k=oi(D*(M*F+R*I));return s.done=Math.abs(k)<=r&&Math.abs(o-q)<=i,s.value=s.done?o:q,s}const L=_($);if(v)s.done=$>=d;else{const D=oi(A($));s.done=Math.abs(D)<=r&&Math.abs(o-L)<=i}return s.value=s.done?o:L,s},toString:()=>{const $=Math.min(yD(P),m0),L=qne(D=>P.next($*D).value,$,30);return $+"ms "+L},toTransition:()=>{}};return P}g0.applyToOptions=e=>{const t=Z4e(e,100,g0);return e.ease=t.ease,e.duration=oi(t.duration),e.type="keyframes",e};const aBe=5;function zne(e,t,n){const r=Math.max(t-aBe,0);return xne(n-e(r),t-r)}function fP({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:f=.5,restSpeed:h}){const d=e[0],m={done:!1,value:d},v=R=>s!==void 0&&R<s||c!==void 0&&R>c,x=R=>s===void 0?c:c===void 0||Math.abs(s-R)<Math.abs(c-R)?s:c;let w=n*t;const b=d+w,S=o===void 0?b:o(b);S!==b&&(w=S-d);const E=R=>-w*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 C,N;const M=R=>{v(m.value)&&(C=R,N=g0({keyframes:[m.value,x(m.value)],velocity:zne(_,R,m.value),damping:i,stiffness:a,restDelta:f,restSpeed:h}))};return M(0),{calculatedDuration:null,next:R=>{let P=!1;return!N&&C===void 0&&(P=!0,A(R),M(R)),C!==void 0&&R>=C?N.next(R-C):(!P&&A(R),m)}}}function oBe(e,t,n){const r=[],i=n||Nl.mix||Bne,a=e.length-1;for(let o=0;o<a;o++){let s=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Di:t;s=Kg(c,s)}r.push(s)}return r}function sBe(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(uD(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 s=oBe(t,r,i),c=s.length,f=h=>{if(o&&h<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(h<e[d+1]);d++);const m=tg(e[d],e[d+1],h);return s[d](m)};return n?h=>f(Ga(e[0],e[a-1],h)):f}function lBe(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=tg(0,t,r);e.push(Bt(n,1,i))}}function cBe(e){const t=[0];return lBe(t,e.length-1),t}function uBe(e,t){return e.map(n=>n*t)}function fBe(e,t){return e.map(()=>t||Nne).splice(0,e.length-1)}function Gp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=b4e(r)?r.map(g9):g9(r),a={done:!1,value:t[0]},o=uBe(n&&n.length===t.length?n:cBe(t),e),s=sBe(o,t,{ease:Array.isArray(i)?i:fBe(t,i)});return{calculatedDuration:e,next:c=>(a.value=s(c),a.done=c>=e,a)}}const dBe=e=>e!==null;function i1(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(dBe),s=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!s||r===void 0?a[s]:r}const hBe={decay:fP,inertia:fP,tween:Gp,keyframes:Gp,spring:g0};function Fne(e){typeof e.type=="string"&&(e.type=hBe[e.type])}class bD{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 pBe=e=>e/100;class v0 extends bD{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!==br.now()&&this.tick(br.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;Fne(t);const{type:n=Gp,repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:s}=t;const c=n||Gp;c!==Gp&&typeof s[0]!="number"&&(this.mixKeyframes=Kg(pBe,Bne(s[0],s[1])),s=[0,100]);const f=c({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...s].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=yD(f));const{calculatedDuration:h}=f;this.calculatedDuration=h,this.resolvedDuration=h+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:s,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:h,repeat:d,repeatType:m,repeatDelay:v,type:x,onUpdate:w,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(d){const R=Math.min(this.currentTime,i)/s;let P=Math.floor(R),$=R%1;!$&&R>=1&&($=1),$===1&&P--,P=Math.min(P,d+1),!!(P%2)&&(m==="reverse"?($=1-$,v&&($-=v/s)):m==="mirror"&&(A=o)),_=Ga(0,1,$)*s}let C;E?(this.delayState.value=h[0],C=this.delayState):C=A.next(_),a&&!E&&(C.value=a(C.value));let{done:N}=C;!E&&c!==null&&(N=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const M=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return M&&x!==fP&&(C.value=i1(h,this.options,b,this.speed)),w&&w(C.value),M&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return Ri(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ri(t)}get time(){return Ri(this.currentTime)}set time(t){t=oi(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 zne(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(br.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Ri(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=Q4e,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(br.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 mBe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Sc=e=>e*180/Math.PI,dP=e=>{const t=Sc(Math.atan2(e[1],e[0]));return hP(t)},gBe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:dP,rotateZ:dP,skewX:e=>Sc(Math.atan(e[1])),skewY:e=>Sc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},hP=e=>(e=e%360,e<0&&(e+=360),e),_9=dP,E9=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),A9=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vBe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:E9,scaleY:A9,scale:e=>(E9(e)+A9(e))/2,rotateX:e=>hP(Sc(Math.atan2(e[6],e[5]))),rotateY:e=>hP(Sc(Math.atan2(-e[2],e[0]))),rotateZ:_9,rotate:_9,skewX:e=>Sc(Math.atan(e[4])),skewY:e=>Sc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function pP(e){return e.includes("scale")?1:0}function mP(e,t){if(!e||e==="none")return pP(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=vBe,i=n;else{const s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=gBe,i=s}if(!i)return pP(t);const a=r[t],o=i[1].split(",").map(bBe);return typeof a=="function"?a(o):o[a]}const yBe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return mP(n,t)};function bBe(e){return parseFloat(e.trim())}const uh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fh=new Set([...uh,"pathRotation"]),C9=e=>e===ch||e===Me,xBe=new Set(["x","y","z"]),wBe=uh.filter(e=>!xBe.has(e));function SBe(e){const t=[];return wBe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const pl={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})=>mP(t,"x"),y:(e,{transform:t})=>mP(t,"y")};pl.translateX=pl.x;pl.translateY=pl.y;const Bc=new Set;let gP=!1,vP=!1,yP=!1;function Vne(){if(vP){const e=Array.from(Bc).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=SBe(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 s;(s=r.getValue(a))==null||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}vP=!1,gP=!1,Bc.forEach(e=>e.complete(yP)),Bc.clear()}function Une(){Bc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(vP=!0)})}function _Be(){yP=!0,Une(),Vne(),yP=!1}class xD{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?(Bc.add(this),gP||(gP=!0,zt.read(Une),zt.resolveKeyframes(Vne))):(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 s=r.readValue(n,o);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}mBe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Bc.delete(this)}cancel(){this.state==="scheduled"&&(Bc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const EBe=e=>e.startsWith("--");function Hne(e,t,n){EBe(t)?e.style.setProperty(t,n):e.style[t]=n}const ABe={};function Gne(e,t){const n=bne(e);return()=>ABe[t]??n()}const CBe=Gne(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Kne=Gne(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dp=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,T9={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dp([0,.65,.55,1]),circOut:Dp([.55,0,1,.45]),backIn:Dp([.31,.01,.66,-.59]),backOut:Dp([.33,1.53,.69,.99])};function Wne(e,t){if(e)return typeof e=="function"?Kne()?qne(e,t):"ease-out":One(e)?Dp(e):Array.isArray(e)?e.map(n=>Wne(n,t)||T9.easeOut):T9[e]}function TBe(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeOut",times:c}={},f=void 0){const h={[t]:n};c&&(h.offset=c);const d=Wne(s,i);Array.isArray(d)&&(h.easing=d);const m={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return f&&(m.pseudoElement=f),e.animate(h,m)}function Yne(e){return typeof e=="function"&&"applyToOptions"in e}function jBe({type:e,...t}){return Yne(e)&&Kne()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Xne extends bD{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:s,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,uD(typeof t.type!="string");const f=jBe(t);this.animation=TBe(n,r,i,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const h=i1(i,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(h),Hne(n,r,h),this.animation.cancel()}c==null||c(),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 Ri(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ri(t)}get time(){return Ri(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=oi(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&&CBe()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),Di):i(this)}}const Qne={anticipate:Cne,backInOut:Ane,circInOut:jne};function NBe(e){return e in Qne}function OBe(e){typeof e.ease=="string"&&NBe(e.ease)&&(e.ease=Qne[e.ease])}const NO=10;class MBe extends Xne{constructor(t){OBe(t),Fne(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 s=new v0({...o,autoplay:!1}),c=Math.max(NO,br.now()-this.startTime),f=Ga(0,NO,c-NO),h=s.sample(c).value,{name:d}=this.options;a&&d&&Hne(a,d,h),n.setWithVelocity(s.sample(Math.max(0,c-f)).value,h,f),s.stop()}}const j9=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(la.test(e)||e==="0")&&!e.startsWith("url("));function RBe(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 PBe(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=j9(i,t),s=j9(a,t);return!o||!s?!1:RBe(e)||(n==="spring"||Yne(n))&&r}function bP(e){e.duration=0,e.type="keyframes"}const Zne=new Set(["opacity","clipPath","filter","transform"]),kBe=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function DBe(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&kBe.test(e[t]))return!0;return!1}const IBe=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),LBe=bne(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function $Be(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:h}=t.owner.getProps();return LBe()&&n&&(Zne.has(n)||IBe.has(n)&&DBe(s))&&(n!=="transform"||!h)&&!f&&!r&&i!=="mirror"&&a!==0&&o!=="inertia"}const BBe=40;class qBe extends bD{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:s,name:c,motionValue:f,element:h,...d}){var x;super(),this.stop=()=>{var w,b;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=br.now();const m={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,name:c,motionValue:f,element:h,...d},v=(h==null?void 0:h.KeyframeResolver)||xD;this.keyframeResolver=new v(s,(w,b,S)=>this.onKeyframesResolved(w,b,m,!S),c,f,h),(x=this.keyframeResolver)==null||x.scheduleResolve()}onKeyframesResolved(t,n,r,i){var S,E;this.keyframeResolver=void 0;const{name:a,type:o,velocity:s,delay:c,isHandoff:f,onUpdate:h}=r;this.resolvedAt=br.now();let d=!0;PBe(t,a,o,s)||(d=!1,(Nl.instantAnimations||!c)&&(h==null||h(i1(t,r,n))),t[0]=t[t.length-1],bP(r),r.repeat=0);const v={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>BBe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},x=d&&!f&&$Be(v),w=(E=(S=v.motionValue)==null?void 0:S.owner)==null?void 0:E.current;let b;if(x)try{b=new MBe({...v,element:w})}catch{b=new v0(v)}else b=new v0(v);b.finished.then(()=>{this.notifyFinished()}).catch(Di),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(),_Be()),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 Jne(e,t,n,r=0,i=1){const a=Array.from(e).sort((f,h)=>f.sortNodePosition(h)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n=="function"?n(a,o):i===1?a*r:s-a*r}const N9=30,zBe=e=>!isNaN(parseFloat(e));class FBe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var a;const i=br.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=br.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=zBe(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 fD);const r=this.events[t].add(n);return t==="change"?()=>{r(),zt.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=br.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>N9)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,N9);return xne(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 Id(e,t){return new FBe(e,t)}function ere(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function wD(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?ere(n,e):n}const VBe={type:"spring",stiffness:500,damping:25,restSpeed:10},UBe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HBe={type:"keyframes",duration:.8},GBe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},KBe=(e,{keyframes:t})=>t.length>2?HBe:fh.has(e)?e.startsWith("scale")?UBe(t[1]):VBe:GBe,WBe=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function YBe(e){for(const t in e)if(!WBe.has(t))return!0;return!1}const SD=(e,t,n,r={},i,a)=>o=>{const s=wD(r,e)||{},c=s.delay||r.delay||0;let{elapsed:f=0}=r;f=f-oi(c);const h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-f,onUpdate:m=>{t.set(m),s.onUpdate&&s.onUpdate(m)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};YBe(s)||Object.assign(h,KBe(e,h)),h.duration&&(h.duration=oi(h.duration)),h.repeatDelay&&(h.repeatDelay=oi(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let d=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(bP(h),h.delay===0&&(d=!0)),(Nl.instantAnimations||Nl.skipAnimations||i!=null&&i.shouldSkipAnimations||s.skipAnimations)&&(d=!0,bP(h),h.delay=0),h.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){const m=i1(h.keyframes,s);if(m!==void 0){zt.update(()=>{h.onUpdate(m),h.onComplete()});return}}return s.isSync?new v0(h):new qBe(h)},XBe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function QBe(e){const t=XBe.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function tre(e,t,n=1){const[r,i]=QBe(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return gne(o)?parseFloat(o):o}return pD(i)?tre(i,t,n+1):i}function O9(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function _D(e,t,n,r){if(typeof t=="function"){const[i,a]=O9(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]=O9(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function qc(e,t,n){const r=e.getProps();return _D(r,t,n!==void 0?n:r.custom,e)}const nre=new Set(["width","height","top","left","right","bottom",...uh]),xP=e=>Array.isArray(e);function ZBe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Id(n))}function JBe(e){return xP(e)?e[e.length-1]||0:e}function eqe(e,t){const n=qc(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=JBe(a[o]);ZBe(e,o,s)}}const er=e=>!!(e&&e.getVelocity);function tqe(e){return!!(er(e)&&e.add)}function wP(e,t){const n=e.getValue("willChange");if(tqe(n))return n.add(t);if(!n&&Nl.WillChange){const r=new Nl.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function ED(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const nqe="framerAppearId",rre="data-"+ED(nqe);function ire(e){return e.props[rre]}function rqe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function are(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t;const c=e.getDefaultTransition();a=a?ere(a,c):c;const f=a==null?void 0:a.reduceMotion,h=a==null?void 0:a.skipAnimations;r&&(a=r);const d=[],m=i&&e.animationState&&e.animationState.getState()[i],v=a==null?void 0:a.path;v&&v.animateVisualElement(e,s,a,n,d);for(const x in s){const w=e.getValue(x,e.latestValues[x]??null),b=s[x];if(b===void 0||m&&rqe(m,x))continue;const S={delay:n,...wD(a||{},x)};h&&(S.skipAnimations=!0);const E=w.get();if(E!==void 0&&!w.isAnimating()&&!Array.isArray(b)&&b===E&&!S.velocity){zt.update(()=>w.set(b));continue}let _=!1;if(window.MotionHandoffAnimation){const N=ire(e);if(N){const M=window.MotionHandoffAnimation(N,x,zt);M!==null&&(S.startTime=M,_=!0)}}wP(e,x);const A=f??e.shouldReduceMotion;w.start(SD(x,w,b,A&&nre.has(x)?{type:!1}:S,e,_));const C=w.animation;C&&d.push(C)}if(o){const x=()=>zt.update(()=>{o&&eqe(e,o)});d.length?Promise.all(d).then(x):x()}return d}function SP(e,t,n={}){var c;const r=qc(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(are(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:d,staggerDirection:m}=i;return iqe(e,t,f,h,d,m,n)}:()=>Promise.resolve(),{when:s}=i;if(s){const[f,h]=s==="beforeChildren"?[a,o]:[o,a];return f().then(()=>h())}else return Promise.all([a(),o(n.delay)])}function iqe(e,t,n=0,r=0,i=0,a=1,o){const s=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),s.push(SP(c,t,{...o,delay:n+(typeof r=="function"?0:r)+Jne(e.variantChildren,c,r,i,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(s)}function aqe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>SP(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=SP(e,t,n);else{const i=typeof t=="function"?qc(e,t,n.custom):t;r=Promise.all(are(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const oqe={test:e=>e==="auto",parse:e=>e},ore=e=>t=>t.test(e),sre=[ch,Me,qa,Eo,R4e,M4e,oqe],M9=e=>sre.find(ore(e));function sqe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yne(e):!0}const lqe=new Set(["brightness","contrast","saturate","opacity"]);function cqe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(mD)||[];if(!r)return e;const i=n.replace(r,"");let a=lqe.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const uqe=/\b([a-z-]*)\(.*?\)/gu,_P={...la,getAnimatableNone:e=>{const t=e.match(uqe);return t?t.map(cqe).join(" "):e}},EP={...la,getAnimatableNone:e=>{const t=la.parse(e);return la.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},R9={...ch,transform:Math.round},fqe={rotate:Eo,pathRotation:Eo,rotateX:Eo,rotateY:Eo,rotateZ:Eo,scale:eb,scaleX:eb,scaleY:eb,scaleZ:eb,skew:Eo,skewX:Eo,skewY:Eo,distance:Me,translateX:Me,translateY:Me,translateZ:Me,x:Me,y:Me,z:Me,perspective:Me,transformPerspective:Me,opacity:ng,originX:y9,originY:y9,originZ:Me},y0={borderWidth:Me,borderTopWidth:Me,borderRightWidth:Me,borderBottomWidth:Me,borderLeftWidth:Me,borderRadius:Me,borderTopLeftRadius:Me,borderTopRightRadius:Me,borderBottomRightRadius:Me,borderBottomLeftRadius:Me,width:Me,maxWidth:Me,height:Me,maxHeight:Me,top:Me,right:Me,bottom:Me,left:Me,inset:Me,insetBlock:Me,insetBlockStart:Me,insetBlockEnd:Me,insetInline:Me,insetInlineStart:Me,insetInlineEnd:Me,padding:Me,paddingTop:Me,paddingRight:Me,paddingBottom:Me,paddingLeft:Me,paddingBlock:Me,paddingBlockStart:Me,paddingBlockEnd:Me,paddingInline:Me,paddingInlineStart:Me,paddingInlineEnd:Me,margin:Me,marginTop:Me,marginRight:Me,marginBottom:Me,marginLeft:Me,marginBlock:Me,marginBlockStart:Me,marginBlockEnd:Me,marginInline:Me,marginInlineStart:Me,marginInlineEnd:Me,fontSize:Me,backgroundPositionX:Me,backgroundPositionY:Me,...fqe,zIndex:R9,fillOpacity:ng,strokeOpacity:ng,numOctaves:R9},dqe={...y0,color:En,backgroundColor:En,outlineColor:En,fill:En,stroke:En,borderColor:En,borderTopColor:En,borderRightColor:En,borderBottomColor:En,borderLeftColor:En,filter:_P,WebkitFilter:_P,mask:EP,WebkitMask:EP},lre=e=>dqe[e],hqe=new Set([_P,EP]);function cre(e,t){let n=lre(e);return hqe.has(n)||(n=la),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const pqe=new Set(["auto","none","0"]);function mqe(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!pqe.has(a)&&Dd(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=cre(n,i)}class gqe extends xD{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 h=0;h<t.length;h++){let d=t[h];if(typeof d=="string"&&(d=d.trim(),pD(d))){const m=tre(d,n.current);m!==void 0&&(t[h]=m),h===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!nre.has(r)||t.length!==2)return;const[i,a]=t,o=M9(i),s=M9(a),c=v9(i),f=v9(a);if(c!==f&&pl[r]){this.needsMeasurement=!0;return}if(o!==s)if(C9(o)&&C9(s))for(let h=0;h<t.length;h++){const d=t[h];typeof d=="string"&&(t[h]=parseFloat(d))}else pl[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||sqe(t[i]))&&r.push(i);r.length&&mqe(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=pl[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 s;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]=pl[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(s=this.removedTransforms)!=null&&s.length&&this.removedTransforms.forEach(([c,f])=>{t.getValue(c).set(f)}),this.resolveNoneKeyframes()}}function ure(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 AP=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function bb(e){return vne(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:AD}=Mne(queueMicrotask,!1),Qi={x:!1,y:!1};function fre(){return Qi.x||Qi.y}function vqe(e){return e==="x"||e==="y"?Qi[e]?null:(Qi[e]=!0,()=>{Qi[e]=!1}):Qi.x||Qi.y?null:(Qi.x=Qi.y=!0,()=>{Qi.x=Qi.y=!1})}function dre(e,t){const n=ure(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function yqe(e){return!(e.pointerType==="touch"||fre())}function bqe(e,t,n={}){const[r,i,a]=dre(e,n);return r.forEach(o=>{let s=!1,c=!1,f;const h=()=>{o.removeEventListener("pointerleave",x)},d=b=>{f&&(f(b),f=void 0),h()},m=b=>{s=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),c&&(c=!1,d(b))},v=()=>{s=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},x=b=>{if(b.pointerType!=="touch"){if(s){c=!0;return}d(b)}},w=b=>{if(!yqe(b))return;c=!1;const S=t(o,b);typeof S=="function"&&(f=S,o.addEventListener("pointerleave",x,i))};o.addEventListener("pointerenter",w,i),o.addEventListener("pointerdown",v,i)}),a}const hre=(e,t)=>t?e===t?!0:hre(e,t.parentElement):!1,CD=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,xqe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function wqe(e){return xqe.has(e.tagName)||e.isContentEditable===!0}const Sqe=new Set(["INPUT","SELECT","TEXTAREA"]);function _qe(e){return Sqe.has(e.tagName)||e.isContentEditable===!0}const xb=new WeakSet;function P9(e){return t=>{t.key==="Enter"&&e(t)}}function OO(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Eqe=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=P9(()=>{if(xb.has(n))return;OO(n,"down");const i=P9(()=>{OO(n,"up")}),a=()=>OO(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 k9(e){return CD(e)&&!fre()}const D9=new WeakSet;function Aqe(e,t,n={}){const[r,i,a]=dre(e,n),o=s=>{const c=s.currentTarget;if(!k9(s)||D9.has(s))return;xb.add(c),n.stopPropagation&&D9.add(s);const f=t(c,s),h=(v,x)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",m),xb.has(c)&&xb.delete(c),k9(v)&&typeof f=="function"&&f(v,{success:x})},d=v=>{h(v,c===window||c===document||n.useGlobalTarget||hre(c,v.target))},m=v=>{h(v,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",m,i)};return r.forEach(s=>{(n.useGlobalTarget?window:s).addEventListener("pointerdown",o,i),bb(s)&&(s.addEventListener("focus",f=>Eqe(f,i)),!wqe(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function TD(e){return vne(e)&&"ownerSVGElement"in e}const wb=new WeakMap;let Gs;const pre=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:TD(r)&&"getBBox"in r?r.getBBox()[t]:r[n],Cqe=pre("inline","width","offsetWidth"),Tqe=pre("block","height","offsetHeight");function jqe({target:e,borderBoxSize:t}){var n;(n=wb.get(e))==null||n.forEach(r=>{r(e,{get width(){return Cqe(e,t)},get height(){return Tqe(e,t)}})})}function Nqe(e){e.forEach(jqe)}function Oqe(){typeof ResizeObserver>"u"||(Gs=new ResizeObserver(Nqe))}function Mqe(e,t){Gs||Oqe();const n=ure(e);return n.forEach(r=>{let i=wb.get(r);i||(i=new Set,wb.set(r,i)),i.add(t),Gs==null||Gs.observe(r)}),()=>{n.forEach(r=>{const i=wb.get(r);i==null||i.delete(t),i!=null&&i.size||Gs==null||Gs.unobserve(r)})}}const Sb=new Set;let _f;function Rqe(){_f=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Sb.forEach(t=>t(e))},window.addEventListener("resize",_f)}function Pqe(e){return Sb.add(e),_f||Rqe(),()=>{Sb.delete(e),!Sb.size&&typeof _f=="function"&&(window.removeEventListener("resize",_f),_f=void 0)}}function I9(e,t){return typeof e=="function"?Pqe(e):Mqe(e,t)}function kqe(e){return TD(e)&&e.tagName==="svg"}const Dqe=[...sre,En,la],Iqe=e=>Dqe.find(ore(e)),L9=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ef=()=>({x:L9(),y:L9()}),$9=()=>({min:0,max:0}),Rn=()=>({x:$9(),y:$9()}),Lqe=new WeakMap;function a1(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function rg(e){return typeof e=="string"||Array.isArray(e)}const jD=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ND=["initial",...jD];function o1(e){return a1(e.animate)||ND.some(t=>rg(e[t]))}function mre(e){return!!(o1(e)||e.variants)}function $qe(e,t,n){for(const r in t){const i=t[r],a=n[r];if(er(i))e.addValue(r,i);else if(er(a))e.addValue(r,Id(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,Id(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const CP={current:null},gre={current:!1},Bqe=typeof window<"u";function qqe(){if(gre.current=!0,!!Bqe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>CP.current=e.matches;e.addEventListener("change",t),t()}else CP.current=!1}const B9=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let b0={};function vre(e){b0=e}function zqe(){return b0}class Fqe{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:o,visualState:s},c={}){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=xD,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 v=br.now();this.renderScheduledAt<v&&(this.renderScheduledAt=v,zt.render(this.render,!1,!0))};const{latestValues:f,renderState:h}=s;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=o1(n),this.isVariantNode=mre(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const v in m){const x=m[v];f[v]!==void 0&&er(x)&&x.set(f[v])}}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,Lqe.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:(gre.current||qqe(),this.shouldReduceMotion=CP.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(),Ol(this.notifyUpdate),Ol(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&&Zne.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:s,times:c,ease:f,duration:h}=n.accelerate,d=new Xne({element:this.current,name:t,keyframes:s,times:c,ease:f,duration:oi(h)}),m=o(d);this.valueSubscriptions.set(t,()=>{m(),d.cancel()});return}const r=fh.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&zt.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 b0){const n=b0[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):Rn()}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<B9.length;r++){const i=B9[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=$qe(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=Id(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"&&(gne(r)||yne(r))?r=parseFloat(r):!Iqe(r)&&la.test(n)&&(r=cre(t,n)),this.setBaseTarget(t,er(r)?r.get():r)),er(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=_D(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&&!er(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 fD),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){AD.render(this.render)}}class yre extends Fqe{constructor(){super(...arguments),this.KeyframeResolver=gqe}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;er(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ll{constructor(t){this.isMounted=!1,this.node=t}update(){}}function bre({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Vqe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Uqe(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 MO(e){return e===void 0||e===1}function TP({scale:e,scaleX:t,scaleY:n}){return!MO(e)||!MO(t)||!MO(n)}function dc(e){return TP(e)||xre(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function xre(e){return q9(e.x)||q9(e.y)}function q9(e){return e&&e!=="0%"}function x0(e,t,n){const r=e-n,i=t*r;return n+i}function z9(e,t,n,r,i){return i!==void 0&&(e=x0(e,i,r)),x0(e,n,r)+t}function jP(e,t=0,n=1,r,i){e.min=z9(e.min,t,n,r,i),e.max=z9(e.max,t,n,r,i)}function wre(e,{x:t,y:n}){jP(e.x,t.translate,t.scale,t.originPoint),jP(e.y,n.translate,n.scale,n.originPoint)}const F9=.999999999999,V9=1.0000000000001;function Hqe(e,t,n,r=!1){var s;const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let c=0;c<i;c++){a=n[c],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&&(Ma(e.x,-a.scroll.offset.x),Ma(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,wre(e,o)),r&&dc(a.latestValues)&&_b(e,a.latestValues,(s=a.layout)==null?void 0:s.layoutBox))}t.x<V9&&t.x>F9&&(t.x=1),t.y<V9&&t.y>F9&&(t.y=1)}function Ma(e,t){e.min+=t,e.max+=t}function U9(e,t,n,r,i=.5){const a=Bt(e.min,e.max,i);jP(e,t,n,a,r)}function H9(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function _b(e,t,n){const r=n??e;U9(e.x,H9(t.x,r.x),t.scaleX,t.scale,t.originX),U9(e.y,H9(t.y,r.y),t.scaleY,t.scale,t.originY)}function Sre(e,t){return bre(Uqe(e.getBoundingClientRect(),t))}function Gqe(e,t,n){const r=Sre(e,n),{scroll:i}=t;return i&&(Ma(r.x,i.offset.x),Ma(r.y,i.offset.y)),r}const Kqe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Wqe=uh.length;function Yqe(e,t,n){let r="",i=!0;for(let o=0;o<Wqe;o++){const s=uh[o],c=e[s];if(c===void 0)continue;let f=!0;if(typeof c=="number")f=c===(s.startsWith("scale")?1:0);else{const h=parseFloat(c);f=s.startsWith("scale")?h===1:h===0}if(!f||n){const h=AP(c,y0[s]);if(!f){i=!1;const d=Kqe[s]||s;r+=`${d}(${h}) `}n&&(t[s]=h)}}const a=e.pathRotation;return a&&(i=!1,r+=`rotate(${AP(a,y0.pathRotation)}) `),r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function OD(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,s=!1;for(const c in t){const f=t[c];if(fh.has(c)){o=!0;continue}else if(Pne(c)){i[c]=f;continue}else{const h=AP(f,y0[c]);c.startsWith("origin")?(s=!0,a[c]=h):r[c]=h}}if(t.transform||(o||n?r.transform=Yqe(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:c="50%",originY:f="50%",originZ:h=0}=a;r.transformOrigin=`${c} ${f} ${h}`}}function _re(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 G9(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ep={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Me.test(e))e=parseFloat(e);else return e;const n=G9(e,t.target.x),r=G9(e,t.target.y);return`${n}% ${r}%`}},Xqe={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=la.parse(e);if(i.length>5)return r;const a=la.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;const f=Bt(s,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=f),typeof i[3+o]=="number"&&(i[3+o]/=f),a(i)}},NP={borderRadius:{...Ep,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ep,borderTopRightRadius:Ep,borderBottomLeftRadius:Ep,borderBottomRightRadius:Ep,boxShadow:Xqe};function Ere(e,{layout:t,layoutId:n}){return fh.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!NP[e]||e==="opacity")}function MD(e,t,n){var o;const r=e.style,i=t==null?void 0:t.style,a={};if(!r)return a;for(const s in r)(er(r[s])||i&&er(i[s])||Ere(s,e)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(a[s]=r[s]);return a}function Qqe(e){return window.getComputedStyle(e)}class Zqe extends yre{constructor(){super(...arguments),this.type="html",this.renderInstance=_re}readValueFromInstance(t,n){var r;if(fh.has(n))return(r=this.projection)!=null&&r.isProjecting?pP(n):yBe(t,n);{const i=Qqe(t),a=(Pne(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Sre(t,n)}build(t,n,r){OD(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return MD(t,n,r)}}const Jqe={offset:"stroke-dashoffset",array:"stroke-dasharray"},e5e={offset:"strokeDashoffset",array:"strokeDasharray"};function t5e(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Jqe:e5e;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}const n5e=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Are(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,f,h){if(OD(e,s,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:m}=e;d.transform&&(m.transform=d.transform,delete d.transform),(m.transform||d.transformOrigin)&&(m.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),m.transform&&(m.transformBox=(h==null?void 0:h.transformBox)??"fill-box",delete d.transformBox);for(const v of n5e)d[v]!==void 0&&(m[v]=d[v],delete d[v]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&t5e(d,i,a,o,!1)}const Cre=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"]),Tre=e=>typeof e=="string"&&e.toLowerCase()==="svg";function r5e(e,t,n,r){_re(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Cre.has(i)?i:ED(i),t.attrs[i])}function jre(e,t,n){const r=MD(e,t,n);for(const i in e)if(er(e[i])||er(t[i])){const a=uh.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}class i5e extends yre{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Rn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(fh.has(n)){const r=lre(n);return r&&r.default||0}return n=Cre.has(n)?n:ED(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return jre(t,n,r)}build(t,n,r){Are(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){r5e(t,n,r,i)}mount(t){this.isSVGTag=Tre(t.tagName),super.mount(t)}}const a5e=ND.length;function Nre(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Nre(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<a5e;n++){const r=ND[n],i=e.props[r];(rg(i)||i===!1)&&(t[r]=i)}return t}function Ore(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 o5e=[...jD].reverse(),s5e=jD.length;function l5e(e){return t=>Promise.all(t.map(({animation:n,options:r})=>aqe(e,n,r)))}function c5e(e){let t=l5e(e),n=K9(),r=!0,i=!1;const a=f=>(h,d)=>{var v;const m=qc(e,d,f==="exit"?(v=e.presenceContext)==null?void 0:v.custom:void 0);if(m){const{transition:x,transitionEnd:w,...b}=m;h={...h,...b,...w}}return h};function o(f){t=f(e)}function s(f){const{props:h}=e,d=Nre(e.parent)||{},m=[],v=new Set;let x={},w=1/0;for(let S=0;S<s5e;S++){const E=o5e[S],_=n[E],A=h[E]!==void 0?h[E]:d[E],C=rg(A),N=E===f?_.isActive:null;N===!1&&(w=S);let M=A===d[E]&&A!==h[E]&&C;if(M&&(r||i)&&e.manuallyAnimateOnMount&&(M=!1),_.protectedKeys={...x},!_.isActive&&N===null||!A&&!_.prevProp||a1(A)||typeof A=="boolean")continue;if(E==="exit"&&_.isActive&&N!==!0){_.prevResolvedValues&&(x={...x,..._.prevResolvedValues});continue}const R=u5e(_.prevProp,A);let P=R||E===f&&_.isActive&&!M&&C||S>w&&C,$=!1;const L=Array.isArray(A)?A:[A];let D=L.reduce(a(E),{});N===!1&&(D={});const{prevResolvedValues:F={}}=_,I={...F,...D},q=H=>{P=!0,v.has(H)&&($=!0,v.delete(H)),_.needsAnimating[H]=!0;const G=e.getValue(H);G&&(G.liveStyle=!1)};for(const H in I){const G=D[H],Q=F[H];if(x.hasOwnProperty(H))continue;let U=!1;xP(G)&&xP(Q)?U=!Ore(G,Q)||R:U=G!==Q,U?G!=null?q(H):v.add(H):G!==void 0&&v.has(H)?q(H):_.protectedKeys[H]=!0}_.prevProp=A,_.prevResolvedValues=D,_.isActive&&(x={...x,...D}),(r||i)&&e.blockInitialAnimation&&(P=!1);const k=M&&R;P&&(!k||$)&&m.push(...L.map(H=>{const G={type:E};if(typeof H=="string"&&(r||i)&&!k&&e.manuallyAnimateOnMount&&e.parent){const{parent:Q}=e,U=qc(Q,H);if(Q.enteringChildren&&U){const{delayChildren:V}=U.transition||{};G.delay=Jne(Q.enteringChildren,e,V)}}return{animation:H,options:G}}))}if(v.size){const S={};if(typeof h.initial!="boolean"){const E=qc(e,Array.isArray(h.initial)?h.initial[0]:h.initial);E&&E.transition&&(S.transition=E.transition)}v.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&&(h.initial===!1||h.initial===h.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,i=!1,b?t(m):Promise.resolve()}function c(f,h){var m;if(n[f].isActive===h)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(v=>{var x;return(x=v.animationState)==null?void 0:x.setActive(f,h)}),n[f].isActive=h;const d=s(f);for(const v in n)n[v].protectedKeys={};return d}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=K9(),i=!0}}}function u5e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ore(t,e):!1}function sc(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function K9(){return{animate:sc(!0),whileInView:sc(),whileHover:sc(),whileTap:sc(),whileDrag:sc(),whileFocus:sc(),exit:sc()}}function OP(e,t){e.min=t.min,e.max=t.max}function Yi(e,t){OP(e.x,t.x),OP(e.y,t.y)}function W9(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Mre=1e-4,f5e=1-Mre,d5e=1+Mre,Rre=.01,h5e=0-Rre,p5e=0+Rre;function xr(e){return e.max-e.min}function m5e(e,t,n){return Math.abs(e-t)<=n}function Y9(e,t,n,r=.5){e.origin=r,e.originPoint=Bt(t.min,t.max,e.origin),e.scale=xr(n)/xr(t),e.translate=Bt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=f5e&&e.scale<=d5e||isNaN(e.scale))&&(e.scale=1),(e.translate>=h5e&&e.translate<=p5e||isNaN(e.translate))&&(e.translate=0)}function Kp(e,t,n,r){Y9(e.x,t.x,n.x,r?r.originX:void 0),Y9(e.y,t.y,n.y,r?r.originY:void 0)}function X9(e,t,n,r=0){const i=r?Bt(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+xr(t)}function g5e(e,t,n,r){X9(e.x,t.x,n.x,r==null?void 0:r.x),X9(e.y,t.y,n.y,r==null?void 0:r.y)}function Q9(e,t,n,r=0){const i=r?Bt(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+xr(t)}function w0(e,t,n,r){Q9(e.x,t.x,n.x,r==null?void 0:r.x),Q9(e.y,t.y,n.y,r==null?void 0:r.y)}function Z9(e,t,n,r,i){return e-=t,e=x0(e,1/n,r),i!==void 0&&(e=x0(e,1/i,r)),e}function v5e(e,t=0,n=1,r=.5,i,a=e,o=e){if(qa.test(t)&&(t=parseFloat(t),t=Bt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=Bt(a.min,a.max,r);e===a&&(s-=t),e.min=Z9(e.min,t,n,s,i),e.max=Z9(e.max,t,n,s,i)}function J9(e,t,[n,r,i],a,o){v5e(e,t[n],t[r],t[i],t.scale,a,o)}const y5e=["x","scaleX","originX"],b5e=["y","scaleY","originY"];function eG(e,t,n,r){J9(e.x,t,y5e,n?n.x:void 0,r?r.x:void 0),J9(e.y,t,b5e,n?n.y:void 0,r?r.y:void 0)}function tG(e){return e.translate===0&&e.scale===1}function Pre(e){return tG(e.x)&&tG(e.y)}function nG(e,t){return e.min===t.min&&e.max===t.max}function x5e(e,t){return nG(e.x,t.x)&&nG(e.y,t.y)}function rG(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kre(e,t){return rG(e.x,t.x)&&rG(e.y,t.y)}function iG(e){return xr(e.x)/xr(e.y)}function aG(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ca(e){return[e("x"),e("y")]}function w5e(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:h,pathRotation:d,rotateX:m,rotateY:v,skewX:x,skewY:w}=n;f&&(r=`perspective(${f}px) ${r}`),h&&(r+=`rotate(${h}deg) `),d&&(r+=`rotate(${d}deg) `),m&&(r+=`rotateX(${m}deg) `),v&&(r+=`rotateY(${v}deg) `),x&&(r+=`skewX(${x}deg) `),w&&(r+=`skewY(${w}deg) `)}const s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||"none"}const Dre=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],S5e=Dre.length,oG=e=>typeof e=="string"?parseFloat(e):e,sG=e=>typeof e=="number"||Me.test(e);function _5e(e,t,n,r,i,a){i?(e.opacity=Bt(0,n.opacity??1,E5e(r)),e.opacityExit=Bt(t.opacity??1,0,A5e(r))):a&&(e.opacity=Bt(t.opacity??1,n.opacity??1,r));for(let o=0;o<S5e;o++){const s=Dre[o];let c=lG(t,s),f=lG(n,s);if(c===void 0&&f===void 0)continue;c||(c=0),f||(f=0),c===0||f===0||sG(c)===sG(f)?(e[s]=Math.max(Bt(oG(c),oG(f),r),0),(qa.test(f)||qa.test(c))&&(e[s]+="%")):e[s]=f}(t.rotate||n.rotate)&&(e.rotate=Bt(t.rotate||0,n.rotate||0,r))}function lG(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const E5e=Ire(0,.5,Tne),A5e=Ire(.5,.95,Di);function Ire(e,t,n){return r=>r<e?0:r>t?1:n(tg(e,t,r))}function C5e(e,t,n){const r=er(e)?e:Id(e);return r.start(SD("",r,t,n)),r.animation}function ig(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const T5e=(e,t)=>e.depth-t.depth;class j5e{constructor(){this.children=[],this.isDirty=!1}add(t){cD(this.children,t),this.isDirty=!0}remove(t){h0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(T5e),this.isDirty=!1,this.children.forEach(t)}}function N5e(e,t){const n=br.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Ol(r),e(a-t))};return zt.setup(r,!0),()=>Ol(r)}function Eb(e){return er(e)?e.get():e}class O5e{constructor(){this.members=[]}add(t){cD(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&&(h0(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(h0(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 Ab={hasAnimatedSinceResize:!0,hasEverUpdated:!1},RO=["","X","Y","Z"],M5e=1e3;let R5e=0;function PO(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Lre(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ire(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",zt,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Lre(r)}function $re({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=R5e++,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(D5e),this.nodes.forEach(z5e),this.nodes.forEach(F5e),this.nodes.forEach(I5e)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new j5e)}addEventListener(o,s){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new fD),this.eventHandlers.get(o).add(s)}notifyListeners(o,...s){const c=this.eventHandlers.get(o);c&&c.notify(...s)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=TD(o)&&!kqe(o),this.instance=o;const{layoutId:s,layout:c,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||s)&&(this.isLayoutDirty=!0),e){let h,d=0;const m=()=>this.root.updateBlockedByResize=!1;zt.read(()=>{d=window.innerWidth}),e(o,()=>{const v=window.innerWidth;v!==d&&(d=v,this.root.updateBlockedByResize=!0,h&&h(),h=N5e(m,250),Ab.hasAnimatedSinceResize&&(Ab.hasAnimatedSinceResize=!1,this.nodes.forEach(fG)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&f&&(s||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:d,hasRelativeLayoutChanged:m,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||f.getDefaultTransition()||K5e,{onLayoutAnimationStart:w,onLayoutAnimationComplete:b}=f.getProps(),S=!this.targetLayout||!kre(this.targetLayout,v),E=!d&&m;if(this.options.layoutRoot||this.resumeFrom||E||d&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...wD(x,"layout"),onPlay:w,onComplete:b};(f.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(h,E,_.path)}else d||fG(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ol(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(V5e),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&&Lre(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const d=this.path[h];d.shouldResetTransform=!0,(typeof d.latestValues.x=="string"||typeof d.latestValues.y=="string")&&(d.isLayoutDirty=!0),d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:s,layout:c}=this.options;if(s===void 0&&!c)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach($5e),this.nodes.forEach(cG);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(uG);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(B5e),this.nodes.forEach(q5e),this.nodes.forEach(P5e),this.nodes.forEach(k5e)):this.nodes.forEach(uG),this.clearAllSnapshots();const s=br.now();Zn.delta=Ga(0,1e3/60,s-Zn.timestamp),Zn.timestamp=s,Zn.isProcessing=!0,EO.update.process(Zn),EO.preRender.process(Zn),EO.render.process(Zn),Zn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,AD.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(L5e),this.sharedNodes.forEach(U5e)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,zt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){zt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xr(this.snapshot.measuredBox.x)&&!xr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Rn()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(s=!1),s&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!Pre(this.projectionDelta),c=this.getTransformTemplate(),f=c?c(this.latestValues,""):void 0,h=f!==this.prevTransformTemplateValue;o&&this.instance&&(s||dc(this.latestValues)||h)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const s=this.measurePageBox();let c=this.removeElementScroll(s);return o&&(c=this.removeTransform(c)),W5e(c),{animationId:this.root.animationId,measuredBox:s,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:o}=this.options;if(!o)return Rn();const s=o.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(Y5e))){const{scroll:h}=this.root;h&&(Ma(s.x,h.offset.x),Ma(s.y,h.offset.y))}return s}removeElementScroll(o){var c;const s=Rn();if(Yi(s,o),(c=this.scroll)!=null&&c.wasRoot)return s;for(let f=0;f<this.path.length;f++){const h=this.path[f],{scroll:d,options:m}=h;h!==this.root&&d&&m.layoutScroll&&(d.wasRoot&&Yi(s,o),Ma(s.x,d.offset.x),Ma(s.y,d.offset.y))}return s}applyTransform(o,s=!1,c){var h,d;const f=c||Rn();Yi(f,o);for(let m=0;m<this.path.length;m++){const v=this.path[m];!s&&v.options.layoutScroll&&v.scroll&&v!==v.root&&(Ma(f.x,-v.scroll.offset.x),Ma(f.y,-v.scroll.offset.y)),dc(v.latestValues)&&_b(f,v.latestValues,(h=v.layout)==null?void 0:h.layoutBox)}return dc(this.latestValues)&&_b(f,this.latestValues,(d=this.layout)==null?void 0:d.layoutBox),f}removeTransform(o){var c;const s=Rn();Yi(s,o);for(let f=0;f<this.path.length;f++){const h=this.path[f];if(!dc(h.latestValues))continue;let d;h.instance&&(TP(h.latestValues)&&h.updateSnapshot(),d=Rn(),Yi(d,h.measurePageBox())),eG(s,h.latestValues,(c=h.snapshot)==null?void 0:c.layoutBox,d)}return dc(this.latestValues)&&eG(s,this.latestValues),s}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!==Zn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var v;const s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==s;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:d}=this.options;if(!this.layout||!(h||d))return;this.resolvedRelativeTargetAt=Zn.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=Rn(),this.targetWithTransforms=Rn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),g5e(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Yi(this.target,this.layout.layoutBox),wre(this.target,this.targetDelta)):Yi(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||TP(this.parent.latestValues)||xre(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,s,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Rn(),this.relativeTargetOrigin=Rn(),w0(this.relativeTargetOrigin,s,c,this.options.layoutAnchor||void 0),Yi(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var x;const o=this.getLead(),s=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(x=this.parent)!=null&&x.isProjectionDirty)&&(c=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Zn.timestamp&&(c=!1),c)return;const{layout:f,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||h))return;Yi(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,m=this.treeScale.y;Hqe(this.layoutCorrected,this.treeScale,this.path,s),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Rn());const{target:v}=o;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(W9(this.prevProjectionDelta.x,this.projectionDelta.x),W9(this.prevProjectionDelta.y,this.projectionDelta.y)),Kp(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==m||!aG(this.projectionDelta.x,this.prevProjectionDelta.x)||!aG(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var s;if((s=this.options.visualElement)==null||s.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ef(),this.projectionDelta=Ef(),this.projectionDeltaWithTransform=Ef()}setAnimationOrigin(o,s=!1,c){const f=this.snapshot,h=f?f.latestValues:{},d={...this.latestValues},m=Ef();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;const v=Rn(),x=f?f.source:void 0,w=this.layout?this.layout.source:void 0,b=x!==w,S=this.getStack(),E=!S||S.members.length<=1,_=!!(b&&!E&&this.options.crossfade===!0&&!this.path.some(G5e));this.animationProgress=0;let A;const C=c==null?void 0:c.interpolateProjection(o);this.mixTargetDelta=N=>{const M=N/1e3,R=C==null?void 0:C(M);R?(m.x.translate=R.x,m.x.scale=Bt(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=Bt(o.y.scale,1,M),m.y.origin=o.y.origin,m.y.originPoint=o.y.originPoint):(dG(m.x,o.x,M),dG(m.y,o.y,M)),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(w0(v,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),H5e(this.relativeTarget,this.relativeTargetOrigin,v,M),A&&x5e(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=Rn()),Yi(A,this.relativeTarget)),b&&(this.animationValues=d,_5e(d,h,this.latestValues,M,_,E)),R&&R.rotate!==void 0&&(this.animationValues||(this.animationValues=d),this.animationValues.pathRotation=R.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=M},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var s,c,f;this.notifyListeners("animationStart"),(s=this.currentAnimation)==null||s.stop(),(f=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||f.stop(),this.pendingAnimation&&(Ol(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=zt.update(()=>{Ab.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Id(0)),this.motionValue.jump(0,!1),this.currentAnimation=C5e(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:h=>{this.mixTargetDelta(h),o.onUpdate&&o.onUpdate(h)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(M5e),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:c,layout:f,latestValues:h}=o;if(!(!s||!c||!f)){if(this!==o&&this.layout&&f&&Bre(this.options.animationType,this.layout.layoutBox,f.layoutBox)){c=this.target||Rn();const d=xr(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+d;const m=xr(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+m}Yi(s,c),_b(s,h),Kp(this.projectionDeltaWithTransform,this.layoutCorrected,s,h)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new O5e),this.sharedNodes.get(o).add(s);const f=s.options.initialPromotionConfig;s.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var s;const{layoutId:o}=this.options;return o?((s=this.getStack())==null?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:o}=this.options;return o?(s=this.getStack())==null?void 0:s.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:c}={}){const f=this.getStack();f&&f.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(s=!0),!s)return;const f={};c.z&&PO("z",o,f,this.animationValues);for(let h=0;h<RO.length;h++)PO(`rotate${RO[h]}`,o,f,this.animationValues),PO(`skew${RO[h]}`,o,f,this.animationValues);o.render();for(const h in f)o.setStaticValue(h,f[h]),this.animationValues&&(this.animationValues[h]=f[h]);o.scheduleRender()}applyProjectionStyles(o,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Eb(s==null?void 0:s.pointerEvents)||"",o.transform=c?c(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=Eb(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!dc(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const h=f.animationValues||f.latestValues;this.applyTransformsToTarget();let d=w5e(this.projectionDeltaWithTransform,this.treeScale,h);c&&(d=c(h,d)),o.transform=d;const{x:m,y:v}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${v.origin*100}% 0`,f.animationValues?o.opacity=f===this?h.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:o.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const x in NP){if(h[x]===void 0)continue;const{correct:w,applyTo:b,isCSSVariable:S}=NP[x],E=d==="none"?h[x]:w(h[x],f);if(b){const _=b.length;for(let A=0;A<_;A++)o[b[A]]=E}else S?this.options.visualElement.renderState.vars[x]=E:o[x]=E}this.options.layoutId&&(o.pointerEvents=f===this?Eb(s==null?void 0:s.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var s;return(s=o.currentAnimation)==null?void 0:s.stop()}),this.root.nodes.forEach(cG),this.root.sharedNodes.clear()}}}function P5e(e){e.updateLayout()}function k5e(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")Ca(d=>{const m=o?t.measuredBox[d]:t.layoutBox[d],v=xr(m);m.min=r[d].min,m.max=m.min+v});else if(a==="x"||a==="y"){const d=a==="x"?"y":"x";OP(o?t.measuredBox[d]:t.layoutBox[d],r[d])}else Bre(a,t.layoutBox,r)&&Ca(d=>{const m=o?t.measuredBox[d]:t.layoutBox[d],v=xr(r[d]);m.max=m.min+v,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+v)});const s=Ef();Kp(s,r,t.layoutBox);const c=Ef();o?Kp(c,e.applyTransform(i,!0),t.measuredBox):Kp(c,r,t.layoutBox);const f=!Pre(s);let h=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:m,layout:v}=d;if(m&&v){const x=e.options.layoutAnchor||void 0,w=Rn();w0(w,t.layoutBox,m.layoutBox,x);const b=Rn();w0(b,r,v.layoutBox,x),kre(w,b)||(h=!0),d.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=w,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:s,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function D5e(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 I5e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function L5e(e){e.clearSnapshot()}function cG(e){e.clearMeasurements()}function $5e(e){e.isLayoutDirty=!0,e.updateLayout()}function uG(e){e.isLayoutDirty=!1}function B5e(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function q5e(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function fG(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function z5e(e){e.resolveTargetDelta()}function F5e(e){e.calcProjection()}function V5e(e){e.resetSkewAndRotation()}function U5e(e){e.removeLeadSnapshot()}function dG(e,t,n){e.translate=Bt(t.translate,0,n),e.scale=Bt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function hG(e,t,n,r){e.min=Bt(t.min,n.min,r),e.max=Bt(t.max,n.max,r)}function H5e(e,t,n,r){hG(e.x,t.x,n.x,r),hG(e.y,t.y,n.y,r)}function G5e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const K5e={duration:.45,ease:[.4,0,.1,1]},pG=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),mG=pG("applewebkit/")&&!pG("chrome/")?Math.round:Di;function gG(e){e.min=mG(e.min),e.max=mG(e.max)}function W5e(e){gG(e.x),gG(e.y)}function Bre(e,t,n){return e==="position"||e==="preserve-aspect"&&!m5e(iG(t),iG(n),.2)}function Y5e(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const X5e=$re({attachResizeListener:(e,t)=>ig(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}),kO={current:void 0},qre=$re({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!kO.current){const e=new X5e({});e.mount(window),e.setOptions({layoutScroll:!0}),kO.current=e}return kO.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),RD=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function vG(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Q5e(...e){return t=>{let n=!1;const r=e.map(i=>{const a=vG(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():vG(e[i],null)}}}}function Z5e(...e){return j.useCallback(Q5e(...e),e)}class J5e extends j.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(bb(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=bb(r)&&r.offsetWidth||0,a=bb(r)&&r.offsetHeight||0,o=getComputedStyle(n),s=this.props.sizeRef.current;s.height=parseFloat(o.height),s.width=parseFloat(o.width),s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left,s.bottom=a-s.height-s.top,s.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function eze({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){var m;const o=j.useId(),s=j.useRef(null),c=j.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:f}=j.useContext(RD),h=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),d=Z5e(s,h);return j.useInsertionEffect(()=>{const{width:v,height:x,top:w,left:b,right:S,bottom:E,direction:_}=c.current;if(t||a===!1||!s.current||!v||!x)return;const A=_==="rtl",C=n==="left"?A?`right: ${S}`:`left: ${b}`:A?`left: ${b}`:`right: ${S}`,N=r==="bottom"?`bottom: ${E}`:`top: ${w}`;s.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(`
502
+ [data-motion-pop-id="${o}"] {
503
+ position: absolute !important;
504
+ width: ${v}px !important;
505
+ height: ${x}px !important;
506
+ ${C}px !important;
507
+ ${N}px !important;
508
+ }
509
+ `),()=>{var P;(P=s.current)==null||P.removeAttribute("data-motion-pop-id"),R.contains(M)&&R.removeChild(M)}},[t]),g.jsx(J5e,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:j.cloneElement(e,{ref:d})})}const tze=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:f})=>{const h=lD(nze),d=j.useId();let m=!0,v=j.useMemo(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:x=>{h.set(x,!0);for(const w of h.values())if(!w)return;r&&r()},register:x=>(h.set(x,!1),()=>h.delete(x))}),[n,h,r]);return a&&m&&(v={...v}),j.useMemo(()=>{h.forEach((x,w)=>h.set(w,!1))},[n]),j.useEffect(()=>{!n&&!h.size&&r&&r()},[n]),e=g.jsx(eze,{pop:o==="popLayout",isPresent:n,anchorX:s,anchorY:c,root:f,children:e}),g.jsx(r1.Provider,{value:v,children:e})};function nze(){return new Map}function zre(e=!0){const t=j.useContext(r1);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=j.useId();j.useEffect(()=>{if(e)return i(a)},[e]);const o=j.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const tb=e=>e.key||"";function yG(e){const t=[];return j.Children.forEach(e,n=>{j.isValidElement(n)&&t.push(n)}),t}const rze=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:s="left",anchorY:c="top",root:f})=>{const[h,d]=zre(o),m=j.useMemo(()=>yG(e),[e]),v=o&&!h?[]:m.map(tb),x=j.useRef(!0),w=j.useRef(m),b=lD(()=>new Map),S=j.useRef(new Set),[E,_]=j.useState(m),[A,C]=j.useState(m);mne(()=>{x.current=!1,w.current=m;for(let R=0;R<A.length;R++){const P=tb(A[R]);v.includes(P)?(b.delete(P),S.current.delete(P)):b.get(P)!==!0&&b.set(P,!1)}},[A,v.length,v.join("-")]);const N=[];if(m!==E){let R=[...m];for(let P=0;P<A.length;P++){const $=A[P],L=tb($);v.includes(L)||(R.splice(P,0,$),N.push($))}return a==="wait"&&N.length&&(R=N),C(yG(R)),_(m),null}const{forceRender:M}=j.useContext(sD);return g.jsx(g.Fragment,{children:A.map(R=>{const P=tb(R),$=o&&!h?!1:m===A||v.includes(P),L=()=>{if(S.current.has(P))return;if(b.has(P))S.current.add(P),b.set(P,!0);else return;let D=!0;b.forEach(F=>{F||(D=!1)}),D&&(M==null||M(),C(w.current),o&&(d==null||d()),r&&r())};return g.jsx(tze,{isPresent:$,initial:!x.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:f,onExitComplete:$?void 0:L,anchorX:s,anchorY:c,children:R},P)})})},Fre=j.createContext({strict:!1}),bG={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 xG=!1;function ize(){if(xG)return;const e={};for(const t in bG)e[t]={isEnabled:n=>bG[t].some(r=>!!n[r])};vre(e),xG=!0}function Vre(){return ize(),zqe()}function aze(e){const t=Vre();for(const n in e)t[n]={...t[n],...e[n]};vre(t)}const oze=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 S0(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||oze.has(e)}let Ure=e=>!S0(e);function sze(e){typeof e=="function"&&(Ure=t=>t.startsWith("on")?!S0(t):e(t))}try{sze(require("@emotion/is-prop-valid").default)}catch{}function lze(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||er(e[i])||(Ure(i)||n===!0&&S0(i)||!t&&!S0(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const s1=j.createContext({});function cze(e,t){if(o1(e)){const{initial:n,animate:r}=e;return{initial:n===!1||rg(n)?n:void 0,animate:rg(r)?r:void 0}}return e.inherit!==!1?t:{}}function uze(e){const{initial:t,animate:n}=cze(e,j.useContext(s1));return j.useMemo(()=>({initial:t,animate:n}),[wG(t),wG(n)])}function wG(e){return Array.isArray(e)?e.join(" "):e}const PD=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Hre(e,t,n){for(const r in t)!er(t[r])&&!Ere(r,n)&&(e[r]=t[r])}function fze({transformTemplate:e},t){return j.useMemo(()=>{const n=PD();return OD(n,t,e),Object.assign({},n.vars,n.style)},[t])}function dze(e,t){const n=e.style||{},r={};return Hre(r,n,e),Object.assign(r,fze(e,t)),r}function hze(e,t){const n={},r=dze(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 Gre=()=>({...PD(),attrs:{}});function pze(e,t,n,r){const i=j.useMemo(()=>{const a=Gre();return Are(a,t,Tre(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Hre(a,e.style,e),i.style={...a,...i.style}}return i}const mze=["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 kD(e){return typeof e!="string"||e.includes("-")?!1:!!(mze.indexOf(e)>-1||/[A-Z]/u.test(e))}function gze(e,t,n,{latestValues:r},i,a=!1,o){const c=(o??kD(e)?pze:hze)(t,r,i,e),f=lze(t,typeof e=="string",a),h=e!==j.Fragment?{...f,...c,ref:n}:{},{children:d}=t,m=j.useMemo(()=>er(d)?d.get():d,[d]);return j.createElement(e,{...h,children:m})}function vze({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:yze(n,r,i,e),renderState:t()}}function yze(e,t,n,r){const i={},a=r(e,{});for(const m in a)i[m]=Eb(a[m]);let{initial:o,animate:s}=e;const c=o1(e),f=mre(e);t&&f&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let h=n?n.initial===!1:!1;h=h||o===!1;const d=h?s:o;if(d&&typeof d!="boolean"&&!a1(d)){const m=Array.isArray(d)?d:[d];for(let v=0;v<m.length;v++){const x=_D(e,m[v]);if(x){const{transitionEnd:w,transition:b,...S}=x;for(const E in S){let _=S[E];if(Array.isArray(_)){const A=h?_.length-1:0;_=_[A]}_!==null&&(i[E]=_)}for(const E in w)i[E]=w[E]}}}return i}const Kre=e=>(t,n)=>{const r=j.useContext(s1),i=j.useContext(r1),a=()=>vze(e,t,r,i);return n?a():lD(a)},bze=Kre({scrapeMotionValuesFromProps:MD,createRenderState:PD}),xze=Kre({scrapeMotionValuesFromProps:jre,createRenderState:Gre}),wze=Symbol.for("motionComponentSymbol");function Sze(e,t,n){const r=j.useRef(n);j.useInsertionEffect(()=>{r.current=n});const i=j.useRef(null);return j.useCallback(a=>{var s;a&&((s=e.onMount)==null||s.call(e,a)),t&&(a?t.mount(a):t.unmount());const o=r.current;if(typeof o=="function")if(a){const c=o(a);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):o(a);else o&&(o.current=a)},[t])}const Wre=j.createContext({});function gf(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _ze(e,t,n,r,i,a){var _,A;const{visualElement:o}=j.useContext(s1),s=j.useContext(Fre),c=j.useContext(r1),f=j.useContext(RD),h=f.reducedMotion,d=f.skipAnimations,m=j.useRef(null),v=j.useRef(!1);r=r||s.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:h,skipAnimations:d,isSVG:a}),v.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const x=m.current,w=j.useContext(Wre);x&&!x.projection&&i&&(x.type==="html"||x.type==="svg")&&Eze(m.current,n,i,w);const b=j.useRef(!1);j.useInsertionEffect(()=>{x&&b.current&&x.update(n,c)});const S=n[rre],E=j.useRef(!!S&&typeof window<"u"&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,S))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,S)));return mne(()=>{v.current=!0,x&&(b.current=!0,window.MotionIsMounted=!0,x.updateFeatures(),x.scheduleRenderMicrotask(),E.current&&x.animationState&&x.animationState.animateChanges())}),j.useEffect(()=>{x&&(!E.current&&x.animationState&&x.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var C;(C=window.MotionHandoffMarkAsComplete)==null||C.call(window,S)}),E.current=!1),x.enteringChildren=void 0)}),x}function Eze(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:f,layoutAnchor:h,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Yre(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&gf(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:f,layoutAnchor:h})}function Yre(e){if(e)return e.options.allowProjection!==!1?e.projection:Yre(e.parent)}function DO(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&aze(r);const a=n?n==="svg":kD(e),o=a?xze:bze;function s(f,h){let d;const m={...j.useContext(RD),...f,layoutId:Aze(f)},{isStatic:v}=m,x=uze(f),w=o(f,v);if(!v&&typeof window<"u"){Cze();const b=Tze(m);d=b.MeasureLayout,x.visualElement=_ze(e,w,m,i,b.ProjectionNode,a)}return g.jsxs(s1.Provider,{value:x,children:[d&&x.visualElement?g.jsx(d,{visualElement:x.visualElement,...m}):null,gze(e,f,Sze(w,x.visualElement,h),w,v,t,a)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=j.forwardRef(s);return c[wze]=e,c}function Aze({layoutId:e}){const t=j.useContext(sD).id;return t&&e!==void 0?t+"-"+e:e}function Cze(e,t){j.useContext(Fre).strict}function Tze(e){const t=Vre(),{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 jze(e,t){if(typeof Proxy>"u")return DO;const n=new Map,r=(a,o)=>DO(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,DO(o,void 0,e,t)),n.get(o))})}const Nze=(e,t)=>t.isSVG??kD(e)?new i5e(t):new Zqe(t,{allowProjection:e!==j.Fragment});class Oze extends Ll{constructor(t){super(t),t.animationState||(t.animationState=c5e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();a1(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 Mze=0;class Rze extends Ll{constructor(){super(...arguments),this.id=Mze++,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:s}=this.node.getProps();if(typeof o=="string"||typeof o=="object"&&o!==null&&!Array.isArray(o)){const c=qc(this.node,o,s);if(c){const{transition:f,transitionEnd:h,...d}=c;for(const m in d)(a=this.node.getValue(m))==null||a.jump(d[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 Pze={animation:{Feature:Oze},exit:{Feature:Rze}};function Xg(e){return{point:{x:e.pageX,y:e.pageY}}}const kze=e=>t=>CD(t)&&e(t,Xg(t));function Wp(e,t,n,r){return ig(e,t,kze(n),r)}const Xre=({current:e})=>e?e.ownerDocument.defaultView:null,SG=(e,t)=>Math.abs(e-t);function Dze(e,t){const n=SG(e.x,t.x),r=SG(e.y,t.y);return Math.sqrt(n**2+r**2)}const _G=new Set(["auto","scroll"]);class Qre{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:s}={}){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=v=>{this.handleScroll(v.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=nb(this.lastRawMoveEventInfo,this.transformPagePoint));const v=IO(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,w=Dze(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!w)return;const{point:b}=v,{timestamp:S}=Zn;this.history.push({...b,timestamp:S});const{onStart:E,onMove:_}=this.handlers;x||(E&&E(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,v)},this.handlePointerMove=(v,x)=>{this.lastMoveEvent=v,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=nb(x,this.transformPagePoint),zt.update(this.updatePoint,!0)},this.handlePointerUp=(v,x)=>{this.end();const{onEnd:w,onSessionEnd:b,resumeAnimation:S}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=IO(v.type==="pointercancel"?this.lastMoveEventInfo:nb(x,this.transformPagePoint),this.history);this.startEvent&&w&&w(v,E),b&&b(v,E)},!CD(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const c=Xg(t),f=nb(c,this.transformPagePoint),{point:h}=f,{timestamp:d}=Zn;this.history=[{...h,timestamp:d}];const{onSessionStart:m}=n;m&&m(t,IO(f,this.history)),this.removeListeners=Kg(Wp(this.contextWindow,"pointermove",this.handlePointerMove),Wp(this.contextWindow,"pointerup",this.handlePointerUp),Wp(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(_G.has(r.overflowX)||_G.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),zt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ol(this.updatePoint)}}function nb(e,t){return t?{point:t(e.point)}:e}function EG(e,t){return{x:e.x-t.x,y:e.y-t.y}}function IO({point:e},t){return{point:e,delta:EG(e,Zre(t)),offset:EG(e,Ize(t)),velocity:Lze(t,.1)}}function Ize(e){return e[0]}function Zre(e){return e[e.length-1]}function Lze(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Zre(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>oi(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>oi(t)*2&&(r=e[1]);const a=Ri(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 $ze(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Bt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Bt(n,e,r.max):Math.min(e,n)),e}function AG(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 Bze(e,{top:t,left:n,bottom:r,right:i}){return{x:AG(e.x,n,i),y:AG(e.y,t,r)}}function CG(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 qze(e,t){return{x:CG(e.x,t.x),y:CG(e.y,t.y)}}function zze(e,t){let n=.5;const r=xr(e),i=xr(t);return i>r?n=tg(t.min,t.max-r,e.min):r>i&&(n=tg(e.min,e.max-i,t.min)),Ga(0,1,n)}function Fze(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 MP=.35;function Vze(e=MP){return e===!1?e=0:e===!0&&(e=MP),{x:TG(e,"left","right"),y:TG(e,"top","bottom")}}function TG(e,t,n){return{min:jG(e,t),max:jG(e,n)}}function jG(e,t){return typeof e=="number"?e:e[t]||0}const Uze=new WeakMap;class Hze{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=Rn(),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=d=>{n&&this.snapToCursor(Xg(d).point),this.stopAnimation()},o=(d,m)=>{const{drag:v,dragPropagation:x,onDragStart:w}=this.getProps();if(v&&!x&&(this.openDragLock&&this.openDragLock(),this.openDragLock=vqe(v),!this.openDragLock))return;this.latestPointerEvent=d,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),Ca(S=>{let E=this.getAxisMotionValue(S).get()||0;if(qa.test(E)){const{projection:_}=this.visualElement;if(_&&_.layout){const A=_.layout.layoutBox[S];A&&(E=xr(A)*(parseFloat(E)/100))}}this.originPoint[S]=E}),w&&zt.update(()=>w(d,m),!1,!0),wP(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},s=(d,m)=>{this.latestPointerEvent=d,this.latestPanInfo=m;const{dragPropagation:v,dragDirectionLock:x,onDirectionLock:w,onDrag:b}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:S}=m;if(x&&this.currentDirection===null){this.currentDirection=Kze(S),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,S),this.updateAxis("y",m.point,S),this.visualElement.render(),b&&zt.update(()=>b(d,m),!1,!0)},c=(d,m)=>{this.latestPointerEvent=d,this.latestPanInfo=m,this.stop(d,m),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:d}=this.getProps();(d||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:h}=this.getProps();this.panSession=new Qre(t,{onSessionStart:a,onStart:o,onMove:s,onSessionEnd:c,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:h,distanceThreshold:r,contextWindow:Xre(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:s}=this.getProps();s&&zt.postRender(()=>s(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||!rb(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=$ze(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&&gf(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Bze(r.layoutBox,t):this.constraints=!1,this.elastic=Vze(n),i!==this.constraints&&!gf(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Ca(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=Fze(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gf(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=Gqe(r,i.root,this.visualElement.getTransformPagePoint());let o=qze(i.layout.layoutBox,a);if(n){const s=n(Vqe(o));this.hasMutatedConstraints=!!s,s&&(o=bre(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c=this.constraints||{},f=Ca(h=>{if(!rb(h,n,this.currentDirection))return;let d=c&&c[h]||{};(o===!0||o===h)&&(d={min:0,max:0});const m=i?200:1e6,v=i?40:1e7,x={type:"inertia",velocity:r?t[h]:0,bounceStiffness:m,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(h,x)});return Promise.all(f).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return wP(this.visualElement,t),r.start(SD(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ca(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){Ca(n=>{const{drag:r}=this.getProps();if(!rb(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n],c=a.get()||0;a.set(t[n]-Bt(o,s,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!gf(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Ca(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const c=s.get();i[o]=zze({min:c,max:c},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(),Ca(o=>{if(!rb(o,t,null))return;const s=this.getAxisMotionValue(o),{min:c,max:f}=this.constraints[o];s.set(Bt(c,f,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Uze.set(this.visualElement,this);const t=this.visualElement.current,n=Wp(t,"pointerdown",f=>{const{drag:h,dragListener:d=!0}=this.getProps(),m=f.target,v=m!==t&&_qe(m);h&&d&&!v&&this.start(f)});let r;const i=()=>{const{dragConstraints:f}=this.getProps();gf(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),r||(r=Gze(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),zt.read(i);const s=ig(window,"resize",()=>this.scalePositionWithinConstraints()),c=a.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:h})=>{this.isDragging&&h&&(Ca(d=>{const m=this.getAxisMotionValue(d);m&&(this.originPoint[d]+=f[d].translate,m.set(m.get()+f[d].translate))}),this.visualElement.render())}));return()=>{s(),n(),o(),c&&c(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=MP,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function NG(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Gze(e,t,n){const r=I9(e,NG(n)),i=I9(t,NG(n));return()=>{r(),i()}}function rb(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Kze(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Wze extends Ll{constructor(t){super(t),this.removeGroupControls=Di,this.removeListeners=Di,this.controls=new Hze(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Di}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 LO=e=>(t,n)=>{e&&zt.update(()=>e(t,n),!1,!0)};class Yze extends Ll{constructor(){super(...arguments),this.removePointerDownListener=Di}onPointerDown(t){this.session=new Qre(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Xre(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:LO(t),onStart:LO(n),onMove:LO(r),onEnd:(a,o)=>{delete this.session,i&&zt.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=Wp(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 $O=!1;class Xze extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),$O&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ab.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}),$O=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||zt.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),AD.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;$O=!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 Jre(e){const[t,n]=zre(),r=j.useContext(sD);return g.jsx(Xze,{...e,layoutGroup:r,switchLayoutGroup:j.useContext(Wre),isPresent:t,safeToRemove:n})}const Qze={pan:{Feature:Yze},drag:{Feature:Wze,ProjectionNode:qre,MeasureLayout:Jre}};function OG(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&&zt.postRender(()=>a(t,Xg(t)))}class Zze extends Ll{mount(){const{current:t}=this.node;t&&(this.unmount=bqe(t,(n,r)=>(OG(this.node,r,"Start"),i=>OG(this.node,i,"End"))))}unmount(){}}class Jze extends Ll{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=Kg(ig(this.node.current,"focus",()=>this.onFocus()),ig(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function MG(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&&zt.postRender(()=>a(t,Xg(t)))}class eFe extends Ll{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=Aqe(t,(i,a)=>(MG(this.node,a,"Start"),(o,{success:s})=>MG(this.node,o,s?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const RP=new WeakMap,BO=new WeakMap,tFe=e=>{const t=RP.get(e.target);t&&t(e)},nFe=e=>{e.forEach(tFe)};function rFe({root:e,...t}){const n=e||document;BO.has(n)||BO.set(n,{});const r=BO.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(nFe,{root:e,...t})),r[i]}function iFe(e,t,n){const r=rFe(t);return RP.set(e,n),r.observe(e),()=>{RP.delete(e),r.unobserve(e)}}const aFe={some:0,all:1};class oFe extends Ll{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var c;(c=this.stopObserver)==null||c.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:aFe[i]},s=f=>{const{isIntersecting:h}=f;if(this.isInView===h||(this.isInView=h,a&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:d,onViewportLeave:m}=this.node.getProps(),v=h?d:m;v&&v(f)};this.stopObserver=iFe(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(sFe(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function sFe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const lFe={inView:{Feature:oFe},tap:{Feature:eFe},focus:{Feature:Jze},hover:{Feature:Zze}},cFe={layout:{ProjectionNode:qre,MeasureLayout:Jre}},uFe={...Pze,...lFe,...Qze,...cFe},RG=jze(uFe,Nze);function fFe({children:e,container:t}){const[n,r]=j.useState(!1);return j.useEffect(()=>(r(!0),()=>r(!1)),[]),n?uu.createPortal(e,t||document.body):null}function eie({selection:e,onClear:t,onRetry:n,onDelete:r,onPromote:i,isRetrying:a,isDeleting:o,isPromoting:s,className:c}){const f=a||o||s,h=e.some(x=>x.status==="failed"),d=e.some(x=>x.status==="delayed"),m=e.filter(x=>x.status==="failed").length,v=e.filter(x=>x.status==="delayed").length;return g.jsx(rze,{children:e.length>0&&g.jsx(fFe,{children:g.jsx(RG.div,{className:ge("fixed bottom-6 left-0 right-0 z-50 flex justify-center pointer-events-none",c),initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},transition:{duration:.2,ease:"easeOut"},children:g.jsxs("div",{className:"relative pointer-events-auto min-w-[400px] h-12",children:[g.jsx(RG.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}}),g.jsxs("div",{className:"relative h-12 flex items-center justify-between px-4",children:[g.jsxs("span",{className:"text-xs text-foreground",children:[e.length," selected"]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(it,{variant:"ghost",size:"sm",onClick:t,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:"Deselect all"}),i&&d||n&&h||r?g.jsx(K_,{className:"h-3 w-3 text-muted-foreground/50"}):null,i&&d&&g.jsxs(g.Fragment,{children:[g.jsxs(it,{variant:"ghost",size:"sm",onClick:i,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[s?g.jsx(Dc,{className:"mr-1 h-3 w-3 animate-spin"}):g.jsx(p2,{className:"mr-1 h-3 w-3"}),"Promote",v<e.length&&` (${v})`]}),n&&h||r?g.jsx(K_,{className:"h-3 w-3 text-muted-foreground/50"}):null]}),n&&h&&g.jsxs(g.Fragment,{children:[g.jsxs(it,{variant:"ghost",size:"sm",onClick:n,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[a?g.jsx(Dc,{className:"mr-1 h-3 w-3 animate-spin"}):g.jsx(h2,{className:"mr-1 h-3 w-3"}),"Retry",m<e.length&&` (${m})`]}),r?g.jsx(K_,{className:"h-3 w-3 text-muted-foreground/50"}):null]}),r&&g.jsxs(it,{variant:"ghost",size:"sm",onClick:r,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[o?g.jsx(Dc,{className:"mr-1 h-3 w-3 animate-spin"}):g.jsx(id,{className:"mr-1 h-3 w-3"}),"Delete"]})]})]})]})})})})}function _0(e,t){const n=j.useMemo(()=>dFe(e),[e]),r=j.useCallback((i,a)=>{t(i&&a?`${i}:${a}`:void 0)},[t]);return{currentSort:n,handleSort:r,sortString:e}}function Vn({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,s=()=>{a?o==="desc"?r(e,"asc"):r(void 0,void 0):r(e,"desc")};return g.jsxs("button",{type:"button",onClick:s,className:ge("flex items-center gap-1 text-left font-medium transition-colors hover:text-foreground",a?"text-foreground":"text-muted-foreground",i),children:[t,g.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center",children:a?o==="asc"?g.jsx(kK,{className:"h-3 w-3"}):g.jsx(PK,{className:"h-3 w-3"}):g.jsx(Yde,{className:"h-3 w-3 opacity-50"})})]})}function dFe(e){if(!e)return;const[t,n]=e.split(":");if(t)return{field:t,direction:n==="asc"?"asc":"desc"}}var PP=["Enter"," "],hFe=["ArrowDown","PageUp","Home"],tie=["ArrowUp","PageDown","End"],pFe=[...hFe,...tie],mFe={ltr:[...PP,"ArrowRight"],rtl:[...PP,"ArrowLeft"]},gFe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Qg="Menu",[ag,vFe,yFe]=T2(Qg),[yu,nie]=$i(Qg,[yFe,qd,rw]),l1=qd(),rie=rw(),[bFe,bu]=yu(Qg),[xFe,Zg]=yu(Qg),iie=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=l1(t),[c,f]=j.useState(null),h=j.useRef(!1),d=Fa(a),m=J0(i);return j.useEffect(()=>{const v=()=>{h.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>h.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),g.jsx(t2,{...s,children:g.jsx(bFe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:f,children:g.jsx(xFe,{scope:t,onClose:j.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:h,dir:m,modal:o,children:r})})})};iie.displayName=Qg;var wFe="MenuAnchor",DD=j.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=l1(n);return g.jsx(n2,{...i,...r,ref:t})});DD.displayName=wFe;var ID="MenuPortal",[SFe,aie]=yu(ID,{forceMount:void 0}),oie=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=bu(ID,t);return g.jsx(SFe,{scope:t,forceMount:n,children:g.jsx(di,{present:n||a.open,children:g.jsx(vg,{asChild:!0,container:i,children:r})})})};oie.displayName=ID;var Ii="MenuContent",[_Fe,LD]=yu(Ii),sie=j.forwardRef((e,t)=>{const n=aie(Ii,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=bu(Ii,e.__scopeMenu),o=Zg(Ii,e.__scopeMenu);return g.jsx(ag.Provider,{scope:e.__scopeMenu,children:g.jsx(di,{present:r||a.open,children:g.jsx(ag.Slot,{scope:e.__scopeMenu,children:o.modal?g.jsx(EFe,{...i,ref:t}):g.jsx(AFe,{...i,ref:t})})})})}),EFe=j.forwardRef((e,t)=>{const n=bu(Ii,e.__scopeMenu),r=j.useRef(null),i=yt(t,r);return j.useEffect(()=>{const a=r.current;if(a)return v2(a)},[]),g.jsx($D,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:je(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),AFe=j.forwardRef((e,t)=>{const n=bu(Ii,e.__scopeMenu);return g.jsx($D,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),CFe=Yf("MenuContent.ScrollLock"),$D=j.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:m,onDismiss:v,disableOutsideScroll:x,...w}=e,b=bu(Ii,n),S=Zg(Ii,n),E=l1(n),_=rie(n),A=vFe(n),[C,N]=j.useState(null),M=j.useRef(null),R=yt(t,M,b.onContentChange),P=j.useRef(0),$=j.useRef(""),L=j.useRef(0),D=j.useRef(null),F=j.useRef("right"),I=j.useRef(0),q=x?q0:j.Fragment,k=x?{as:CFe,allowPinchZoom:!0}:void 0,z=G=>{var ee,te;const Q=$.current+G,U=A().filter(ne=>!ne.disabled),V=document.activeElement,X=(ee=U.find(ne=>ne.ref.current===V))==null?void 0:ee.textValue,W=U.map(ne=>ne.textValue),K=$Fe(W,Q,X),J=(te=U.find(ne=>ne.textValue===K))==null?void 0:te.ref.current;(function ne(se){$.current=se,window.clearTimeout(P.current),se!==""&&(P.current=window.setTimeout(()=>ne(""),1e3))})(Q),J&&setTimeout(()=>J.focus())};j.useEffect(()=>()=>window.clearTimeout(P.current),[]),g2();const H=j.useCallback(G=>{var U,V;return F.current===((U=D.current)==null?void 0:U.side)&&qFe(G,(V=D.current)==null?void 0:V.area)},[]);return g.jsx(_Fe,{scope:n,searchRef:$,onItemEnter:j.useCallback(G=>{H(G)&&G.preventDefault()},[H]),onItemLeave:j.useCallback(G=>{var Q;H(G)||((Q=M.current)==null||Q.focus(),N(null))},[H]),onTriggerLeave:j.useCallback(G=>{H(G)&&G.preventDefault()},[H]),pointerGraceTimerRef:L,onPointerGraceIntentChange:j.useCallback(G=>{D.current=G},[]),children:g.jsx(q,{...k,children:g.jsx($0,{asChild:!0,trapped:i,onMountAutoFocus:je(a,G=>{var Q;G.preventDefault(),(Q=M.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:g.jsx(mg,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:f,onPointerDownOutside:h,onFocusOutside:d,onInteractOutside:m,onDismiss:v,children:g.jsx(dX,{asChild:!0,..._,dir:S.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:N,onEntryFocus:je(c,G=>{S.isUsingKeyboardRef.current||G.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(r2,{role:"menu","aria-orientation":"vertical","data-state":_ie(b.open),"data-radix-menu-content":"",dir:S.dir,...E,...w,ref:R,style:{outline:"none",...w.style},onKeyDown:je(w.onKeyDown,G=>{const U=G.target.closest("[data-radix-menu-content]")===G.currentTarget,V=G.ctrlKey||G.altKey||G.metaKey,X=G.key.length===1;U&&(G.key==="Tab"&&G.preventDefault(),!V&&X&&z(G.key));const W=M.current;if(G.target!==W||!pFe.includes(G.key))return;G.preventDefault();const J=A().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);tie.includes(G.key)&&J.reverse(),IFe(J)}),onBlur:je(e.onBlur,G=>{G.currentTarget.contains(G.target)||(window.clearTimeout(P.current),$.current="")}),onPointerMove:je(e.onPointerMove,og(G=>{const Q=G.target,U=I.current!==G.clientX;if(G.currentTarget.contains(Q)&&U){const V=G.clientX>I.current?"right":"left";F.current=V,I.current=G.clientX}}))})})})})})})});sie.displayName=Ii;var TFe="MenuGroup",BD=j.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Ue.div,{role:"group",...r,ref:t})});BD.displayName=TFe;var jFe="MenuLabel",lie=j.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Ue.div,{...r,ref:t})});lie.displayName=jFe;var E0="MenuItem",PG="menu.itemSelect",c1=j.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=j.useRef(null),o=Zg(E0,e.__scopeMenu),s=LD(E0,e.__scopeMenu),c=yt(t,a),f=j.useRef(!1),h=()=>{const d=a.current;if(!n&&d){const m=new CustomEvent(PG,{bubbles:!0,cancelable:!0});d.addEventListener(PG,v=>r==null?void 0:r(v),{once:!0}),B7(d,m),m.defaultPrevented?f.current=!1:o.onClose()}};return g.jsx(cie,{...i,ref:c,disabled:n,onClick:je(e.onClick,h),onPointerDown:d=>{var m;(m=e.onPointerDown)==null||m.call(e,d),f.current=!0},onPointerUp:je(e.onPointerUp,d=>{var m;f.current||(m=d.currentTarget)==null||m.click()}),onKeyDown:je(e.onKeyDown,d=>{const m=s.searchRef.current!=="";n||m&&d.key===" "||PP.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});c1.displayName=E0;var cie=j.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=LD(E0,n),s=rie(n),c=j.useRef(null),f=yt(t,c),[h,d]=j.useState(!1),[m,v]=j.useState("");return j.useEffect(()=>{const x=c.current;x&&v((x.textContent??"").trim())},[a.children]),g.jsx(ag.ItemSlot,{scope:n,disabled:r,textValue:i??m,children:g.jsx(hX,{asChild:!0,...s,focusable:!r,children:g.jsx(Ue.div,{role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:f,onPointerMove:je(e.onPointerMove,og(x=>{r?o.onItemLeave(x):(o.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:je(e.onPointerLeave,og(x=>o.onItemLeave(x))),onFocus:je(e.onFocus,()=>d(!0)),onBlur:je(e.onBlur,()=>d(!1))})})})}),NFe="MenuCheckboxItem",uie=j.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return g.jsx(mie,{scope:e.__scopeMenu,checked:n,children:g.jsx(c1,{role:"menuitemcheckbox","aria-checked":A0(n)?"mixed":n,...i,ref:t,"data-state":zD(n),onSelect:je(i.onSelect,()=>r==null?void 0:r(A0(n)?!0:!n),{checkForDefaultPrevented:!1})})})});uie.displayName=NFe;var fie="MenuRadioGroup",[OFe,MFe]=yu(fie,{value:void 0,onValueChange:()=>{}}),die=j.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=Fa(r);return g.jsx(OFe,{scope:e.__scopeMenu,value:n,onValueChange:a,children:g.jsx(BD,{...i,ref:t})})});die.displayName=fie;var hie="MenuRadioItem",pie=j.forwardRef((e,t)=>{const{value:n,...r}=e,i=MFe(hie,e.__scopeMenu),a=n===i.value;return g.jsx(mie,{scope:e.__scopeMenu,checked:a,children:g.jsx(c1,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":zD(a),onSelect:je(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});pie.displayName=hie;var qD="MenuItemIndicator",[mie,RFe]=yu(qD,{checked:!1}),gie=j.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=RFe(qD,n);return g.jsx(di,{present:r||A0(a.checked)||a.checked===!0,children:g.jsx(Ue.span,{...i,ref:t,"data-state":zD(a.checked)})})});gie.displayName=qD;var PFe="MenuSeparator",vie=j.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Ue.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});vie.displayName=PFe;var kFe="MenuArrow",yie=j.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=l1(n);return g.jsx(i2,{...i,...r,ref:t})});yie.displayName=kFe;var DFe="MenuSub",[CVe,bie]=yu(DFe),Ip="MenuSubTrigger",xie=j.forwardRef((e,t)=>{const n=bu(Ip,e.__scopeMenu),r=Zg(Ip,e.__scopeMenu),i=bie(Ip,e.__scopeMenu),a=LD(Ip,e.__scopeMenu),o=j.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,f={__scopeMenu:e.__scopeMenu},h=j.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return j.useEffect(()=>h,[h]),j.useEffect(()=>{const d=s.current;return()=>{window.clearTimeout(d),c(null)}},[s,c]),g.jsx(DD,{asChild:!0,...f,children:g.jsx(cie,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":_ie(n.open),...e,ref:za(t,i.onTriggerChange),onClick:d=>{var m;(m=e.onClick)==null||m.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:je(e.onPointerMove,og(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),h()},100))})),onPointerLeave:je(e.onPointerLeave,og(d=>{var v,x;h();const m=(v=n.content)==null?void 0:v.getBoundingClientRect();if(m){const w=(x=n.content)==null?void 0:x.dataset.side,b=w==="right",S=b?-5:5,E=m[b?"left":"right"],_=m[b?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+S,y:d.clientY},{x:E,y:m.top},{x:_,y:m.top},{x:_,y:m.bottom},{x:E,y:m.bottom}],side:w}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:je(e.onKeyDown,d=>{var v;const m=a.searchRef.current!=="";e.disabled||m&&d.key===" "||mFe[r.dir].includes(d.key)&&(n.onOpenChange(!0),(v=n.content)==null||v.focus(),d.preventDefault())})})})});xie.displayName=Ip;var wie="MenuSubContent",Sie=j.forwardRef((e,t)=>{const n=aie(Ii,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=bu(Ii,e.__scopeMenu),o=Zg(Ii,e.__scopeMenu),s=bie(wie,e.__scopeMenu),c=j.useRef(null),f=yt(t,c);return g.jsx(ag.Provider,{scope:e.__scopeMenu,children:g.jsx(di,{present:r||a.open,children:g.jsx(ag.Slot,{scope:e.__scopeMenu,children:g.jsx($D,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:f,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:h=>{var d;o.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),h.preventDefault()},onCloseAutoFocus:h=>h.preventDefault(),onFocusOutside:je(e.onFocusOutside,h=>{h.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:je(e.onEscapeKeyDown,h=>{o.onClose(),h.preventDefault()}),onKeyDown:je(e.onKeyDown,h=>{var v;const d=h.currentTarget.contains(h.target),m=gFe[o.dir].includes(h.key);d&&m&&(a.onOpenChange(!1),(v=s.trigger)==null||v.focus(),h.preventDefault())})})})})})});Sie.displayName=wie;function _ie(e){return e?"open":"closed"}function A0(e){return e==="indeterminate"}function zD(e){return A0(e)?"indeterminate":e?"checked":"unchecked"}function IFe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function LFe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function $Fe(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=LFe(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==n));const c=o.find(f=>f.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function BFe(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 s=t[a],c=t[o],f=s.x,h=s.y,d=c.x,m=c.y;h>r!=m>r&&n<(d-f)*(r-h)/(m-h)+f&&(i=!i)}return i}function qFe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return BFe(n,t)}function og(e){return t=>t.pointerType==="mouse"?e(t):void 0}var zFe=iie,FFe=DD,VFe=oie,UFe=sie,HFe=BD,GFe=lie,KFe=c1,WFe=uie,YFe=die,XFe=pie,QFe=gie,ZFe=vie,JFe=yie,e6e=xie,t6e=Sie,u1="DropdownMenu",[n6e]=$i(u1,[nie]),Sr=nie(),[r6e,Eie]=n6e(u1),Aie=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Sr(t),f=j.useRef(null),[h,d]=Vo({prop:i,defaultProp:a??!1,onChange:o,caller:u1});return g.jsx(r6e,{scope:t,triggerId:Hn(),triggerRef:f,contentId:Hn(),open:h,onOpenChange:d,onOpenToggle:j.useCallback(()=>d(m=>!m),[d]),modal:s,children:g.jsx(zFe,{...c,open:h,onOpenChange:d,dir:r,modal:s,children:n})})};Aie.displayName=u1;var Cie="DropdownMenuTrigger",Tie=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Eie(Cie,n),o=Sr(n);return g.jsx(FFe,{asChild:!0,...o,children:g.jsx(Ue.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:za(t,a.triggerRef),onPointerDown:je(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:je(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Tie.displayName=Cie;var i6e="DropdownMenuPortal",jie=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Sr(t);return g.jsx(VFe,{...r,...n})};jie.displayName=i6e;var Nie="DropdownMenuContent",Oie=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Eie(Nie,n),a=Sr(n),o=j.useRef(!1);return g.jsx(UFe,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:je(e.onCloseAutoFocus,s=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:je(e.onInteractOutside,s=>{const c=s.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0,h=c.button===2||f;(!i.modal||h)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Oie.displayName=Nie;var a6e="DropdownMenuGroup",o6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(HFe,{...i,...r,ref:t})});o6e.displayName=a6e;var s6e="DropdownMenuLabel",l6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(GFe,{...i,...r,ref:t})});l6e.displayName=s6e;var c6e="DropdownMenuItem",Mie=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(KFe,{...i,...r,ref:t})});Mie.displayName=c6e;var u6e="DropdownMenuCheckboxItem",f6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(WFe,{...i,...r,ref:t})});f6e.displayName=u6e;var d6e="DropdownMenuRadioGroup",h6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(YFe,{...i,...r,ref:t})});h6e.displayName=d6e;var p6e="DropdownMenuRadioItem",m6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(XFe,{...i,...r,ref:t})});m6e.displayName=p6e;var g6e="DropdownMenuItemIndicator",v6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(QFe,{...i,...r,ref:t})});v6e.displayName=g6e;var y6e="DropdownMenuSeparator",b6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(ZFe,{...i,...r,ref:t})});b6e.displayName=y6e;var x6e="DropdownMenuArrow",w6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(JFe,{...i,...r,ref:t})});w6e.displayName=x6e;var S6e="DropdownMenuSubTrigger",_6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(e6e,{...i,...r,ref:t})});_6e.displayName=S6e;var E6e="DropdownMenuSubContent",A6e=j.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Sr(n);return g.jsx(t6e,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});A6e.displayName=E6e;var C6e=Aie,T6e=Tie,j6e=jie,N6e=Oie,O6e=Mie;function Rie({...e}){return g.jsx(C6e,{"data-slot":"dropdown-menu",...e})}function Pie({...e}){return g.jsx(T6e,{"data-slot":"dropdown-menu-trigger",...e})}function kie({className:e,sideOffset:t=4,...n}){return g.jsx(j6e,{children:g.jsx(N6e,{"data-slot":"dropdown-menu-content",sideOffset:t,className:ge("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto border p-1 shadow-md",e),...n})})}function kP({className:e,inset:t,variant:n="default",...r}){return g.jsx(O6e,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:ge("focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}const Die=[{value:"all",label:"All"},{value:"active",label:"Active"},{value:"waiting",label:"Waiting"},{value:"waiting-children",label:"Waiting Children"},{value:"prioritized",label:"Prioritized"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"delayed",label:"Delayed"}],Iie=["all","active","failed"],M6e=Die.filter(e=>Iie.includes(e.value)),kG=Die.filter(e=>!Iie.includes(e.value));function R6e({value:e,onValueChange:t,className:n}){const r=kG.find(i=>i.value===e);return g.jsx(Mg,{value:e,onValueChange:i=>t(i),className:n,children:g.jsxs(Wd,{children:[M6e.map(i=>g.jsx(kr,{value:i.value,children:i.label},i.value)),g.jsxs(Rie,{children:[g.jsx(Pie,{asChild:!0,children:g.jsx("button",{type:"button","aria-label":r?`Status: ${r.label}`:"More statuses",className:ge("inline-flex h-full items-center justify-center whitespace-nowrap px-2 py-1 text-sm font-medium transition-all","focus-visible:outline-none",r&&"bg-background text-foreground shadow-sm"),children:r?g.jsx("span",{className:"max-w-[6.5rem] truncate px-1",children:r.label}):g.jsx(IK,{className:"h-4 w-4"})})}),g.jsx(kie,{align:"start",children:kG.map(i=>g.jsx(kP,{onSelect:()=>t(i.value),className:ge(e===i.value&&"bg-accent"),children:i.label},i.value))})]})]})})}var f1="Checkbox",[P6e]=$i(f1),[k6e,FD]=P6e(f1);function D6e(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:f,value:h="on",internal_do_not_use_render:d}=e,[m,v]=Vo({prop:n,defaultProp:i??!1,onChange:c,caller:f1}),[x,w]=j.useState(null),[b,S]=j.useState(null),E=j.useRef(!1),_=x?!!o||!!x.closest("form"):!0,A={checked:m,disabled:a,setChecked:v,control:x,setControl:w,name:s,form:o,value:h,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:Sl(i)?!1:i,isFormControl:_,bubbleInput:b,setBubbleInput:S};return g.jsx(k6e,{scope:t,...A,children:I6e(d)?d(A):r})}var Lie="CheckboxTrigger",$ie=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:a,value:o,disabled:s,checked:c,required:f,setControl:h,setChecked:d,hasConsumerStoppedPropagationRef:m,isFormControl:v,bubbleInput:x}=FD(Lie,e),w=yt(i,h),b=j.useRef(c);return j.useEffect(()=>{const S=a==null?void 0:a.form;if(S){const E=()=>d(b.current);return S.addEventListener("reset",E),()=>S.removeEventListener("reset",E)}},[a,d]),g.jsx(Ue.button,{type:"button",role:"checkbox","aria-checked":Sl(c)?"mixed":c,"aria-required":f,"data-state":Uie(c),"data-disabled":s?"":void 0,disabled:s,value:o,...r,ref:w,onKeyDown:je(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:je(n,S=>{d(E=>Sl(E)?!0:!E),x&&v&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})})});$ie.displayName=Lie;var Bie=j.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:f,form:h,...d}=e;return g.jsx(D6e,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:f,name:r,form:h,value:c,internal_do_not_use_render:({isFormControl:m})=>g.jsxs(g.Fragment,{children:[g.jsx($ie,{...d,ref:t,__scopeCheckbox:n}),m&&g.jsx(Vie,{__scopeCheckbox:n})]})})});Bie.displayName=f1;var qie="CheckboxIndicator",zie=j.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=FD(qie,n);return g.jsx(di,{present:r||Sl(a.checked)||a.checked===!0,children:g.jsx(Ue.span,{"data-state":Uie(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});zie.displayName=qie;var Fie="CheckboxBubbleInput",Vie=j.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:f,value:h,form:d,bubbleInput:m,setBubbleInput:v}=FD(Fie,e),x=yt(n,v),w=_Y(a),b=eK(r);j.useEffect(()=>{const E=m;if(!E)return;const _=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(_,"checked").set,N=!i.current;if(w!==a&&C){const M=new Event("click",{bubbles:N});E.indeterminate=Sl(a),C.call(E,Sl(a)?!1:a),E.dispatchEvent(M)}},[m,w,a,i]);const S=j.useRef(Sl(a)?!1:a);return g.jsx(Ue.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??S.current,required:s,disabled:c,name:f,value:h,form:d,...t,tabIndex:-1,ref:x,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Vie.displayName=Fie;function I6e(e){return typeof e=="function"}function Sl(e){return e==="indeterminate"}function Uie(e){return Sl(e)?"indeterminate":e?"checked":"unchecked"}function d1({className:e,indeterminate:t,checked:n,...r}){return g.jsx(Bie,{"data-slot":"checkbox",checked:t?"indeterminate":n,className:ge("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:g.jsx(zie,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:t?g.jsx($K,{className:"size-3.5"}):g.jsx(Vd,{className:"size-3.5"})})})}function L6e({queueName:e,readonly:t,search:n,onSearchChange:r,onJobSelect:i}){var ne;nn();const[a,o]=j.useState(null),[s,c]=j.useState("0"),f=mme(),[h,d]=j.useState(new Map),{data:m=[]}=S2(),v=m.find(se=>se.name===e),x=(v==null?void 0:v.isPaused)??!1,w=gme(),b=vme(),S=w.isPending||b.isPending,E=()=>{x?b.mutate(e):w.mutate(e)},_=LW(),A=$W(),C=BW(),N=n.status==="all"?void 0:n.status,{currentSort:M,handleSort:R}=_0(n.sort,se=>r({...n,sort:se})),{data:P,isLoading:$,error:L,fetchNextPage:D,hasNextPage:F,isFetchingNextPage:I,isRefetching:q}=rme(e,N,n.sort),k=j.useMemo(()=>(P==null?void 0:P.pages.flatMap(se=>se.data))??[],[P]);(ne=P==null?void 0:P.pages[0])==null||ne.total;const z=_2(),H=se=>{r({...n,status:se})};$||q||z.isPending;const G=se=>h.has(se),Q=se=>{d(ce=>{const oe=new Map(ce);return oe.has(se.id)?oe.delete(se.id):oe.set(se.id,{queueName:e,jobId:se.id,status:se.status}),oe})},U=()=>{const se=new Map;for(const ce of k)se.set(ce.id,{queueName:e,jobId:ce.id,status:ce.status});d(se)},V=()=>d(new Map),X=k.length>0&&h.size===k.length,W=h.size>0&&h.size<k.length,K=async()=>{const se=Array.from(h.values()).filter(ce=>ce.status==="failed");se.length>0&&await _.mutateAsync({jobs:se}),V()},J=async()=>{const se=Array.from(h.values());await A.mutateAsync({jobs:se}),V()},ee=async()=>{const se=Array.from(h.values()).filter(ce=>ce.status==="delayed");se.length>0&&await C.mutateAsync({jobs:se}),V()},te=async()=>{if(!a)return;const se=Number.parseInt(s,10);try{const ce=await f.mutateAsync({queueName:e,status:a,grace:Number.isNaN(se)?0:se});$p.success(`Removed ${ce.removed.toLocaleString()} ${a} job${ce.removed===1?"":"s"}`),o(null)}catch(ce){$p.error(ce instanceof Error?ce.message:"Clean failed")}};return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(R6e,{value:n.status||"all",onValueChange:H}),x&&g.jsx(Un,{variant:"secondary",className:"bg-amber-500/10 text-amber-600",children:"Paused"})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[!t&&g.jsxs(Rie,{children:[g.jsx(Pie,{asChild:!0,children:g.jsxs(it,{variant:"outline",size:"sm",children:[g.jsx(IK,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Queue actions"})]})}),g.jsxs(kie,{align:"end",children:[g.jsxs(kP,{onSelect:()=>o("completed"),children:[g.jsx(id,{className:"mr-2 h-4 w-4"}),"Clean completed"]}),g.jsxs(kP,{onSelect:()=>o("failed"),children:[g.jsx(id,{className:"mr-2 h-4 w-4"}),"Clean failed"]})]})]}),g.jsx(it,{variant:x?"default":"outline",size:"sm",onClick:E,disabled:S,children:x?g.jsxs(g.Fragment,{children:[g.jsx(om,{className:"mr-2 h-4 w-4"}),"Resume"]}):g.jsxs(g.Fragment,{children:[g.jsx(qK,{className:"mr-2 h-4 w-4"}),"Pause"]})})]})]}),$&&k.length===0?g.jsxs(g.Fragment,{children:[g.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:[g.jsx("div",{className:"col-span-5",children:"Job"}),g.jsx("div",{className:"col-span-2",children:"Status"}),g.jsx("div",{className:"col-span-2",children:"Queued"}),g.jsx("div",{className:"col-span-2",children:"Started"}),g.jsx("div",{className:"col-span-1"})]}),g.jsx("div",{className:"divide-y divide-border/50",children:[...Array(15)].map((se,ce)=>g.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[g.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[g.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),g.jsxs("div",{className:"space-y-1.5",children:[g.jsx("div",{className:"h-4 w-28 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-3 w-20 animate-pulse rounded bg-muted"})]})]}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),g.jsx("div",{className:"col-span-1 flex justify-end",children:g.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"})})]},ce.toString()))})]}):L?g.jsx(pr,{icon:Uc,title:"Failed to load jobs",description:L.message}):k.length===0?g.jsx(pr,{icon:Uc,title:"No jobs found",description:N?`No ${N} jobs in this queue`:"This queue is empty"}):g.jsxs(g.Fragment,{children:[g.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:[g.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[g.jsx(d1,{checked:X,indeterminate:W,onCheckedChange:se=>{se?U():V()}}),g.jsx(Vn,{field:"name",label:"Job",currentSort:M,onSort:R})]}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"status",label:"Status",currentSort:M,onSort:R})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"timestamp",label:"Queued",currentSort:M,onSort:R})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"processedOn",label:"Started",currentSort:M,onSort:R})}),g.jsx("div",{className:"col-span-1"})]}),g.jsx("div",{className:"divide-y divide-border/50",children:k.map(se=>g.jsx($6e,{job:se,selected:G(se.id),onSelect:()=>Q(se),onClick:()=>i(se.id)},se.id))}),F&&g.jsx("div",{className:"flex justify-center pt-4",children:g.jsx(it,{variant:"outline",onClick:()=>D(),disabled:I,children:I?g.jsxs(g.Fragment,{children:[g.jsx(L0,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):"Load more"})}),g.jsx("div",{className:"flex items-center justify-between pt-2 text-sm text-muted-foreground",children:g.jsxs("span",{children:["Showing ",k.length," jobs"]})})]}),g.jsx(eie,{selection:Array.from(h.values()),onClear:V,onRetry:K,onDelete:J,onPromote:ee,isRetrying:_.isPending,isDeleting:A.isPending,isPromoting:C.isPending}),g.jsx(EM,{open:a!=null,onOpenChange:se=>{se||o(null)},children:g.jsxs(Kb,{children:[g.jsxs(Wb,{children:[g.jsxs(Xb,{children:["Clean ",a," jobs?"]}),g.jsxs(C2,{children:["Permanently remove ",a," jobs from"," ",g.jsx("span",{className:"font-mono",children:e}),". This cannot be undone."]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("span",{className:"text-sm font-medium",children:"Grace period (ms)"}),g.jsx(ra,{type:"number",min:0,value:s,onChange:se=>c(se.target.value),placeholder:"0"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Only remove jobs finished at least this many milliseconds ago."})]}),g.jsxs(Yb,{children:[g.jsx(Zb,{disabled:f.isPending,children:"Cancel"}),g.jsx(Qb,{disabled:f.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:se=>{se.preventDefault(),te()},children:f.isPending?"Cleaning...":"Clean jobs"})]})]})})]})}function $6e({job:e,selected:t,onSelect:n,onClick:r}){const i=a=>{a.stopPropagation(),n()};return g.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:[g.jsxs("div",{className:"col-span-5 flex min-w-0 items-center gap-3",children:[g.jsx("div",{onClick:i,onKeyDown:a=>a.stopPropagation(),children:g.jsx(d1,{checked:t})}),g.jsx(Uc,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"truncate font-medium",children:e.name}),g.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:Lp(e.id,24)})]})]}),g.jsx("div",{className:"col-span-2",children:g.jsx(Fg,{status:e.status,duration:e.duration})}),g.jsx("div",{className:"col-span-2 text-muted-foreground",children:g.jsx(eu,{timestamp:e.timestamp})}),g.jsx("div",{className:"col-span-2 text-muted-foreground",children:e.processedOn?g.jsx(eu,{timestamp:e.processedOn}):g.jsx("span",{children:"-"})}),g.jsx("div",{className:"col-span-1 flex justify-end",children:g.jsx(rd,{className:"h-4 w-4 text-muted-foreground"})})]})}function B6e({search:e,onSearchChange:t,onJobSelect:n,onQueueSelect:r}){nn();const[i,a]=j.useState(new Map),o=LW(),s=$W(),c=BW(),{currentSort:f,handleSort:h}=_0(e.sort,K=>t({...e,sort:K})),d=j.useMemo(()=>E2(e.q??""),[e.q]),m=j.useMemo(()=>{if(e.from&&e.to)return{start:e.from,end:e.to}},[e.from,e.to]),v=j.useMemo(()=>{const K=e.status??"all";if(K!=="all"||Object.keys(d.tags).length>0||d.text||m)return{status:K!=="all"?K:void 0,tags:Object.keys(d.tags).length>0?d.tags:void 0,text:d.text||void 0,timeRange:m}},[e.status,d,m]),{data:x,isLoading:w,error:b,fetchNextPage:S,hasNextPage:E,isFetchingNextPage:_,isRefetching:A}=ome(e.sort,v),C=j.useMemo(()=>(x==null?void 0:x.pages.flatMap(K=>K.data))??[],[x]),N=C,M=(K,J)=>{t({...e,q:K||void 0,status:J??e.status})},R=K=>{t({...e,from:K==null?void 0:K.start,to:K==null?void 0:K.end})},P=_2();w||A||P.isPending;const $=(K,J)=>`${K}:${J}`,L=(K,J)=>i.has($(K,J)),D=K=>{const J=$(K.queueName,K.id);a(ee=>{const te=new Map(ee);return te.has(J)?te.delete(J):te.set(J,{queueName:K.queueName,jobId:K.id,status:K.status}),te})},F=()=>{const K=new Map;for(const J of N){const ee=$(J.queueName,J.id);K.set(ee,{queueName:J.queueName,jobId:J.id,status:J.status})}a(K)},I=()=>a(new Map),q=N.length>0&&i.size===N.length,k=i.size>0&&i.size<N.length,z=async()=>{const K=Array.from(i.values()).filter(J=>J.status==="failed");K.length>0&&await o.mutateAsync({jobs:K}),I()},H=async()=>{const K=Array.from(i.values());await s.mutateAsync({jobs:K}),I()},G=async()=>{const K=Array.from(i.values()).filter(J=>J.status==="delayed");K.length>0&&await c.mutateAsync({jobs:K}),I()},{data:Q}=nme(),U=j.useMemo(()=>{if(!Q){const J=Date.now(),ee=14400*1e3,te=new Date(J);return te.setHours(0,0,0,0),te.setDate(te.getDate()-6),{buckets:[],startTime:te.getTime(),endTime:J,bucketSize:ee}}return{buckets:Q.buckets.map(J=>{const ee=new Date(J.time);return{time:J.time,label:ee.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric",hour:"numeric"}),dayLabel:ee.toLocaleDateString([],{weekday:"short"}),success:J.completed,error:J.failed}}),startTime:Q.startTime,endTime:Q.endTime,bucketSize:Q.bucketSize}},[Q]),V=(Q==null?void 0:Q.totalCompleted)??0,X=(Q==null?void 0:Q.totalFailed)??0,W=j.useRef(null);return j.useEffect(()=>{const K=W.current;if(!K||!E)return;const J=new IntersectionObserver(ee=>{ee[0].isIntersecting&&E&&!_&&S()},{rootMargin:"100px"});return J.observe(K),()=>J.disconnect()},[E,_,S]),g.jsxs("div",{className:"h-full overflow-auto",children:[g.jsx("div",{className:"py-4",children:g.jsx(z6e,{data:U,selection:m??null,onSelectionChange:R,totalSuccess:V,totalError:X})}),g.jsxs("div",{className:"sticky top-0 z-20 bg-background",children:[g.jsx("div",{className:"border-b border-dashed pb-3",children:g.jsx(Ime,{value:e.q??"",status:e.status,onChange:M})}),g.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:[g.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[g.jsx(d1,{checked:q,indeterminate:k,onCheckedChange:K=>{K?F():I()}}),g.jsx(Vn,{field:"name",label:"Job",currentSort:f,onSort:h})]}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"queueName",label:"Queue",currentSort:f,onSort:h})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"status",label:"Status",currentSort:f,onSort:h})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"timestamp",label:"Time",currentSort:f,onSort:h})}),g.jsx("div",{className:"col-span-1",children:g.jsx(Vn,{field:"duration",label:"Duration",currentSort:f,onSort:h})})]})]}),w&&C.length===0?g.jsx("div",{className:"divide-y divide-border/50",children:[...Array(15)].map((K,J)=>g.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[g.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[g.jsx("div",{className:"h-4 w-4 animate-pulse bg-muted"}),g.jsx("div",{className:"h-2 w-2 animate-pulse bg-muted"}),g.jsx("div",{className:"h-4 w-32 animate-pulse bg-muted"})]}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-4 w-16 animate-pulse bg-muted"})}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-4 w-24 animate-pulse bg-muted"})}),g.jsx("div",{className:"col-span-1",children:g.jsx("div",{className:"h-4 w-12 animate-pulse bg-muted"})})]},J.toString()))}):b?g.jsx("div",{className:"flex h-64 items-center justify-center",children:g.jsx(pr,{icon:Uc,title:"Failed to load runs",description:b.message})}):N.length===0?g.jsx("div",{className:"flex h-64 items-center justify-center",children:g.jsx(pr,{icon:Uc,title:"No runs found",description:d.text?`No results for "${d.text}"`:e.status&&e.status!=="all"?`No ${e.status} runs`:"No job runs yet"})}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"divide-y divide-border/50",children:N.map(K=>g.jsx(q6e,{run:K,selected:L(K.queueName,K.id),onSelect:()=>D(K),onClick:()=>n(K.queueName,K.id),onQueueClick:r},`${K.queueName}-${K.id}`))}),E&&g.jsx("div",{ref:W,className:"flex items-center justify-center py-4",children:_&&g.jsx(L0,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),g.jsxs("div",{className:"px-6 py-3 text-xs text-muted-foreground",children:["Showing ",N.length," runs"]})]}),g.jsx(eie,{selection:Array.from(i.values()),onClear:I,onRetry:z,onDelete:H,onPromote:G,isRetrying:o.isPending,isDeleting:s.isPending,isPromoting:c.isPending})]})}function q6e({run:e,selected:t,onSelect:n,onClick:r,onQueueClick:i}){const a=e.tags&&Object.keys(e.tags).length>0,o=c=>{c.stopPropagation(),n()},s=c=>{c.stopPropagation(),i(e.queueName)};return g.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:[g.jsxs("div",{className:"col-span-5 flex min-w-0 items-center gap-3",children:[g.jsx("div",{onClick:o,onKeyDown:c=>c.stopPropagation(),children:g.jsx(d1,{checked:t})}),g.jsx(iCe,{status:e.status}),g.jsxs("div",{className:"min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"truncate font-medium",children:e.name}),a&&g.jsxs("div",{className:"flex items-center gap-1",children:[Object.entries(e.tags).slice(0,2).map(([c,f])=>g.jsxs(bg,{children:[g.jsx(xg,{asChild:!0,children:g.jsxs("span",{className:"inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:[c,":",Lp(String(f),8)]})}),g.jsx(Fd,{children:g.jsxs("span",{className:"font-mono",children:[c,": ",String(f)]})})]},c)),Object.keys(e.tags).length>2&&g.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",Object.keys(e.tags).length-2]})]})]}),g.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:Lp(e.id,24)}),e.status==="failed"&&e.failedReason&&g.jsx("div",{className:"truncate text-xs text-status-error",title:e.failedReason,children:Lp(e.failedReason,80)})]})]}),g.jsx("div",{className:"col-span-2",children:g.jsx("button",{type:"button",onClick:s,className:"truncate font-mono text-xs text-primary hover:underline",children:e.queueName})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Fg,{status:e.status})}),g.jsx("div",{className:"col-span-2 text-muted-foreground",children:e.processedOn?g.jsx(eu,{timestamp:e.processedOn}):g.jsx(eu,{timestamp:e.timestamp})}),g.jsxs("div",{className:"col-span-1 flex items-center justify-between",children:[g.jsx("span",{className:"font-mono text-muted-foreground",children:e.duration?Lr(e.duration):"-"}),g.jsx(rd,{className:"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})]})}function z6e({data:e,selection:t,onSelectionChange:n,totalSuccess:r,totalError:i}){const a=j.useRef(null),[o,s]=j.useState(!1),[c,f]=j.useState(null),[h,d]=j.useState(null),m=Math.max(...e.buckets.map(A=>A.success+A.error),1),v=A=>{if(!a.current)return e.startTime;const C=a.current.getBoundingClientRect(),M=Math.max(0,Math.min(A-C.left,C.width))/C.width;return e.startTime+M*(e.endTime-e.startTime)},x=A=>{if(A.button!==0)return;const C=v(A.clientX);s(!0),f(C),d(C)},w=A=>{if(!o||c===null)return;const C=v(A.clientX);d(C)},b=()=>{if(o&&c!==null&&h!==null){const A=Math.min(c,h),C=Math.max(c,h);C-A>1e3&&n({start:A,end:C})}s(!1),f(null),d(null)},S=()=>{o&&b()},E=A=>{const C=new Date(A),N=new Date;return C.toDateString()===N.toDateString()?"Today":C.toLocaleDateString([],{weekday:"short"})},_=A=>{const C=e.endTime-e.startTime,N=(A.start-e.startTime)/C*100,M=(A.end-A.start)/C*100;return{left:`${N}%`,width:`${M}%`}};return g.jsxs("div",{className:"border border-dashed p-4",children:[g.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Activity"}),g.jsx("span",{className:"text-xs text-muted-foreground",children:"Last 7 days"})]}),g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("div",{className:"h-2 w-2 bg-chart-1"}),g.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:[r," completed"]})]}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("div",{className:"h-2 w-2 bg-chart-failed"}),g.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:[i," failed"]})]}),g.jsx("div",{className:"h-6",children:t&&g.jsxs(it,{variant:"ghost",size:"sm",onClick:()=>n(null),className:"h-6 gap-1 px-2 text-xs",children:[g.jsx(lm,{className:"h-3 w-3"}),"Clear"]})})]})]}),g.jsxs("div",{ref:a,className:"relative h-12 cursor-crosshair select-none",onMouseDown:x,onMouseMove:w,onMouseUp:b,onMouseLeave:S,children:[e.buckets.map((A,C)=>{const N=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=N>0,$=e.endTime-e.startTime,L=(A.time-e.startTime)/$*100;return g.jsxs(bg,{children:[g.jsx(xg,{asChild:!0,children:g.jsx("div",{className:"absolute bottom-0 flex h-full w-[3px] flex-col justify-end",style:{left:`${L}%`},children:P?g.jsxs(g.Fragment,{children:[A.error>0&&g.jsx("div",{className:"w-full bg-chart-failed",style:{height:`${R}%`}}),A.success>0&&g.jsx("div",{className:"w-full bg-chart-1",style:{height:`${M}%`}})]}):g.jsx("div",{className:"h-px w-full bg-muted/30"})})}),g.jsxs(Fd,{side:"top",className:"text-xs",children:[g.jsx("div",{className:"font-medium text-foreground",children:A.label}),N>0?g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"text-muted-foreground",children:[N," ",N===1?"run":"runs"]}),A.success>0&&g.jsxs("div",{className:"text-chart-1",children:[A.success," completed"]}),A.error>0&&g.jsxs("div",{className:"text-chart-failed",children:[A.error," failed"]})]}):g.jsx("div",{className:"text-muted-foreground",children:"No activity"})]})]},C.toString())}),g.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-px bg-border"}),o&&c!==null&&h!==null&&g.jsx("div",{className:"pointer-events-none absolute bottom-0 top-0 border-x border-ring bg-ring/10",style:_({start:Math.min(c,h),end:Math.max(c,h)})}),t&&!o&&g.jsx("div",{className:"pointer-events-none absolute bottom-0 top-0 border-x-2 border-ring bg-ring/20",style:_(t)})]}),g.jsx("div",{className:"mt-2 flex justify-between text-[10px] text-muted-foreground",children:Array.from({length:7}).map((A,C)=>{const N=e.startTime+C*24*60*60*1e3;return g.jsx("span",{children:E(N)},C.toString())})})]})}function F6e({search:e,onSearchChange:t}){nn();const{currentSort:n,handleSort:r}=_0(e.repeatableSort,P=>t({...e,repeatableSort:P})),{currentSort:i,handleSort:a}=_0(e.delayedSort,P=>t({...e,delayedSort:P})),{data:o=[],isLoading:s,error:c,isRefetching:f}=sme(e.repeatableSort),{data:h=[],isLoading:d,error:m,isRefetching:v}=lme(e.delayedSort),x=_2(),w=fi(),b=hme(),[S,E]=j.useState(null),[_,A]=j.useState(null),C=()=>{E(null),A(null)},N=()=>{S&&(A(null),b.mutate({queueName:S.queueName,schedulerKey:S.key},{onSuccess:P=>A({success:!0,jobId:P.id}),onError:P=>A({success:!1,message:P.message})}))},M=P=>{const $=S==null?void 0:S.queueName;$&&(C(),w({to:"/queues/$queueName/jobs/$jobId",params:{queueName:$,jobId:P}}))};s||d||f||v||x.isPending;const R=c||m;return s||d?g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("div",{className:"h-7 w-32 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-9 w-9 animate-pulse rounded bg-muted"})]}),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex gap-2",children:[g.jsx("div",{className:"h-9 w-32 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-9 w-28 animate-pulse rounded bg-muted"})]}),g.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:[g.jsx("div",{className:"col-span-3",children:"Name"}),g.jsx("div",{className:"col-span-2",children:"Queue"}),g.jsx("div",{className:"col-span-2",children:"Pattern"}),g.jsx("div",{className:"col-span-2",children:"Next Run"}),g.jsx("div",{className:"col-span-2",children:"Timezone"}),g.jsx("div",{className:"col-span-1"})]}),g.jsx("div",{className:"divide-y divide-border/50",children:[...Array(10)].map((P,$)=>g.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[g.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[g.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),g.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})]}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-3 w-16 animate-pulse rounded bg-muted"})}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),g.jsx("div",{className:"col-span-2",children:g.jsx("div",{className:"h-3 w-16 animate-pulse rounded bg-muted"})}),g.jsx("div",{className:"col-span-1 flex justify-end",children:g.jsx("div",{className:"h-8 w-8 animate-pulse rounded bg-muted"})})]},`pulse-${$.toString()}`))})]})]}):R?g.jsx(pr,{icon:Va,title:"Failed to load schedulers",description:R.message}):g.jsxs("div",{className:"space-y-6",children:[g.jsxs(Mg,{value:e.tab||"repeatable",onValueChange:P=>t({...e,tab:P}),children:[g.jsxs(Wd,{children:[g.jsxs(kr,{value:"repeatable",children:["Repeatable (",o.length,")"]}),g.jsxs(kr,{value:"delayed",children:["Delayed (",h.length,")"]})]}),g.jsx(ni,{value:"repeatable",className:"mt-4",children:o.length===0?g.jsx(pr,{icon:Pi,title:"No repeatable jobs",description:"No cron or repeating jobs are configured"}):g.jsxs("div",{className:"divide-y divide-border/50",children:[g.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:[g.jsx("div",{className:"col-span-3",children:g.jsx(Vn,{field:"name",label:"Name",currentSort:n,onSort:r})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"queueName",label:"Queue",currentSort:n,onSort:r})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"pattern",label:"Pattern",currentSort:n,onSort:r})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"next",label:"Next Run",currentSort:n,onSort:r})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"tz",label:"Timezone",currentSort:n,onSort:r})}),g.jsx("div",{className:"col-span-1"})]}),o.map(P=>g.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3 text-sm",children:[g.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[g.jsx(Pi,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),g.jsx("span",{className:"truncate font-medium",children:P.name})]}),g.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:P.queueName}),g.jsx("div",{className:"col-span-2 font-mono text-xs",children:P.pattern||(P.every?`every ${Lr(P.every)}`:"-")}),g.jsx("div",{className:"col-span-2 text-muted-foreground",children:P.next?g.jsx(eu,{timestamp:P.next}):"-"}),g.jsx("div",{className:"col-span-2 text-xs text-muted-foreground",children:P.tz||"UTC"}),g.jsx("div",{className:"col-span-1 flex justify-end",children:g.jsxs(bg,{children:[g.jsx(xg,{asChild:!0,children:g.jsxs(it,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{A(null),E(P)},children:[g.jsx(om,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Run now"})]})}),g.jsx(Fd,{side:"left",children:"Run now"})]})})]},P.key))]})}),g.jsx(ni,{value:"delayed",className:"mt-4",children:h.length===0?g.jsx(pr,{icon:Q4,title:"No delayed jobs",description:"No jobs are scheduled for future execution"}):g.jsxs("div",{className:"divide-y divide-border/50",children:[g.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:[g.jsx("div",{className:"col-span-3",children:g.jsx(Vn,{field:"name",label:"Name",currentSort:i,onSort:a})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"queueName",label:"Queue",currentSort:i,onSort:a})}),g.jsx("div",{className:"col-span-3",children:"Job ID"}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"processAt",label:"Executes",currentSort:i,onSort:a})}),g.jsx("div",{className:"col-span-2",children:g.jsx(Vn,{field:"delay",label:"Delay",currentSort:i,onSort:a})})]}),h.map(P=>g.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3 text-sm",children:[g.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[g.jsx(Q4,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),g.jsx("span",{className:"truncate font-medium",children:P.name})]}),g.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:P.queueName}),g.jsx("div",{className:"col-span-3 truncate font-mono text-xs text-muted-foreground",children:P.id}),g.jsx("div",{className:"col-span-2 text-muted-foreground",children:g.jsx(eu,{timestamp:P.processAt})}),g.jsx("div",{className:"col-span-2 text-muted-foreground",children:Lr(P.delay)})]},`${P.queueName}-${P.id}`))]})})]}),g.jsx(G0,{open:S!==null,onOpenChange:P=>{P||C()},children:g.jsxs(Ng,{children:[g.jsxs(K0,{children:[g.jsx(Y0,{children:"Run job now"}),g.jsx(QW,{children:S?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"font-medium text-foreground",children:S.name})," ","on queue"," ",g.jsx("span",{className:"font-mono",children:S.queueName}),". Runs once now; the schedule is unchanged."]}):null})]}),_?g.jsx("div",{className:ge("flex items-center gap-2 text-sm",_.success?"text-success":"text-destructive"),children:_.success?g.jsxs(g.Fragment,{children:[g.jsx(u2,{className:"h-4 w-4 shrink-0"}),g.jsxs("button",{type:"button",onClick:()=>M(_.jobId),className:"cursor-pointer transition-colors hover:text-foreground/80",children:["Triggered job"," ",g.jsx("span",{className:"font-mono",children:_.jobId})]})]}):g.jsxs(g.Fragment,{children:[g.jsx(Va,{className:"h-4 w-4 shrink-0"}),_.message]})}):null,g.jsx(W0,{children:_!=null&&_.success?g.jsx(it,{onClick:C,children:"Close"}):g.jsxs(g.Fragment,{children:[g.jsx(it,{variant:"outline",onClick:C,disabled:b.isPending,children:"Cancel"}),g.jsx(it,{onClick:N,disabled:b.isPending,children:b.isPending?g.jsxs(g.Fragment,{children:[g.jsx(Dc,{className:"h-4 w-4 animate-spin"}),"Running…"]}):"Run now"})]})})]})})]})}function V6e({queues:e,readonly:t,prefill:n}){const r=pme(),[i,a]=j.useState((n==null?void 0:n.queue)||e[0]||""),[o,s]=j.useState((n==null?void 0:n.jobName)||"test-job"),[c,f]=j.useState((n==null?void 0:n.payload)||`{
510
+ "message": "Hello from Workbench"
511
+ }`),[h,d]=j.useState(""),[m,v]=j.useState(null);j.useEffect(()=>{n!=null&&n.queue&&a(n.queue),n!=null&&n.jobName&&s(n.jobName),n!=null&&n.payload&&f(n.payload)},[n==null?void 0:n.queue,n==null?void 0:n.jobName,n==null?void 0:n.payload]);const x=async w=>{if(w.preventDefault(),!i||!o){v({success:!1,message:"Queue and job name are required"});return}let b;try{b=JSON.parse(c)}catch{v({success:!1,message:"Invalid JSON payload"});return}v(null),r.mutate({queueName:i,name:o,data:b,delay:h?Number(h)*1e3:void 0},{onSuccess:S=>{v({success:!0,message:`Job enqueued with ID: ${S.id}`})},onError:S=>{v({success:!1,message:S.message})}})};return t?g.jsxs("div",{className:"flex h-[400px] flex-col items-center justify-center text-center",children:[g.jsx(f2,{className:"mb-4 h-12 w-12 text-muted-foreground"}),g.jsx("h2",{className:"mb-2 text-lg font-medium",children:"Test Mode Disabled"}),g.jsx("p",{className:"max-w-md text-muted-foreground",children:"The dashboard is in readonly mode. Job testing is disabled."})]}):g.jsxs("div",{className:"max-w-2xl",children:[g.jsx("div",{className:"mb-6",children:g.jsx("p",{className:"text-sm text-muted-foreground",children:"Manually enqueue a job for testing purposes"})}),g.jsxs("form",{onSubmit:x,className:"space-y-6",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"queue",className:"text-sm font-medium",children:"Queue"}),g.jsxs(ex,{value:i,onValueChange:a,children:[g.jsx(um,{children:g.jsx(tx,{placeholder:"Select a queue"})}),g.jsx(fm,{children:e.map(w=>g.jsx(dm,{value:w,children:w},w))})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"jobName",className:"text-sm font-medium",children:"Job Name"}),g.jsx("input",{type:"text",value:o,onChange:w=>s(w.target.value),className:"h-9 w-full border bg-background px-3 text-sm focus:outline-none",placeholder:"my-job-name"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"delay",className:"text-sm font-medium",children:"Delay (seconds)"}),g.jsx("input",{type:"number",value:h,onChange:w=>d(w.target.value),className:"h-9 w-full border bg-background px-3 text-sm focus:outline-none",placeholder:"0",min:"0"}),g.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional delay before the job is processed"})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx("label",{htmlFor:"payload",className:"text-sm font-medium",children:"Payload (JSON)"}),g.jsx("textarea",{value:c,onChange:w=>f(w.target.value),className:"h-48 w-full resize-none border bg-background px-3 py-2 font-mono text-sm focus:outline-none",placeholder:'{ "key": "value" }'})]}),g.jsxs("div",{className:"flex items-center gap-4",children:[g.jsx(it,{type:"submit",disabled:r.isPending,children:r.isPending?g.jsx(g.Fragment,{children:"Processing..."}):g.jsx(g.Fragment,{children:"Enqueue Job"})}),m&&g.jsxs("div",{className:ge("flex items-center gap-2 text-sm",m.success?"text-success":"text-destructive"),children:[m.success?g.jsx(u2,{className:"h-4 w-4"}):g.jsx(Va,{className:"h-4 w-4"}),m.message]})]})]})]})}const Hie=j.createContext(null);function U6e(){const e=j.useContext(Hie);if(!e)throw new Error("useSearchContext must be used within SearchContextProvider");return e}const H6e=wg({status:D0(["all","active","waiting","waiting-children","prioritized","completed","failed","delayed"]).optional().catch("all"),q:yl().optional().catch(""),from:X4().optional(),to:X4().optional(),sort:yl().optional()}),G6e=wg({status:D0(["all","active","waiting","waiting-children","prioritized","completed","failed","delayed"]).optional().catch("all"),sort:yl().optional()}),K6e=wg({tab:D0(["repeatable","delayed"]).optional().catch("repeatable"),repeatableSort:yl().optional(),delayedSort:yl().optional()}),W6e=wg({tab:D0(["payload","output","error","retries","timeline","logs"]).optional()}),Y6e=wg({queue:yl().optional(),jobName:yl().optional(),payload:yl().optional()});function X6e(){const{data:e,isLoading:t}=fu();eme();const{data:n=[]}=S2(),r=fi(),i=j.useMemo(()=>new Set(n.filter(b=>b.isPaused).map(b=>b.name)),[n]),a=Ice(),[o,s]=j.useState(!1),[c,f]=j.useState(""),[h,d]=j.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:v}=j.useMemo(()=>{const b=a.pathname;return b==="/"||b===""?{activeNav:"overview",activeQueue:void 0}:b==="/runs"?{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==="/alerts"?{activeNav:"alerts",activeQueue:void 0}:b.startsWith("/queues/")?{activeNav:"queues",activeQueue:b.split("/")[2]}:{activeNav:"runs",activeQueue:void 0}},[a.pathname]);if(j.useEffect(()=>{document.documentElement.classList.add("no-transitions"),document.documentElement.classList.toggle("dark",h),localStorage.setItem("workbench:theme",h?"dark":"light"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")})})},[h]),j.useEffect(()=>{const b=S=>{if((S.metaKey||S.ctrlKey)&&S.key==="k"){S.preventDefault(),s(!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(),d(!h)))};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[o,h]),t||!e)return g.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:g.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading..."})});const x=b=>{switch(b){case"overview":r({to:"/"});break;case"runs":r({to:"/runs"});break;case"metrics":r({to:"/metrics"});break;case"schedulers":r({to:"/schedulers"});break;case"flows":r({to:"/flows"});break;case"alerts":r({to:"/alerts"});break;case"test":r({to:"/test"});break}},w=b=>{r({to:"/queues/$queueName",params:{queueName:b}})};return g.jsxs(EW,{defaultOpen:!1,className:"h-full",children:[g.jsxs("div",{className:"flex h-full min-h-0 w-full",children:[g.jsx(Mme,{queues:e.queues,queueGroups:e.queueGroups,pausedQueues:i,activeNav:m,activeQueue:v,onNavSelect:x,onQueueSelect:w,isDark:h,onToggleTheme:()=>d(!h),title:e.title==="Workbench"?zW:e.title,logo:e.logo??qW}),g.jsx(CW,{className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:g.jsx(Hie.Provider,{value:{searchQuery:c,setSearchQuery:f,setCommandOpen:s},children:g.jsx(I7,{})})})]}),g.jsx(cge,{open:o,onOpenChange:s,queues:e.queues,searchQuery:c,onSearchQueryChange:f,isDark:h,onToggleTheme:()=>d(!h),onSelectQueue:b=>{r({to:"/queues/$queueName",params:{queueName:b}}),s(!1)},onSelectJob:(b,S)=>{r({to:"/queues/$queueName/jobs/$jobId",params:{queueName:b,jobId:S}}),s(!1)},onNavigate:b=>{r({to:b}),s(!1)}}),g.jsx(Bge,{position:"top-right"})]})}function Xa({title:e,subtitle:t,children:n}){const r=U6e();return g.jsxs(g.Fragment,{children:[g.jsxs("header",{className:"relative z-20 flex h-14 shrink-0 items-center justify-between gap-2 border-b border-border px-4 md:px-6",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx("h1",{className:"text-lg font-semibold",children:e}),t&&g.jsx("span",{className:"hidden font-mono text-sm text-muted-foreground sm:inline",children:t})]}),g.jsx(fge,{value:r.searchQuery,onValueChange:r.setSearchQuery,onFocus:()=>r.setCommandOpen(!0)})]}),g.jsx("main",{className:"flex-1 overflow-auto p-6",children:n})]})}function Q6e(){const e=fi();return g.jsx(Xa,{title:"Overview",children:g.jsx(d4e,{onQueueSelect:t=>e({to:"/queues/$queueName",params:{queueName:t}}),onViewFailed:t=>e({to:"/queues/$queueName",params:{queueName:t},search:{status:"failed"}})})})}function Z6e(){const e=fi(),t=cu({from:"/runs"});return g.jsx(Xa,{title:"Runs",children:g.jsx(B6e,{search:t,onSearchChange:n=>{e({to:"/runs",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 J6e(){const e=fi(),t=cu({from:"/schedulers"});return g.jsx(Xa,{title:"Schedulers",children:g.jsx(F6e,{search:t,onSearchChange:n=>{e({to:"/schedulers",search:n,replace:!0})}})})}function eVe(){return g.jsx(Xa,{title:"Metrics",children:g.jsx(K3e,{})})}function tVe(){const e=fi();return g.jsx(Xa,{title:"Flows",children:g.jsx(oCe,{onFlowSelect:(t,n)=>e({to:"/flows/$queueName/$jobId",params:{queueName:t,jobId:n}})})})}function nVe(){const{queueName:e,jobId:t}=hg({from:"/flows/$queueName/$jobId"});return g.jsx(Xa,{title:"Flow Details",subtitle:t,children:g.jsx(aCe,{queueName:e,jobId:t})})}function rVe(){const{data:e}=fu(),t=cu({from:"/test"});return g.jsx(Xa,{title:"Test",children:g.jsx(V6e,{queues:(e==null?void 0:e.queues)||[],readonly:e==null?void 0:e.readonly,prefill:t})})}function iVe(){return g.jsx(Xa,{title:"Alerts",children:g.jsx(Jve,{})})}function aVe(){const{queueName:e}=hg({from:"/queues/$queueName"}),{data:t}=fu(),n=fi(),r=cu({from:"/queues/$queueName"});return g.jsx(Xa,{title:e,children:g.jsx(L6e,{queueName:e,readonly:t==null?void 0:t.readonly,search:r,onSearchChange:i=>{n({to:"/queues/$queueName",params:{queueName:e},search:i,replace:!0})},onJobSelect:i=>n({to:"/queues/$queueName/jobs/$jobId",params:{queueName:e,jobId:i}})})})}function oVe(){const{queueName:e,jobId:t}=hg({from:"/queues/$queueName/jobs/$jobId"}),{data:n}=fu(),r=fi(),i=cu({from:"/queues/$queueName/jobs/$jobId"});return g.jsx(Xa,{title:"Job Details",subtitle:t,children:g.jsx(uCe,{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,s)=>r({to:"/test",search:{queue:a,jobName:o,payload:s}})})})}const va=wce({component:X6e}),sVe=Ka({getParentRoute:()=>va,path:"/",component:Q6e}),lVe=Ka({getParentRoute:()=>va,path:"/runs",component:Z6e,validateSearch:H6e}),cVe=Ka({getParentRoute:()=>va,path:"/metrics",component:eVe}),uVe=Ka({getParentRoute:()=>va,path:"/schedulers",component:J6e,validateSearch:K6e}),fVe=Ka({getParentRoute:()=>va,path:"/flows",component:tVe}),dVe=Ka({getParentRoute:()=>va,path:"/flows/$queueName/$jobId",component:nVe}),hVe=Ka({getParentRoute:()=>va,path:"/test",component:rVe,validateSearch:Y6e}),pVe=Ka({getParentRoute:()=>va,path:"/alerts",component:iVe}),mVe=Ka({getParentRoute:()=>va,path:"/queues/$queueName",component:aVe,validateSearch:G6e}),gVe=Ka({getParentRoute:()=>va,path:"/queues/$queueName/jobs/$jobId",component:oVe,validateSearch:W6e}),vVe=va.addChildren([sVe,lVe,cVe,uVe,fVe,dVe,hVe,pVe,mVe,gVe]);function yVe(e){return Rce({routeTree:vVe,basepath:e})}const bVe=new kse({defaultOptions:{queries:{staleTime:1e3*5,refetchOnWindowFocus:!0,retry:1}}});function xVe(){if(typeof document<"u"){const e=document.querySelector("base");if(e!=null&&e.href)return new URL(e.href).pathname.replace(/\/$/,"")||"/"}return"/"}const wVe=yVe(xVe());function SVe(){return g.jsx(Dse,{client:bVe,children:g.jsx(jK,{delayDuration:0,children:g.jsx(Dce,{router:wVe})})})}sse.createRoot(document.getElementById("root")).render(g.jsx(Z.StrictMode,{children:g.jsx(SVe,{})}));