var BK=Object.defineProperty;var jP=e=>{throw TypeError(e)};var UK=(e,t,n)=>t in e?BK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Mw=(e,t,n)=>UK(e,typeof t!="symbol"?t+"":t,n),Rw=(e,t,n)=>t.has(e)||jP("Cannot "+n);var X=(e,t,n)=>(Rw(e,t,"read from private field"),n?n.call(e):t.get(e)),Ee=(e,t,n)=>t.has(e)?jP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),xe=(e,t,n,r)=>(Rw(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),$e=(e,t,n)=>(Rw(e,t,"access private method"),n);var Sv=(e,t,n,r)=>({set _(a){xe(e,t,a,n)},get _(){return X(e,t,r)}});function HK(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();function Za(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kw={exports:{}},eh={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var OP;function FK(){if(OP)return eh;OP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var s=null;if(i!==void 0&&(s=""+i),a.key!==void 0&&(s=""+a.key),"key"in a){i={};for(var c in a)c!=="key"&&(i[c]=a[c])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:s,ref:a!==void 0?a:null,props:i}}return eh.Fragment=t,eh.jsx=n,eh.jsxs=n,eh}var CP;function qK(){return CP||(CP=1,kw.exports=FK()),kw.exports}var v=qK(),Dw={exports:{}},Fe={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var AP;function KK(){if(AP)return Fe;AP=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),d=Symbol.for("react.activity"),p=Symbol.iterator;function b($){return $===null||typeof $!="object"?null:($=p&&$[p]||$["@@iterator"],typeof $=="function"?$:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function E($,L,G){this.props=$,this.context=L,this.refs=S,this.updater=G||w}E.prototype.isReactComponent={},E.prototype.setState=function($,L){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,L,"setState")},E.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function C(){}C.prototype=E.prototype;function O($,L,G){this.props=$,this.context=L,this.refs=S,this.updater=G||w}var A=O.prototype=new C;A.constructor=O,x(A,E.prototype),A.isPureReactComponent=!0;var T=Array.isArray;function N(){}var P={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function D($,L,G){var Z=G.ref;return{$$typeof:e,type:$,key:L,ref:Z!==void 0?Z:null,props:G}}function K($,L){return D($.type,L,$.props)}function B($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function I($){var L={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(G){return L[G]})}var W=/\/+/g;function z($,L){return typeof $=="object"&&$!==null&&$.key!=null?I(""+$.key):L.toString(36)}function V($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(N,N):($.status="pending",$.then(function(L){$.status==="pending"&&($.status="fulfilled",$.value=L)},function(L){$.status==="pending"&&($.status="rejected",$.reason=L)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function R($,L,G,Z,J){var se=typeof $;(se==="undefined"||se==="boolean")&&($=null);var ie=!1;if($===null)ie=!0;else switch(se){case"bigint":case"string":case"number":ie=!0;break;case"object":switch($.$$typeof){case e:case t:ie=!0;break;case m:return ie=$._init,R(ie($._payload),L,G,Z,J)}}if(ie)return J=J($),ie=Z===""?"."+z($,0):Z,T(J)?(G="",ie!=null&&(G=ie.replace(W,"$&/")+"/"),R(J,L,G,"",function(le){return le})):J!=null&&(B(J)&&(J=K(J,G+(J.key==null||$&&$.key===J.key?"":(""+J.key).replace(W,"$&/")+"/")+ie)),L.push(J)),1;ie=0;var re=Z===""?".":Z+":";if(T($))for(var ee=0;ee<$.length;ee++)Z=$[ee],se=re+z(Z,ee),ie+=R(Z,L,G,se,J);else if(ee=b($),typeof ee=="function")for($=ee.call($),ee=0;!(Z=$.next()).done;)Z=Z.value,se=re+z(Z,ee++),ie+=R(Z,L,G,se,J);else if(se==="object"){if(typeof $.then=="function")return R(V($),L,G,Z,J);throw L=String($),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return ie}function H($,L,G){if($==null)return $;var Z=[],J=0;return R($,Z,"","",function(se){return L.call(G,se,J++)}),Z}function q($){if($._status===-1){var L=$._result;L=L(),L.then(function(G){($._status===0||$._status===-1)&&($._status=1,$._result=G)},function(G){($._status===0||$._status===-1)&&($._status=2,$._result=G)}),$._status===-1&&($._status=0,$._result=L)}if($._status===1)return $._result.default;throw $._result}var F=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},Y={map:H,forEach:function($,L,G){H($,function(){L.apply(this,arguments)},G)},count:function($){var L=0;return H($,function(){L++}),L},toArray:function($){return H($,function(L){return L})||[]},only:function($){if(!B($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Fe.Activity=d,Fe.Children=Y,Fe.Component=E,Fe.Fragment=n,Fe.Profiler=a,Fe.PureComponent=O,Fe.StrictMode=r,Fe.Suspense=u,Fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Fe.__COMPILER_RUNTIME={__proto__:null,c:function($){return P.H.useMemoCache($)}},Fe.cache=function($){return function(){return $.apply(null,arguments)}},Fe.cacheSignal=function(){return null},Fe.cloneElement=function($,L,G){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var Z=x({},$.props),J=$.key;if(L!=null)for(se in L.key!==void 0&&(J=""+L.key),L)!k.call(L,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&L.ref===void 0||(Z[se]=L[se]);var se=arguments.length-2;if(se===1)Z.children=G;else if(1<se){for(var ie=Array(se),re=0;re<se;re++)ie[re]=arguments[re+2];Z.children=ie}return D($.type,J,Z)},Fe.createContext=function($){return $={$$typeof:s,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null},$.Provider=$,$.Consumer={$$typeof:i,_context:$},$},Fe.createElement=function($,L,G){var Z,J={},se=null;if(L!=null)for(Z in L.key!==void 0&&(se=""+L.key),L)k.call(L,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(J[Z]=L[Z]);var ie=arguments.length-2;if(ie===1)J.children=G;else if(1<ie){for(var re=Array(ie),ee=0;ee<ie;ee++)re[ee]=arguments[ee+2];J.children=re}if($&&$.defaultProps)for(Z in ie=$.defaultProps,ie)J[Z]===void 0&&(J[Z]=ie[Z]);return D($,se,J)},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function($){return{$$typeof:c,render:$}},Fe.isValidElement=B,Fe.lazy=function($){return{$$typeof:m,_payload:{_status:-1,_result:$},_init:q}},Fe.memo=function($,L){return{$$typeof:f,type:$,compare:L===void 0?null:L}},Fe.startTransition=function($){var L=P.T,G={};P.T=G;try{var Z=$(),J=P.S;J!==null&&J(G,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(N,F)}catch(se){F(se)}finally{L!==null&&G.types!==null&&(L.types=G.types),P.T=L}},Fe.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Fe.use=function($){return P.H.use($)},Fe.useActionState=function($,L,G){return P.H.useActionState($,L,G)},Fe.useCallback=function($,L){return P.H.useCallback($,L)},Fe.useContext=function($){return P.H.useContext($)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function($,L){return P.H.useDeferredValue($,L)},Fe.useEffect=function($,L){return P.H.useEffect($,L)},Fe.useEffectEvent=function($){return P.H.useEffectEvent($)},Fe.useId=function(){return P.H.useId()},Fe.useImperativeHandle=function($,L,G){return P.H.useImperativeHandle($,L,G)},Fe.useInsertionEffect=function($,L){return P.H.useInsertionEffect($,L)},Fe.useLayoutEffect=function($,L){return P.H.useLayoutEffect($,L)},Fe.useMemo=function($,L){return P.H.useMemo($,L)},Fe.useOptimistic=function($,L){return P.H.useOptimistic($,L)},Fe.useReducer=function($,L,G){return P.H.useReducer($,L,G)},Fe.useRef=function($){return P.H.useRef($)},Fe.useState=function($){return P.H.useState($)},Fe.useSyncExternalStore=function($,L,G){return P.H.useSyncExternalStore($,L,G)},Fe.useTransition=function(){return P.H.useTransition()},Fe.version="19.2.4",Fe}var NP;function Uf(){return NP||(NP=1,Dw.exports=KK()),Dw.exports}var y=Uf();const ye=Za(y),tj=HK({__proto__:null,default:ye},[y]);var Iw={exports:{}},th={},Lw={exports:{}},zw={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var TP;function VK(){return TP||(TP=1,(function(e){function t(R,H){var q=R.length;R.push(H);e:for(;0<q;){var F=q-1>>>1,Y=R[F];if(0<a(Y,H))R[F]=H,R[q]=Y,q=F;else break e}}function n(R){return R.length===0?null:R[0]}function r(R){if(R.length===0)return null;var H=R[0],q=R.pop();if(q!==H){R[0]=q;e:for(var F=0,Y=R.length,$=Y>>>1;F<$;){var L=2*(F+1)-1,G=R[L],Z=L+1,J=R[Z];if(0>a(G,q))Z<Y&&0>a(J,G)?(R[F]=J,R[Z]=q,F=Z):(R[F]=G,R[L]=q,F=L);else if(Z<Y&&0>a(J,q))R[F]=J,R[Z]=q,F=Z;else break e}}return H}function a(R,H){var q=R.sortIndex-H.sortIndex;return q!==0?q:R.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,c=s.now();e.unstable_now=function(){return s.now()-c}}var u=[],f=[],m=1,d=null,p=3,b=!1,w=!1,x=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function A(R){for(var H=n(f);H!==null;){if(H.callback===null)r(f);else if(H.startTime<=R)r(f),H.sortIndex=H.expirationTime,t(u,H);else break;H=n(f)}}function T(R){if(x=!1,A(R),!w)if(n(u)!==null)w=!0,N||(N=!0,I());else{var H=n(f);H!==null&&V(T,H.startTime-R)}}var N=!1,P=-1,k=5,D=-1;function K(){return S?!0:!(e.unstable_now()-D<k)}function B(){if(S=!1,N){var R=e.unstable_now();D=R;var H=!0;try{e:{w=!1,x&&(x=!1,C(P),P=-1),b=!0;var q=p;try{t:{for(A(R),d=n(u);d!==null&&!(d.expirationTime>R&&K());){var F=d.callback;if(typeof F=="function"){d.callback=null,p=d.priorityLevel;var Y=F(d.expirationTime<=R);if(R=e.unstable_now(),typeof Y=="function"){d.callback=Y,A(R),H=!0;break t}d===n(u)&&r(u),A(R)}else r(u);d=n(u)}if(d!==null)H=!0;else{var $=n(f);$!==null&&V(T,$.startTime-R),H=!1}}break e}finally{d=null,p=q,b=!1}H=void 0}}finally{H?I():N=!1}}}var I;if(typeof O=="function")I=function(){O(B)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,z=W.port2;W.port1.onmessage=B,I=function(){z.postMessage(null)}}else I=function(){E(B,0)};function V(R,H){P=E(function(){R(e.unstable_now())},H)}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(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(R){switch(p){case 1:case 2:case 3:var H=3;break;default:H=p}var q=p;p=H;try{return R()}finally{p=q}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(R,H){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var q=p;p=R;try{return H()}finally{p=q}},e.unstable_scheduleCallback=function(R,H,q){var F=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?F+q:F):q=F,R){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=q+Y,R={id:m++,callback:H,priorityLevel:R,startTime:q,expirationTime:Y,sortIndex:-1},q>F?(R.sortIndex=q,t(f,R),n(u)===null&&R===n(f)&&(x?(C(P),P=-1):x=!0,V(T,q-F))):(R.sortIndex=Y,t(u,R),w||b||(w=!0,N||(N=!0,I()))),R},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(R){var H=p;return function(){var q=p;p=H;try{return R.apply(this,arguments)}finally{p=q}}}})(zw)),zw}var PP;function YK(){return PP||(PP=1,Lw.exports=VK()),Lw.exports}var $w={exports:{}},ar={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var MP;function XK(){if(MP)return ar;MP=1;var e=Uf();function t(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(u,f,m){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:d==null?null:""+d,children:u,containerInfo:f,implementation:m}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return ar.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ar.createPortal=function(u,f){var m=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 i(u,f,null,m)},ar.flushSync=function(u){var f=s.T,m=r.p;try{if(s.T=null,r.p=2,u)return u()}finally{s.T=f,r.p=m,r.d.f()}},ar.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(u,f))},ar.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},ar.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var m=f.as,d=c(m,f.crossOrigin),p=typeof f.integrity=="string"?f.integrity:void 0,b=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:d,integrity:p,fetchPriority:b}):m==="script"&&r.d.X(u,{crossOrigin:d,integrity:p,fetchPriority:b,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},ar.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=c(f.as,f.crossOrigin);r.d.M(u,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(u)},ar.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,d=c(m,f.crossOrigin);r.d.L(u,m,{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})}},ar.preloadModule=function(u,f){if(typeof u=="string")if(f){var m=c(f.as,f.crossOrigin);r.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(u)},ar.requestFormReset=function(u){r.d.r(u)},ar.unstable_batchedUpdates=function(u,f){return u(f)},ar.useFormState=function(u,f,m){return s.H.useFormState(u,f,m)},ar.useFormStatus=function(){return s.H.useHostTransitionStatus()},ar.version="19.2.4",ar}var RP;function iz(){if(RP)return $w.exports;RP=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(),$w.exports=XK(),$w.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var kP;function GK(){if(kP)return th;kP=1;var e=YK(),t=Uf(),n=iz();function r(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var l=o,h=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(h=l.return),o=l.return;while(o)}return l.tag===3?h:null}function s(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function u(o){if(i(o)!==o)throw Error(r(188))}function f(o){var l=o.alternate;if(!l){if(l=i(o),l===null)throw Error(r(188));return l!==o?null:o}for(var h=o,g=l;;){var _=h.return;if(_===null)break;var j=_.alternate;if(j===null){if(g=_.return,g!==null){h=g;continue}break}if(_.child===j.child){for(j=_.child;j;){if(j===h)return u(_),o;if(j===g)return u(_),l;j=j.sibling}throw Error(r(188))}if(h.return!==g.return)h=_,g=j;else{for(var M=!1,U=_.child;U;){if(U===h){M=!0,h=_,g=j;break}if(U===g){M=!0,g=_,h=j;break}U=U.sibling}if(!M){for(U=j.child;U;){if(U===h){M=!0,h=j,g=_;break}if(U===g){M=!0,g=j,h=_;break}U=U.sibling}if(!M)throw Error(r(189))}}if(h.alternate!==g)throw Error(r(190))}if(h.tag!==3)throw Error(r(188));return h.stateNode.current===h?o:l}function m(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=m(o),l!==null)return l;o=o.sibling}return null}var d=Object.assign,p=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),O=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),B=Symbol.iterator;function I(o){return o===null||typeof o!="object"?null:(o=B&&o[B]||o["@@iterator"],typeof o=="function"?o:null)}var W=Symbol.for("react.client.reference");function z(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===W?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case x:return"Fragment";case E:return"Profiler";case S:return"StrictMode";case T:return"Suspense";case N:return"SuspenseList";case D:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case w:return"Portal";case O:return o.displayName||"Context";case C:return(o._context.displayName||"Context")+".Consumer";case A:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case P:return l=o.displayName||null,l!==null?l:z(o.type)||"Memo";case k:l=o._payload,o=o._init;try{return z(o(l))}catch{}}return null}var V=Array.isArray,R=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},F=[],Y=-1;function $(o){return{current:o}}function L(o){0>Y||(o.current=F[Y],F[Y]=null,Y--)}function G(o,l){Y++,F[Y]=o.current,o.current=l}var Z=$(null),J=$(null),se=$(null),ie=$(null);function re(o,l){switch(G(se,l),G(J,o),G(Z,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?X2(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=X2(l),o=G2(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}L(Z),G(Z,o)}function ee(){L(Z),L(J),L(se)}function le(o){o.memoizedState!==null&&G(ie,o);var l=Z.current,h=G2(l,o.type);l!==h&&(G(J,o),G(Z,h))}function me(o){J.current===o&&(L(Z),L(J)),ie.current===o&&(L(ie),Wd._currentValue=q)}var ne,ge;function be(o){if(ne===void 0)try{throw Error()}catch(h){var l=h.stack.trim().match(/\n( *(at )?)/);ne=l&&l[1]||"",ge=-1<h.stack.indexOf(`
    at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ne+o+ge}var Ie=!1;function Pe(o,l){if(!o||Ie)return"";Ie=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(l){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(de){var fe=de}Reflect.construct(o,[],ve)}else{try{ve.call()}catch(de){fe=de}o.call(ve.prototype)}}else{try{throw Error()}catch(de){fe=de}(ve=o())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(de){if(de&&fe&&typeof de.stack=="string")return[de.stack,fe.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=g.DetermineComponentFrameRoot(),M=j[0],U=j[1];if(M&&U){var Q=M.split(`
`),ue=U.split(`
`);for(_=g=0;g<Q.length&&!Q[g].includes("DetermineComponentFrameRoot");)g++;for(;_<ue.length&&!ue[_].includes("DetermineComponentFrameRoot");)_++;if(g===Q.length||_===ue.length)for(g=Q.length-1,_=ue.length-1;1<=g&&0<=_&&Q[g]!==ue[_];)_--;for(;1<=g&&0<=_;g--,_--)if(Q[g]!==ue[_]){if(g!==1||_!==1)do if(g--,_--,0>_||Q[g]!==ue[_]){var he=`
`+Q[g].replace(" at new "," at ");return o.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",o.displayName)),he}while(1<=g&&0<=_);break}}}finally{Ie=!1,Error.prepareStackTrace=h}return(h=o?o.displayName||o.name:"")?be(h):""}function Ve(o,l){switch(o.tag){case 26:case 27:case 5:return be(o.type);case 16:return be("Lazy");case 13:return o.child!==l&&l!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return Pe(o.type,!1);case 11:return Pe(o.type.render,!1);case 1:return Pe(o.type,!0);case 31:return be("Activity");default:return""}}function Xt(o){try{var l="",h=null;do l+=Ve(o,h),h=o,o=o.return;while(o);return l}catch(g){return`
Error generating stack: `+g.message+`
`+g.stack}}var dt=Object.prototype.hasOwnProperty,Jn=e.unstable_scheduleCallback,Sr=e.unstable_cancelCallback,Lt=e.unstable_shouldYield,Fn=e.unstable_requestPaint,we=e.unstable_now,rn=e.unstable_getCurrentPriorityLevel,Ct=e.unstable_ImmediatePriority,ia=e.unstable_UserBlockingPriority,ai=e.unstable_NormalPriority,gl=e.unstable_LowPriority,zr=e.unstable_IdlePriority,Qc=e.log,ii=e.unstable_setDisableYieldValue,zi=null,qn=null;function $r(o){if(typeof Qc=="function"&&ii(o),qn&&typeof qn.setStrictMode=="function")try{qn.setStrictMode(zi,o)}catch{}}var Pn=Math.clz32?Math.clz32:oa,ld=Math.log,yl=Math.LN2;function oa(o){return o>>>=0,o===0?32:31-(ld(o)/yl|0)|0}var Xo=256,Go=262144,$i=4194304;function sa(o){var l=o&42;if(l!==0)return l;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function Be(o,l,h){var g=o.pendingLanes;if(g===0)return 0;var _=0,j=o.suspendedLanes,M=o.pingedLanes;o=o.warmLanes;var U=g&134217727;return U!==0?(g=U&~j,g!==0?_=sa(g):(M&=U,M!==0?_=sa(M):h||(h=U&~o,h!==0&&(_=sa(h))))):(U=g&~j,U!==0?_=sa(U):M!==0?_=sa(M):h||(h=g&~o,h!==0&&(_=sa(h)))),_===0?0:l!==0&&l!==_&&(l&j)===0&&(j=_&-_,h=l&-l,j>=h||j===32&&(h&4194048)!==0)?l:_}function At(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function sn(o,l){switch(o){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 Mn(){var o=$i;return $i<<=1,($i&62914560)===0&&($i=4194304),o}function oi(o){for(var l=[],h=0;31>h;h++)l.push(o);return l}function Pt(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function er(o,l,h,g,_,j){var M=o.pendingLanes;o.pendingLanes=h,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=h,o.entangledLanes&=h,o.errorRecoveryDisabledLanes&=h,o.shellSuspendCounter=0;var U=o.entanglements,Q=o.expirationTimes,ue=o.hiddenUpdates;for(h=M&~h;0<h;){var he=31-Pn(h),ve=1<<he;U[he]=0,Q[he]=-1;var fe=ue[he];if(fe!==null)for(ue[he]=null,he=0;he<fe.length;he++){var de=fe[he];de!==null&&(de.lane&=-536870913)}h&=~ve}g!==0&&Bi(o,g,0),j!==0&&_===0&&o.tag!==0&&(o.suspendedLanes|=j&~(M&~l))}function Bi(o,l,h){o.pendingLanes|=l,o.suspendedLanes&=~l;var g=31-Pn(l);o.entangledLanes|=l,o.entanglements[g]=o.entanglements[g]|1073741824|h&261930}function tr(o,l){var h=o.entangledLanes|=l;for(o=o.entanglements;h;){var g=31-Pn(h),_=1<<g;_&l|o[g]&l&&(o[g]|=l),h&=~_}}function nr(o,l){var h=l&-l;return h=(h&42)!==0?1:Wo(h),(h&(o.suspendedLanes|l))!==0?0:h}function Wo(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Br(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function cd(){var o=H.p;return o!==0?o:(o=window.event,o===void 0?32:yP(o.type))}function ap(o,l){var h=H.p;try{return H.p=o,l()}finally{H.p=h}}var si=Math.random().toString(36).slice(2),wn="__reactFiber$"+si,rr="__reactProps$"+si,Ui="__reactContainer$"+si,Zc="__reactEvents$"+si,ip="__reactListeners$"+si,Eb="__reactHandles$"+si,op="__reactResources$"+si,bl="__reactMarker$"+si;function ud(o){delete o[wn],delete o[rr],delete o[Zc],delete o[ip],delete o[Eb]}function Qo(o){var l=o[wn];if(l)return l;for(var h=o.parentNode;h;){if(l=h[Ui]||h[wn]){if(h=l.alternate,l.child!==null||h!==null&&h.child!==null)for(o=nP(o);o!==null;){if(h=o[wn])return h;o=nP(o)}return l}o=h,h=o.parentNode}return null}function Zo(o){if(o=o[wn]||o[Ui]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function Jo(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(r(33))}function es(o){var l=o[op];return l||(l=o[op]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function ln(o){o[bl]=!0}var sp=new Set,lp={};function Hi(o,l){ts(o,l),ts(o+"Capture",l)}function ts(o,l){for(lp[o]=l,o=0;o<l.length;o++)sp.add(l[o])}var _b=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]*$"),fd={},cp={};function jb(o){return dt.call(cp,o)?!0:dt.call(fd,o)?!1:_b.test(o)?cp[o]=!0:(fd[o]=!0,!1)}function Jc(o,l,h){if(jb(l))if(h===null)o.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var g=l.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+h)}}function eu(o,l,h){if(h===null)o.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+h)}}function Ma(o,l,h,g){if(g===null)o.removeAttribute(h);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(h);return}o.setAttributeNS(l,h,""+g)}}function Er(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function up(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Ob(o,l,h){var g=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var _=g.get,j=g.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return _.call(this)},set:function(M){h=""+M,j.call(this,M)}}),Object.defineProperty(o,l,{enumerable:g.enumerable}),{getValue:function(){return h},setValue:function(M){h=""+M},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function ns(o){if(!o._valueTracker){var l=up(o)?"checked":"value";o._valueTracker=Ob(o,l,""+o[l])}}function fp(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var h=l.getValue(),g="";return o&&(g=up(o)?o.checked?"true":"false":o.value),o=g,o!==h?(l.setValue(o),!0):!1}function xl(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var Cb=/[\n"\\]/g;function _r(o){return o.replace(Cb,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function wl(o,l,h,g,_,j,M,U){o.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?o.type=M:o.removeAttribute("type"),l!=null?M==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+Er(l)):o.value!==""+Er(l)&&(o.value=""+Er(l)):M!=="submit"&&M!=="reset"||o.removeAttribute("value"),l!=null?dd(o,M,Er(l)):h!=null?dd(o,M,Er(h)):g!=null&&o.removeAttribute("value"),_==null&&j!=null&&(o.defaultChecked=!!j),_!=null&&(o.checked=_&&typeof _!="function"&&typeof _!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?o.name=""+Er(U):o.removeAttribute("name")}function dp(o,l,h,g,_,j,M,U){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(o.type=j),l!=null||h!=null){if(!(j!=="submit"&&j!=="reset"||l!=null)){ns(o);return}h=h!=null?""+Er(h):"",l=l!=null?""+Er(l):h,U||l===o.value||(o.value=l),o.defaultValue=l}g=g??_,g=typeof g!="function"&&typeof g!="symbol"&&!!g,o.checked=U?o.checked:!!g,o.defaultChecked=!!g,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(o.name=M),ns(o)}function dd(o,l,h){l==="number"&&xl(o.ownerDocument)===o||o.defaultValue===""+h||(o.defaultValue=""+h)}function Fi(o,l,h,g){if(o=o.options,l){l={};for(var _=0;_<h.length;_++)l["$"+h[_]]=!0;for(h=0;h<o.length;h++)_=l.hasOwnProperty("$"+o[h].value),o[h].selected!==_&&(o[h].selected=_),_&&g&&(o[h].defaultSelected=!0)}else{for(h=""+Er(h),l=null,_=0;_<o.length;_++){if(o[_].value===h){o[_].selected=!0,g&&(o[_].defaultSelected=!0);return}l!==null||o[_].disabled||(l=o[_])}l!==null&&(l.selected=!0)}}function FA(o,l,h){if(l!=null&&(l=""+Er(l),l!==o.value&&(o.value=l),h==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=h!=null?""+Er(h):""}function qA(o,l,h,g){if(l==null){if(g!=null){if(h!=null)throw Error(r(92));if(V(g)){if(1<g.length)throw Error(r(93));g=g[0]}h=g}h==null&&(h=""),l=h}h=Er(l),o.defaultValue=h,g=o.textContent,g===h&&g!==""&&g!==null&&(o.value=g),ns(o)}function tu(o,l){if(l){var h=o.firstChild;if(h&&h===o.lastChild&&h.nodeType===3){h.nodeValue=l;return}}o.textContent=l}var D9=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 KA(o,l,h){var g=l.indexOf("--")===0;h==null||typeof h=="boolean"||h===""?g?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":g?o.setProperty(l,h):typeof h!="number"||h===0||D9.has(l)?l==="float"?o.cssFloat=h:o[l]=(""+h).trim():o[l]=h+"px"}function VA(o,l,h){if(l!=null&&typeof l!="object")throw Error(r(62));if(o=o.style,h!=null){for(var g in h)!h.hasOwnProperty(g)||l!=null&&l.hasOwnProperty(g)||(g.indexOf("--")===0?o.setProperty(g,""):g==="float"?o.cssFloat="":o[g]="");for(var _ in l)g=l[_],l.hasOwnProperty(_)&&h[_]!==g&&KA(o,_,g)}else for(var j in l)l.hasOwnProperty(j)&&KA(o,j,l[j])}function Ab(o){if(o.indexOf("-")===-1)return!1;switch(o){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 I9=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"]]),L9=/^[\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 hp(o){return L9.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function qi(){}var Nb=null;function Tb(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var nu=null,ru=null;function YA(o){var l=Zo(o);if(l&&(o=l.stateNode)){var h=o[rr]||null;e:switch(o=l.stateNode,l.type){case"input":if(wl(o,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name),l=h.name,h.type==="radio"&&l!=null){for(h=o;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll('input[name="'+_r(""+l)+'"][type="radio"]'),l=0;l<h.length;l++){var g=h[l];if(g!==o&&g.form===o.form){var _=g[rr]||null;if(!_)throw Error(r(90));wl(g,_.value,_.defaultValue,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name)}}for(l=0;l<h.length;l++)g=h[l],g.form===o.form&&fp(g)}break e;case"textarea":FA(o,h.value,h.defaultValue);break e;case"select":l=h.value,l!=null&&Fi(o,!!h.multiple,l,!1)}}}var Pb=!1;function XA(o,l,h){if(Pb)return o(l,h);Pb=!0;try{var g=o(l);return g}finally{if(Pb=!1,(nu!==null||ru!==null)&&(ev(),nu&&(l=nu,o=ru,ru=nu=null,YA(l),o)))for(l=0;l<o.length;l++)YA(o[l])}}function hd(o,l){var h=o.stateNode;if(h===null)return null;var g=h[rr]||null;if(g===null)return null;h=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(o=o.type,g=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!g;break e;default:o=!1}if(o)return null;if(h&&typeof h!="function")throw Error(r(231,l,typeof h));return h}var Ki=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mb=!1;if(Ki)try{var md={};Object.defineProperty(md,"passive",{get:function(){Mb=!0}}),window.addEventListener("test",md,md),window.removeEventListener("test",md,md)}catch{Mb=!1}var rs=null,Rb=null,mp=null;function GA(){if(mp)return mp;var o,l=Rb,h=l.length,g,_="value"in rs?rs.value:rs.textContent,j=_.length;for(o=0;o<h&&l[o]===_[o];o++);var M=h-o;for(g=1;g<=M&&l[h-g]===_[j-g];g++);return mp=_.slice(o,1<g?1-g:void 0)}function pp(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function vp(){return!0}function WA(){return!1}function jr(o){function l(h,g,_,j,M){this._reactName=h,this._targetInst=_,this.type=g,this.nativeEvent=j,this.target=M,this.currentTarget=null;for(var U in o)o.hasOwnProperty(U)&&(h=o[U],this[U]=h?h(j):j[U]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?vp:WA,this.isPropagationStopped=WA,this}return d(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=vp)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=vp)},persist:function(){},isPersistent:vp}),l}var Sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gp=jr(Sl),pd=d({},Sl,{view:0,detail:0}),z9=jr(pd),kb,Db,vd,yp=d({},pd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lb,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==vd&&(vd&&o.type==="mousemove"?(kb=o.screenX-vd.screenX,Db=o.screenY-vd.screenY):Db=kb=0,vd=o),kb)},movementY:function(o){return"movementY"in o?o.movementY:Db}}),QA=jr(yp),$9=d({},yp,{dataTransfer:0}),B9=jr($9),U9=d({},pd,{relatedTarget:0}),Ib=jr(U9),H9=d({},Sl,{animationName:0,elapsedTime:0,pseudoElement:0}),F9=jr(H9),q9=d({},Sl,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),K9=jr(q9),V9=d({},Sl,{data:0}),ZA=jr(V9),Y9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X9={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"},G9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W9(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=G9[o])?!!l[o]:!1}function Lb(){return W9}var Q9=d({},pd,{key:function(o){if(o.key){var l=Y9[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=pp(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?X9[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lb,charCode:function(o){return o.type==="keypress"?pp(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?pp(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),Z9=jr(Q9),J9=d({},yp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JA=jr(J9),e7=d({},pd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lb}),t7=jr(e7),n7=d({},Sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),r7=jr(n7),a7=d({},yp,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),i7=jr(a7),o7=d({},Sl,{newState:0,oldState:0}),s7=jr(o7),l7=[9,13,27,32],zb=Ki&&"CompositionEvent"in window,gd=null;Ki&&"documentMode"in document&&(gd=document.documentMode);var c7=Ki&&"TextEvent"in window&&!gd,eN=Ki&&(!zb||gd&&8<gd&&11>=gd),tN=" ",nN=!1;function rN(o,l){switch(o){case"keyup":return l7.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aN(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var au=!1;function u7(o,l){switch(o){case"compositionend":return aN(l);case"keypress":return l.which!==32?null:(nN=!0,tN);case"textInput":return o=l.data,o===tN&&nN?null:o;default:return null}}function f7(o,l){if(au)return o==="compositionend"||!zb&&rN(o,l)?(o=GA(),mp=Rb=rs=null,au=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return eN&&l.locale!=="ko"?null:l.data;default:return null}}var d7={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 iN(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!d7[o.type]:l==="textarea"}function oN(o,l,h,g){nu?ru?ru.push(g):ru=[g]:nu=g,l=sv(l,"onChange"),0<l.length&&(h=new gp("onChange","change",null,h,g),o.push({event:h,listeners:l}))}var yd=null,bd=null;function h7(o){H2(o,0)}function bp(o){var l=Jo(o);if(fp(l))return o}function sN(o,l){if(o==="change")return l}var lN=!1;if(Ki){var $b;if(Ki){var Bb="oninput"in document;if(!Bb){var cN=document.createElement("div");cN.setAttribute("oninput","return;"),Bb=typeof cN.oninput=="function"}$b=Bb}else $b=!1;lN=$b&&(!document.documentMode||9<document.documentMode)}function uN(){yd&&(yd.detachEvent("onpropertychange",fN),bd=yd=null)}function fN(o){if(o.propertyName==="value"&&bp(bd)){var l=[];oN(l,bd,o,Tb(o)),XA(h7,l)}}function m7(o,l,h){o==="focusin"?(uN(),yd=l,bd=h,yd.attachEvent("onpropertychange",fN)):o==="focusout"&&uN()}function p7(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return bp(bd)}function v7(o,l){if(o==="click")return bp(l)}function g7(o,l){if(o==="input"||o==="change")return bp(l)}function y7(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Ur=typeof Object.is=="function"?Object.is:y7;function xd(o,l){if(Ur(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var h=Object.keys(o),g=Object.keys(l);if(h.length!==g.length)return!1;for(g=0;g<h.length;g++){var _=h[g];if(!dt.call(l,_)||!Ur(o[_],l[_]))return!1}return!0}function dN(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function hN(o,l){var h=dN(o);o=0;for(var g;h;){if(h.nodeType===3){if(g=o+h.textContent.length,o<=l&&g>=l)return{node:h,offset:l-o};o=g}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=dN(h)}}function mN(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?mN(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function pN(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=xl(o.document);l instanceof o.HTMLIFrameElement;){try{var h=typeof l.contentWindow.location.href=="string"}catch{h=!1}if(h)o=l.contentWindow;else break;l=xl(o.document)}return l}function Ub(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var b7=Ki&&"documentMode"in document&&11>=document.documentMode,iu=null,Hb=null,wd=null,Fb=!1;function vN(o,l,h){var g=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;Fb||iu==null||iu!==xl(g)||(g=iu,"selectionStart"in g&&Ub(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),wd&&xd(wd,g)||(wd=g,g=sv(Hb,"onSelect"),0<g.length&&(l=new gp("onSelect","select",null,l,h),o.push({event:l,listeners:g}),l.target=iu)))}function El(o,l){var h={};return h[o.toLowerCase()]=l.toLowerCase(),h["Webkit"+o]="webkit"+l,h["Moz"+o]="moz"+l,h}var ou={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionrun:El("Transition","TransitionRun"),transitionstart:El("Transition","TransitionStart"),transitioncancel:El("Transition","TransitionCancel"),transitionend:El("Transition","TransitionEnd")},qb={},gN={};Ki&&(gN=document.createElement("div").style,"AnimationEvent"in window||(delete ou.animationend.animation,delete ou.animationiteration.animation,delete ou.animationstart.animation),"TransitionEvent"in window||delete ou.transitionend.transition);function _l(o){if(qb[o])return qb[o];if(!ou[o])return o;var l=ou[o],h;for(h in l)if(l.hasOwnProperty(h)&&h in gN)return qb[o]=l[h];return o}var yN=_l("animationend"),bN=_l("animationiteration"),xN=_l("animationstart"),x7=_l("transitionrun"),w7=_l("transitionstart"),S7=_l("transitioncancel"),wN=_l("transitionend"),SN=new Map,Kb="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(" ");Kb.push("scrollEnd");function Ra(o,l){SN.set(o,l),Hi(l,[o])}var xp=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},la=[],su=0,Vb=0;function wp(){for(var o=su,l=Vb=su=0;l<o;){var h=la[l];la[l++]=null;var g=la[l];la[l++]=null;var _=la[l];la[l++]=null;var j=la[l];if(la[l++]=null,g!==null&&_!==null){var M=g.pending;M===null?_.next=_:(_.next=M.next,M.next=_),g.pending=_}j!==0&&EN(h,_,j)}}function Sp(o,l,h,g){la[su++]=o,la[su++]=l,la[su++]=h,la[su++]=g,Vb|=g,o.lanes|=g,o=o.alternate,o!==null&&(o.lanes|=g)}function Yb(o,l,h,g){return Sp(o,l,h,g),Ep(o)}function jl(o,l){return Sp(o,null,null,l),Ep(o)}function EN(o,l,h){o.lanes|=h;var g=o.alternate;g!==null&&(g.lanes|=h);for(var _=!1,j=o.return;j!==null;)j.childLanes|=h,g=j.alternate,g!==null&&(g.childLanes|=h),j.tag===22&&(o=j.stateNode,o===null||o._visibility&1||(_=!0)),o=j,j=j.return;return o.tag===3?(j=o.stateNode,_&&l!==null&&(_=31-Pn(h),o=j.hiddenUpdates,g=o[_],g===null?o[_]=[l]:g.push(l),l.lane=h|536870912),j):null}function Ep(o){if(50<Fd)throw Fd=0,nw=null,Error(r(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var lu={};function E7(o,l,h,g){this.tag=o,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Hr(o,l,h,g){return new E7(o,l,h,g)}function Xb(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Vi(o,l){var h=o.alternate;return h===null?(h=Hr(o.tag,l,o.key,o.mode),h.elementType=o.elementType,h.type=o.type,h.stateNode=o.stateNode,h.alternate=o,o.alternate=h):(h.pendingProps=l,h.type=o.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=o.flags&65011712,h.childLanes=o.childLanes,h.lanes=o.lanes,h.child=o.child,h.memoizedProps=o.memoizedProps,h.memoizedState=o.memoizedState,h.updateQueue=o.updateQueue,l=o.dependencies,h.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},h.sibling=o.sibling,h.index=o.index,h.ref=o.ref,h.refCleanup=o.refCleanup,h}function _N(o,l){o.flags&=65011714;var h=o.alternate;return h===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=h.childLanes,o.lanes=h.lanes,o.child=h.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=h.memoizedProps,o.memoizedState=h.memoizedState,o.updateQueue=h.updateQueue,o.type=h.type,l=h.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function _p(o,l,h,g,_,j){var M=0;if(g=o,typeof o=="function")Xb(o)&&(M=1);else if(typeof o=="string")M=AK(o,h,Z.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case D:return o=Hr(31,h,l,_),o.elementType=D,o.lanes=j,o;case x:return Ol(h.children,_,j,l);case S:M=8,_|=24;break;case E:return o=Hr(12,h,l,_|2),o.elementType=E,o.lanes=j,o;case T:return o=Hr(13,h,l,_),o.elementType=T,o.lanes=j,o;case N:return o=Hr(19,h,l,_),o.elementType=N,o.lanes=j,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case O:M=10;break e;case C:M=9;break e;case A:M=11;break e;case P:M=14;break e;case k:M=16,g=null;break e}M=29,h=Error(r(130,o===null?"null":typeof o,"")),g=null}return l=Hr(M,h,l,_),l.elementType=o,l.type=g,l.lanes=j,l}function Ol(o,l,h,g){return o=Hr(7,o,g,l),o.lanes=h,o}function Gb(o,l,h){return o=Hr(6,o,null,l),o.lanes=h,o}function jN(o){var l=Hr(18,null,null,0);return l.stateNode=o,l}function Wb(o,l,h){return l=Hr(4,o.children!==null?o.children:[],o.key,l),l.lanes=h,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var ON=new WeakMap;function ca(o,l){if(typeof o=="object"&&o!==null){var h=ON.get(o);return h!==void 0?h:(l={value:o,source:l,stack:Xt(l)},ON.set(o,l),l)}return{value:o,source:l,stack:Xt(l)}}var cu=[],uu=0,jp=null,Sd=0,ua=[],fa=0,as=null,li=1,ci="";function Yi(o,l){cu[uu++]=Sd,cu[uu++]=jp,jp=o,Sd=l}function CN(o,l,h){ua[fa++]=li,ua[fa++]=ci,ua[fa++]=as,as=o;var g=li;o=ci;var _=32-Pn(g)-1;g&=~(1<<_),h+=1;var j=32-Pn(l)+_;if(30<j){var M=_-_%5;j=(g&(1<<M)-1).toString(32),g>>=M,_-=M,li=1<<32-Pn(l)+_|h<<_|g,ci=j+o}else li=1<<j|h<<_|g,ci=o}function Qb(o){o.return!==null&&(Yi(o,1),CN(o,1,0))}function Zb(o){for(;o===jp;)jp=cu[--uu],cu[uu]=null,Sd=cu[--uu],cu[uu]=null;for(;o===as;)as=ua[--fa],ua[fa]=null,ci=ua[--fa],ua[fa]=null,li=ua[--fa],ua[fa]=null}function AN(o,l){ua[fa++]=li,ua[fa++]=ci,ua[fa++]=as,li=l.id,ci=l.overflow,as=o}var Kn=null,Mt=null,nt=!1,is=null,da=!1,Jb=Error(r(519));function os(o){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ed(ca(l,o)),Jb}function NN(o){var l=o.stateNode,h=o.type,g=o.memoizedProps;switch(l[wn]=o,l[rr]=g,h){case"dialog":Ze("cancel",l),Ze("close",l);break;case"iframe":case"object":case"embed":Ze("load",l);break;case"video":case"audio":for(h=0;h<Kd.length;h++)Ze(Kd[h],l);break;case"source":Ze("error",l);break;case"img":case"image":case"link":Ze("error",l),Ze("load",l);break;case"details":Ze("toggle",l);break;case"input":Ze("invalid",l),dp(l,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":Ze("invalid",l);break;case"textarea":Ze("invalid",l),qA(l,g.value,g.defaultValue,g.children)}h=g.children,typeof h!="string"&&typeof h!="number"&&typeof h!="bigint"||l.textContent===""+h||g.suppressHydrationWarning===!0||V2(l.textContent,h)?(g.popover!=null&&(Ze("beforetoggle",l),Ze("toggle",l)),g.onScroll!=null&&Ze("scroll",l),g.onScrollEnd!=null&&Ze("scrollend",l),g.onClick!=null&&(l.onclick=qi),l=!0):l=!1,l||os(o,!0)}function TN(o){for(Kn=o.return;Kn;)switch(Kn.tag){case 5:case 31:case 13:da=!1;return;case 27:case 3:da=!0;return;default:Kn=Kn.return}}function fu(o){if(o!==Kn)return!1;if(!nt)return TN(o),nt=!0,!1;var l=o.tag,h;if((h=l!==3&&l!==27)&&((h=l===5)&&(h=o.type,h=!(h!=="form"&&h!=="button")||gw(o.type,o.memoizedProps)),h=!h),h&&Mt&&os(o),TN(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Mt=tP(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));Mt=tP(o)}else l===27?(l=Mt,xs(o.type)?(o=Sw,Sw=null,Mt=o):Mt=l):Mt=Kn?ma(o.stateNode.nextSibling):null;return!0}function Cl(){Mt=Kn=null,nt=!1}function ex(){var o=is;return o!==null&&(Nr===null?Nr=o:Nr.push.apply(Nr,o),is=null),o}function Ed(o){is===null?is=[o]:is.push(o)}var tx=$(null),Al=null,Xi=null;function ss(o,l,h){G(tx,l._currentValue),l._currentValue=h}function Gi(o){o._currentValue=tx.current,L(tx)}function nx(o,l,h){for(;o!==null;){var g=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),o===h)break;o=o.return}}function rx(o,l,h,g){var _=o.child;for(_!==null&&(_.return=o);_!==null;){var j=_.dependencies;if(j!==null){var M=_.child;j=j.firstContext;e:for(;j!==null;){var U=j;j=_;for(var Q=0;Q<l.length;Q++)if(U.context===l[Q]){j.lanes|=h,U=j.alternate,U!==null&&(U.lanes|=h),nx(j.return,h,o),g||(M=null);break e}j=U.next}}else if(_.tag===18){if(M=_.return,M===null)throw Error(r(341));M.lanes|=h,j=M.alternate,j!==null&&(j.lanes|=h),nx(M,h,o),M=null}else M=_.child;if(M!==null)M.return=_;else for(M=_;M!==null;){if(M===o){M=null;break}if(_=M.sibling,_!==null){_.return=M.return,M=_;break}M=M.return}_=M}}function du(o,l,h,g){o=null;for(var _=l,j=!1;_!==null;){if(!j){if((_.flags&524288)!==0)j=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var M=_.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var U=_.type;Ur(_.pendingProps.value,M.value)||(o!==null?o.push(U):o=[U])}}else if(_===ie.current){if(M=_.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(o!==null?o.push(Wd):o=[Wd])}_=_.return}o!==null&&rx(l,o,h,g),l.flags|=262144}function Op(o){for(o=o.firstContext;o!==null;){if(!Ur(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Nl(o){Al=o,Xi=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Vn(o){return PN(Al,o)}function Cp(o,l){return Al===null&&Nl(o),PN(o,l)}function PN(o,l){var h=l._currentValue;if(l={context:l,memoizedValue:h,next:null},Xi===null){if(o===null)throw Error(r(308));Xi=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else Xi=Xi.next=l;return h}var _7=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(h,g){o.push(g)}};this.abort=function(){l.aborted=!0,o.forEach(function(h){return h()})}},j7=e.unstable_scheduleCallback,O7=e.unstable_NormalPriority,cn={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ax(){return{controller:new _7,data:new Map,refCount:0}}function _d(o){o.refCount--,o.refCount===0&&j7(O7,function(){o.controller.abort()})}var jd=null,ix=0,hu=0,mu=null;function C7(o,l){if(jd===null){var h=jd=[];ix=0,hu=lw(),mu={status:"pending",value:void 0,then:function(g){h.push(g)}}}return ix++,l.then(MN,MN),l}function MN(){if(--ix===0&&jd!==null){mu!==null&&(mu.status="fulfilled");var o=jd;jd=null,hu=0,mu=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function A7(o,l){var h=[],g={status:"pending",value:null,reason:null,then:function(_){h.push(_)}};return o.then(function(){g.status="fulfilled",g.value=l;for(var _=0;_<h.length;_++)(0,h[_])(l)},function(_){for(g.status="rejected",g.reason=_,_=0;_<h.length;_++)(0,h[_])(void 0)}),g}var RN=R.S;R.S=function(o,l){v2=we(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&C7(o,l),RN!==null&&RN(o,l)};var Tl=$(null);function ox(){var o=Tl.current;return o!==null?o:jt.pooledCache}function Ap(o,l){l===null?G(Tl,Tl.current):G(Tl,l.pool)}function kN(){var o=ox();return o===null?null:{parent:cn._currentValue,pool:o}}var pu=Error(r(460)),sx=Error(r(474)),Np=Error(r(542)),Tp={then:function(){}};function DN(o){return o=o.status,o==="fulfilled"||o==="rejected"}function IN(o,l,h){switch(h=o[h],h===void 0?o.push(l):h!==l&&(l.then(qi,qi),l=h),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,zN(o),o;default:if(typeof l.status=="string")l.then(qi,qi);else{if(o=jt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=l,o.status="pending",o.then(function(g){if(l.status==="pending"){var _=l;_.status="fulfilled",_.value=g}},function(g){if(l.status==="pending"){var _=l;_.status="rejected",_.reason=g}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,zN(o),o}throw Ml=l,pu}}function Pl(o){try{var l=o._init;return l(o._payload)}catch(h){throw h!==null&&typeof h=="object"&&typeof h.then=="function"?(Ml=h,pu):h}}var Ml=null;function LN(){if(Ml===null)throw Error(r(459));var o=Ml;return Ml=null,o}function zN(o){if(o===pu||o===Np)throw Error(r(483))}var vu=null,Od=0;function Pp(o){var l=Od;return Od+=1,vu===null&&(vu=[]),IN(vu,o,l)}function Cd(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Mp(o,l){throw l.$$typeof===p?Error(r(525)):(o=Object.prototype.toString.call(l),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function $N(o){function l(ae,te){if(o){var ce=ae.deletions;ce===null?(ae.deletions=[te],ae.flags|=16):ce.push(te)}}function h(ae,te){if(!o)return null;for(;te!==null;)l(ae,te),te=te.sibling;return null}function g(ae){for(var te=new Map;ae!==null;)ae.key!==null?te.set(ae.key,ae):te.set(ae.index,ae),ae=ae.sibling;return te}function _(ae,te){return ae=Vi(ae,te),ae.index=0,ae.sibling=null,ae}function j(ae,te,ce){return ae.index=ce,o?(ce=ae.alternate,ce!==null?(ce=ce.index,ce<te?(ae.flags|=67108866,te):ce):(ae.flags|=67108866,te)):(ae.flags|=1048576,te)}function M(ae){return o&&ae.alternate===null&&(ae.flags|=67108866),ae}function U(ae,te,ce,pe){return te===null||te.tag!==6?(te=Gb(ce,ae.mode,pe),te.return=ae,te):(te=_(te,ce),te.return=ae,te)}function Q(ae,te,ce,pe){var Le=ce.type;return Le===x?he(ae,te,ce.props.children,pe,ce.key):te!==null&&(te.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===k&&Pl(Le)===te.type)?(te=_(te,ce.props),Cd(te,ce),te.return=ae,te):(te=_p(ce.type,ce.key,ce.props,null,ae.mode,pe),Cd(te,ce),te.return=ae,te)}function ue(ae,te,ce,pe){return te===null||te.tag!==4||te.stateNode.containerInfo!==ce.containerInfo||te.stateNode.implementation!==ce.implementation?(te=Wb(ce,ae.mode,pe),te.return=ae,te):(te=_(te,ce.children||[]),te.return=ae,te)}function he(ae,te,ce,pe,Le){return te===null||te.tag!==7?(te=Ol(ce,ae.mode,pe,Le),te.return=ae,te):(te=_(te,ce),te.return=ae,te)}function ve(ae,te,ce){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Gb(""+te,ae.mode,ce),te.return=ae,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case b:return ce=_p(te.type,te.key,te.props,null,ae.mode,ce),Cd(ce,te),ce.return=ae,ce;case w:return te=Wb(te,ae.mode,ce),te.return=ae,te;case k:return te=Pl(te),ve(ae,te,ce)}if(V(te)||I(te))return te=Ol(te,ae.mode,ce,null),te.return=ae,te;if(typeof te.then=="function")return ve(ae,Pp(te),ce);if(te.$$typeof===O)return ve(ae,Cp(ae,te),ce);Mp(ae,te)}return null}function fe(ae,te,ce,pe){var Le=te!==null?te.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Le!==null?null:U(ae,te,""+ce,pe);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case b:return ce.key===Le?Q(ae,te,ce,pe):null;case w:return ce.key===Le?ue(ae,te,ce,pe):null;case k:return ce=Pl(ce),fe(ae,te,ce,pe)}if(V(ce)||I(ce))return Le!==null?null:he(ae,te,ce,pe,null);if(typeof ce.then=="function")return fe(ae,te,Pp(ce),pe);if(ce.$$typeof===O)return fe(ae,te,Cp(ae,ce),pe);Mp(ae,ce)}return null}function de(ae,te,ce,pe,Le){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ae=ae.get(ce)||null,U(te,ae,""+pe,Le);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case b:return ae=ae.get(pe.key===null?ce:pe.key)||null,Q(te,ae,pe,Le);case w:return ae=ae.get(pe.key===null?ce:pe.key)||null,ue(te,ae,pe,Le);case k:return pe=Pl(pe),de(ae,te,ce,pe,Le)}if(V(pe)||I(pe))return ae=ae.get(ce)||null,he(te,ae,pe,Le,null);if(typeof pe.then=="function")return de(ae,te,ce,Pp(pe),Le);if(pe.$$typeof===O)return de(ae,te,ce,Cp(te,pe),Le);Mp(te,pe)}return null}function Ce(ae,te,ce,pe){for(var Le=null,lt=null,Re=te,Ke=te=0,et=null;Re!==null&&Ke<ce.length;Ke++){Re.index>Ke?(et=Re,Re=null):et=Re.sibling;var ct=fe(ae,Re,ce[Ke],pe);if(ct===null){Re===null&&(Re=et);break}o&&Re&&ct.alternate===null&&l(ae,Re),te=j(ct,te,Ke),lt===null?Le=ct:lt.sibling=ct,lt=ct,Re=et}if(Ke===ce.length)return h(ae,Re),nt&&Yi(ae,Ke),Le;if(Re===null){for(;Ke<ce.length;Ke++)Re=ve(ae,ce[Ke],pe),Re!==null&&(te=j(Re,te,Ke),lt===null?Le=Re:lt.sibling=Re,lt=Re);return nt&&Yi(ae,Ke),Le}for(Re=g(Re);Ke<ce.length;Ke++)et=de(Re,ae,Ke,ce[Ke],pe),et!==null&&(o&&et.alternate!==null&&Re.delete(et.key===null?Ke:et.key),te=j(et,te,Ke),lt===null?Le=et:lt.sibling=et,lt=et);return o&&Re.forEach(function(js){return l(ae,js)}),nt&&Yi(ae,Ke),Le}function ze(ae,te,ce,pe){if(ce==null)throw Error(r(151));for(var Le=null,lt=null,Re=te,Ke=te=0,et=null,ct=ce.next();Re!==null&&!ct.done;Ke++,ct=ce.next()){Re.index>Ke?(et=Re,Re=null):et=Re.sibling;var js=fe(ae,Re,ct.value,pe);if(js===null){Re===null&&(Re=et);break}o&&Re&&js.alternate===null&&l(ae,Re),te=j(js,te,Ke),lt===null?Le=js:lt.sibling=js,lt=js,Re=et}if(ct.done)return h(ae,Re),nt&&Yi(ae,Ke),Le;if(Re===null){for(;!ct.done;Ke++,ct=ce.next())ct=ve(ae,ct.value,pe),ct!==null&&(te=j(ct,te,Ke),lt===null?Le=ct:lt.sibling=ct,lt=ct);return nt&&Yi(ae,Ke),Le}for(Re=g(Re);!ct.done;Ke++,ct=ce.next())ct=de(Re,ae,Ke,ct.value,pe),ct!==null&&(o&&ct.alternate!==null&&Re.delete(ct.key===null?Ke:ct.key),te=j(ct,te,Ke),lt===null?Le=ct:lt.sibling=ct,lt=ct);return o&&Re.forEach(function($K){return l(ae,$K)}),nt&&Yi(ae,Ke),Le}function xt(ae,te,ce,pe){if(typeof ce=="object"&&ce!==null&&ce.type===x&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case b:e:{for(var Le=ce.key;te!==null;){if(te.key===Le){if(Le=ce.type,Le===x){if(te.tag===7){h(ae,te.sibling),pe=_(te,ce.props.children),pe.return=ae,ae=pe;break e}}else if(te.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===k&&Pl(Le)===te.type){h(ae,te.sibling),pe=_(te,ce.props),Cd(pe,ce),pe.return=ae,ae=pe;break e}h(ae,te);break}else l(ae,te);te=te.sibling}ce.type===x?(pe=Ol(ce.props.children,ae.mode,pe,ce.key),pe.return=ae,ae=pe):(pe=_p(ce.type,ce.key,ce.props,null,ae.mode,pe),Cd(pe,ce),pe.return=ae,ae=pe)}return M(ae);case w:e:{for(Le=ce.key;te!==null;){if(te.key===Le)if(te.tag===4&&te.stateNode.containerInfo===ce.containerInfo&&te.stateNode.implementation===ce.implementation){h(ae,te.sibling),pe=_(te,ce.children||[]),pe.return=ae,ae=pe;break e}else{h(ae,te);break}else l(ae,te);te=te.sibling}pe=Wb(ce,ae.mode,pe),pe.return=ae,ae=pe}return M(ae);case k:return ce=Pl(ce),xt(ae,te,ce,pe)}if(V(ce))return Ce(ae,te,ce,pe);if(I(ce)){if(Le=I(ce),typeof Le!="function")throw Error(r(150));return ce=Le.call(ce),ze(ae,te,ce,pe)}if(typeof ce.then=="function")return xt(ae,te,Pp(ce),pe);if(ce.$$typeof===O)return xt(ae,te,Cp(ae,ce),pe);Mp(ae,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,te!==null&&te.tag===6?(h(ae,te.sibling),pe=_(te,ce),pe.return=ae,ae=pe):(h(ae,te),pe=Gb(ce,ae.mode,pe),pe.return=ae,ae=pe),M(ae)):h(ae,te)}return function(ae,te,ce,pe){try{Od=0;var Le=xt(ae,te,ce,pe);return vu=null,Le}catch(Re){if(Re===pu||Re===Np)throw Re;var lt=Hr(29,Re,null,ae.mode);return lt.lanes=pe,lt.return=ae,lt}finally{}}}var Rl=$N(!0),BN=$N(!1),ls=!1;function lx(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cx(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function cs(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function us(o,l,h){var g=o.updateQueue;if(g===null)return null;if(g=g.shared,(ht&2)!==0){var _=g.pending;return _===null?l.next=l:(l.next=_.next,_.next=l),g.pending=l,l=Ep(o),EN(o,null,h),l}return Sp(o,g,l,h),Ep(o)}function Ad(o,l,h){if(l=l.updateQueue,l!==null&&(l=l.shared,(h&4194048)!==0)){var g=l.lanes;g&=o.pendingLanes,h|=g,l.lanes=h,tr(o,h)}}function ux(o,l){var h=o.updateQueue,g=o.alternate;if(g!==null&&(g=g.updateQueue,h===g)){var _=null,j=null;if(h=h.firstBaseUpdate,h!==null){do{var M={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};j===null?_=j=M:j=j.next=M,h=h.next}while(h!==null);j===null?_=j=l:j=j.next=l}else _=j=l;h={baseState:g.baseState,firstBaseUpdate:_,lastBaseUpdate:j,shared:g.shared,callbacks:g.callbacks},o.updateQueue=h;return}o=h.lastBaseUpdate,o===null?h.firstBaseUpdate=l:o.next=l,h.lastBaseUpdate=l}var fx=!1;function Nd(){if(fx){var o=mu;if(o!==null)throw o}}function Td(o,l,h,g){fx=!1;var _=o.updateQueue;ls=!1;var j=_.firstBaseUpdate,M=_.lastBaseUpdate,U=_.shared.pending;if(U!==null){_.shared.pending=null;var Q=U,ue=Q.next;Q.next=null,M===null?j=ue:M.next=ue,M=Q;var he=o.alternate;he!==null&&(he=he.updateQueue,U=he.lastBaseUpdate,U!==M&&(U===null?he.firstBaseUpdate=ue:U.next=ue,he.lastBaseUpdate=Q))}if(j!==null){var ve=_.baseState;M=0,he=ue=Q=null,U=j;do{var fe=U.lane&-536870913,de=fe!==U.lane;if(de?(Je&fe)===fe:(g&fe)===fe){fe!==0&&fe===hu&&(fx=!0),he!==null&&(he=he.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Ce=o,ze=U;fe=l;var xt=h;switch(ze.tag){case 1:if(Ce=ze.payload,typeof Ce=="function"){ve=Ce.call(xt,ve,fe);break e}ve=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=ze.payload,fe=typeof Ce=="function"?Ce.call(xt,ve,fe):Ce,fe==null)break e;ve=d({},ve,fe);break e;case 2:ls=!0}}fe=U.callback,fe!==null&&(o.flags|=64,de&&(o.flags|=8192),de=_.callbacks,de===null?_.callbacks=[fe]:de.push(fe))}else de={lane:fe,tag:U.tag,payload:U.payload,callback:U.callback,next:null},he===null?(ue=he=de,Q=ve):he=he.next=de,M|=fe;if(U=U.next,U===null){if(U=_.shared.pending,U===null)break;de=U,U=de.next,de.next=null,_.lastBaseUpdate=de,_.shared.pending=null}}while(!0);he===null&&(Q=ve),_.baseState=Q,_.firstBaseUpdate=ue,_.lastBaseUpdate=he,j===null&&(_.shared.lanes=0),ps|=M,o.lanes=M,o.memoizedState=ve}}function UN(o,l){if(typeof o!="function")throw Error(r(191,o));o.call(l)}function HN(o,l){var h=o.callbacks;if(h!==null)for(o.callbacks=null,o=0;o<h.length;o++)UN(h[o],l)}var gu=$(null),Rp=$(0);function FN(o,l){o=ao,G(Rp,o),G(gu,l),ao=o|l.baseLanes}function dx(){G(Rp,ao),G(gu,gu.current)}function hx(){ao=Rp.current,L(gu),L(Rp)}var Fr=$(null),ha=null;function fs(o){var l=o.alternate;G(an,an.current&1),G(Fr,o),ha===null&&(l===null||gu.current!==null||l.memoizedState!==null)&&(ha=o)}function mx(o){G(an,an.current),G(Fr,o),ha===null&&(ha=o)}function qN(o){o.tag===22?(G(an,an.current),G(Fr,o),ha===null&&(ha=o)):ds()}function ds(){G(an,an.current),G(Fr,Fr.current)}function qr(o){L(Fr),ha===o&&(ha=null),L(an)}var an=$(0);function kp(o){for(var l=o;l!==null;){if(l.tag===13){var h=l.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||xw(h)||ww(h)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var Wi=0,qe=null,yt=null,un=null,Dp=!1,yu=!1,kl=!1,Ip=0,Pd=0,bu=null,N7=0;function Gt(){throw Error(r(321))}function px(o,l){if(l===null)return!1;for(var h=0;h<l.length&&h<o.length;h++)if(!Ur(o[h],l[h]))return!1;return!0}function vx(o,l,h,g,_,j){return Wi=j,qe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,R.H=o===null||o.memoizedState===null?CT:Px,kl=!1,j=h(g,_),kl=!1,yu&&(j=VN(l,h,g,_)),KN(o),j}function KN(o){R.H=kd;var l=yt!==null&&yt.next!==null;if(Wi=0,un=yt=qe=null,Dp=!1,Pd=0,bu=null,l)throw Error(r(300));o===null||fn||(o=o.dependencies,o!==null&&Op(o)&&(fn=!0))}function VN(o,l,h,g){qe=o;var _=0;do{if(yu&&(bu=null),Pd=0,yu=!1,25<=_)throw Error(r(301));if(_+=1,un=yt=null,o.updateQueue!=null){var j=o.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}R.H=AT,j=l(h,g)}while(yu);return j}function T7(){var o=R.H,l=o.useState()[0];return l=typeof l.then=="function"?Md(l):l,o=o.useState()[0],(yt!==null?yt.memoizedState:null)!==o&&(qe.flags|=1024),l}function gx(){var o=Ip!==0;return Ip=0,o}function yx(o,l,h){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~h}function bx(o){if(Dp){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}Dp=!1}Wi=0,un=yt=qe=null,yu=!1,Pd=Ip=0,bu=null}function hr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?qe.memoizedState=un=o:un=un.next=o,un}function on(){if(yt===null){var o=qe.alternate;o=o!==null?o.memoizedState:null}else o=yt.next;var l=un===null?qe.memoizedState:un.next;if(l!==null)un=l,yt=o;else{if(o===null)throw qe.alternate===null?Error(r(467)):Error(r(310));yt=o,o={memoizedState:yt.memoizedState,baseState:yt.baseState,baseQueue:yt.baseQueue,queue:yt.queue,next:null},un===null?qe.memoizedState=un=o:un=un.next=o}return un}function Lp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Md(o){var l=Pd;return Pd+=1,bu===null&&(bu=[]),o=IN(bu,o,l),l=qe,(un===null?l.memoizedState:un.next)===null&&(l=l.alternate,R.H=l===null||l.memoizedState===null?CT:Px),o}function zp(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Md(o);if(o.$$typeof===O)return Vn(o)}throw Error(r(438,String(o)))}function xx(o){var l=null,h=qe.updateQueue;if(h!==null&&(l=h.memoCache),l==null){var g=qe.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(l={data:g.data.map(function(_){return _.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),h===null&&(h=Lp(),qe.updateQueue=h),h.memoCache=l,h=l.data[l.index],h===void 0)for(h=l.data[l.index]=Array(o),g=0;g<o;g++)h[g]=K;return l.index++,h}function Qi(o,l){return typeof l=="function"?l(o):l}function $p(o){var l=on();return wx(l,yt,o)}function wx(o,l,h){var g=o.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=h;var _=o.baseQueue,j=g.pending;if(j!==null){if(_!==null){var M=_.next;_.next=j.next,j.next=M}l.baseQueue=_=j,g.pending=null}if(j=o.baseState,_===null)o.memoizedState=j;else{l=_.next;var U=M=null,Q=null,ue=l,he=!1;do{var ve=ue.lane&-536870913;if(ve!==ue.lane?(Je&ve)===ve:(Wi&ve)===ve){var fe=ue.revertLane;if(fe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),ve===hu&&(he=!0);else if((Wi&fe)===fe){ue=ue.next,fe===hu&&(he=!0);continue}else ve={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Q===null?(U=Q=ve,M=j):Q=Q.next=ve,qe.lanes|=fe,ps|=fe;ve=ue.action,kl&&h(j,ve),j=ue.hasEagerState?ue.eagerState:h(j,ve)}else fe={lane:ve,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Q===null?(U=Q=fe,M=j):Q=Q.next=fe,qe.lanes|=ve,ps|=ve;ue=ue.next}while(ue!==null&&ue!==l);if(Q===null?M=j:Q.next=U,!Ur(j,o.memoizedState)&&(fn=!0,he&&(h=mu,h!==null)))throw h;o.memoizedState=j,o.baseState=M,o.baseQueue=Q,g.lastRenderedState=j}return _===null&&(g.lanes=0),[o.memoizedState,g.dispatch]}function Sx(o){var l=on(),h=l.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=o;var g=h.dispatch,_=h.pending,j=l.memoizedState;if(_!==null){h.pending=null;var M=_=_.next;do j=o(j,M.action),M=M.next;while(M!==_);Ur(j,l.memoizedState)||(fn=!0),l.memoizedState=j,l.baseQueue===null&&(l.baseState=j),h.lastRenderedState=j}return[j,g]}function YN(o,l,h){var g=qe,_=on(),j=nt;if(j){if(h===void 0)throw Error(r(407));h=h()}else h=l();var M=!Ur((yt||_).memoizedState,h);if(M&&(_.memoizedState=h,fn=!0),_=_.queue,jx(WN.bind(null,g,_,o),[o]),_.getSnapshot!==l||M||un!==null&&un.memoizedState.tag&1){if(g.flags|=2048,xu(9,{destroy:void 0},GN.bind(null,g,_,h,l),null),jt===null)throw Error(r(349));j||(Wi&127)!==0||XN(g,l,h)}return h}function XN(o,l,h){o.flags|=16384,o={getSnapshot:l,value:h},l=qe.updateQueue,l===null?(l=Lp(),qe.updateQueue=l,l.stores=[o]):(h=l.stores,h===null?l.stores=[o]:h.push(o))}function GN(o,l,h,g){l.value=h,l.getSnapshot=g,QN(l)&&ZN(o)}function WN(o,l,h){return h(function(){QN(l)&&ZN(o)})}function QN(o){var l=o.getSnapshot;o=o.value;try{var h=l();return!Ur(o,h)}catch{return!0}}function ZN(o){var l=jl(o,2);l!==null&&Tr(l,o,2)}function Ex(o){var l=hr();if(typeof o=="function"){var h=o;if(o=h(),kl){$r(!0);try{h()}finally{$r(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:o},l}function JN(o,l,h,g){return o.baseState=h,wx(o,yt,typeof g=="function"?g:Qi)}function P7(o,l,h,g,_){if(Hp(o))throw Error(r(485));if(o=l.action,o!==null){var j={payload:_,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){j.listeners.push(M)}};R.T!==null?h(!0):j.isTransition=!1,g(j),h=l.pending,h===null?(j.next=l.pending=j,eT(l,j)):(j.next=h.next,l.pending=h.next=j)}}function eT(o,l){var h=l.action,g=l.payload,_=o.state;if(l.isTransition){var j=R.T,M={};R.T=M;try{var U=h(_,g),Q=R.S;Q!==null&&Q(M,U),tT(o,l,U)}catch(ue){_x(o,l,ue)}finally{j!==null&&M.types!==null&&(j.types=M.types),R.T=j}}else try{j=h(_,g),tT(o,l,j)}catch(ue){_x(o,l,ue)}}function tT(o,l,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(g){nT(o,l,g)},function(g){return _x(o,l,g)}):nT(o,l,h)}function nT(o,l,h){l.status="fulfilled",l.value=h,rT(l),o.state=h,l=o.pending,l!==null&&(h=l.next,h===l?o.pending=null:(h=h.next,l.next=h,eT(o,h)))}function _x(o,l,h){var g=o.pending;if(o.pending=null,g!==null){g=g.next;do l.status="rejected",l.reason=h,rT(l),l=l.next;while(l!==g)}o.action=null}function rT(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function aT(o,l){return l}function iT(o,l){if(nt){var h=jt.formState;if(h!==null){e:{var g=qe;if(nt){if(Mt){t:{for(var _=Mt,j=da;_.nodeType!==8;){if(!j){_=null;break t}if(_=ma(_.nextSibling),_===null){_=null;break t}}j=_.data,_=j==="F!"||j==="F"?_:null}if(_){Mt=ma(_.nextSibling),g=_.data==="F!";break e}}os(g)}g=!1}g&&(l=h[0])}}return h=hr(),h.memoizedState=h.baseState=l,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aT,lastRenderedState:l},h.queue=g,h=_T.bind(null,qe,g),g.dispatch=h,g=Ex(!1),j=Tx.bind(null,qe,!1,g.queue),g=hr(),_={state:l,dispatch:null,action:o,pending:null},g.queue=_,h=P7.bind(null,qe,_,j,h),_.dispatch=h,g.memoizedState=o,[l,h,!1]}function oT(o){var l=on();return sT(l,yt,o)}function sT(o,l,h){if(l=wx(o,l,aT)[0],o=$p(Qi)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var g=Md(l)}catch(M){throw M===pu?Np:M}else g=l;l=on();var _=l.queue,j=_.dispatch;return h!==l.memoizedState&&(qe.flags|=2048,xu(9,{destroy:void 0},M7.bind(null,_,h),null)),[g,j,o]}function M7(o,l){o.action=l}function lT(o){var l=on(),h=yt;if(h!==null)return sT(l,h,o);on(),l=l.memoizedState,h=on();var g=h.queue.dispatch;return h.memoizedState=o,[l,g,!1]}function xu(o,l,h,g){return o={tag:o,create:h,deps:g,inst:l,next:null},l=qe.updateQueue,l===null&&(l=Lp(),qe.updateQueue=l),h=l.lastEffect,h===null?l.lastEffect=o.next=o:(g=h.next,h.next=o,o.next=g,l.lastEffect=o),o}function cT(){return on().memoizedState}function Bp(o,l,h,g){var _=hr();qe.flags|=o,_.memoizedState=xu(1|l,{destroy:void 0},h,g===void 0?null:g)}function Up(o,l,h,g){var _=on();g=g===void 0?null:g;var j=_.memoizedState.inst;yt!==null&&g!==null&&px(g,yt.memoizedState.deps)?_.memoizedState=xu(l,j,h,g):(qe.flags|=o,_.memoizedState=xu(1|l,j,h,g))}function uT(o,l){Bp(8390656,8,o,l)}function jx(o,l){Up(2048,8,o,l)}function R7(o){qe.flags|=4;var l=qe.updateQueue;if(l===null)l=Lp(),qe.updateQueue=l,l.events=[o];else{var h=l.events;h===null?l.events=[o]:h.push(o)}}function fT(o){var l=on().memoizedState;return R7({ref:l,nextImpl:o}),function(){if((ht&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function dT(o,l){return Up(4,2,o,l)}function hT(o,l){return Up(4,4,o,l)}function mT(o,l){if(typeof l=="function"){o=o();var h=l(o);return function(){typeof h=="function"?h():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function pT(o,l,h){h=h!=null?h.concat([o]):null,Up(4,4,mT.bind(null,l,o),h)}function Ox(){}function vT(o,l){var h=on();l=l===void 0?null:l;var g=h.memoizedState;return l!==null&&px(l,g[1])?g[0]:(h.memoizedState=[o,l],o)}function gT(o,l){var h=on();l=l===void 0?null:l;var g=h.memoizedState;if(l!==null&&px(l,g[1]))return g[0];if(g=o(),kl){$r(!0);try{o()}finally{$r(!1)}}return h.memoizedState=[g,l],g}function Cx(o,l,h){return h===void 0||(Wi&1073741824)!==0&&(Je&261930)===0?o.memoizedState=l:(o.memoizedState=h,o=y2(),qe.lanes|=o,ps|=o,h)}function yT(o,l,h,g){return Ur(h,l)?h:gu.current!==null?(o=Cx(o,h,g),Ur(o,l)||(fn=!0),o):(Wi&42)===0||(Wi&1073741824)!==0&&(Je&261930)===0?(fn=!0,o.memoizedState=h):(o=y2(),qe.lanes|=o,ps|=o,l)}function bT(o,l,h,g,_){var j=H.p;H.p=j!==0&&8>j?j:8;var M=R.T,U={};R.T=U,Tx(o,!1,l,h);try{var Q=_(),ue=R.S;if(ue!==null&&ue(U,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var he=A7(Q,g);Rd(o,l,he,Yr(o))}else Rd(o,l,g,Yr(o))}catch(ve){Rd(o,l,{then:function(){},status:"rejected",reason:ve},Yr())}finally{H.p=j,M!==null&&U.types!==null&&(M.types=U.types),R.T=M}}function k7(){}function Ax(o,l,h,g){if(o.tag!==5)throw Error(r(476));var _=xT(o).queue;bT(o,_,l,q,h===null?k7:function(){return wT(o),h(g)})}function xT(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:q},next:null};var h={};return l.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qi,lastRenderedState:h},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function wT(o){var l=xT(o);l.next===null&&(l=o.alternate.memoizedState),Rd(o,l.next.queue,{},Yr())}function Nx(){return Vn(Wd)}function ST(){return on().memoizedState}function ET(){return on().memoizedState}function D7(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var h=Yr();o=cs(h);var g=us(l,o,h);g!==null&&(Tr(g,l,h),Ad(g,l,h)),l={cache:ax()},o.payload=l;return}l=l.return}}function I7(o,l,h){var g=Yr();h={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Hp(o)?jT(l,h):(h=Yb(o,l,h,g),h!==null&&(Tr(h,o,g),OT(h,l,g)))}function _T(o,l,h){var g=Yr();Rd(o,l,h,g)}function Rd(o,l,h,g){var _={lane:g,revertLane:0,gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null};if(Hp(o))jT(l,_);else{var j=o.alternate;if(o.lanes===0&&(j===null||j.lanes===0)&&(j=l.lastRenderedReducer,j!==null))try{var M=l.lastRenderedState,U=j(M,h);if(_.hasEagerState=!0,_.eagerState=U,Ur(U,M))return Sp(o,l,_,0),jt===null&&wp(),!1}catch{}finally{}if(h=Yb(o,l,_,g),h!==null)return Tr(h,o,g),OT(h,l,g),!0}return!1}function Tx(o,l,h,g){if(g={lane:2,revertLane:lw(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Hp(o)){if(l)throw Error(r(479))}else l=Yb(o,h,g,2),l!==null&&Tr(l,o,2)}function Hp(o){var l=o.alternate;return o===qe||l!==null&&l===qe}function jT(o,l){yu=Dp=!0;var h=o.pending;h===null?l.next=l:(l.next=h.next,h.next=l),o.pending=l}function OT(o,l,h){if((h&4194048)!==0){var g=l.lanes;g&=o.pendingLanes,h|=g,l.lanes=h,tr(o,h)}}var kd={readContext:Vn,use:zp,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};kd.useEffectEvent=Gt;var CT={readContext:Vn,use:zp,useCallback:function(o,l){return hr().memoizedState=[o,l===void 0?null:l],o},useContext:Vn,useEffect:uT,useImperativeHandle:function(o,l,h){h=h!=null?h.concat([o]):null,Bp(4194308,4,mT.bind(null,l,o),h)},useLayoutEffect:function(o,l){return Bp(4194308,4,o,l)},useInsertionEffect:function(o,l){Bp(4,2,o,l)},useMemo:function(o,l){var h=hr();l=l===void 0?null:l;var g=o();if(kl){$r(!0);try{o()}finally{$r(!1)}}return h.memoizedState=[g,l],g},useReducer:function(o,l,h){var g=hr();if(h!==void 0){var _=h(l);if(kl){$r(!0);try{h(l)}finally{$r(!1)}}}else _=l;return g.memoizedState=g.baseState=_,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:_},g.queue=o,o=o.dispatch=I7.bind(null,qe,o),[g.memoizedState,o]},useRef:function(o){var l=hr();return o={current:o},l.memoizedState=o},useState:function(o){o=Ex(o);var l=o.queue,h=_T.bind(null,qe,l);return l.dispatch=h,[o.memoizedState,h]},useDebugValue:Ox,useDeferredValue:function(o,l){var h=hr();return Cx(h,o,l)},useTransition:function(){var o=Ex(!1);return o=bT.bind(null,qe,o.queue,!0,!1),hr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,h){var g=qe,_=hr();if(nt){if(h===void 0)throw Error(r(407));h=h()}else{if(h=l(),jt===null)throw Error(r(349));(Je&127)!==0||XN(g,l,h)}_.memoizedState=h;var j={value:h,getSnapshot:l};return _.queue=j,uT(WN.bind(null,g,j,o),[o]),g.flags|=2048,xu(9,{destroy:void 0},GN.bind(null,g,j,h,l),null),h},useId:function(){var o=hr(),l=jt.identifierPrefix;if(nt){var h=ci,g=li;h=(g&~(1<<32-Pn(g)-1)).toString(32)+h,l="_"+l+"R_"+h,h=Ip++,0<h&&(l+="H"+h.toString(32)),l+="_"}else h=N7++,l="_"+l+"r_"+h.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:Nx,useFormState:iT,useActionState:iT,useOptimistic:function(o){var l=hr();l.memoizedState=l.baseState=o;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=h,l=Tx.bind(null,qe,!0,h),h.dispatch=l,[o,l]},useMemoCache:xx,useCacheRefresh:function(){return hr().memoizedState=D7.bind(null,qe)},useEffectEvent:function(o){var l=hr(),h={impl:o};return l.memoizedState=h,function(){if((ht&2)!==0)throw Error(r(440));return h.impl.apply(void 0,arguments)}}},Px={readContext:Vn,use:zp,useCallback:vT,useContext:Vn,useEffect:jx,useImperativeHandle:pT,useInsertionEffect:dT,useLayoutEffect:hT,useMemo:gT,useReducer:$p,useRef:cT,useState:function(){return $p(Qi)},useDebugValue:Ox,useDeferredValue:function(o,l){var h=on();return yT(h,yt.memoizedState,o,l)},useTransition:function(){var o=$p(Qi)[0],l=on().memoizedState;return[typeof o=="boolean"?o:Md(o),l]},useSyncExternalStore:YN,useId:ST,useHostTransitionStatus:Nx,useFormState:oT,useActionState:oT,useOptimistic:function(o,l){var h=on();return JN(h,yt,o,l)},useMemoCache:xx,useCacheRefresh:ET};Px.useEffectEvent=fT;var AT={readContext:Vn,use:zp,useCallback:vT,useContext:Vn,useEffect:jx,useImperativeHandle:pT,useInsertionEffect:dT,useLayoutEffect:hT,useMemo:gT,useReducer:Sx,useRef:cT,useState:function(){return Sx(Qi)},useDebugValue:Ox,useDeferredValue:function(o,l){var h=on();return yt===null?Cx(h,o,l):yT(h,yt.memoizedState,o,l)},useTransition:function(){var o=Sx(Qi)[0],l=on().memoizedState;return[typeof o=="boolean"?o:Md(o),l]},useSyncExternalStore:YN,useId:ST,useHostTransitionStatus:Nx,useFormState:lT,useActionState:lT,useOptimistic:function(o,l){var h=on();return yt!==null?JN(h,yt,o,l):(h.baseState=o,[o,h.queue.dispatch])},useMemoCache:xx,useCacheRefresh:ET};AT.useEffectEvent=fT;function Mx(o,l,h,g){l=o.memoizedState,h=h(g,l),h=h==null?l:d({},l,h),o.memoizedState=h,o.lanes===0&&(o.updateQueue.baseState=h)}var Rx={enqueueSetState:function(o,l,h){o=o._reactInternals;var g=Yr(),_=cs(g);_.payload=l,h!=null&&(_.callback=h),l=us(o,_,g),l!==null&&(Tr(l,o,g),Ad(l,o,g))},enqueueReplaceState:function(o,l,h){o=o._reactInternals;var g=Yr(),_=cs(g);_.tag=1,_.payload=l,h!=null&&(_.callback=h),l=us(o,_,g),l!==null&&(Tr(l,o,g),Ad(l,o,g))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var h=Yr(),g=cs(h);g.tag=2,l!=null&&(g.callback=l),l=us(o,g,h),l!==null&&(Tr(l,o,h),Ad(l,o,h))}};function NT(o,l,h,g,_,j,M){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(g,j,M):l.prototype&&l.prototype.isPureReactComponent?!xd(h,g)||!xd(_,j):!0}function TT(o,l,h,g){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(h,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(h,g),l.state!==o&&Rx.enqueueReplaceState(l,l.state,null)}function Dl(o,l){var h=l;if("ref"in l){h={};for(var g in l)g!=="ref"&&(h[g]=l[g])}if(o=o.defaultProps){h===l&&(h=d({},h));for(var _ in o)h[_]===void 0&&(h[_]=o[_])}return h}function PT(o){xp(o)}function MT(o){console.error(o)}function RT(o){xp(o)}function Fp(o,l){try{var h=o.onUncaughtError;h(l.value,{componentStack:l.stack})}catch(g){setTimeout(function(){throw g})}}function kT(o,l,h){try{var g=o.onCaughtError;g(h.value,{componentStack:h.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function kx(o,l,h){return h=cs(h),h.tag=3,h.payload={element:null},h.callback=function(){Fp(o,l)},h}function DT(o){return o=cs(o),o.tag=3,o}function IT(o,l,h,g){var _=h.type.getDerivedStateFromError;if(typeof _=="function"){var j=g.value;o.payload=function(){return _(j)},o.callback=function(){kT(l,h,g)}}var M=h.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(o.callback=function(){kT(l,h,g),typeof _!="function"&&(vs===null?vs=new Set([this]):vs.add(this));var U=g.stack;this.componentDidCatch(g.value,{componentStack:U!==null?U:""})})}function L7(o,l,h,g,_){if(h.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(l=h.alternate,l!==null&&du(l,h,_,!0),h=Fr.current,h!==null){switch(h.tag){case 31:case 13:return ha===null?tv():h.alternate===null&&Wt===0&&(Wt=3),h.flags&=-257,h.flags|=65536,h.lanes=_,g===Tp?h.flags|=16384:(l=h.updateQueue,l===null?h.updateQueue=new Set([g]):l.add(g),iw(o,g,_)),!1;case 22:return h.flags|=65536,g===Tp?h.flags|=16384:(l=h.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([g])},h.updateQueue=l):(h=l.retryQueue,h===null?l.retryQueue=new Set([g]):h.add(g)),iw(o,g,_)),!1}throw Error(r(435,h.tag))}return iw(o,g,_),tv(),!1}if(nt)return l=Fr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=_,g!==Jb&&(o=Error(r(422),{cause:g}),Ed(ca(o,h)))):(g!==Jb&&(l=Error(r(423),{cause:g}),Ed(ca(l,h))),o=o.current.alternate,o.flags|=65536,_&=-_,o.lanes|=_,g=ca(g,h),_=kx(o.stateNode,g,_),ux(o,_),Wt!==4&&(Wt=2)),!1;var j=Error(r(520),{cause:g});if(j=ca(j,h),Hd===null?Hd=[j]:Hd.push(j),Wt!==4&&(Wt=2),l===null)return!0;g=ca(g,h),h=l;do{switch(h.tag){case 3:return h.flags|=65536,o=_&-_,h.lanes|=o,o=kx(h.stateNode,g,o),ux(h,o),!1;case 1:if(l=h.type,j=h.stateNode,(h.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(vs===null||!vs.has(j))))return h.flags|=65536,_&=-_,h.lanes|=_,_=DT(_),IT(_,o,h,g),ux(h,_),!1}h=h.return}while(h!==null);return!1}var Dx=Error(r(461)),fn=!1;function Yn(o,l,h,g){l.child=o===null?BN(l,null,h,g):Rl(l,o.child,h,g)}function LT(o,l,h,g,_){h=h.render;var j=l.ref;if("ref"in g){var M={};for(var U in g)U!=="ref"&&(M[U]=g[U])}else M=g;return Nl(l),g=vx(o,l,h,M,j,_),U=gx(),o!==null&&!fn?(yx(o,l,_),Zi(o,l,_)):(nt&&U&&Qb(l),l.flags|=1,Yn(o,l,g,_),l.child)}function zT(o,l,h,g,_){if(o===null){var j=h.type;return typeof j=="function"&&!Xb(j)&&j.defaultProps===void 0&&h.compare===null?(l.tag=15,l.type=j,$T(o,l,j,g,_)):(o=_p(h.type,null,g,l,l.mode,_),o.ref=l.ref,o.return=l,l.child=o)}if(j=o.child,!Fx(o,_)){var M=j.memoizedProps;if(h=h.compare,h=h!==null?h:xd,h(M,g)&&o.ref===l.ref)return Zi(o,l,_)}return l.flags|=1,o=Vi(j,g),o.ref=l.ref,o.return=l,l.child=o}function $T(o,l,h,g,_){if(o!==null){var j=o.memoizedProps;if(xd(j,g)&&o.ref===l.ref)if(fn=!1,l.pendingProps=g=j,Fx(o,_))(o.flags&131072)!==0&&(fn=!0);else return l.lanes=o.lanes,Zi(o,l,_)}return Ix(o,l,h,g,_)}function BT(o,l,h,g){var _=g.children,j=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((l.flags&128)!==0){if(j=j!==null?j.baseLanes|h:h,o!==null){for(g=l.child=o.child,_=0;g!==null;)_=_|g.lanes|g.childLanes,g=g.sibling;g=_&~j}else g=0,l.child=null;return UT(o,l,j,h,g)}if((h&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&Ap(l,j!==null?j.cachePool:null),j!==null?FN(l,j):dx(),qN(l);else return g=l.lanes=536870912,UT(o,l,j!==null?j.baseLanes|h:h,h,g)}else j!==null?(Ap(l,j.cachePool),FN(l,j),ds(),l.memoizedState=null):(o!==null&&Ap(l,null),dx(),ds());return Yn(o,l,_,h),l.child}function Dd(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function UT(o,l,h,g,_){var j=ox();return j=j===null?null:{parent:cn._currentValue,pool:j},l.memoizedState={baseLanes:h,cachePool:j},o!==null&&Ap(l,null),dx(),qN(l),o!==null&&du(o,l,g,!0),l.childLanes=_,null}function qp(o,l){return l=Vp({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function HT(o,l,h){return Rl(l,o.child,null,h),o=qp(l,l.pendingProps),o.flags|=2,qr(l),l.memoizedState=null,o}function z7(o,l,h){var g=l.pendingProps,_=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(nt){if(g.mode==="hidden")return o=qp(l,g),l.lanes=536870912,Dd(null,o);if(mx(l),(o=Mt)?(o=eP(o,da),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:as!==null?{id:li,overflow:ci}:null,retryLane:536870912,hydrationErrors:null},h=jN(o),h.return=l,l.child=h,Kn=l,Mt=null)):o=null,o===null)throw os(l);return l.lanes=536870912,null}return qp(l,g)}var j=o.memoizedState;if(j!==null){var M=j.dehydrated;if(mx(l),_)if(l.flags&256)l.flags&=-257,l=HT(o,l,h);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(r(558));else if(fn||du(o,l,h,!1),_=(h&o.childLanes)!==0,fn||_){if(g=jt,g!==null&&(M=nr(g,h),M!==0&&M!==j.retryLane))throw j.retryLane=M,jl(o,M),Tr(g,o,M),Dx;tv(),l=HT(o,l,h)}else o=j.treeContext,Mt=ma(M.nextSibling),Kn=l,nt=!0,is=null,da=!1,o!==null&&AN(l,o),l=qp(l,g),l.flags|=4096;return l}return o=Vi(o.child,{mode:g.mode,children:g.children}),o.ref=l.ref,l.child=o,o.return=l,o}function Kp(o,l){var h=l.ref;if(h===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof h!="function"&&typeof h!="object")throw Error(r(284));(o===null||o.ref!==h)&&(l.flags|=4194816)}}function Ix(o,l,h,g,_){return Nl(l),h=vx(o,l,h,g,void 0,_),g=gx(),o!==null&&!fn?(yx(o,l,_),Zi(o,l,_)):(nt&&g&&Qb(l),l.flags|=1,Yn(o,l,h,_),l.child)}function FT(o,l,h,g,_,j){return Nl(l),l.updateQueue=null,h=VN(l,g,h,_),KN(o),g=gx(),o!==null&&!fn?(yx(o,l,j),Zi(o,l,j)):(nt&&g&&Qb(l),l.flags|=1,Yn(o,l,h,j),l.child)}function qT(o,l,h,g,_){if(Nl(l),l.stateNode===null){var j=lu,M=h.contextType;typeof M=="object"&&M!==null&&(j=Vn(M)),j=new h(g,j),l.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=Rx,l.stateNode=j,j._reactInternals=l,j=l.stateNode,j.props=g,j.state=l.memoizedState,j.refs={},lx(l),M=h.contextType,j.context=typeof M=="object"&&M!==null?Vn(M):lu,j.state=l.memoizedState,M=h.getDerivedStateFromProps,typeof M=="function"&&(Mx(l,h,M,g),j.state=l.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(M=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),M!==j.state&&Rx.enqueueReplaceState(j,j.state,null),Td(l,g,j,_),Nd(),j.state=l.memoizedState),typeof j.componentDidMount=="function"&&(l.flags|=4194308),g=!0}else if(o===null){j=l.stateNode;var U=l.memoizedProps,Q=Dl(h,U);j.props=Q;var ue=j.context,he=h.contextType;M=lu,typeof he=="object"&&he!==null&&(M=Vn(he));var ve=h.getDerivedStateFromProps;he=typeof ve=="function"||typeof j.getSnapshotBeforeUpdate=="function",U=l.pendingProps!==U,he||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(U||ue!==M)&&TT(l,j,g,M),ls=!1;var fe=l.memoizedState;j.state=fe,Td(l,g,j,_),Nd(),ue=l.memoizedState,U||fe!==ue||ls?(typeof ve=="function"&&(Mx(l,h,ve,g),ue=l.memoizedState),(Q=ls||NT(l,h,Q,g,fe,ue,M))?(he||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(l.flags|=4194308)):(typeof j.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=ue),j.props=g,j.state=ue,j.context=M,g=Q):(typeof j.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{j=l.stateNode,cx(o,l),M=l.memoizedProps,he=Dl(h,M),j.props=he,ve=l.pendingProps,fe=j.context,ue=h.contextType,Q=lu,typeof ue=="object"&&ue!==null&&(Q=Vn(ue)),U=h.getDerivedStateFromProps,(ue=typeof U=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(M!==ve||fe!==Q)&&TT(l,j,g,Q),ls=!1,fe=l.memoizedState,j.state=fe,Td(l,g,j,_),Nd();var de=l.memoizedState;M!==ve||fe!==de||ls||o!==null&&o.dependencies!==null&&Op(o.dependencies)?(typeof U=="function"&&(Mx(l,h,U,g),de=l.memoizedState),(he=ls||NT(l,h,he,g,fe,de,Q)||o!==null&&o.dependencies!==null&&Op(o.dependencies))?(ue||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(g,de,Q),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(g,de,Q)),typeof j.componentDidUpdate=="function"&&(l.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof j.componentDidUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=de),j.props=g,j.state=de,j.context=Q,g=he):(typeof j.componentDidUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=1024),g=!1)}return j=g,Kp(o,l),g=(l.flags&128)!==0,j||g?(j=l.stateNode,h=g&&typeof h.getDerivedStateFromError!="function"?null:j.render(),l.flags|=1,o!==null&&g?(l.child=Rl(l,o.child,null,_),l.child=Rl(l,null,h,_)):Yn(o,l,h,_),l.memoizedState=j.state,o=l.child):o=Zi(o,l,_),o}function KT(o,l,h,g){return Cl(),l.flags|=256,Yn(o,l,h,g),l.child}var Lx={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zx(o){return{baseLanes:o,cachePool:kN()}}function $x(o,l,h){return o=o!==null?o.childLanes&~h:0,l&&(o|=Vr),o}function VT(o,l,h){var g=l.pendingProps,_=!1,j=(l.flags&128)!==0,M;if((M=j)||(M=o!==null&&o.memoizedState===null?!1:(an.current&2)!==0),M&&(_=!0,l.flags&=-129),M=(l.flags&32)!==0,l.flags&=-33,o===null){if(nt){if(_?fs(l):ds(),(o=Mt)?(o=eP(o,da),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:as!==null?{id:li,overflow:ci}:null,retryLane:536870912,hydrationErrors:null},h=jN(o),h.return=l,l.child=h,Kn=l,Mt=null)):o=null,o===null)throw os(l);return ww(o)?l.lanes=32:l.lanes=536870912,null}var U=g.children;return g=g.fallback,_?(ds(),_=l.mode,U=Vp({mode:"hidden",children:U},_),g=Ol(g,_,h,null),U.return=l,g.return=l,U.sibling=g,l.child=U,g=l.child,g.memoizedState=zx(h),g.childLanes=$x(o,M,h),l.memoizedState=Lx,Dd(null,g)):(fs(l),Bx(l,U))}var Q=o.memoizedState;if(Q!==null&&(U=Q.dehydrated,U!==null)){if(j)l.flags&256?(fs(l),l.flags&=-257,l=Ux(o,l,h)):l.memoizedState!==null?(ds(),l.child=o.child,l.flags|=128,l=null):(ds(),U=g.fallback,_=l.mode,g=Vp({mode:"visible",children:g.children},_),U=Ol(U,_,h,null),U.flags|=2,g.return=l,U.return=l,g.sibling=U,l.child=g,Rl(l,o.child,null,h),g=l.child,g.memoizedState=zx(h),g.childLanes=$x(o,M,h),l.memoizedState=Lx,l=Dd(null,g));else if(fs(l),ww(U)){if(M=U.nextSibling&&U.nextSibling.dataset,M)var ue=M.dgst;M=ue,g=Error(r(419)),g.stack="",g.digest=M,Ed({value:g,source:null,stack:null}),l=Ux(o,l,h)}else if(fn||du(o,l,h,!1),M=(h&o.childLanes)!==0,fn||M){if(M=jt,M!==null&&(g=nr(M,h),g!==0&&g!==Q.retryLane))throw Q.retryLane=g,jl(o,g),Tr(M,o,g),Dx;xw(U)||tv(),l=Ux(o,l,h)}else xw(U)?(l.flags|=192,l.child=o.child,l=null):(o=Q.treeContext,Mt=ma(U.nextSibling),Kn=l,nt=!0,is=null,da=!1,o!==null&&AN(l,o),l=Bx(l,g.children),l.flags|=4096);return l}return _?(ds(),U=g.fallback,_=l.mode,Q=o.child,ue=Q.sibling,g=Vi(Q,{mode:"hidden",children:g.children}),g.subtreeFlags=Q.subtreeFlags&65011712,ue!==null?U=Vi(ue,U):(U=Ol(U,_,h,null),U.flags|=2),U.return=l,g.return=l,g.sibling=U,l.child=g,Dd(null,g),g=l.child,U=o.child.memoizedState,U===null?U=zx(h):(_=U.cachePool,_!==null?(Q=cn._currentValue,_=_.parent!==Q?{parent:Q,pool:Q}:_):_=kN(),U={baseLanes:U.baseLanes|h,cachePool:_}),g.memoizedState=U,g.childLanes=$x(o,M,h),l.memoizedState=Lx,Dd(o.child,g)):(fs(l),h=o.child,o=h.sibling,h=Vi(h,{mode:"visible",children:g.children}),h.return=l,h.sibling=null,o!==null&&(M=l.deletions,M===null?(l.deletions=[o],l.flags|=16):M.push(o)),l.child=h,l.memoizedState=null,h)}function Bx(o,l){return l=Vp({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function Vp(o,l){return o=Hr(22,o,null,l),o.lanes=0,o}function Ux(o,l,h){return Rl(l,o.child,null,h),o=Bx(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function YT(o,l,h){o.lanes|=l;var g=o.alternate;g!==null&&(g.lanes|=l),nx(o.return,l,h)}function Hx(o,l,h,g,_,j){var M=o.memoizedState;M===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:h,tailMode:_,treeForkCount:j}:(M.isBackwards=l,M.rendering=null,M.renderingStartTime=0,M.last=g,M.tail=h,M.tailMode=_,M.treeForkCount=j)}function XT(o,l,h){var g=l.pendingProps,_=g.revealOrder,j=g.tail;g=g.children;var M=an.current,U=(M&2)!==0;if(U?(M=M&1|2,l.flags|=128):M&=1,G(an,M),Yn(o,l,g,h),g=nt?Sd:0,!U&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&YT(o,h,l);else if(o.tag===19)YT(o,h,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(_){case"forwards":for(h=l.child,_=null;h!==null;)o=h.alternate,o!==null&&kp(o)===null&&(_=h),h=h.sibling;h=_,h===null?(_=l.child,l.child=null):(_=h.sibling,h.sibling=null),Hx(l,!1,_,h,j,g);break;case"backwards":case"unstable_legacy-backwards":for(h=null,_=l.child,l.child=null;_!==null;){if(o=_.alternate,o!==null&&kp(o)===null){l.child=_;break}o=_.sibling,_.sibling=h,h=_,_=o}Hx(l,!0,h,null,j,g);break;case"together":Hx(l,!1,null,null,void 0,g);break;default:l.memoizedState=null}return l.child}function Zi(o,l,h){if(o!==null&&(l.dependencies=o.dependencies),ps|=l.lanes,(h&l.childLanes)===0)if(o!==null){if(du(o,l,h,!1),(h&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(r(153));if(l.child!==null){for(o=l.child,h=Vi(o,o.pendingProps),l.child=h,h.return=l;o.sibling!==null;)o=o.sibling,h=h.sibling=Vi(o,o.pendingProps),h.return=l;h.sibling=null}return l.child}function Fx(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&Op(o)))}function $7(o,l,h){switch(l.tag){case 3:re(l,l.stateNode.containerInfo),ss(l,cn,o.memoizedState.cache),Cl();break;case 27:case 5:le(l);break;case 4:re(l,l.stateNode.containerInfo);break;case 10:ss(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,mx(l),null;break;case 13:var g=l.memoizedState;if(g!==null)return g.dehydrated!==null?(fs(l),l.flags|=128,null):(h&l.child.childLanes)!==0?VT(o,l,h):(fs(l),o=Zi(o,l,h),o!==null?o.sibling:null);fs(l);break;case 19:var _=(o.flags&128)!==0;if(g=(h&l.childLanes)!==0,g||(du(o,l,h,!1),g=(h&l.childLanes)!==0),_){if(g)return XT(o,l,h);l.flags|=128}if(_=l.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),G(an,an.current),g)break;return null;case 22:return l.lanes=0,BT(o,l,h,l.pendingProps);case 24:ss(l,cn,o.memoizedState.cache)}return Zi(o,l,h)}function GT(o,l,h){if(o!==null)if(o.memoizedProps!==l.pendingProps)fn=!0;else{if(!Fx(o,h)&&(l.flags&128)===0)return fn=!1,$7(o,l,h);fn=(o.flags&131072)!==0}else fn=!1,nt&&(l.flags&1048576)!==0&&CN(l,Sd,l.index);switch(l.lanes=0,l.tag){case 16:e:{var g=l.pendingProps;if(o=Pl(l.elementType),l.type=o,typeof o=="function")Xb(o)?(g=Dl(o,g),l.tag=1,l=qT(null,l,o,g,h)):(l.tag=0,l=Ix(null,l,o,g,h));else{if(o!=null){var _=o.$$typeof;if(_===A){l.tag=11,l=LT(null,l,o,g,h);break e}else if(_===P){l.tag=14,l=zT(null,l,o,g,h);break e}}throw l=z(o)||o,Error(r(306,l,""))}}return l;case 0:return Ix(o,l,l.type,l.pendingProps,h);case 1:return g=l.type,_=Dl(g,l.pendingProps),qT(o,l,g,_,h);case 3:e:{if(re(l,l.stateNode.containerInfo),o===null)throw Error(r(387));g=l.pendingProps;var j=l.memoizedState;_=j.element,cx(o,l),Td(l,g,null,h);var M=l.memoizedState;if(g=M.cache,ss(l,cn,g),g!==j.cache&&rx(l,[cn],h,!0),Nd(),g=M.element,j.isDehydrated)if(j={element:g,isDehydrated:!1,cache:M.cache},l.updateQueue.baseState=j,l.memoizedState=j,l.flags&256){l=KT(o,l,g,h);break e}else if(g!==_){_=ca(Error(r(424)),l),Ed(_),l=KT(o,l,g,h);break e}else{switch(o=l.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(Mt=ma(o.firstChild),Kn=l,nt=!0,is=null,da=!0,h=BN(l,null,g,h),l.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling}else{if(Cl(),g===_){l=Zi(o,l,h);break e}Yn(o,l,g,h)}l=l.child}return l;case 26:return Kp(o,l),o===null?(h=oP(l.type,null,l.pendingProps,null))?l.memoizedState=h:nt||(h=l.type,o=l.pendingProps,g=lv(se.current).createElement(h),g[wn]=l,g[rr]=o,Xn(g,h,o),ln(g),l.stateNode=g):l.memoizedState=oP(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return le(l),o===null&&nt&&(g=l.stateNode=rP(l.type,l.pendingProps,se.current),Kn=l,da=!0,_=Mt,xs(l.type)?(Sw=_,Mt=ma(g.firstChild)):Mt=_),Yn(o,l,l.pendingProps.children,h),Kp(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&nt&&((_=g=Mt)&&(g=pK(g,l.type,l.pendingProps,da),g!==null?(l.stateNode=g,Kn=l,Mt=ma(g.firstChild),da=!1,_=!0):_=!1),_||os(l)),le(l),_=l.type,j=l.pendingProps,M=o!==null?o.memoizedProps:null,g=j.children,gw(_,j)?g=null:M!==null&&gw(_,M)&&(l.flags|=32),l.memoizedState!==null&&(_=vx(o,l,T7,null,null,h),Wd._currentValue=_),Kp(o,l),Yn(o,l,g,h),l.child;case 6:return o===null&&nt&&((o=h=Mt)&&(h=vK(h,l.pendingProps,da),h!==null?(l.stateNode=h,Kn=l,Mt=null,o=!0):o=!1),o||os(l)),null;case 13:return VT(o,l,h);case 4:return re(l,l.stateNode.containerInfo),g=l.pendingProps,o===null?l.child=Rl(l,null,g,h):Yn(o,l,g,h),l.child;case 11:return LT(o,l,l.type,l.pendingProps,h);case 7:return Yn(o,l,l.pendingProps,h),l.child;case 8:return Yn(o,l,l.pendingProps.children,h),l.child;case 12:return Yn(o,l,l.pendingProps.children,h),l.child;case 10:return g=l.pendingProps,ss(l,l.type,g.value),Yn(o,l,g.children,h),l.child;case 9:return _=l.type._context,g=l.pendingProps.children,Nl(l),_=Vn(_),g=g(_),l.flags|=1,Yn(o,l,g,h),l.child;case 14:return zT(o,l,l.type,l.pendingProps,h);case 15:return $T(o,l,l.type,l.pendingProps,h);case 19:return XT(o,l,h);case 31:return z7(o,l,h);case 22:return BT(o,l,h,l.pendingProps);case 24:return Nl(l),g=Vn(cn),o===null?(_=ox(),_===null&&(_=jt,j=ax(),_.pooledCache=j,j.refCount++,j!==null&&(_.pooledCacheLanes|=h),_=j),l.memoizedState={parent:g,cache:_},lx(l),ss(l,cn,_)):((o.lanes&h)!==0&&(cx(o,l),Td(l,null,null,h),Nd()),_=o.memoizedState,j=l.memoizedState,_.parent!==g?(_={parent:g,cache:g},l.memoizedState=_,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=_),ss(l,cn,g)):(g=j.cache,ss(l,cn,g),g!==_.cache&&rx(l,[cn],h,!0))),Yn(o,l,l.pendingProps.children,h),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Ji(o){o.flags|=4}function qx(o,l,h,g,_){if((l=(o.mode&32)!==0)&&(l=!1),l){if(o.flags|=16777216,(_&335544128)===_)if(o.stateNode.complete)o.flags|=8192;else if(S2())o.flags|=8192;else throw Ml=Tp,sx}else o.flags&=-16777217}function WT(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!fP(l))if(S2())o.flags|=8192;else throw Ml=Tp,sx}function Yp(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?Mn():536870912,o.lanes|=l,_u|=l)}function Id(o,l){if(!nt)switch(o.tailMode){case"hidden":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?o.tail=null:h.sibling=null;break;case"collapsed":h=o.tail;for(var g=null;h!==null;)h.alternate!==null&&(g=h),h=h.sibling;g===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:g.sibling=null}}function Rt(o){var l=o.alternate!==null&&o.alternate.child===o.child,h=0,g=0;if(l)for(var _=o.child;_!==null;)h|=_.lanes|_.childLanes,g|=_.subtreeFlags&65011712,g|=_.flags&65011712,_.return=o,_=_.sibling;else for(_=o.child;_!==null;)h|=_.lanes|_.childLanes,g|=_.subtreeFlags,g|=_.flags,_.return=o,_=_.sibling;return o.subtreeFlags|=g,o.childLanes=h,l}function B7(o,l,h){var g=l.pendingProps;switch(Zb(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(l),null;case 1:return Rt(l),null;case 3:return h=l.stateNode,g=null,o!==null&&(g=o.memoizedState.cache),l.memoizedState.cache!==g&&(l.flags|=2048),Gi(cn),ee(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(o===null||o.child===null)&&(fu(l)?Ji(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,ex())),Rt(l),null;case 26:var _=l.type,j=l.memoizedState;return o===null?(Ji(l),j!==null?(Rt(l),WT(l,j)):(Rt(l),qx(l,_,null,g,h))):j?j!==o.memoizedState?(Ji(l),Rt(l),WT(l,j)):(Rt(l),l.flags&=-16777217):(o=o.memoizedProps,o!==g&&Ji(l),Rt(l),qx(l,_,o,g,h)),null;case 27:if(me(l),h=se.current,_=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==g&&Ji(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Rt(l),null}o=Z.current,fu(l)?NN(l):(o=rP(_,g,h),l.stateNode=o,Ji(l))}return Rt(l),null;case 5:if(me(l),_=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==g&&Ji(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Rt(l),null}if(j=Z.current,fu(l))NN(l);else{var M=lv(se.current);switch(j){case 1:j=M.createElementNS("http://www.w3.org/2000/svg",_);break;case 2:j=M.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;default:switch(_){case"svg":j=M.createElementNS("http://www.w3.org/2000/svg",_);break;case"math":j=M.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;case"script":j=M.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof g.is=="string"?M.createElement("select",{is:g.is}):M.createElement("select"),g.multiple?j.multiple=!0:g.size&&(j.size=g.size);break;default:j=typeof g.is=="string"?M.createElement(_,{is:g.is}):M.createElement(_)}}j[wn]=l,j[rr]=g;e:for(M=l.child;M!==null;){if(M.tag===5||M.tag===6)j.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===l)break e;for(;M.sibling===null;){if(M.return===null||M.return===l)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}l.stateNode=j;e:switch(Xn(j,_,g),_){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Ji(l)}}return Rt(l),qx(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,h),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==g&&Ji(l);else{if(typeof g!="string"&&l.stateNode===null)throw Error(r(166));if(o=se.current,fu(l)){if(o=l.stateNode,h=l.memoizedProps,g=null,_=Kn,_!==null)switch(_.tag){case 27:case 5:g=_.memoizedProps}o[wn]=l,o=!!(o.nodeValue===h||g!==null&&g.suppressHydrationWarning===!0||V2(o.nodeValue,h)),o||os(l,!0)}else o=lv(o).createTextNode(g),o[wn]=l,l.stateNode=o}return Rt(l),null;case 31:if(h=l.memoizedState,o===null||o.memoizedState!==null){if(g=fu(l),h!==null){if(o===null){if(!g)throw Error(r(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[wn]=l}else Cl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Rt(l),o=!1}else h=ex(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=h),o=!0;if(!o)return l.flags&256?(qr(l),l):(qr(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Rt(l),null;case 13:if(g=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(_=fu(l),g!==null&&g.dehydrated!==null){if(o===null){if(!_)throw Error(r(318));if(_=l.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[wn]=l}else Cl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Rt(l),_=!1}else _=ex(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=_),_=!0;if(!_)return l.flags&256?(qr(l),l):(qr(l),null)}return qr(l),(l.flags&128)!==0?(l.lanes=h,l):(h=g!==null,o=o!==null&&o.memoizedState!==null,h&&(g=l.child,_=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(_=g.alternate.memoizedState.cachePool.pool),j=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(j=g.memoizedState.cachePool.pool),j!==_&&(g.flags|=2048)),h!==o&&h&&(l.child.flags|=8192),Yp(l,l.updateQueue),Rt(l),null);case 4:return ee(),o===null&&dw(l.stateNode.containerInfo),Rt(l),null;case 10:return Gi(l.type),Rt(l),null;case 19:if(L(an),g=l.memoizedState,g===null)return Rt(l),null;if(_=(l.flags&128)!==0,j=g.rendering,j===null)if(_)Id(g,!1);else{if(Wt!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(j=kp(o),j!==null){for(l.flags|=128,Id(g,!1),o=j.updateQueue,l.updateQueue=o,Yp(l,o),l.subtreeFlags=0,o=h,h=l.child;h!==null;)_N(h,o),h=h.sibling;return G(an,an.current&1|2),nt&&Yi(l,g.treeForkCount),l.child}o=o.sibling}g.tail!==null&&we()>Zp&&(l.flags|=128,_=!0,Id(g,!1),l.lanes=4194304)}else{if(!_)if(o=kp(j),o!==null){if(l.flags|=128,_=!0,o=o.updateQueue,l.updateQueue=o,Yp(l,o),Id(g,!0),g.tail===null&&g.tailMode==="hidden"&&!j.alternate&&!nt)return Rt(l),null}else 2*we()-g.renderingStartTime>Zp&&h!==536870912&&(l.flags|=128,_=!0,Id(g,!1),l.lanes=4194304);g.isBackwards?(j.sibling=l.child,l.child=j):(o=g.last,o!==null?o.sibling=j:l.child=j,g.last=j)}return g.tail!==null?(o=g.tail,g.rendering=o,g.tail=o.sibling,g.renderingStartTime=we(),o.sibling=null,h=an.current,G(an,_?h&1|2:h&1),nt&&Yi(l,g.treeForkCount),o):(Rt(l),null);case 22:case 23:return qr(l),hx(),g=l.memoizedState!==null,o!==null?o.memoizedState!==null!==g&&(l.flags|=8192):g&&(l.flags|=8192),g?(h&536870912)!==0&&(l.flags&128)===0&&(Rt(l),l.subtreeFlags&6&&(l.flags|=8192)):Rt(l),h=l.updateQueue,h!==null&&Yp(l,h.retryQueue),h=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==h&&(l.flags|=2048),o!==null&&L(Tl),null;case 24:return h=null,o!==null&&(h=o.memoizedState.cache),l.memoizedState.cache!==h&&(l.flags|=2048),Gi(cn),Rt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function U7(o,l){switch(Zb(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Gi(cn),ee(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return me(l),null;case 31:if(l.memoizedState!==null){if(qr(l),l.alternate===null)throw Error(r(340));Cl()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(qr(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Cl()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return L(an),null;case 4:return ee(),null;case 10:return Gi(l.type),null;case 22:case 23:return qr(l),hx(),o!==null&&L(Tl),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return Gi(cn),null;case 25:return null;default:return null}}function QT(o,l){switch(Zb(l),l.tag){case 3:Gi(cn),ee();break;case 26:case 27:case 5:me(l);break;case 4:ee();break;case 31:l.memoizedState!==null&&qr(l);break;case 13:qr(l);break;case 19:L(an);break;case 10:Gi(l.type);break;case 22:case 23:qr(l),hx(),o!==null&&L(Tl);break;case 24:Gi(cn)}}function Ld(o,l){try{var h=l.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var _=g.next;h=_;do{if((h.tag&o)===o){g=void 0;var j=h.create,M=h.inst;g=j(),M.destroy=g}h=h.next}while(h!==_)}}catch(U){gt(l,l.return,U)}}function hs(o,l,h){try{var g=l.updateQueue,_=g!==null?g.lastEffect:null;if(_!==null){var j=_.next;g=j;do{if((g.tag&o)===o){var M=g.inst,U=M.destroy;if(U!==void 0){M.destroy=void 0,_=l;var Q=h,ue=U;try{ue()}catch(he){gt(_,Q,he)}}}g=g.next}while(g!==j)}}catch(he){gt(l,l.return,he)}}function ZT(o){var l=o.updateQueue;if(l!==null){var h=o.stateNode;try{HN(l,h)}catch(g){gt(o,o.return,g)}}}function JT(o,l,h){h.props=Dl(o.type,o.memoizedProps),h.state=o.memoizedState;try{h.componentWillUnmount()}catch(g){gt(o,l,g)}}function zd(o,l){try{var h=o.ref;if(h!==null){switch(o.tag){case 26:case 27:case 5:var g=o.stateNode;break;case 30:g=o.stateNode;break;default:g=o.stateNode}typeof h=="function"?o.refCleanup=h(g):h.current=g}}catch(_){gt(o,l,_)}}function ui(o,l){var h=o.ref,g=o.refCleanup;if(h!==null)if(typeof g=="function")try{g()}catch(_){gt(o,l,_)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(_){gt(o,l,_)}else h.current=null}function e2(o){var l=o.type,h=o.memoizedProps,g=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":h.autoFocus&&g.focus();break e;case"img":h.src?g.src=h.src:h.srcSet&&(g.srcset=h.srcSet)}}catch(_){gt(o,o.return,_)}}function Kx(o,l,h){try{var g=o.stateNode;cK(g,o.type,h,l),g[rr]=l}catch(_){gt(o,o.return,_)}}function t2(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&xs(o.type)||o.tag===4}function Vx(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||t2(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&xs(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function Yx(o,l,h){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?(h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h).insertBefore(o,l):(l=h.nodeType===9?h.body:h.nodeName==="HTML"?h.ownerDocument.body:h,l.appendChild(o),h=h._reactRootContainer,h!=null||l.onclick!==null||(l.onclick=qi));else if(g!==4&&(g===27&&xs(o.type)&&(h=o.stateNode,l=null),o=o.child,o!==null))for(Yx(o,l,h),o=o.sibling;o!==null;)Yx(o,l,h),o=o.sibling}function Xp(o,l,h){var g=o.tag;if(g===5||g===6)o=o.stateNode,l?h.insertBefore(o,l):h.appendChild(o);else if(g!==4&&(g===27&&xs(o.type)&&(h=o.stateNode),o=o.child,o!==null))for(Xp(o,l,h),o=o.sibling;o!==null;)Xp(o,l,h),o=o.sibling}function n2(o){var l=o.stateNode,h=o.memoizedProps;try{for(var g=o.type,_=l.attributes;_.length;)l.removeAttributeNode(_[0]);Xn(l,g,h),l[wn]=o,l[rr]=h}catch(j){gt(o,o.return,j)}}var eo=!1,dn=!1,Xx=!1,r2=typeof WeakSet=="function"?WeakSet:Set,Rn=null;function H7(o,l){if(o=o.containerInfo,pw=pv,o=pN(o),Ub(o)){if("selectionStart"in o)var h={start:o.selectionStart,end:o.selectionEnd};else e:{h=(h=o.ownerDocument)&&h.defaultView||window;var g=h.getSelection&&h.getSelection();if(g&&g.rangeCount!==0){h=g.anchorNode;var _=g.anchorOffset,j=g.focusNode;g=g.focusOffset;try{h.nodeType,j.nodeType}catch{h=null;break e}var M=0,U=-1,Q=-1,ue=0,he=0,ve=o,fe=null;t:for(;;){for(var de;ve!==h||_!==0&&ve.nodeType!==3||(U=M+_),ve!==j||g!==0&&ve.nodeType!==3||(Q=M+g),ve.nodeType===3&&(M+=ve.nodeValue.length),(de=ve.firstChild)!==null;)fe=ve,ve=de;for(;;){if(ve===o)break t;if(fe===h&&++ue===_&&(U=M),fe===j&&++he===g&&(Q=M),(de=ve.nextSibling)!==null)break;ve=fe,fe=ve.parentNode}ve=de}h=U===-1||Q===-1?null:{start:U,end:Q}}else h=null}h=h||{start:0,end:0}}else h=null;for(vw={focusedElem:o,selectionRange:h},pv=!1,Rn=l;Rn!==null;)if(l=Rn,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Rn=o;else for(;Rn!==null;){switch(l=Rn,j=l.alternate,o=l.flags,l.tag){case 0:if((o&4)!==0&&(o=l.updateQueue,o=o!==null?o.events:null,o!==null))for(h=0;h<o.length;h++)_=o[h],_.ref.impl=_.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&j!==null){o=void 0,h=l,_=j.memoizedProps,j=j.memoizedState,g=h.stateNode;try{var Ce=Dl(h.type,_);o=g.getSnapshotBeforeUpdate(Ce,j),g.__reactInternalSnapshotBeforeUpdate=o}catch(ze){gt(h,h.return,ze)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,h=o.nodeType,h===9)bw(o);else if(h===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":bw(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=l.sibling,o!==null){o.return=l.return,Rn=o;break}Rn=l.return}}function a2(o,l,h){var g=h.flags;switch(h.tag){case 0:case 11:case 15:no(o,h),g&4&&Ld(5,h);break;case 1:if(no(o,h),g&4)if(o=h.stateNode,l===null)try{o.componentDidMount()}catch(M){gt(h,h.return,M)}else{var _=Dl(h.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(_,l,o.__reactInternalSnapshotBeforeUpdate)}catch(M){gt(h,h.return,M)}}g&64&&ZT(h),g&512&&zd(h,h.return);break;case 3:if(no(o,h),g&64&&(o=h.updateQueue,o!==null)){if(l=null,h.child!==null)switch(h.child.tag){case 27:case 5:l=h.child.stateNode;break;case 1:l=h.child.stateNode}try{HN(o,l)}catch(M){gt(h,h.return,M)}}break;case 27:l===null&&g&4&&n2(h);case 26:case 5:no(o,h),l===null&&g&4&&e2(h),g&512&&zd(h,h.return);break;case 12:no(o,h);break;case 31:no(o,h),g&4&&s2(o,h);break;case 13:no(o,h),g&4&&l2(o,h),g&64&&(o=h.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(h=Q7.bind(null,h),gK(o,h))));break;case 22:if(g=h.memoizedState!==null||eo,!g){l=l!==null&&l.memoizedState!==null||dn,_=eo;var j=dn;eo=g,(dn=l)&&!j?ro(o,h,(h.subtreeFlags&8772)!==0):no(o,h),eo=_,dn=j}break;case 30:break;default:no(o,h)}}function i2(o){var l=o.alternate;l!==null&&(o.alternate=null,i2(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&ud(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var zt=null,Or=!1;function to(o,l,h){for(h=h.child;h!==null;)o2(o,l,h),h=h.sibling}function o2(o,l,h){if(qn&&typeof qn.onCommitFiberUnmount=="function")try{qn.onCommitFiberUnmount(zi,h)}catch{}switch(h.tag){case 26:dn||ui(h,l),to(o,l,h),h.memoizedState?h.memoizedState.count--:h.stateNode&&(h=h.stateNode,h.parentNode.removeChild(h));break;case 27:dn||ui(h,l);var g=zt,_=Or;xs(h.type)&&(zt=h.stateNode,Or=!1),to(o,l,h),Yd(h.stateNode),zt=g,Or=_;break;case 5:dn||ui(h,l);case 6:if(g=zt,_=Or,zt=null,to(o,l,h),zt=g,Or=_,zt!==null)if(Or)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(h.stateNode)}catch(j){gt(h,l,j)}else try{zt.removeChild(h.stateNode)}catch(j){gt(h,l,j)}break;case 18:zt!==null&&(Or?(o=zt,Z2(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,h.stateNode),Mu(o)):Z2(zt,h.stateNode));break;case 4:g=zt,_=Or,zt=h.stateNode.containerInfo,Or=!0,to(o,l,h),zt=g,Or=_;break;case 0:case 11:case 14:case 15:hs(2,h,l),dn||hs(4,h,l),to(o,l,h);break;case 1:dn||(ui(h,l),g=h.stateNode,typeof g.componentWillUnmount=="function"&&JT(h,l,g)),to(o,l,h);break;case 21:to(o,l,h);break;case 22:dn=(g=dn)||h.memoizedState!==null,to(o,l,h),dn=g;break;default:to(o,l,h)}}function s2(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Mu(o)}catch(h){gt(l,l.return,h)}}}function l2(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Mu(o)}catch(h){gt(l,l.return,h)}}function F7(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new r2),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new r2),l;default:throw Error(r(435,o.tag))}}function Gp(o,l){var h=F7(o);l.forEach(function(g){if(!h.has(g)){h.add(g);var _=Z7.bind(null,o,g);g.then(_,_)}})}function Cr(o,l){var h=l.deletions;if(h!==null)for(var g=0;g<h.length;g++){var _=h[g],j=o,M=l,U=M;e:for(;U!==null;){switch(U.tag){case 27:if(xs(U.type)){zt=U.stateNode,Or=!1;break e}break;case 5:zt=U.stateNode,Or=!1;break e;case 3:case 4:zt=U.stateNode.containerInfo,Or=!0;break e}U=U.return}if(zt===null)throw Error(r(160));o2(j,M,_),zt=null,Or=!1,j=_.alternate,j!==null&&(j.return=null),_.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)c2(l,o),l=l.sibling}var ka=null;function c2(o,l){var h=o.alternate,g=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Cr(l,o),Ar(o),g&4&&(hs(3,o,o.return),Ld(3,o),hs(5,o,o.return));break;case 1:Cr(l,o),Ar(o),g&512&&(dn||h===null||ui(h,h.return)),g&64&&eo&&(o=o.updateQueue,o!==null&&(g=o.callbacks,g!==null&&(h=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=h===null?g:h.concat(g))));break;case 26:var _=ka;if(Cr(l,o),Ar(o),g&512&&(dn||h===null||ui(h,h.return)),g&4){var j=h!==null?h.memoizedState:null;if(g=o.memoizedState,h===null)if(g===null)if(o.stateNode===null){e:{g=o.type,h=o.memoizedProps,_=_.ownerDocument||_;t:switch(g){case"title":j=_.getElementsByTagName("title")[0],(!j||j[bl]||j[wn]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=_.createElement(g),_.head.insertBefore(j,_.querySelector("head > title"))),Xn(j,g,h),j[wn]=o,ln(j),g=j;break e;case"link":var M=cP("link","href",_).get(g+(h.href||""));if(M){for(var U=0;U<M.length;U++)if(j=M[U],j.getAttribute("href")===(h.href==null||h.href===""?null:h.href)&&j.getAttribute("rel")===(h.rel==null?null:h.rel)&&j.getAttribute("title")===(h.title==null?null:h.title)&&j.getAttribute("crossorigin")===(h.crossOrigin==null?null:h.crossOrigin)){M.splice(U,1);break t}}j=_.createElement(g),Xn(j,g,h),_.head.appendChild(j);break;case"meta":if(M=cP("meta","content",_).get(g+(h.content||""))){for(U=0;U<M.length;U++)if(j=M[U],j.getAttribute("content")===(h.content==null?null:""+h.content)&&j.getAttribute("name")===(h.name==null?null:h.name)&&j.getAttribute("property")===(h.property==null?null:h.property)&&j.getAttribute("http-equiv")===(h.httpEquiv==null?null:h.httpEquiv)&&j.getAttribute("charset")===(h.charSet==null?null:h.charSet)){M.splice(U,1);break t}}j=_.createElement(g),Xn(j,g,h),_.head.appendChild(j);break;default:throw Error(r(468,g))}j[wn]=o,ln(j),g=j}o.stateNode=g}else uP(_,o.type,o.stateNode);else o.stateNode=lP(_,g,o.memoizedProps);else j!==g?(j===null?h.stateNode!==null&&(h=h.stateNode,h.parentNode.removeChild(h)):j.count--,g===null?uP(_,o.type,o.stateNode):lP(_,g,o.memoizedProps)):g===null&&o.stateNode!==null&&Kx(o,o.memoizedProps,h.memoizedProps)}break;case 27:Cr(l,o),Ar(o),g&512&&(dn||h===null||ui(h,h.return)),h!==null&&g&4&&Kx(o,o.memoizedProps,h.memoizedProps);break;case 5:if(Cr(l,o),Ar(o),g&512&&(dn||h===null||ui(h,h.return)),o.flags&32){_=o.stateNode;try{tu(_,"")}catch(Ce){gt(o,o.return,Ce)}}g&4&&o.stateNode!=null&&(_=o.memoizedProps,Kx(o,_,h!==null?h.memoizedProps:_)),g&1024&&(Xx=!0);break;case 6:if(Cr(l,o),Ar(o),g&4){if(o.stateNode===null)throw Error(r(162));g=o.memoizedProps,h=o.stateNode;try{h.nodeValue=g}catch(Ce){gt(o,o.return,Ce)}}break;case 3:if(fv=null,_=ka,ka=cv(l.containerInfo),Cr(l,o),ka=_,Ar(o),g&4&&h!==null&&h.memoizedState.isDehydrated)try{Mu(l.containerInfo)}catch(Ce){gt(o,o.return,Ce)}Xx&&(Xx=!1,u2(o));break;case 4:g=ka,ka=cv(o.stateNode.containerInfo),Cr(l,o),Ar(o),ka=g;break;case 12:Cr(l,o),Ar(o);break;case 31:Cr(l,o),Ar(o),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Gp(o,g)));break;case 13:Cr(l,o),Ar(o),o.child.flags&8192&&o.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Qp=we()),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Gp(o,g)));break;case 22:_=o.memoizedState!==null;var Q=h!==null&&h.memoizedState!==null,ue=eo,he=dn;if(eo=ue||_,dn=he||Q,Cr(l,o),dn=he,eo=ue,Ar(o),g&8192)e:for(l=o.stateNode,l._visibility=_?l._visibility&-2:l._visibility|1,_&&(h===null||Q||eo||dn||Il(o)),h=null,l=o;;){if(l.tag===5||l.tag===26){if(h===null){Q=h=l;try{if(j=Q.stateNode,_)M=j.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{U=Q.stateNode;var ve=Q.memoizedProps.style,fe=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;U.style.display=fe==null||typeof fe=="boolean"?"":(""+fe).trim()}}catch(Ce){gt(Q,Q.return,Ce)}}}else if(l.tag===6){if(h===null){Q=l;try{Q.stateNode.nodeValue=_?"":Q.memoizedProps}catch(Ce){gt(Q,Q.return,Ce)}}}else if(l.tag===18){if(h===null){Q=l;try{var de=Q.stateNode;_?J2(de,!0):J2(Q.stateNode,!1)}catch(Ce){gt(Q,Q.return,Ce)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===o)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break e;for(;l.sibling===null;){if(l.return===null||l.return===o)break e;h===l&&(h=null),l=l.return}h===l&&(h=null),l.sibling.return=l.return,l=l.sibling}g&4&&(g=o.updateQueue,g!==null&&(h=g.retryQueue,h!==null&&(g.retryQueue=null,Gp(o,h))));break;case 19:Cr(l,o),Ar(o),g&4&&(g=o.updateQueue,g!==null&&(o.updateQueue=null,Gp(o,g)));break;case 30:break;case 21:break;default:Cr(l,o),Ar(o)}}function Ar(o){var l=o.flags;if(l&2){try{for(var h,g=o.return;g!==null;){if(t2(g)){h=g;break}g=g.return}if(h==null)throw Error(r(160));switch(h.tag){case 27:var _=h.stateNode,j=Vx(o);Xp(o,j,_);break;case 5:var M=h.stateNode;h.flags&32&&(tu(M,""),h.flags&=-33);var U=Vx(o);Xp(o,U,M);break;case 3:case 4:var Q=h.stateNode.containerInfo,ue=Vx(o);Yx(o,ue,Q);break;default:throw Error(r(161))}}catch(he){gt(o,o.return,he)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function u2(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;u2(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),o=o.sibling}}function no(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)a2(o,l.alternate,l),l=l.sibling}function Il(o){for(o=o.child;o!==null;){var l=o;switch(l.tag){case 0:case 11:case 14:case 15:hs(4,l,l.return),Il(l);break;case 1:ui(l,l.return);var h=l.stateNode;typeof h.componentWillUnmount=="function"&&JT(l,l.return,h),Il(l);break;case 27:Yd(l.stateNode);case 26:case 5:ui(l,l.return),Il(l);break;case 22:l.memoizedState===null&&Il(l);break;case 30:Il(l);break;default:Il(l)}o=o.sibling}}function ro(o,l,h){for(h=h&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var g=l.alternate,_=o,j=l,M=j.flags;switch(j.tag){case 0:case 11:case 15:ro(_,j,h),Ld(4,j);break;case 1:if(ro(_,j,h),g=j,_=g.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(ue){gt(g,g.return,ue)}if(g=j,_=g.updateQueue,_!==null){var U=g.stateNode;try{var Q=_.shared.hiddenCallbacks;if(Q!==null)for(_.shared.hiddenCallbacks=null,_=0;_<Q.length;_++)UN(Q[_],U)}catch(ue){gt(g,g.return,ue)}}h&&M&64&&ZT(j),zd(j,j.return);break;case 27:n2(j);case 26:case 5:ro(_,j,h),h&&g===null&&M&4&&e2(j),zd(j,j.return);break;case 12:ro(_,j,h);break;case 31:ro(_,j,h),h&&M&4&&s2(_,j);break;case 13:ro(_,j,h),h&&M&4&&l2(_,j);break;case 22:j.memoizedState===null&&ro(_,j,h),zd(j,j.return);break;case 30:break;default:ro(_,j,h)}l=l.sibling}}function Gx(o,l){var h=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==h&&(o!=null&&o.refCount++,h!=null&&_d(h))}function Wx(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&_d(o))}function Da(o,l,h,g){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)f2(o,l,h,g),l=l.sibling}function f2(o,l,h,g){var _=l.flags;switch(l.tag){case 0:case 11:case 15:Da(o,l,h,g),_&2048&&Ld(9,l);break;case 1:Da(o,l,h,g);break;case 3:Da(o,l,h,g),_&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&_d(o)));break;case 12:if(_&2048){Da(o,l,h,g),o=l.stateNode;try{var j=l.memoizedProps,M=j.id,U=j.onPostCommit;typeof U=="function"&&U(M,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Q){gt(l,l.return,Q)}}else Da(o,l,h,g);break;case 31:Da(o,l,h,g);break;case 13:Da(o,l,h,g);break;case 23:break;case 22:j=l.stateNode,M=l.alternate,l.memoizedState!==null?j._visibility&2?Da(o,l,h,g):$d(o,l):j._visibility&2?Da(o,l,h,g):(j._visibility|=2,wu(o,l,h,g,(l.subtreeFlags&10256)!==0||!1)),_&2048&&Gx(M,l);break;case 24:Da(o,l,h,g),_&2048&&Wx(l.alternate,l);break;default:Da(o,l,h,g)}}function wu(o,l,h,g,_){for(_=_&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var j=o,M=l,U=h,Q=g,ue=M.flags;switch(M.tag){case 0:case 11:case 15:wu(j,M,U,Q,_),Ld(8,M);break;case 23:break;case 22:var he=M.stateNode;M.memoizedState!==null?he._visibility&2?wu(j,M,U,Q,_):$d(j,M):(he._visibility|=2,wu(j,M,U,Q,_)),_&&ue&2048&&Gx(M.alternate,M);break;case 24:wu(j,M,U,Q,_),_&&ue&2048&&Wx(M.alternate,M);break;default:wu(j,M,U,Q,_)}l=l.sibling}}function $d(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var h=o,g=l,_=g.flags;switch(g.tag){case 22:$d(h,g),_&2048&&Gx(g.alternate,g);break;case 24:$d(h,g),_&2048&&Wx(g.alternate,g);break;default:$d(h,g)}l=l.sibling}}var Bd=8192;function Su(o,l,h){if(o.subtreeFlags&Bd)for(o=o.child;o!==null;)d2(o,l,h),o=o.sibling}function d2(o,l,h){switch(o.tag){case 26:Su(o,l,h),o.flags&Bd&&o.memoizedState!==null&&NK(h,ka,o.memoizedState,o.memoizedProps);break;case 5:Su(o,l,h);break;case 3:case 4:var g=ka;ka=cv(o.stateNode.containerInfo),Su(o,l,h),ka=g;break;case 22:o.memoizedState===null&&(g=o.alternate,g!==null&&g.memoizedState!==null?(g=Bd,Bd=16777216,Su(o,l,h),Bd=g):Su(o,l,h));break;default:Su(o,l,h)}}function h2(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function Ud(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];Rn=g,p2(g,o)}h2(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)m2(o),o=o.sibling}function m2(o){switch(o.tag){case 0:case 11:case 15:Ud(o),o.flags&2048&&hs(9,o,o.return);break;case 3:Ud(o);break;case 12:Ud(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Wp(o)):Ud(o);break;default:Ud(o)}}function Wp(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];Rn=g,p2(g,o)}h2(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:hs(8,l,l.return),Wp(l);break;case 22:h=l.stateNode,h._visibility&2&&(h._visibility&=-3,Wp(l));break;default:Wp(l)}o=o.sibling}}function p2(o,l){for(;Rn!==null;){var h=Rn;switch(h.tag){case 0:case 11:case 15:hs(8,h,l);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var g=h.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:_d(h.memoizedState.cache)}if(g=h.child,g!==null)g.return=h,Rn=g;else e:for(h=o;Rn!==null;){g=Rn;var _=g.sibling,j=g.return;if(i2(g),g===h){Rn=null;break e}if(_!==null){_.return=j,Rn=_;break e}Rn=j}}}var q7={getCacheForType:function(o){var l=Vn(cn),h=l.data.get(o);return h===void 0&&(h=o(),l.data.set(o,h)),h},cacheSignal:function(){return Vn(cn).controller.signal}},K7=typeof WeakMap=="function"?WeakMap:Map,ht=0,jt=null,Qe=null,Je=0,vt=0,Kr=null,ms=!1,Eu=!1,Qx=!1,ao=0,Wt=0,ps=0,Ll=0,Zx=0,Vr=0,_u=0,Hd=null,Nr=null,Jx=!1,Qp=0,v2=0,Zp=1/0,Jp=null,vs=null,Sn=0,gs=null,ju=null,io=0,ew=0,tw=null,g2=null,Fd=0,nw=null;function Yr(){return(ht&2)!==0&&Je!==0?Je&-Je:R.T!==null?lw():cd()}function y2(){if(Vr===0)if((Je&536870912)===0||nt){var o=Go;Go<<=1,(Go&3932160)===0&&(Go=262144),Vr=o}else Vr=536870912;return o=Fr.current,o!==null&&(o.flags|=32),Vr}function Tr(o,l,h){(o===jt&&(vt===2||vt===9)||o.cancelPendingCommit!==null)&&(Ou(o,0),ys(o,Je,Vr,!1)),Pt(o,h),((ht&2)===0||o!==jt)&&(o===jt&&((ht&2)===0&&(Ll|=h),Wt===4&&ys(o,Je,Vr,!1)),fi(o))}function b2(o,l,h){if((ht&6)!==0)throw Error(r(327));var g=!h&&(l&127)===0&&(l&o.expiredLanes)===0||At(o,l),_=g?X7(o,l):aw(o,l,!0),j=g;do{if(_===0){Eu&&!g&&ys(o,l,0,!1);break}else{if(h=o.current.alternate,j&&!V7(h)){_=aw(o,l,!1),j=!1;continue}if(_===2){if(j=l,o.errorRecoveryDisabledLanes&j)var M=0;else M=o.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){l=M;e:{var U=o;_=Hd;var Q=U.current.memoizedState.isDehydrated;if(Q&&(Ou(U,M).flags|=256),M=aw(U,M,!1),M!==2){if(Qx&&!Q){U.errorRecoveryDisabledLanes|=j,Ll|=j,_=4;break e}j=Nr,Nr=_,j!==null&&(Nr===null?Nr=j:Nr.push.apply(Nr,j))}_=M}if(j=!1,_!==2)continue}}if(_===1){Ou(o,0),ys(o,l,0,!0);break}e:{switch(g=o,j=_,j){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:ys(g,l,Vr,!ms);break e;case 2:Nr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(_=Qp+300-we(),10<_)){if(ys(g,l,Vr,!ms),Be(g,0,!0)!==0)break e;io=l,g.timeoutHandle=W2(x2.bind(null,g,h,Nr,Jp,Jx,l,Vr,Ll,_u,ms,j,"Throttled",-0,0),_);break e}x2(g,h,Nr,Jp,Jx,l,Vr,Ll,_u,ms,j,null,-0,0)}}break}while(!0);fi(o)}function x2(o,l,h,g,_,j,M,U,Q,ue,he,ve,fe,de){if(o.timeoutHandle=-1,ve=l.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qi},d2(l,j,ve);var Ce=(j&62914560)===j?Qp-we():(j&4194048)===j?v2-we():0;if(Ce=TK(ve,Ce),Ce!==null){io=j,o.cancelPendingCommit=Ce(A2.bind(null,o,l,j,h,g,_,M,U,Q,he,ve,null,fe,de)),ys(o,j,M,!ue);return}}A2(o,l,j,h,g,_,M,U,Q)}function V7(o){for(var l=o;;){var h=l.tag;if((h===0||h===11||h===15)&&l.flags&16384&&(h=l.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var g=0;g<h.length;g++){var _=h[g],j=_.getSnapshot;_=_.value;try{if(!Ur(j(),_))return!1}catch{return!1}}if(h=l.child,l.subtreeFlags&16384&&h!==null)h.return=l,l=h;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function ys(o,l,h,g){l&=~Zx,l&=~Ll,o.suspendedLanes|=l,o.pingedLanes&=~l,g&&(o.warmLanes|=l),g=o.expirationTimes;for(var _=l;0<_;){var j=31-Pn(_),M=1<<j;g[j]=-1,_&=~M}h!==0&&Bi(o,h,l)}function ev(){return(ht&6)===0?(qd(0),!1):!0}function rw(){if(Qe!==null){if(vt===0)var o=Qe.return;else o=Qe,Xi=Al=null,bx(o),vu=null,Od=0,o=Qe;for(;o!==null;)QT(o.alternate,o),o=o.return;Qe=null}}function Ou(o,l){var h=o.timeoutHandle;h!==-1&&(o.timeoutHandle=-1,dK(h)),h=o.cancelPendingCommit,h!==null&&(o.cancelPendingCommit=null,h()),io=0,rw(),jt=o,Qe=h=Vi(o.current,null),Je=l,vt=0,Kr=null,ms=!1,Eu=At(o,l),Qx=!1,_u=Vr=Zx=Ll=ps=Wt=0,Nr=Hd=null,Jx=!1,(l&8)!==0&&(l|=l&32);var g=o.entangledLanes;if(g!==0)for(o=o.entanglements,g&=l;0<g;){var _=31-Pn(g),j=1<<_;l|=o[_],g&=~j}return ao=l,wp(),h}function w2(o,l){qe=null,R.H=kd,l===pu||l===Np?(l=LN(),vt=3):l===sx?(l=LN(),vt=4):vt=l===Dx?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Kr=l,Qe===null&&(Wt=1,Fp(o,ca(l,o.current)))}function S2(){var o=Fr.current;return o===null?!0:(Je&4194048)===Je?ha===null:(Je&62914560)===Je||(Je&536870912)!==0?o===ha:!1}function E2(){var o=R.H;return R.H=kd,o===null?kd:o}function _2(){var o=R.A;return R.A=q7,o}function tv(){Wt=4,ms||(Je&4194048)!==Je&&Fr.current!==null||(Eu=!0),(ps&134217727)===0&&(Ll&134217727)===0||jt===null||ys(jt,Je,Vr,!1)}function aw(o,l,h){var g=ht;ht|=2;var _=E2(),j=_2();(jt!==o||Je!==l)&&(Jp=null,Ou(o,l)),l=!1;var M=Wt;e:do try{if(vt!==0&&Qe!==null){var U=Qe,Q=Kr;switch(vt){case 8:rw(),M=6;break e;case 3:case 2:case 9:case 6:Fr.current===null&&(l=!0);var ue=vt;if(vt=0,Kr=null,Cu(o,U,Q,ue),h&&Eu){M=0;break e}break;default:ue=vt,vt=0,Kr=null,Cu(o,U,Q,ue)}}Y7(),M=Wt;break}catch(he){w2(o,he)}while(!0);return l&&o.shellSuspendCounter++,Xi=Al=null,ht=g,R.H=_,R.A=j,Qe===null&&(jt=null,Je=0,wp()),M}function Y7(){for(;Qe!==null;)j2(Qe)}function X7(o,l){var h=ht;ht|=2;var g=E2(),_=_2();jt!==o||Je!==l?(Jp=null,Zp=we()+500,Ou(o,l)):Eu=At(o,l);e:do try{if(vt!==0&&Qe!==null){l=Qe;var j=Kr;t:switch(vt){case 1:vt=0,Kr=null,Cu(o,l,j,1);break;case 2:case 9:if(DN(j)){vt=0,Kr=null,O2(l);break}l=function(){vt!==2&&vt!==9||jt!==o||(vt=7),fi(o)},j.then(l,l);break e;case 3:vt=7;break e;case 4:vt=5;break e;case 7:DN(j)?(vt=0,Kr=null,O2(l)):(vt=0,Kr=null,Cu(o,l,j,7));break;case 5:var M=null;switch(Qe.tag){case 26:M=Qe.memoizedState;case 5:case 27:var U=Qe;if(M?fP(M):U.stateNode.complete){vt=0,Kr=null;var Q=U.sibling;if(Q!==null)Qe=Q;else{var ue=U.return;ue!==null?(Qe=ue,nv(ue)):Qe=null}break t}}vt=0,Kr=null,Cu(o,l,j,5);break;case 6:vt=0,Kr=null,Cu(o,l,j,6);break;case 8:rw(),Wt=6;break e;default:throw Error(r(462))}}G7();break}catch(he){w2(o,he)}while(!0);return Xi=Al=null,R.H=g,R.A=_,ht=h,Qe!==null?0:(jt=null,Je=0,wp(),Wt)}function G7(){for(;Qe!==null&&!Lt();)j2(Qe)}function j2(o){var l=GT(o.alternate,o,ao);o.memoizedProps=o.pendingProps,l===null?nv(o):Qe=l}function O2(o){var l=o,h=l.alternate;switch(l.tag){case 15:case 0:l=FT(h,l,l.pendingProps,l.type,void 0,Je);break;case 11:l=FT(h,l,l.pendingProps,l.type.render,l.ref,Je);break;case 5:bx(l);default:QT(h,l),l=Qe=_N(l,ao),l=GT(h,l,ao)}o.memoizedProps=o.pendingProps,l===null?nv(o):Qe=l}function Cu(o,l,h,g){Xi=Al=null,bx(l),vu=null,Od=0;var _=l.return;try{if(L7(o,_,l,h,Je)){Wt=1,Fp(o,ca(h,o.current)),Qe=null;return}}catch(j){if(_!==null)throw Qe=_,j;Wt=1,Fp(o,ca(h,o.current)),Qe=null;return}l.flags&32768?(nt||g===1?o=!0:Eu||(Je&536870912)!==0?o=!1:(ms=o=!0,(g===2||g===9||g===3||g===6)&&(g=Fr.current,g!==null&&g.tag===13&&(g.flags|=16384))),C2(l,o)):nv(l)}function nv(o){var l=o;do{if((l.flags&32768)!==0){C2(l,ms);return}o=l.return;var h=B7(l.alternate,l,ao);if(h!==null){Qe=h;return}if(l=l.sibling,l!==null){Qe=l;return}Qe=l=o}while(l!==null);Wt===0&&(Wt=5)}function C2(o,l){do{var h=U7(o.alternate,o);if(h!==null){h.flags&=32767,Qe=h;return}if(h=o.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!l&&(o=o.sibling,o!==null)){Qe=o;return}Qe=o=h}while(o!==null);Wt=6,Qe=null}function A2(o,l,h,g,_,j,M,U,Q){o.cancelPendingCommit=null;do rv();while(Sn!==0);if((ht&6)!==0)throw Error(r(327));if(l!==null){if(l===o.current)throw Error(r(177));if(j=l.lanes|l.childLanes,j|=Vb,er(o,h,j,M,U,Q),o===jt&&(Qe=jt=null,Je=0),ju=l,gs=o,io=h,ew=j,tw=_,g2=g,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,J7(ai,function(){return R2(),null})):(o.callbackNode=null,o.callbackPriority=0),g=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||g){g=R.T,R.T=null,_=H.p,H.p=2,M=ht,ht|=4;try{H7(o,l,h)}finally{ht=M,H.p=_,R.T=g}}Sn=1,N2(),T2(),P2()}}function N2(){if(Sn===1){Sn=0;var o=gs,l=ju,h=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||h){h=R.T,R.T=null;var g=H.p;H.p=2;var _=ht;ht|=4;try{c2(l,o);var j=vw,M=pN(o.containerInfo),U=j.focusedElem,Q=j.selectionRange;if(M!==U&&U&&U.ownerDocument&&mN(U.ownerDocument.documentElement,U)){if(Q!==null&&Ub(U)){var ue=Q.start,he=Q.end;if(he===void 0&&(he=ue),"selectionStart"in U)U.selectionStart=ue,U.selectionEnd=Math.min(he,U.value.length);else{var ve=U.ownerDocument||document,fe=ve&&ve.defaultView||window;if(fe.getSelection){var de=fe.getSelection(),Ce=U.textContent.length,ze=Math.min(Q.start,Ce),xt=Q.end===void 0?ze:Math.min(Q.end,Ce);!de.extend&&ze>xt&&(M=xt,xt=ze,ze=M);var ae=hN(U,ze),te=hN(U,xt);if(ae&&te&&(de.rangeCount!==1||de.anchorNode!==ae.node||de.anchorOffset!==ae.offset||de.focusNode!==te.node||de.focusOffset!==te.offset)){var ce=ve.createRange();ce.setStart(ae.node,ae.offset),de.removeAllRanges(),ze>xt?(de.addRange(ce),de.extend(te.node,te.offset)):(ce.setEnd(te.node,te.offset),de.addRange(ce))}}}}for(ve=[],de=U;de=de.parentNode;)de.nodeType===1&&ve.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<ve.length;U++){var pe=ve[U];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}pv=!!pw,vw=pw=null}finally{ht=_,H.p=g,R.T=h}}o.current=l,Sn=2}}function T2(){if(Sn===2){Sn=0;var o=gs,l=ju,h=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||h){h=R.T,R.T=null;var g=H.p;H.p=2;var _=ht;ht|=4;try{a2(o,l.alternate,l)}finally{ht=_,H.p=g,R.T=h}}Sn=3}}function P2(){if(Sn===4||Sn===3){Sn=0,Fn();var o=gs,l=ju,h=io,g=g2;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?Sn=5:(Sn=0,ju=gs=null,M2(o,o.pendingLanes));var _=o.pendingLanes;if(_===0&&(vs=null),Br(h),l=l.stateNode,qn&&typeof qn.onCommitFiberRoot=="function")try{qn.onCommitFiberRoot(zi,l,void 0,(l.current.flags&128)===128)}catch{}if(g!==null){l=R.T,_=H.p,H.p=2,R.T=null;try{for(var j=o.onRecoverableError,M=0;M<g.length;M++){var U=g[M];j(U.value,{componentStack:U.stack})}}finally{R.T=l,H.p=_}}(io&3)!==0&&rv(),fi(o),_=o.pendingLanes,(h&261930)!==0&&(_&42)!==0?o===nw?Fd++:(Fd=0,nw=o):Fd=0,qd(0)}}function M2(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,_d(l)))}function rv(){return N2(),T2(),P2(),R2()}function R2(){if(Sn!==5)return!1;var o=gs,l=ew;ew=0;var h=Br(io),g=R.T,_=H.p;try{H.p=32>h?32:h,R.T=null,h=tw,tw=null;var j=gs,M=io;if(Sn=0,ju=gs=null,io=0,(ht&6)!==0)throw Error(r(331));var U=ht;if(ht|=4,m2(j.current),f2(j,j.current,M,h),ht=U,qd(0,!1),qn&&typeof qn.onPostCommitFiberRoot=="function")try{qn.onPostCommitFiberRoot(zi,j)}catch{}return!0}finally{H.p=_,R.T=g,M2(o,l)}}function k2(o,l,h){l=ca(h,l),l=kx(o.stateNode,l,2),o=us(o,l,2),o!==null&&(Pt(o,2),fi(o))}function gt(o,l,h){if(o.tag===3)k2(o,o,h);else for(;l!==null;){if(l.tag===3){k2(l,o,h);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(vs===null||!vs.has(g))){o=ca(h,o),h=DT(2),g=us(l,h,2),g!==null&&(IT(h,g,l,o),Pt(g,2),fi(g));break}}l=l.return}}function iw(o,l,h){var g=o.pingCache;if(g===null){g=o.pingCache=new K7;var _=new Set;g.set(l,_)}else _=g.get(l),_===void 0&&(_=new Set,g.set(l,_));_.has(h)||(Qx=!0,_.add(h),o=W7.bind(null,o,l,h),l.then(o,o))}function W7(o,l,h){var g=o.pingCache;g!==null&&g.delete(l),o.pingedLanes|=o.suspendedLanes&h,o.warmLanes&=~h,jt===o&&(Je&h)===h&&(Wt===4||Wt===3&&(Je&62914560)===Je&&300>we()-Qp?(ht&2)===0&&Ou(o,0):Zx|=h,_u===Je&&(_u=0)),fi(o)}function D2(o,l){l===0&&(l=Mn()),o=jl(o,l),o!==null&&(Pt(o,l),fi(o))}function Q7(o){var l=o.memoizedState,h=0;l!==null&&(h=l.retryLane),D2(o,h)}function Z7(o,l){var h=0;switch(o.tag){case 31:case 13:var g=o.stateNode,_=o.memoizedState;_!==null&&(h=_.retryLane);break;case 19:g=o.stateNode;break;case 22:g=o.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(l),D2(o,h)}function J7(o,l){return Jn(o,l)}var av=null,Au=null,ow=!1,iv=!1,sw=!1,bs=0;function fi(o){o!==Au&&o.next===null&&(Au===null?av=Au=o:Au=Au.next=o),iv=!0,ow||(ow=!0,tK())}function qd(o,l){if(!sw&&iv){sw=!0;do for(var h=!1,g=av;g!==null;){if(o!==0){var _=g.pendingLanes;if(_===0)var j=0;else{var M=g.suspendedLanes,U=g.pingedLanes;j=(1<<31-Pn(42|o)+1)-1,j&=_&~(M&~U),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(h=!0,$2(g,j))}else j=Je,j=Be(g,g===jt?j:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(j&3)===0||At(g,j)||(h=!0,$2(g,j));g=g.next}while(h);sw=!1}}function eK(){I2()}function I2(){iv=ow=!1;var o=0;bs!==0&&fK()&&(o=bs);for(var l=we(),h=null,g=av;g!==null;){var _=g.next,j=L2(g,l);j===0?(g.next=null,h===null?av=_:h.next=_,_===null&&(Au=h)):(h=g,(o!==0||(j&3)!==0)&&(iv=!0)),g=_}Sn!==0&&Sn!==5||qd(o),bs!==0&&(bs=0)}function L2(o,l){for(var h=o.suspendedLanes,g=o.pingedLanes,_=o.expirationTimes,j=o.pendingLanes&-62914561;0<j;){var M=31-Pn(j),U=1<<M,Q=_[M];Q===-1?((U&h)===0||(U&g)!==0)&&(_[M]=sn(U,l)):Q<=l&&(o.expiredLanes|=U),j&=~U}if(l=jt,h=Je,h=Be(o,o===l?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g=o.callbackNode,h===0||o===l&&(vt===2||vt===9)||o.cancelPendingCommit!==null)return g!==null&&g!==null&&Sr(g),o.callbackNode=null,o.callbackPriority=0;if((h&3)===0||At(o,h)){if(l=h&-h,l===o.callbackPriority)return l;switch(g!==null&&Sr(g),Br(h)){case 2:case 8:h=ia;break;case 32:h=ai;break;case 268435456:h=zr;break;default:h=ai}return g=z2.bind(null,o),h=Jn(h,g),o.callbackPriority=l,o.callbackNode=h,l}return g!==null&&g!==null&&Sr(g),o.callbackPriority=2,o.callbackNode=null,2}function z2(o,l){if(Sn!==0&&Sn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var h=o.callbackNode;if(rv()&&o.callbackNode!==h)return null;var g=Je;return g=Be(o,o===jt?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),g===0?null:(b2(o,g,l),L2(o,we()),o.callbackNode!=null&&o.callbackNode===h?z2.bind(null,o):null)}function $2(o,l){if(rv())return null;b2(o,l,!0)}function tK(){hK(function(){(ht&6)!==0?Jn(Ct,eK):I2()})}function lw(){if(bs===0){var o=hu;o===0&&(o=Xo,Xo<<=1,(Xo&261888)===0&&(Xo=256)),bs=o}return bs}function B2(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:hp(""+o)}function U2(o,l){var h=l.ownerDocument.createElement("input");return h.name=l.name,h.value=l.value,o.id&&h.setAttribute("form",o.id),l.parentNode.insertBefore(h,l),o=new FormData(o),h.parentNode.removeChild(h),o}function nK(o,l,h,g,_){if(l==="submit"&&h&&h.stateNode===_){var j=B2((_[rr]||null).action),M=g.submitter;M&&(l=(l=M[rr]||null)?B2(l.formAction):M.getAttribute("formAction"),l!==null&&(j=l,M=null));var U=new gp("action","action",null,g,_);o.push({event:U,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(bs!==0){var Q=M?U2(_,M):new FormData(_);Ax(h,{pending:!0,data:Q,method:_.method,action:j},null,Q)}}else typeof j=="function"&&(U.preventDefault(),Q=M?U2(_,M):new FormData(_),Ax(h,{pending:!0,data:Q,method:_.method,action:j},j,Q))},currentTarget:_}]})}}for(var cw=0;cw<Kb.length;cw++){var uw=Kb[cw],rK=uw.toLowerCase(),aK=uw[0].toUpperCase()+uw.slice(1);Ra(rK,"on"+aK)}Ra(yN,"onAnimationEnd"),Ra(bN,"onAnimationIteration"),Ra(xN,"onAnimationStart"),Ra("dblclick","onDoubleClick"),Ra("focusin","onFocus"),Ra("focusout","onBlur"),Ra(x7,"onTransitionRun"),Ra(w7,"onTransitionStart"),Ra(S7,"onTransitionCancel"),Ra(wN,"onTransitionEnd"),ts("onMouseEnter",["mouseout","mouseover"]),ts("onMouseLeave",["mouseout","mouseover"]),ts("onPointerEnter",["pointerout","pointerover"]),ts("onPointerLeave",["pointerout","pointerover"]),Hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Hi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kd="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(" "),iK=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kd));function H2(o,l){l=(l&4)!==0;for(var h=0;h<o.length;h++){var g=o[h],_=g.event;g=g.listeners;e:{var j=void 0;if(l)for(var M=g.length-1;0<=M;M--){var U=g[M],Q=U.instance,ue=U.currentTarget;if(U=U.listener,Q!==j&&_.isPropagationStopped())break e;j=U,_.currentTarget=ue;try{j(_)}catch(he){xp(he)}_.currentTarget=null,j=Q}else for(M=0;M<g.length;M++){if(U=g[M],Q=U.instance,ue=U.currentTarget,U=U.listener,Q!==j&&_.isPropagationStopped())break e;j=U,_.currentTarget=ue;try{j(_)}catch(he){xp(he)}_.currentTarget=null,j=Q}}}}function Ze(o,l){var h=l[Zc];h===void 0&&(h=l[Zc]=new Set);var g=o+"__bubble";h.has(g)||(F2(l,o,2,!1),h.add(g))}function fw(o,l,h){var g=0;l&&(g|=4),F2(h,o,g,l)}var ov="_reactListening"+Math.random().toString(36).slice(2);function dw(o){if(!o[ov]){o[ov]=!0,sp.forEach(function(h){h!=="selectionchange"&&(iK.has(h)||fw(h,!1,o),fw(h,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[ov]||(l[ov]=!0,fw("selectionchange",!1,l))}}function F2(o,l,h,g){switch(yP(l)){case 2:var _=RK;break;case 8:_=kK;break;default:_=Cw}h=_.bind(null,l,h,o),_=void 0,!Mb||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(_=!0),g?_!==void 0?o.addEventListener(l,h,{capture:!0,passive:_}):o.addEventListener(l,h,!0):_!==void 0?o.addEventListener(l,h,{passive:_}):o.addEventListener(l,h,!1)}function hw(o,l,h,g,_){var j=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var M=g.tag;if(M===3||M===4){var U=g.stateNode.containerInfo;if(U===_)break;if(M===4)for(M=g.return;M!==null;){var Q=M.tag;if((Q===3||Q===4)&&M.stateNode.containerInfo===_)return;M=M.return}for(;U!==null;){if(M=Qo(U),M===null)return;if(Q=M.tag,Q===5||Q===6||Q===26||Q===27){g=j=M;continue e}U=U.parentNode}}g=g.return}XA(function(){var ue=j,he=Tb(h),ve=[];e:{var fe=SN.get(o);if(fe!==void 0){var de=gp,Ce=o;switch(o){case"keypress":if(pp(h)===0)break e;case"keydown":case"keyup":de=Z9;break;case"focusin":Ce="focus",de=Ib;break;case"focusout":Ce="blur",de=Ib;break;case"beforeblur":case"afterblur":de=Ib;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=QA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=B9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=t7;break;case yN:case bN:case xN:de=F9;break;case wN:de=r7;break;case"scroll":case"scrollend":de=z9;break;case"wheel":de=i7;break;case"copy":case"cut":case"paste":de=K9;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=JA;break;case"toggle":case"beforetoggle":de=s7}var ze=(l&4)!==0,xt=!ze&&(o==="scroll"||o==="scrollend"),ae=ze?fe!==null?fe+"Capture":null:fe;ze=[];for(var te=ue,ce;te!==null;){var pe=te;if(ce=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ce===null||ae===null||(pe=hd(te,ae),pe!=null&&ze.push(Vd(te,pe,ce))),xt)break;te=te.return}0<ze.length&&(fe=new de(fe,Ce,null,h,he),ve.push({event:fe,listeners:ze}))}}if((l&7)===0){e:{if(fe=o==="mouseover"||o==="pointerover",de=o==="mouseout"||o==="pointerout",fe&&h!==Nb&&(Ce=h.relatedTarget||h.fromElement)&&(Qo(Ce)||Ce[Ui]))break e;if((de||fe)&&(fe=he.window===he?he:(fe=he.ownerDocument)?fe.defaultView||fe.parentWindow:window,de?(Ce=h.relatedTarget||h.toElement,de=ue,Ce=Ce?Qo(Ce):null,Ce!==null&&(xt=i(Ce),ze=Ce.tag,Ce!==xt||ze!==5&&ze!==27&&ze!==6)&&(Ce=null)):(de=null,Ce=ue),de!==Ce)){if(ze=QA,pe="onMouseLeave",ae="onMouseEnter",te="mouse",(o==="pointerout"||o==="pointerover")&&(ze=JA,pe="onPointerLeave",ae="onPointerEnter",te="pointer"),xt=de==null?fe:Jo(de),ce=Ce==null?fe:Jo(Ce),fe=new ze(pe,te+"leave",de,h,he),fe.target=xt,fe.relatedTarget=ce,pe=null,Qo(he)===ue&&(ze=new ze(ae,te+"enter",Ce,h,he),ze.target=ce,ze.relatedTarget=xt,pe=ze),xt=pe,de&&Ce)t:{for(ze=oK,ae=de,te=Ce,ce=0,pe=ae;pe;pe=ze(pe))ce++;pe=0;for(var Le=te;Le;Le=ze(Le))pe++;for(;0<ce-pe;)ae=ze(ae),ce--;for(;0<pe-ce;)te=ze(te),pe--;for(;ce--;){if(ae===te||te!==null&&ae===te.alternate){ze=ae;break t}ae=ze(ae),te=ze(te)}ze=null}else ze=null;de!==null&&q2(ve,fe,de,ze,!1),Ce!==null&&xt!==null&&q2(ve,xt,Ce,ze,!0)}}e:{if(fe=ue?Jo(ue):window,de=fe.nodeName&&fe.nodeName.toLowerCase(),de==="select"||de==="input"&&fe.type==="file")var lt=sN;else if(iN(fe))if(lN)lt=g7;else{lt=p7;var Re=m7}else de=fe.nodeName,!de||de.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ue&&Ab(ue.elementType)&&(lt=sN):lt=v7;if(lt&&(lt=lt(o,ue))){oN(ve,lt,h,he);break e}Re&&Re(o,fe,ue),o==="focusout"&&ue&&fe.type==="number"&&ue.memoizedProps.value!=null&&dd(fe,"number",fe.value)}switch(Re=ue?Jo(ue):window,o){case"focusin":(iN(Re)||Re.contentEditable==="true")&&(iu=Re,Hb=ue,wd=null);break;case"focusout":wd=Hb=iu=null;break;case"mousedown":Fb=!0;break;case"contextmenu":case"mouseup":case"dragend":Fb=!1,vN(ve,h,he);break;case"selectionchange":if(b7)break;case"keydown":case"keyup":vN(ve,h,he)}var Ke;if(zb)e:{switch(o){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else au?rN(o,h)&&(et="onCompositionEnd"):o==="keydown"&&h.keyCode===229&&(et="onCompositionStart");et&&(eN&&h.locale!=="ko"&&(au||et!=="onCompositionStart"?et==="onCompositionEnd"&&au&&(Ke=GA()):(rs=he,Rb="value"in rs?rs.value:rs.textContent,au=!0)),Re=sv(ue,et),0<Re.length&&(et=new ZA(et,o,null,h,he),ve.push({event:et,listeners:Re}),Ke?et.data=Ke:(Ke=aN(h),Ke!==null&&(et.data=Ke)))),(Ke=c7?u7(o,h):f7(o,h))&&(et=sv(ue,"onBeforeInput"),0<et.length&&(Re=new ZA("onBeforeInput","beforeinput",null,h,he),ve.push({event:Re,listeners:et}),Re.data=Ke)),nK(ve,o,ue,h,he)}H2(ve,l)})}function Vd(o,l,h){return{instance:o,listener:l,currentTarget:h}}function sv(o,l){for(var h=l+"Capture",g=[];o!==null;){var _=o,j=_.stateNode;if(_=_.tag,_!==5&&_!==26&&_!==27||j===null||(_=hd(o,h),_!=null&&g.unshift(Vd(o,_,j)),_=hd(o,l),_!=null&&g.push(Vd(o,_,j))),o.tag===3)return g;o=o.return}return[]}function oK(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function q2(o,l,h,g,_){for(var j=l._reactName,M=[];h!==null&&h!==g;){var U=h,Q=U.alternate,ue=U.stateNode;if(U=U.tag,Q!==null&&Q===g)break;U!==5&&U!==26&&U!==27||ue===null||(Q=ue,_?(ue=hd(h,j),ue!=null&&M.unshift(Vd(h,ue,Q))):_||(ue=hd(h,j),ue!=null&&M.push(Vd(h,ue,Q)))),h=h.return}M.length!==0&&o.push({event:l,listeners:M})}var sK=/\r\n?/g,lK=/\u0000|\uFFFD/g;function K2(o){return(typeof o=="string"?o:""+o).replace(sK,`
`).replace(lK,"")}function V2(o,l){return l=K2(l),K2(o)===l}function bt(o,l,h,g,_,j){switch(h){case"children":typeof g=="string"?l==="body"||l==="textarea"&&g===""||tu(o,g):(typeof g=="number"||typeof g=="bigint")&&l!=="body"&&tu(o,""+g);break;case"className":eu(o,"class",g);break;case"tabIndex":eu(o,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":eu(o,h,g);break;case"style":VA(o,g,j);break;case"data":if(l!=="object"){eu(o,"data",g);break}case"src":case"href":if(g===""&&(l!=="a"||h!=="href")){o.removeAttribute(h);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(h);break}g=hp(""+g),o.setAttribute(h,g);break;case"action":case"formAction":if(typeof g=="function"){o.setAttribute(h,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof j=="function"&&(h==="formAction"?(l!=="input"&&bt(o,l,"name",_.name,_,null),bt(o,l,"formEncType",_.formEncType,_,null),bt(o,l,"formMethod",_.formMethod,_,null),bt(o,l,"formTarget",_.formTarget,_,null)):(bt(o,l,"encType",_.encType,_,null),bt(o,l,"method",_.method,_,null),bt(o,l,"target",_.target,_,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){o.removeAttribute(h);break}g=hp(""+g),o.setAttribute(h,g);break;case"onClick":g!=null&&(o.onclick=qi);break;case"onScroll":g!=null&&Ze("scroll",o);break;case"onScrollEnd":g!=null&&Ze("scrollend",o);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(h=g.__html,h!=null){if(_.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"multiple":o.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":o.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){o.removeAttribute("xlink:href");break}h=hp(""+g),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",h);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(h,""+g):o.removeAttribute(h);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":g&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(h,""):o.removeAttribute(h);break;case"capture":case"download":g===!0?o.setAttribute(h,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?o.setAttribute(h,g):o.removeAttribute(h);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?o.setAttribute(h,g):o.removeAttribute(h);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?o.removeAttribute(h):o.setAttribute(h,g);break;case"popover":Ze("beforetoggle",o),Ze("toggle",o),Jc(o,"popover",g);break;case"xlinkActuate":Ma(o,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":Ma(o,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":Ma(o,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":Ma(o,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":Ma(o,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":Ma(o,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":Ma(o,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":Ma(o,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":Ma(o,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":Jc(o,"is",g);break;case"innerText":case"textContent":break;default:(!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(h=I9.get(h)||h,Jc(o,h,g))}}function mw(o,l,h,g,_,j){switch(h){case"style":VA(o,g,j);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(h=g.__html,h!=null){if(_.children!=null)throw Error(r(60));o.innerHTML=h}}break;case"children":typeof g=="string"?tu(o,g):(typeof g=="number"||typeof g=="bigint")&&tu(o,""+g);break;case"onScroll":g!=null&&Ze("scroll",o);break;case"onScrollEnd":g!=null&&Ze("scrollend",o);break;case"onClick":g!=null&&(o.onclick=qi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!lp.hasOwnProperty(h))e:{if(h[0]==="o"&&h[1]==="n"&&(_=h.endsWith("Capture"),l=h.slice(2,_?h.length-7:void 0),j=o[rr]||null,j=j!=null?j[h]:null,typeof j=="function"&&o.removeEventListener(l,j,_),typeof g=="function")){typeof j!="function"&&j!==null&&(h in o?o[h]=null:o.hasAttribute(h)&&o.removeAttribute(h)),o.addEventListener(l,g,_);break e}h in o?o[h]=g:g===!0?o.setAttribute(h,""):Jc(o,h,g)}}}function Xn(o,l,h){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",o),Ze("load",o);var g=!1,_=!1,j;for(j in h)if(h.hasOwnProperty(j)){var M=h[j];if(M!=null)switch(j){case"src":g=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:bt(o,l,j,M,h,null)}}_&&bt(o,l,"srcSet",h.srcSet,h,null),g&&bt(o,l,"src",h.src,h,null);return;case"input":Ze("invalid",o);var U=j=M=_=null,Q=null,ue=null;for(g in h)if(h.hasOwnProperty(g)){var he=h[g];if(he!=null)switch(g){case"name":_=he;break;case"type":M=he;break;case"checked":Q=he;break;case"defaultChecked":ue=he;break;case"value":j=he;break;case"defaultValue":U=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,l));break;default:bt(o,l,g,he,h,null)}}dp(o,j,U,Q,ue,M,_,!1);return;case"select":Ze("invalid",o),g=M=j=null;for(_ in h)if(h.hasOwnProperty(_)&&(U=h[_],U!=null))switch(_){case"value":j=U;break;case"defaultValue":M=U;break;case"multiple":g=U;default:bt(o,l,_,U,h,null)}l=j,h=M,o.multiple=!!g,l!=null?Fi(o,!!g,l,!1):h!=null&&Fi(o,!!g,h,!0);return;case"textarea":Ze("invalid",o),j=_=g=null;for(M in h)if(h.hasOwnProperty(M)&&(U=h[M],U!=null))switch(M){case"value":g=U;break;case"defaultValue":_=U;break;case"children":j=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(91));break;default:bt(o,l,M,U,h,null)}qA(o,g,_,j);return;case"option":for(Q in h)if(h.hasOwnProperty(Q)&&(g=h[Q],g!=null))switch(Q){case"selected":o.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:bt(o,l,Q,g,h,null)}return;case"dialog":Ze("beforetoggle",o),Ze("toggle",o),Ze("cancel",o),Ze("close",o);break;case"iframe":case"object":Ze("load",o);break;case"video":case"audio":for(g=0;g<Kd.length;g++)Ze(Kd[g],o);break;case"image":Ze("error",o),Ze("load",o);break;case"details":Ze("toggle",o);break;case"embed":case"source":case"link":Ze("error",o),Ze("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in h)if(h.hasOwnProperty(ue)&&(g=h[ue],g!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:bt(o,l,ue,g,h,null)}return;default:if(Ab(l)){for(he in h)h.hasOwnProperty(he)&&(g=h[he],g!==void 0&&mw(o,l,he,g,h,void 0));return}}for(U in h)h.hasOwnProperty(U)&&(g=h[U],g!=null&&bt(o,l,U,g,h,null))}function cK(o,l,h,g){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,j=null,M=null,U=null,Q=null,ue=null,he=null;for(de in h){var ve=h[de];if(h.hasOwnProperty(de)&&ve!=null)switch(de){case"checked":break;case"value":break;case"defaultValue":Q=ve;default:g.hasOwnProperty(de)||bt(o,l,de,null,g,ve)}}for(var fe in g){var de=g[fe];if(ve=h[fe],g.hasOwnProperty(fe)&&(de!=null||ve!=null))switch(fe){case"type":j=de;break;case"name":_=de;break;case"checked":ue=de;break;case"defaultChecked":he=de;break;case"value":M=de;break;case"defaultValue":U=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,l));break;default:de!==ve&&bt(o,l,fe,de,g,ve)}}wl(o,M,U,Q,ue,he,j,_);return;case"select":de=M=U=fe=null;for(j in h)if(Q=h[j],h.hasOwnProperty(j)&&Q!=null)switch(j){case"value":break;case"multiple":de=Q;default:g.hasOwnProperty(j)||bt(o,l,j,null,g,Q)}for(_ in g)if(j=g[_],Q=h[_],g.hasOwnProperty(_)&&(j!=null||Q!=null))switch(_){case"value":fe=j;break;case"defaultValue":U=j;break;case"multiple":M=j;default:j!==Q&&bt(o,l,_,j,g,Q)}l=U,h=M,g=de,fe!=null?Fi(o,!!h,fe,!1):!!g!=!!h&&(l!=null?Fi(o,!!h,l,!0):Fi(o,!!h,h?[]:"",!1));return;case"textarea":de=fe=null;for(U in h)if(_=h[U],h.hasOwnProperty(U)&&_!=null&&!g.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:bt(o,l,U,null,g,_)}for(M in g)if(_=g[M],j=h[M],g.hasOwnProperty(M)&&(_!=null||j!=null))switch(M){case"value":fe=_;break;case"defaultValue":de=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:_!==j&&bt(o,l,M,_,g,j)}FA(o,fe,de);return;case"option":for(var Ce in h)if(fe=h[Ce],h.hasOwnProperty(Ce)&&fe!=null&&!g.hasOwnProperty(Ce))switch(Ce){case"selected":o.selected=!1;break;default:bt(o,l,Ce,null,g,fe)}for(Q in g)if(fe=g[Q],de=h[Q],g.hasOwnProperty(Q)&&fe!==de&&(fe!=null||de!=null))switch(Q){case"selected":o.selected=fe&&typeof fe!="function"&&typeof fe!="symbol";break;default:bt(o,l,Q,fe,g,de)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ze in h)fe=h[ze],h.hasOwnProperty(ze)&&fe!=null&&!g.hasOwnProperty(ze)&&bt(o,l,ze,null,g,fe);for(ue in g)if(fe=g[ue],de=h[ue],g.hasOwnProperty(ue)&&fe!==de&&(fe!=null||de!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,l));break;default:bt(o,l,ue,fe,g,de)}return;default:if(Ab(l)){for(var xt in h)fe=h[xt],h.hasOwnProperty(xt)&&fe!==void 0&&!g.hasOwnProperty(xt)&&mw(o,l,xt,void 0,g,fe);for(he in g)fe=g[he],de=h[he],!g.hasOwnProperty(he)||fe===de||fe===void 0&&de===void 0||mw(o,l,he,fe,g,de);return}}for(var ae in h)fe=h[ae],h.hasOwnProperty(ae)&&fe!=null&&!g.hasOwnProperty(ae)&&bt(o,l,ae,null,g,fe);for(ve in g)fe=g[ve],de=h[ve],!g.hasOwnProperty(ve)||fe===de||fe==null&&de==null||bt(o,l,ve,fe,g,de)}function Y2(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function uK(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,h=performance.getEntriesByType("resource"),g=0;g<h.length;g++){var _=h[g],j=_.transferSize,M=_.initiatorType,U=_.duration;if(j&&U&&Y2(M)){for(M=0,U=_.responseEnd,g+=1;g<h.length;g++){var Q=h[g],ue=Q.startTime;if(ue>U)break;var he=Q.transferSize,ve=Q.initiatorType;he&&Y2(ve)&&(Q=Q.responseEnd,M+=he*(Q<U?1:(U-ue)/(Q-ue)))}if(--g,l+=8*(j+M)/(_.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var pw=null,vw=null;function lv(o){return o.nodeType===9?o:o.ownerDocument}function X2(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function G2(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function gw(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var yw=null;function fK(){var o=window.event;return o&&o.type==="popstate"?o===yw?!1:(yw=o,!0):(yw=null,!1)}var W2=typeof setTimeout=="function"?setTimeout:void 0,dK=typeof clearTimeout=="function"?clearTimeout:void 0,Q2=typeof Promise=="function"?Promise:void 0,hK=typeof queueMicrotask=="function"?queueMicrotask:typeof Q2<"u"?function(o){return Q2.resolve(null).then(o).catch(mK)}:W2;function mK(o){setTimeout(function(){throw o})}function xs(o){return o==="head"}function Z2(o,l){var h=l,g=0;do{var _=h.nextSibling;if(o.removeChild(h),_&&_.nodeType===8)if(h=_.data,h==="/$"||h==="/&"){if(g===0){o.removeChild(_),Mu(l);return}g--}else if(h==="$"||h==="$?"||h==="$~"||h==="$!"||h==="&")g++;else if(h==="html")Yd(o.ownerDocument.documentElement);else if(h==="head"){h=o.ownerDocument.head,Yd(h);for(var j=h.firstChild;j;){var M=j.nextSibling,U=j.nodeName;j[bl]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&j.rel.toLowerCase()==="stylesheet"||h.removeChild(j),j=M}}else h==="body"&&Yd(o.ownerDocument.body);h=_}while(h);Mu(l)}function J2(o,l){var h=o;o=0;do{var g=h.nextSibling;if(h.nodeType===1?l?(h._stashedDisplay=h.style.display,h.style.display="none"):(h.style.display=h._stashedDisplay||"",h.getAttribute("style")===""&&h.removeAttribute("style")):h.nodeType===3&&(l?(h._stashedText=h.nodeValue,h.nodeValue=""):h.nodeValue=h._stashedText||""),g&&g.nodeType===8)if(h=g.data,h==="/$"){if(o===0)break;o--}else h!=="$"&&h!=="$?"&&h!=="$~"&&h!=="$!"||o++;h=g}while(h)}function bw(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var h=l;switch(l=l.nextSibling,h.nodeName){case"HTML":case"HEAD":case"BODY":bw(h),ud(h);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(h.rel.toLowerCase()==="stylesheet")continue}o.removeChild(h)}}function pK(o,l,h,g){for(;o.nodeType===1;){var _=h;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!g&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(g){if(!o[bl])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(j=o.getAttribute("rel"),j==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(j!==_.rel||o.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||o.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||o.getAttribute("title")!==(_.title==null?null:_.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(j=o.getAttribute("src"),(j!==(_.src==null?null:_.src)||o.getAttribute("type")!==(_.type==null?null:_.type)||o.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&j&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var j=_.name==null?null:""+_.name;if(_.type==="hidden"&&o.getAttribute("name")===j)return o}else return o;if(o=ma(o.nextSibling),o===null)break}return null}function vK(o,l,h){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!h||(o=ma(o.nextSibling),o===null))return null;return o}function eP(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=ma(o.nextSibling),o===null))return null;return o}function xw(o){return o.data==="$?"||o.data==="$~"}function ww(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function gK(o,l){var h=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||h.readyState!=="loading")l();else{var g=function(){l(),h.removeEventListener("DOMContentLoaded",g)};h.addEventListener("DOMContentLoaded",g),o._reactRetry=g}}function ma(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var Sw=null;function tP(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var h=o.data;if(h==="/$"||h==="/&"){if(l===0)return ma(o.nextSibling);l--}else h!=="$"&&h!=="$!"&&h!=="$?"&&h!=="$~"&&h!=="&"||l++}o=o.nextSibling}return null}function nP(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var h=o.data;if(h==="$"||h==="$!"||h==="$?"||h==="$~"||h==="&"){if(l===0)return o;l--}else h!=="/$"&&h!=="/&"||l++}o=o.previousSibling}return null}function rP(o,l,h){switch(l=lv(h),o){case"html":if(o=l.documentElement,!o)throw Error(r(452));return o;case"head":if(o=l.head,!o)throw Error(r(453));return o;case"body":if(o=l.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function Yd(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);ud(o)}var pa=new Map,aP=new Set;function cv(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var oo=H.d;H.d={f:yK,r:bK,D:xK,C:wK,L:SK,m:EK,X:jK,S:_K,M:OK};function yK(){var o=oo.f(),l=ev();return o||l}function bK(o){var l=Zo(o);l!==null&&l.tag===5&&l.type==="form"?wT(l):oo.r(o)}var Nu=typeof document>"u"?null:document;function iP(o,l,h){var g=Nu;if(g&&typeof l=="string"&&l){var _=_r(l);_='link[rel="'+o+'"][href="'+_+'"]',typeof h=="string"&&(_+='[crossorigin="'+h+'"]'),aP.has(_)||(aP.add(_),o={rel:o,crossOrigin:h,href:l},g.querySelector(_)===null&&(l=g.createElement("link"),Xn(l,"link",o),ln(l),g.head.appendChild(l)))}}function xK(o){oo.D(o),iP("dns-prefetch",o,null)}function wK(o,l){oo.C(o,l),iP("preconnect",o,l)}function SK(o,l,h){oo.L(o,l,h);var g=Nu;if(g&&o&&l){var _='link[rel="preload"][as="'+_r(l)+'"]';l==="image"&&h&&h.imageSrcSet?(_+='[imagesrcset="'+_r(h.imageSrcSet)+'"]',typeof h.imageSizes=="string"&&(_+='[imagesizes="'+_r(h.imageSizes)+'"]')):_+='[href="'+_r(o)+'"]';var j=_;switch(l){case"style":j=Tu(o);break;case"script":j=Pu(o)}pa.has(j)||(o=d({rel:"preload",href:l==="image"&&h&&h.imageSrcSet?void 0:o,as:l},h),pa.set(j,o),g.querySelector(_)!==null||l==="style"&&g.querySelector(Xd(j))||l==="script"&&g.querySelector(Gd(j))||(l=g.createElement("link"),Xn(l,"link",o),ln(l),g.head.appendChild(l)))}}function EK(o,l){oo.m(o,l);var h=Nu;if(h&&o){var g=l&&typeof l.as=="string"?l.as:"script",_='link[rel="modulepreload"][as="'+_r(g)+'"][href="'+_r(o)+'"]',j=_;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=Pu(o)}if(!pa.has(j)&&(o=d({rel:"modulepreload",href:o},l),pa.set(j,o),h.querySelector(_)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(h.querySelector(Gd(j)))return}g=h.createElement("link"),Xn(g,"link",o),ln(g),h.head.appendChild(g)}}}function _K(o,l,h){oo.S(o,l,h);var g=Nu;if(g&&o){var _=es(g).hoistableStyles,j=Tu(o);l=l||"default";var M=_.get(j);if(!M){var U={loading:0,preload:null};if(M=g.querySelector(Xd(j)))U.loading=5;else{o=d({rel:"stylesheet",href:o,"data-precedence":l},h),(h=pa.get(j))&&Ew(o,h);var Q=M=g.createElement("link");ln(Q),Xn(Q,"link",o),Q._p=new Promise(function(ue,he){Q.onload=ue,Q.onerror=he}),Q.addEventListener("load",function(){U.loading|=1}),Q.addEventListener("error",function(){U.loading|=2}),U.loading|=4,uv(M,l,g)}M={type:"stylesheet",instance:M,count:1,state:U},_.set(j,M)}}}function jK(o,l){oo.X(o,l);var h=Nu;if(h&&o){var g=es(h).hoistableScripts,_=Pu(o),j=g.get(_);j||(j=h.querySelector(Gd(_)),j||(o=d({src:o,async:!0},l),(l=pa.get(_))&&_w(o,l),j=h.createElement("script"),ln(j),Xn(j,"link",o),h.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},g.set(_,j))}}function OK(o,l){oo.M(o,l);var h=Nu;if(h&&o){var g=es(h).hoistableScripts,_=Pu(o),j=g.get(_);j||(j=h.querySelector(Gd(_)),j||(o=d({src:o,async:!0,type:"module"},l),(l=pa.get(_))&&_w(o,l),j=h.createElement("script"),ln(j),Xn(j,"link",o),h.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},g.set(_,j))}}function oP(o,l,h,g){var _=(_=se.current)?cv(_):null;if(!_)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof h.precedence=="string"&&typeof h.href=="string"?(l=Tu(h.href),h=es(_).hoistableStyles,g=h.get(l),g||(g={type:"style",instance:null,count:0,state:null},h.set(l,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(h.rel==="stylesheet"&&typeof h.href=="string"&&typeof h.precedence=="string"){o=Tu(h.href);var j=es(_).hoistableStyles,M=j.get(o);if(M||(_=_.ownerDocument||_,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(o,M),(j=_.querySelector(Xd(o)))&&!j._p&&(M.instance=j,M.state.loading=5),pa.has(o)||(h={rel:"preload",as:"style",href:h.href,crossOrigin:h.crossOrigin,integrity:h.integrity,media:h.media,hrefLang:h.hrefLang,referrerPolicy:h.referrerPolicy},pa.set(o,h),j||CK(_,o,h,M.state))),l&&g===null)throw Error(r(528,""));return M}if(l&&g!==null)throw Error(r(529,""));return null;case"script":return l=h.async,h=h.src,typeof h=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Pu(h),h=es(_).hoistableScripts,g=h.get(l),g||(g={type:"script",instance:null,count:0,state:null},h.set(l,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Tu(o){return'href="'+_r(o)+'"'}function Xd(o){return'link[rel="stylesheet"]['+o+"]"}function sP(o){return d({},o,{"data-precedence":o.precedence,precedence:null})}function CK(o,l,h,g){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?g.loading=1:(l=o.createElement("link"),g.preload=l,l.addEventListener("load",function(){return g.loading|=1}),l.addEventListener("error",function(){return g.loading|=2}),Xn(l,"link",h),ln(l),o.head.appendChild(l))}function Pu(o){return'[src="'+_r(o)+'"]'}function Gd(o){return"script[async]"+o}function lP(o,l,h){if(l.count++,l.instance===null)switch(l.type){case"style":var g=o.querySelector('style[data-href~="'+_r(h.href)+'"]');if(g)return l.instance=g,ln(g),g;var _=d({},h,{"data-href":h.href,"data-precedence":h.precedence,href:null,precedence:null});return g=(o.ownerDocument||o).createElement("style"),ln(g),Xn(g,"style",_),uv(g,h.precedence,o),l.instance=g;case"stylesheet":_=Tu(h.href);var j=o.querySelector(Xd(_));if(j)return l.state.loading|=4,l.instance=j,ln(j),j;g=sP(h),(_=pa.get(_))&&Ew(g,_),j=(o.ownerDocument||o).createElement("link"),ln(j);var M=j;return M._p=new Promise(function(U,Q){M.onload=U,M.onerror=Q}),Xn(j,"link",g),l.state.loading|=4,uv(j,h.precedence,o),l.instance=j;case"script":return j=Pu(h.src),(_=o.querySelector(Gd(j)))?(l.instance=_,ln(_),_):(g=h,(_=pa.get(j))&&(g=d({},h),_w(g,_)),o=o.ownerDocument||o,_=o.createElement("script"),ln(_),Xn(_,"link",g),o.head.appendChild(_),l.instance=_);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(g=l.instance,l.state.loading|=4,uv(g,h.precedence,o));return l.instance}function uv(o,l,h){for(var g=h.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=g.length?g[g.length-1]:null,j=_,M=0;M<g.length;M++){var U=g[M];if(U.dataset.precedence===l)j=U;else if(j!==_)break}j?j.parentNode.insertBefore(o,j.nextSibling):(l=h.nodeType===9?h.head:h,l.insertBefore(o,l.firstChild))}function Ew(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function _w(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var fv=null;function cP(o,l,h){if(fv===null){var g=new Map,_=fv=new Map;_.set(h,g)}else _=fv,g=_.get(h),g||(g=new Map,_.set(h,g));if(g.has(o))return g;for(g.set(o,null),h=h.getElementsByTagName(o),_=0;_<h.length;_++){var j=h[_];if(!(j[bl]||j[wn]||o==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var M=j.getAttribute(l)||"";M=o+M;var U=g.get(M);U?U.push(j):g.set(M,[j])}}return g}function uP(o,l,h){o=o.ownerDocument||o,o.head.insertBefore(h,l==="title"?o.querySelector("head > title"):null)}function AK(o,l,h){if(h===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return o=l.disabled,typeof l.precedence=="string"&&o==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function fP(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function NK(o,l,h,g){if(h.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(h.state.loading&4)===0){if(h.instance===null){var _=Tu(g.href),j=l.querySelector(Xd(_));if(j){l=j._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=dv.bind(o),l.then(o,o)),h.state.loading|=4,h.instance=j,ln(j);return}j=l.ownerDocument||l,g=sP(g),(_=pa.get(_))&&Ew(g,_),j=j.createElement("link"),ln(j);var M=j;M._p=new Promise(function(U,Q){M.onload=U,M.onerror=Q}),Xn(j,"link",g),h.instance=j}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(h,l),(l=h.state.preload)&&(h.state.loading&3)===0&&(o.count++,h=dv.bind(o),l.addEventListener("load",h),l.addEventListener("error",h))}}var jw=0;function TK(o,l){return o.stylesheets&&o.count===0&&mv(o,o.stylesheets),0<o.count||0<o.imgCount?function(h){var g=setTimeout(function(){if(o.stylesheets&&mv(o,o.stylesheets),o.unsuspend){var j=o.unsuspend;o.unsuspend=null,j()}},6e4+l);0<o.imgBytes&&jw===0&&(jw=62500*uK());var _=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&mv(o,o.stylesheets),o.unsuspend)){var j=o.unsuspend;o.unsuspend=null,j()}},(o.imgBytes>jw?50:800)+l);return o.unsuspend=h,function(){o.unsuspend=null,clearTimeout(g),clearTimeout(_)}}:null}function dv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mv(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var hv=null;function mv(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,hv=new Map,l.forEach(PK,o),hv=null,dv.call(o))}function PK(o,l){if(!(l.state.loading&4)){var h=hv.get(o);if(h)var g=h.get(null);else{h=new Map,hv.set(o,h);for(var _=o.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<_.length;j++){var M=_[j];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(h.set(M.dataset.precedence,M),g=M)}g&&h.set(null,g)}_=l.instance,M=_.getAttribute("data-precedence"),j=h.get(M)||g,j===g&&h.set(null,_),h.set(M,_),this.count++,g=dv.bind(this),_.addEventListener("load",g),_.addEventListener("error",g),j?j.parentNode.insertBefore(_,j.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(_,o.firstChild)),l.state.loading|=4}}var Wd={$$typeof:O,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function MK(o,l,h,g,_,j,M,U,Q){this.tag=1,this.containerInfo=o,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=oi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oi(0),this.hiddenUpdates=oi(null),this.identifierPrefix=g,this.onUncaughtError=_,this.onCaughtError=j,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function dP(o,l,h,g,_,j,M,U,Q,ue,he,ve){return o=new MK(o,l,h,M,Q,ue,he,ve,U),l=1,j===!0&&(l|=24),j=Hr(3,null,null,l),o.current=j,j.stateNode=o,l=ax(),l.refCount++,o.pooledCache=l,l.refCount++,j.memoizedState={element:g,isDehydrated:h,cache:l},lx(j),o}function hP(o){return o?(o=lu,o):lu}function mP(o,l,h,g,_,j){_=hP(_),g.context===null?g.context=_:g.pendingContext=_,g=cs(l),g.payload={element:h},j=j===void 0?null:j,j!==null&&(g.callback=j),h=us(o,g,l),h!==null&&(Tr(h,o,l),Ad(h,o,l))}function pP(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var h=o.retryLane;o.retryLane=h!==0&&h<l?h:l}}function Ow(o,l){pP(o,l),(o=o.alternate)&&pP(o,l)}function vP(o){if(o.tag===13||o.tag===31){var l=jl(o,67108864);l!==null&&Tr(l,o,67108864),Ow(o,67108864)}}function gP(o){if(o.tag===13||o.tag===31){var l=Yr();l=Wo(l);var h=jl(o,l);h!==null&&Tr(h,o,l),Ow(o,l)}}var pv=!0;function RK(o,l,h,g){var _=R.T;R.T=null;var j=H.p;try{H.p=2,Cw(o,l,h,g)}finally{H.p=j,R.T=_}}function kK(o,l,h,g){var _=R.T;R.T=null;var j=H.p;try{H.p=8,Cw(o,l,h,g)}finally{H.p=j,R.T=_}}function Cw(o,l,h,g){if(pv){var _=Aw(g);if(_===null)hw(o,l,g,vv,h),bP(o,g);else if(IK(_,o,l,h,g))g.stopPropagation();else if(bP(o,g),l&4&&-1<DK.indexOf(o)){for(;_!==null;){var j=Zo(_);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var M=sa(j.pendingLanes);if(M!==0){var U=j;for(U.pendingLanes|=2,U.entangledLanes|=2;M;){var Q=1<<31-Pn(M);U.entanglements[1]|=Q,M&=~Q}fi(j),(ht&6)===0&&(Zp=we()+500,qd(0))}}break;case 31:case 13:U=jl(j,2),U!==null&&Tr(U,j,2),ev(),Ow(j,2)}if(j=Aw(g),j===null&&hw(o,l,g,vv,h),j===_)break;_=j}_!==null&&g.stopPropagation()}else hw(o,l,g,null,h)}}function Aw(o){return o=Tb(o),Nw(o)}var vv=null;function Nw(o){if(vv=null,o=Qo(o),o!==null){var l=i(o);if(l===null)o=null;else{var h=l.tag;if(h===13){if(o=s(l),o!==null)return o;o=null}else if(h===31){if(o=c(l),o!==null)return o;o=null}else if(h===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return vv=o,null}function yP(o){switch(o){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(rn()){case Ct:return 2;case ia:return 8;case ai:case gl:return 32;case zr:return 268435456;default:return 32}default:return 32}}var Tw=!1,ws=null,Ss=null,Es=null,Qd=new Map,Zd=new Map,_s=[],DK="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 bP(o,l){switch(o){case"focusin":case"focusout":ws=null;break;case"dragenter":case"dragleave":Ss=null;break;case"mouseover":case"mouseout":Es=null;break;case"pointerover":case"pointerout":Qd.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zd.delete(l.pointerId)}}function Jd(o,l,h,g,_,j){return o===null||o.nativeEvent!==j?(o={blockedOn:l,domEventName:h,eventSystemFlags:g,nativeEvent:j,targetContainers:[_]},l!==null&&(l=Zo(l),l!==null&&vP(l)),o):(o.eventSystemFlags|=g,l=o.targetContainers,_!==null&&l.indexOf(_)===-1&&l.push(_),o)}function IK(o,l,h,g,_){switch(l){case"focusin":return ws=Jd(ws,o,l,h,g,_),!0;case"dragenter":return Ss=Jd(Ss,o,l,h,g,_),!0;case"mouseover":return Es=Jd(Es,o,l,h,g,_),!0;case"pointerover":var j=_.pointerId;return Qd.set(j,Jd(Qd.get(j)||null,o,l,h,g,_)),!0;case"gotpointercapture":return j=_.pointerId,Zd.set(j,Jd(Zd.get(j)||null,o,l,h,g,_)),!0}return!1}function xP(o){var l=Qo(o.target);if(l!==null){var h=i(l);if(h!==null){if(l=h.tag,l===13){if(l=s(h),l!==null){o.blockedOn=l,ap(o.priority,function(){gP(h)});return}}else if(l===31){if(l=c(h),l!==null){o.blockedOn=l,ap(o.priority,function(){gP(h)});return}}else if(l===3&&h.stateNode.current.memoizedState.isDehydrated){o.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}o.blockedOn=null}function gv(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var h=Aw(o.nativeEvent);if(h===null){h=o.nativeEvent;var g=new h.constructor(h.type,h);Nb=g,h.target.dispatchEvent(g),Nb=null}else return l=Zo(h),l!==null&&vP(l),o.blockedOn=h,!1;l.shift()}return!0}function wP(o,l,h){gv(o)&&h.delete(l)}function LK(){Tw=!1,ws!==null&&gv(ws)&&(ws=null),Ss!==null&&gv(Ss)&&(Ss=null),Es!==null&&gv(Es)&&(Es=null),Qd.forEach(wP),Zd.forEach(wP)}function yv(o,l){o.blockedOn===l&&(o.blockedOn=null,Tw||(Tw=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,LK)))}var bv=null;function SP(o){bv!==o&&(bv=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){bv===o&&(bv=null);for(var l=0;l<o.length;l+=3){var h=o[l],g=o[l+1],_=o[l+2];if(typeof g!="function"){if(Nw(g||h)===null)continue;break}var j=Zo(h);j!==null&&(o.splice(l,3),l-=3,Ax(j,{pending:!0,data:_,method:h.method,action:g},g,_))}}))}function Mu(o){function l(Q){return yv(Q,o)}ws!==null&&yv(ws,o),Ss!==null&&yv(Ss,o),Es!==null&&yv(Es,o),Qd.forEach(l),Zd.forEach(l);for(var h=0;h<_s.length;h++){var g=_s[h];g.blockedOn===o&&(g.blockedOn=null)}for(;0<_s.length&&(h=_s[0],h.blockedOn===null);)xP(h),h.blockedOn===null&&_s.shift();if(h=(o.ownerDocument||o).$$reactFormReplay,h!=null)for(g=0;g<h.length;g+=3){var _=h[g],j=h[g+1],M=_[rr]||null;if(typeof j=="function")M||SP(h);else if(M){var U=null;if(j&&j.hasAttribute("formAction")){if(_=j,M=j[rr]||null)U=M.formAction;else if(Nw(_)!==null)continue}else U=M.action;typeof U=="function"?h[g+1]=U:(h.splice(g,3),g-=3),SP(h)}}}function EP(){function o(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(M){return _=M})},focusReset:"manual",scroll:"manual"})}function l(){_!==null&&(_(),_=null),g||setTimeout(h,20)}function h(){if(!g&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,_=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(h,100),function(){g=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),_!==null&&(_(),_=null)}}}function Pw(o){this._internalRoot=o}xv.prototype.render=Pw.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));var h=l.current,g=Yr();mP(h,g,o,l,null,null)},xv.prototype.unmount=Pw.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;mP(o.current,2,null,o,null,null),ev(),l[Ui]=null}};function xv(o){this._internalRoot=o}xv.prototype.unstable_scheduleHydration=function(o){if(o){var l=cd();o={blockedOn:null,target:o,priority:l};for(var h=0;h<_s.length&&l!==0&&l<_s[h].priority;h++);_s.splice(h,0,o),h===0&&xP(o)}};var _P=t.version;if(_P!=="19.2.4")throw Error(r(527,_P,"19.2.4"));H.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(l),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var zK={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wv.isDisabled&&wv.supportsFiber)try{zi=wv.inject(zK),qn=wv}catch{}}return th.createRoot=function(o,l){if(!a(o))throw Error(r(299));var h=!1,g="",_=PT,j=MT,M=RT;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(_=l.onUncaughtError),l.onCaughtError!==void 0&&(j=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError)),l=dP(o,1,!1,null,null,h,g,null,_,j,M,EP),o[Ui]=l.current,dw(o),new Pw(l)},th.hydrateRoot=function(o,l,h){if(!a(o))throw Error(r(299));var g=!1,_="",j=PT,M=MT,U=RT,Q=null;return h!=null&&(h.unstable_strictMode===!0&&(g=!0),h.identifierPrefix!==void 0&&(_=h.identifierPrefix),h.onUncaughtError!==void 0&&(j=h.onUncaughtError),h.onCaughtError!==void 0&&(M=h.onCaughtError),h.onRecoverableError!==void 0&&(U=h.onRecoverableError),h.formState!==void 0&&(Q=h.formState)),l=dP(o,1,!0,l,h??null,g,_,Q,j,M,U,EP),l.context=hP(null),h=l.current,g=Yr(),g=Wo(g),_=cs(g),_.callback=null,us(h,_,g),h=g,l.current.lanes=h,Pt(l,h),fi(l),o[Ui]=l.current,dw(o),new xv(l)},th.version="19.2.4",th}var DP;function WK(){if(DP)return Iw.exports;DP=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(),Iw.exports=GK(),Iw.exports}var QK=WK();/**
 * react-router v7.13.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */var IP="popstate";function LP(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ZK(e={}){function t(r,a){var f;let i=(f=a.state)==null?void 0:f.masked,{pathname:s,search:c,hash:u}=i||r.location;return WS("",{pathname:s,search:c,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default",i?{pathname:r.location.pathname,search:r.location.search,hash:r.location.hash}:void 0)}function n(r,a){return typeof a=="string"?a:Ph(a)}return eV(t,n,null,e)}function Vt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ya(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function JK(){return Math.random().toString(36).substring(2,10)}function zP(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function WS(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Hf(t):t,state:n,key:t&&t.key||r||JK(),unstable_mask:a}}function Ph({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Hf(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function eV(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,c="POP",u=null,f=m();f==null&&(f=0,s.replaceState({...s.state,idx:f},""));function m(){return(s.state||{idx:null}).idx}function d(){c="POP";let S=m(),E=S==null?null:S-f;f=S,u&&u({action:c,location:x.location,delta:E})}function p(S,E){c="PUSH";let C=LP(S)?S:WS(x.location,S,E);f=m()+1;let O=zP(C,f),A=x.createHref(C.unstable_mask||C);try{s.pushState(O,"",A)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;a.location.assign(A)}i&&u&&u({action:c,location:x.location,delta:1})}function b(S,E){c="REPLACE";let C=LP(S)?S:WS(x.location,S,E);f=m();let O=zP(C,f),A=x.createHref(C.unstable_mask||C);s.replaceState(O,"",A),i&&u&&u({action:c,location:x.location,delta:0})}function w(S){return tV(S)}let x={get action(){return c},get location(){return e(a,s)},listen(S){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(IP,d),u=S,()=>{a.removeEventListener(IP,d),u=null}},createHref(S){return t(a,S)},createURL:w,encodeLocation(S){let E=w(S);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:p,replace:b,go(S){return s.go(S)}};return x}function tV(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Vt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Ph(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function oz(e,t,n="/"){return nV(e,t,n,!1)}function nV(e,t,n,r){let a=typeof t=="string"?Hf(t):t,i=Ao(a.pathname||"/",n);if(i==null)return null;let s=sz(e);rV(s);let c=null;for(let u=0;c==null&&u<s.length;++u){let f=mV(i);c=dV(s[u],f,r)}return c}function sz(e,t=[],n=[],r="",a=!1){let i=(s,c,u=a,f)=>{let m={relativePath:f===void 0?s.path||"":f,caseSensitive:s.caseSensitive===!0,childrenIndex:c,route:s};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(r)&&u)return;Vt(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let d=ji([r,m.relativePath]),p=n.concat(m);s.children&&s.children.length>0&&(Vt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),sz(s.children,t,p,d,u)),!(s.path==null&&!s.index)&&t.push({path:d,score:uV(d,s.index),routesMeta:p})};return e.forEach((s,c)=>{var u;if(s.path===""||!((u=s.path)!=null&&u.includes("?")))i(s,c);else for(let f of lz(s.path))i(s,c,!0,f)}),t}function lz(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=lz(r.join("/")),c=[];return c.push(...s.map(u=>u===""?i:[i,u].join("/"))),a&&c.push(...s),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function rV(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:fV(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var aV=/^:[\w-]+$/,iV=3,oV=2,sV=1,lV=10,cV=-2,$P=e=>e==="*";function uV(e,t){let n=e.split("/"),r=n.length;return n.some($P)&&(r+=cV),t&&(r+=oV),n.filter(a=>!$P(a)).reduce((a,i)=>a+(aV.test(i)?iV:i===""?sV:lV),r)}function fV(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function dV(e,t,n=!1){let{routesMeta:r}=e,a={},i="/",s=[];for(let c=0;c<r.length;++c){let u=r[c],f=c===r.length-1,m=i==="/"?t:t.slice(i.length)||"/",d=Eg({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},m),p=u.route;if(!d&&f&&n&&!r[r.length-1].route.index&&(d=Eg({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},m)),!d)return null;Object.assign(a,d.params),s.push({params:a,pathname:ji([i,d.pathname]),pathnameBase:yV(ji([i,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(i=ji([i,d.pathnameBase]))}return s}function Eg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=hV(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:r.reduce((f,{paramName:m,isOptional:d},p)=>{if(m==="*"){let w=c[p]||"";s=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const b=c[p];return d&&!b?f[m]=void 0:f[m]=(b||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:s,pattern:e}}function hV(e,t=!1,n=!0){Ya(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,u,f,m)=>{if(r.push({paramName:c,isOptional:u!=null}),u){let d=m.charAt(f+s.length);return d&&d!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function mV(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ya(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ao(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}var pV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function vV(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Hf(e):e,i;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?i=BP(n.substring(1),"/"):i=BP(n,t)):i=t,{pathname:i,search:bV(r),hash:xV(a)}}function BP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Bw(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function gV(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cz(e){let t=gV(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function nj(e,t,n,r=!1){let a;typeof e=="string"?a=Hf(e):(a={...e},Vt(!a.pathname||!a.pathname.includes("?"),Bw("?","pathname","search",a)),Vt(!a.pathname||!a.pathname.includes("#"),Bw("#","pathname","hash",a)),Vt(!a.search||!a.search.includes("#"),Bw("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,c;if(s==null)c=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),d-=1;a.pathname=p.join("/")}c=d>=0?t[d]:"/"}let u=vV(a,c),f=s&&s!=="/"&&s.endsWith("/"),m=(i||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(f||m)&&(u.pathname+="/"),u}var ji=e=>e.join("/").replace(/\/\/+/g,"/"),yV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bV=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xV=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,wV=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function SV(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function EV(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var uz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function fz(e,t){let n=e;if(typeof n!="string"||!pV.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(uz)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),c=Ao(s.pathname,t);s.origin===i.origin&&c!=null?n=c+s.search+s.hash:a=!0}catch{Ya(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var dz=["POST","PUT","PATCH","DELETE"];new Set(dz);var _V=["GET",...dz];new Set(_V);var Ff=y.createContext(null);Ff.displayName="DataRouter";var Vy=y.createContext(null);Vy.displayName="DataRouterState";var jV=y.createContext(!1),hz=y.createContext({isTransitioning:!1});hz.displayName="ViewTransition";var OV=y.createContext(new Map);OV.displayName="Fetchers";var CV=y.createContext(null);CV.displayName="Await";var Na=y.createContext(null);Na.displayName="Navigation";var vm=y.createContext(null);vm.displayName="Location";var Ja=y.createContext({outlet:null,matches:[],isDataRoute:!1});Ja.displayName="Route";var rj=y.createContext(null);rj.displayName="RouteError";var mz="REACT_ROUTER_ERROR",AV="REDIRECT",NV="ROUTE_ERROR_RESPONSE";function TV(e){if(e.startsWith(`${mz}:${AV}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function PV(e){if(e.startsWith(`${mz}:${NV}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new wV(t.status,t.statusText,t.data)}catch{}}function MV(e,{relative:t}={}){Vt(gm(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=y.useContext(Na),{hash:a,pathname:i,search:s}=ym(e,{relative:t}),c=i;return n!=="/"&&(c=i==="/"?n:ji([n,i])),r.createHref({pathname:c,search:s,hash:a})}function gm(){return y.useContext(vm)!=null}function ki(){return Vt(gm(),"useLocation() may be used only in the context of a <Router> component."),y.useContext(vm).location}var pz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function vz(e){y.useContext(Na).static||y.useLayoutEffect(e)}function qf(){let{isDataRoute:e}=y.useContext(Ja);return e?YV():RV()}function RV(){Vt(gm(),"useNavigate() may be used only in the context of a <Router> component.");let e=y.useContext(Ff),{basename:t,navigator:n}=y.useContext(Na),{matches:r}=y.useContext(Ja),{pathname:a}=ki(),i=JSON.stringify(cz(r)),s=y.useRef(!1);return vz(()=>{s.current=!0}),y.useCallback((u,f={})=>{if(Ya(s.current,pz),!s.current)return;if(typeof u=="number"){n.go(u);return}let m=nj(u,JSON.parse(i),a,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:ji([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,i,a,e])}var kV=y.createContext(null);function DV(e){let t=y.useContext(Ja).outlet;return y.useMemo(()=>t&&y.createElement(kV.Provider,{value:e},t),[t,e])}function aj(){let{matches:e}=y.useContext(Ja),t=e[e.length-1];return t?t.params:{}}function ym(e,{relative:t}={}){let{matches:n}=y.useContext(Ja),{pathname:r}=ki(),a=JSON.stringify(cz(n));return y.useMemo(()=>nj(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function IV(e,t){return gz(e,t)}function gz(e,t,n){var S;Vt(gm(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=y.useContext(Na),{matches:a}=y.useContext(Ja),i=a[a.length-1],s=i?i.params:{},c=i?i.pathname:"/",u=i?i.pathnameBase:"/",f=i&&i.route;{let E=f&&f.path||"";bz(c,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let m=ki(),d;if(t){let E=typeof t=="string"?Hf(t):t;Vt(u==="/"||((S=E.pathname)==null?void 0:S.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${E.pathname}" was given in the \`location\` prop.`),d=E}else d=m;let p=d.pathname||"/",b=p;if(u!=="/"){let E=u.replace(/^\//,"").split("/");b="/"+p.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=oz(e,{pathname:b});Ya(f||w!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),Ya(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=UV(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},s,E.params),pathname:ji([u,r.encodeLocation?r.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?u:ji([u,r.encodeLocation?r.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),a,n);return t&&x?y.createElement(vm.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...d},navigationType:"POP"}},x):x}function LV(){let e=VV(),t=SV(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=y.createElement(y.Fragment,null,y.createElement("p",null,"💿 Hey developer 👋"),y.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",y.createElement("code",{style:i},"ErrorBoundary")," or"," ",y.createElement("code",{style:i},"errorElement")," prop on your route.")),y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:a},n):null,s)}var zV=y.createElement(LV,null),yz=class extends y.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=PV(e.digest);n&&(e=n)}let t=e!==void 0?y.createElement(Ja.Provider,{value:this.props.routeContext},y.createElement(rj.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?y.createElement($V,{error:e},t):t}};yz.contextType=jV;var Uw=new WeakMap;function $V({children:e,error:t}){let{basename:n}=y.useContext(Na);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=TV(t.digest);if(r){let a=Uw.get(t);if(a)throw a;let i=fz(r.location,n);if(uz&&!Uw.get(t))if(i.isExternal||r.reloadDocument)window.location.href=i.absoluteURL||i.to;else{const s=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:r.replace}));throw Uw.set(t,s),s}return y.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function BV({routeContext:e,match:t,children:n}){let r=y.useContext(Ff);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),y.createElement(Ja.Provider,{value:e},n)}function UV(e,t=[],n){let r=n==null?void 0:n.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let a=e,i=r==null?void 0:r.errors;if(i!=null){let m=a.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);Vt(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,m+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let m=0;m<a.length;m++){let d=a[m];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=m),d.route.id){let{loaderData:p,errors:b}=r,w=d.route.loader&&!p.hasOwnProperty(d.route.id)&&(!b||b[d.route.id]===void 0);if(d.route.lazy||w){n.isStatic&&(s=!0),c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}}let u=n==null?void 0:n.onError,f=r&&u?(m,d)=>{var p,b;u(m,{location:r.location,params:((b=(p=r.matches)==null?void 0:p[0])==null?void 0:b.params)??{},unstable_pattern:EV(r.matches),errorInfo:d})}:void 0;return a.reduceRight((m,d,p)=>{let b,w=!1,x=null,S=null;r&&(b=i&&d.route.id?i[d.route.id]:void 0,x=d.route.errorElement||zV,s&&(c<0&&p===0?(bz("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,S=null):c===p&&(w=!0,S=d.route.hydrateFallbackElement||null)));let E=t.concat(a.slice(0,p+1)),C=()=>{let O;return b?O=x:w?O=S:d.route.Component?O=y.createElement(d.route.Component,null):d.route.element?O=d.route.element:O=m,y.createElement(BV,{match:d,routeContext:{outlet:m,matches:E,isDataRoute:r!=null},children:O})};return r&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?y.createElement(yz,{location:r.location,revalidation:r.revalidation,component:x,error:b,children:C(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):C()},null)}function ij(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function HV(e){let t=y.useContext(Ff);return Vt(t,ij(e)),t}function FV(e){let t=y.useContext(Vy);return Vt(t,ij(e)),t}function qV(e){let t=y.useContext(Ja);return Vt(t,ij(e)),t}function oj(e){let t=qV(e),n=t.matches[t.matches.length-1];return Vt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function KV(){return oj("useRouteId")}function VV(){var r;let e=y.useContext(rj),t=FV("useRouteError"),n=oj("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function YV(){let{router:e}=HV("useNavigate"),t=oj("useNavigate"),n=y.useRef(!1);return vz(()=>{n.current=!0}),y.useCallback(async(a,i={})=>{Ya(n.current,pz),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var UP={};function bz(e,t,n){!t&&!UP[e]&&(UP[e]=!0,Ya(!1,n))}y.memo(XV);function XV({routes:e,future:t,state:n,isStatic:r,onError:a}){return gz(e,void 0,{state:n,isStatic:r,onError:a})}function GV(e){return DV(e.context)}function vi(e){Vt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function WV({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,unstable_useTransitions:s}){Vt(!gm(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:c,navigator:a,static:i,unstable_useTransitions:s,future:{}}),[c,a,i,s]);typeof n=="string"&&(n=Hf(n));let{pathname:f="/",search:m="",hash:d="",state:p=null,key:b="default",unstable_mask:w}=n,x=y.useMemo(()=>{let S=Ao(f,c);return S==null?null:{location:{pathname:S,search:m,hash:d,state:p,key:b,unstable_mask:w},navigationType:r}},[c,f,m,d,p,b,r,w]);return Ya(x!=null,`<Router basename="${c}"> is not able to match the URL "${f}${m}${d}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:y.createElement(Na.Provider,{value:u},y.createElement(vm.Provider,{children:t,value:x}))}function QV({children:e,location:t}){return IV(QS(e),t)}function QS(e,t=[]){let n=[];return y.Children.forEach(e,(r,a)=>{if(!y.isValidElement(r))return;let i=[...t,a];if(r.type===y.Fragment){n.push.apply(n,QS(r.props.children,i));return}Vt(r.type===vi,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Vt(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=QS(r.props.children,i)),n.push(s)}),n}var ag="get",ig="application/x-www-form-urlencoded";function Yy(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function ZV(e){return Yy(e)&&e.tagName.toLowerCase()==="button"}function JV(e){return Yy(e)&&e.tagName.toLowerCase()==="form"}function eY(e){return Yy(e)&&e.tagName.toLowerCase()==="input"}function tY(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nY(e,t){return e.button===0&&(!t||t==="_self")&&!tY(e)}function ZS(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function rY(e,t){let n=ZS(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var Ev=null;function aY(){if(Ev===null)try{new FormData(document.createElement("form"),0),Ev=!1}catch{Ev=!0}return Ev}var iY=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Hw(e){return e!=null&&!iY.has(e)?(Ya(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ig}"`),null):e}function oY(e,t){let n,r,a,i,s;if(JV(e)){let c=e.getAttribute("action");r=c?Ao(c,t):null,n=e.getAttribute("method")||ag,a=Hw(e.getAttribute("enctype"))||ig,i=new FormData(e)}else if(ZV(e)||eY(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||c.getAttribute("action");if(r=u?Ao(u,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||ag,a=Hw(e.getAttribute("formenctype"))||Hw(c.getAttribute("enctype"))||ig,i=new FormData(c,e),!aY()){let{name:f,type:m,value:d}=e;if(m==="image"){let p=f?`${f}.`:"";i.append(`${p}x`,"0"),i.append(`${p}y`,"0")}else f&&i.append(f,d)}}else{if(Yy(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ag,r=null,a=ig,s=e}return i&&a==="text/plain"&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sj(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function sY(e,t,n,r){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:a.pathname==="/"?a.pathname=`_root.${r}`:t&&Ao(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}async function lY(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function cY(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function uY(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await lY(i,n);return s.links?s.links():[]}return[]}));return mY(r.flat(1).filter(cY).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function HP(e,t,n,r,a,i){let s=(u,f)=>n[f]?u.route.id!==n[f].route.id:!0,c=(u,f)=>{var m;return n[f].pathname!==u.pathname||((m=n[f].route.path)==null?void 0:m.endsWith("*"))&&n[f].params["*"]!==u.params["*"]};return i==="assets"?t.filter((u,f)=>s(u,f)||c(u,f)):i==="data"?t.filter((u,f)=>{var d;let m=r.routes[u.route.id];if(!m||!m.hasLoader)return!1;if(s(u,f)||c(u,f))return!0;if(u.route.shouldRevalidate){let p=u.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function fY(e,t,{includeHydrateFallback:n}={}){return dY(e.map(r=>{let a=t.routes[r.route.id];if(!a)return[];let i=[a.module];return a.clientActionModule&&(i=i.concat(a.clientActionModule)),a.clientLoaderModule&&(i=i.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(i=i.concat(a.hydrateFallbackModule)),a.imports&&(i=i.concat(a.imports)),i}).flat(1))}function dY(e){return[...new Set(e)]}function hY(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function mY(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(hY(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function xz(){let e=y.useContext(Ff);return sj(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function pY(){let e=y.useContext(Vy);return sj(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var lj=y.createContext(void 0);lj.displayName="FrameworkContext";function wz(){let e=y.useContext(lj);return sj(e,"You must render this element inside a <HydratedRouter> element"),e}function vY(e,t){let n=y.useContext(lj),[r,a]=y.useState(!1),[i,s]=y.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:f,onMouseLeave:m,onTouchStart:d}=t,p=y.useRef(null);y.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let x=E=>{E.forEach(C=>{s(C.isIntersecting)})},S=new IntersectionObserver(x,{threshold:.5});return p.current&&S.observe(p.current),()=>{S.disconnect()}}},[e]),y.useEffect(()=>{if(r){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[r]);let b=()=>{a(!0)},w=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,p,{}]:[i,p,{onFocus:nh(c,b),onBlur:nh(u,w),onMouseEnter:nh(f,b),onMouseLeave:nh(m,w),onTouchStart:nh(d,b)}]:[!1,p,{}]}function nh(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function gY({page:e,...t}){let{router:n}=xz(),r=y.useMemo(()=>oz(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?y.createElement(bY,{page:e,matches:r,...t}):null}function yY(e){let{manifest:t,routeModules:n}=wz(),[r,a]=y.useState([]);return y.useEffect(()=>{let i=!1;return uY(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function bY({page:e,matches:t,...n}){let r=ki(),{future:a,manifest:i,routeModules:s}=wz(),{basename:c}=xz(),{loaderData:u,matches:f}=pY(),m=y.useMemo(()=>HP(e,t,f,i,r,"data"),[e,t,f,i,r]),d=y.useMemo(()=>HP(e,t,f,i,r,"assets"),[e,t,f,i,r]),p=y.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let x=new Set,S=!1;if(t.forEach(C=>{var A;let O=i.routes[C.route.id];!O||!O.hasLoader||(!m.some(T=>T.route.id===C.route.id)&&C.route.id in u&&((A=s[C.route.id])!=null&&A.shouldRevalidate)||O.hasClientLoader?S=!0:x.add(C.route.id))}),x.size===0)return[];let E=sY(e,c,a.unstable_trailingSlashAwareDataRequests,"data");return S&&x.size>0&&E.searchParams.set("_routes",t.filter(C=>x.has(C.route.id)).map(C=>C.route.id).join(",")),[E.pathname+E.search]},[c,a.unstable_trailingSlashAwareDataRequests,u,r,i,m,t,e,s]),b=y.useMemo(()=>fY(d,i),[d,i]),w=yY(d);return y.createElement(y.Fragment,null,p.map(x=>y.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),b.map(x=>y.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),w.map(({key:x,link:S})=>y.createElement("link",{key:x,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function xY(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var wY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{wY&&(window.__reactRouterVersion="7.13.1")}catch{}function SY({basename:e,children:t,unstable_useTransitions:n,window:r}){let a=y.useRef();a.current==null&&(a.current=ZK({window:r,v5Compat:!0}));let i=a.current,[s,c]=y.useState({action:i.action,location:i.location}),u=y.useCallback(f=>{n===!1?c(f):y.startTransition(()=>c(f))},[n]);return y.useLayoutEffect(()=>i.listen(u),[i,u]),y.createElement(WV,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,unstable_useTransitions:n})}var Sz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xa=y.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:a,reloadDocument:i,replace:s,unstable_mask:c,state:u,target:f,to:m,preventScrollReset:d,viewTransition:p,unstable_defaultShouldRevalidate:b,...w},x){let{basename:S,navigator:E,unstable_useTransitions:C}=y.useContext(Na),O=typeof m=="string"&&Sz.test(m),A=fz(m,S);m=A.to;let T=MV(m,{relative:a}),N=ki(),P=null;if(c){let V=nj(c,[],N.unstable_mask?N.unstable_mask.pathname:"/",!0);S!=="/"&&(V.pathname=V.pathname==="/"?S:ji([S,V.pathname])),P=E.createHref(V)}let[k,D,K]=vY(r,w),B=jY(m,{replace:s,unstable_mask:c,state:u,target:f,preventScrollReset:d,relative:a,viewTransition:p,unstable_defaultShouldRevalidate:b,unstable_useTransitions:C});function I(V){t&&t(V),V.defaultPrevented||B(V)}let W=!(A.isExternal||i),z=y.createElement("a",{...w,...K,href:(W?P:void 0)||A.absoluteURL||T,onClick:W?I:t,ref:xY(x,D),target:f,"data-discover":!O&&n==="render"?"true":void 0});return k&&!O?y.createElement(y.Fragment,null,z,y.createElement(gY,{page:T})):z});Xa.displayName="Link";var JS=y.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:a=!1,style:i,to:s,viewTransition:c,children:u,...f},m){let d=ym(s,{relative:f.relative}),p=ki(),b=y.useContext(Vy),{navigator:w,basename:x}=y.useContext(Na),S=b!=null&&PY(d)&&c===!0,E=w.encodeLocation?w.encodeLocation(d).pathname:d.pathname,C=p.pathname,O=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(C=C.toLowerCase(),O=O?O.toLowerCase():null,E=E.toLowerCase()),O&&x&&(O=Ao(O,x)||O);const A=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let T=C===E||!a&&C.startsWith(E)&&C.charAt(A)==="/",N=O!=null&&(O===E||!a&&O.startsWith(E)&&O.charAt(E.length)==="/"),P={isActive:T,isPending:N,isTransitioning:S},k=T?t:void 0,D;typeof r=="function"?D=r(P):D=[r,T?"active":null,N?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let K=typeof i=="function"?i(P):i;return y.createElement(Xa,{...f,"aria-current":k,className:D,ref:m,style:K,to:s,viewTransition:c},typeof u=="function"?u(P):u)});JS.displayName="NavLink";var EY=y.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=ag,action:c,onSubmit:u,relative:f,preventScrollReset:m,viewTransition:d,unstable_defaultShouldRevalidate:p,...b},w)=>{let{unstable_useTransitions:x}=y.useContext(Na),S=NY(),E=TY(c,{relative:f}),C=s.toLowerCase()==="get"?"get":"post",O=typeof c=="string"&&Sz.test(c),A=T=>{if(u&&u(T),T.defaultPrevented)return;T.preventDefault();let N=T.nativeEvent.submitter,P=(N==null?void 0:N.getAttribute("formmethod"))||s,k=()=>S(N||T.currentTarget,{fetcherKey:t,method:P,navigate:n,replace:a,state:i,relative:f,preventScrollReset:m,viewTransition:d,unstable_defaultShouldRevalidate:p});x&&n!==!1?y.startTransition(()=>k()):k()};return y.createElement("form",{ref:w,method:C,action:E,onSubmit:r?u:A,...b,"data-discover":!O&&e==="render"?"true":void 0})});EY.displayName="Form";function _Y(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ez(e){let t=y.useContext(Ff);return Vt(t,_Y(e)),t}function jY(e,{target:t,replace:n,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:u,unstable_useTransitions:f}={}){let m=qf(),d=ki(),p=ym(e,{relative:s});return y.useCallback(b=>{if(nY(b,t)){b.preventDefault();let w=n!==void 0?n:Ph(d)===Ph(p),x=()=>m(e,{replace:w,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:u});f?y.startTransition(()=>x()):x()}},[d,m,p,n,r,a,t,e,i,s,c,u,f])}function OY(e){Ya(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=y.useRef(ZS(e)),n=y.useRef(!1),r=ki(),a=y.useMemo(()=>rY(r.search,n.current?null:t.current),[r.search]),i=qf(),s=y.useCallback((c,u)=>{const f=ZS(typeof c=="function"?c(new URLSearchParams(a)):c);n.current=!0,i("?"+f,u)},[i,a]);return[a,s]}var CY=0,AY=()=>`__${String(++CY)}__`;function NY(){let{router:e}=Ez("useSubmit"),{basename:t}=y.useContext(Na),n=KV(),r=e.fetch,a=e.navigate;return y.useCallback(async(i,s={})=>{let{action:c,method:u,encType:f,formData:m,body:d}=oY(i,t);if(s.navigate===!1){let p=s.fetcherKey||AY();await r(p,n,s.action||c,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:m,body:d,formMethod:s.method||u,formEncType:s.encType||f,flushSync:s.flushSync})}else await a(s.action||c,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:m,body:d,formMethod:s.method||u,formEncType:s.encType||f,replace:s.replace,state:s.state,fromRouteId:n,flushSync:s.flushSync,viewTransition:s.viewTransition})},[r,a,t,n])}function TY(e,{relative:t}={}){let{basename:n}=y.useContext(Na),r=y.useContext(Ja);Vt(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...ym(e||".",{relative:t})},s=ki();if(e==null){i.search=s.search;let c=new URLSearchParams(i.search),u=c.getAll("index");if(u.some(m=>m==="")){c.delete("index"),u.filter(d=>d).forEach(d=>c.append("index",d));let m=c.toString();i.search=m?`?${m}`:""}}return(!e||e===".")&&a.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:ji([n,i.pathname])),Ph(i)}function PY(e,{relative:t}={}){let n=y.useContext(hz);Vt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ez("useViewTransitionState"),a=ym(e,{relative:t});if(!n.isTransitioning)return!1;let i=Ao(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Ao(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Eg(a.pathname,s)!=null||Eg(a.pathname,i)!=null}var cl=iz();const _z=Za(cl);var Dc=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(){}},MY={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},zs,ej,Y3,RY=(Y3=class{constructor(){Ee(this,zs,MY);Ee(this,ej,!1)}setTimeoutProvider(e){xe(this,zs,e)}setTimeout(e,t){return X(this,zs).setTimeout(e,t)}clearTimeout(e){X(this,zs).clearTimeout(e)}setInterval(e,t){return X(this,zs).setInterval(e,t)}clearInterval(e){X(this,zs).clearInterval(e)}},zs=new WeakMap,ej=new WeakMap,Y3),Gl=new RY;function kY(e){setTimeout(e,0)}var mc=typeof window>"u"||"Deno"in globalThis;function sr(){}function DY(e,t){return typeof e=="function"?e(t):e}function eE(e){return typeof e=="number"&&e>=0&&e!==1/0}function jz(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Gs(e,t){return typeof e=="function"?e(t):e}function Sa(e,t){return typeof e=="function"?e(t):e}function FP(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:s,stale:c}=e;if(s){if(r){if(t.queryHash!==cj(s,t.options))return!1}else if(!Mh(t.queryKey,s))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||a&&a!==t.state.fetchStatus||i&&!i(t))}function qP(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(pc(t.options.mutationKey)!==pc(i))return!1}else if(!Mh(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function cj(e,t){return((t==null?void 0:t.queryKeyHashFn)||pc)(e)}function pc(e){return JSON.stringify(e,(t,n)=>tE(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Mh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Mh(e[n],t[n])):!1}var IY=Object.prototype.hasOwnProperty;function uj(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=KP(e)&&KP(t);if(!r&&!(tE(e)&&tE(t)))return t;const i=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),c=s.length,u=r?new Array(c):{};let f=0;for(let m=0;m<c;m++){const d=r?m:s[m],p=e[d],b=t[d];if(p===b){u[d]=p,(r?m<i:IY.call(e,d))&&f++;continue}if(p===null||b===null||typeof p!="object"||typeof b!="object"){u[d]=b;continue}const w=uj(p,b,n+1);u[d]=w,w===p&&f++}return i===c&&f===i?e:u}function Rh(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 KP(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function tE(e){if(!VP(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!VP(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function VP(e){return Object.prototype.toString.call(e)==="[object Object]"}function LY(e){return new Promise(t=>{Gl.setTimeout(t,e)})}function nE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?uj(e,t):t}function zY(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function $Y(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var fj=Symbol();function Oz(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===fj?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function dj(e,t){return typeof e=="function"?e(...t):!!e}function BY(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var ec,$s,sf,X3,UY=(X3=class extends Dc{constructor(){super();Ee(this,ec);Ee(this,$s);Ee(this,sf);xe(this,sf,t=>{if(!mc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){X(this,$s)||this.setEventListener(X(this,sf))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,$s))==null||t.call(this),xe(this,$s,void 0))}setEventListener(t){var n;xe(this,sf,t),(n=X(this,$s))==null||n.call(this),xe(this,$s,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){X(this,ec)!==t&&(xe(this,ec,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof X(this,ec)=="boolean"?X(this,ec):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ec=new WeakMap,$s=new WeakMap,sf=new WeakMap,X3),hj=new UY;function rE(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var HY=kY;function FY(){let e=[],t=0,n=c=>{c()},r=c=>{c()},a=HY;const i=c=>{t?e.push(c):a(()=>{n(c)})},s=()=>{const c=e;e=[],c.length&&a(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||s()}return u},batchCalls:c=>(...u)=>{i(()=>{c(...u)})},schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{a=c}}}var en=FY(),lf,Bs,cf,G3,qY=(G3=class extends Dc{constructor(){super();Ee(this,lf,!0);Ee(this,Bs);Ee(this,cf);xe(this,cf,t=>{if(!mc&&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(){X(this,Bs)||this.setEventListener(X(this,cf))}onUnsubscribe(){var t;this.hasListeners()||((t=X(this,Bs))==null||t.call(this),xe(this,Bs,void 0))}setEventListener(t){var n;xe(this,cf,t),(n=X(this,Bs))==null||n.call(this),xe(this,Bs,t(this.setOnline.bind(this)))}setOnline(t){X(this,lf)!==t&&(xe(this,lf,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return X(this,lf)}},lf=new WeakMap,Bs=new WeakMap,cf=new WeakMap,G3),_g=new qY;function KY(e){return Math.min(1e3*2**e,3e4)}function Cz(e){return(e??"online")==="online"?_g.isOnline():!0}var aE=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Az(e){let t=!1,n=0,r;const a=rE(),i=()=>a.status!=="pending",s=x=>{var S;if(!i()){const E=new aE(x);p(E),(S=e.onCancel)==null||S.call(e,E)}},c=()=>{t=!0},u=()=>{t=!1},f=()=>hj.isFocused()&&(e.networkMode==="always"||_g.isOnline())&&e.canRun(),m=()=>Cz(e.networkMode)&&e.canRun(),d=x=>{i()||(r==null||r(),a.resolve(x))},p=x=>{i()||(r==null||r(),a.reject(x))},b=()=>new Promise(x=>{var S;r=E=>{(i()||f())&&x(E)},(S=e.onPause)==null||S.call(e)}).then(()=>{var x;r=void 0,i()||(x=e.onContinue)==null||x.call(e)}),w=()=>{if(i())return;let x;const S=n===0?e.initialPromise:void 0;try{x=S??e.fn()}catch(E){x=Promise.reject(E)}Promise.resolve(x).then(d).catch(E=>{var N;if(i())return;const C=e.retry??(mc?0:3),O=e.retryDelay??KY,A=typeof O=="function"?O(n,E):O,T=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,E);if(t||!T){p(E);return}n++,(N=e.onFail)==null||N.call(e,n,E),LY(A).then(()=>f()?void 0:b()).then(()=>{t?p(E):w()})})};return{promise:a,status:()=>a.status,cancel:s,continue:()=>(r==null||r(),a),cancelRetry:c,continueRetry:u,canStart:m,start:()=>(m()?w():b().then(w),a)}}var tc,W3,Nz=(W3=class{constructor(){Ee(this,tc)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),eE(this.gcTime)&&xe(this,tc,Gl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(mc?1/0:300*1e3))}clearGcTimeout(){X(this,tc)&&(Gl.clearTimeout(X(this,tc)),xe(this,tc,void 0))}},tc=new WeakMap,W3),nc,uf,xa,rc,kn,sm,ac,za,co,Q3,VY=(Q3=class extends Nz{constructor(t){super();Ee(this,za);Ee(this,nc);Ee(this,uf);Ee(this,xa);Ee(this,rc);Ee(this,kn);Ee(this,sm);Ee(this,ac);xe(this,ac,!1),xe(this,sm,t.defaultOptions),this.setOptions(t.options),this.observers=[],xe(this,rc,t.client),xe(this,xa,X(this,rc).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,xe(this,nc,XP(this.options)),this.state=t.state??X(this,nc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=X(this,kn))==null?void 0:t.promise}setOptions(t){if(this.options={...X(this,sm),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=XP(this.options);n.data!==void 0&&(this.setState(YP(n.data,n.dataUpdatedAt)),xe(this,nc,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&X(this,xa).remove(this)}setData(t,n){const r=nE(this.state.data,t,this.options);return $e(this,za,co).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){$e(this,za,co).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=X(this,kn))==null?void 0:r.promise;return(a=X(this,kn))==null||a.cancel(t),n?n.then(sr).catch(sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(X(this,nc))}isActive(){return this.observers.some(t=>Sa(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fj||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Gs(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:!jz(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=X(this,kn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=X(this,kn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),X(this,xa).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(X(this,kn)&&(X(this,ac)?X(this,kn).cancel({revert:!0}):X(this,kn).cancelRetry()),this.scheduleGc()),X(this,xa).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||$e(this,za,co).call(this,{type:"invalidate"})}async fetch(t,n){var u,f,m,d,p,b,w,x,S,E,C,O;if(this.state.fetchStatus!=="idle"&&((u=X(this,kn))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(X(this,kn))return X(this,kn).continueRetry(),X(this,kn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(T=>T.options.queryFn);A&&this.setOptions(A.options)}const r=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(xe(this,ac,!0),r.signal)})},i=()=>{const A=Oz(this.options,n),N=(()=>{const P={client:X(this,rc),queryKey:this.queryKey,meta:this.meta};return a(P),P})();return xe(this,ac,!1),this.options.persister?this.options.persister(A,N,this):A(N)},c=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:X(this,rc),state:this.state,fetchFn:i};return a(A),A})();(f=this.options.behavior)==null||f.onFetch(c,this),xe(this,uf,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&$e(this,za,co).call(this,{type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta}),xe(this,kn,Az({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof aE&&A.revert&&this.setState({...X(this,uf),fetchStatus:"idle"}),r.abort()},onFail:(A,T)=>{$e(this,za,co).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{$e(this,za,co).call(this,{type:"pause"})},onContinue:()=>{$e(this,za,co).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await X(this,kn).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(b=(p=X(this,xa).config).onSuccess)==null||b.call(p,A,this),(x=(w=X(this,xa).config).onSettled)==null||x.call(w,A,this.state.error,this),A}catch(A){if(A instanceof aE){if(A.silent)return X(this,kn).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw $e(this,za,co).call(this,{type:"error",error:A}),(E=(S=X(this,xa).config).onError)==null||E.call(S,A,this),(O=(C=X(this,xa).config).onSettled)==null||O.call(C,this.state.data,A,this),A}finally{this.scheduleGc()}}},nc=new WeakMap,uf=new WeakMap,xa=new WeakMap,rc=new WeakMap,kn=new WeakMap,sm=new WeakMap,ac=new WeakMap,za=new WeakSet,co=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,...Tz(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...YP(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return xe(this,uf,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),en.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),X(this,xa).notify({query:this,type:"updated",action:t})})},Q3);function Tz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Cz(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function YP(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function XP(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 Pr,rt,lm,vr,ic,ff,fo,Us,cm,df,hf,oc,sc,Hs,mf,pt,xh,iE,oE,sE,lE,cE,uE,fE,Pz,Z3,mj=(Z3=class extends Dc{constructor(t,n){super();Ee(this,pt);Ee(this,Pr);Ee(this,rt);Ee(this,lm);Ee(this,vr);Ee(this,ic);Ee(this,ff);Ee(this,fo);Ee(this,Us);Ee(this,cm);Ee(this,df);Ee(this,hf);Ee(this,oc);Ee(this,sc);Ee(this,Hs);Ee(this,mf,new Set);this.options=n,xe(this,Pr,t),xe(this,Us,null),xe(this,fo,rE()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(X(this,rt).addObserver(this),GP(X(this,rt),this.options)?$e(this,pt,xh).call(this):this.updateResult(),$e(this,pt,lE).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dE(X(this,rt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dE(X(this,rt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,$e(this,pt,cE).call(this),$e(this,pt,uE).call(this),X(this,rt).removeObserver(this)}setOptions(t){const n=this.options,r=X(this,rt);if(this.options=X(this,Pr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sa(this.options.enabled,X(this,rt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");$e(this,pt,fE).call(this),X(this,rt).setOptions(this.options),n._defaulted&&!Rh(this.options,n)&&X(this,Pr).getQueryCache().notify({type:"observerOptionsUpdated",query:X(this,rt),observer:this});const a=this.hasListeners();a&&WP(X(this,rt),r,this.options,n)&&$e(this,pt,xh).call(this),this.updateResult(),a&&(X(this,rt)!==r||Sa(this.options.enabled,X(this,rt))!==Sa(n.enabled,X(this,rt))||Gs(this.options.staleTime,X(this,rt))!==Gs(n.staleTime,X(this,rt)))&&$e(this,pt,iE).call(this);const i=$e(this,pt,oE).call(this);a&&(X(this,rt)!==r||Sa(this.options.enabled,X(this,rt))!==Sa(n.enabled,X(this,rt))||i!==X(this,Hs))&&$e(this,pt,sE).call(this,i)}getOptimisticResult(t){const n=X(this,Pr).getQueryCache().build(X(this,Pr),t),r=this.createResult(n,t);return XY(this,r)&&(xe(this,vr,r),xe(this,ff,this.options),xe(this,ic,X(this,rt).state)),r}getCurrentResult(){return X(this,vr)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&X(this,fo).status==="pending"&&X(this,fo).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){X(this,mf).add(t)}getCurrentQuery(){return X(this,rt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=X(this,Pr).defaultQueryOptions(t),r=X(this,Pr).getQueryCache().build(X(this,Pr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return $e(this,pt,xh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),X(this,vr)))}createResult(t,n){var D;const r=X(this,rt),a=this.options,i=X(this,vr),s=X(this,ic),c=X(this,ff),f=t!==r?t.state:X(this,lm),{state:m}=t;let d={...m},p=!1,b;if(n._optimisticResults){const K=this.hasListeners(),B=!K&&GP(t,n),I=K&&WP(t,r,n,a);(B||I)&&(d={...d,...Tz(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:w,errorUpdatedAt:x,status:S}=d;b=d.data;let E=!1;if(n.placeholderData!==void 0&&b===void 0&&S==="pending"){let K;i!=null&&i.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(K=i.data,E=!0):K=typeof n.placeholderData=="function"?n.placeholderData((D=X(this,hf))==null?void 0:D.state.data,X(this,hf)):n.placeholderData,K!==void 0&&(S="success",b=nE(i==null?void 0:i.data,K,n),p=!0)}if(n.select&&b!==void 0&&!E)if(i&&b===(s==null?void 0:s.data)&&n.select===X(this,cm))b=X(this,df);else try{xe(this,cm,n.select),b=n.select(b),b=nE(i==null?void 0:i.data,b,n),xe(this,df,b),xe(this,Us,null)}catch(K){xe(this,Us,K)}X(this,Us)&&(w=X(this,Us),b=X(this,df),x=Date.now(),S="error");const C=d.fetchStatus==="fetching",O=S==="pending",A=S==="error",T=O&&C,N=b!==void 0,k={status:S,fetchStatus:d.fetchStatus,isPending:O,isSuccess:S==="success",isError:A,isInitialLoading:T,isLoading:T,data:b,dataUpdatedAt:d.dataUpdatedAt,error:w,errorUpdatedAt:x,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>f.dataUpdateCount||d.errorUpdateCount>f.errorUpdateCount,isFetching:C,isRefetching:C&&!O,isLoadingError:A&&!N,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:A&&N,isStale:pj(t,n),refetch:this.refetch,promise:X(this,fo),isEnabled:Sa(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=k.data!==void 0,B=k.status==="error"&&!K,I=V=>{B?V.reject(k.error):K&&V.resolve(k.data)},W=()=>{const V=xe(this,fo,k.promise=rE());I(V)},z=X(this,fo);switch(z.status){case"pending":t.queryHash===r.queryHash&&I(z);break;case"fulfilled":(B||k.data!==z.value)&&W();break;case"rejected":(!B||k.error!==z.reason)&&W();break}}return k}updateResult(){const t=X(this,vr),n=this.createResult(X(this,rt),this.options);if(xe(this,ic,X(this,rt).state),xe(this,ff,this.options),X(this,ic).data!==void 0&&xe(this,hf,X(this,rt)),Rh(n,t))return;xe(this,vr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!X(this,mf).size)return!0;const s=new Set(i??X(this,mf));return this.options.throwOnError&&s.add("error"),Object.keys(X(this,vr)).some(c=>{const u=c;return X(this,vr)[u]!==t[u]&&s.has(u)})};$e(this,pt,Pz).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&$e(this,pt,lE).call(this)}},Pr=new WeakMap,rt=new WeakMap,lm=new WeakMap,vr=new WeakMap,ic=new WeakMap,ff=new WeakMap,fo=new WeakMap,Us=new WeakMap,cm=new WeakMap,df=new WeakMap,hf=new WeakMap,oc=new WeakMap,sc=new WeakMap,Hs=new WeakMap,mf=new WeakMap,pt=new WeakSet,xh=function(t){$e(this,pt,fE).call(this);let n=X(this,rt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(sr)),n},iE=function(){$e(this,pt,cE).call(this);const t=Gs(this.options.staleTime,X(this,rt));if(mc||X(this,vr).isStale||!eE(t))return;const r=jz(X(this,vr).dataUpdatedAt,t)+1;xe(this,oc,Gl.setTimeout(()=>{X(this,vr).isStale||this.updateResult()},r))},oE=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(X(this,rt)):this.options.refetchInterval)??!1},sE=function(t){$e(this,pt,uE).call(this),xe(this,Hs,t),!(mc||Sa(this.options.enabled,X(this,rt))===!1||!eE(X(this,Hs))||X(this,Hs)===0)&&xe(this,sc,Gl.setInterval(()=>{(this.options.refetchIntervalInBackground||hj.isFocused())&&$e(this,pt,xh).call(this)},X(this,Hs)))},lE=function(){$e(this,pt,iE).call(this),$e(this,pt,sE).call(this,$e(this,pt,oE).call(this))},cE=function(){X(this,oc)&&(Gl.clearTimeout(X(this,oc)),xe(this,oc,void 0))},uE=function(){X(this,sc)&&(Gl.clearInterval(X(this,sc)),xe(this,sc,void 0))},fE=function(){const t=X(this,Pr).getQueryCache().build(X(this,Pr),this.options);if(t===X(this,rt))return;const n=X(this,rt);xe(this,rt,t),xe(this,lm,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Pz=function(t){en.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(X(this,vr))}),X(this,Pr).getQueryCache().notify({query:X(this,rt),type:"observerResultsUpdated"})})},Z3);function YY(e,t){return Sa(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function GP(e,t){return YY(e,t)||e.state.data!==void 0&&dE(e,t,t.refetchOnMount)}function dE(e,t,n){if(Sa(t.enabled,e)!==!1&&Gs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&pj(e,t)}return!1}function WP(e,t,n,r){return(e!==t||Sa(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&pj(e,n)}function pj(e,t){return Sa(t.enabled,e)!==!1&&e.isStaleByTime(Gs(t.staleTime,e))}function XY(e,t){return!Rh(e.getCurrentResult(),t)}function QP(e){return{onFetch:(t,n)=>{var m,d,p,b,w;const r=t.options,a=(p=(d=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,i=((b=t.state.data)==null?void 0:b.pages)||[],s=((w=t.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},u=0;const f=async()=>{let x=!1;const S=O=>{BY(O,()=>t.signal,()=>x=!0)},E=Oz(t.options,t.fetchOptions),C=async(O,A,T)=>{if(x)return Promise.reject();if(A==null&&O.pages.length)return Promise.resolve(O);const P=(()=>{const B={client:t.client,queryKey:t.queryKey,pageParam:A,direction:T?"backward":"forward",meta:t.options.meta};return S(B),B})(),k=await E(P),{maxPages:D}=t.options,K=T?$Y:zY;return{pages:K(O.pages,k,D),pageParams:K(O.pageParams,A,D)}};if(a&&i.length){const O=a==="backward",A=O?GY:ZP,T={pages:i,pageParams:s},N=A(r,T);c=await C(T,N,O)}else{const O=e??i.length;do{const A=u===0?s[0]??r.initialPageParam:ZP(r,c);if(u>0&&A==null)break;c=await C(c,A),u++}while(u<O)}return c};t.options.persister?t.fetchFn=()=>{var x,S;return(S=(x=t.options).persister)==null?void 0:S.call(x,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function ZP(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 GY(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}var um,gi,ir,lc,yi,Ps,J3,WY=(J3=class extends Nz{constructor(t){super();Ee(this,yi);Ee(this,um);Ee(this,gi);Ee(this,ir);Ee(this,lc);xe(this,um,t.client),this.mutationId=t.mutationId,xe(this,ir,t.mutationCache),xe(this,gi,[]),this.state=t.state||Mz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){X(this,gi).includes(t)||(X(this,gi).push(t),this.clearGcTimeout(),X(this,ir).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){xe(this,gi,X(this,gi).filter(n=>n!==t)),this.scheduleGc(),X(this,ir).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){X(this,gi).length||(this.state.status==="pending"?this.scheduleGc():X(this,ir).remove(this))}continue(){var t;return((t=X(this,lc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,c,u,f,m,d,p,b,w,x,S,E,C,O,A,T,N,P;const n=()=>{$e(this,yi,Ps).call(this,{type:"continue"})},r={client:X(this,um),meta:this.options.meta,mutationKey:this.options.mutationKey};xe(this,lc,Az({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(k,D)=>{$e(this,yi,Ps).call(this,{type:"failed",failureCount:k,error:D})},onPause:()=>{$e(this,yi,Ps).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>X(this,ir).canRun(this)}));const a=this.state.status==="pending",i=!X(this,lc).canStart();try{if(a)n();else{$e(this,yi,Ps).call(this,{type:"pending",variables:t,isPaused:i}),X(this,ir).config.onMutate&&await X(this,ir).config.onMutate(t,this,r);const D=await((c=(s=this.options).onMutate)==null?void 0:c.call(s,t,r));D!==this.state.context&&$e(this,yi,Ps).call(this,{type:"pending",context:D,variables:t,isPaused:i})}const k=await X(this,lc).start();return await((f=(u=X(this,ir).config).onSuccess)==null?void 0:f.call(u,k,t,this.state.context,this,r)),await((d=(m=this.options).onSuccess)==null?void 0:d.call(m,k,t,this.state.context,r)),await((b=(p=X(this,ir).config).onSettled)==null?void 0:b.call(p,k,null,this.state.variables,this.state.context,this,r)),await((x=(w=this.options).onSettled)==null?void 0:x.call(w,k,null,t,this.state.context,r)),$e(this,yi,Ps).call(this,{type:"success",data:k}),k}catch(k){try{await((E=(S=X(this,ir).config).onError)==null?void 0:E.call(S,k,t,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((O=(C=this.options).onError)==null?void 0:O.call(C,k,t,this.state.context,r))}catch(D){Promise.reject(D)}try{await((T=(A=X(this,ir).config).onSettled)==null?void 0:T.call(A,void 0,k,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((P=(N=this.options).onSettled)==null?void 0:P.call(N,void 0,k,t,this.state.context,r))}catch(D){Promise.reject(D)}throw $e(this,yi,Ps).call(this,{type:"error",error:k}),k}finally{X(this,ir).runNext(this)}}},um=new WeakMap,gi=new WeakMap,ir=new WeakMap,lc=new WeakMap,yi=new WeakSet,Ps=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),en.batch(()=>{X(this,gi).forEach(r=>{r.onMutationUpdate(t)}),X(this,ir).notify({mutation:this,type:"updated",action:t})})},J3);function Mz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ho,$a,fm,ez,QY=(ez=class extends Dc{constructor(t={}){super();Ee(this,ho);Ee(this,$a);Ee(this,fm);this.config=t,xe(this,ho,new Set),xe(this,$a,new Map),xe(this,fm,0)}build(t,n,r){const a=new WY({client:t,mutationCache:this,mutationId:++Sv(this,fm)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){X(this,ho).add(t);const n=_v(t);if(typeof n=="string"){const r=X(this,$a).get(n);r?r.push(t):X(this,$a).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(X(this,ho).delete(t)){const n=_v(t);if(typeof n=="string"){const r=X(this,$a).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&X(this,$a).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=_v(t);if(typeof n=="string"){const r=X(this,$a).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=_v(t);if(typeof n=="string"){const a=(r=X(this,$a).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){en.batch(()=>{X(this,ho).forEach(t=>{this.notify({type:"removed",mutation:t})}),X(this,ho).clear(),X(this,$a).clear()})}getAll(){return Array.from(X(this,ho))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>qP(n,r))}findAll(t={}){return this.getAll().filter(n=>qP(t,n))}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return en.batch(()=>Promise.all(t.map(n=>n.continue().catch(sr))))}},ho=new WeakMap,$a=new WeakMap,fm=new WeakMap,ez);function _v(e){var t;return(t=e.options.scope)==null?void 0:t.id}var mo,Fs,Mr,po,Co,og,hE,tz,ZY=(tz=class extends Dc{constructor(n,r){super();Ee(this,Co);Ee(this,mo);Ee(this,Fs);Ee(this,Mr);Ee(this,po);xe(this,mo,n),this.setOptions(r),this.bindMethods(),$e(this,Co,og).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=X(this,mo).defaultMutationOptions(n),Rh(this.options,r)||X(this,mo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:X(this,Mr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&pc(r.mutationKey)!==pc(this.options.mutationKey)?this.reset():((a=X(this,Mr))==null?void 0:a.state.status)==="pending"&&X(this,Mr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=X(this,Mr))==null||n.removeObserver(this)}onMutationUpdate(n){$e(this,Co,og).call(this),$e(this,Co,hE).call(this,n)}getCurrentResult(){return X(this,Fs)}reset(){var n;(n=X(this,Mr))==null||n.removeObserver(this),xe(this,Mr,void 0),$e(this,Co,og).call(this),$e(this,Co,hE).call(this)}mutate(n,r){var a;return xe(this,po,r),(a=X(this,Mr))==null||a.removeObserver(this),xe(this,Mr,X(this,mo).getMutationCache().build(X(this,mo),this.options)),X(this,Mr).addObserver(this),X(this,Mr).execute(n)}},mo=new WeakMap,Fs=new WeakMap,Mr=new WeakMap,po=new WeakMap,Co=new WeakSet,og=function(){var r;const n=((r=X(this,Mr))==null?void 0:r.state)??Mz();xe(this,Fs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},hE=function(n){en.batch(()=>{var r,a,i,s,c,u,f,m;if(X(this,po)&&this.hasListeners()){const d=X(this,Fs).variables,p=X(this,Fs).context,b={client:X(this,mo),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(a=(r=X(this,po)).onSuccess)==null||a.call(r,n.data,d,p,b)}catch(w){Promise.reject(w)}try{(s=(i=X(this,po)).onSettled)==null||s.call(i,n.data,null,d,p,b)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(u=(c=X(this,po)).onError)==null||u.call(c,n.error,d,p,b)}catch(w){Promise.reject(w)}try{(m=(f=X(this,po)).onSettled)==null||m.call(f,void 0,n.error,d,p,b)}catch(w){Promise.reject(w)}}}this.listeners.forEach(d=>{d(X(this,Fs))})})},tz);function JP(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function JY(e,t,n){const r=e.slice(0);return r[t]=n,r}var pf,Xr,vf,gf,wa,qs,dm,hm,mm,pm,Zn,mE,pE,vE,gE,yE,nz,eX=(nz=class extends Dc{constructor(t,n,r){super();Ee(this,Zn);Ee(this,pf);Ee(this,Xr);Ee(this,vf);Ee(this,gf);Ee(this,wa);Ee(this,qs);Ee(this,dm);Ee(this,hm);Ee(this,mm);Ee(this,pm,[]);xe(this,pf,t),xe(this,gf,r),xe(this,vf,[]),xe(this,wa,[]),xe(this,Xr,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&X(this,wa).forEach(t=>{t.subscribe(n=>{$e(this,Zn,gE).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,X(this,wa).forEach(t=>{t.destroy()})}setQueries(t,n){xe(this,vf,t),xe(this,gf,n),en.batch(()=>{const r=X(this,wa),a=$e(this,Zn,vE).call(this,X(this,vf));a.forEach(d=>d.observer.setOptions(d.defaultedQueryOptions));const i=a.map(d=>d.observer),s=i.map(d=>d.getCurrentResult()),c=r.length!==i.length,u=i.some((d,p)=>d!==r[p]),f=c||u,m=f?!0:s.some((d,p)=>{const b=X(this,Xr)[p];return!b||!Rh(d,b)});!f&&!m||(f&&(xe(this,pm,a),xe(this,wa,i)),xe(this,Xr,s),this.hasListeners()&&(f&&(JP(r,i).forEach(d=>{d.destroy()}),JP(i,r).forEach(d=>{d.subscribe(p=>{$e(this,Zn,gE).call(this,d,p)})})),$e(this,Zn,yE).call(this)))})}getCurrentResult(){return X(this,Xr)}getQueries(){return X(this,wa).map(t=>t.getCurrentQuery())}getObservers(){return X(this,wa)}getOptimisticResult(t,n){const r=$e(this,Zn,vE).call(this,t),a=r.map(s=>s.observer.getOptimisticResult(s.defaultedQueryOptions)),i=r.map(s=>s.defaultedQueryOptions.queryHash);return[a,s=>$e(this,Zn,pE).call(this,s??a,n,i),()=>$e(this,Zn,mE).call(this,a,r)]}},pf=new WeakMap,Xr=new WeakMap,vf=new WeakMap,gf=new WeakMap,wa=new WeakMap,qs=new WeakMap,dm=new WeakMap,hm=new WeakMap,mm=new WeakMap,pm=new WeakMap,Zn=new WeakSet,mE=function(t,n){return n.map((r,a)=>{const i=t[a];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,s=>{n.forEach(c=>{c.observer.trackProp(s)})})})},pE=function(t,n,r){if(n){const a=X(this,mm),i=r!==void 0&&a!==void 0&&(a.length!==r.length||r.some((s,c)=>s!==a[c]));return(!X(this,qs)||X(this,Xr)!==X(this,hm)||i||n!==X(this,dm))&&(xe(this,dm,n),xe(this,hm,X(this,Xr)),r!==void 0&&xe(this,mm,r),xe(this,qs,uj(X(this,qs),n(t)))),X(this,qs)}return t},vE=function(t){const n=new Map;X(this,wa).forEach(a=>{const i=a.options.queryHash;if(!i)return;const s=n.get(i);s?s.push(a):n.set(i,[a])});const r=[];return t.forEach(a=>{var u;const i=X(this,pf).defaultQueryOptions(a),c=((u=n.get(i.queryHash))==null?void 0:u.shift())??new mj(X(this,pf),i);r.push({defaultedQueryOptions:i,observer:c})}),r},gE=function(t,n){const r=X(this,wa).indexOf(t);r!==-1&&(xe(this,Xr,JY(X(this,Xr),r,n)),$e(this,Zn,yE).call(this))},yE=function(){var t;if(this.hasListeners()){const n=X(this,qs),r=$e(this,Zn,mE).call(this,X(this,Xr),X(this,pm)),a=$e(this,Zn,pE).call(this,r,(t=X(this,gf))==null?void 0:t.combine);n!==a&&en.batch(()=>{this.listeners.forEach(i=>{i(X(this,Xr))})})}},nz),bi,rz,tX=(rz=class extends Dc{constructor(t={}){super();Ee(this,bi);this.config=t,xe(this,bi,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??cj(a,n);let s=this.get(i);return s||(s=new VY({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){X(this,bi).has(t.queryHash)||(X(this,bi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=X(this,bi).get(t.queryHash);n&&(t.destroy(),n===t&&X(this,bi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return X(this,bi).get(t)}getAll(){return[...X(this,bi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>FP(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>FP(t,r)):n}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){en.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){en.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bi=new WeakMap,rz),Qt,Ks,Vs,yf,bf,Ys,xf,wf,az,nX=(az=class{constructor(e={}){Ee(this,Qt);Ee(this,Ks);Ee(this,Vs);Ee(this,yf);Ee(this,bf);Ee(this,Ys);Ee(this,xf);Ee(this,wf);xe(this,Qt,e.queryCache||new tX),xe(this,Ks,e.mutationCache||new QY),xe(this,Vs,e.defaultOptions||{}),xe(this,yf,new Map),xe(this,bf,new Map),xe(this,Ys,0)}mount(){Sv(this,Ys)._++,X(this,Ys)===1&&(xe(this,xf,hj.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,Qt).onFocus())})),xe(this,wf,_g.subscribe(async e=>{e&&(await this.resumePausedMutations(),X(this,Qt).onOnline())})))}unmount(){var e,t;Sv(this,Ys)._--,X(this,Ys)===0&&((e=X(this,xf))==null||e.call(this),xe(this,xf,void 0),(t=X(this,wf))==null||t.call(this),xe(this,wf,void 0))}isFetching(e){return X(this,Qt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return X(this,Ks).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=X(this,Qt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=X(this,Qt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Gs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return X(this,Qt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=X(this,Qt).get(r.queryHash),i=a==null?void 0:a.state.data,s=DY(t,i);if(s!==void 0)return X(this,Qt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return en.batch(()=>X(this,Qt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=X(this,Qt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=X(this,Qt);en.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=X(this,Qt);return en.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=en.batch(()=>X(this,Qt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(sr).catch(sr)}invalidateQueries(e,t={}){return en.batch(()=>(X(this,Qt).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=en.batch(()=>X(this,Qt).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(sr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=X(this,Qt).build(this,t);return n.isStaleByTime(Gs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(sr).catch(sr)}fetchInfiniteQuery(e){return e.behavior=QP(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(sr).catch(sr)}ensureInfiniteQueryData(e){return e.behavior=QP(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _g.isOnline()?X(this,Ks).resumePausedMutations():Promise.resolve()}getQueryCache(){return X(this,Qt)}getMutationCache(){return X(this,Ks)}getDefaultOptions(){return X(this,Vs)}setDefaultOptions(e){xe(this,Vs,e)}setQueryDefaults(e,t){X(this,yf).set(pc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...X(this,yf).values()],n={};return t.forEach(r=>{Mh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){X(this,bf).set(pc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...X(this,bf).values()],n={};return t.forEach(r=>{Mh(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...X(this,Vs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cj(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===fj&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...X(this,Vs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){X(this,Qt).clear(),X(this,Ks).clear()}},Qt=new WeakMap,Ks=new WeakMap,Vs=new WeakMap,yf=new WeakMap,bf=new WeakMap,Ys=new WeakMap,xf=new WeakMap,wf=new WeakMap,az),Rz=y.createContext(void 0),Et=e=>{const t=y.useContext(Rz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},rX=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(Rz.Provider,{value:e,children:t})),kz=y.createContext(!1),Dz=()=>y.useContext(kz);kz.Provider;function aX(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var iX=y.createContext(aX()),Iz=()=>y.useContext(iX),Lz=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?dj(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},zz=e=>{y.useEffect(()=>{e.clearReset()},[e])},$z=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||dj(n,[e.error,r])),Bz=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oX=(e,t)=>e.isLoading&&e.isFetching&&!t,bE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,xE=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sX({queries:e,...t},n){const r=Et(),a=Dz(),i=Iz(),s=y.useMemo(()=>e.map(x=>{const S=r.defaultQueryOptions(x);return S._optimisticResults=a?"isRestoring":"optimistic",S}),[e,r,a]);s.forEach(x=>{Bz(x);const S=r.getQueryCache().get(x.queryHash);Lz(x,i,S)}),zz(i);const[c]=y.useState(()=>new eX(r,s,t)),[u,f,m]=c.getOptimisticResult(s,t.combine),d=!a&&t.subscribed!==!1;y.useSyncExternalStore(y.useCallback(x=>d?c.subscribe(en.batchCalls(x)):sr,[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),y.useEffect(()=>{c.setQueries(s,t)},[s,t,c]);const b=u.some((x,S)=>bE(s[S],x))?u.flatMap((x,S)=>{const E=s[S];if(E&&bE(E,x)){const C=new mj(r,E);return xE(E,C,i)}return[]}):[];if(b.length>0)throw Promise.all(b);const w=u.find((x,S)=>{const E=s[S];return E&&$z({result:x,errorResetBoundary:i,throwOnError:E.throwOnError,query:r.getQueryCache().get(E.queryHash),suspense:E.suspense})});if(w!=null&&w.error)throw w.error;return f(m())}function lX(e,t,n){var p,b,w,x;const r=Dz(),a=Iz(),i=Et(),s=i.defaultQueryOptions(e);(b=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||b.call(p,s);const c=i.getQueryCache().get(s.queryHash);s._optimisticResults=r?"isRestoring":"optimistic",Bz(s),Lz(s,a,c),zz(a);const u=!i.getQueryCache().get(s.queryHash),[f]=y.useState(()=>new t(i,s)),m=f.getOptimisticResult(s),d=!r&&e.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(S=>{const E=d?f.subscribe(en.batchCalls(S)):sr;return f.updateResult(),E},[f,d]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),y.useEffect(()=>{f.setOptions(s)},[s,f]),bE(s,m))throw xE(s,f,a);if($z({result:m,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw m.error;if((x=(w=i.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||x.call(w,s,m),s.experimental_prefetchInRender&&!mc&&oX(m,r)){const S=u?xE(s,f,a):c==null?void 0:c.promise;S==null||S.catch(sr).finally(()=>{f.updateResult()})}return s.notifyOnChangeProps?m:f.trackResult(m)}function Bn(e,t){return lX(e,mj)}function qt(e,t){const n=Et(),[r]=y.useState(()=>new ZY(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const a=y.useSyncExternalStore(y.useCallback(s=>r.subscribe(en.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=y.useCallback((s,c)=>{r.mutate(s,c).catch(sr)},[r]);if(a.error&&dj(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}var cX=(e,t,n,r,a,i,s,c)=>{let u=document.documentElement,f=["light","dark"];function m(b){(Array.isArray(e)?e:[e]).forEach(w=>{let x=w==="class",S=x&&i?a.map(E=>i[E]||E):a;x?(u.classList.remove(...S),u.classList.add(i&&i[b]?i[b]:b)):u.setAttribute(w,b)}),d(b)}function d(b){c&&f.includes(b)&&(u.style.colorScheme=b)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let b=localStorage.getItem(t)||n,w=s&&b==="system"?p():b;m(w)}catch{}},eM=["light","dark"],Uz="(prefers-color-scheme: dark)",uX=typeof window>"u",vj=y.createContext(void 0),fX={setTheme:e=>{},themes:[]},gj=()=>{var e;return(e=y.useContext(vj))!=null?e:fX},dX=e=>y.useContext(vj)?y.createElement(y.Fragment,null,e.children):y.createElement(mX,{...e}),hX=["light","dark"],mX=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:a="theme",themes:i=hX,defaultTheme:s=n?"system":"light",attribute:c="data-theme",value:u,children:f,nonce:m,scriptProps:d})=>{let[p,b]=y.useState(()=>vX(a,s)),[w,x]=y.useState(()=>p==="system"?Fw():p),S=u?Object.values(u):i,E=y.useCallback(T=>{let N=T;if(!N)return;T==="system"&&n&&(N=Fw());let P=u?u[N]:N,k=t?gX(m):null,D=document.documentElement,K=B=>{B==="class"?(D.classList.remove(...S),P&&D.classList.add(P)):B.startsWith("data-")&&(P?D.setAttribute(B,P):D.removeAttribute(B))};if(Array.isArray(c)?c.forEach(K):K(c),r){let B=eM.includes(s)?s:null,I=eM.includes(N)?N:B;D.style.colorScheme=I}k==null||k()},[m]),C=y.useCallback(T=>{let N=typeof T=="function"?T(p):T;b(N);try{localStorage.setItem(a,N)}catch{}},[p]),O=y.useCallback(T=>{let N=Fw(T);x(N),p==="system"&&n&&!e&&E("system")},[p,e]);y.useEffect(()=>{let T=window.matchMedia(Uz);return T.addListener(O),O(T),()=>T.removeListener(O)},[O]),y.useEffect(()=>{let T=N=>{N.key===a&&(N.newValue?b(N.newValue):C(s))};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[C]),y.useEffect(()=>{E(e??p)},[e,p]);let A=y.useMemo(()=>({theme:p,setTheme:C,forcedTheme:e,resolvedTheme:p==="system"?w:p,themes:n?[...i,"system"]:i,systemTheme:n?w:void 0}),[p,C,e,w,n,i]);return y.createElement(vj.Provider,{value:A},y.createElement(pX,{forcedTheme:e,storageKey:a,attribute:c,enableSystem:n,enableColorScheme:r,defaultTheme:s,value:u,themes:i,nonce:m,scriptProps:d}),f)},pX=y.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:a,defaultTheme:i,value:s,themes:c,nonce:u,scriptProps:f})=>{let m=JSON.stringify([n,t,i,e,c,s,r,a]).slice(1,-1);return y.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${cX.toString()})(${m})`}})}),vX=(e,t)=>{if(uX)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},gX=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},Fw=e=>(e||(e=window.matchMedia(Uz)),e.matches?"dark":"light");function tM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function No(...e){return t=>{let n=!1;const r=e.map(a=>{const i=tM(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():tM(e[a],null)}}}}function tt(...e){return y.useCallback(No(...e),e)}function vc(e){const t=yX(e),n=y.forwardRef((r,a)=>{const{children:i,...s}=r,c=y.Children.toArray(i),u=c.find(xX);if(u){const f=u.props.children,m=c.map(d=>d===u?y.Children.count(f)>1?y.Children.only(null):y.isValidElement(f)?f.props.children:null:d);return v.jsx(t,{...s,ref:a,children:y.isValidElement(f)?y.cloneElement(f,void 0,m):null})}return v.jsx(t,{...s,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var yj=vc("Slot");function yX(e){const t=y.forwardRef((n,r)=>{const{children:a,...i}=n;if(y.isValidElement(a)){const s=SX(a),c=wX(i,a.props);return a.type!==y.Fragment&&(c.ref=r?No(r,s):s),y.cloneElement(a,c)}return y.Children.count(a)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Hz=Symbol("radix.slottable");function bX(e){const t=({children:n})=>v.jsx(v.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Hz,t}function xX(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Hz}function wX(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...c)=>{const u=i(...c);return a(...c),u}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function SX(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var EX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=EX.reduce((e,t)=>{const n=vc(`Primitive.${t}`),r=y.forwardRef((a,i)=>{const{asChild:s,...c}=a,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Fz(e,t){e&&cl.flushSync(()=>e.dispatchEvent(t))}var qz=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"}),_X="VisuallyHidden",Kz=y.forwardRef((e,t)=>v.jsx(ke.span,{...e,ref:t,style:{...qz,...e.style}}));Kz.displayName=_X;var jX=Kz;function OX(e,t){const n=y.createContext(t),r=i=>{const{children:s,...c}=i,u=y.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function a(i){const s=y.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function ei(e,t=[]){let n=[];function r(i,s){const c=y.createContext(s),u=n.length;n=[...n,s];const f=d=>{var E;const{scope:p,children:b,...w}=d,x=((E=p==null?void 0:p[e])==null?void 0:E[u])||c,S=y.useMemo(()=>w,Object.values(w));return v.jsx(x.Provider,{value:S,children:b})};f.displayName=i+"Provider";function m(d,p){var x;const b=((x=p==null?void 0:p[e])==null?void 0:x[u])||c,w=y.useContext(b);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(s=>y.createContext(s));return function(c){const u=(c==null?void 0:c[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return a.scopeName=e,[r,CX(a,...t)]}function CX(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const s=r.reduce((c,{useScope:u,scopeName:f})=>{const d=u(i)[`__scope${f}`];return{...c,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function bj(e){const t=e+"CollectionProvider",[n,r]=ei(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:S,children:E}=x,C=ye.useRef(null),O=ye.useRef(new Map).current;return v.jsx(a,{scope:S,itemMap:O,collectionRef:C,children:E})};s.displayName=t;const c=e+"CollectionSlot",u=vc(c),f=ye.forwardRef((x,S)=>{const{scope:E,children:C}=x,O=i(c,E),A=tt(S,O.collectionRef);return v.jsx(u,{ref:A,children:C})});f.displayName=c;const m=e+"CollectionItemSlot",d="data-radix-collection-item",p=vc(m),b=ye.forwardRef((x,S)=>{const{scope:E,children:C,...O}=x,A=ye.useRef(null),T=tt(S,A),N=i(m,E);return ye.useEffect(()=>(N.itemMap.set(A,{ref:A,...O}),()=>void N.itemMap.delete(A))),v.jsx(p,{[d]:"",ref:T,children:C})});b.displayName=m;function w(x){const S=i(e+"CollectionConsumer",x);return ye.useCallback(()=>{const C=S.collectionRef.current;if(!C)return[];const O=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(S.itemMap.values()).sort((N,P)=>O.indexOf(N.ref.current)-O.indexOf(P.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:s,Slot:f,ItemSlot:b},w,r]}function Se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}var $n=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},AX=tj[" useInsertionEffect ".trim().toString()]||$n;function Js({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,s]=NX({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:a;{const m=y.useRef(e!==void 0);y.useEffect(()=>{const d=m.current;d!==c&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,r])}const f=y.useCallback(m=>{var d;if(c){const p=TX(m)?m(e):m;p!==e&&((d=s.current)==null||d.call(s,p))}else i(m)},[c,e,i,s]);return[u,f]}function NX({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),a=y.useRef(n),i=y.useRef(t);return AX(()=>{i.current=t},[t]),y.useEffect(()=>{var s;a.current!==n&&((s=i.current)==null||s.call(i,n),a.current=n)},[n,a]),[n,r,i]}function TX(e){return typeof e=="function"}function PX(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var ur=e=>{const{present:t,children:n}=e,r=MX(t),a=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),i=tt(r.ref,RX(a));return typeof n=="function"||r.isPresent?y.cloneElement(a,{ref:i}):null};ur.displayName="Presence";function MX(e){const[t,n]=y.useState(),r=y.useRef(null),a=y.useRef(e),i=y.useRef("none"),s=e?"mounted":"unmounted",[c,u]=PX(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const f=jv(r.current);i.current=c==="mounted"?f:"none"},[c]),$n(()=>{const f=r.current,m=a.current;if(m!==e){const p=i.current,b=jv(f);e?u("MOUNT"):b==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(m&&p!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),$n(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,d=b=>{const x=jv(r.current).includes(CSS.escape(b.animationName));if(b.target===t&&x&&(u("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},p=b=>{b.target===t&&(i.current=jv(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:y.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function jv(e){return(e==null?void 0:e.animationName)||"none"}function RX(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var kX=tj[" useId ".trim().toString()]||(()=>{}),DX=0;function zn(e){const[t,n]=y.useState(kX());return $n(()=>{n(r=>r??String(DX++))},[e]),e||(t?`radix-${t}`:"")}var Xy="Collapsible",[IX]=ei(Xy),[LX,xj]=IX(Xy),Vz=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:i,onOpenChange:s,...c}=e,[u,f]=Js({prop:r,defaultProp:a??!1,onChange:s,caller:Xy});return v.jsx(LX,{scope:n,disabled:i,contentId:zn(),open:u,onOpenToggle:y.useCallback(()=>f(m=>!m),[f]),children:v.jsx(ke.div,{"data-state":Sj(u),"data-disabled":i?"":void 0,...c,ref:t})})});Vz.displayName=Xy;var Yz="CollapsibleTrigger",Xz=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=xj(Yz,n);return v.jsx(ke.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":Sj(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:Se(e.onClick,a.onOpenToggle)})});Xz.displayName=Yz;var wj="CollapsibleContent",Gz=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=xj(wj,e.__scopeCollapsible);return v.jsx(ur,{present:n||a.open,children:({present:i})=>v.jsx(zX,{...r,ref:t,present:i})})});Gz.displayName=wj;var zX=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...i}=e,s=xj(wj,n),[c,u]=y.useState(r),f=y.useRef(null),m=tt(t,f),d=y.useRef(0),p=d.current,b=y.useRef(0),w=b.current,x=s.open||c,S=y.useRef(x),E=y.useRef(void 0);return y.useEffect(()=>{const C=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(C)},[]),$n(()=>{const C=f.current;if(C){E.current=E.current||{transitionDuration:C.style.transitionDuration,animationName:C.style.animationName},C.style.transitionDuration="0s",C.style.animationName="none";const O=C.getBoundingClientRect();d.current=O.height,b.current=O.width,S.current||(C.style.transitionDuration=E.current.transitionDuration,C.style.animationName=E.current.animationName),u(r)}},[s.open,r]),v.jsx(ke.div,{"data-state":Sj(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!x,...i,ref:m,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:x&&a})});function Sj(e){return e?"open":"closed"}var $X=Vz,BX=y.createContext(void 0);function bm(e){const t=y.useContext(BX);return e||t||"ltr"}function Qn(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function UX(e,t=globalThis==null?void 0:globalThis.document){const n=Qn(e);y.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var HX="DismissableLayer",wE="dismissableLayer.update",FX="dismissableLayer.pointerDownOutside",qX="dismissableLayer.focusOutside",nM,Wz=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xm=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...u}=e,f=y.useContext(Wz),[m,d]=y.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=y.useState({}),w=tt(t,P=>d(P)),x=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=x.indexOf(S),C=m?x.indexOf(m):-1,O=f.layersWithOutsidePointerEventsDisabled.size>0,A=C>=E,T=YX(P=>{const k=P.target,D=[...f.branches].some(K=>K.contains(k));!A||D||(a==null||a(P),s==null||s(P),P.defaultPrevented||c==null||c())},p),N=XX(P=>{const k=P.target;[...f.branches].some(K=>K.contains(k))||(i==null||i(P),s==null||s(P),P.defaultPrevented||c==null||c())},p);return UX(P=>{C===f.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))},p),y.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(nM=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),rM(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=nM)}},[m,p,n,f]),y.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),rM())},[m,f]),y.useEffect(()=>{const P=()=>b({});return document.addEventListener(wE,P),()=>document.removeEventListener(wE,P)},[]),v.jsx(ke.div,{...u,ref:w,style:{pointerEvents:O?A?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,T.onPointerDownCapture)})});xm.displayName=HX;var KX="DismissableLayerBranch",VX=y.forwardRef((e,t)=>{const n=y.useContext(Wz),r=y.useRef(null),a=tt(t,r);return y.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),v.jsx(ke.div,{...e,ref:a})});VX.displayName=KX;function YX(e,t=globalThis==null?void 0:globalThis.document){const n=Qn(e),r=y.useRef(!1),a=y.useRef(()=>{});return y.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let u=function(){Qz(FX,n,f,{discrete:!0})};const f={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function XX(e,t=globalThis==null?void 0:globalThis.document){const n=Qn(e),r=y.useRef(!1);return y.useEffect(()=>{const a=i=>{i.target&&!r.current&&Qz(qX,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function rM(){const e=new CustomEvent(wE);document.dispatchEvent(e)}function Qz(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Fz(a,i):a.dispatchEvent(i)}var qw="focusScope.autoFocusOnMount",Kw="focusScope.autoFocusOnUnmount",aM={bubbles:!1,cancelable:!0},GX="FocusScope",Gy=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[c,u]=y.useState(null),f=Qn(a),m=Qn(i),d=y.useRef(null),p=tt(t,x=>u(x)),b=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let x=function(O){if(b.paused||!c)return;const A=O.target;c.contains(A)?d.current=A:Ms(d.current,{select:!0})},S=function(O){if(b.paused||!c)return;const A=O.relatedTarget;A!==null&&(c.contains(A)||Ms(d.current,{select:!0}))},E=function(O){if(document.activeElement===document.body)for(const T of O)T.removedNodes.length>0&&Ms(c)};document.addEventListener("focusin",x),document.addEventListener("focusout",S);const C=new MutationObserver(E);return c&&C.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",S),C.disconnect()}}},[r,c,b.paused]),y.useEffect(()=>{if(c){oM.add(b);const x=document.activeElement;if(!c.contains(x)){const E=new CustomEvent(qw,aM);c.addEventListener(qw,f),c.dispatchEvent(E),E.defaultPrevented||(WX(tG(Zz(c)),{select:!0}),document.activeElement===x&&Ms(c))}return()=>{c.removeEventListener(qw,f),setTimeout(()=>{const E=new CustomEvent(Kw,aM);c.addEventListener(Kw,m),c.dispatchEvent(E),E.defaultPrevented||Ms(x??document.body,{select:!0}),c.removeEventListener(Kw,m),oM.remove(b)},0)}}},[c,f,m,b]);const w=y.useCallback(x=>{if(!n&&!r||b.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,E=document.activeElement;if(S&&E){const C=x.currentTarget,[O,A]=QX(C);O&&A?!x.shiftKey&&E===A?(x.preventDefault(),n&&Ms(O,{select:!0})):x.shiftKey&&E===O&&(x.preventDefault(),n&&Ms(A,{select:!0})):E===C&&x.preventDefault()}},[n,r,b.paused]);return v.jsx(ke.div,{tabIndex:-1,...s,ref:p,onKeyDown:w})});Gy.displayName=GX;function WX(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ms(r,{select:t}),document.activeElement!==n)return}function QX(e){const t=Zz(e),n=iM(t,e),r=iM(t.reverse(),e);return[n,r]}function Zz(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function iM(e,t){for(const n of e)if(!ZX(n,{upTo:t}))return n}function ZX(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 JX(e){return e instanceof HTMLInputElement&&"select"in e}function Ms(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&JX(e)&&t&&e.select()}}var oM=eG();function eG(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=sM(e,t),e.unshift(t)},remove(t){var n;e=sM(e,t),(n=e[0])==null||n.resume()}}}function sM(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function tG(e){return e.filter(t=>t.tagName!=="A")}var nG="Portal",wm=y.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[a,i]=y.useState(!1);$n(()=>i(!0),[]);const s=n||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?_z.createPortal(v.jsx(ke.div,{...r,ref:t}),s):null});wm.displayName=nG;var Vw=0;function Ej(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lM()),document.body.insertAdjacentElement("beforeend",e[1]??lM()),Vw++,()=>{Vw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vw--}},[])}function lM(){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 wi=function(){return wi=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},wi.apply(this,arguments)};function Jz(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function rG(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var sg="right-scroll-bar-position",lg="width-before-scroll-bar",aG="with-scroll-bars-hidden",iG="--removed-body-scroll-bar-size";function Yw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function oG(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var sG=typeof window<"u"?y.useLayoutEffect:y.useEffect,cM=new WeakMap;function lG(e,t){var n=oG(null,function(r){return e.forEach(function(a){return Yw(a,r)})});return sG(function(){var r=cM.get(n);if(r){var a=new Set(r),i=new Set(e),s=n.current;a.forEach(function(c){i.has(c)||Yw(c,null)}),i.forEach(function(c){a.has(c)||Yw(c,s)})}cM.set(n,e)},[e]),n}function cG(e){return e}function uG(e,t){t===void 0&&(t=cG);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(c){return c!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(c){return i(c)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var c=n;n=[],c.forEach(i),s=n}var u=function(){var m=s;s=[],m.forEach(i)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(m){s.push(m),f()},filter:function(m){return s=s.filter(m),n}}}};return a}function fG(e){e===void 0&&(e={});var t=uG(null);return t.options=wi({async:!0,ssr:!1},e),t}var e4=function(e){var t=e.sideCar,n=Jz(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,wi({},n))};e4.isSideCarExport=!0;function dG(e,t){return e.useMedium(t),e4}var t4=fG(),Xw=function(){},Wy=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:Xw,onWheelCapture:Xw,onTouchMoveCapture:Xw}),a=r[0],i=r[1],s=e.forwardProps,c=e.children,u=e.className,f=e.removeScrollBar,m=e.enabled,d=e.shards,p=e.sideCar,b=e.noRelative,w=e.noIsolation,x=e.inert,S=e.allowPinchZoom,E=e.as,C=E===void 0?"div":E,O=e.gapMode,A=Jz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=p,N=lG([n,t]),P=wi(wi({},A),a);return y.createElement(y.Fragment,null,m&&y.createElement(T,{sideCar:t4,removeScrollBar:f,shards:d,noRelative:b,noIsolation:w,inert:x,setCallbacks:i,allowPinchZoom:!!S,lockRef:n,gapMode:O}),s?y.cloneElement(y.Children.only(c),wi(wi({},P),{ref:N})):y.createElement(C,wi({},P,{className:u,ref:N}),c))});Wy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wy.classNames={fullWidth:lg,zeroRight:sg};var hG=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hG();return t&&e.setAttribute("nonce",t),e}function pG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mG())&&(pG(t,n),vG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yG=function(){var e=gG();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},n4=function(){var e=yG(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},bG={left:0,top:0,right:0,gap:0},Gw=function(e){return parseInt(e||"",10)||0},xG=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Gw(n),Gw(r),Gw(a)]},wG=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bG;var t=xG(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])}},SG=n4(),ef="data-scroll-locked",EG=function(e,t,n,r){var a=e.left,i=e.top,s=e.right,c=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(aG,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(c,"px ").concat(r,`;
  }
  body[`).concat(ef,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(a,`px;
    padding-top: `).concat(i,`px;
    padding-right: `).concat(s,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(c,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(sg,` {
    right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(lg,` {
    margin-right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(sg," .").concat(sg,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(lg," .").concat(lg,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(ef,`] {
    `).concat(iG,": ").concat(c,`px;
  }
`)},uM=function(){var e=parseInt(document.body.getAttribute(ef)||"0",10);return isFinite(e)?e:0},_G=function(){y.useEffect(function(){return document.body.setAttribute(ef,(uM()+1).toString()),function(){var e=uM()-1;e<=0?document.body.removeAttribute(ef):document.body.setAttribute(ef,e.toString())}},[])},jG=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;_G();var i=y.useMemo(function(){return wG(a)},[a]);return y.createElement(SG,{styles:EG(i,!t,a,n?"":"!important")})},SE=!1;if(typeof window<"u")try{var Ov=Object.defineProperty({},"passive",{get:function(){return SE=!0,!0}});window.addEventListener("test",Ov,Ov),window.removeEventListener("test",Ov,Ov)}catch{SE=!1}var Ru=SE?{passive:!1}:!1,OG=function(e){return e.tagName==="TEXTAREA"},r4=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!OG(e)&&n[t]==="visible")},CG=function(e){return r4(e,"overflowY")},AG=function(e){return r4(e,"overflowX")},fM=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=a4(e,r);if(a){var i=i4(e,r),s=i[1],c=i[2];if(s>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},NG=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},TG=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},a4=function(e,t){return e==="v"?CG(t):AG(t)},i4=function(e,t){return e==="v"?NG(t):TG(t)},PG=function(e,t){return e==="h"&&t==="rtl"?-1:1},MG=function(e,t,n,r,a){var i=PG(e,window.getComputedStyle(t).direction),s=i*r,c=n.target,u=t.contains(c),f=!1,m=s>0,d=0,p=0;do{if(!c)break;var b=i4(e,c),w=b[0],x=b[1],S=b[2],E=x-S-i*w;(w||E)&&a4(e,c)&&(d+=E,p+=w);var C=c.parentNode;c=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!u&&c!==document.body||u&&(t.contains(c)||t===c));return(m&&Math.abs(d)<1||!m&&Math.abs(p)<1)&&(f=!0),f},Cv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dM=function(e){return[e.deltaX,e.deltaY]},hM=function(e){return e&&"current"in e?e.current:e},RG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},kG=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},DG=0,ku=[];function IG(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),a=y.useState(DG++)[0],i=y.useState(n4)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var x=rG([e.lockRef.current],(e.shards||[]).map(hM),!0).filter(Boolean);return x.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),x.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=y.useCallback(function(x,S){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!s.current.allowPinchZoom;var E=Cv(x),C=n.current,O="deltaX"in x?x.deltaX:C[0]-E[0],A="deltaY"in x?x.deltaY:C[1]-E[1],T,N=x.target,P=Math.abs(O)>Math.abs(A)?"h":"v";if("touches"in x&&P==="h"&&N.type==="range")return!1;var k=window.getSelection(),D=k&&k.anchorNode,K=D?D===N||D.contains(N):!1;if(K)return!1;var B=fM(P,N);if(!B)return!0;if(B?T=P:(T=P==="v"?"h":"v",B=fM(P,N)),!B)return!1;if(!r.current&&"changedTouches"in x&&(O||A)&&(r.current=T),!T)return!0;var I=r.current||T;return MG(I,S,x,I==="h"?O:A)},[]),u=y.useCallback(function(x){var S=x;if(!(!ku.length||ku[ku.length-1]!==i)){var E="deltaY"in S?dM(S):Cv(S),C=t.current.filter(function(T){return T.name===S.type&&(T.target===S.target||S.target===T.shadowParent)&&RG(T.delta,E)})[0];if(C&&C.should){S.cancelable&&S.preventDefault();return}if(!C){var O=(s.current.shards||[]).map(hM).filter(Boolean).filter(function(T){return T.contains(S.target)}),A=O.length>0?c(S,O[0]):!s.current.noIsolation;A&&S.cancelable&&S.preventDefault()}}},[]),f=y.useCallback(function(x,S,E,C){var O={name:x,delta:S,target:E,should:C,shadowParent:LG(E)};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(A){return A!==O})},1)},[]),m=y.useCallback(function(x){n.current=Cv(x),r.current=void 0},[]),d=y.useCallback(function(x){f(x.type,dM(x),x.target,c(x,e.lockRef.current))},[]),p=y.useCallback(function(x){f(x.type,Cv(x),x.target,c(x,e.lockRef.current))},[]);y.useEffect(function(){return ku.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Ru),document.addEventListener("touchmove",u,Ru),document.addEventListener("touchstart",m,Ru),function(){ku=ku.filter(function(x){return x!==i}),document.removeEventListener("wheel",u,Ru),document.removeEventListener("touchmove",u,Ru),document.removeEventListener("touchstart",m,Ru)}},[]);var b=e.removeScrollBar,w=e.inert;return y.createElement(y.Fragment,null,w?y.createElement(i,{styles:kG(a)}):null,b?y.createElement(jG,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function LG(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zG=dG(t4,IG);var Qy=y.forwardRef(function(e,t){return y.createElement(Wy,wi({},e,{ref:t,sideCar:zG}))});Qy.classNames=Wy.classNames;var $G=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Du=new WeakMap,Av=new WeakMap,Nv={},Ww=0,o4=function(e){return e&&(e.host||o4(e.parentNode))},BG=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=o4(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})},UG=function(e,t,n,r){var a=BG(t,Array.isArray(e)?e:[e]);Nv[n]||(Nv[n]=new WeakMap);var i=Nv[n],s=[],c=new Set,u=new Set(a),f=function(d){!d||c.has(d)||(c.add(d),f(d.parentNode))};a.forEach(f);var m=function(d){!d||u.has(d)||Array.prototype.forEach.call(d.children,function(p){if(c.has(p))m(p);else try{var b=p.getAttribute(r),w=b!==null&&b!=="false",x=(Du.get(p)||0)+1,S=(i.get(p)||0)+1;Du.set(p,x),i.set(p,S),s.push(p),x===1&&w&&Av.set(p,!0),S===1&&p.setAttribute(n,"true"),w||p.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",p,E)}})};return m(t),c.clear(),Ww++,function(){s.forEach(function(d){var p=Du.get(d)-1,b=i.get(d)-1;Du.set(d,p),i.set(d,b),p||(Av.has(d)||d.removeAttribute(r),Av.delete(d)),b||d.removeAttribute(n)}),Ww--,Ww||(Du=new WeakMap,Du=new WeakMap,Av=new WeakMap,Nv={})}},_j=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=$G(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),UG(r,a,n,"aria-hidden")):function(){return null}},Zy="Dialog",[s4]=ei(Zy),[HG,ti]=s4(Zy),l4=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=y.useRef(null),u=y.useRef(null),[f,m]=Js({prop:r,defaultProp:a??!1,onChange:i,caller:Zy});return v.jsx(HG,{scope:t,triggerRef:c,contentRef:u,contentId:zn(),titleId:zn(),descriptionId:zn(),open:f,onOpenChange:m,onOpenToggle:y.useCallback(()=>m(d=>!d),[m]),modal:s,children:n})};l4.displayName=Zy;var c4="DialogTrigger",FG=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ti(c4,n),i=tt(t,a.triggerRef);return v.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Cj(a.open),...r,ref:i,onClick:Se(e.onClick,a.onOpenToggle)})});FG.displayName=c4;var jj="DialogPortal",[qG,u4]=s4(jj,{forceMount:void 0}),f4=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=ti(jj,t);return v.jsx(qG,{scope:t,forceMount:n,children:y.Children.map(r,s=>v.jsx(ur,{present:n||i.open,children:v.jsx(wm,{asChild:!0,container:a,children:s})}))})};f4.displayName=jj;var jg="DialogOverlay",d4=y.forwardRef((e,t)=>{const n=u4(jg,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=ti(jg,e.__scopeDialog);return i.modal?v.jsx(ur,{present:r||i.open,children:v.jsx(VG,{...a,ref:t})}):null});d4.displayName=jg;var KG=vc("DialogOverlay.RemoveScroll"),VG=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ti(jg,n);return v.jsx(Qy,{as:KG,allowPinchZoom:!0,shards:[a.contentRef],children:v.jsx(ke.div,{"data-state":Cj(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),gc="DialogContent",h4=y.forwardRef((e,t)=>{const n=u4(gc,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=ti(gc,e.__scopeDialog);return v.jsx(ur,{present:r||i.open,children:i.modal?v.jsx(YG,{...a,ref:t}):v.jsx(XG,{...a,ref:t})})});h4.displayName=gc;var YG=y.forwardRef((e,t)=>{const n=ti(gc,e.__scopeDialog),r=y.useRef(null),a=tt(t,n.contentRef,r);return y.useEffect(()=>{const i=r.current;if(i)return _j(i)},[]),v.jsx(m4,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Se(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Se(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&i.preventDefault()}),onFocusOutside:Se(e.onFocusOutside,i=>i.preventDefault())})}),XG=y.forwardRef((e,t)=>{const n=ti(gc,e.__scopeDialog),r=y.useRef(!1),a=y.useRef(!1);return v.jsx(m4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,c;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(c=n.triggerRef.current)==null||c.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var u,f;(u=e.onInteractOutside)==null||u.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const s=i.target;((f=n.triggerRef.current)==null?void 0:f.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),m4=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,c=ti(gc,n),u=y.useRef(null),f=tt(t,u);return Ej(),v.jsxs(v.Fragment,{children:[v.jsx(Gy,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:v.jsx(xm,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Cj(c.open),...s,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),v.jsxs(v.Fragment,{children:[v.jsx(GG,{titleId:c.titleId}),v.jsx(QG,{contentRef:u,descriptionId:c.descriptionId})]})]})}),Oj="DialogTitle",p4=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ti(Oj,n);return v.jsx(ke.h2,{id:a.titleId,...r,ref:t})});p4.displayName=Oj;var v4="DialogDescription",g4=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ti(v4,n);return v.jsx(ke.p,{id:a.descriptionId,...r,ref:t})});g4.displayName=v4;var y4="DialogClose",b4=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=ti(y4,n);return v.jsx(ke.button,{type:"button",...r,ref:t,onClick:Se(e.onClick,()=>a.onOpenChange(!1))})});b4.displayName=y4;function Cj(e){return e?"open":"closed"}var x4="DialogTitleWarning",[ZTe,w4]=OX(x4,{contentName:gc,titleName:Oj,docsSlug:"dialog"}),GG=({titleId:e})=>{const t=w4(x4),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.

If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.

For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},WG="DialogDescriptionWarning",QG=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${w4(WG).contentName}}.`;return y.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Aj=l4,Nj=f4,Tj=d4,Pj=h4,S4=p4,E4=g4,Mj=b4,Qw={exports:{}},Zw={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var mM;function ZG(){if(mM)return Zw;mM=1;var e=Uf();function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function c(d,p){var b=p(),w=r({inst:{value:b,getSnapshot:p}}),x=w[0].inst,S=w[1];return i(function(){x.value=b,x.getSnapshot=p,u(x)&&S({inst:x})},[d,b,p]),a(function(){return u(x)&&S({inst:x}),d(function(){u(x)&&S({inst:x})})},[d]),s(b),b}function u(d){var p=d.getSnapshot;d=d.value;try{var b=p();return!n(d,b)}catch{return!0}}function f(d,p){return p()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Zw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Zw}var pM;function JG(){return pM||(pM=1,Qw.exports=ZG()),Qw.exports}function eW(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function tW(e){const[t,n]=y.useState(void 0);return $n(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let s,c;if("borderBoxSize"in i){const u=i.borderBoxSize,f=Array.isArray(u)?u[0]:u;s=f.inlineSize,c=f.blockSize}else s=e.offsetWidth,c=e.offsetHeight;n({width:s,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const nW=["top","right","bottom","left"],el=Math.min,Gr=Math.max,Og=Math.round,Tv=Math.floor,Oi=e=>({x:e,y:e}),rW={left:"right",right:"left",bottom:"top",top:"bottom"};function EE(e,t,n){return Gr(e,el(t,n))}function To(e,t){return typeof e=="function"?e(t):e}function Po(e){return e.split("-")[0]}function Kf(e){return e.split("-")[1]}function Rj(e){return e==="x"?"y":"x"}function kj(e){return e==="y"?"height":"width"}function Si(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Dj(e){return Rj(Si(e))}function aW(e,t,n){n===void 0&&(n=!1);const r=Kf(e),a=Dj(e),i=kj(a);let s=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Cg(s)),[s,Cg(s)]}function iW(e){const t=Cg(e);return[_E(e),t,_E(t)]}function _E(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const vM=["left","right"],gM=["right","left"],oW=["top","bottom"],sW=["bottom","top"];function lW(e,t,n){switch(e){case"top":case"bottom":return n?t?gM:vM:t?vM:gM;case"left":case"right":return t?oW:sW;default:return[]}}function cW(e,t,n,r){const a=Kf(e);let i=lW(Po(e),n==="start",r);return a&&(i=i.map(s=>s+"-"+a),t&&(i=i.concat(i.map(_E)))),i}function Cg(e){const t=Po(e);return rW[t]+e.slice(t.length)}function uW(e){return{top:0,right:0,bottom:0,left:0,...e}}function _4(e){return typeof e!="number"?uW(e):{top:e,right:e,bottom:e,left:e}}function Ag(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function yM(e,t,n){let{reference:r,floating:a}=e;const i=Si(t),s=Dj(t),c=kj(s),u=Po(t),f=i==="y",m=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,p=r[c]/2-a[c]/2;let b;switch(u){case"top":b={x:m,y:r.y-a.height};break;case"bottom":b={x:m,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:d};break;case"left":b={x:r.x-a.width,y:d};break;default:b={x:r.x,y:r.y}}switch(Kf(t)){case"start":b[s]-=p*(n&&f?-1:1);break;case"end":b[s]+=p*(n&&f?-1:1);break}return b}async function fW(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:s,elements:c,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:d="floating",altBoundary:p=!1,padding:b=0}=To(t,e),w=_4(b),S=c[p?d==="floating"?"reference":"floating":d],E=Ag(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(S)))==null||n?S:S.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:f,rootBoundary:m,strategy:u})),C=d==="floating"?{x:r,y:a,width:s.floating.width,height:s.floating.height}:s.reference,O=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),A=await(i.isElement==null?void 0:i.isElement(O))?await(i.getScale==null?void 0:i.getScale(O))||{x:1,y:1}:{x:1,y:1},T=Ag(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:O,strategy:u}):C);return{top:(E.top-T.top+w.top)/A.y,bottom:(T.bottom-E.bottom+w.bottom)/A.y,left:(E.left-T.left+w.left)/A.x,right:(T.right-E.right+w.right)/A.x}}const dW=50,hW=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:fW},u=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:d}=yM(f,r,u),p=r,b=0;const w={};for(let x=0;x<i.length;x++){const S=i[x];if(!S)continue;const{name:E,fn:C}=S,{x:O,y:A,data:T,reset:N}=await C({x:m,y:d,initialPlacement:r,placement:p,strategy:a,middlewareData:w,rects:f,platform:c,elements:{reference:e,floating:t}});m=O??m,d=A??d,w[E]={...w[E],...T},N&&b<dW&&(b++,typeof N=="object"&&(N.placement&&(p=N.placement),N.rects&&(f=N.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):N.rects),{x:m,y:d}=yM(f,p,u)),x=-1)}return{x:m,y:d,placement:p,strategy:a,middlewareData:w}},mW=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:s,elements:c,middlewareData:u}=t,{element:f,padding:m=0}=To(e,t)||{};if(f==null)return{};const d=_4(m),p={x:n,y:r},b=Dj(a),w=kj(b),x=await s.getDimensions(f),S=b==="y",E=S?"top":"left",C=S?"bottom":"right",O=S?"clientHeight":"clientWidth",A=i.reference[w]+i.reference[b]-p[b]-i.floating[w],T=p[b]-i.reference[b],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let P=N?N[O]:0;(!P||!await(s.isElement==null?void 0:s.isElement(N)))&&(P=c.floating[O]||i.floating[w]);const k=A/2-T/2,D=P/2-x[w]/2-1,K=el(d[E],D),B=el(d[C],D),I=K,W=P-x[w]-B,z=P/2-x[w]/2+k,V=EE(I,z,W),R=!u.arrow&&Kf(a)!=null&&z!==V&&i.reference[w]/2-(z<I?K:B)-x[w]/2<0,H=R?z<I?z-I:z-W:0;return{[b]:p[b]+H,data:{[b]:V,centerOffset:z-V-H,...R&&{alignmentOffset:H}},reset:R}}}),pW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:s,initialPlacement:c,platform:u,elements:f}=t,{mainAxis:m=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:x=!0,...S}=To(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=Po(a),C=Si(c),O=Po(c)===c,A=await(u.isRTL==null?void 0:u.isRTL(f.floating)),T=p||(O||!x?[Cg(c)]:iW(c)),N=w!=="none";!p&&N&&T.push(...cW(c,x,w,A));const P=[c,...T],k=await u.detectOverflow(t,S),D=[];let K=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&D.push(k[E]),d){const z=aW(a,s,A);D.push(k[z[0]],k[z[1]])}if(K=[...K,{placement:a,overflows:D}],!D.every(z=>z<=0)){var B,I;const z=(((B=i.flip)==null?void 0:B.index)||0)+1,V=P[z];if(V&&(!(d==="alignment"?C!==Si(V):!1)||K.every(q=>Si(q.placement)===C?q.overflows[0]>0:!0)))return{data:{index:z,overflows:K},reset:{placement:V}};let R=(I=K.filter(H=>H.overflows[0]<=0).sort((H,q)=>H.overflows[1]-q.overflows[1])[0])==null?void 0:I.placement;if(!R)switch(b){case"bestFit":{var W;const H=(W=K.filter(q=>{if(N){const F=Si(q.placement);return F===C||F==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(F=>F>0).reduce((F,Y)=>F+Y,0)]).sort((q,F)=>q[1]-F[1])[0])==null?void 0:W[0];H&&(R=H);break}case"initialPlacement":R=c;break}if(a!==R)return{reset:{placement:R}}}return{}}}};function bM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xM(e){return nW.some(t=>e[t]>=0)}const vW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...i}=To(e,t);switch(a){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),c=bM(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:xM(c)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),c=bM(s,n.floating);return{data:{escapedOffsets:c,escaped:xM(c)}}}default:return{}}}}},j4=new Set(["left","top"]);async function gW(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),s=Po(n),c=Kf(n),u=Si(n)==="y",f=j4.has(s)?-1:1,m=i&&u?-1:1,d=To(t,e);let{mainAxis:p,crossAxis:b,alignmentAxis:w}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof w=="number"&&(b=c==="end"?w*-1:w),u?{x:b*m,y:p*f}:{x:p*f,y:b*m}}const yW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:s,middlewareData:c}=t,u=await gW(t,e);return s===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:a+u.x,y:i+u.y,data:{...u,placement:s}}}}},bW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:i}=t,{mainAxis:s=!0,crossAxis:c=!1,limiter:u={fn:E=>{let{x:C,y:O}=E;return{x:C,y:O}}},...f}=To(e,t),m={x:n,y:r},d=await i.detectOverflow(t,f),p=Si(Po(a)),b=Rj(p);let w=m[b],x=m[p];if(s){const E=b==="y"?"top":"left",C=b==="y"?"bottom":"right",O=w+d[E],A=w-d[C];w=EE(O,w,A)}if(c){const E=p==="y"?"top":"left",C=p==="y"?"bottom":"right",O=x+d[E],A=x-d[C];x=EE(O,x,A)}const S=u.fn({...t,[b]:w,[p]:x});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[b]:s,[p]:c}}}}}},xW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:s}=t,{offset:c=0,mainAxis:u=!0,crossAxis:f=!0}=To(e,t),m={x:n,y:r},d=Si(a),p=Rj(d);let b=m[p],w=m[d];const x=To(c,t),S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const O=p==="y"?"height":"width",A=i.reference[p]-i.floating[O]+S.mainAxis,T=i.reference[p]+i.reference[O]-S.mainAxis;b<A?b=A:b>T&&(b=T)}if(f){var E,C;const O=p==="y"?"width":"height",A=j4.has(Po(a)),T=i.reference[d]-i.floating[O]+(A&&((E=s.offset)==null?void 0:E[d])||0)+(A?0:S.crossAxis),N=i.reference[d]+i.reference[O]+(A?0:((C=s.offset)==null?void 0:C[d])||0)-(A?S.crossAxis:0);w<T?w=T:w>N&&(w=N)}return{[p]:b,[d]:w}}}},wW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:s,elements:c}=t,{apply:u=()=>{},...f}=To(e,t),m=await s.detectOverflow(t,f),d=Po(a),p=Kf(a),b=Si(a)==="y",{width:w,height:x}=i.floating;let S,E;d==="top"||d==="bottom"?(S=d,E=p===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(E=d,S=p==="end"?"top":"bottom");const C=x-m.top-m.bottom,O=w-m.left-m.right,A=el(x-m[S],C),T=el(w-m[E],O),N=!t.middlewareData.shift;let P=A,k=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=O),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=C),N&&!p){const K=Gr(m.left,0),B=Gr(m.right,0),I=Gr(m.top,0),W=Gr(m.bottom,0);b?k=w-2*(K!==0||B!==0?K+B:Gr(m.left,m.right)):P=x-2*(I!==0||W!==0?I+W:Gr(m.top,m.bottom))}await u({...t,availableWidth:k,availableHeight:P});const D=await s.getDimensions(c.floating);return w!==D.width||x!==D.height?{reset:{rects:!0}}:{}}}};function Jy(){return typeof window<"u"}function Vf(e){return O4(e)?(e.nodeName||"").toLowerCase():"#document"}function Jr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Di(e){var t;return(t=(O4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function O4(e){return Jy()?e instanceof Node||e instanceof Jr(e).Node:!1}function Ga(e){return Jy()?e instanceof Element||e instanceof Jr(e).Element:!1}function zo(e){return Jy()?e instanceof HTMLElement||e instanceof Jr(e).HTMLElement:!1}function wM(e){return!Jy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jr(e).ShadowRoot}function Sm(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Wa(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function SW(e){return/^(table|td|th)$/.test(Vf(e))}function e0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const EW=/transform|translate|scale|rotate|perspective|filter/,_W=/paint|layout|strict|content/,zl=e=>!!e&&e!=="none";let Jw;function Ij(e){const t=Ga(e)?Wa(e):e;return zl(t.transform)||zl(t.translate)||zl(t.scale)||zl(t.rotate)||zl(t.perspective)||!Lj()&&(zl(t.backdropFilter)||zl(t.filter))||EW.test(t.willChange||"")||_W.test(t.contain||"")}function jW(e){let t=tl(e);for(;zo(t)&&!Sf(t);){if(Ij(t))return t;if(e0(t))return null;t=tl(t)}return null}function Lj(){return Jw==null&&(Jw=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Jw}function Sf(e){return/^(html|body|#document)$/.test(Vf(e))}function Wa(e){return Jr(e).getComputedStyle(e)}function t0(e){return Ga(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function tl(e){if(Vf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wM(e)&&e.host||Di(e);return wM(t)?t.host:t}function C4(e){const t=tl(e);return Sf(t)?e.ownerDocument?e.ownerDocument.body:e.body:zo(t)&&Sm(t)?t:C4(t)}function kh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=C4(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),s=Jr(a);if(i){const c=jE(s);return t.concat(s,s.visualViewport||[],Sm(a)?a:[],c&&n?kh(c):[])}else return t.concat(a,kh(a,[],n))}function jE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function A4(e){const t=Wa(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=zo(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:r,c=Og(n)!==i||Og(r)!==s;return c&&(n=i,r=s),{width:n,height:r,$:c}}function zj(e){return Ga(e)?e:e.contextElement}function tf(e){const t=zj(e);if(!zo(t))return Oi(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=A4(t);let s=(i?Og(n.width):n.width)/r,c=(i?Og(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const OW=Oi(0);function N4(e){const t=Jr(e);return!Lj()||!t.visualViewport?OW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jr(e)?!1:t}function yc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=zj(e);let s=Oi(1);t&&(r?Ga(r)&&(s=tf(r)):s=tf(e));const c=CW(i,n,r)?N4(i):Oi(0);let u=(a.left+c.x)/s.x,f=(a.top+c.y)/s.y,m=a.width/s.x,d=a.height/s.y;if(i){const p=Jr(i),b=r&&Ga(r)?Jr(r):r;let w=p,x=jE(w);for(;x&&r&&b!==w;){const S=tf(x),E=x.getBoundingClientRect(),C=Wa(x),O=E.left+(x.clientLeft+parseFloat(C.paddingLeft))*S.x,A=E.top+(x.clientTop+parseFloat(C.paddingTop))*S.y;u*=S.x,f*=S.y,m*=S.x,d*=S.y,u+=O,f+=A,w=Jr(x),x=jE(w)}}return Ag({width:m,height:d,x:u,y:f})}function n0(e,t){const n=t0(e).scrollLeft;return t?t.left+n:yc(Di(e)).left+n}function T4(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-n0(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function AW(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",s=Di(r),c=t?e0(t.floating):!1;if(r===s||c&&i)return n;let u={scrollLeft:0,scrollTop:0},f=Oi(1);const m=Oi(0),d=zo(r);if((d||!d&&!i)&&((Vf(r)!=="body"||Sm(s))&&(u=t0(r)),d)){const b=yc(r);f=tf(r),m.x=b.x+r.clientLeft,m.y=b.y+r.clientTop}const p=s&&!d&&!i?T4(s,u):Oi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+m.x+p.x,y:n.y*f.y-u.scrollTop*f.y+m.y+p.y}}function NW(e){return Array.from(e.getClientRects())}function TW(e){const t=Di(e),n=t0(e),r=e.ownerDocument.body,a=Gr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Gr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+n0(e);const c=-n.scrollTop;return Wa(r).direction==="rtl"&&(s+=Gr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:s,y:c}}const SM=25;function PW(e,t){const n=Jr(e),r=Di(e),a=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,c=0,u=0;if(a){i=a.width,s=a.height;const m=Lj();(!m||m&&t==="fixed")&&(c=a.offsetLeft,u=a.offsetTop)}const f=n0(r);if(f<=0){const m=r.ownerDocument,d=m.body,p=getComputedStyle(d),b=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(r.clientWidth-d.clientWidth-b);w<=SM&&(i-=w)}else f<=SM&&(i+=f);return{width:i,height:s,x:c,y:u}}function MW(e,t){const n=yc(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=zo(e)?tf(e):Oi(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,u=a*i.x,f=r*i.y;return{width:s,height:c,x:u,y:f}}function EM(e,t,n){let r;if(t==="viewport")r=PW(e,n);else if(t==="document")r=TW(Di(e));else if(Ga(t))r=MW(t,n);else{const a=N4(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Ag(r)}function P4(e,t){const n=tl(e);return n===t||!Ga(n)||Sf(n)?!1:Wa(n).position==="fixed"||P4(n,t)}function RW(e,t){const n=t.get(e);if(n)return n;let r=kh(e,[],!1).filter(c=>Ga(c)&&Vf(c)!=="body"),a=null;const i=Wa(e).position==="fixed";let s=i?tl(e):e;for(;Ga(s)&&!Sf(s);){const c=Wa(s),u=Ij(s);!u&&c.position==="fixed"&&(a=null),(i?!u&&!a:!u&&c.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Sm(s)&&!u&&P4(e,s))?r=r.filter(m=>m!==s):a=c,s=tl(s)}return t.set(e,r),r}function kW(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const s=[...n==="clippingAncestors"?e0(t)?[]:RW(t,this._c):[].concat(n),r],c=EM(t,s[0],a);let u=c.top,f=c.right,m=c.bottom,d=c.left;for(let p=1;p<s.length;p++){const b=EM(t,s[p],a);u=Gr(b.top,u),f=el(b.right,f),m=el(b.bottom,m),d=Gr(b.left,d)}return{width:f-d,height:m-u,x:d,y:u}}function DW(e){const{width:t,height:n}=A4(e);return{width:t,height:n}}function IW(e,t,n){const r=zo(t),a=Di(t),i=n==="fixed",s=yc(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=Oi(0);function f(){u.x=n0(a)}if(r||!r&&!i)if((Vf(t)!=="body"||Sm(a))&&(c=t0(t)),r){const b=yc(t,!0,i,t);u.x=b.x+t.clientLeft,u.y=b.y+t.clientTop}else a&&f();i&&!r&&a&&f();const m=a&&!r&&!i?T4(a,c):Oi(0),d=s.left+c.scrollLeft-u.x-m.x,p=s.top+c.scrollTop-u.y-m.y;return{x:d,y:p,width:s.width,height:s.height}}function e1(e){return Wa(e).position==="static"}function _M(e,t){if(!zo(e)||Wa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Di(e)===n&&(n=n.ownerDocument.body),n}function M4(e,t){const n=Jr(e);if(e0(e))return n;if(!zo(e)){let a=tl(e);for(;a&&!Sf(a);){if(Ga(a)&&!e1(a))return a;a=tl(a)}return n}let r=_M(e,t);for(;r&&SW(r)&&e1(r);)r=_M(r,t);return r&&Sf(r)&&e1(r)&&!Ij(r)?n:r||jW(e)||n}const LW=async function(e){const t=this.getOffsetParent||M4,n=this.getDimensions,r=await n(e.floating);return{reference:IW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zW(e){return Wa(e).direction==="rtl"}const $W={convertOffsetParentRelativeRectToViewportRelativeRect:AW,getDocumentElement:Di,getClippingRect:kW,getOffsetParent:M4,getElementRects:LW,getClientRects:NW,getDimensions:DW,getScale:tf,isElement:Ga,isRTL:zW};function R4(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function BW(e,t){let n=null,r;const a=Di(e);function i(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function s(c,u){c===void 0&&(c=!1),u===void 0&&(u=1),i();const f=e.getBoundingClientRect(),{left:m,top:d,width:p,height:b}=f;if(c||t(),!p||!b)return;const w=Tv(d),x=Tv(a.clientWidth-(m+p)),S=Tv(a.clientHeight-(d+b)),E=Tv(m),O={rootMargin:-w+"px "+-x+"px "+-S+"px "+-E+"px",threshold:Gr(0,el(1,u))||1};let A=!0;function T(N){const P=N[0].intersectionRatio;if(P!==u){if(!A)return s();P?s(!1,P):r=setTimeout(()=>{s(!1,1e-7)},1e3)}P===1&&!R4(f,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(T,{...O,root:a.ownerDocument})}catch{n=new IntersectionObserver(T,O)}n.observe(e)}return s(!0),i}function UW(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=zj(e),m=a||i?[...f?kh(f):[],...t?kh(t):[]]:[];m.forEach(E=>{a&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const d=f&&c?BW(f,n):null;let p=-1,b=null;s&&(b=new ResizeObserver(E=>{let[C]=E;C&&C.target===f&&b&&t&&(b.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(t)})),n()}),f&&!u&&b.observe(f),t&&b.observe(t));let w,x=u?yc(e):null;u&&S();function S(){const E=yc(e);x&&!R4(x,E)&&n(),x=E,w=requestAnimationFrame(S)}return n(),()=>{var E;m.forEach(C=>{a&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),d==null||d(),(E=b)==null||E.disconnect(),b=null,u&&cancelAnimationFrame(w)}}const HW=yW,FW=bW,qW=pW,KW=wW,VW=vW,jM=mW,YW=xW,XW=(e,t,n)=>{const r=new Map,a={platform:$W,...n},i={...a.platform,_c:r};return hW(e,t,{...a,platform:i})};var GW=typeof document<"u",WW=function(){},cg=GW?y.useLayoutEffect:WW;function Ng(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ng(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!Ng(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function k4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function OM(e,t){const n=k4(e);return Math.round(t*n)/n}function t1(e){const t=y.useRef(e);return cg(()=>{t.current=e}),t}function QW(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:u,open:f}=e,[m,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,b]=y.useState(r);Ng(p,r)||b(r);const[w,x]=y.useState(null),[S,E]=y.useState(null),C=y.useCallback(q=>{q!==N.current&&(N.current=q,x(q))},[]),O=y.useCallback(q=>{q!==P.current&&(P.current=q,E(q))},[]),A=i||w,T=s||S,N=y.useRef(null),P=y.useRef(null),k=y.useRef(m),D=u!=null,K=t1(u),B=t1(a),I=t1(f),W=y.useCallback(()=>{if(!N.current||!P.current)return;const q={placement:t,strategy:n,middleware:p};B.current&&(q.platform=B.current),XW(N.current,P.current,q).then(F=>{const Y={...F,isPositioned:I.current!==!1};z.current&&!Ng(k.current,Y)&&(k.current=Y,cl.flushSync(()=>{d(Y)}))})},[p,t,n,B,I]);cg(()=>{f===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[f]);const z=y.useRef(!1);cg(()=>(z.current=!0,()=>{z.current=!1}),[]),cg(()=>{if(A&&(N.current=A),T&&(P.current=T),A&&T){if(K.current)return K.current(A,T,W);W()}},[A,T,W,K,D]);const V=y.useMemo(()=>({reference:N,floating:P,setReference:C,setFloating:O}),[C,O]),R=y.useMemo(()=>({reference:A,floating:T}),[A,T]),H=y.useMemo(()=>{const q={position:n,left:0,top:0};if(!R.floating)return q;const F=OM(R.floating,m.x),Y=OM(R.floating,m.y);return c?{...q,transform:"translate("+F+"px, "+Y+"px)",...k4(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:Y}},[n,c,R.floating,m.x,m.y]);return y.useMemo(()=>({...m,update:W,refs:V,elements:R,floatingStyles:H}),[m,W,V,R,H])}const ZW=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?jM({element:r.current,padding:a}).fn(n):{}:r?jM({element:r,padding:a}).fn(n):{}}}},JW=(e,t)=>{const n=HW(e);return{name:n.name,fn:n.fn,options:[e,t]}},eQ=(e,t)=>{const n=FW(e);return{name:n.name,fn:n.fn,options:[e,t]}},tQ=(e,t)=>({fn:YW(e).fn,options:[e,t]}),nQ=(e,t)=>{const n=qW(e);return{name:n.name,fn:n.fn,options:[e,t]}},rQ=(e,t)=>{const n=KW(e);return{name:n.name,fn:n.fn,options:[e,t]}},aQ=(e,t)=>{const n=VW(e);return{name:n.name,fn:n.fn,options:[e,t]}},iQ=(e,t)=>{const n=ZW(e);return{name:n.name,fn:n.fn,options:[e,t]}};var oQ="Arrow",D4=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return v.jsx(ke.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:v.jsx("polygon",{points:"0,0 30,0 15,10"})})});D4.displayName=oQ;var sQ=D4,$j="Popper",[I4,Yf]=ei($j),[lQ,L4]=I4($j),z4=e=>{const{__scopePopper:t,children:n}=e,[r,a]=y.useState(null);return v.jsx(lQ,{scope:t,anchor:r,onAnchorChange:a,children:n})};z4.displayName=$j;var $4="PopperAnchor",B4=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=L4($4,n),s=y.useRef(null),c=tt(t,s),u=y.useRef(null);return y.useEffect(()=>{const f=u.current;u.current=(r==null?void 0:r.current)||s.current,f!==u.current&&i.onAnchorChange(u.current)}),r?null:v.jsx(ke.div,{...a,ref:c})});B4.displayName=$4;var Bj="PopperContent",[cQ,uQ]=I4(Bj),U4=y.forwardRef((e,t)=>{var ie,re,ee,le,me,ne;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:b="optimized",onPlaced:w,...x}=e,S=L4(Bj,n),[E,C]=y.useState(null),O=tt(t,ge=>C(ge)),[A,T]=y.useState(null),N=tW(A),P=(N==null?void 0:N.width)??0,k=(N==null?void 0:N.height)??0,D=r+(i!=="center"?"-"+i:""),K=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},B=Array.isArray(f)?f:[f],I=B.length>0,W={padding:K,boundary:B.filter(dQ),altBoundary:I},{refs:z,floatingStyles:V,placement:R,isPositioned:H,middlewareData:q}=QW({strategy:"fixed",placement:D,whileElementsMounted:(...ge)=>UW(...ge,{animationFrame:b==="always"}),elements:{reference:S.anchor},middleware:[JW({mainAxis:a+k,alignmentAxis:s}),u&&eQ({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tQ():void 0,...W}),u&&nQ({...W}),rQ({...W,apply:({elements:ge,rects:be,availableWidth:Ie,availableHeight:Pe})=>{const{width:Ve,height:Xt}=be.reference,dt=ge.floating.style;dt.setProperty("--radix-popper-available-width",`${Ie}px`),dt.setProperty("--radix-popper-available-height",`${Pe}px`),dt.setProperty("--radix-popper-anchor-width",`${Ve}px`),dt.setProperty("--radix-popper-anchor-height",`${Xt}px`)}}),A&&iQ({element:A,padding:c}),hQ({arrowWidth:P,arrowHeight:k}),p&&aQ({strategy:"referenceHidden",...W})]}),[F,Y]=q4(R),$=Qn(w);$n(()=>{H&&($==null||$())},[H,$]);const L=(ie=q.arrow)==null?void 0:ie.x,G=(re=q.arrow)==null?void 0:re.y,Z=((ee=q.arrow)==null?void 0:ee.centerOffset)!==0,[J,se]=y.useState();return $n(()=>{E&&se(window.getComputedStyle(E).zIndex)},[E]),v.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:H?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[(le=q.transformOrigin)==null?void 0:le.x,(me=q.transformOrigin)==null?void 0:me.y].join(" "),...((ne=q.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:v.jsx(cQ,{scope:n,placedSide:F,onArrowChange:T,arrowX:L,arrowY:G,shouldHideArrow:Z,children:v.jsx(ke.div,{"data-side":F,"data-align":Y,...x,ref:O,style:{...x.style,animation:H?void 0:"none"}})})})});U4.displayName=Bj;var H4="PopperArrow",fQ={top:"bottom",right:"left",bottom:"top",left:"right"},F4=y.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=uQ(H4,r),s=fQ[i.placedSide];return v.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:v.jsx(sQ,{...a,ref:n,style:{...a.style,display:"block"}})})});F4.displayName=H4;function dQ(e){return e!==null}var hQ=e=>({name:"transformOrigin",options:e,fn(t){var S,E,C;const{placement:n,rects:r,middlewareData:a}=t,s=((S=a.arrow)==null?void 0:S.centerOffset)!==0,c=s?0:e.arrowWidth,u=s?0:e.arrowHeight,[f,m]=q4(n),d={start:"0%",center:"50%",end:"100%"}[m],p=(((E=a.arrow)==null?void 0:E.x)??0)+c/2,b=(((C=a.arrow)==null?void 0:C.y)??0)+u/2;let w="",x="";return f==="bottom"?(w=s?d:`${p}px`,x=`${-u}px`):f==="top"?(w=s?d:`${p}px`,x=`${r.floating.height+u}px`):f==="right"?(w=`${-u}px`,x=s?d:`${b}px`):f==="left"&&(w=`${r.floating.width+u}px`,x=s?d:`${b}px`),{data:{x:w,y:x}}}});function q4(e){const[t,n="center"]=e.split("-");return[t,n]}var Uj=z4,Hj=B4,Fj=U4,qj=F4,n1="rovingFocusGroup.onEntryFocus",mQ={bubbles:!1,cancelable:!0},Em="RovingFocusGroup",[OE,K4,pQ]=bj(Em),[vQ,r0]=ei(Em,[pQ]),[gQ,yQ]=vQ(Em),V4=y.forwardRef((e,t)=>v.jsx(OE.Provider,{scope:e.__scopeRovingFocusGroup,children:v.jsx(OE.Slot,{scope:e.__scopeRovingFocusGroup,children:v.jsx(bQ,{...e,ref:t})})}));V4.displayName=Em;var bQ=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...d}=e,p=y.useRef(null),b=tt(t,p),w=bm(i),[x,S]=Js({prop:s,defaultProp:c??null,onChange:u,caller:Em}),[E,C]=y.useState(!1),O=Qn(f),A=K4(n),T=y.useRef(!1),[N,P]=y.useState(0);return y.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(n1,O),()=>k.removeEventListener(n1,O)},[O]),v.jsx(gQ,{scope:n,orientation:r,dir:w,loop:a,currentTabStopId:x,onItemFocus:y.useCallback(k=>S(k),[S]),onItemShiftTab:y.useCallback(()=>C(!0),[]),onFocusableItemAdd:y.useCallback(()=>P(k=>k+1),[]),onFocusableItemRemove:y.useCallback(()=>P(k=>k-1),[]),children:v.jsx(ke.div,{tabIndex:E||N===0?-1:0,"data-orientation":r,...d,ref:b,style:{outline:"none",...e.style},onMouseDown:Se(e.onMouseDown,()=>{T.current=!0}),onFocus:Se(e.onFocus,k=>{const D=!T.current;if(k.target===k.currentTarget&&D&&!E){const K=new CustomEvent(n1,mQ);if(k.currentTarget.dispatchEvent(K),!K.defaultPrevented){const B=A().filter(R=>R.focusable),I=B.find(R=>R.active),W=B.find(R=>R.id===x),V=[I,W,...B].filter(Boolean).map(R=>R.ref.current);G4(V,m)}}T.current=!1}),onBlur:Se(e.onBlur,()=>C(!1))})})}),Y4="RovingFocusGroupItem",X4=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:s,...c}=e,u=zn(),f=i||u,m=yQ(Y4,n),d=m.currentTabStopId===f,p=K4(n),{onFocusableItemAdd:b,onFocusableItemRemove:w,currentTabStopId:x}=m;return y.useEffect(()=>{if(r)return b(),()=>w()},[r,b,w]),v.jsx(OE.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:v.jsx(ke.span,{tabIndex:d?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:Se(e.onMouseDown,S=>{r?m.onItemFocus(f):S.preventDefault()}),onFocus:Se(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:Se(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){m.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const E=SQ(S,m.orientation,m.dir);if(E!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let O=p().filter(A=>A.focusable).map(A=>A.ref.current);if(E==="last")O.reverse();else if(E==="prev"||E==="next"){E==="prev"&&O.reverse();const A=O.indexOf(S.currentTarget);O=m.loop?EQ(O,A+1):O.slice(A+1)}setTimeout(()=>G4(O))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:x!=null}):s})})});X4.displayName=Y4;var xQ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wQ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function SQ(e,t,n){const r=wQ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xQ[r]}function G4(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function EQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var W4=V4,Q4=X4,CE=["Enter"," "],_Q=["ArrowDown","PageUp","Home"],Z4=["ArrowUp","PageDown","End"],jQ=[..._Q,...Z4],OQ={ltr:[...CE,"ArrowRight"],rtl:[...CE,"ArrowLeft"]},CQ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_m="Menu",[Dh,AQ,NQ]=bj(_m),[Ic,J4]=ei(_m,[NQ,Yf,r0]),a0=Yf(),e5=r0(),[TQ,Lc]=Ic(_m),[PQ,jm]=Ic(_m),t5=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:s=!0}=e,c=a0(t),[u,f]=y.useState(null),m=y.useRef(!1),d=Qn(i),p=bm(a);return y.useEffect(()=>{const b=()=>{m.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>m.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),v.jsx(Uj,{...c,children:v.jsx(TQ,{scope:t,open:n,onOpenChange:d,content:u,onContentChange:f,children:v.jsx(PQ,{scope:t,onClose:y.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:m,dir:p,modal:s,children:r})})})};t5.displayName=_m;var MQ="MenuAnchor",Kj=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=a0(n);return v.jsx(Hj,{...a,...r,ref:t})});Kj.displayName=MQ;var Vj="MenuPortal",[RQ,n5]=Ic(Vj,{forceMount:void 0}),r5=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=Lc(Vj,t);return v.jsx(RQ,{scope:t,forceMount:n,children:v.jsx(ur,{present:n||i.open,children:v.jsx(wm,{asChild:!0,container:a,children:r})})})};r5.displayName=Vj;var Ca="MenuContent",[kQ,Yj]=Ic(Ca),a5=y.forwardRef((e,t)=>{const n=n5(Ca,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Lc(Ca,e.__scopeMenu),s=jm(Ca,e.__scopeMenu);return v.jsx(Dh.Provider,{scope:e.__scopeMenu,children:v.jsx(ur,{present:r||i.open,children:v.jsx(Dh.Slot,{scope:e.__scopeMenu,children:s.modal?v.jsx(DQ,{...a,ref:t}):v.jsx(IQ,{...a,ref:t})})})})}),DQ=y.forwardRef((e,t)=>{const n=Lc(Ca,e.__scopeMenu),r=y.useRef(null),a=tt(t,r);return y.useEffect(()=>{const i=r.current;if(i)return _j(i)},[]),v.jsx(Xj,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Se(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),IQ=y.forwardRef((e,t)=>{const n=Lc(Ca,e.__scopeMenu);return v.jsx(Xj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),LQ=vc("MenuContent.ScrollLock"),Xj=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:d,onInteractOutside:p,onDismiss:b,disableOutsideScroll:w,...x}=e,S=Lc(Ca,n),E=jm(Ca,n),C=a0(n),O=e5(n),A=AQ(n),[T,N]=y.useState(null),P=y.useRef(null),k=tt(t,P,S.onContentChange),D=y.useRef(0),K=y.useRef(""),B=y.useRef(0),I=y.useRef(null),W=y.useRef("right"),z=y.useRef(0),V=w?Qy:y.Fragment,R=w?{as:LQ,allowPinchZoom:!0}:void 0,H=F=>{var ie,re;const Y=K.current+F,$=A().filter(ee=>!ee.disabled),L=document.activeElement,G=(ie=$.find(ee=>ee.ref.current===L))==null?void 0:ie.textValue,Z=$.map(ee=>ee.textValue),J=GQ(Z,Y,G),se=(re=$.find(ee=>ee.textValue===J))==null?void 0:re.ref.current;(function ee(le){K.current=le,window.clearTimeout(D.current),le!==""&&(D.current=window.setTimeout(()=>ee(""),1e3))})(Y),se&&setTimeout(()=>se.focus())};y.useEffect(()=>()=>window.clearTimeout(D.current),[]),Ej();const q=y.useCallback(F=>{var $,L;return W.current===(($=I.current)==null?void 0:$.side)&&QQ(F,(L=I.current)==null?void 0:L.area)},[]);return v.jsx(kQ,{scope:n,searchRef:K,onItemEnter:y.useCallback(F=>{q(F)&&F.preventDefault()},[q]),onItemLeave:y.useCallback(F=>{var Y;q(F)||((Y=P.current)==null||Y.focus(),N(null))},[q]),onTriggerLeave:y.useCallback(F=>{q(F)&&F.preventDefault()},[q]),pointerGraceTimerRef:B,onPointerGraceIntentChange:y.useCallback(F=>{I.current=F},[]),children:v.jsx(V,{...R,children:v.jsx(Gy,{asChild:!0,trapped:a,onMountAutoFocus:Se(i,F=>{var Y;F.preventDefault(),(Y=P.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:v.jsx(xm,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:d,onInteractOutside:p,onDismiss:b,children:v.jsx(W4,{asChild:!0,...O,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:N,onEntryFocus:Se(u,F=>{E.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:v.jsx(Fj,{role:"menu","aria-orientation":"vertical","data-state":x5(S.open),"data-radix-menu-content":"",dir:E.dir,...C,...x,ref:k,style:{outline:"none",...x.style},onKeyDown:Se(x.onKeyDown,F=>{const $=F.target.closest("[data-radix-menu-content]")===F.currentTarget,L=F.ctrlKey||F.altKey||F.metaKey,G=F.key.length===1;$&&(F.key==="Tab"&&F.preventDefault(),!L&&G&&H(F.key));const Z=P.current;if(F.target!==Z||!jQ.includes(F.key))return;F.preventDefault();const se=A().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Z4.includes(F.key)&&se.reverse(),YQ(se)}),onBlur:Se(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(D.current),K.current="")}),onPointerMove:Se(e.onPointerMove,Ih(F=>{const Y=F.target,$=z.current!==F.clientX;if(F.currentTarget.contains(Y)&&$){const L=F.clientX>z.current?"right":"left";W.current=L,z.current=F.clientX}}))})})})})})})});a5.displayName=Ca;var zQ="MenuGroup",Gj=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(ke.div,{role:"group",...r,ref:t})});Gj.displayName=zQ;var $Q="MenuLabel",i5=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(ke.div,{...r,ref:t})});i5.displayName=$Q;var Tg="MenuItem",CM="menu.itemSelect",i0=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=y.useRef(null),s=jm(Tg,e.__scopeMenu),c=Yj(Tg,e.__scopeMenu),u=tt(t,i),f=y.useRef(!1),m=()=>{const d=i.current;if(!n&&d){const p=new CustomEvent(CM,{bubbles:!0,cancelable:!0});d.addEventListener(CM,b=>r==null?void 0:r(b),{once:!0}),Fz(d,p),p.defaultPrevented?f.current=!1:s.onClose()}};return v.jsx(o5,{...a,ref:u,disabled:n,onClick:Se(e.onClick,m),onPointerDown:d=>{var p;(p=e.onPointerDown)==null||p.call(e,d),f.current=!0},onPointerUp:Se(e.onPointerUp,d=>{var p;f.current||(p=d.currentTarget)==null||p.click()}),onKeyDown:Se(e.onKeyDown,d=>{const p=c.searchRef.current!=="";n||p&&d.key===" "||CE.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});i0.displayName=Tg;var o5=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,s=Yj(Tg,n),c=e5(n),u=y.useRef(null),f=tt(t,u),[m,d]=y.useState(!1),[p,b]=y.useState("");return y.useEffect(()=>{const w=u.current;w&&b((w.textContent??"").trim())},[i.children]),v.jsx(Dh.ItemSlot,{scope:n,disabled:r,textValue:a??p,children:v.jsx(Q4,{asChild:!0,...c,focusable:!r,children:v.jsx(ke.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:Se(e.onPointerMove,Ih(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Se(e.onPointerLeave,Ih(w=>s.onItemLeave(w))),onFocus:Se(e.onFocus,()=>d(!0)),onBlur:Se(e.onBlur,()=>d(!1))})})})}),BQ="MenuCheckboxItem",s5=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return v.jsx(d5,{scope:e.__scopeMenu,checked:n,children:v.jsx(i0,{role:"menuitemcheckbox","aria-checked":Pg(n)?"mixed":n,...a,ref:t,"data-state":Qj(n),onSelect:Se(a.onSelect,()=>r==null?void 0:r(Pg(n)?!0:!n),{checkForDefaultPrevented:!1})})})});s5.displayName=BQ;var l5="MenuRadioGroup",[UQ,HQ]=Ic(l5,{value:void 0,onValueChange:()=>{}}),c5=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=Qn(r);return v.jsx(UQ,{scope:e.__scopeMenu,value:n,onValueChange:i,children:v.jsx(Gj,{...a,ref:t})})});c5.displayName=l5;var u5="MenuRadioItem",f5=y.forwardRef((e,t)=>{const{value:n,...r}=e,a=HQ(u5,e.__scopeMenu),i=n===a.value;return v.jsx(d5,{scope:e.__scopeMenu,checked:i,children:v.jsx(i0,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":Qj(i),onSelect:Se(r.onSelect,()=>{var s;return(s=a.onValueChange)==null?void 0:s.call(a,n)},{checkForDefaultPrevented:!1})})})});f5.displayName=u5;var Wj="MenuItemIndicator",[d5,FQ]=Ic(Wj,{checked:!1}),h5=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=FQ(Wj,n);return v.jsx(ur,{present:r||Pg(i.checked)||i.checked===!0,children:v.jsx(ke.span,{...a,ref:t,"data-state":Qj(i.checked)})})});h5.displayName=Wj;var qQ="MenuSeparator",m5=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return v.jsx(ke.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});m5.displayName=qQ;var KQ="MenuArrow",p5=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=a0(n);return v.jsx(qj,{...a,...r,ref:t})});p5.displayName=KQ;var VQ="MenuSub",[JTe,v5]=Ic(VQ),wh="MenuSubTrigger",g5=y.forwardRef((e,t)=>{const n=Lc(wh,e.__scopeMenu),r=jm(wh,e.__scopeMenu),a=v5(wh,e.__scopeMenu),i=Yj(wh,e.__scopeMenu),s=y.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=i,f={__scopeMenu:e.__scopeMenu},m=y.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return y.useEffect(()=>m,[m]),y.useEffect(()=>{const d=c.current;return()=>{window.clearTimeout(d),u(null)}},[c,u]),v.jsx(Kj,{asChild:!0,...f,children:v.jsx(o5,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":x5(n.open),...e,ref:No(t,a.onTriggerChange),onClick:d=>{var p;(p=e.onClick)==null||p.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Se(e.onPointerMove,Ih(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:Se(e.onPointerLeave,Ih(d=>{var b,w;m();const p=(b=n.content)==null?void 0:b.getBoundingClientRect();if(p){const x=(w=n.content)==null?void 0:w.dataset.side,S=x==="right",E=S?-5:5,C=p[S?"left":"right"],O=p[S?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+E,y:d.clientY},{x:C,y:p.top},{x:O,y:p.top},{x:O,y:p.bottom},{x:C,y:p.bottom}],side:x}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Se(e.onKeyDown,d=>{var b;const p=i.searchRef.current!=="";e.disabled||p&&d.key===" "||OQ[r.dir].includes(d.key)&&(n.onOpenChange(!0),(b=n.content)==null||b.focus(),d.preventDefault())})})})});g5.displayName=wh;var y5="MenuSubContent",b5=y.forwardRef((e,t)=>{const n=n5(Ca,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Lc(Ca,e.__scopeMenu),s=jm(Ca,e.__scopeMenu),c=v5(y5,e.__scopeMenu),u=y.useRef(null),f=tt(t,u);return v.jsx(Dh.Provider,{scope:e.__scopeMenu,children:v.jsx(ur,{present:r||i.open,children:v.jsx(Dh.Slot,{scope:e.__scopeMenu,children:v.jsx(Xj,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:f,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var d;s.isUsingKeyboardRef.current&&((d=u.current)==null||d.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:Se(e.onFocusOutside,m=>{m.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Se(e.onEscapeKeyDown,m=>{s.onClose(),m.preventDefault()}),onKeyDown:Se(e.onKeyDown,m=>{var b;const d=m.currentTarget.contains(m.target),p=CQ[s.dir].includes(m.key);d&&p&&(i.onOpenChange(!1),(b=c.trigger)==null||b.focus(),m.preventDefault())})})})})})});b5.displayName=y5;function x5(e){return e?"open":"closed"}function Pg(e){return e==="indeterminate"}function Qj(e){return Pg(e)?"indeterminate":e?"checked":"unchecked"}function YQ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function XQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function GQ(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=XQ(e,Math.max(i,0));a.length===1&&(s=s.filter(f=>f!==n));const u=s.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return u!==n?u:void 0}function WQ(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const c=t[i],u=t[s],f=c.x,m=c.y,d=u.x,p=u.y;m>r!=p>r&&n<(d-f)*(r-m)/(p-m)+f&&(a=!a)}return a}function QQ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return WQ(n,t)}function Ih(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ZQ=t5,JQ=Kj,eZ=r5,tZ=a5,nZ=Gj,rZ=i5,aZ=i0,iZ=s5,oZ=c5,sZ=f5,lZ=h5,cZ=m5,uZ=p5,fZ=g5,dZ=b5,o0="DropdownMenu",[hZ]=ei(o0,[J4]),wr=J4(),[mZ,w5]=hZ(o0),S5=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:s,modal:c=!0}=e,u=wr(t),f=y.useRef(null),[m,d]=Js({prop:a,defaultProp:i??!1,onChange:s,caller:o0});return v.jsx(mZ,{scope:t,triggerId:zn(),triggerRef:f,contentId:zn(),open:m,onOpenChange:d,onOpenToggle:y.useCallback(()=>d(p=>!p),[d]),modal:c,children:v.jsx(ZQ,{...u,open:m,onOpenChange:d,dir:r,modal:c,children:n})})};S5.displayName=o0;var E5="DropdownMenuTrigger",_5=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=w5(E5,n),s=wr(n);return v.jsx(JQ,{asChild:!0,...s,children:v.jsx(ke.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:No(t,i.triggerRef),onPointerDown:Se(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:Se(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});_5.displayName=E5;var pZ="DropdownMenuPortal",j5=e=>{const{__scopeDropdownMenu:t,...n}=e,r=wr(t);return v.jsx(eZ,{...r,...n})};j5.displayName=pZ;var O5="DropdownMenuContent",C5=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=w5(O5,n),i=wr(n),s=y.useRef(!1);return v.jsx(tZ,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:Se(e.onCloseAutoFocus,c=>{var u;s.current||(u=a.triggerRef.current)==null||u.focus(),s.current=!1,c.preventDefault()}),onInteractOutside:Se(e.onInteractOutside,c=>{const u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,m=u.button===2||f;(!a.modal||m)&&(s.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)"}})});C5.displayName=O5;var vZ="DropdownMenuGroup",gZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(nZ,{...a,...r,ref:t})});gZ.displayName=vZ;var yZ="DropdownMenuLabel",bZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(rZ,{...a,...r,ref:t})});bZ.displayName=yZ;var xZ="DropdownMenuItem",A5=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(aZ,{...a,...r,ref:t})});A5.displayName=xZ;var wZ="DropdownMenuCheckboxItem",N5=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(iZ,{...a,...r,ref:t})});N5.displayName=wZ;var SZ="DropdownMenuRadioGroup",EZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(oZ,{...a,...r,ref:t})});EZ.displayName=SZ;var _Z="DropdownMenuRadioItem",jZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(sZ,{...a,...r,ref:t})});jZ.displayName=_Z;var OZ="DropdownMenuItemIndicator",T5=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(lZ,{...a,...r,ref:t})});T5.displayName=OZ;var CZ="DropdownMenuSeparator",AZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(cZ,{...a,...r,ref:t})});AZ.displayName=CZ;var NZ="DropdownMenuArrow",TZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(uZ,{...a,...r,ref:t})});TZ.displayName=NZ;var PZ="DropdownMenuSubTrigger",MZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(fZ,{...a,...r,ref:t})});MZ.displayName=PZ;var RZ="DropdownMenuSubContent",kZ=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=wr(n);return v.jsx(dZ,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});kZ.displayName=RZ;var DZ=S5,IZ=_5,LZ=j5,zZ=C5,$Z=A5,BZ=N5,UZ=T5,HZ="Label",P5=y.forwardRef((e,t)=>v.jsx(ke.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));P5.displayName=HZ;var FZ=P5;function AE(e,[t,n]){return Math.min(n,Math.max(t,e))}function qZ(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Zj="ScrollArea",[M5]=ei(Zj),[KZ,Ta]=M5(Zj),R5=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:i=600,...s}=e,[c,u]=y.useState(null),[f,m]=y.useState(null),[d,p]=y.useState(null),[b,w]=y.useState(null),[x,S]=y.useState(null),[E,C]=y.useState(0),[O,A]=y.useState(0),[T,N]=y.useState(!1),[P,k]=y.useState(!1),D=tt(t,B=>u(B)),K=bm(a);return v.jsx(KZ,{scope:n,type:r,dir:K,scrollHideDelay:i,scrollArea:c,viewport:f,onViewportChange:m,content:d,onContentChange:p,scrollbarX:b,onScrollbarXChange:w,scrollbarXEnabled:T,onScrollbarXEnabledChange:N,scrollbarY:x,onScrollbarYChange:S,scrollbarYEnabled:P,onScrollbarYEnabledChange:k,onCornerWidthChange:C,onCornerHeightChange:A,children:v.jsx(ke.div,{dir:K,...s,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":O+"px",...e.style}})})});R5.displayName=Zj;var k5="ScrollAreaViewport",D5=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...i}=e,s=Ta(k5,n),c=y.useRef(null),u=tt(t,c,s.onViewportChange);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),v.jsx(ke.div,{"data-radix-scroll-area-viewport":"",...i,ref:u,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:v.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});D5.displayName=k5;var Ii="ScrollAreaScrollbar",I5=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Ta(Ii,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=a,c=e.orientation==="horizontal";return y.useEffect(()=>(c?i(!0):s(!0),()=>{c?i(!1):s(!1)}),[c,i,s]),a.type==="hover"?v.jsx(VZ,{...r,ref:t,forceMount:n}):a.type==="scroll"?v.jsx(YZ,{...r,ref:t,forceMount:n}):a.type==="auto"?v.jsx(L5,{...r,ref:t,forceMount:n}):a.type==="always"?v.jsx(Jj,{...r,ref:t}):null});I5.displayName=Ii;var VZ=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Ta(Ii,e.__scopeScrollArea),[i,s]=y.useState(!1);return y.useEffect(()=>{const c=a.scrollArea;let u=0;if(c){const f=()=>{window.clearTimeout(u),s(!0)},m=()=>{u=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",f),c.addEventListener("pointerleave",m),()=>{window.clearTimeout(u),c.removeEventListener("pointerenter",f),c.removeEventListener("pointerleave",m)}}},[a.scrollArea,a.scrollHideDelay]),v.jsx(ur,{present:n||i,children:v.jsx(L5,{"data-state":i?"visible":"hidden",...r,ref:t})})}),YZ=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Ta(Ii,e.__scopeScrollArea),i=e.orientation==="horizontal",s=l0(()=>u("SCROLL_END"),100),[c,u]=qZ("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(c==="idle"){const f=window.setTimeout(()=>u("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(f)}},[c,a.scrollHideDelay,u]),y.useEffect(()=>{const f=a.viewport,m=i?"scrollLeft":"scrollTop";if(f){let d=f[m];const p=()=>{const b=f[m];d!==b&&(u("SCROLL"),s()),d=b};return f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[a.viewport,i,u,s]),v.jsx(ur,{present:n||c!=="hidden",children:v.jsx(Jj,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Se(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Se(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),L5=y.forwardRef((e,t)=>{const n=Ta(Ii,e.__scopeScrollArea),{forceMount:r,...a}=e,[i,s]=y.useState(!1),c=e.orientation==="horizontal",u=l0(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;s(c?f:m)}},10);return Ef(n.viewport,u),Ef(n.content,u),v.jsx(ur,{present:r||i,children:v.jsx(Jj,{"data-state":i?"visible":"hidden",...a,ref:t})})}),Jj=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=Ta(Ii,e.__scopeScrollArea),i=y.useRef(null),s=y.useRef(0),[c,u]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=H5(c.viewport,c.content),m={...r,sizes:c,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function d(p,b){return JZ(p,s.current,c,b)}return n==="horizontal"?v.jsx(XZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const p=a.viewport.scrollLeft,b=AM(p,c,a.dir);i.current.style.transform=`translate3d(${b}px, 0, 0)`}},onWheelScroll:p=>{a.viewport&&(a.viewport.scrollLeft=p)},onDragScroll:p=>{a.viewport&&(a.viewport.scrollLeft=d(p,a.dir))}}):n==="vertical"?v.jsx(GZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const p=a.viewport.scrollTop,b=AM(p,c);i.current.style.transform=`translate3d(0, ${b}px, 0)`}},onWheelScroll:p=>{a.viewport&&(a.viewport.scrollTop=p)},onDragScroll:p=>{a.viewport&&(a.viewport.scrollTop=d(p))}}):null}),XZ=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=Ta(Ii,e.__scopeScrollArea),[s,c]=y.useState(),u=y.useRef(null),f=tt(t,u,i.onScrollbarXChange);return y.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),v.jsx($5,{"data-orientation":"horizontal",...a,ref:f,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":s0(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+m.deltaX;e.onWheelScroll(p),q5(p,d)&&m.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Rg(s.paddingLeft),paddingEnd:Rg(s.paddingRight)}})}})}),GZ=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=Ta(Ii,e.__scopeScrollArea),[s,c]=y.useState(),u=y.useRef(null),f=tt(t,u,i.onScrollbarYChange);return y.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),v.jsx($5,{"data-orientation":"vertical",...a,ref:f,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":s0(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,d)=>{if(i.viewport){const p=i.viewport.scrollTop+m.deltaY;e.onWheelScroll(p),q5(p,d)&&m.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Rg(s.paddingTop),paddingEnd:Rg(s.paddingBottom)}})}})}),[WZ,z5]=M5(Ii),$5=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:f,onWheelScroll:m,onResize:d,...p}=e,b=Ta(Ii,n),[w,x]=y.useState(null),S=tt(t,D=>x(D)),E=y.useRef(null),C=y.useRef(""),O=b.viewport,A=r.content-r.viewport,T=Qn(m),N=Qn(u),P=l0(d,10);function k(D){if(E.current){const K=D.clientX-E.current.left,B=D.clientY-E.current.top;f({x:K,y:B})}}return y.useEffect(()=>{const D=K=>{const B=K.target;(w==null?void 0:w.contains(B))&&T(K,A)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[O,w,A,T]),y.useEffect(N,[r,N]),Ef(w,P),Ef(b.content,P),v.jsx(WZ,{scope:n,scrollbar:w,hasThumb:a,onThumbChange:Qn(i),onThumbPointerUp:Qn(s),onThumbPositionChange:N,onThumbPointerDown:Qn(c),children:v.jsx(ke.div,{...p,ref:S,style:{position:"absolute",...p.style},onPointerDown:Se(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),E.current=w.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",b.viewport&&(b.viewport.style.scrollBehavior="auto"),k(D))}),onPointerMove:Se(e.onPointerMove,k),onPointerUp:Se(e.onPointerUp,D=>{const K=D.target;K.hasPointerCapture(D.pointerId)&&K.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=C.current,b.viewport&&(b.viewport.style.scrollBehavior=""),E.current=null})})})}),Mg="ScrollAreaThumb",B5=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=z5(Mg,e.__scopeScrollArea);return v.jsx(ur,{present:n||a.hasThumb,children:v.jsx(QZ,{ref:t,...r})})}),QZ=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,i=Ta(Mg,n),s=z5(Mg,n),{onThumbPositionChange:c}=s,u=tt(t,d=>s.onThumbChange(d)),f=y.useRef(void 0),m=l0(()=>{f.current&&(f.current(),f.current=void 0)},100);return y.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(m(),!f.current){const b=eJ(d,c);f.current=b,c()}};return c(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,m,c]),v.jsx(ke.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Se(e.onPointerDownCapture,d=>{const b=d.target.getBoundingClientRect(),w=d.clientX-b.left,x=d.clientY-b.top;s.onThumbPointerDown({x:w,y:x})}),onPointerUp:Se(e.onPointerUp,s.onThumbPointerUp)})});B5.displayName=Mg;var eO="ScrollAreaCorner",U5=y.forwardRef((e,t)=>{const n=Ta(eO,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?v.jsx(ZZ,{...e,ref:t}):null});U5.displayName=eO;var ZZ=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=Ta(eO,n),[i,s]=y.useState(0),[c,u]=y.useState(0),f=!!(i&&c);return Ef(a.scrollbarX,()=>{var d;const m=((d=a.scrollbarX)==null?void 0:d.offsetHeight)||0;a.onCornerHeightChange(m),u(m)}),Ef(a.scrollbarY,()=>{var d;const m=((d=a.scrollbarY)==null?void 0:d.offsetWidth)||0;a.onCornerWidthChange(m),s(m)}),f?v.jsx(ke.div,{...r,ref:t,style:{width:i,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Rg(e){return e?parseInt(e,10):0}function H5(e,t){const n=e/t;return isNaN(n)?0:n}function s0(e){const t=H5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function JZ(e,t,n,r="ltr"){const a=s0(n),i=a/2,s=t||i,c=a-s,u=n.scrollbar.paddingStart+s,f=n.scrollbar.size-n.scrollbar.paddingEnd-c,m=n.content-n.viewport,d=r==="ltr"?[0,m]:[m*-1,0];return F5([u,f],d)(e)}function AM(e,t,n="ltr"){const r=s0(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,s=t.content-t.viewport,c=i-r,u=n==="ltr"?[0,s]:[s*-1,0],f=AE(e,u);return F5([0,s],[0,c])(f)}function F5(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function q5(e,t){return e>0&&e<t}var eJ=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,c=n.top!==i.top;(s||c)&&t(),n=i,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function l0(e,t){const n=Qn(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Ef(e,t){const n=Qn(t);$n(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var tJ=R5,nJ=D5,rJ=U5,aJ=[" ","Enter","ArrowUp","ArrowDown"],iJ=[" ","Enter"],bc="Select",[c0,u0,oJ]=bj(bc),[Xf]=ei(bc,[oJ,Yf]),f0=Yf(),[sJ,ul]=Xf(bc),[lJ,cJ]=Xf(bc),K5=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:s,defaultValue:c,onValueChange:u,dir:f,name:m,autoComplete:d,disabled:p,required:b,form:w}=e,x=f0(t),[S,E]=y.useState(null),[C,O]=y.useState(null),[A,T]=y.useState(!1),N=bm(f),[P,k]=Js({prop:r,defaultProp:a??!1,onChange:i,caller:bc}),[D,K]=Js({prop:s,defaultProp:c,onChange:u,caller:bc}),B=y.useRef(null),I=S?w||!!S.closest("form"):!0,[W,z]=y.useState(new Set),V=Array.from(W).map(R=>R.props.value).join(";");return v.jsx(Uj,{...x,children:v.jsxs(sJ,{required:b,scope:t,trigger:S,onTriggerChange:E,valueNode:C,onValueNodeChange:O,valueNodeHasChildren:A,onValueNodeHasChildrenChange:T,contentId:zn(),value:D,onValueChange:K,open:P,onOpenChange:k,dir:N,triggerPointerDownPosRef:B,disabled:p,children:[v.jsx(c0.Provider,{scope:t,children:v.jsx(lJ,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(R=>{z(H=>new Set(H).add(R))},[]),onNativeOptionRemove:y.useCallback(R=>{z(H=>{const q=new Set(H);return q.delete(R),q})},[]),children:n})}),I?v.jsxs(h$,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:d,value:D,onChange:R=>K(R.target.value),disabled:p,form:w,children:[D===void 0?v.jsx("option",{value:""}):null,Array.from(W)]},V):null]})})};K5.displayName=bc;var V5="SelectTrigger",Y5=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,i=f0(n),s=ul(V5,n),c=s.disabled||r,u=tt(t,s.onTriggerChange),f=u0(n),m=y.useRef("touch"),[d,p,b]=p$(x=>{const S=f().filter(O=>!O.disabled),E=S.find(O=>O.value===s.value),C=v$(S,x,E);C!==void 0&&s.onValueChange(C.value)}),w=x=>{c||(s.onOpenChange(!0),b()),x&&(s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return v.jsx(Hj,{asChild:!0,...i,children:v.jsx(ke.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":m$(s.value)?"":void 0,...a,ref:u,onClick:Se(a.onClick,x=>{x.currentTarget.focus(),m.current!=="mouse"&&w(x)}),onPointerDown:Se(a.onPointerDown,x=>{m.current=x.pointerType;const S=x.target;S.hasPointerCapture(x.pointerId)&&S.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(w(x),x.preventDefault())}),onKeyDown:Se(a.onKeyDown,x=>{const S=d.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(S&&x.key===" ")&&aJ.includes(x.key)&&(w(),x.preventDefault())})})})});Y5.displayName=V5;var X5="SelectValue",G5=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:s="",...c}=e,u=ul(X5,n),{onValueNodeHasChildrenChange:f}=u,m=i!==void 0,d=tt(t,u.onValueNodeChange);return $n(()=>{f(m)},[f,m]),v.jsx(ke.span,{...c,ref:d,style:{pointerEvents:"none"},children:m$(u.value)?v.jsx(v.Fragment,{children:s}):i})});G5.displayName=X5;var uJ="SelectIcon",W5=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return v.jsx(ke.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});W5.displayName=uJ;var fJ="SelectPortal",Q5=e=>v.jsx(wm,{asChild:!0,...e});Q5.displayName=fJ;var xc="SelectContent",Z5=y.forwardRef((e,t)=>{const n=ul(xc,e.__scopeSelect),[r,a]=y.useState();if($n(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?cl.createPortal(v.jsx(J5,{scope:e.__scopeSelect,children:v.jsx(c0.Slot,{scope:e.__scopeSelect,children:v.jsx("div",{children:e.children})})}),i):null}return v.jsx(e$,{...e,ref:t})});Z5.displayName=xc;var La=10,[J5,fl]=Xf(xc),dJ="SelectContentImpl",hJ=vc("SelectContent.RemoveScroll"),e$=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:s,side:c,sideOffset:u,align:f,alignOffset:m,arrowPadding:d,collisionBoundary:p,collisionPadding:b,sticky:w,hideWhenDetached:x,avoidCollisions:S,...E}=e,C=ul(xc,n),[O,A]=y.useState(null),[T,N]=y.useState(null),P=tt(t,ie=>A(ie)),[k,D]=y.useState(null),[K,B]=y.useState(null),I=u0(n),[W,z]=y.useState(!1),V=y.useRef(!1);y.useEffect(()=>{if(O)return _j(O)},[O]),Ej();const R=y.useCallback(ie=>{const[re,...ee]=I().map(ne=>ne.ref.current),[le]=ee.slice(-1),me=document.activeElement;for(const ne of ie)if(ne===me||(ne==null||ne.scrollIntoView({block:"nearest"}),ne===re&&T&&(T.scrollTop=0),ne===le&&T&&(T.scrollTop=T.scrollHeight),ne==null||ne.focus(),document.activeElement!==me))return},[I,T]),H=y.useCallback(()=>R([k,O]),[R,k,O]);y.useEffect(()=>{W&&H()},[W,H]);const{onOpenChange:q,triggerPointerDownPosRef:F}=C;y.useEffect(()=>{if(O){let ie={x:0,y:0};const re=le=>{var me,ne;ie={x:Math.abs(Math.round(le.pageX)-(((me=F.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(le.pageY)-(((ne=F.current)==null?void 0:ne.y)??0))}},ee=le=>{ie.x<=10&&ie.y<=10?le.preventDefault():O.contains(le.target)||q(!1),document.removeEventListener("pointermove",re),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",ee,{capture:!0})}}},[O,q,F]),y.useEffect(()=>{const ie=()=>q(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[q]);const[Y,$]=p$(ie=>{const re=I().filter(me=>!me.disabled),ee=re.find(me=>me.ref.current===document.activeElement),le=v$(re,ie,ee);le&&setTimeout(()=>le.ref.current.focus())}),L=y.useCallback((ie,re,ee)=>{const le=!V.current&&!ee;(C.value!==void 0&&C.value===re||le)&&(D(ie),le&&(V.current=!0))},[C.value]),G=y.useCallback(()=>O==null?void 0:O.focus(),[O]),Z=y.useCallback((ie,re,ee)=>{const le=!V.current&&!ee;(C.value!==void 0&&C.value===re||le)&&B(ie)},[C.value]),J=r==="popper"?NE:t$,se=J===NE?{side:c,sideOffset:u,align:f,alignOffset:m,arrowPadding:d,collisionBoundary:p,collisionPadding:b,sticky:w,hideWhenDetached:x,avoidCollisions:S}:{};return v.jsx(J5,{scope:n,content:O,viewport:T,onViewportChange:N,itemRefCallback:L,selectedItem:k,onItemLeave:G,itemTextRefCallback:Z,focusSelectedItem:H,selectedItemText:K,position:r,isPositioned:W,searchRef:Y,children:v.jsx(Qy,{as:hJ,allowPinchZoom:!0,children:v.jsx(Gy,{asChild:!0,trapped:C.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:Se(a,ie=>{var re;(re=C.trigger)==null||re.focus({preventScroll:!0}),ie.preventDefault()}),children:v.jsx(xm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:v.jsx(J,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:ie=>ie.preventDefault(),...E,...se,onPlaced:()=>z(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:Se(E.onKeyDown,ie=>{const re=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!re&&ie.key.length===1&&$(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let le=I().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const me=ie.target,ne=le.indexOf(me);le=le.slice(ne+1)}setTimeout(()=>R(le)),ie.preventDefault()}})})})})})})});e$.displayName=dJ;var mJ="SelectItemAlignedPosition",t$=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,i=ul(xc,n),s=fl(xc,n),[c,u]=y.useState(null),[f,m]=y.useState(null),d=tt(t,P=>m(P)),p=u0(n),b=y.useRef(!1),w=y.useRef(!0),{viewport:x,selectedItem:S,selectedItemText:E,focusSelectedItem:C}=s,O=y.useCallback(()=>{if(i.trigger&&i.valueNode&&c&&f&&x&&S&&E){const P=i.trigger.getBoundingClientRect(),k=f.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),K=E.getBoundingClientRect();if(i.dir!=="rtl"){const me=K.left-k.left,ne=D.left-me,ge=P.left-ne,be=P.width+ge,Ie=Math.max(be,k.width),Pe=window.innerWidth-La,Ve=AE(ne,[La,Math.max(La,Pe-Ie)]);c.style.minWidth=be+"px",c.style.left=Ve+"px"}else{const me=k.right-K.right,ne=window.innerWidth-D.right-me,ge=window.innerWidth-P.right-ne,be=P.width+ge,Ie=Math.max(be,k.width),Pe=window.innerWidth-La,Ve=AE(ne,[La,Math.max(La,Pe-Ie)]);c.style.minWidth=be+"px",c.style.right=Ve+"px"}const B=p(),I=window.innerHeight-La*2,W=x.scrollHeight,z=window.getComputedStyle(f),V=parseInt(z.borderTopWidth,10),R=parseInt(z.paddingTop,10),H=parseInt(z.borderBottomWidth,10),q=parseInt(z.paddingBottom,10),F=V+R+W+q+H,Y=Math.min(S.offsetHeight*5,F),$=window.getComputedStyle(x),L=parseInt($.paddingTop,10),G=parseInt($.paddingBottom,10),Z=P.top+P.height/2-La,J=I-Z,se=S.offsetHeight/2,ie=S.offsetTop+se,re=V+R+ie,ee=F-re;if(re<=Z){const me=B.length>0&&S===B[B.length-1].ref.current;c.style.bottom="0px";const ne=f.clientHeight-x.offsetTop-x.offsetHeight,ge=Math.max(J,se+(me?G:0)+ne+H),be=re+ge;c.style.height=be+"px"}else{const me=B.length>0&&S===B[0].ref.current;c.style.top="0px";const ge=Math.max(Z,V+x.offsetTop+(me?L:0)+se)+ee;c.style.height=ge+"px",x.scrollTop=re-Z+x.offsetTop}c.style.margin=`${La}px 0`,c.style.minHeight=Y+"px",c.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>b.current=!0)}},[p,i.trigger,i.valueNode,c,f,x,S,E,i.dir,r]);$n(()=>O(),[O]);const[A,T]=y.useState();$n(()=>{f&&T(window.getComputedStyle(f).zIndex)},[f]);const N=y.useCallback(P=>{P&&w.current===!0&&(O(),C==null||C(),w.current=!1)},[O,C]);return v.jsx(vJ,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:b,onScrollButtonChange:N,children:v.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:v.jsx(ke.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});t$.displayName=mJ;var pJ="SelectPopperPosition",NE=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=La,...i}=e,s=f0(n);return v.jsx(Fj,{...s,...i,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...i.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)"}})});NE.displayName=pJ;var[vJ,tO]=Xf(xc,{}),TE="SelectViewport",n$=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,i=fl(TE,n),s=tO(TE,n),c=tt(t,i.onViewportChange),u=y.useRef(0);return v.jsxs(v.Fragment,{children:[v.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),v.jsx(c0.Slot,{scope:n,children:v.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Se(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&d){const b=Math.abs(u.current-m.scrollTop);if(b>0){const w=window.innerHeight-La*2,x=parseFloat(d.style.minHeight),S=parseFloat(d.style.height),E=Math.max(x,S);if(E<w){const C=E+b,O=Math.min(w,C),A=C-O;d.style.height=O+"px",d.style.bottom==="0px"&&(m.scrollTop=A>0?A:0,d.style.justifyContent="flex-end")}}}u.current=m.scrollTop})})})]})});n$.displayName=TE;var r$="SelectGroup",[gJ,yJ]=Xf(r$),bJ=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=zn();return v.jsx(gJ,{scope:n,id:a,children:v.jsx(ke.div,{role:"group","aria-labelledby":a,...r,ref:t})})});bJ.displayName=r$;var a$="SelectLabel",xJ=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=yJ(a$,n);return v.jsx(ke.div,{id:a.id,...r,ref:t})});xJ.displayName=a$;var kg="SelectItem",[wJ,i$]=Xf(kg),o$=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...s}=e,c=ul(kg,n),u=fl(kg,n),f=c.value===r,[m,d]=y.useState(i??""),[p,b]=y.useState(!1),w=tt(t,C=>{var O;return(O=u.itemRefCallback)==null?void 0:O.call(u,C,r,a)}),x=zn(),S=y.useRef("touch"),E=()=>{a||(c.onValueChange(r),c.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return v.jsx(wJ,{scope:n,value:r,disabled:a,textId:x,isSelected:f,onItemTextChange:y.useCallback(C=>{d(O=>O||((C==null?void 0:C.textContent)??"").trim())},[]),children:v.jsx(c0.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:v.jsx(ke.div,{role:"option","aria-labelledby":x,"data-highlighted":p?"":void 0,"aria-selected":f&&p,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:w,onFocus:Se(s.onFocus,()=>b(!0)),onBlur:Se(s.onBlur,()=>b(!1)),onClick:Se(s.onClick,()=>{S.current!=="mouse"&&E()}),onPointerUp:Se(s.onPointerUp,()=>{S.current==="mouse"&&E()}),onPointerDown:Se(s.onPointerDown,C=>{S.current=C.pointerType}),onPointerMove:Se(s.onPointerMove,C=>{var O;S.current=C.pointerType,a?(O=u.onItemLeave)==null||O.call(u):S.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Se(s.onPointerLeave,C=>{var O;C.currentTarget===document.activeElement&&((O=u.onItemLeave)==null||O.call(u))}),onKeyDown:Se(s.onKeyDown,C=>{var A;((A=u.searchRef)==null?void 0:A.current)!==""&&C.key===" "||(iJ.includes(C.key)&&E(),C.key===" "&&C.preventDefault())})})})})});o$.displayName=kg;var Sh="SelectItemText",s$=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...i}=e,s=ul(Sh,n),c=fl(Sh,n),u=i$(Sh,n),f=cJ(Sh,n),[m,d]=y.useState(null),p=tt(t,E=>d(E),u.onItemTextChange,E=>{var C;return(C=c.itemTextRefCallback)==null?void 0:C.call(c,E,u.value,u.disabled)}),b=m==null?void 0:m.textContent,w=y.useMemo(()=>v.jsx("option",{value:u.value,disabled:u.disabled,children:b},u.value),[u.disabled,u.value,b]),{onNativeOptionAdd:x,onNativeOptionRemove:S}=f;return $n(()=>(x(w),()=>S(w)),[x,S,w]),v.jsxs(v.Fragment,{children:[v.jsx(ke.span,{id:u.textId,...i,ref:p}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?cl.createPortal(i.children,s.valueNode):null]})});s$.displayName=Sh;var l$="SelectItemIndicator",c$=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i$(l$,n).isSelected?v.jsx(ke.span,{"aria-hidden":!0,...r,ref:t}):null});c$.displayName=l$;var PE="SelectScrollUpButton",u$=y.forwardRef((e,t)=>{const n=fl(PE,e.__scopeSelect),r=tO(PE,e.__scopeSelect),[a,i]=y.useState(!1),s=tt(t,r.onScrollButtonChange);return $n(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=u.scrollTop>0;i(f)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(d$,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});u$.displayName=PE;var ME="SelectScrollDownButton",f$=y.forwardRef((e,t)=>{const n=fl(ME,e.__scopeSelect),r=tO(ME,e.__scopeSelect),[a,i]=y.useState(!1),s=tt(t,r.onScrollButtonChange);return $n(()=>{if(n.viewport&&n.isPositioned){let c=function(){const f=u.scrollHeight-u.clientHeight,m=Math.ceil(u.scrollTop)<f;i(m)};const u=n.viewport;return c(),u.addEventListener("scroll",c),()=>u.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?v.jsx(d$,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});f$.displayName=ME;var d$=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,i=fl("SelectScrollButton",n),s=y.useRef(null),c=u0(n),u=y.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return y.useEffect(()=>()=>u(),[u]),$n(()=>{var m;const f=c().find(d=>d.ref.current===document.activeElement);(m=f==null?void 0:f.ref.current)==null||m.scrollIntoView({block:"nearest"})},[c]),v.jsx(ke.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Se(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Se(a.onPointerMove,()=>{var f;(f=i.onItemLeave)==null||f.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Se(a.onPointerLeave,()=>{u()})})}),SJ="SelectSeparator",EJ=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return v.jsx(ke.div,{"aria-hidden":!0,...r,ref:t})});EJ.displayName=SJ;var RE="SelectArrow",_J=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=f0(n),i=ul(RE,n),s=fl(RE,n);return i.open&&s.position==="popper"?v.jsx(qj,{...a,...r,ref:t}):null});_J.displayName=RE;var jJ="SelectBubbleInput",h$=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=y.useRef(null),i=tt(r,a),s=eW(t);return y.useEffect(()=>{const c=a.current;if(!c)return;const u=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==t&&m){const d=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(d)}},[s,t]),v.jsx(ke.select,{...n,style:{...qz,...n.style},ref:i,defaultValue:t})});h$.displayName=jJ;function m$(e){return e===""||e===void 0}function p$(e){const t=Qn(e),n=y.useRef(""),r=y.useRef(0),a=y.useCallback(s=>{const c=n.current+s;t(c),(function u(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(c)},[t]),i=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function v$(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=OJ(e,Math.max(i,0));a.length===1&&(s=s.filter(f=>f!==n));const u=s.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return u!==n?u:void 0}function OJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var CJ=K5,AJ=Y5,NJ=G5,TJ=W5,PJ=Q5,MJ=Z5,RJ=n$,kJ=o$,DJ=s$,IJ=c$,LJ=u$,zJ=f$,$J="Separator",NM="horizontal",BJ=["horizontal","vertical"],g$=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=NM,...a}=e,i=UJ(r)?r:NM,c=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return v.jsx(ke.div,{"data-orientation":i,...c,...a,ref:t})});g$.displayName=$J;function UJ(e){return BJ.includes(e)}var HJ=g$,d0="Tabs",[FJ]=ei(d0,[r0]),y$=r0(),[qJ,nO]=FJ(d0),b$=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:i,orientation:s="horizontal",dir:c,activationMode:u="automatic",...f}=e,m=bm(c),[d,p]=Js({prop:r,onChange:a,defaultProp:i??"",caller:d0});return v.jsx(qJ,{scope:n,baseId:zn(),value:d,onValueChange:p,orientation:s,dir:m,activationMode:u,children:v.jsx(ke.div,{dir:m,"data-orientation":s,...f,ref:t})})});b$.displayName=d0;var x$="TabsList",w$=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,i=nO(x$,n),s=y$(n);return v.jsx(W4,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:v.jsx(ke.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});w$.displayName=x$;var S$="TabsTrigger",E$=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...i}=e,s=nO(S$,n),c=y$(n),u=O$(s.baseId,r),f=C$(s.baseId,r),m=r===s.value;return v.jsx(Q4,{asChild:!0,...c,focusable:!a,active:m,children:v.jsx(ke.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":f,"data-state":m?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:u,...i,ref:t,onMouseDown:Se(e.onMouseDown,d=>{!a&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:Se(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:Se(e.onFocus,()=>{const d=s.activationMode!=="manual";!m&&!a&&d&&s.onValueChange(r)})})})});E$.displayName=S$;var _$="TabsContent",j$=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:i,...s}=e,c=nO(_$,n),u=O$(c.baseId,r),f=C$(c.baseId,r),m=r===c.value,d=y.useRef(m);return y.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),v.jsx(ur,{present:a||m,children:({present:p})=>v.jsx(ke.div,{"data-state":m?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":u,hidden:!p,id:f,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&i})})});j$.displayName=_$;function O$(e,t){return`${e}-trigger-${t}`}function C$(e,t){return`${e}-content-${t}`}var KJ=b$,VJ=w$,YJ=E$,XJ=j$,[h0]=ei("Tooltip",[Yf]),m0=Yf(),A$="TooltipProvider",GJ=700,kE="tooltip.open",[WJ,rO]=h0(A$),N$=e=>{const{__scopeTooltip:t,delayDuration:n=GJ,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=e,s=y.useRef(!0),c=y.useRef(!1),u=y.useRef(0);return y.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),v.jsx(WJ,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:y.useCallback(f=>{c.current=f},[]),disableHoverableContent:a,children:i})};N$.displayName=A$;var Lh="Tooltip",[QJ,Om]=h0(Lh),T$=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:s,delayDuration:c}=e,u=rO(Lh,e.__scopeTooltip),f=m0(t),[m,d]=y.useState(null),p=zn(),b=y.useRef(0),w=s??u.disableHoverableContent,x=c??u.delayDuration,S=y.useRef(!1),[E,C]=Js({prop:r,defaultProp:a??!1,onChange:P=>{P?(u.onOpen(),document.dispatchEvent(new CustomEvent(kE))):u.onClose(),i==null||i(P)},caller:Lh}),O=y.useMemo(()=>E?S.current?"delayed-open":"instant-open":"closed",[E]),A=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,S.current=!1,C(!0)},[C]),T=y.useCallback(()=>{window.clearTimeout(b.current),b.current=0,C(!1)},[C]),N=y.useCallback(()=>{window.clearTimeout(b.current),b.current=window.setTimeout(()=>{S.current=!0,C(!0),b.current=0},x)},[x,C]);return y.useEffect(()=>()=>{b.current&&(window.clearTimeout(b.current),b.current=0)},[]),v.jsx(Uj,{...f,children:v.jsx(QJ,{scope:t,contentId:p,open:E,stateAttribute:O,trigger:m,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{u.isOpenDelayedRef.current?N():A()},[u.isOpenDelayedRef,N,A]),onTriggerLeave:y.useCallback(()=>{w?T():(window.clearTimeout(b.current),b.current=0)},[T,w]),onOpen:A,onClose:T,disableHoverableContent:w,children:n})})};T$.displayName=Lh;var DE="TooltipTrigger",P$=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Om(DE,n),i=rO(DE,n),s=m0(n),c=y.useRef(null),u=tt(t,c,a.onTriggerChange),f=y.useRef(!1),m=y.useRef(!1),d=y.useCallback(()=>f.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),v.jsx(Hj,{asChild:!0,...s,children:v.jsx(ke.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:u,onPointerMove:Se(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:Se(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:Se(e.onPointerDown,()=>{a.open&&a.onClose(),f.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Se(e.onFocus,()=>{f.current||a.onOpen()}),onBlur:Se(e.onBlur,a.onClose),onClick:Se(e.onClick,a.onClose)})})});P$.displayName=DE;var aO="TooltipPortal",[ZJ,JJ]=h0(aO,{forceMount:void 0}),M$=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,i=Om(aO,t);return v.jsx(ZJ,{scope:t,forceMount:n,children:v.jsx(ur,{present:n||i.open,children:v.jsx(wm,{asChild:!0,container:a,children:r})})})};M$.displayName=aO;var _f="TooltipContent",R$=y.forwardRef((e,t)=>{const n=JJ(_f,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=e,s=Om(_f,e.__scopeTooltip);return v.jsx(ur,{present:r||s.open,children:s.disableHoverableContent?v.jsx(k$,{side:a,...i,ref:t}):v.jsx(eee,{side:a,...i,ref:t})})}),eee=y.forwardRef((e,t)=>{const n=Om(_f,e.__scopeTooltip),r=rO(_f,e.__scopeTooltip),a=y.useRef(null),i=tt(t,a),[s,c]=y.useState(null),{trigger:u,onClose:f}=n,m=a.current,{onPointerInTransitChange:d}=r,p=y.useCallback(()=>{c(null),d(!1)},[d]),b=y.useCallback((w,x)=>{const S=w.currentTarget,E={x:w.clientX,y:w.clientY},C=aee(E,S.getBoundingClientRect()),O=iee(E,C),A=oee(x.getBoundingClientRect()),T=lee([...O,...A]);c(T),d(!0)},[d]);return y.useEffect(()=>()=>p(),[p]),y.useEffect(()=>{if(u&&m){const w=S=>b(S,m),x=S=>b(S,u);return u.addEventListener("pointerleave",w),m.addEventListener("pointerleave",x),()=>{u.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",x)}}},[u,m,b,p]),y.useEffect(()=>{if(s){const w=x=>{const S=x.target,E={x:x.clientX,y:x.clientY},C=(u==null?void 0:u.contains(S))||(m==null?void 0:m.contains(S)),O=!see(E,s);C?p():O&&(p(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,m,s,f,p]),v.jsx(k$,{...e,ref:i})}),[tee,nee]=h0(Lh,{isInside:!1}),ree=bX("TooltipContent"),k$=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:s,...c}=e,u=Om(_f,n),f=m0(n),{onClose:m}=u;return y.useEffect(()=>(document.addEventListener(kE,m),()=>document.removeEventListener(kE,m)),[m]),y.useEffect(()=>{if(u.trigger){const d=p=>{const b=p.target;b!=null&&b.contains(u.trigger)&&m()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[u.trigger,m]),v.jsx(xm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:m,children:v.jsxs(Fj,{"data-state":u.stateAttribute,...f,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[v.jsx(ree,{children:r}),v.jsx(tee,{scope:n,isInside:!0,children:v.jsx(jX,{id:u.contentId,role:"tooltip",children:a||r})})]})})});R$.displayName=_f;var D$="TooltipArrow",I$=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=m0(n);return nee(D$,n).isInside?null:v.jsx(qj,{...a,...r,ref:t})});I$.displayName=D$;function aee(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function iee(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 oee(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function see(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const c=t[i],u=t[s],f=c.x,m=c.y,d=u.x,p=u.y;m>r!=p>r&&n<(d-f)*(r-m)/(p-m)+f&&(a=!a)}return a}function lee(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),cee(t)}function cee(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(a.y-s.y)>=(i.y-s.y)*(a.x-s.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var uee=N$,fee=T$,dee=P$,hee=M$,mee=R$,pee=I$;function L$(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=L$(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function st(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=L$(e))&&(r&&(r+=" "),r+=t);return r}const vee=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},gee=(e,t)=>({classGroupId:e,validator:t}),z$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Dg="-",TM=[],yee="arbitrary..",bee=e=>{const t=wee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return xee(s);const c=s.split(Dg),u=c[0]===""&&c.length>1?1:0;return $$(c,u,t)},getConflictingClassGroupIds:(s,c)=>{if(c){const u=r[s],f=n[s];return u?f?vee(f,u):u:f||TM}return n[s]||TM}}},$$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=$$(e,t+1,i);if(f)return f}const s=n.validators;if(s===null)return;const c=t===0?e.join(Dg):e.slice(t).join(Dg),u=s.length;for(let f=0;f<u;f++){const m=s[f];if(m.validator(c))return m.classGroupId}},xee=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?yee+r:void 0})(),wee=e=>{const{theme:t,classGroups:n}=e;return See(n,t)},See=(e,t)=>{const n=z$();for(const r in e){const a=e[r];iO(a,n,r,t)}return n},iO=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const s=e[i];Eee(s,t,n,r)}},Eee=(e,t,n,r)=>{if(typeof e=="string"){_ee(e,t,n);return}if(typeof e=="function"){jee(e,t,n,r);return}Oee(e,t,n,r)},_ee=(e,t,n)=>{const r=e===""?t:B$(t,e);r.classGroupId=n},jee=(e,t,n,r)=>{if(Cee(e)){iO(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(gee(n,e))},Oee=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let s=0;s<i;s++){const[c,u]=a[s];iO(u,B$(t,c),n,r)}},B$=(e,t)=>{let n=e;const r=t.split(Dg),a=r.length;for(let i=0;i<a;i++){const s=r[i];let c=n.nextPart.get(s);c||(c=z$(),n.nextPart.set(s,c)),n=c}return n},Cee=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Aee=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return a(i,s),s},set(i,s){i in n?n[i]=s:a(i,s)}}},IE="!",PM=":",Nee=[],MM=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Tee=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let s=0,c=0,u=0,f;const m=a.length;for(let x=0;x<m;x++){const S=a[x];if(s===0&&c===0){if(S===PM){i.push(a.slice(u,x)),u=x+1;continue}if(S==="/"){f=x;continue}}S==="["?s++:S==="]"?s--:S==="("?c++:S===")"&&c--}const d=i.length===0?a:a.slice(u);let p=d,b=!1;d.endsWith(IE)?(p=d.slice(0,-1),b=!0):d.startsWith(IE)&&(p=d.slice(1),b=!0);const w=f&&f>u?f-u:void 0;return MM(i,b,p,w)};if(t){const a=t+PM,i=r;r=s=>s.startsWith(a)?i(s.slice(a.length)):MM(Nee,!1,s,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},Pee=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const s=n[i],c=s[0]==="[",u=t.has(s);c||u?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(s)):a.push(s)}return a.length>0&&(a.sort(),r.push(...a)),r}},Mee=e=>({cache:Aee(e.cacheSize),parseClassName:Tee(e),sortModifiers:Pee(e),...bee(e)}),Ree=/\s+/,kee=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,s=[],c=e.trim().split(Ree);let u="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:d,modifiers:p,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:x}=n(m);if(d){u=m+(u.length>0?" "+u:u);continue}let S=!!x,E=r(S?w.substring(0,x):w);if(!E){if(!S){u=m+(u.length>0?" "+u:u);continue}if(E=r(w),!E){u=m+(u.length>0?" "+u:u);continue}S=!1}const C=p.length===0?"":p.length===1?p[0]:i(p).join(":"),O=b?C+IE:C,A=O+E;if(s.indexOf(A)>-1)continue;s.push(A);const T=a(E,S);for(let N=0;N<T.length;++N){const P=T[N];s.push(O+P)}u=m+(u.length>0?" "+u:u)}return u},Dee=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=U$(n))&&(a&&(a+=" "),a+=r);return a},U$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=U$(e[r]))&&(n&&(n+=" "),n+=t);return n},Iee=(e,...t)=>{let n,r,a,i;const s=u=>{const f=t.reduce((m,d)=>d(m),e());return n=Mee(f),r=n.cache.get,a=n.cache.set,i=c,c(u)},c=u=>{const f=r(u);if(f)return f;const m=kee(u,n);return a(u,m),m};return i=s,(...u)=>i(Dee(...u))},Lee=[],En=e=>{const t=n=>n[e]||Lee;return t.isThemeGetter=!0,t},H$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,F$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zee=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,$ee=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Bee=/\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$/,Uee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Os=e=>zee.test(e),Xe=e=>!!e&&!Number.isNaN(Number(e)),Cs=e=>!!e&&Number.isInteger(Number(e)),r1=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),so=e=>$ee.test(e),q$=()=>!0,qee=e=>Bee.test(e)&&!Uee.test(e),oO=()=>!1,Kee=e=>Hee.test(e),Vee=e=>Fee.test(e),Yee=e=>!Ne(e)&&!Me(e),Xee=e=>dl(e,Y$,oO),Ne=e=>H$.test(e),$l=e=>dl(e,X$,qee),RM=e=>dl(e,nte,Xe),Gee=e=>dl(e,W$,q$),Wee=e=>dl(e,G$,oO),kM=e=>dl(e,K$,oO),Qee=e=>dl(e,V$,Vee),Pv=e=>dl(e,Q$,Kee),Me=e=>F$.test(e),rh=e=>zc(e,X$),Zee=e=>zc(e,G$),DM=e=>zc(e,K$),Jee=e=>zc(e,Y$),ete=e=>zc(e,V$),Mv=e=>zc(e,Q$,!0),tte=e=>zc(e,W$,!0),dl=(e,t,n)=>{const r=H$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zc=(e,t,n=!1)=>{const r=F$.exec(e);return r?r[1]?t(r[1]):n:!1},K$=e=>e==="position"||e==="percentage",V$=e=>e==="image"||e==="url",Y$=e=>e==="length"||e==="size"||e==="bg-size",X$=e=>e==="length",nte=e=>e==="number",G$=e=>e==="family-name",W$=e=>e==="number"||e==="weight",Q$=e=>e==="shadow",rte=()=>{const e=En("color"),t=En("font"),n=En("text"),r=En("font-weight"),a=En("tracking"),i=En("leading"),s=En("breakpoint"),c=En("container"),u=En("spacing"),f=En("radius"),m=En("shadow"),d=En("inset-shadow"),p=En("text-shadow"),b=En("drop-shadow"),w=En("blur"),x=En("perspective"),S=En("aspect"),E=En("ease"),C=En("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],T=()=>[...A(),Me,Ne],N=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],k=()=>[Me,Ne,u],D=()=>[Os,"full","auto",...k()],K=()=>[Cs,"none","subgrid",Me,Ne],B=()=>["auto",{span:["full",Cs,Me,Ne]},Cs,Me,Ne],I=()=>[Cs,"auto",Me,Ne],W=()=>["auto","min","max","fr",Me,Ne],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],V=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...k()],H=()=>[Os,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],q=()=>[Os,"screen","full","dvw","lvw","svw","min","max","fit",...k()],F=()=>[Os,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],Y=()=>[e,Me,Ne],$=()=>[...A(),DM,kM,{position:[Me,Ne]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",Jee,Xee,{size:[Me,Ne]}],Z=()=>[r1,rh,$l],J=()=>["","none","full",f,Me,Ne],se=()=>["",Xe,rh,$l],ie=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[Xe,r1,DM,kM],le=()=>["","none",w,Me,Ne],me=()=>["none",Xe,Me,Ne],ne=()=>["none",Xe,Me,Ne],ge=()=>[Xe,Me,Ne],be=()=>[Os,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[so],breakpoint:[so],color:[q$],container:[so],"drop-shadow":[so],ease:["in","out","in-out"],font:[Yee],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[so],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[so],shadow:[so],spacing:["px",Xe],text:[so],"text-shadow":[so],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Os,Ne,Me,S]}],container:["container"],columns:[{columns:[Xe,Ne,Me,c]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"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"],sr:["sr-only","not-sr-only"],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:T()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Cs,"auto",Me,Ne]}],basis:[{basis:[Os,"full","auto",c,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Xe,Os,"auto","initial","none",Ne]}],grow:[{grow:["",Xe,Me,Ne]}],shrink:[{shrink:["",Xe,Me,Ne]}],order:[{order:[Cs,"first","last","none",Me,Ne]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:B()}],"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":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...V(),"normal"]}],"justify-self":[{"justify-self":["auto",...V()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...V(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...V(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...V(),"baseline"]}],"place-self":[{"place-self":["auto",...V()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mbs:[{mbs:R()}],mbe:[{mbe:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...F()]}],"min-block-size":[{"min-block":["auto",...F()]}],"max-block-size":[{"max-block":["none",...F()]}],w:[{w:[c,"screen",...H()]}],"min-w":[{"min-w":[c,"screen","none",...H()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[s]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",n,rh,$l]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,tte,Gee]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",r1,Ne]}],"font-family":[{font:[Zee,Wee,t]}],"font-features":[{"font-features":[Ne]}],"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:[a,Me,Ne]}],"line-clamp":[{"line-clamp":[Xe,"none",Me,RM]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Me,Ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Me,Ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[Xe,"from-font","auto",Me,$l]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Xe,"auto",Me,Ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me,Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Me,Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Cs,Me,Ne],radial:["",Me,Ne],conic:[Cs,Me,Ne]},ete,Qee]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:J()}],"rounded-s":[{"rounded-s":J()}],"rounded-e":[{"rounded-e":J()}],"rounded-t":[{"rounded-t":J()}],"rounded-r":[{"rounded-r":J()}],"rounded-b":[{"rounded-b":J()}],"rounded-l":[{"rounded-l":J()}],"rounded-ss":[{"rounded-ss":J()}],"rounded-se":[{"rounded-se":J()}],"rounded-ee":[{"rounded-ee":J()}],"rounded-es":[{"rounded-es":J()}],"rounded-tl":[{"rounded-tl":J()}],"rounded-tr":[{"rounded-tr":J()}],"rounded-br":[{"rounded-br":J()}],"rounded-bl":[{"rounded-bl":J()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Xe,Me,Ne]}],"outline-w":[{outline:["",Xe,rh,$l]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",m,Mv,Pv]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",d,Mv,Pv]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Xe,$l]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",p,Mv,Pv]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Xe,Me,Ne]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Xe]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[Me,Ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[Xe]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Me,Ne]}],filter:[{filter:["","none",Me,Ne]}],blur:[{blur:le()}],brightness:[{brightness:[Xe,Me,Ne]}],contrast:[{contrast:[Xe,Me,Ne]}],"drop-shadow":[{"drop-shadow":["","none",b,Mv,Pv]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Xe,Me,Ne]}],"hue-rotate":[{"hue-rotate":[Xe,Me,Ne]}],invert:[{invert:["",Xe,Me,Ne]}],saturate:[{saturate:[Xe,Me,Ne]}],sepia:[{sepia:["",Xe,Me,Ne]}],"backdrop-filter":[{"backdrop-filter":["","none",Me,Ne]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Xe,Me,Ne]}],"backdrop-contrast":[{"backdrop-contrast":[Xe,Me,Ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Xe,Me,Ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Xe,Me,Ne]}],"backdrop-invert":[{"backdrop-invert":["",Xe,Me,Ne]}],"backdrop-opacity":[{"backdrop-opacity":[Xe,Me,Ne]}],"backdrop-saturate":[{"backdrop-saturate":[Xe,Me,Ne]}],"backdrop-sepia":[{"backdrop-sepia":["",Xe,Me,Ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Me,Ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Xe,"initial",Me,Ne]}],ease:[{ease:["linear","initial",E,Me,Ne]}],delay:[{delay:[Xe,Me,Ne]}],animate:[{animate:["none",C,Me,Ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Me,Ne]}],"perspective-origin":[{"perspective-origin":T()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:ne()}],"scale-x":[{"scale-x":ne()}],"scale-y":[{"scale-y":ne()}],"scale-z":[{"scale-z":ne()}],"scale-3d":["scale-3d"],skew:[{skew:ge()}],"skew-x":[{"skew-x":ge()}],"skew-y":[{"skew-y":ge()}],transform:[{transform:[Me,Ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Me,Ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Me,Ne]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Xe,rh,$l,RM]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ate=Iee(rte);function Oe(...e){return ate(st(e))}function Z$({delayDuration:e=0,...t}){return v.jsx(uee,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function ite({...e}){return v.jsx(fee,{"data-slot":"tooltip",...e})}function ote({...e}){return v.jsx(dee,{"data-slot":"tooltip-trigger",...e})}function ste({className:e,sideOffset:t=0,children:n,...r}){return v.jsx(hee,{children:v.jsxs(mee,{"data-slot":"tooltip-content",sideOffset:t,className:Oe("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...r,children:[n,v.jsx(pee,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const J$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lte=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cte=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const IM=e=>{const t=cte(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var ute={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"};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fte=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dte=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...c},u)=>y.createElement("svg",{ref:u,...ute,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:J$("lucide",a),...!i&&!fte(c)&&{"aria-hidden":"true"},...c},[...s.map(([f,m])=>y.createElement(f,m)),...Array.isArray(i)?i:[i]]));/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ue=(e,t)=>{const n=y.forwardRef(({className:r,...a},i)=>y.createElement(dte,{ref:i,iconNode:t,className:J$(`lucide-${lte(IM(e))}`,`lucide-${e}`,r),...a}));return n.displayName=IM(e),n};/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hte=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],mte=Ue("arrow-down",hte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pte=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],eB=Ue("arrow-left",pte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vte=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],tB=Ue("bot",vte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gte=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],nB=Ue("brain",gte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],sO=Ue("check",yte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bte=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],zh=Ue("chevron-down",bte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xte=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],wte=Ue("chevron-left",xte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ste=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],p0=Ue("chevron-right",Ste);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ete=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],_te=Ue("chevron-up",Ete);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const jte=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ote=Ue("chevrons-up-down",jte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cte=[["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"}]],nl=Ue("circle-alert",Cte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ate=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],rB=Ue("circle-check",Ate);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nte=[["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"}]],Tte=Ue("circle-x",Nte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Mte=Ue("clock",Pte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rte=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],v0=Ue("download",Rte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kte=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],Dte=Ue("eye-off",kte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ite=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Lte=Ue("eye",Ite);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zte=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],Ig=Ue("folder-kanban",zte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $te=[["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"}],["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"m9 13 3-3 3 3",key:"1pxg3c"}]],Bte=Ue("folder-up",$te);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ute=[["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"}]],Hte=Ue("folder",Ute);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fte=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],qte=Ue("house",Fte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Kte=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Vte=Ue("info",Kte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yte=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Xte=Ue("key-round",Yte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gte=[["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"}]],aB=Ue("layout-dashboard",Gte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Wte=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Qte=Ue("loader-circle",Wte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zte=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Jte=Ue("message-square",Zte);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ene=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],tne=Ue("monitor",ene);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nne=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],iB=Ue("moon",nne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rne=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],oB=Ue("octagon-x",rne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ane=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],ine=Ue("paperclip",ane);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const one=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],sne=Ue("pause",one);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lne=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],cne=Ue("pencil",lne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const une=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],lO=Ue("play",une);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fne=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],LE=Ue("plus",fne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dne=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],sB=Ue("save",dne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hne=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lB=Ue("search",hne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mne=[["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"}]],pne=Ue("send",mne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vne=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],gne=Ue("settings",vne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yne=[["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"}]],cB=Ue("sun",yne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const bne=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],xne=Ue("terminal",bne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wne=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Gf=Ue("trash-2",wne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sne=[["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"}]],Ene=Ue("triangle-alert",Sne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _ne=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],jne=Ue("upload",_ne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const One=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],uB=Ue("users",One);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cne=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],fB=Ue("wrench",Cne);/**
 * @license lucide-react v0.577.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ane=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cO=Ue("x",Ane);function Nne(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 Tne=e=>{switch(e){case"success":return Rne;case"info":return Dne;case"warning":return kne;case"error":return Ine;default:return null}},Pne=Array(12).fill(0),Mne=({visible:e,className:t})=>ye.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ye.createElement("div",{className:"sonner-spinner"},Pne.map((n,r)=>ye.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Rne=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),kne=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ye.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"})),Dne=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),Ine=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.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"})),Lne=ye.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"},ye.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ye.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),zne=()=>{const[e,t]=ye.useState(document.hidden);return ye.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let zE=1;class $ne{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...a}=t,i=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:zE++,s=this.toasts.find(u=>u.id===i),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),s?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...t,id:i,title:r}),{...u,...t,id:i,dismissible:c,title:r}):u):this.addToast({title:r,...a,dismissible:c,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let i=r!==void 0,s;const c=a.then(async f=>{if(s=["resolve",f],ye.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(Une(f)&&!f.ok){i=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,w=typeof d=="object"&&!ye.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...w})}else if(f instanceof Error){i=!1;const d=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,w=typeof d=="object"&&!ye.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...w})}else if(n.success!==void 0){i=!1;const d=typeof n.success=="function"?await n.success(f):n.success,p=typeof n.description=="function"?await n.description(f):n.description,w=typeof d=="object"&&!ye.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:p,...w})}}).catch(async f=>{if(s=["reject",f],n.error!==void 0){i=!1;const m=typeof n.error=="function"?await n.error(f):n.error,d=typeof n.description=="function"?await n.description(f):n.description,b=typeof m=="object"&&!ye.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:d,...b})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),u=()=>new Promise((f,m)=>c.then(()=>s[0]==="reject"?m(s[1]):f(s[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:u}:Object.assign(r,{unwrap:u})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||zE++;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 Rr=new $ne,Bne=(e,t)=>{const n=(t==null?void 0:t.id)||zE++;return Rr.addToast({title:e,...t,id:n}),n},Une=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Hne=Bne,Fne=()=>Rr.toasts,qne=()=>Rr.getActiveToasts(),mt=Object.assign(Hne,{success:Rr.success,info:Rr.info,warning:Rr.warning,error:Rr.error,custom:Rr.custom,message:Rr.message,promise:Rr.promise,dismiss:Rr.dismiss,loading:Rr.loading},{getHistory:Fne,getToasts:qne});Nne("[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 Rv(e){return e.label!==void 0}const Kne=3,Vne="24px",Yne="16px",LM=4e3,Xne=356,Gne=14,Wne=45,Qne=200;function di(...e){return e.filter(Boolean).join(" ")}function Zne(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Jne=e=>{var t,n,r,a,i,s,c,u,f;const{invert:m,toast:d,unstyled:p,interacting:b,setHeights:w,visibleToasts:x,heights:S,index:E,toasts:C,expanded:O,removeToast:A,defaultRichColors:T,closeButton:N,style:P,cancelButtonStyle:k,actionButtonStyle:D,className:K="",descriptionClassName:B="",duration:I,position:W,gap:z,expandByDefault:V,classNames:R,icons:H,closeButtonAriaLabel:q="Close toast"}=e,[F,Y]=ye.useState(null),[$,L]=ye.useState(null),[G,Z]=ye.useState(!1),[J,se]=ye.useState(!1),[ie,re]=ye.useState(!1),[ee,le]=ye.useState(!1),[me,ne]=ye.useState(!1),[ge,be]=ye.useState(0),[Ie,Pe]=ye.useState(0),Ve=ye.useRef(d.duration||I||LM),Xt=ye.useRef(null),dt=ye.useRef(null),Jn=E===0,Sr=E+1<=x,Lt=d.type,Fn=d.dismissible!==!1,we=d.className||"",rn=d.descriptionClassName||"",Ct=ye.useMemo(()=>S.findIndex(Be=>Be.toastId===d.id)||0,[S,d.id]),ia=ye.useMemo(()=>{var Be;return(Be=d.closeButton)!=null?Be:N},[d.closeButton,N]),ai=ye.useMemo(()=>d.duration||I||LM,[d.duration,I]),gl=ye.useRef(0),zr=ye.useRef(0),Qc=ye.useRef(0),ii=ye.useRef(null),[zi,qn]=W.split("-"),$r=ye.useMemo(()=>S.reduce((Be,At,sn)=>sn>=Ct?Be:Be+At.height,0),[S,Ct]),Pn=zne(),ld=d.invert||m,yl=Lt==="loading";zr.current=ye.useMemo(()=>Ct*z+$r,[Ct,$r]),ye.useEffect(()=>{Ve.current=ai},[ai]),ye.useEffect(()=>{Z(!0)},[]),ye.useEffect(()=>{const Be=dt.current;if(Be){const At=Be.getBoundingClientRect().height;return Pe(At),w(sn=>[{toastId:d.id,height:At,position:d.position},...sn]),()=>w(sn=>sn.filter(Mn=>Mn.toastId!==d.id))}},[w,d.id]),ye.useLayoutEffect(()=>{if(!G)return;const Be=dt.current,At=Be.style.height;Be.style.height="auto";const sn=Be.getBoundingClientRect().height;Be.style.height=At,Pe(sn),w(Mn=>Mn.find(Pt=>Pt.toastId===d.id)?Mn.map(Pt=>Pt.toastId===d.id?{...Pt,height:sn}:Pt):[{toastId:d.id,height:sn,position:d.position},...Mn])},[G,d.title,d.description,w,d.id,d.jsx,d.action,d.cancel]);const oa=ye.useCallback(()=>{se(!0),be(zr.current),w(Be=>Be.filter(At=>At.toastId!==d.id)),setTimeout(()=>{A(d)},Qne)},[d,A,w,zr]);ye.useEffect(()=>{if(d.promise&&Lt==="loading"||d.duration===1/0||d.type==="loading")return;let Be;return O||b||Pn?(()=>{if(Qc.current<gl.current){const Mn=new Date().getTime()-gl.current;Ve.current=Ve.current-Mn}Qc.current=new Date().getTime()})():(()=>{Ve.current!==1/0&&(gl.current=new Date().getTime(),Be=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),oa()},Ve.current))})(),()=>clearTimeout(Be)},[O,b,d,Lt,Pn,oa]),ye.useEffect(()=>{d.delete&&(oa(),d.onDismiss==null||d.onDismiss.call(d,d))},[oa,d.delete]);function Xo(){var Be;if(H!=null&&H.loading){var At;return ye.createElement("div",{className:di(R==null?void 0:R.loader,d==null||(At=d.classNames)==null?void 0:At.loader,"sonner-loader"),"data-visible":Lt==="loading"},H.loading)}return ye.createElement(Mne,{className:di(R==null?void 0:R.loader,d==null||(Be=d.classNames)==null?void 0:Be.loader),visible:Lt==="loading"})}const Go=d.icon||(H==null?void 0:H[Lt])||Tne(Lt);var $i,sa;return ye.createElement("li",{tabIndex:0,ref:dt,className:di(K,we,R==null?void 0:R.toast,d==null||(t=d.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[Lt],d==null||(n=d.classNames)==null?void 0:n[Lt]),"data-sonner-toast":"","data-rich-colors":($i=d.richColors)!=null?$i:T,"data-styled":!(d.jsx||d.unstyled||p),"data-mounted":G,"data-promise":!!d.promise,"data-swiped":me,"data-removed":J,"data-visible":Sr,"data-y-position":zi,"data-x-position":qn,"data-index":E,"data-front":Jn,"data-swiping":ie,"data-dismissible":Fn,"data-type":Lt,"data-invert":ld,"data-swipe-out":ee,"data-swipe-direction":$,"data-expanded":!!(O||V&&G),"data-testid":d.testId,style:{"--index":E,"--toasts-before":E,"--z-index":C.length-E,"--offset":`${J?ge:zr.current}px`,"--initial-height":V?"auto":`${Ie}px`,...P,...d.style},onDragEnd:()=>{re(!1),Y(null),ii.current=null},onPointerDown:Be=>{Be.button!==2&&(yl||!Fn||(Xt.current=new Date,be(zr.current),Be.target.setPointerCapture(Be.pointerId),Be.target.tagName!=="BUTTON"&&(re(!0),ii.current={x:Be.clientX,y:Be.clientY})))},onPointerUp:()=>{var Be,At,sn;if(ee||!Fn)return;ii.current=null;const Mn=Number(((Be=dt.current)==null?void 0:Be.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),oi=Number(((At=dt.current)==null?void 0:At.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Pt=new Date().getTime()-((sn=Xt.current)==null?void 0:sn.getTime()),er=F==="x"?Mn:oi,Bi=Math.abs(er)/Pt;if(Math.abs(er)>=Wne||Bi>.11){be(zr.current),d.onDismiss==null||d.onDismiss.call(d,d),L(F==="x"?Mn>0?"right":"left":oi>0?"down":"up"),oa(),le(!0);return}else{var tr,nr;(tr=dt.current)==null||tr.style.setProperty("--swipe-amount-x","0px"),(nr=dt.current)==null||nr.style.setProperty("--swipe-amount-y","0px")}ne(!1),re(!1),Y(null)},onPointerMove:Be=>{var At,sn,Mn;if(!ii.current||!Fn||((At=window.getSelection())==null?void 0:At.toString().length)>0)return;const Pt=Be.clientY-ii.current.y,er=Be.clientX-ii.current.x;var Bi;const tr=(Bi=e.swipeDirections)!=null?Bi:Zne(W);!F&&(Math.abs(er)>1||Math.abs(Pt)>1)&&Y(Math.abs(er)>Math.abs(Pt)?"x":"y");let nr={x:0,y:0};const Wo=Br=>1/(1.5+Math.abs(Br)/20);if(F==="y"){if(tr.includes("top")||tr.includes("bottom"))if(tr.includes("top")&&Pt<0||tr.includes("bottom")&&Pt>0)nr.y=Pt;else{const Br=Pt*Wo(Pt);nr.y=Math.abs(Br)<Math.abs(Pt)?Br:Pt}}else if(F==="x"&&(tr.includes("left")||tr.includes("right")))if(tr.includes("left")&&er<0||tr.includes("right")&&er>0)nr.x=er;else{const Br=er*Wo(er);nr.x=Math.abs(Br)<Math.abs(er)?Br:er}(Math.abs(nr.x)>0||Math.abs(nr.y)>0)&&ne(!0),(sn=dt.current)==null||sn.style.setProperty("--swipe-amount-x",`${nr.x}px`),(Mn=dt.current)==null||Mn.style.setProperty("--swipe-amount-y",`${nr.y}px`)}},ia&&!d.jsx&&Lt!=="loading"?ye.createElement("button",{"aria-label":q,"data-disabled":yl,"data-close-button":!0,onClick:yl||!Fn?()=>{}:()=>{oa(),d.onDismiss==null||d.onDismiss.call(d,d)},className:di(R==null?void 0:R.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(sa=H==null?void 0:H.close)!=null?sa:Lne):null,(Lt||d.icon||d.promise)&&d.icon!==null&&((H==null?void 0:H[Lt])!==null||d.icon)?ye.createElement("div",{"data-icon":"",className:di(R==null?void 0:R.icon,d==null||(a=d.classNames)==null?void 0:a.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Xo():null,d.type!=="loading"?Go:null):null,ye.createElement("div",{"data-content":"",className:di(R==null?void 0:R.content,d==null||(i=d.classNames)==null?void 0:i.content)},ye.createElement("div",{"data-title":"",className:di(R==null?void 0:R.title,d==null||(s=d.classNames)==null?void 0:s.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?ye.createElement("div",{"data-description":"",className:di(B,rn,R==null?void 0:R.description,d==null||(c=d.classNames)==null?void 0:c.description)},typeof d.description=="function"?d.description():d.description):null),ye.isValidElement(d.cancel)?d.cancel:d.cancel&&Rv(d.cancel)?ye.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||k,onClick:Be=>{Rv(d.cancel)&&Fn&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Be),oa())},className:di(R==null?void 0:R.cancelButton,d==null||(u=d.classNames)==null?void 0:u.cancelButton)},d.cancel.label):null,ye.isValidElement(d.action)?d.action:d.action&&Rv(d.action)?ye.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||D,onClick:Be=>{Rv(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Be),!Be.defaultPrevented&&oa())},className:di(R==null?void 0:R.actionButton,d==null||(f=d.classNames)==null?void 0:f.actionButton)},d.action.label):null)};function zM(){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 ere(e,t){const n={};return[e,t].forEach((r,a)=>{const i=a===1,s=i?"--mobile-offset":"--offset",c=i?Yne:Vne;function u(f){["top","right","bottom","left"].forEach(m=>{n[`${s}-${m}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?u(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${s}-${f}`]=c:n[`${s}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):u(c)}),n}const tre=ye.forwardRef(function(t,n){const{id:r,invert:a,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:c,closeButton:u,className:f,offset:m,mobileOffset:d,theme:p="light",richColors:b,duration:w,style:x,visibleToasts:S=Kne,toastOptions:E,dir:C=zM(),gap:O=Gne,icons:A,containerAriaLabel:T="Notifications"}=t,[N,P]=ye.useState([]),k=ye.useMemo(()=>r?N.filter(G=>G.toasterId===r):N.filter(G=>!G.toasterId),[N,r]),D=ye.useMemo(()=>Array.from(new Set([i].concat(k.filter(G=>G.position).map(G=>G.position)))),[k,i]),[K,B]=ye.useState([]),[I,W]=ye.useState(!1),[z,V]=ye.useState(!1),[R,H]=ye.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=ye.useRef(null),F=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),Y=ye.useRef(null),$=ye.useRef(!1),L=ye.useCallback(G=>{P(Z=>{var J;return(J=Z.find(se=>se.id===G.id))!=null&&J.delete||Rr.dismiss(G.id),Z.filter(({id:se})=>se!==G.id)})},[]);return ye.useEffect(()=>Rr.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{P(Z=>Z.map(J=>J.id===G.id?{...J,delete:!0}:J))});return}setTimeout(()=>{_z.flushSync(()=>{P(Z=>{const J=Z.findIndex(se=>se.id===G.id);return J!==-1?[...Z.slice(0,J),{...Z[J],...G},...Z.slice(J+1)]:[G,...Z]})})})}),[N]),ye.useEffect(()=>{if(p!=="system"){H(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:Z})=>{H(Z?"dark":"light")})}catch{G.addListener(({matches:J})=>{try{H(J?"dark":"light")}catch(se){console.error(se)}})}},[p]),ye.useEffect(()=>{N.length<=1&&W(!1)},[N]),ye.useEffect(()=>{const G=Z=>{var J;if(s.every(re=>Z[re]||Z.code===re)){var ie;W(!0),(ie=q.current)==null||ie.focus()}Z.code==="Escape"&&(document.activeElement===q.current||(J=q.current)!=null&&J.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[s]),ye.useEffect(()=>{if(q.current)return()=>{Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null,$.current=!1)}},[q.current]),ye.createElement("section",{ref:n,"aria-label":`${T} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((G,Z)=>{var J;const[se,ie]=G.split("-");return k.length?ye.createElement("ol",{key:G,dir:C==="auto"?zM():C,tabIndex:-1,ref:q,className:f,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":se,"data-x-position":ie,style:{"--front-toast-height":`${((J=K[0])==null?void 0:J.height)||0}px`,"--width":`${Xne}px`,"--gap":`${O}px`,...x,...ere(m,d)},onBlur:re=>{$.current&&!re.currentTarget.contains(re.relatedTarget)&&($.current=!1,Y.current&&(Y.current.focus({preventScroll:!0}),Y.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||$.current||($.current=!0,Y.current=re.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{z||W(!1)},onDragEnd:()=>W(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},k.filter(re=>!re.position&&Z===0||re.position===G).map((re,ee)=>{var le,me;return ye.createElement(Jne,{key:re.id,icons:A,index:ee,toast:re,defaultRichColors:b,duration:(le=E==null?void 0:E.duration)!=null?le:w,className:E==null?void 0:E.className,descriptionClassName:E==null?void 0:E.descriptionClassName,invert:a,visibleToasts:S,closeButton:(me=E==null?void 0:E.closeButton)!=null?me:u,interacting:z,position:G,style:E==null?void 0:E.style,unstyled:E==null?void 0:E.unstyled,classNames:E==null?void 0:E.classNames,cancelButtonStyle:E==null?void 0:E.cancelButtonStyle,actionButtonStyle:E==null?void 0:E.actionButtonStyle,closeButtonAriaLabel:E==null?void 0:E.closeButtonAriaLabel,removeToast:L,toasts:k.filter(ne=>ne.position==re.position),heights:K.filter(ne=>ne.position==re.position),setHeights:B,expandByDefault:c,gap:O,expanded:I,swipeDirections:t.swipeDirections})})):null}))}),nre=({...e})=>{const{theme:t="system"}=gj();return v.jsx(tre,{theme:t,className:"toaster group",icons:{success:v.jsx(rB,{className:"size-4"}),info:v.jsx(Vte,{className:"size-4"}),warning:v.jsx(Ene,{className:"size-4"}),error:v.jsx(oB,{className:"size-4"}),loading:v.jsx(Qte,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},rre=new nX({defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,refetchOnWindowFocus:!0,retry:1}}}),dB="/api";class hB extends Error{constructor(t,n,r){super(`${t} ${n}`),this.status=t,this.statusText=n,this.body=r,this.name="ApiError"}}async function ah(e,t){const n=`${dB}${e}`,r=new AbortController,a=setTimeout(()=>r.abort(),3e4);let i;try{i=await fetch(n,{...t,signal:(t==null?void 0:t.signal)??r.signal,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}})}finally{clearTimeout(a)}if(!i.ok){const s=await i.json().catch(()=>null);throw new hB(i.status,i.statusText,s)}return i.json()}async function are(e,t){const n=`${dB}${e}`,r=new AbortController,a=setTimeout(()=>r.abort(),6e4);let i;try{i=await fetch(n,{method:"POST",body:t,signal:r.signal})}finally{clearTimeout(a)}if(!i.ok){const s=await i.json().catch(()=>null);throw new hB(i.status,i.statusText,s)}return i.json()}const He={get:e=>ah(e),post:(e,t)=>ah(e,{method:"POST",body:t!=null?JSON.stringify(t):void 0}),put:(e,t)=>ah(e,{method:"PUT",body:JSON.stringify(t)}),patch:(e,t)=>ah(e,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>ah(e,{method:"DELETE"}),upload:(e,t)=>{const n=new FormData;return t.forEach(r=>n.append("files",r)),are(e,n)}},Ye={projects:{all:["projects"],detail:e=>["projects",e],config:e=>["projects",e,"config"],sessions:e=>["projects",e,"sessions"],files:e=>["projects",e,"files"],stats:(e,t)=>["projects",e,"stats",t],resources:e=>["projects",e,"resources"],resourceDetail:(e,t,n)=>["projects",e,"resources",t,n],resourceConfig:(e,t,n)=>["projects",e,"resources",t,n,"config"]},sessions:{all:e=>["sessions",e],detail:(e,t)=>["sessions",e,t],running:()=>["sessions",{status:"running"}]},roles:{all:["roles"]},config:{global:["config","global"]},registry:{list:e=>["registry",e],detail:(e,t)=>["registry",e,t],config:(e,t)=>["registry",e,t,"config"],validate:e=>["registry","agents",e,"validate"]},schedules:{all:["schedules"],detail:e=>["schedules",e],history:e=>["schedules",e,"history"]}};function Wf(){return Bn({queryKey:Ye.projects.all,queryFn:()=>He.get("/projects")})}function mB(e,t){return Bn({queryKey:Ye.projects.detail(e),queryFn:()=>He.get(`/projects/${e}`),enabled:t==null?void 0:t.enabled})}function pB(e){return Bn({queryKey:Ye.projects.files(e),queryFn:()=>He.get(`/projects/${e}/files`)})}function vB(e,t){return Bn({queryKey:Ye.projects.config(e),queryFn:()=>He.get(`/projects/${e}/config`),enabled:t==null?void 0:t.enabled})}const ire=500;function ore({onCommandPalette:e,onShortcutsHelp:t}){const n=qf(),r=y.useRef(null),a=y.useRef(void 0);y.useEffect(()=>{function i(s){const c=s.target;if(!(c.tagName==="INPUT"||c.tagName==="TEXTAREA"||c.isContentEditable)){if((s.metaKey||s.ctrlKey)&&s.key==="k"){s.preventDefault(),e();return}if(!(s.metaKey||s.ctrlKey||s.altKey)){if(s.key==="?"){s.preventDefault(),t();return}if(r.current==="g"){if(r.current=null,clearTimeout(a.current),s.key==="d"){s.preventDefault(),n("/");return}if(s.key==="p"){s.preventDefault(),n("/projects");return}}if(s.key==="g"){r.current="g",a.current=setTimeout(()=>{r.current=null},ire);return}}}}return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),clearTimeout(a.current)}},[n,e,t])}function gB(e){const t=e?"?"+new URLSearchParams(e).toString():"";return Bn({queryKey:Ye.sessions.all(e),queryFn:()=>He.get(`/sessions${t}`)})}function uO(){return gB({status:"running",per_page:"50"})}function sre(){return gB({per_page:"10"})}function lre(e,t=1,n=20){return Bn({queryKey:[...Ye.projects.sessions(e),t,n],queryFn:()=>He.get(`/projects/${e}/sessions?page=${t}&per_page=${n}`)})}function cre(e,t,n){return Bn({queryKey:Ye.sessions.detail(e,t),queryFn:()=>He.get(`/projects/${e}/sessions/${t}`),...n})}var $M=1,ure=.9,fre=.8,dre=.17,a1=.1,i1=.999,hre=.9999,mre=.99,pre=/[\\\/_+.#"@\[\(\{&]/,vre=/[\\\/_+.#"@\[\(\{&]/g,gre=/[\s-]/,yB=/[\s-]/g;function $E(e,t,n,r,a,i,s){if(i===t.length)return a===e.length?$M:mre;var c=`${a},${i}`;if(s[c]!==void 0)return s[c];for(var u=r.charAt(i),f=n.indexOf(u,a),m=0,d,p,b,w;f>=0;)d=$E(e,t,n,r,f+1,i+1,s),d>m&&(f===a?d*=$M:pre.test(e.charAt(f-1))?(d*=fre,b=e.slice(a,f-1).match(vre),b&&a>0&&(d*=Math.pow(i1,b.length))):gre.test(e.charAt(f-1))?(d*=ure,w=e.slice(a,f-1).match(yB),w&&a>0&&(d*=Math.pow(i1,w.length))):(d*=dre,a>0&&(d*=Math.pow(i1,f-a))),e.charAt(f)!==t.charAt(i)&&(d*=hre)),(d<a1&&n.charAt(f-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(f-1)!==r.charAt(i))&&(p=$E(e,t,n,r,f+1,i+2,s),p*a1>d&&(d=p*a1)),d>m&&(m=d),f=n.indexOf(u,f+1);return s[c]=m,m}function BM(e){return e.toLowerCase().replace(yB," ")}function yre(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,$E(e,t,BM(e),BM(t),0,0,{})}var ih='[cmdk-group=""]',o1='[cmdk-group-items=""]',bre='[cmdk-group-heading=""]',bB='[cmdk-item=""]',UM=`${bB}:not([aria-disabled="true"])`,BE="cmdk-item-select",Ku="data-value",xre=(e,t,n)=>yre(e,t,n),xB=y.createContext(void 0),Cm=()=>y.useContext(xB),wB=y.createContext(void 0),fO=()=>y.useContext(wB),SB=y.createContext(void 0),EB=y.forwardRef((e,t)=>{let n=Vu(()=>{var L,G;return{search:"",value:(G=(L=e.value)!=null?L:e.defaultValue)!=null?G:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Vu(()=>new Set),a=Vu(()=>new Map),i=Vu(()=>new Map),s=Vu(()=>new Set),c=_B(e),{label:u,children:f,value:m,onValueChange:d,filter:p,shouldFilter:b,loop:w,disablePointerSelection:x=!1,vimBindings:S=!0,...E}=e,C=zn(),O=zn(),A=zn(),T=y.useRef(null),N=Pre();wc(()=>{if(m!==void 0){let L=m.trim();n.current.value=L,P.emit()}},[m]),wc(()=>{N(6,W)},[]);let P=y.useMemo(()=>({subscribe:L=>(s.current.add(L),()=>s.current.delete(L)),snapshot:()=>n.current,setState:(L,G,Z)=>{var J,se,ie,re;if(!Object.is(n.current[L],G)){if(n.current[L]=G,L==="search")I(),K(),N(1,B);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ee=document.getElementById(A);ee?ee.focus():(J=document.getElementById(C))==null||J.focus()}if(N(7,()=>{var ee;n.current.selectedItemId=(ee=z())==null?void 0:ee.id,P.emit()}),Z||N(5,W),((se=c.current)==null?void 0:se.value)!==void 0){let ee=G??"";(re=(ie=c.current).onValueChange)==null||re.call(ie,ee);return}}P.emit()}},emit:()=>{s.current.forEach(L=>L())}}),[]),k=y.useMemo(()=>({value:(L,G,Z)=>{var J;G!==((J=i.current.get(L))==null?void 0:J.value)&&(i.current.set(L,{value:G,keywords:Z}),n.current.filtered.items.set(L,D(G,Z)),N(2,()=>{K(),P.emit()}))},item:(L,G)=>(r.current.add(L),G&&(a.current.has(G)?a.current.get(G).add(L):a.current.set(G,new Set([L]))),N(3,()=>{I(),K(),n.current.value||B(),P.emit()}),()=>{i.current.delete(L),r.current.delete(L),n.current.filtered.items.delete(L);let Z=z();N(4,()=>{I(),(Z==null?void 0:Z.getAttribute("id"))===L&&B(),P.emit()})}),group:L=>(a.current.has(L)||a.current.set(L,new Set),()=>{i.current.delete(L),a.current.delete(L)}),filter:()=>c.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:C,inputId:A,labelId:O,listInnerRef:T}),[]);function D(L,G){var Z,J;let se=(J=(Z=c.current)==null?void 0:Z.filter)!=null?J:xre;return L?se(L,n.current.search,G):0}function K(){if(!n.current.search||c.current.shouldFilter===!1)return;let L=n.current.filtered.items,G=[];n.current.filtered.groups.forEach(J=>{let se=a.current.get(J),ie=0;se.forEach(re=>{let ee=L.get(re);ie=Math.max(ee,ie)}),G.push([J,ie])});let Z=T.current;V().sort((J,se)=>{var ie,re;let ee=J.getAttribute("id"),le=se.getAttribute("id");return((ie=L.get(le))!=null?ie:0)-((re=L.get(ee))!=null?re:0)}).forEach(J=>{let se=J.closest(o1);se?se.appendChild(J.parentElement===se?J:J.closest(`${o1} > *`)):Z.appendChild(J.parentElement===Z?J:J.closest(`${o1} > *`))}),G.sort((J,se)=>se[1]-J[1]).forEach(J=>{var se;let ie=(se=T.current)==null?void 0:se.querySelector(`${ih}[${Ku}="${encodeURIComponent(J[0])}"]`);ie==null||ie.parentElement.appendChild(ie)})}function B(){let L=V().find(Z=>Z.getAttribute("aria-disabled")!=="true"),G=L==null?void 0:L.getAttribute(Ku);P.setState("value",G||void 0)}function I(){var L,G,Z,J;if(!n.current.search||c.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let se=0;for(let ie of r.current){let re=(G=(L=i.current.get(ie))==null?void 0:L.value)!=null?G:"",ee=(J=(Z=i.current.get(ie))==null?void 0:Z.keywords)!=null?J:[],le=D(re,ee);n.current.filtered.items.set(ie,le),le>0&&se++}for(let[ie,re]of a.current)for(let ee of re)if(n.current.filtered.items.get(ee)>0){n.current.filtered.groups.add(ie);break}n.current.filtered.count=se}function W(){var L,G,Z;let J=z();J&&(((L=J.parentElement)==null?void 0:L.firstChild)===J&&((Z=(G=J.closest(ih))==null?void 0:G.querySelector(bre))==null||Z.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function z(){var L;return(L=T.current)==null?void 0:L.querySelector(`${bB}[aria-selected="true"]`)}function V(){var L;return Array.from(((L=T.current)==null?void 0:L.querySelectorAll(UM))||[])}function R(L){let G=V()[L];G&&P.setState("value",G.getAttribute(Ku))}function H(L){var G;let Z=z(),J=V(),se=J.findIndex(re=>re===Z),ie=J[se+L];(G=c.current)!=null&&G.loop&&(ie=se+L<0?J[J.length-1]:se+L===J.length?J[0]:J[se+L]),ie&&P.setState("value",ie.getAttribute(Ku))}function q(L){let G=z(),Z=G==null?void 0:G.closest(ih),J;for(;Z&&!J;)Z=L>0?Nre(Z,ih):Tre(Z,ih),J=Z==null?void 0:Z.querySelector(UM);J?P.setState("value",J.getAttribute(Ku)):H(L)}let F=()=>R(V().length-1),Y=L=>{L.preventDefault(),L.metaKey?F():L.altKey?q(1):H(1)},$=L=>{L.preventDefault(),L.metaKey?R(0):L.altKey?q(-1):H(-1)};return y.createElement(ke.div,{ref:t,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:L=>{var G;(G=E.onKeyDown)==null||G.call(E,L);let Z=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||Z))switch(L.key){case"n":case"j":{S&&L.ctrlKey&&Y(L);break}case"ArrowDown":{Y(L);break}case"p":case"k":{S&&L.ctrlKey&&$(L);break}case"ArrowUp":{$(L);break}case"Home":{L.preventDefault(),R(0);break}case"End":{L.preventDefault(),F();break}case"Enter":{L.preventDefault();let J=z();if(J){let se=new Event(BE);J.dispatchEvent(se)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:Rre},u),g0(e,L=>y.createElement(wB.Provider,{value:P},y.createElement(xB.Provider,{value:k},L))))}),wre=y.forwardRef((e,t)=>{var n,r;let a=zn(),i=y.useRef(null),s=y.useContext(SB),c=Cm(),u=_B(e),f=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;wc(()=>{if(!f)return c.item(a,s==null?void 0:s.id)},[f]);let m=jB(a,i,[e.value,e.children,i],e.keywords),d=fO(),p=rl(N=>N.value&&N.value===m.current),b=rl(N=>f||c.filter()===!1?!0:N.search?N.filtered.items.get(a)>0:!0);y.useEffect(()=>{let N=i.current;if(!(!N||e.disabled))return N.addEventListener(BE,w),()=>N.removeEventListener(BE,w)},[b,e.onSelect,e.disabled]);function w(){var N,P;x(),(P=(N=u.current).onSelect)==null||P.call(N,m.current)}function x(){d.setState("value",m.current,!0)}if(!b)return null;let{disabled:S,value:E,onSelect:C,forceMount:O,keywords:A,...T}=e;return y.createElement(ke.div,{ref:No(i,t),...T,id:a,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!p,"data-disabled":!!S,"data-selected":!!p,onPointerMove:S||c.getDisablePointerSelection()?void 0:x,onClick:S?void 0:w},e.children)}),Sre=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...i}=e,s=zn(),c=y.useRef(null),u=y.useRef(null),f=zn(),m=Cm(),d=rl(b=>a||m.filter()===!1?!0:b.search?b.filtered.groups.has(s):!0);wc(()=>m.group(s),[]),jB(s,c,[e.value,e.heading,u]);let p=y.useMemo(()=>({id:s,forceMount:a}),[a]);return y.createElement(ke.div,{ref:No(c,t),...i,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},n&&y.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),g0(e,b=>y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},y.createElement(SB.Provider,{value:p},b))))}),Ere=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=y.useRef(null),i=rl(s=>!s.search);return!n&&!i?null:y.createElement(ke.div,{ref:No(a,t),...r,"cmdk-separator":"",role:"separator"})}),_re=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,i=fO(),s=rl(f=>f.search),c=rl(f=>f.selectedItemId),u=Cm();return y.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),y.createElement(ke.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":c,id:u.inputId,type:"text",value:a?e.value:s,onChange:f=>{a||i.setState("search",f.target.value),n==null||n(f.target.value)}})}),jre=y.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,i=y.useRef(null),s=y.useRef(null),c=rl(f=>f.selectedItemId),u=Cm();return y.useEffect(()=>{if(s.current&&i.current){let f=s.current,m=i.current,d,p=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let b=f.offsetHeight;m.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return p.observe(f),()=>{cancelAnimationFrame(d),p.unobserve(f)}}},[]),y.createElement(ke.div,{ref:No(i,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:u.listId},g0(e,f=>y.createElement("div",{ref:No(s,u.listInnerRef),"cmdk-list-sizer":""},f)))}),Ore=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:i,container:s,...c}=e;return y.createElement(Aj,{open:n,onOpenChange:r},y.createElement(Nj,{container:s},y.createElement(Tj,{"cmdk-overlay":"",className:a}),y.createElement(Pj,{"aria-label":e.label,"cmdk-dialog":"",className:i},y.createElement(EB,{ref:t,...c}))))}),Cre=y.forwardRef((e,t)=>rl(n=>n.filtered.count===0)?y.createElement(ke.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Are=y.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...i}=e;return y.createElement(ke.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},g0(e,s=>y.createElement("div",{"aria-hidden":!0},s)))}),Qf=Object.assign(EB,{List:jre,Item:wre,Input:_re,Group:Sre,Separator:Ere,Dialog:Ore,Empty:Cre,Loading:Are});function Nre(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Tre(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function _B(e){let t=y.useRef(e);return wc(()=>{t.current=e}),t}var wc=typeof window>"u"?y.useEffect:y.useLayoutEffect;function Vu(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function rl(e){let t=fO(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function jB(e,t,n,r=[]){let a=y.useRef(),i=Cm();return wc(()=>{var s;let c=(()=>{var f;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(f=m.current.textContent)==null?void 0:f.trim():a.current}})(),u=r.map(f=>f.trim());i.value(e,c,u),(s=t.current)==null||s.setAttribute(Ku,c),a.current=c}),a}var Pre=()=>{let[e,t]=y.useState(),n=Vu(()=>new Map);return wc(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function Mre(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function g0({asChild:e,children:t},n){return e&&y.isValidElement(t)?y.cloneElement(Mre(t),{ref:t.ref},n(t.props.children)):n(t)}var Rre={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const HM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,FM=st,y0=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return FM(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,s=Object.keys(a).map(f=>{const m=n==null?void 0:n[f],d=i==null?void 0:i[f];if(m===null)return null;const p=HM(m)||HM(d);return a[f][p]}),c=n&&Object.entries(n).reduce((f,m)=>{let[d,p]=m;return p===void 0||(f[d]=p),f},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:d,className:p,...b}=m;return Object.entries(b).every(w=>{let[x,S]=w;return Array.isArray(S)?S.includes({...i,...c}[x]):{...i,...c}[x]===S})?[...f,d,p]:f},[]);return FM(e,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},kre=y0("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Te({className:e,variant:t="default",size:n="default",asChild:r=!1,...a}){const i=r?yj:"button";return v.jsx(i,{"data-slot":"button","data-variant":t,"data-size":n,className:Oe(kre({variant:t,size:n,className:e})),...a})}function $c({...e}){return v.jsx(Aj,{"data-slot":"dialog",...e})}function Dre({...e}){return v.jsx(Nj,{"data-slot":"dialog-portal",...e})}function Ire({className:e,...t}){return v.jsx(Tj,{"data-slot":"dialog-overlay",className:Oe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function Bc({className:e,children:t,showCloseButton:n=!0,...r}){return v.jsxs(Dre,{"data-slot":"dialog-portal",children:[v.jsx(Ire,{}),v.jsxs(Pj,{"data-slot":"dialog-content",className:Oe("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...r,children:[t,n&&v.jsxs(Mj,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[v.jsx(cO,{}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Uc({className:e,...t}){return v.jsx("div",{"data-slot":"dialog-header",className:Oe("flex flex-col gap-2 text-center sm:text-left",e),...t})}function OB({className:e,showCloseButton:t=!1,children:n,...r}){return v.jsxs("div",{"data-slot":"dialog-footer",className:Oe("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&v.jsx(Mj,{asChild:!0,children:v.jsx(Te,{variant:"outline",children:"Close"})})]})}function Hc({className:e,...t}){return v.jsx(S4,{"data-slot":"dialog-title",className:Oe("text-lg leading-none font-semibold",e),...t})}function CB({className:e,...t}){return v.jsx(E4,{"data-slot":"dialog-description",className:Oe("text-sm text-muted-foreground",e),...t})}function Lre({className:e,...t}){return v.jsx(Qf,{"data-slot":"command",className:Oe("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})}function zre({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:a=!0,...i}){return v.jsxs($c,{...i,children:[v.jsxs(Uc,{className:"sr-only",children:[v.jsx(Hc,{children:e}),v.jsx(CB,{children:t})]}),v.jsx(Bc,{className:Oe("overflow-hidden p-0",r),showCloseButton:a,children:v.jsx(Lre,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[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:n})})]})}function $re({className:e,...t}){return v.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[v.jsx(lB,{className:"size-4 shrink-0 opacity-50"}),v.jsx(Qf.Input,{"data-slot":"command-input",className:Oe("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Bre({className:e,...t}){return v.jsx(Qf.List,{"data-slot":"command-list",className:Oe("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Ure({...e}){return v.jsx(Qf.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function oh({className:e,...t}){return v.jsx(Qf.Group,{"data-slot":"command-group",className:Oe("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})}function Ia({className:e,...t}){return v.jsx(Qf.Item,{"data-slot":"command-item",className:Oe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...t})}function qM({className:e,...t}){return v.jsx("span",{"data-slot":"command-shortcut",className:Oe("ml-auto text-xs tracking-widest text-muted-foreground",e),...t})}function Hre({open:e,onOpenChange:t}){var f;const n=qf(),{setTheme:r}=gj(),a=Wf(),i=uO(),s=a.data??[],c=((f=i.data)==null?void 0:f.items)??[],u=m=>{t(!1),n(m)};return v.jsxs(zre,{open:e,onOpenChange:t,showCloseButton:!1,children:[v.jsx($re,{placeholder:"Type a command or search..."}),v.jsxs(Bre,{children:[v.jsx(Ure,{children:"No results found."}),v.jsxs(oh,{heading:"Navigation",children:[v.jsxs(Ia,{onSelect:()=>u("/"),children:[v.jsx(aB,{}),"Dashboard",v.jsx(qM,{children:"G D"})]}),v.jsxs(Ia,{onSelect:()=>u("/projects"),children:[v.jsx(Ig,{}),"Projects",v.jsx(qM,{children:"G P"})]})]}),s.length>0&&v.jsx(oh,{heading:"Projects",children:s.map(m=>v.jsxs(Ia,{onSelect:()=>u(`/projects/${m.id}`),children:[v.jsx(Ig,{}),m.display_name]},m.id))}),c.length>0&&v.jsx(oh,{heading:"Running Sessions",children:c.map(m=>v.jsxs(Ia,{onSelect:()=>u(`/projects/${m.project_id}/sessions/${m.run_id}`),children:[v.jsx(lO,{}),m.role," (",m.run_id.slice(0,8),")"]},m.run_id))}),v.jsxs(oh,{heading:"Resources",children:[v.jsxs(Ia,{onSelect:()=>u("/resources/roles"),children:[v.jsx(uB,{}),"Roles"]}),v.jsxs(Ia,{onSelect:()=>u("/resources/skills"),children:[v.jsx(fB,{}),"Skills"]}),v.jsxs(Ia,{onSelect:()=>u("/resources/agents"),children:[v.jsx(tB,{}),"Agents"]}),v.jsxs(Ia,{onSelect:()=>u("/resources/memories"),children:[v.jsx(nB,{}),"Memory"]})]}),v.jsxs(oh,{heading:"Theme",children:[v.jsxs(Ia,{onSelect:()=>{r("light"),t(!1)},children:[v.jsx(cB,{}),"Light"]}),v.jsxs(Ia,{onSelect:()=>{r("dark"),t(!1)},children:[v.jsx(iB,{}),"Dark"]}),v.jsxs(Ia,{onSelect:()=>{r("system"),t(!1)},children:[v.jsx(tne,{}),"System"]})]})]})]})}const Fre=[{keys:["⌘","K"],description:"Open command palette"},{keys:["G","D"],description:"Go to Dashboard"},{keys:["G","P"],description:"Go to Projects"},{keys:["?"],description:"Show keyboard shortcuts"}];function qre({open:e,onOpenChange:t}){return v.jsx($c,{open:e,onOpenChange:t,children:v.jsxs(Bc,{className:"max-w-sm",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:"Keyboard Shortcuts"})}),v.jsx("div",{className:"space-y-2",children:Fre.map(n=>v.jsxs("div",{className:"flex items-center justify-between text-sm",children:[v.jsx("span",{className:"text-muted-foreground",children:n.description}),v.jsx("div",{className:"flex gap-1",children:n.keys.map(r=>v.jsx("kbd",{className:"rounded border border-border bg-muted px-1.5 py-0.5 font-mono text-xs",children:r},r))})]},n.description))})]})})}function Kre({...e}){return v.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function Vre({className:e,...t}){return v.jsx("ol",{"data-slot":"breadcrumb-list",className:Oe("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5",e),...t})}function Yre({className:e,...t}){return v.jsx("li",{"data-slot":"breadcrumb-item",className:Oe("inline-flex items-center gap-1.5",e),...t})}function Xre({asChild:e,className:t,...n}){const r=e?yj:"a";return v.jsx(r,{"data-slot":"breadcrumb-link",className:Oe("transition-colors hover:text-foreground",t),...n})}function Gre({className:e,...t}){return v.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Oe("font-normal text-foreground",e),...t})}function Wre({children:e,className:t,...n}){return v.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Oe("[&>svg]:size-3.5",t),...n,children:e??v.jsx(p0,{})})}function Lg({...e}){return v.jsx(DZ,{"data-slot":"dropdown-menu",...e})}function zg({...e}){return v.jsx(IZ,{"data-slot":"dropdown-menu-trigger",...e})}function $g({className:e,sideOffset:t=4,...n}){return v.jsx(LZ,{children:v.jsx(zZ,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Oe("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 rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",e),...n})})}function Eh({className:e,inset:t,variant:n="default",...r}){return v.jsx($Z,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Oe("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!",e),...r})}function Qre({className:e,children:t,checked:n,...r}){return v.jsxs(BZ,{"data-slot":"dropdown-menu-checkbox-item",className:Oe("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:n,...r,children:[v.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:v.jsx(UZ,{children:v.jsx(sO,{className:"size-4"})})}),t]})}function Ds({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return v.jsx(HJ,{"data-slot":"separator",decorative:n,orientation:t,className:Oe("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const Zre=[{to:"/",label:"Dashboard",icon:aB,end:!0},{to:"/projects",label:"Projects",icon:Ig},{to:"/schedules",label:"Schedules",icon:Mte},{to:"/settings",label:"Settings",icon:gne}],Jre=[{to:"/resources/roles",label:"Roles",icon:uB},{to:"/resources/skills",label:"Skills",icon:fB},{to:"/resources/agents",label:"Agents",icon:tB},{to:"/resources/memories",label:"Memory",icon:nB}];function eae(){const t=ki().pathname.split("/").filter(Boolean),n=t[0]==="projects"&&t[1]?Number(t[1]):0,{data:r}=mB(n,{enabled:n>0}),a=[{label:"Dashboard",href:"/"}];if(t[0]==="projects"&&(a.push({label:"Projects",href:"/projects"}),t[1])){const i=`/projects/${t[1]}`,s=(r==null?void 0:r.display_name)??`Project #${t[1]}`;a.push({label:s,href:i,projectSwitcher:!0}),t[2]==="sessions"&&t[3]&&a.push({label:`Session ${t[3].slice(0,8)}…`})}if(t[0]==="schedules"&&a.push({label:"Scheduled Tasks"}),t[0]==="settings"&&a.push({label:"Settings"}),t[0]==="resources"){const i={roles:"Roles",skills:"Skills",agents:"Agents",memories:"Memory"};a.push({label:"Resources"}),t[1]&&(a[a.length-1].href=`/resources/${t[1]}`,a.push({label:i[t[1]]??t[1]}))}return a}function tae(){const e=eae(),t=qf(),n=Wf(),{setTheme:r}=gj(),[a,i]=y.useState(!1),[s,c]=y.useState(!1);return ore({onCommandPalette:()=>i(!0),onShortcutsHelp:()=>c(!0)}),v.jsxs("div",{className:"flex min-h-screen",children:[v.jsxs("aside",{className:"flex w-56 flex-col border-r border-border bg-card",children:[v.jsx("div",{className:"flex h-14 items-center border-b border-border px-4",children:v.jsx(Xa,{to:"/",className:"text-lg font-bold tracking-tight hover:text-foreground/80",children:"StrawPot"})}),v.jsxs("nav",{className:"flex flex-col gap-1 p-3",children:[Zre.map(({to:u,label:f,icon:m,end:d})=>v.jsxs(JS,{to:u,end:d,className:({isActive:p})=>Oe("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",p?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[v.jsx(m,{className:"h-4 w-4"}),f]},u)),v.jsx("div",{className:"mt-4 mb-1 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground/70",children:"Resources"}),Jre.map(({to:u,label:f,icon:m})=>v.jsxs(JS,{to:u,className:({isActive:d})=>Oe("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",d?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[v.jsx(m,{className:"h-4 w-4"}),f]},u))]})]}),v.jsxs("div",{className:"flex flex-1 flex-col",children:[v.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-border px-6",children:[v.jsx(Kre,{children:v.jsx(Vre,{children:e.map((u,f)=>{const m=f===e.length-1;return v.jsxs(Yre,{children:[f>0&&v.jsx(Wre,{}),u.projectSwitcher?v.jsxs(Lg,{children:[v.jsxs(zg,{className:"flex items-center gap-1 text-sm font-medium text-foreground hover:text-foreground/80 transition-colors",children:[u.label,v.jsx(Ote,{className:"h-3 w-3 text-muted-foreground"})]}),v.jsx($g,{align:"start",children:(n.data??[]).map(d=>v.jsxs(Eh,{onClick:()=>t(`/projects/${d.id}`),children:[u.href===`/projects/${d.id}`?v.jsx(sO,{className:"mr-2 h-3.5 w-3.5"}):v.jsx("span",{className:"mr-2 inline-block w-3.5"}),d.display_name]},d.id))})]}):m?v.jsx(Gre,{children:u.label}):v.jsx(Xre,{href:u.href,children:u.label})]},u.label)})})}),v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx("button",{onClick:()=>i(!0),className:"flex items-center gap-1.5 rounded-md border border-border bg-muted/50 px-2.5 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted",children:v.jsx("kbd",{className:"font-mono",children:"⌘K"})}),v.jsxs(Lg,{children:[v.jsx(zg,{asChild:!0,children:v.jsxs(Te,{variant:"ghost",size:"icon",className:"h-8 w-8",children:[v.jsx(cB,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),v.jsx(iB,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),v.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),v.jsxs($g,{align:"end",children:[v.jsx(Eh,{onClick:()=>r("light"),children:"Light"}),v.jsx(Eh,{onClick:()=>r("dark"),children:"Dark"}),v.jsx(Eh,{onClick:()=>r("system"),children:"System"})]})]})]})]}),v.jsx(Ds,{}),v.jsx("main",{className:"flex-1 overflow-auto p-6",children:v.jsx(GV,{})})]}),v.jsx(Hre,{open:a,onOpenChange:i}),v.jsx(qre,{open:s,onOpenChange:c})]})}function nae(){const e=Et();return qt({mutationFn:t=>He.post("/sessions",t),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ye.projects.sessions(n.project_id)}),e.invalidateQueries({queryKey:["sessions"]})}})}function rae(){const e=Et();return qt({mutationFn:t=>He.post(`/sessions/${t}/stop`),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}function aae(){const e=Et();return qt({mutationFn:t=>He.delete(`/sessions/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}const iae=y0("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function gn({className:e,variant:t="default",asChild:n=!1,...r}){const a=n?yj:"span";return v.jsx(a,{"data-slot":"badge","data-variant":t,className:Oe(iae({variant:t}),e),...r})}function Fc({className:e,...t}){return v.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:v.jsx("table",{"data-slot":"table",className:Oe("w-full caption-bottom text-sm",e),...t})})}function qc({className:e,...t}){return v.jsx("thead",{"data-slot":"table-header",className:Oe("[&_tr]:border-b",e),...t})}function Kc({className:e,...t}){return v.jsx("tbody",{"data-slot":"table-body",className:Oe("[&_tr:last-child]:border-0",e),...t})}function Ir({className:e,...t}){return v.jsx("tr",{"data-slot":"table-row",className:Oe("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function Ge({className:e,...t}){return v.jsx("th",{"data-slot":"table-head",className:Oe("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 We({className:e,...t}){return v.jsx("td",{"data-slot":"table-cell",className:Oe("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function UE({sessions:e,projectNames:t}){return v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Ge,{children:"Run ID"}),t&&v.jsx(Ge,{children:"Project"}),v.jsx(Ge,{children:"Role"}),v.jsx(Ge,{children:"Status"}),v.jsx(Ge,{children:"Started"}),v.jsx(Ge,{children:"Duration"}),v.jsx(Ge,{children:"Task"}),v.jsx(Ge,{className:"w-[80px]"})]})}),v.jsx(Kc,{children:e.map(n=>v.jsxs(Ir,{children:[v.jsx(We,{children:v.jsx(Xa,{to:`/projects/${n.project_id}/sessions/${n.run_id}`,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:n.run_id.slice(0,16)})}),t&&v.jsx(We,{children:v.jsx(Xa,{to:`/projects/${n.project_id}`,className:"text-sm text-primary underline-offset-4 hover:underline",children:t.get(n.project_id)??`#${n.project_id}`})}),v.jsx(We,{className:"text-sm",children:n.role}),v.jsx(We,{children:v.jsx(oae,{status:n.status})}),v.jsx(We,{className:"text-sm text-muted-foreground",children:Bg(n.started_at)}),v.jsx(We,{className:"text-sm text-muted-foreground",children:b0(n.duration_ms)}),v.jsx(We,{className:"max-w-[300px] truncate text-sm",children:n.task??"—"}),v.jsx(We,{children:v.jsx(sae,{runId:n.run_id,disabled:n.status==="starting"||n.status==="running"})})]},n.run_id))})]})}function oae({status:e}){const t=AB(e);return v.jsxs(gn,{variant:"outline",className:Oe("text-xs font-medium",t==="running"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="success"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="error"&&"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-400",t==="warning"&&"border-orange-200 bg-orange-50 text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",t==="default"&&"border-muted bg-muted text-muted-foreground"),children:[e==="running"&&v.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),e]})}const KM=AB;function AB(e){switch(e){case"running":case"starting":return"running";case"completed":return"success";case"failed":return"error";case"stopped":return"warning";default:return"default"}}function Bg(e){try{return new Date(e).toLocaleString()}catch{return e}}function b0(e){if(e==null)return"—";const t=Math.round(e/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return`${n}m ${r}s`}function sae({runId:e,disabled:t}){const[n,r]=y.useState(!1),a=aae(),i=async()=>{try{await a.mutateAsync(e)}catch{}};return n?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(Te,{size:"sm",variant:"destructive",onClick:i,disabled:a.isPending,children:"Confirm"}),v.jsx(Te,{size:"sm",variant:"outline",onClick:()=>r(!1),children:"No"})]}):v.jsx(Te,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:()=>r(!0),disabled:t,children:v.jsx(Gf,{className:"h-4 w-4"})})}function hn({className:e,...t}){return v.jsx("div",{"data-slot":"card",className:Oe("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Yu({className:e,...t}){return v.jsx("div",{"data-slot":"card-header",className:Oe("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Xu({className:e,...t}){return v.jsx("div",{"data-slot":"card-title",className:Oe("leading-none font-semibold",e),...t})}function mn({className:e,...t}){return v.jsx("div",{"data-slot":"card-content",className:Oe("px-6",e),...t})}const s1=1e4;function NB(e,t,n){const[r,a]=y.useState([]),[i,s]=y.useState(!1),[c,u]=y.useState(!1),f=y.useRef(null),m=y.useRef(void 0),d=y.useRef(1e3),p=y.useRef("");return y.useEffect(()=>{if(!t)return;const b=`${e}:${t}`;p.current!==b&&(a([]),u(!1),p.current=b);function w(){const x=new EventSource(`/api/sessions/${e}/logs/${t}`);f.current=x,x.onopen=()=>{s(!0),d.current=1e3},x.addEventListener("snapshot",S=>{try{const E=JSON.parse(S.data);Array.isArray(E.lines)&&a(E.lines.slice(-s1))}catch{}}),x.addEventListener("append",S=>{try{const E=JSON.parse(S.data);Array.isArray(E.lines)&&E.lines.length>0&&a(C=>{const O=[...C,...E.lines];return O.length>s1?O.slice(-s1):O})}catch{}}),x.addEventListener("done",()=>{u(!0),x.close(),f.current=null}),x.onerror=()=>{x.close(),f.current=null,s(!1),m.current=setTimeout(()=>{d.current=Math.min(d.current*2,15e3),w()},d.current)}}return w(),()=>{var x;(x=f.current)==null||x.close(),f.current=null,m.current&&clearTimeout(m.current)}},[e,t,n]),{lines:r,connected:i,done:c}}const lae=5e3;function cae({runId:e,projectId:t,agentId:n,role:r,runtime:a,startedAt:i}){const{lines:s,done:c}=NB(e,n,!0),u=s.slice(-4),[f,m]=y.useState("");y.useEffect(()=>{const x=new Date(i).getTime(),S=()=>{const C=Date.now()-x,O=Math.floor(C/1e3)%60,A=Math.floor(C/6e4)%60,T=Math.floor(C/36e5);m(T>0?`${T}h ${A}m`:`${A}m ${O}s`)};S();const E=setInterval(S,1e3);return()=>clearInterval(E)},[i]);const d=y.useRef(s.length),p=y.useRef(Date.now()),[b,w]=y.useState(!1);return y.useEffect(()=>{s.length!==d.current&&(d.current=s.length,p.current=Date.now(),w(!1))},[s.length]),y.useEffect(()=>{const x=setInterval(()=>{Date.now()-p.current>lae&&w(!0)},1e3);return()=>clearInterval(x)},[]),v.jsx(hn,{className:"overflow-hidden",children:v.jsxs(mn,{className:"space-y-2 pt-4",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${c?"bg-muted-foreground":b?"bg-green-300":"animate-pulse bg-green-500"}`}),v.jsx("span",{className:"font-medium text-sm",children:r})]}),v.jsx(gn,{variant:"outline",className:"text-xs",children:a.replace("strawpot-","")})]}),v.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[v.jsxs("span",{children:["Session: ",e.slice(0,12)]}),v.jsx("span",{children:"·"}),v.jsx("span",{children:f})]}),v.jsx("div",{className:"rounded bg-[#1e1e1e] px-2 py-1.5 font-mono text-[11px] leading-[16px] text-[#d4d4d4]",children:u.length>0?u.map((x,S)=>v.jsxs("div",{className:"truncate",children:[v.jsx("span",{className:"text-[#666]",children:"> "}),x]},S)):v.jsx("div",{className:"text-[#555]",children:"Waiting for output..."})}),v.jsx("div",{className:"flex justify-end",children:v.jsxs(Xa,{to:`/projects/${t}/sessions/${e}?tab=logs`,className:"inline-flex items-center gap-0.5 text-xs text-primary hover:underline",children:["View Session",v.jsx(p0,{className:"h-3 w-3"})]})})]})})}const l1=8;function uae(){var s;const t=((s=uO().data)==null?void 0:s.items)??[],n=sX({queries:t.slice(0,l1).map(c=>({queryKey:Ye.sessions.detail(c.project_id,c.run_id),queryFn:()=>He.get(`/projects/${c.project_id}/sessions/${c.run_id}`),staleTime:1e4}))}),r=[];for(const c of n){if(!c.data)continue;const u=c.data;for(const[f,m]of Object.entries(u.agents))r.push({runId:u.run_id,projectId:u.project_id,agentId:f,role:m.role,runtime:m.runtime,startedAt:m.started_at})}if(r.length===0)return null;const a=r.slice(0,l1),i=r.length-l1;return v.jsxs("section",{className:"space-y-3",children:[v.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Active Agents (",r.length,")"]}),v.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-3",children:a.map(c=>v.jsx(cae,{runId:c.runId,projectId:c.projectId,agentId:c.agentId,role:c.role,runtime:c.runtime,startedAt:c.startedAt},`${c.runId}:${c.agentId}`))}),i>0&&v.jsxs("p",{className:"text-xs text-muted-foreground",children:["+",i," more agent",i!==1?"s":""," running"]})]})}function tn({className:e,...t}){return v.jsx("div",{"data-slot":"skeleton",className:Oe("animate-pulse rounded-md bg-accent",e),...t})}function fae(){return v.jsxs("div",{className:"space-y-8",children:[v.jsx(tn,{className:"h-8 w-40"}),v.jsxs("div",{className:"space-y-3",children:[v.jsx(tn,{className:"h-4 w-24"}),v.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-3",children:[1,2,3].map(e=>v.jsx(tn,{className:"h-28 rounded-lg"},e))})]}),v.jsxs("div",{className:"space-y-3",children:[v.jsx(tn,{className:"h-4 w-32"}),v.jsx(tn,{className:"h-48 rounded-lg"})]})]})}function dae(){var m,d;const e=Wf(),t=uO(),n=sre(),r=e.isLoading||t.isLoading||n.isLoading,a=e.error||t.error||n.error;if(r)return v.jsx(fae,{});if(a)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",a.message]})]});const i=e.data??[],s=((m=t.data)==null?void 0:m.items)??[],c=((d=n.data)==null?void 0:d.items)??[],u=new Map;for(const p of i)u.set(p.id,p.display_name);const f=new Map;for(const p of s)f.set(p.project_id,(f.get(p.project_id)??0)+1);return v.jsxs("div",{className:"space-y-8",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Dashboard"}),v.jsx(uae,{}),v.jsxs("section",{className:"space-y-3",children:[v.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Projects (",i.length,")"]}),i.length===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No projects registered."}):v.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-3",children:i.map(p=>v.jsx(Xa,{to:`/projects/${p.id}`,className:"group",children:v.jsxs(hn,{className:"transition-colors group-hover:border-foreground/20",children:[v.jsx(Yu,{className:"pb-2",children:v.jsxs(Xu,{className:"flex items-center gap-2 text-base",children:[v.jsx(Ig,{className:"h-4 w-4 text-muted-foreground"}),p.display_name]})}),v.jsxs(mn,{children:[v.jsx("p",{className:"break-all text-sm text-muted-foreground",children:p.working_dir}),v.jsxs("div",{className:"mt-2 flex gap-1.5",children:[!p.dir_exists&&v.jsx(gn,{variant:"outline",className:"border-orange-200 bg-orange-50 text-xs text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",children:"Directory missing"}),(f.get(p.id)??0)>0&&v.jsxs(gn,{variant:"outline",className:"border-green-200 bg-green-50 text-xs text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",children:[v.jsx("span",{className:"mr-1 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),f.get(p.id)," running"]})]})]})]})},p.id))})]}),s.length>0&&v.jsxs("section",{className:"space-y-3",children:[v.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Running Sessions (",s.length,")"]}),v.jsx(hn,{children:v.jsx(mn,{className:"p-0",children:v.jsx(UE,{sessions:s,projectNames:u})})})]}),v.jsxs("section",{className:"space-y-3",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Recent Sessions"}),c.length===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No sessions yet."}):v.jsx(hn,{children:v.jsx(mn,{className:"p-0",children:v.jsx(UE,{sessions:c,projectNames:u})})})]})]})}function hae(){const e=Et();return qt({mutationFn:t=>He.post("/projects",t),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.projects.all})}})}function mae(){const e=Et();return qt({mutationFn:t=>He.delete(`/projects/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.projects.all})}})}function pae(){const e=Et();return qt({mutationFn:({projectId:t,files:n})=>He.upload(`/projects/${t}/files`,n),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ye.projects.files(n.projectId)})}})}function vae(){const e=Et();return qt({mutationFn:({projectId:t,filePath:n})=>He.delete(`/projects/${t}/files/${n}`),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ye.projects.files(n.projectId)})}})}function Tt({className:e,type:t,...n}){return v.jsx("input",{type:t,"data-slot":"input",className:Oe("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...n})}function Am({className:e,children:t,...n}){return v.jsxs(tJ,{"data-slot":"scroll-area",className:Oe("relative",e),...n,children:[v.jsx(nJ,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),v.jsx(gae,{}),v.jsx(rJ,{})]})}function gae({className:e,orientation:t="vertical",...n}){return v.jsx(I5,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Oe("flex touch-none p-px transition-colors select-none",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",e),...n,children:v.jsx(B5,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function yae({initialPath:e,onSelect:t,onCancel:n}){const[r,a]=y.useState(null),[i,s]=y.useState(!0),[c,u]=y.useState(null),[f,m]=y.useState(null),d=b=>{s(!0),u(null);const w=b?`?path=${encodeURIComponent(b)}`:"";He.get(`/fs/browse${w}`).then(a).catch(x=>u(x.message??"Failed to browse")).finally(()=>s(!1))},p=async()=>{if(!(!r||!(f!=null&&f.trim())))try{const b=await He.post("/fs/mkdir",{path:r.path,name:f.trim()});m(null),d(b.path)}catch(b){u(b instanceof Error?b.message:"Failed to create folder")}};return y.useEffect(()=>{d(e||void 0)},[]),v.jsx($c,{open:!0,onOpenChange:b=>!b&&n(),children:v.jsxs(Bc,{className:"sm:max-w-[480px]",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:"Select Directory"})}),r&&v.jsx("div",{className:"break-all rounded-md bg-muted px-3 py-1.5 font-mono text-xs",children:r.path}),c&&v.jsx("p",{className:"text-sm text-destructive",children:c}),i&&!r?v.jsx("p",{className:"py-4 text-sm text-muted-foreground",children:"Loading..."}):v.jsx(Am,{className:"h-[300px]",children:v.jsxs("div",{className:"space-y-0.5",children:[(r==null?void 0:r.parent)&&v.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm text-primary hover:bg-accent",onClick:()=>d(r.parent),children:[v.jsx(Bte,{className:"h-4 w-4"}),".."]}),r==null?void 0:r.entries.map(b=>v.jsxs("button",{className:"flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm text-primary hover:bg-accent",onClick:()=>d(b.path),children:[v.jsx(Hte,{className:"h-4 w-4"}),b.name]},b.path)),(r==null?void 0:r.entries.length)===0&&v.jsx("p",{className:"px-3 py-4 text-sm italic text-muted-foreground",children:"No subdirectories"})]})}),v.jsx(OB,{children:f!==null?v.jsxs("div",{className:"flex w-full gap-2",children:[v.jsx(Tt,{value:f,onChange:b=>m(b.target.value),onKeyDown:b=>{b.key==="Enter"&&p(),b.key==="Escape"&&m(null)},placeholder:"Folder name",autoFocus:!0,className:"flex-1"}),v.jsx(Te,{size:"sm",onClick:p,children:"Create"}),v.jsx(Te,{size:"sm",variant:"outline",onClick:()=>m(null),children:"Cancel"})]}):v.jsxs(v.Fragment,{children:[v.jsx(Te,{variant:"outline",onClick:()=>m(""),disabled:!r,children:"New Folder"}),v.jsx("div",{className:"flex-1"}),v.jsx(Te,{onClick:()=>r&&t(r.path),disabled:!r,children:"Select"}),v.jsx(Te,{variant:"outline",onClick:n,children:"Cancel"})]})})]})})}function kt({className:e,...t}){return v.jsx(FZ,{"data-slot":"label",className:Oe("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function bae(){const{data:e,isLoading:t,error:n}=Wf(),[r,a]=y.useState(!1);if(t)return v.jsxs("div",{className:"space-y-6",children:[v.jsx(tn,{className:"h-8 w-32"}),v.jsx(tn,{className:"h-64 rounded-lg"})]});if(n)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",n.message]})]});const i=e??[];return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Projects"}),v.jsxs(Te,{onClick:()=>a(!0),children:[v.jsx(LE,{className:"mr-2 h-4 w-4"}),"Add Project"]})]}),r&&v.jsx(xae,{onDone:()=>a(!1),onCancel:()=>a(!1)}),i.length===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No projects registered yet."}):v.jsx(hn,{children:v.jsx(mn,{className:"p-0",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Ge,{children:"Name"}),v.jsx(Ge,{children:"Directory"}),v.jsx(Ge,{children:"Created"}),v.jsx(Ge,{children:"Status"}),v.jsx(Ge,{className:"w-[80px]"})]})}),v.jsx(Kc,{children:i.map(s=>v.jsxs(Ir,{children:[v.jsx(We,{children:v.jsx(Xa,{to:`/projects/${s.id}`,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:s.display_name})}),v.jsx(We,{className:"max-w-[300px] truncate text-sm text-muted-foreground",children:s.working_dir}),v.jsx(We,{className:"text-sm text-muted-foreground",children:Sae(s.created_at)}),v.jsx(We,{children:s.dir_exists?v.jsx(gn,{variant:"outline",className:"border-green-200 bg-green-50 text-xs text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",children:"OK"}):v.jsx(gn,{variant:"outline",className:"border-orange-200 bg-orange-50 text-xs text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",children:"Missing"})}),v.jsx(We,{children:v.jsx(wae,{projectId:s.id})})]},s.id))})]})})})]})}function xae({onDone:e,onCancel:t}){const[n,r]=y.useState(""),[a,i]=y.useState(""),[s,c]=y.useState(!1),u=hae(),f=async m=>{m.preventDefault();try{await u.mutateAsync({display_name:n.trim(),working_dir:a.trim()}),e()}catch{}};return v.jsx(hn,{children:v.jsx(mn,{className:"pt-6",children:v.jsxs("form",{onSubmit:f,className:"space-y-4",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"display-name",children:"Display Name"}),v.jsx(Tt,{id:"display-name",value:n,onChange:m=>r(m.target.value),required:!0,autoFocus:!0})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"working-dir",children:"Working Directory"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(Tt,{id:"working-dir",value:a,onChange:m=>i(m.target.value),placeholder:"/path/to/project",required:!0}),v.jsx(Te,{type:"button",variant:"outline",size:"sm",onClick:()=>c(!s),children:"Browse"})]})]})]}),s&&v.jsx(yae,{initialPath:a||void 0,onSelect:m=>{i(m),c(!1)},onCancel:()=>c(!1)}),u.error&&v.jsx("p",{className:"text-sm text-destructive",children:u.error.message}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(Te,{type:"submit",disabled:u.isPending,children:u.isPending?"Adding...":"Add"}),v.jsx(Te,{type:"button",variant:"outline",onClick:t,children:"Cancel"})]})]})})})}function wae({projectId:e}){const[t,n]=y.useState(!1),r=mae(),a=async()=>{try{await r.mutateAsync(e)}catch{}};return t?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(Te,{size:"sm",variant:"destructive",onClick:a,disabled:r.isPending,children:"Confirm"}),v.jsx(Te,{size:"sm",variant:"outline",onClick:()=>n(!1),children:"No"})]}):v.jsx(Te,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:()=>n(!0),children:v.jsx(Gf,{className:"h-4 w-4"})})}function Sae(e){try{return new Date(e).toLocaleDateString()}catch{return e}}function TB(e){return Bn({queryKey:Ye.projects.resources(e),queryFn:()=>He.get(`/projects/${e}/resources`)})}function Eae(e,t,n,r){return Bn({queryKey:Ye.projects.resourceDetail(e,t,n),queryFn:()=>He.get(`/projects/${e}/resources/${t}/${n}`),enabled:(r==null?void 0:r.enabled)??!!n})}function _ae(e,t,n,r){return Bn({queryKey:Ye.projects.resourceConfig(e,t,n),queryFn:()=>He.get(`/projects/${e}/resources/${t}/${n}/config`),enabled:(r==null?void 0:r.enabled)??!!n})}function jae(e,t){if(t<=7)return Array.from({length:t},(i,s)=>s+1);const n=[1];e>3&&n.push("...");const r=Math.max(2,e-1),a=Math.min(t-1,e+1);for(let i=r;i<=a;i++)n.push(i);return e<t-2&&n.push("..."),n.push(t),n}function Oae({page:e,totalPages:t,onPageChange:n}){if(t<=1)return null;const r=jae(e,t);return v.jsxs("div",{className:"flex items-center justify-center gap-1 pt-2",children:[v.jsx(Te,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:e<=1,onClick:()=>n(e-1),children:v.jsx(wte,{className:"h-4 w-4"})}),r.map((a,i)=>a==="..."?v.jsx("span",{className:"px-1 text-sm text-muted-foreground",children:"..."},`ellipsis-${i}`):v.jsx(Te,{variant:a===e?"default":"outline",size:"icon",className:"h-8 w-8 text-xs",onClick:()=>n(a),children:a},a)),v.jsx(Te,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:e>=t,onClick:()=>n(e+1),children:v.jsx(p0,{className:"h-4 w-4"})})]})}function PB(){return Bn({queryKey:Ye.roles.all,queryFn:()=>He.get("/roles")})}function Cae(e){return Bn({queryKey:Ye.registry.validate(e??""),queryFn:()=>He.get(`/registry/agents/${e}/validate`),enabled:!!e})}function cc(e,t){return Bn({queryKey:Ye.registry.list(e),queryFn:()=>He.get(`/registry/${e}`),enabled:t==null?void 0:t.enabled})}function Aae(e,t,n){return Bn({queryKey:Ye.registry.detail(e,t),queryFn:()=>He.get(`/registry/${e}/${t}`),enabled:(n==null?void 0:n.enabled)??!!t})}function MB(e,t,n){return Bn({queryKey:Ye.registry.config(e,t),queryFn:()=>He.get(`/registry/${e}/${t}/config`),enabled:(n==null?void 0:n.enabled)??!!t})}function xo({...e}){return v.jsx(CJ,{"data-slot":"select",...e})}function wo({...e}){return v.jsx(NJ,{"data-slot":"select-value",...e})}function So({className:e,size:t="default",children:n,...r}){return v.jsxs(AJ,{"data-slot":"select-trigger","data-size":t,className:Oe("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,v.jsx(TJ,{asChild:!0,children:v.jsx(zh,{className:"size-4 opacity-50"})})]})}function Eo({className:e,children:t,position:n="item-aligned",align:r="center",...a}){return v.jsx(PJ,{children:v.jsxs(MJ,{"data-slot":"select-content",className:Oe("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",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,align:r,...a,children:[v.jsx(Nae,{}),v.jsx(RJ,{className:Oe("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),v.jsx(Tae,{})]})})}function Dn({className:e,children:t,...n}){return v.jsxs(kJ,{"data-slot":"select-item",className:Oe("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[v.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:v.jsx(IJ,{children:v.jsx(sO,{className:"size-4"})})}),v.jsx(DJ,{children:t})]})}function Nae({className:e,...t}){return v.jsx(LJ,{"data-slot":"select-scroll-up-button",className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(_te,{className:"size-4"})})}function Tae({className:e,...t}){return v.jsx(zJ,{"data-slot":"select-scroll-down-button",className:Oe("flex cursor-default items-center justify-center py-1",e),...t,children:v.jsx(zh,{className:"size-4"})})}function Ug({className:e,...t}){return v.jsx("textarea",{"data-slot":"textarea",className:Oe("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}function dO({...e}){return v.jsx($X,{"data-slot":"collapsible",...e})}function hO({...e}){return v.jsx(Xz,{"data-slot":"collapsible-trigger",...e})}function mO({...e}){return v.jsx(Gz,{"data-slot":"collapsible-content",...e})}function Pae({projectId:e,open:t,onOpenChange:n}){var Xt,dt,Jn,Sr,Lt,Fn;const r=qf(),a=vB(e),i=PB(),{data:s}=cc("agents"),{data:c}=cc("memories"),u=pB(e),f=nae(),m=(Xt=a.data)==null?void 0:Xt.merged,d="__empty__",[p,b]=y.useState(""),[w,x]=y.useState(""),[S,E]=y.useState(""),[C,O]=y.useState(""),[A,T]=y.useState(""),[N,P]=y.useState(""),[k,D]=y.useState(""),[K,B]=y.useState(""),[I,W]=y.useState(""),[z,V]=y.useState(""),[R,H]=y.useState(!1),[q,F]=y.useState([]),[Y,$]=y.useState(""),L=()=>{b(""),x(""),E(""),O(""),T(""),P(""),D(""),B(""),W(""),V(""),H(!1),F([])},G=we=>{F(rn=>rn.includes(we)?rn.filter(Ct=>Ct!==we):[...rn,we])},Z=async we=>{we.preventDefault();try{const rn={project_id:e,task:p.trim()};w.trim()&&(rn.role=w.trim());const Ct={};S.trim()&&(Ct.runtime=S.trim()),C&&(Ct.isolation=C),A.trim()&&(Ct.memory=A.trim()),N&&(Ct.merge_strategy=N),k&&(Ct.cache_delegations=k==="true"),K.trim()&&(Ct.cache_max_entries=Number(K.trim())),I.trim()&&(Ct.cache_ttl_seconds=Number(I.trim())),Object.keys(Ct).length>0&&(rn.overrides=Ct),q.length>0&&(rn.context_files=q),z.trim()&&(rn.system_prompt=z.trim()),R&&(rn.interactive=!0);const ia=await f.mutateAsync(rn);L(),n(!1),r(`/projects/${e}/sessions/${ia.run_id}`)}catch{}},J=(m==null?void 0:m.orchestrator_role)??"orchestrator",se=(i.data??[]).filter(we=>we!==J),ie=[J,...se],re=(s??[]).map(we=>we.name),ee=new Set((c??[]).map(we=>we.name));ee.add("none");const le=[...ee].sort(),me=w.trim()||J,ne=MB("roles",me,{enabled:!!me}),ge=((Jn=(dt=ne.data)==null?void 0:dt.params_values)==null?void 0:Jn.default_agent)??((Fn=(Lt=(Sr=ne.data)==null?void 0:Sr.params_schema)==null?void 0:Lt.default_agent)==null?void 0:Fn.default)??"",be=ge&&re.includes(ge)?ge:(m==null?void 0:m.runtime)??"strawpot-claude-code",Ie=w.trim()&&!ie.includes(w.trim())?"Role not found in installed roles":"",Pe=S.trim()&&re.length>0&&!re.includes(S.trim())?"Runtime not found in installed agents":"",Ve=!!Ie||!!Pe;return v.jsx($c,{open:t,onOpenChange:n,children:v.jsxs(Bc,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:"Launch Session"})}),v.jsxs("form",{onSubmit:Z,className:"space-y-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsxs(kt,{htmlFor:"task",children:["Task ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsx(Ug,{id:"task",value:p,onChange:we=>b(we.target.value),placeholder:"Describe what the agent should do...",required:!0,autoFocus:!0,rows:3})]}),(u.data??[]).length>0&&v.jsxs("div",{className:"space-y-2",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsxs(Lg,{children:[v.jsx(zg,{asChild:!0,children:v.jsxs(Te,{type:"button",variant:"outline",size:"sm",children:[v.jsx(ine,{className:"mr-1 h-3.5 w-3.5"}),"@ Attach Files"]})}),v.jsxs($g,{align:"start",className:"w-64",onCloseAutoFocus:we=>we.preventDefault(),children:[v.jsx("div",{className:"px-2 py-1.5",children:v.jsx(Tt,{placeholder:"Filter files...",value:Y,onChange:we=>$(we.target.value),className:"h-7 text-xs",onKeyDown:we=>we.stopPropagation()})}),v.jsx("div",{className:"max-h-48 overflow-y-auto",children:(u.data??[]).filter(we=>we.path.toLowerCase().includes(Y.toLowerCase())).map(we=>v.jsx(Qre,{checked:q.includes(we.path),onCheckedChange:()=>G(we.path),onSelect:rn=>rn.preventDefault(),children:v.jsx("span",{className:"font-mono text-xs",children:we.path})},we.path))})]})]}),q.length>0&&v.jsxs("span",{className:"text-xs text-muted-foreground",children:[q.length," file(s) attached"]})]}),q.length>0&&v.jsx("div",{className:"flex flex-wrap gap-1",children:q.map(we=>v.jsxs(gn,{variant:"secondary",className:"gap-1 font-mono text-xs",children:["@",we,v.jsx("button",{type:"button",onClick:()=>G(we),className:"ml-0.5 rounded-sm hover:bg-muted",children:v.jsx(cO,{className:"h-3 w-3"})})]},we))})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"role",children:"Role"}),v.jsx(Tt,{id:"role",list:"datalist-role",value:w,onChange:we=>x(we.target.value),placeholder:J}),v.jsxs("datalist",{id:"datalist-role",children:[v.jsx("option",{value:J}),se.map(we=>v.jsx("option",{value:we},we))]}),Ie&&v.jsx("p",{className:"text-xs text-destructive",children:Ie})]}),v.jsxs(dO,{children:[v.jsx(hO,{asChild:!0,children:v.jsxs(Te,{type:"button",variant:"ghost",size:"sm",children:[v.jsx(zh,{className:"mr-1 h-4 w-4"}),"Advanced Options"]})}),v.jsxs(mO,{className:"mt-3 space-y-4",children:[v.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[v.jsx("input",{type:"checkbox",checked:R,onChange:we=>H(we.target.checked),className:"rounded border-input"}),v.jsx("span",{className:"text-sm",children:"Interactive mode"}),v.jsx("span",{className:"text-xs text-muted-foreground",children:"Allow the agent to ask you questions via a chat panel"})]}),v.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"runtime",children:"Runtime"}),v.jsx(Tt,{id:"runtime",list:"datalist-runtime",value:S,onChange:we=>E(we.target.value),placeholder:be}),s&&v.jsx("datalist",{id:"datalist-runtime",children:s.map(we=>v.jsx("option",{value:we.name},we.name))}),Pe&&v.jsx("p",{className:"text-xs text-destructive",children:Pe})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"memory",children:"Memory"}),v.jsx(Tt,{id:"memory",list:"datalist-memory",value:A,onChange:we=>T(we.target.value),placeholder:(m==null?void 0:m.memory)||"dial"}),v.jsx("datalist",{id:"datalist-memory",children:le.map(we=>v.jsx("option",{value:we},we))})]})]}),v.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"isolation",children:"Isolation"}),v.jsxs(xo,{value:C||d,onValueChange:we=>O(we===d?"":we),children:[v.jsx(So,{id:"isolation",children:v.jsx(wo,{placeholder:(m==null?void 0:m.isolation)??"none"})}),v.jsxs(Eo,{children:[v.jsxs(Dn,{value:d,className:"text-muted-foreground",children:["Default (",(m==null?void 0:m.isolation)??"none",")"]}),v.jsx(Dn,{value:"none",children:"none"}),v.jsx(Dn,{value:"worktree",children:"worktree"})]})]})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"merge-strategy",children:"Merge Strategy"}),v.jsxs(xo,{value:N||d,onValueChange:we=>P(we===d?"":we),children:[v.jsx(So,{id:"merge-strategy",children:v.jsx(wo,{placeholder:(m==null?void 0:m.merge_strategy)??"auto"})}),v.jsxs(Eo,{children:[v.jsxs(Dn,{value:d,className:"text-muted-foreground",children:["Default (",(m==null?void 0:m.merge_strategy)??"auto",")"]}),v.jsx(Dn,{value:"auto",children:"auto"}),v.jsx(Dn,{value:"local",children:"local"}),v.jsx(Dn,{value:"pr",children:"pr"})]})]})]})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"system-prompt",children:"System Prompt"}),v.jsx(Ug,{id:"system-prompt",value:z,onChange:we=>V(we.target.value),placeholder:"Additional instructions for the agent...",rows:3})]}),v.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{children:"Cache Delegations"}),v.jsxs(xo,{value:k||d,onValueChange:we=>D(we===d?"":we),children:[v.jsx(So,{className:"h-8 text-xs",children:v.jsx(wo,{placeholder:(m==null?void 0:m.cache_delegations)!==!1?"true":"false"})}),v.jsxs(Eo,{children:[v.jsxs(Dn,{value:d,className:"text-muted-foreground",children:["Default (",(m==null?void 0:m.cache_delegations)!==!1?"true":"false",")"]}),v.jsx(Dn,{value:"true",children:"true"}),v.jsx(Dn,{value:"false",children:"false"})]})]})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{children:"Cache Max Entries"}),v.jsx(Tt,{type:"number",min:"0",value:K,onChange:we=>B(we.target.value),placeholder:m!=null&&m.cache_max_entries?String(m.cache_max_entries):"0 (unlimited)",className:"h-8 text-xs"})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{children:"Cache TTL (seconds)"}),v.jsx(Tt,{type:"number",min:"0",value:I,onChange:we=>W(we.target.value),placeholder:m!=null&&m.cache_ttl_seconds?String(m.cache_ttl_seconds):"0 (unlimited)",className:"h-8 text-xs"})]})]})]})]}),f.error&&v.jsx("p",{className:"text-sm text-destructive",children:f.error.message}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx(Te,{type:"submit",disabled:f.isPending||Ve,children:f.isPending?"Launching...":"Launch"}),v.jsx(Te,{type:"button",variant:"outline",onClick:()=>n(!1),children:"Cancel"})]})]})]})})}function Mae(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Rae({projectId:e}){const t=pB(e),n=pae(),r=vae(),a=y.useRef(null),[i,s]=y.useState(!1),c=y.useCallback(x=>{const S=Array.from(x);S.length!==0&&n.mutate({projectId:e,files:S},{onSuccess:()=>mt.success(`Uploaded ${S.length} file(s)`),onError:()=>mt.error("Upload failed")})},[e,n]),u=y.useCallback(x=>{x.preventDefault(),s(!1),c(x.dataTransfer.files)},[c]),f=y.useCallback(x=>{x.preventDefault(),s(!0)},[]),m=y.useCallback(x=>{x.preventDefault(),s(!1)},[]),d=y.useCallback(()=>{var x;(x=a.current)==null||x.click()},[]),p=y.useCallback(x=>{x.target.files&&(c(x.target.files),x.target.value="")},[c]),b=y.useCallback(x=>{r.mutate({projectId:e,filePath:x},{onSuccess:()=>mt.success("File deleted"),onError:()=>mt.error("Failed to delete file")})},[e,r]),w=t.data??[];return v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{onDrop:u,onDragOver:f,onDragLeave:m,className:`flex flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed p-8 transition-colors ${i?"border-primary bg-primary/5":"border-muted-foreground/25"}`,children:[v.jsx(jne,{className:"h-8 w-8 text-muted-foreground"}),v.jsxs("p",{className:"text-sm text-muted-foreground",children:["Drag & drop files here, or"," ",v.jsx("button",{type:"button",onClick:d,className:"font-medium text-primary underline-offset-4 hover:underline",children:"browse"})]}),n.isPending&&v.jsx("p",{className:"text-xs text-muted-foreground",children:"Uploading..."}),v.jsx("input",{ref:a,type:"file",multiple:!0,className:"hidden",onChange:p})]}),w.length===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No files uploaded yet."}):v.jsx(hn,{children:v.jsx(mn,{className:"p-0",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Ge,{children:"Name"}),v.jsx(Ge,{className:"w-24",children:"Size"}),v.jsx(Ge,{className:"w-44",children:"Modified"}),v.jsx(Ge,{className:"w-12"})]})}),v.jsx(Kc,{children:w.map(x=>v.jsxs(Ir,{children:[v.jsx(We,{className:"font-mono text-xs",children:x.path}),v.jsx(We,{className:"text-xs text-muted-foreground",children:Mae(x.size)}),v.jsx(We,{className:"text-xs text-muted-foreground",children:new Date(x.modified_at).toLocaleString()}),v.jsx(We,{children:v.jsx(Te,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>b(x.path),disabled:r.isPending,children:v.jsx(Gf,{className:"h-3.5 w-3.5 text-muted-foreground"})})})]},x.path))})]})})})]})}function kae(){const e=Et();return qt({mutationFn:t=>He.post("/registry/install",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function RB(){const e=Et();return qt({mutationFn:({type:t,name:n})=>He.delete(`/registry/${t}/${n}`),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function Dae(){const e=Et();return qt({mutationFn:t=>He.post("/registry/update",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function Iae(){const e=Et();return qt({mutationFn:t=>He.post("/registry/reinstall",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function Lae(){const e=Et();return qt({mutationFn:({type:t,name:n,env_values:r,params_values:a})=>He.put(`/registry/${t}/${n}/config`,{env_values:r,params_values:a}),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ye.registry.config(n.type,n.name)})}})}function zae(e){const t=Et();return qt({mutationFn:n=>He.post(`/projects/${e}/resources/install`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ye.projects.resources(e)})}})}function kB(e){const t=Et();return qt({mutationFn:({type:n,name:r})=>He.delete(`/projects/${e}/resources/${n}/${r}`),onSuccess:()=>{t.invalidateQueries({queryKey:Ye.projects.resources(e)})}})}function $ae(e){const t=Et();return qt({mutationFn:n=>He.post(`/projects/${e}/resources/update`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ye.projects.resources(e)})}})}function Bae(e){const t=Et();return qt({mutationFn:n=>He.post(`/projects/${e}/resources/reinstall`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ye.projects.resources(e)})}})}function Uae(e){const t=Et();return qt({mutationFn:({type:n,name:r,env_values:a,params_values:i})=>He.put(`/projects/${e}/resources/${n}/${r}/config`,{env_values:a,params_values:i}),onSuccess:(n,r)=>{t.invalidateQueries({queryKey:Ye.projects.resourceConfig(e,r.type,r.name)})}})}function Hae({...e}){return v.jsx(Aj,{"data-slot":"sheet",...e})}function Fae({...e}){return v.jsx(Nj,{"data-slot":"sheet-portal",...e})}function qae({className:e,...t}){return v.jsx(Tj,{"data-slot":"sheet-overlay",className:Oe("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function Kae({className:e,children:t,side:n="right",showCloseButton:r=!0,...a}){return v.jsxs(Fae,{children:[v.jsx(qae,{}),v.jsxs(Pj,{"data-slot":"sheet-content",className:Oe("fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",n==="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",n==="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",n==="top"&&"inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",n==="bottom"&&"inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",e),...a,children:[t,r&&v.jsxs(Mj,{className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary",children:[v.jsx(cO,{className:"size-4"}),v.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Vae({className:e,...t}){return v.jsx("div",{"data-slot":"sheet-header",className:Oe("flex flex-col gap-1.5 p-4",e),...t})}function Yae({className:e,...t}){return v.jsx(S4,{"data-slot":"sheet-title",className:Oe("font-semibold text-foreground",e),...t})}function Xae({className:e,...t}){return v.jsx(E4,{"data-slot":"sheet-description",className:Oe("text-sm text-muted-foreground",e),...t})}const Gae=y0("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function ug({className:e,variant:t,...n}){return v.jsx("div",{"data-slot":"alert",role:"alert",className:Oe(Gae({variant:t}),e),...n})}function fg({className:e,...t}){return v.jsx("div",{"data-slot":"alert-title",className:Oe("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function dg({className:e,...t}){return v.jsx("div",{"data-slot":"alert-description",className:Oe("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Wae({agentName:e}){const{data:t}=Cae(e);return!t||!(!t.tools_ok||t.setup_command||!t.env_ok)?null:v.jsxs("div",{className:"mb-4 space-y-3",children:[!t.tools_ok&&v.jsxs(ug,{variant:"destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsx(fg,{children:"Missing Prerequisites"}),v.jsx(dg,{children:t.missing_tools.map(r=>v.jsxs("div",{className:"mt-1",children:[v.jsx("strong",{children:r.name})," not found on PATH.",r.install_hint&&v.jsx("code",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-xs",children:r.install_hint})]},r.name))})]}),t.setup_command&&v.jsxs(ug,{children:[v.jsx(xne,{className:"h-4 w-4"}),v.jsx(fg,{children:"Setup"}),v.jsxs(dg,{children:[v.jsx("p",{children:t.setup_description||"Run initial authentication in your terminal:"}),v.jsx("code",{className:"mt-1 block rounded bg-muted px-2 py-1 text-xs",children:t.setup_command}),v.jsx("p",{className:"mt-2 text-muted-foreground",children:"Or set the API key in the config below instead."})]})]}),!t.env_ok&&!t.setup_command&&t.missing_env.length>0&&v.jsxs(ug,{children:[v.jsx(Xte,{className:"h-4 w-4"}),v.jsx(fg,{children:"API Key Required"}),v.jsx(dg,{children:v.jsxs("p",{children:["Set"," ",t.missing_env.map((r,a)=>v.jsxs("span",{children:[a>0&&", ",v.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:r})]},r))," ","in the config below to authenticate."]})})]})]})}function Qae({resourceType:e,resourceName:t,enabled:n,projectId:r}){const a=MB(e,t,{enabled:n&&!r}),i=_ae(r??0,e,t,{enabled:n&&!!r}),{data:s,isLoading:c}=r?i:a,u=Lae(),f=Uae(r??0),m=r?f:u,{data:d}=cc("agents",{enabled:n&&e==="roles"}),[p,b]=y.useState({}),[w,x]=y.useState({}),[S,E]=y.useState(new Set);if(y.useEffect(()=>{s&&(b({...s.env_values}),x({...s.params_values}))},[s]),c||!s)return null;const C=Object.keys(s.env_schema),O=Object.keys(s.params_schema);if(C.length===0&&O.length===0)return null;const A=D=>E(K=>{const B=new Set(K);return B.has(D)?B.delete(D):B.add(D),B}),T=(d??[]).map(D=>D.name),N=String(w.default_agent??"").trim(),P=e==="roles"&&N&&T.length>0&&!T.includes(N)?"Agent not found in installed agents":"",k=()=>{m.mutate({type:e,name:t,env_values:C.length>0?p:void 0,params_values:O.length>0?w:void 0},{onSuccess:()=>mt.success("Configuration saved"),onError:()=>mt.error("Failed to save configuration")})};return v.jsxs("div",{className:"flex flex-col gap-4",children:[C.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(Ds,{}),v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsx("h4",{className:"text-sm font-semibold",children:"Environment Variables"}),C.map(D=>{const K=s.env_schema[D],B=S.has(D);return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(kt,{className:"text-xs font-mono",children:D}),K.required&&v.jsx(gn,{variant:"outline",className:"h-4 px-1 text-[10px] text-red-500 border-red-200",children:"required"})]}),K.description&&v.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),v.jsxs("div",{className:"flex gap-1",children:[v.jsx(Tt,{type:B?"text":"password",value:p[D]??"",onChange:I=>b(W=>({...W,[D]:I.target.value})),placeholder:D,className:"h-8 text-xs font-mono"}),v.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 shrink-0 p-0",onClick:()=>A(D),children:B?v.jsx(Dte,{className:"h-3.5 w-3.5"}):v.jsx(Lte,{className:"h-3.5 w-3.5"})})]})]},D)})]})]}),O.length>0&&v.jsxs(v.Fragment,{children:[v.jsx(Ds,{}),v.jsxs("div",{className:"flex flex-col gap-3",children:[v.jsx("h4",{className:"text-sm font-semibold",children:"Parameters"}),O.map(D=>{const K=s.params_schema[D],B=w[D],I=K.default;if(K.type==="boolean")return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(kt,{className:"text-xs font-mono",children:D}),K.description&&v.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),v.jsxs(xo,{value:B!=null?String(B):I!=null?String(I):"",onValueChange:H=>x(q=>({...q,[D]:H==="true"})),children:[v.jsx(So,{className:"h-8 text-xs",children:v.jsx(wo,{})}),v.jsxs(Eo,{children:[v.jsx(Dn,{value:"true",children:"true"}),v.jsx(Dn,{value:"false",children:"false"})]})]})]},D);const W=K.type==="int"||K.type==="float"?"number":"text",z=K.type==="float"?"any":void 0,V=D==="default_agent"&&d?d.map(H=>H.name):void 0,R=V?`datalist-${D}`:void 0;return v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsx(kt,{className:"text-xs font-mono",children:D}),K.description&&v.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),v.jsx(Tt,{type:W,step:z,list:R,value:B!=null?String(B):"",onChange:H=>x(q=>({...q,[D]:W==="number"&&H.target.value!==""?Number(H.target.value):H.target.value})),placeholder:I!=null?String(I):void 0,className:"h-8 text-xs font-mono"}),V&&v.jsx("datalist",{id:R,children:V.map(H=>v.jsx("option",{value:H},H))}),D==="default_agent"&&P&&v.jsx("p",{className:"text-xs text-destructive",children:P})]},D)})]})]}),v.jsxs(Te,{size:"sm",onClick:k,disabled:m.isPending||!!P,className:"self-start",children:[v.jsx(sB,{className:"mr-2 h-3.5 w-3.5"}),m.isPending?"Saving...":"Save Configuration"]})]})}function DB({resource:e,resourceType:t,open:n,onOpenChange:r,projectId:a}){var P,k;const i=RB(),s=Dae(),c=Iae(),u=kB(a??0),f=$ae(a??0),m=Bae(a??0),d=a?u:i,p=a?f:s,b=a?m:c,[w,x]=y.useState(!1),S=p.isPending||b.isPending||d.isPending;if(!e)return null;const E=()=>{if(!w){x(!0);return}d.mutate({type:t,name:e.name},{onSuccess:D=>{D.exit_code===0?(mt.success(`Uninstalled ${e.name}`),r(!1)):mt.error(`Uninstall failed: ${D.stderr||D.stdout}`),x(!1)},onError:()=>{mt.error("Uninstall request failed"),x(!1)}})},C=()=>{p.mutate({type:t,name:e.name},{onSuccess:D=>{D.exit_code===0?mt.success(`Updated ${e.name}`):mt.error(`Update failed: ${D.stderr||D.stdout}`)},onError:()=>mt.error("Update request failed")})},O=()=>{b.mutate({type:t,name:e.name},{onSuccess:D=>{D.exit_code===0?mt.success(`Reinstalled ${e.name}`):mt.error(`Reinstall failed: ${D.stderr||D.stdout}`)},onError:()=>mt.error("Reinstall request failed")})},T=!a&&((P={skills:["denden"],roles:["ai-ceo","ai-employee"],agents:["strawpot-claude-code"],memories:["dial"]}[t])==null?void 0:P.includes(e.name)),N=(k=e.frontmatter)==null?void 0:k.metadata;return v.jsx(Hae,{open:n,onOpenChange:D=>{r(D),x(!1)},children:v.jsxs(Kae,{side:"right",className:"flex h-full flex-col sm:max-w-lg",children:[v.jsxs(Vae,{className:"shrink-0",children:[v.jsxs(Yae,{className:"flex items-center gap-2",children:[e.name,e.version&&v.jsxs(gn,{variant:"outline",className:"text-xs font-normal",children:["v",e.version]})]}),v.jsx(Xae,{children:e.description||"No description"})]}),v.jsxs("div",{className:"shrink-0 flex flex-col gap-4 px-4",children:[v.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[v.jsxs("span",{children:["Source: ",v.jsx("strong",{children:e.source})]}),v.jsxs("span",{children:["Path: ",v.jsx("code",{className:"rounded bg-muted px-1",children:e.path})]})]}),N&&Object.keys(N).length>0&&v.jsxs("details",{className:"text-sm",children:[v.jsx("summary",{className:"cursor-pointer font-medium text-muted-foreground",children:"Metadata"}),v.jsx("pre",{className:"mt-2 max-h-40 overflow-auto rounded-md bg-muted p-3 text-xs",children:JSON.stringify(N,null,2)})]})]}),v.jsxs(Am,{className:"min-h-0 flex-1 px-4",children:[t==="agents"&&v.jsx(Wae,{agentName:e.name}),v.jsx(Qae,{resourceType:t,resourceName:e.name,enabled:n,projectId:a}),v.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap mt-4",children:e.body||"No content."})]}),v.jsxs("div",{className:"shrink-0 border-t border-border p-4 flex gap-2",children:[v.jsx(Te,{size:"sm",onClick:C,disabled:S,children:p.isPending?"Updating...":"Update"}),v.jsx(Te,{variant:"outline",size:"sm",onClick:O,disabled:S,children:b.isPending?"Reinstalling...":"Reinstall"}),v.jsx("div",{className:"flex-1"}),!T&&v.jsxs(v.Fragment,{children:[v.jsx(Te,{variant:w?"destructive":"outline",size:"sm",onClick:E,disabled:S,children:d.isPending?"Uninstalling...":w?"Confirm Uninstall":"Uninstall"}),w&&!d.isPending&&v.jsx(Te,{variant:"ghost",size:"sm",onClick:()=>x(!1),children:"Cancel"})]})]})]})})}const Zae=[{value:"roles",label:"Role"},{value:"skills",label:"Skill"},{value:"agents",label:"Agent"},{value:"memories",label:"Memory"}];function pO({open:e,onOpenChange:t,defaultType:n,projectId:r}){const[a,i]=y.useState(n??"roles"),[s,c]=y.useState(""),[u,f]=y.useState(null),[m,d]=y.useState(null);y.useEffect(()=>{e&&n&&i(n)},[e,n]);const p=kae(),b=zae(r??0),w=r?b:p,x=(u==null?void 0:u.status)==="success",S=()=>{s.trim()&&(f(null),d(null),w.mutate({type:a,name:s.trim()},{onSuccess:C=>{C.exit_code===0?(mt.success(`Installed ${s.trim()}`),f({status:"success",message:`Successfully installed ${s.trim()}`}),d(C.stdout||null)):(f({status:"error",message:"Installation failed"}),d(C.stderr||C.stdout||"Unknown error."))},onError:()=>{f({status:"error",message:"Install request failed"}),mt.error("Install request failed")}}))},E=C=>{C||(f(null),d(null),c("")),t(C)};return v.jsx($c,{open:e,onOpenChange:E,children:v.jsxs(Bc,{className:"sm:max-w-md",children:[v.jsxs(Uc,{children:[v.jsx(Hc,{children:r?"Install Resource to Project":"Install Resource"}),v.jsx(CB,{children:"Install a resource from StrawHub by name."})]}),v.jsxs("div",{className:"flex flex-col gap-4",children:[u&&v.jsxs(ug,{variant:u.status==="error"?"destructive":"default",className:u.status==="success"?"border-green-200 bg-green-50 text-green-800 dark:border-green-800 dark:bg-green-950 dark:text-green-300":"",children:[u.status==="success"?v.jsx(rB,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):v.jsx(Tte,{className:"h-4 w-4"}),v.jsx(fg,{children:u.status==="success"?"Installed":"Error"}),v.jsx(dg,{children:u.message})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(kt,{htmlFor:"install-type",children:"Type"}),v.jsxs(xo,{value:a,onValueChange:i,disabled:x,children:[v.jsx(So,{id:"install-type",children:v.jsx(wo,{})}),v.jsx(Eo,{children:Zae.map(C=>v.jsx(Dn,{value:C.value,children:C.label},C.value))})]})]}),v.jsxs("div",{className:"flex flex-col gap-2",children:[v.jsx(kt,{htmlFor:"install-name",children:"Package Name"}),v.jsx(Tt,{id:"install-name",autoFocus:!0,value:s,onChange:C=>c(C.target.value),placeholder:"e.g. strawpot-claude-code",readOnly:x,onKeyDown:C=>{C.key==="Enter"&&S()}})]}),m&&v.jsxs("details",{className:"text-sm",children:[v.jsx("summary",{className:"cursor-pointer text-xs font-medium text-muted-foreground",children:"Output"}),v.jsx("pre",{className:"mt-2 max-h-40 overflow-auto rounded-md bg-muted p-3 text-xs",children:m})]})]}),v.jsx(OB,{children:(u==null?void 0:u.status)==="success"?v.jsx(Te,{onClick:()=>E(!1),children:"Done"}):v.jsx(Te,{onClick:S,disabled:!s.trim()||w.isPending,children:w.isPending?"Installing...":"Install"})})]})})}const Jae={roles:"Role",skills:"Skill",agents:"Agent",memories:"Memory"};function eie({projectId:e,installOpen:t,onInstallOpenChange:n}){const{data:r,isLoading:a}=TB(e),[i,s]=y.useState(null),[c,u]=y.useState(""),[f,m]=y.useState(!1),[d,p]=y.useState(!1),b=t??d,w=n??p,{data:x}=Eae(e,c,i??"",{enabled:f&&!!i&&!!c});return v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("p",{className:"text-sm text-muted-foreground",children:"Resources installed to this project"}),v.jsxs(Te,{onClick:()=>w(!0),size:"sm",children:[v.jsx(v0,{className:"mr-2 h-4 w-4"}),"Install"]})]}),a?v.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((S,E)=>v.jsx(tn,{className:"h-12 w-full"},E))}):!r||r.length===0?v.jsx("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-muted-foreground",children:"No project resources installed yet."}):v.jsx(hn,{children:v.jsx(mn,{className:"p-0",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Ge,{children:"Name"}),v.jsx(Ge,{children:"Type"}),v.jsx(Ge,{children:"Version"}),v.jsx(Ge,{children:"Description"}),v.jsx(Ge,{className:"w-24"})]})}),v.jsx(Kc,{children:r.map(S=>v.jsxs(Ir,{className:"cursor-pointer",onClick:()=>{s(S.name),u(S.type),m(!0)},children:[v.jsx(We,{className:"font-medium",children:S.name}),v.jsx(We,{children:v.jsx(gn,{variant:"outline",className:"text-xs",children:Jae[S.type]??S.type})}),v.jsx(We,{className:"text-sm text-muted-foreground",children:S.version??"—"}),v.jsx(We,{className:"max-w-[300px] truncate text-sm",children:S.description||"—"}),v.jsx(We,{children:v.jsx(tie,{projectId:e,resourceType:S.type,name:S.name})})]},`${S.type}-${S.name}`))})]})})}),v.jsx(DB,{resource:x??null,resourceType:c,open:f,onOpenChange:m,projectId:e}),v.jsx(pO,{open:b,onOpenChange:w,projectId:e})]})}function tie({projectId:e,resourceType:t,name:n}){const[r,a]=y.useState(!1),i=kB(e),s=c=>{c.stopPropagation(),i.mutate({type:t,name:n},{onSuccess:u=>{u.exit_code===0?mt.success(`Uninstalled ${n}`):mt.error(`Uninstall failed: ${u.stderr||u.stdout}`),a(!1)},onError:()=>{mt.error("Uninstall request failed"),a(!1)}})};return r?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(Te,{size:"sm",variant:"destructive",onClick:s,disabled:i.isPending,children:"Confirm"}),v.jsx(Te,{size:"sm",variant:"outline",onClick:c=>{c.stopPropagation(),a(!1)},children:"No"})]}):v.jsx(Te,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:c=>{c.stopPropagation(),a(!0)},children:v.jsx(Gf,{className:"h-4 w-4"})})}function nie(e,t="30d"){return Bn({queryKey:Ye.projects.stats(e,t),queryFn:()=>He.get(`/projects/${e}/stats?period=${t}`)})}var rie=["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"];function vO(e){if(typeof e!="string")return!1;var t=rie;return t.includes(e)}var aie=["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"],iie=new Set(aie);function IB(e){return typeof e!="string"?!1:iie.has(e)}function LB(e){return typeof e=="string"&&e.startsWith("data-")}function ta(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(IB(n)||LB(n))&&(t[n]=e[n]);return t}function Sc(e){if(e==null)return null;if(y.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return ta(t)}return typeof e=="object"&&!Array.isArray(e)?ta(e):null}function br(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(IB(n)||LB(n)||vO(n))&&(t[n]=e[n]);return t}function oie(e){return e==null?null:y.isValidElement(e)?br(e.props):typeof e=="object"&&!Array.isArray(e)?br(e):null}var sie=["children","width","height","viewBox","className","style","title","desc"];function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HE.apply(null,arguments)}function lie(e,t){if(e==null)return{};var n,r,a=cie(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function cie(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var gO=y.forwardRef((e,t)=>{var{children:n,width:r,height:a,viewBox:i,className:s,style:c,title:u,desc:f}=e,m=lie(e,sie),d=i||{width:r,height:a,x:0,y:0},p=st("recharts-surface",s);return y.createElement("svg",HE({},br(m),{className:p,width:r,height:a,style:c,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),y.createElement("title",null,u),y.createElement("desc",null,f),n)}),uie=["children","className"];function FE(){return FE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FE.apply(null,arguments)}function fie(e,t){if(e==null)return{};var n,r,a=die(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function die(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Cn=y.forwardRef((e,t)=>{var{children:n,className:r}=e,a=fie(e,uie),i=st("recharts-layer",r);return y.createElement("g",FE({className:i},br(a),{ref:t}),n)}),zB=y.createContext(null),hie=()=>y.useContext(zB);function Nt(e){return function(){return e}}const $B=Math.cos,Hg=Math.sin,ni=Math.sqrt,Fg=Math.PI,x0=2*Fg,qE=Math.PI,KE=2*qE,Kl=1e-6,mie=KE-Kl;function BB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function pie(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return BB;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class vie{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?BB:pie(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,s){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,c=this._y1,u=r-t,f=a-n,m=s-t,d=c-n,p=m*m+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>Kl)if(!(Math.abs(d*u-f*m)>Kl)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let b=r-s,w=a-c,x=u*u+f*f,S=b*b+w*w,E=Math.sqrt(x),C=Math.sqrt(p),O=i*Math.tan((qE-Math.acos((x+p-S)/(2*E*C)))/2),A=O/C,T=O/E;Math.abs(A-1)>Kl&&this._append`L${t+A*m},${n+A*d}`,this._append`A${i},${i},0,0,${+(d*b>m*w)},${this._x1=t+T*u},${this._y1=n+T*f}`}}arc(t,n,r,a,i,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(a),u=r*Math.sin(a),f=t+c,m=n+u,d=1^s,p=s?a-i:i-a;this._x1===null?this._append`M${f},${m}`:(Math.abs(this._x1-f)>Kl||Math.abs(this._y1-m)>Kl)&&this._append`L${f},${m}`,r&&(p<0&&(p=p%KE+KE),p>mie?this._append`A${r},${r},0,1,${d},${t-c},${n-u}A${r},${r},0,1,${d},${this._x1=f},${this._y1=m}`:p>Kl&&this._append`A${r},${r},0,${+(p>=qE)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function yO(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 vie(t)}function bO(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function UB(e){this._context=e}UB.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 w0(e){return new UB(e)}function HB(e){return e[0]}function FB(e){return e[1]}function qB(e,t){var n=Nt(!0),r=null,a=w0,i=null,s=yO(c);e=typeof e=="function"?e:e===void 0?HB:Nt(e),t=typeof t=="function"?t:t===void 0?FB:Nt(t);function c(u){var f,m=(u=bO(u)).length,d,p=!1,b;for(r==null&&(i=a(b=s())),f=0;f<=m;++f)!(f<m&&n(d=u[f],f,u))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(d,f,u),+t(d,f,u));if(b)return i=null,b+""||null}return c.x=function(u){return arguments.length?(e=typeof u=="function"?u:Nt(+u),c):e},c.y=function(u){return arguments.length?(t=typeof u=="function"?u:Nt(+u),c):t},c.defined=function(u){return arguments.length?(n=typeof u=="function"?u:Nt(!!u),c):n},c.curve=function(u){return arguments.length?(a=u,r!=null&&(i=a(r)),c):a},c.context=function(u){return arguments.length?(u==null?r=i=null:i=a(r=u),c):r},c}function kv(e,t,n){var r=null,a=Nt(!0),i=null,s=w0,c=null,u=yO(f);e=typeof e=="function"?e:e===void 0?HB:Nt(+e),t=typeof t=="function"?t:Nt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?FB:Nt(+n);function f(d){var p,b,w,x=(d=bO(d)).length,S,E=!1,C,O=new Array(x),A=new Array(x);for(i==null&&(c=s(C=u())),p=0;p<=x;++p){if(!(p<x&&a(S=d[p],p,d))===E)if(E=!E)b=p,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),w=p-1;w>=b;--w)c.point(O[w],A[w]);c.lineEnd(),c.areaEnd()}E&&(O[p]=+e(S,p,d),A[p]=+t(S,p,d),c.point(r?+r(S,p,d):O[p],n?+n(S,p,d):A[p]))}if(C)return c=null,C+""||null}function m(){return qB().defined(a).curve(s).context(i)}return f.x=function(d){return arguments.length?(e=typeof d=="function"?d:Nt(+d),r=null,f):e},f.x0=function(d){return arguments.length?(e=typeof d=="function"?d:Nt(+d),f):e},f.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Nt(+d),f):r},f.y=function(d){return arguments.length?(t=typeof d=="function"?d:Nt(+d),n=null,f):t},f.y0=function(d){return arguments.length?(t=typeof d=="function"?d:Nt(+d),f):t},f.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Nt(+d),f):n},f.lineX0=f.lineY0=function(){return m().x(e).y(t)},f.lineY1=function(){return m().x(e).y(n)},f.lineX1=function(){return m().x(r).y(t)},f.defined=function(d){return arguments.length?(a=typeof d=="function"?d:Nt(!!d),f):a},f.curve=function(d){return arguments.length?(s=d,i!=null&&(c=s(i)),f):s},f.context=function(d){return arguments.length?(d==null?i=c=null:c=s(i=d),f):i},f}class KB{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 gie(e){return new KB(e,!0)}function yie(e){return new KB(e,!1)}const xO={draw(e,t){const n=ni(t/Fg);e.moveTo(n,0),e.arc(0,0,n,0,x0)}},bie={draw(e,t){const n=ni(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()}},VB=ni(1/3),xie=VB*2,wie={draw(e,t){const n=ni(t/xie),r=n*VB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Sie={draw(e,t){const n=ni(t),r=-n/2;e.rect(r,r,n,n)}},Eie=.8908130915292852,YB=Hg(Fg/10)/Hg(7*Fg/10),_ie=Hg(x0/10)*YB,jie=-$B(x0/10)*YB,Oie={draw(e,t){const n=ni(t*Eie),r=_ie*n,a=jie*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=x0*i/5,c=$B(s),u=Hg(s);e.lineTo(u*n,-c*n),e.lineTo(c*r-u*a,u*r+c*a)}e.closePath()}},c1=ni(3),Cie={draw(e,t){const n=-ni(t/(c1*3));e.moveTo(0,n*2),e.lineTo(-c1*n,-n),e.lineTo(c1*n,-n),e.closePath()}},va=-.5,ga=ni(3)/2,VE=1/ni(12),Aie=(VE/2+1)*3,Nie={draw(e,t){const n=ni(t/Aie),r=n/2,a=n*VE,i=r,s=n*VE+n,c=-i,u=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(c,u),e.lineTo(va*r-ga*a,ga*r+va*a),e.lineTo(va*i-ga*s,ga*i+va*s),e.lineTo(va*c-ga*u,ga*c+va*u),e.lineTo(va*r+ga*a,va*a-ga*r),e.lineTo(va*i+ga*s,va*s-ga*i),e.lineTo(va*c+ga*u,va*u-ga*c),e.closePath()}};function Tie(e,t){let n=null,r=yO(a);e=typeof e=="function"?e:Nt(e||xO),t=typeof t=="function"?t:Nt(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Nt(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Nt(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function qg(){}function Kg(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 XB(e){this._context=e}XB.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:Kg(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:Kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pie(e){return new XB(e)}function GB(e){this._context=e}GB.prototype={areaStart:qg,areaEnd:qg,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:Kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Mie(e){return new GB(e)}function WB(e){this._context=e}WB.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:Kg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Rie(e){return new WB(e)}function QB(e){this._context=e}QB.prototype={areaStart:qg,areaEnd:qg,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 kie(e){return new QB(e)}function VM(e){return e<0?-1:1}function YM(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),s=(n-e._y1)/(a||r<0&&-0),c=(i*a+s*r)/(r+a);return(VM(i)+VM(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(c))||0}function XM(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function u1(e,t,n){var r=e._x0,a=e._y0,i=e._x1,s=e._y1,c=(i-r)/3;e._context.bezierCurveTo(r+c,a+c*t,i-c,s-c*n,i,s)}function Vg(e){this._context=e}Vg.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:u1(this,this._t0,XM(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,u1(this,XM(this,n=YM(this,e,t)),n);break;default:u1(this,this._t0,n=YM(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function ZB(e){this._context=new JB(e)}(ZB.prototype=Object.create(Vg.prototype)).point=function(e,t){Vg.prototype.point.call(this,t,e)};function JB(e){this._context=e}JB.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function Die(e){return new Vg(e)}function Iie(e){return new ZB(e)}function e8(e){this._context=e}e8.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=GM(e),a=GM(t),i=0,s=1;s<n;++i,++s)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[s],t[s]);(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 GM(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),s=new Array(n);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,s[t]-=r*s[t-1];for(a[n-1]=s[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Lie(e){return new e8(e)}function S0(e,t){this._context=e,this._t=t}S0.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 zie(e){return new S0(e,.5)}function $ie(e){return new S0(e,0)}function Bie(e){return new S0(e,1)}function Ec(e,t){if((s=e.length)>1)for(var n=1,r,a,i=e[t[0]],s,c=i.length;n<s;++n)for(a=i,i=e[t[n]],r=0;r<c;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function YE(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Uie(e,t){return e[t]}function Hie(e){const t=[];return t.key=e,t}function Fie(){var e=Nt([]),t=YE,n=Ec,r=Uie;function a(i){var s=Array.from(e.apply(this,arguments),Hie),c,u=s.length,f=-1,m;for(const d of i)for(c=0,++f;c<u;++c)(s[c][f]=[0,+r(d,s[c].key,f,i)]).data=d;for(c=0,m=bO(t(s));c<u;++c)s[m[c]].index=c;return n(s,m),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Nt(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:Nt(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?YE:typeof i=="function"?i:Nt(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??Ec,a):n},a}function qie(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,s;a<i;++a){for(s=n=0;n<r;++n)s+=e[n][a][1]||0;if(s)for(n=0;n<r;++n)e[n][a][1]/=s}Ec(e,t)}}function Kie(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var s=0,c=0;s<a;++s)c+=e[s][n][1]||0;r[n][1]+=r[n][0]=-c/2}Ec(e,t)}}function Vie(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,s;r<i;++r){for(var c=0,u=0,f=0;c<s;++c){for(var m=e[t[c]],d=m[r][1]||0,p=m[r-1][1]||0,b=(d-p)/2,w=0;w<c;++w){var x=e[t[w]],S=x[r][1]||0,E=x[r-1][1]||0;b+=S-E}u+=d,f+=b*d}a[r-1][1]+=a[r-1][0]=n,u&&(n-=f/u)}a[r-1][1]+=a[r-1][0]=n,Ec(e,t)}}var f1={},d1={},WM;function Yie(){return WM||(WM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(d1)),d1}var h1={},QM;function t8(){return QM||(QM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(h1)),h1}var m1={},ZM;function wO(){return ZM||(ZM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var r;return typeof n=="string"||typeof n=="symbol"?n:Object.is((r=n==null?void 0:n.valueOf)==null?void 0:r.call(n),-0)?"-0":String(n)}e.toKey=t})(m1)),m1}var p1={},v1={},JM;function Xie(){return JM||(JM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(n==null)return"";if(typeof n=="string")return n;if(Array.isArray(n))return n.map(t).join(",");const r=String(n);return r==="0"&&Object.is(Number(n),-0)?"-0":r}e.toString=t})(v1)),v1}var eR;function SO(){return eR||(eR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xie(),n=wO();function r(a){if(Array.isArray(a))return a.map(n.toKey);if(typeof a=="symbol")return[a];a=t.toString(a);const i=[],s=a.length;if(s===0)return i;let c=0,u="",f="",m=!1;for(a.charCodeAt(0)===46&&(i.push(""),c++);c<s;){const d=a[c];f?d==="\\"&&c+1<s?(c++,u+=a[c]):d===f?f="":u+=d:m?d==='"'||d==="'"?f=d:d==="]"?(m=!1,i.push(u),u=""):u+=d:d==="["?(m=!0,u&&(i.push(u),u="")):d==="."?u&&(i.push(u),u=""):u+=d,c++}return u&&i.push(u),i}e.toPath=r})(p1)),p1}var tR;function EO(){return tR||(tR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Yie(),n=t8(),r=wO(),a=SO();function i(c,u,f){if(c==null)return f;switch(typeof u){case"string":{if(t.isUnsafeProperty(u))return f;const m=c[u];return m===void 0?n.isDeepKey(u)?i(c,a.toPath(u),f):f:m}case"number":case"symbol":{typeof u=="number"&&(u=r.toKey(u));const m=c[u];return m===void 0?f:m}default:{if(Array.isArray(u))return s(c,u,f);if(Object.is(u==null?void 0:u.valueOf(),-0)?u="-0":u=String(u),t.isUnsafeProperty(u))return f;const m=c[u];return m===void 0?f:m}}}function s(c,u,f){if(u.length===0)return f;let m=c;for(let d=0;d<u.length;d++){if(m==null||t.isUnsafeProperty(u[d]))return f;m=m[u[d]]}return m===void 0?f:m}e.get=i})(f1)),f1}var g1,nR;function Gie(){return nR||(nR=1,g1=EO().get),g1}var Wie=Gie();const _c=Za(Wie);var Qie=4;function Xs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Qie,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function Jt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((a,i,s)=>{var c=n[s-1];return typeof c=="string"?a+c+i:c!==void 0?a+Xs(c)+i:a+i},"")}var Ln=e=>e===0?0:e>0?1:-1,Ni=e=>typeof e=="number"&&e!=+e,jc=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,_e=e=>(typeof e=="number"||e instanceof Number)&&!Ni(e),Ti=e=>_e(e)||typeof e=="string",Zie=0,$h=e=>{var t=++Zie;return"".concat(e||"").concat(t)},cr=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!_e(t)&&typeof t!="string")return r;var i;if(jc(t)){if(n==null)return r;var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return Ni(i)&&(i=r),a&&n!=null&&i>n&&(i=n),i},n8=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function $t(e,t,n){return _e(e)&&_e(t)?Xs(e+n*(t-e)):t}function r8(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):_c(r,t))===n)}var Ht=e=>e===null||typeof e>"u",Nm=e=>Ht(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function kr(e){return e!=null}function hl(){}var Jie=["type","size","sizeType"];function XE(){return XE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XE.apply(null,arguments)}function rR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function aR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rR(Object(n),!0).forEach(function(r){eoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eoe(e,t,n){return(t=toe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function toe(e){var t=noe(e,"string");return typeof t=="symbol"?t:t+""}function noe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function roe(e,t){if(e==null)return{};var n,r,a=aoe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function aoe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var a8={symbolCircle:xO,symbolCross:bie,symbolDiamond:wie,symbolSquare:Sie,symbolStar:Oie,symbolTriangle:Cie,symbolWye:Nie},ioe=Math.PI/180,ooe=e=>{var t="symbol".concat(Nm(e));return a8[t]||xO},soe=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*ioe;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},loe=(e,t)=>{a8["symbol".concat(Nm(e))]=t},_O=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,a=roe(e,Jie),i=aR(aR({},a),{},{type:t,size:n,sizeType:r}),s="circle";typeof t=="string"&&(s=t);var c=()=>{var p=ooe(s),b=Tie().type(p).size(soe(n,r,s)),w=b();if(w!==null)return w},{className:u,cx:f,cy:m}=i,d=br(i);return _e(f)&&_e(m)&&_e(n)?y.createElement("path",XE({},d,{className:st("recharts-symbols",u),transform:"translate(".concat(f,", ").concat(m,")"),d:c()})):null};_O.registerSymbol=loe;var i8=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,jO=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(y.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(a=>{vO(a)&&typeof n[a]=="function"&&(r[a]=(i=>n[a](n,i)))}),r},coe=(e,t,n)=>r=>(e(t,n,r),null),Tm=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(a=>{var i=e[a];vO(a)&&typeof i=="function"&&(r||(r={}),r[a]=coe(i,t,n))}),r};function iR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function uoe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iR(Object(n),!0).forEach(function(r){foe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function foe(e,t,n){return(t=doe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function doe(e){var t=hoe(e,"string");return typeof t=="symbol"?t:t+""}function hoe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bn(e,t){var n=uoe({},e),r=t,a=Object.keys(t),i=a.reduce((s,c)=>(s[c]===void 0&&r[c]!==void 0&&(s[c]=r[c]),s),n);return i}function Yg(){return Yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yg.apply(null,arguments)}function oR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function o8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oR(Object(n),!0).forEach(function(r){moe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function moe(e,t,n){return(t=poe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function poe(e){var t=voe(e,"string");return typeof t=="symbol"?t:t+""}function voe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ba=32,goe={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function yoe(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function boe(e){var{data:t,iconType:n,inactiveColor:r}=e,a=ba/2,i=ba/6,s=ba/3,c=t.inactive?r:t.color,u=n??t.type;if(u==="none")return null;if(u==="plainline")return y.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:yoe(t.payload),x1:0,y1:a,x2:ba,y2:a,className:"recharts-legend-icon"});if(u==="line")return y.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(s,`
            A`).concat(i,",").concat(i,",0,1,1,").concat(2*s,",").concat(a,`
            H`).concat(ba,"M").concat(2*s,",").concat(a,`
            A`).concat(i,",").concat(i,",0,1,1,").concat(s,",").concat(a),className:"recharts-legend-icon"});if(u==="rect")return y.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(ba/8,"h").concat(ba,"v").concat(ba*3/4,"h").concat(-ba,"z"),className:"recharts-legend-icon"});if(y.isValidElement(t.legendIcon)){var f=o8({},t);return delete f.legendIcon,y.cloneElement(t.legendIcon,f)}return y.createElement(_O,{fill:c,cx:a,cy:a,size:ba,sizeType:"diameter",type:u})}function xoe(e){var{payload:t,iconSize:n,layout:r,formatter:a,inactiveColor:i,iconType:s,labelStyle:c}=e,u={x:0,y:0,width:ba,height:ba},f={display:r==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((d,p)=>{var b=d.formatter||a,w=st({"recharts-legend-item":!0,["legend-item-".concat(p)]:!0,inactive:d.inactive});if(d.type==="none")return null;var x=typeof c=="object"?o8({},c):{};x.color=d.inactive?i:x.color||d.color;var S=b?b(d.value,d,p):d.value;return y.createElement("li",Yg({className:w,style:f,key:"legend-item-".concat(p)},Tm(e,d,p)),y.createElement(gO,{width:n,height:n,viewBox:u,style:m,"aria-label":"".concat(S," legend icon")},y.createElement(boe,{data:d,iconType:s,inactiveColor:i})),y.createElement("span",{className:"recharts-legend-item-text",style:x},S))})}var woe=e=>{var t=bn(e,goe),{payload:n,layout:r,align:a}=t;if(!n||!n.length)return null;var i={padding:0,margin:0,textAlign:r==="horizontal"?a:"left"};return y.createElement("ul",{className:"recharts-default-legend",style:i},y.createElement(xoe,Yg({},t,{payload:n})))},y1={},b1={},sR;function Soe(){return sR||(sR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const a=new Map;for(let i=0;i<n.length;i++){const s=n[i],c=r(s,i,n);a.has(c)||a.set(c,s)}return Array.from(a.values())}e.uniqBy=t})(b1)),b1}var x1={},lR;function Eoe(){return lR||(lR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return function(...a){return n.apply(this,a.slice(0,r))}}e.ary=t})(x1)),x1}var w1={},cR;function s8(){return cR||(cR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(w1)),w1}var S1={},E1={},_1={},uR;function _oe(){return uR||(uR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(_1)),_1}var fR;function l8(){return fR||(fR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_oe();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(E1)),E1}var j1={},dR;function joe(){return dR||(dR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(j1)),j1}var hR;function Ooe(){return hR||(hR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=l8(),n=joe();function r(a){return n.isObjectLike(a)&&t.isArrayLike(a)}e.isArrayLikeObject=r})(S1)),S1}var O1={},C1={},mR;function Coe(){return mR||(mR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EO();function n(r){return function(a){return t.get(a,r)}}e.property=n})(C1)),C1}var A1={},N1={},T1={},P1={},pR;function c8(){return pR||(pR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(P1)),P1}var M1={},vR;function u8(){return vR||(vR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(M1)),M1}var R1={},gR;function f8(){return gR||(gR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.isEqualsSameValueZero=t})(R1)),R1}var yR;function Aoe(){return yR||(yR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=c8(),n=u8(),r=f8();function a(m,d,p){return typeof p!="function"?a(m,d,()=>{}):i(m,d,function b(w,x,S,E,C,O){const A=p(w,x,S,E,C,O);return A!==void 0?!!A:i(w,x,b,O)},new Map)}function i(m,d,p,b){if(d===m)return!0;switch(typeof d){case"object":return s(m,d,p,b);case"function":return Object.keys(d).length>0?i(m,{...d},p,b):r.isEqualsSameValueZero(m,d);default:return t.isObject(m)?typeof d=="string"?d==="":!0:r.isEqualsSameValueZero(m,d)}}function s(m,d,p,b){if(d==null)return!0;if(Array.isArray(d))return u(m,d,p,b);if(d instanceof Map)return c(m,d,p,b);if(d instanceof Set)return f(m,d,p,b);const w=Object.keys(d);if(m==null||n.isPrimitive(m))return w.length===0;if(w.length===0)return!0;if(b!=null&&b.has(d))return b.get(d)===m;b==null||b.set(d,m);try{for(let x=0;x<w.length;x++){const S=w[x];if(!n.isPrimitive(m)&&!(S in m)||d[S]===void 0&&m[S]!==void 0||d[S]===null&&m[S]!==null||!p(m[S],d[S],S,m,d,b))return!1}return!0}finally{b==null||b.delete(d)}}function c(m,d,p,b){if(d.size===0)return!0;if(!(m instanceof Map))return!1;for(const[w,x]of d.entries()){const S=m.get(w);if(p(S,x,w,m,d,b)===!1)return!1}return!0}function u(m,d,p,b){if(d.length===0)return!0;if(!Array.isArray(m))return!1;const w=new Set;for(let x=0;x<d.length;x++){const S=d[x];let E=!1;for(let C=0;C<m.length;C++){if(w.has(C))continue;const O=m[C];let A=!1;if(p(O,S,x,m,d,b)&&(A=!0),A){w.add(C),E=!0;break}}if(!E)return!1}return!0}function f(m,d,p,b){return d.size===0?!0:m instanceof Set?u([...m],[...d],p,b):!1}e.isMatchWith=a,e.isSetMatch=f})(T1)),T1}var bR;function d8(){return bR||(bR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Aoe();function n(r,a){return t.isMatchWith(r,a,()=>{})}e.isMatch=n})(N1)),N1}var k1={},D1={},I1={},xR;function Noe(){return xR||(xR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(I1)),I1}var L1={},wR;function OO(){return wR||(wR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(L1)),L1}var z1={},SR;function h8(){return SR||(SR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",a="[object Boolean]",i="[object Arguments]",s="[object Symbol]",c="[object Date]",u="[object Map]",f="[object Set]",m="[object Array]",d="[object Function]",p="[object ArrayBuffer]",b="[object Object]",w="[object Error]",x="[object DataView]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",C="[object Uint16Array]",O="[object Uint32Array]",A="[object BigUint64Array]",T="[object Int8Array]",N="[object Int16Array]",P="[object Int32Array]",k="[object BigInt64Array]",D="[object Float32Array]",K="[object Float64Array]";e.argumentsTag=i,e.arrayBufferTag=p,e.arrayTag=m,e.bigInt64ArrayTag=k,e.bigUint64ArrayTag=A,e.booleanTag=a,e.dataViewTag=x,e.dateTag=c,e.errorTag=w,e.float32ArrayTag=D,e.float64ArrayTag=K,e.functionTag=d,e.int16ArrayTag=N,e.int32ArrayTag=P,e.int8ArrayTag=T,e.mapTag=u,e.numberTag=r,e.objectTag=b,e.regexpTag=t,e.setTag=f,e.stringTag=n,e.symbolTag=s,e.uint16ArrayTag=C,e.uint32ArrayTag=O,e.uint8ArrayTag=S,e.uint8ClampedArrayTag=E})(z1)),z1}var $1={},ER;function Toe(){return ER||(ER=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})($1)),$1}var _R;function m8(){return _R||(_R=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Noe(),n=OO(),r=h8(),a=u8(),i=Toe();function s(m,d){return c(m,void 0,m,new Map,d)}function c(m,d,p,b=new Map,w=void 0){const x=w==null?void 0:w(m,d,p,b);if(x!==void 0)return x;if(a.isPrimitive(m))return m;if(b.has(m))return b.get(m);if(Array.isArray(m)){const S=new Array(m.length);b.set(m,S);for(let E=0;E<m.length;E++)S[E]=c(m[E],E,p,b,w);return Object.hasOwn(m,"index")&&(S.index=m.index),Object.hasOwn(m,"input")&&(S.input=m.input),S}if(m instanceof Date)return new Date(m.getTime());if(m instanceof RegExp){const S=new RegExp(m.source,m.flags);return S.lastIndex=m.lastIndex,S}if(m instanceof Map){const S=new Map;b.set(m,S);for(const[E,C]of m)S.set(E,c(C,E,p,b,w));return S}if(m instanceof Set){const S=new Set;b.set(m,S);for(const E of m)S.add(c(E,void 0,p,b,w));return S}if(typeof Buffer<"u"&&Buffer.isBuffer(m))return m.subarray();if(i.isTypedArray(m)){const S=new(Object.getPrototypeOf(m)).constructor(m.length);b.set(m,S);for(let E=0;E<m.length;E++)S[E]=c(m[E],E,p,b,w);return S}if(m instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&m instanceof SharedArrayBuffer)return m.slice(0);if(m instanceof DataView){const S=new DataView(m.buffer.slice(0),m.byteOffset,m.byteLength);return b.set(m,S),u(S,m,p,b,w),S}if(typeof File<"u"&&m instanceof File){const S=new File([m],m.name,{type:m.type});return b.set(m,S),u(S,m,p,b,w),S}if(typeof Blob<"u"&&m instanceof Blob){const S=new Blob([m],{type:m.type});return b.set(m,S),u(S,m,p,b,w),S}if(m instanceof Error){const S=structuredClone(m);return b.set(m,S),S.message=m.message,S.name=m.name,S.stack=m.stack,S.cause=m.cause,S.constructor=m.constructor,u(S,m,p,b,w),S}if(m instanceof Boolean){const S=new Boolean(m.valueOf());return b.set(m,S),u(S,m,p,b,w),S}if(m instanceof Number){const S=new Number(m.valueOf());return b.set(m,S),u(S,m,p,b,w),S}if(m instanceof String){const S=new String(m.valueOf());return b.set(m,S),u(S,m,p,b,w),S}if(typeof m=="object"&&f(m)){const S=Object.create(Object.getPrototypeOf(m));return b.set(m,S),u(S,m,p,b,w),S}return m}function u(m,d,p=m,b,w){const x=[...Object.keys(d),...t.getSymbols(d)];for(let S=0;S<x.length;S++){const E=x[S],C=Object.getOwnPropertyDescriptor(m,E);(C==null||C.writable)&&(m[E]=c(d[E],E,p,b,w))}}function f(m){switch(n.getTag(m)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=s,e.cloneDeepWithImpl=c,e.copyProperties=u})(D1)),D1}var jR;function Poe(){return jR||(jR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m8();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(k1)),k1}var OR;function Moe(){return OR||(OR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=d8(),n=Poe();function r(a){return a=n.cloneDeep(a),i=>t.isMatch(i,a)}e.matches=r})(A1)),A1}var B1={},U1={},H1={},CR;function Roe(){return CR||(CR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m8(),n=OO(),r=h8();function a(i,s){return t.cloneDeepWith(i,(c,u,f,m)=>{const d=s==null?void 0:s(c,u,f,m);if(d!==void 0)return d;if(typeof i=="object"){if(n.getTag(i)===r.objectTag&&typeof i.constructor!="function"){const p={};return m.set(i,p),t.copyProperties(p,i,f,m),p}switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const p=new i.constructor(i==null?void 0:i.valueOf());return t.copyProperties(p,i),p}case r.argumentsTag:{const p={};return t.copyProperties(p,i),p.length=i.length,p[Symbol.iterator]=i[Symbol.iterator],p}default:return}}})}e.cloneDeepWith=a})(H1)),H1}var AR;function koe(){return AR||(AR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Roe();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(U1)),U1}var F1={},q1={},NR;function p8(){return NR||(NR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,a=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<a;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(q1)),q1}var K1={},TR;function Doe(){return TR||(TR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=OO();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(K1)),K1}var PR;function Ioe(){return PR||(PR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=t8(),n=p8(),r=Doe(),a=SO();function i(s,c){let u;if(Array.isArray(c)?u=c:typeof c=="string"&&t.isDeepKey(c)&&(s==null?void 0:s[c])==null?u=a.toPath(c):u=[c],u.length===0)return!1;let f=s;for(let m=0;m<u.length;m++){const d=u[m];if((f==null||!Object.hasOwn(f,d))&&!((Array.isArray(f)||r.isArguments(f))&&n.isIndex(d)&&d<f.length))return!1;f=f[d]}return!0}e.has=i})(F1)),F1}var MR;function Loe(){return MR||(MR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=d8(),n=wO(),r=koe(),a=EO(),i=Ioe();function s(c,u){switch(typeof c){case"object":{Object.is(c==null?void 0:c.valueOf(),-0)&&(c="-0");break}case"number":{c=n.toKey(c);break}}return u=r.cloneDeep(u),function(f){const m=a.get(f,c);return m===void 0?i.has(f,c):u===void 0?m===void 0:t.isMatch(m,u)}}e.matchesProperty=s})(B1)),B1}var RR;function zoe(){return RR||(RR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=s8(),n=Coe(),r=Moe(),a=Loe();function i(s){if(s==null)return t.identity;switch(typeof s){case"function":return s;case"object":return Array.isArray(s)&&s.length===2?a.matchesProperty(s[0],s[1]):r.matches(s);case"string":case"symbol":case"number":return n.property(s)}}e.iteratee=i})(O1)),O1}var kR;function $oe(){return kR||(kR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Soe(),n=Eoe(),r=s8(),a=Ooe(),i=zoe();function s(c,u=r.identity){return a.isArrayLikeObject(c)?t.uniqBy(Array.from(c),n.ary(i.iteratee(u),1)):[]}e.uniqBy=s})(y1)),y1}var V1,DR;function Boe(){return DR||(DR=1,V1=$oe().uniqBy),V1}var Uoe=Boe();const IR=Za(Uoe);function v8(e,t,n){return t===!0?IR(e,n):typeof t=="function"?IR(e,t):e}var Y1={exports:{}},X1={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var LR;function Hoe(){if(LR)return X1;LR=1;var e=Uf(),t=JG();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,c=e.useMemo,u=e.useDebugValue;return X1.useSyncExternalStoreWithSelector=function(f,m,d,p,b){var w=i(null);if(w.current===null){var x={hasValue:!1,value:null};w.current=x}else x=w.current;w=c(function(){function E(N){if(!C){if(C=!0,O=N,N=p(N),b!==void 0&&x.hasValue){var P=x.value;if(b(P,N))return A=P}return A=N}if(P=A,r(O,N))return P;var k=p(N);return b!==void 0&&b(P,k)?(O=N,P):(O=N,A=k)}var C=!1,O,A,T=d===void 0?null:d;return[function(){return E(m())},T===null?void 0:function(){return E(T())}]},[m,d,p,b]);var S=a(f,w[0],w[1]);return s(function(){x.hasValue=!0,x.value=S},[S]),u(S),S},X1}var zR;function Foe(){return zR||(zR=1,Y1.exports=Hoe()),Y1.exports}var g8=Foe();const qoe=Za(g8);var CO=y.createContext(null),Koe=e=>e,_t=()=>{var e=y.useContext(CO);return e?e.store.dispatch:Koe},hg=()=>{},Voe=()=>hg,Yoe=(e,t)=>e===t;function Ae(e){var t=y.useContext(CO),n=y.useMemo(()=>t?r=>{if(r!=null)return e(r)}:hg,[t,e]);return g8.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:Voe,t?t.store.getState:hg,t?t.store.getState:hg,n,Yoe)}function Xoe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Goe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Woe(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var $R=e=>Array.isArray(e)?e:[e];function Qoe(e){const t=Array.isArray(e[0])?e[0]:e;return Woe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Zoe(e,t){const n=[],{length:r}=e;for(let a=0;a<r;a++)n.push(e[a].apply(null,t));return n}var Joe=class{constructor(e){this.value=e}deref(){return this.value}},ese=typeof WeakRef<"u"?WeakRef:Joe,tse=0,BR=1;function Dv(){return{s:tse,v:void 0,o:null,p:null}}function y8(e,t={}){let n=Dv();const{resultEqualityCheck:r}=t;let a,i=0;function s(){var d;let c=n;const{length:u}=arguments;for(let p=0,b=u;p<b;p++){const w=arguments[p];if(typeof w=="function"||typeof w=="object"&&w!==null){let x=c.o;x===null&&(c.o=x=new WeakMap);const S=x.get(w);S===void 0?(c=Dv(),x.set(w,c)):c=S}else{let x=c.p;x===null&&(c.p=x=new Map);const S=x.get(w);S===void 0?(c=Dv(),x.set(w,c)):c=S}}const f=c;let m;if(c.s===BR)m=c.v;else if(m=e.apply(null,arguments),i++,r){const p=((d=a==null?void 0:a.deref)==null?void 0:d.call(a))??a;p!=null&&r(p,m)&&(m=p,i!==0&&i--),a=typeof m=="object"&&m!==null||typeof m=="function"?new ese(m):m}return f.s=BR,f.v=m,m}return s.clearCache=()=>{n=Dv(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function nse(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...a)=>{let i=0,s=0,c,u={},f=a.pop();typeof f=="object"&&(u=f,f=a.pop()),Xoe(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const m={...n,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:b=y8,argsMemoizeOptions:w=[]}=m,x=$R(p),S=$R(w),E=Qoe(a),C=d(function(){return i++,f.apply(null,arguments)},...x),O=b(function(){s++;const T=Zoe(E,arguments);return c=C.apply(null,T),c},...S);return Object.assign(O,{resultFunc:f,memoizedResultFunc:C,dependencies:E,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:b})};return Object.assign(r,{withTypes:()=>r}),r}var oe=nse(y8),rse=Object.assign((e,t=oe)=>{Goe(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,c,u)=>(s[n[u]]=c,s),{}))},{withTypes:()=>rse}),G1={},W1={},Q1={},UR;function ase(){return UR||(UR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"?1:r===null?2:r===void 0?3:r!==r?4:0}const n=(r,a,i)=>{if(r!==a){const s=t(r),c=t(a);if(s===c&&s===0){if(r<a)return i==="desc"?1:-1;if(r>a)return i==="desc"?-1:1}return i==="desc"?c-s:s-c}return 0};e.compareValues=n})(Q1)),Q1}var Z1={},J1={},HR;function b8(){return HR||(HR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"||n instanceof Symbol}e.isSymbol=t})(J1)),J1}var FR;function ise(){return FR||(FR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=b8(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(i,s){return Array.isArray(i)?!1:typeof i=="number"||typeof i=="boolean"||i==null||t.isSymbol(i)?!0:typeof i=="string"&&(r.test(i)||!n.test(i))||s!=null&&Object.hasOwn(s,i)}e.isKey=a})(Z1)),Z1}var qR;function ose(){return qR||(qR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ase(),n=ise(),r=SO();function a(i,s,c,u){if(i==null)return[];c=u?void 0:c,Array.isArray(i)||(i=Object.values(i)),Array.isArray(s)||(s=s==null?[null]:[s]),s.length===0&&(s=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(b=>String(b));const f=(b,w)=>{let x=b;for(let S=0;S<w.length&&x!=null;++S)x=x[w[S]];return x},m=(b,w)=>w==null||b==null?w:typeof b=="object"&&"key"in b?Object.hasOwn(w,b.key)?w[b.key]:f(w,b.path):typeof b=="function"?b(w):Array.isArray(b)?f(w,b):typeof w=="object"?w[b]:w,d=s.map(b=>(Array.isArray(b)&&b.length===1&&(b=b[0]),b==null||typeof b=="function"||Array.isArray(b)||n.isKey(b)?b:{key:b,path:r.toPath(b)}));return i.map(b=>({original:b,criteria:d.map(w=>m(w,b))})).slice().sort((b,w)=>{for(let x=0;x<d.length;x++){const S=t.compareValues(b.criteria[x],w.criteria[x],c[x]);if(S!==0)return S}return 0}).map(b=>b.original)}e.orderBy=a})(W1)),W1}var eS={},KR;function sse(){return KR||(KR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r=1){const a=[],i=Math.floor(r),s=(c,u)=>{for(let f=0;f<c.length;f++){const m=c[f];Array.isArray(m)&&u<i?s(m,u+1):a.push(m)}};return s(n,0),a}e.flatten=t})(eS)),eS}var tS={},VR;function x8(){return VR||(VR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=p8(),n=l8(),r=c8(),a=f8();function i(s,c,u){return r.isObject(u)&&(typeof c=="number"&&n.isArrayLike(u)&&t.isIndex(c)&&c<u.length||typeof c=="string"&&c in u)?a.isEqualsSameValueZero(u[c],s):!1}e.isIterateeCall=i})(tS)),tS}var YR;function lse(){return YR||(YR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ose(),n=sse(),r=x8();function a(i,...s){const c=s.length;return c>1&&r.isIterateeCall(i,s[0],s[1])?s=[]:c>2&&r.isIterateeCall(s[0],s[1],s[2])&&(s=[s[0]]),t.orderBy(i,n.flatten(s),["asc"])}e.sortBy=a})(G1)),G1}var nS,XR;function cse(){return XR||(XR=1,nS=lse().sortBy),nS}var use=cse();const E0=Za(use);var w8=e=>e.legend.settings,fse=e=>e.legend.size,dse=e=>e.legend.payload,hse=oe([dse,w8],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?E0(r,n):r});function mse(){return Ae(hse)}var Iv=1;function S8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=y.useState({height:0,left:0,top:0,width:0}),r=y.useCallback(a=>{if(a!=null){var i=a.getBoundingClientRect(),s={height:i.height,left:i.left,top:i.top,width:i.width};(Math.abs(s.height-t.height)>Iv||Math.abs(s.left-t.left)>Iv||Math.abs(s.top-t.top)>Iv||Math.abs(s.width-t.width)>Iv)&&n({height:s.height,left:s.left,top:s.top,width:s.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,r]}function Gn(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var pse=typeof Symbol=="function"&&Symbol.observable||"@@observable",GR=pse,rS=()=>Math.random().toString(36).substring(7).split("").join("."),vse={INIT:`@@redux/INIT${rS()}`,REPLACE:`@@redux/REPLACE${rS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${rS()}`},Xg=vse;function AO(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function E8(e,t,n){if(typeof e!="function")throw new Error(Gn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Gn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Gn(1));return n(E8)(e,t)}let r=e,a=t,i=new Map,s=i,c=0,u=!1;function f(){s===i&&(s=new Map,i.forEach((S,E)=>{s.set(E,S)}))}function m(){if(u)throw new Error(Gn(3));return a}function d(S){if(typeof S!="function")throw new Error(Gn(4));if(u)throw new Error(Gn(5));let E=!0;f();const C=c++;return s.set(C,S),function(){if(E){if(u)throw new Error(Gn(6));E=!1,f(),s.delete(C),i=null}}}function p(S){if(!AO(S))throw new Error(Gn(7));if(typeof S.type>"u")throw new Error(Gn(8));if(typeof S.type!="string")throw new Error(Gn(17));if(u)throw new Error(Gn(9));try{u=!0,a=r(a,S)}finally{u=!1}return(i=s).forEach(C=>{C()}),S}function b(S){if(typeof S!="function")throw new Error(Gn(10));r=S,p({type:Xg.REPLACE})}function w(){const S=d;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Gn(11));function C(){const A=E;A.next&&A.next(m())}return C(),{unsubscribe:S(C)}},[GR](){return this}}}return p({type:Xg.INIT}),{dispatch:p,subscribe:d,getState:m,replaceReducer:b,[GR]:w}}function gse(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Xg.INIT})>"u")throw new Error(Gn(12));if(typeof n(void 0,{type:Xg.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Gn(13))})}function _8(e){const t=Object.keys(e),n={};for(let i=0;i<t.length;i++){const s=t[i];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let a;try{gse(n)}catch(i){a=i}return function(s={},c){if(a)throw a;let u=!1;const f={};for(let m=0;m<r.length;m++){const d=r[m],p=n[d],b=s[d],w=p(b,c);if(typeof w>"u")throw c&&c.type,new Error(Gn(14));f[d]=w,u=u||w!==b}return u=u||r.length!==Object.keys(s).length,u?f:s}}function Gg(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function yse(...e){return t=>(n,r)=>{const a=t(n,r);let i=()=>{throw new Error(Gn(15))};const s={getState:a.getState,dispatch:(u,...f)=>i(u,...f)},c=e.map(u=>u(s));return i=Gg(...c)(a.dispatch),{...a,dispatch:i}}}function j8(e){return AO(e)&&"type"in e&&typeof e.type=="string"}var O8=Symbol.for("immer-nothing"),WR=Symbol.for("immer-draftable"),xr=Symbol.for("immer-state");function Ha(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Zr=Object,jf=Zr.getPrototypeOf,Wg="constructor",_0="prototype",GE="configurable",Qg="enumerable",mg="writable",Bh="value",Mo=e=>!!e&&!!e[xr];function Qa(e){var t;return e?C8(e)||O0(e)||!!e[WR]||!!((t=e[Wg])!=null&&t[WR])||C0(e)||A0(e):!1}var bse=Zr[_0][Wg].toString(),QR=new WeakMap;function C8(e){if(!e||!NO(e))return!1;const t=jf(e);if(t===null||t===Zr[_0])return!0;const n=Zr.hasOwnProperty.call(t,Wg)&&t[Wg];if(n===Object)return!0;if(!Gu(n))return!1;let r=QR.get(n);return r===void 0&&(r=Function.toString.call(n),QR.set(n,r)),r===bse}function j0(e,t,n=!0){Pm(e)===0?(n?Reflect.ownKeys(e):Zr.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function Pm(e){const t=e[xr];return t?t.type_:O0(e)?1:C0(e)?2:A0(e)?3:0}var ZR=(e,t,n=Pm(e))=>n===2?e.has(t):Zr[_0].hasOwnProperty.call(e,t),WE=(e,t,n=Pm(e))=>n===2?e.get(t):e[t],Zg=(e,t,n,r=Pm(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function xse(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var O0=Array.isArray,C0=e=>e instanceof Map,A0=e=>e instanceof Set,NO=e=>typeof e=="object",Gu=e=>typeof e=="function",aS=e=>typeof e=="boolean";function wse(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var uo=e=>e.copy_||e.base_,TO=e=>e.modified_?e.copy_:e.base_;function QE(e,t){if(C0(e))return new Map(e);if(A0(e))return new Set(e);if(O0(e))return Array[_0].slice.call(e);const n=C8(e);if(t===!0||t==="class_only"&&!n){const r=Zr.getOwnPropertyDescriptors(e);delete r[xr];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const s=a[i],c=r[s];c[mg]===!1&&(c[mg]=!0,c[GE]=!0),(c.get||c.set)&&(r[s]={[GE]:!0,[mg]:!0,[Qg]:c[Qg],[Bh]:e[s]})}return Zr.create(jf(e),r)}else{const r=jf(e);if(r!==null&&n)return{...e};const a=Zr.create(r);return Zr.assign(a,e)}}function PO(e,t=!1){return N0(e)||Mo(e)||!Qa(e)||(Pm(e)>1&&Zr.defineProperties(e,{set:Lv,add:Lv,clear:Lv,delete:Lv}),Zr.freeze(e),t&&j0(e,(n,r)=>{PO(r,!0)},!1)),e}function Sse(){Ha(2)}var Lv={[Bh]:Sse};function N0(e){return e===null||!NO(e)?!0:Zr.isFrozen(e)}var Jg="MapSet",ZE="Patches",JR="ArrayMethods",A8={};function Oc(e){const t=A8[e];return t||Ha(0,e),t}var ek=e=>!!A8[e],Uh,N8=()=>Uh,Ese=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ek(Jg)?Oc(Jg):void 0,arrayMethodsPlugin_:ek(JR)?Oc(JR):void 0});function tk(e,t){t&&(e.patchPlugin_=Oc(ZE),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function JE(e){e_(e),e.drafts_.forEach(_se),e.drafts_=null}function e_(e){e===Uh&&(Uh=e.parent_)}var nk=e=>Uh=Ese(Uh,e);function _se(e){const t=e[xr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[xr].modified_&&(JE(t),Ha(4)),Qa(e)&&(e=ak(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[xr].base_,e,t)}else e=ak(t,n);return jse(t,e,!0),JE(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==O8?e:void 0}function ak(e,t){if(N0(t))return t;const n=t[xr];if(!n)return ey(t,e.handledSet_,e);if(!T0(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);M8(n,e)}return n.copy_}function jse(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&PO(t,n)}function T8(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var T0=(e,t)=>e.scope_===t,Ose=[];function P8(e,t,n,r){const a=uo(e),i=e.type_;if(r!==void 0&&WE(a,r,i)===t){Zg(a,r,n,i);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;j0(a,(u,f)=>{if(Mo(f)){const m=c.get(f)||[];m.push(u),c.set(f,m)}})}const s=e.draftLocations_.get(t)??Ose;for(const c of s)Zg(a,c,n,i)}function Cse(e,t,n){e.callbacks_.push(function(a){var c;const i=t;if(!i||!T0(i,a))return;(c=a.mapSetPlugin_)==null||c.fixSetContents(i);const s=TO(i);P8(e,i.draft_??i,s,n),M8(i,a)})}function M8(e,t){var r;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((r=e.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const i=a.getPath(e);i&&a.generatePatches_(e,i,t)}T8(e)}}function Ase(e,t,n){const{scope_:r}=e;if(Mo(n)){const a=n[xr];T0(a,r)&&a.callbacks_.push(function(){pg(e);const s=TO(a);P8(e,n,s,t)})}else Qa(n)&&e.callbacks_.push(function(){const i=uo(e);e.type_===3?i.has(n)&&ey(n,r.handledSet_,r):WE(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ey(WE(e.copy_,t,e.type_),r.handledSet_,r)})}function ey(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Mo(e)||t.has(e)||!Qa(e)||N0(e)||(t.add(e),j0(e,(r,a)=>{if(Mo(a)){const i=a[xr];if(T0(i,n)){const s=TO(i);Zg(e,r,s,e.type_),T8(i)}}else Qa(a)&&ey(a,t,n)})),e}function Nse(e,t){const n=O0(e),r={type_:n?1:0,scope_:t?t.scope_:N8(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=r,i=ty;n&&(a=[r],i=Hh);const{revoke:s,proxy:c}=Proxy.revocable(a,i);return r.draft_=c,r.revoke_=s,[c,r]}var ty={get(e,t){if(t===xr)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=uo(e);if(!ZR(a,t,e.type_))return Tse(e,a,t);const i=a[t];if(e.finalized_||!Qa(i)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&wse(t))return i;if(i===iS(e.base_,t)){pg(e);const s=e.type_===1?+t:t,c=n_(e.scope_,i,e,s);return e.copy_[s]=c}return i},has(e,t){return t in uo(e)},ownKeys(e){return Reflect.ownKeys(uo(e))},set(e,t,n){const r=R8(uo(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=iS(uo(e),t),i=a==null?void 0:a[xr];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(xse(n,a)&&(n!==void 0||ZR(e.base_,t,e.type_)))return!0;pg(e),t_(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),Ase(e,t,n)),!0},deleteProperty(e,t){return pg(e),iS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),t_(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=uo(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[mg]:!0,[GE]:e.type_!==1||t!=="length",[Qg]:r[Qg],[Bh]:n[t]}},defineProperty(){Ha(11)},getPrototypeOf(e){return jf(e.base_)},setPrototypeOf(){Ha(12)}},Hh={};for(let e in ty){let t=ty[e];Hh[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}Hh.deleteProperty=function(e,t){return Hh.set.call(this,e,t,void 0)};Hh.set=function(e,t,n){return ty.set.call(this,e[0],t,n,e[0])};function iS(e,t){const n=e[xr];return(n?uo(n):e)[t]}function Tse(e,t,n){var a;const r=R8(t,n);return r?Bh in r?r[Bh]:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function R8(e,t){if(!(t in e))return;let n=jf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jf(n)}}function t_(e){e.modified_||(e.modified_=!0,e.parent_&&t_(e.parent_))}function pg(e){e.copy_||(e.assigned_=new Map,e.copy_=QE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Pse=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,a)=>{if(Gu(n)&&!Gu(r)){const s=r;r=n;const c=this;return function(f=s,...m){return c.produce(f,d=>r.call(this,d,...m))}}Gu(r)||Ha(6),a!==void 0&&!Gu(a)&&Ha(7);let i;if(Qa(n)){const s=nk(this),c=n_(s,n,void 0);let u=!0;try{i=r(c),u=!1}finally{u?JE(s):e_(s)}return tk(s,a),rk(i,s)}else if(!n||!NO(n)){if(i=r(n),i===void 0&&(i=n),i===O8&&(i=void 0),this.autoFreeze_&&PO(i,!0),a){const s=[],c=[];Oc(ZE).generateReplacementPatches_(n,i,{patches_:s,inversePatches_:c}),a(s,c)}return i}else Ha(1,n)},this.produceWithPatches=(n,r)=>{if(Gu(n))return(c,...u)=>this.produceWithPatches(c,f=>n(f,...u));let a,i;return[this.produce(n,r,(c,u)=>{a=c,i=u}),a,i]},aS(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),aS(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),aS(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Qa(t)||Ha(8),Mo(t)&&(t=ja(t));const n=nk(this),r=n_(n,t,void 0);return r[xr].isManual_=!0,e_(n),r}finishDraft(t,n){const r=t&&t[xr];(!r||!r.isManual_)&&Ha(9);const{scope_:a}=r;return tk(a,n),rk(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const i=n[r];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}r>-1&&(n=n.slice(r+1));const a=Oc(ZE).applyPatches_;return Mo(t)?a(t,n):this.produce(t,i=>a(i,n))}};function n_(e,t,n,r){const[a,i]=C0(t)?Oc(Jg).proxyMap_(t,n):A0(t)?Oc(Jg).proxySet_(t,n):Nse(t,n);return((n==null?void 0:n.scope_)??N8()).drafts_.push(a),i.callbacks_=(n==null?void 0:n.callbacks_)??[],i.key_=r,n&&r!==void 0?Cse(n,i,r):i.callbacks_.push(function(u){var m;(m=u.mapSetPlugin_)==null||m.fixSetContents(i);const{patchPlugin_:f}=u;i.modified_&&f&&f.generatePatches_(i,[],u)}),a}function ja(e){return Mo(e)||Ha(10,e),k8(e)}function k8(e){if(!Qa(e)||N0(e))return e;const t=e[xr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=QE(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=QE(e,!0);return j0(n,(a,i)=>{Zg(n,a,k8(i))},r),t&&(t.finalized_=!1),n}var Mse=new Pse,D8=Mse.produce;function I8(e){return({dispatch:n,getState:r})=>a=>i=>typeof i=="function"?i(n,r,e):a(i)}var Rse=I8(),kse=I8,Dse=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gg:Gg.apply(null,arguments)};function na(e,t){function n(...r){if(t){let a=t(...r);if(!a)throw new Error(ea(0));return{type:e,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>j8(r)&&r.type===e,n}var L8=class _h extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,_h.prototype)}static get[Symbol.species](){return _h}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new _h(...t[0].concat(this)):new _h(...t.concat(this))}};function ik(e){return Qa(e)?D8(e,()=>{}):e}function zv(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Ise(e){return typeof e=="boolean"}var Lse=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{};let s=new L8;return n&&(Ise(n)?s.push(Rse):s.push(kse(n.extraArgument))),s},z8="RTK_autoBatch",Dt=()=>e=>({payload:e,meta:{[z8]:!0}}),ok=e=>t=>{setTimeout(t,e)},$8=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,i=!1,s=!1;const c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ok(10):e.type==="callback"?e.queueNotification:ok(e.timeout),f=()=>{s=!1,i&&(i=!1,c.forEach(m=>m()))};return Object.assign({},r,{subscribe(m){const d=()=>a&&m(),p=r.subscribe(d);return c.add(m),()=>{p(),c.delete(m)}},dispatch(m){var d;try{return a=!((d=m==null?void 0:m.meta)!=null&&d[z8]),i=!a,i&&(s||(s=!0,u(f))),r.dispatch(m)}finally{a=!0}}})},zse=e=>function(n){const{autoBatch:r=!0}=n??{};let a=new L8(e);return r&&a.push($8(typeof r=="object"?r:void 0)),a};function $se(e){const t=Lse(),{reducer:n=void 0,middleware:r,devTools:a=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(AO(n))c=_8(n);else throw new Error(ea(1));let u;typeof r=="function"?u=r(t):u=t();let f=Gg;a&&(f=Dse({trace:!1,...typeof a=="object"&&a}));const m=yse(...u),d=zse(m);let p=typeof s=="function"?s(d):d();const b=f(...p);return E8(c,i,b)}function B8(e){const t={},n=[];let r;const a={addCase(i,s){const c=typeof i=="string"?i:i.type;if(!c)throw new Error(ea(28));if(c in t)throw new Error(ea(29));return t[c]=s,a},addAsyncThunk(i,s){return s.pending&&(t[i.pending.type]=s.pending),s.rejected&&(t[i.rejected.type]=s.rejected),s.fulfilled&&(t[i.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:i.settled,reducer:s.settled}),a},addMatcher(i,s){return n.push({matcher:i,reducer:s}),a},addDefaultCase(i){return r=i,a}};return e(a),[t,n,r]}function Bse(e){return typeof e=="function"}function Use(e,t){let[n,r,a]=B8(t),i;if(Bse(e))i=()=>ik(e());else{const c=ik(e);i=()=>c}function s(c=i(),u){let f=[n[u.type],...r.filter(({matcher:m})=>m(u)).map(({reducer:m})=>m)];return f.filter(m=>!!m).length===0&&(f=[a]),f.reduce((m,d)=>{if(d)if(Mo(m)){const b=d(m,u);return b===void 0?m:b}else{if(Qa(m))return D8(m,p=>d(p,u));{const p=d(m,u);if(p===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return m},c)}return s.getInitialState=i,s}var Hse="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Fse=(e=21)=>{let t="",n=e;for(;n--;)t+=Hse[Math.random()*64|0];return t},qse=Symbol.for("rtk-slice-createasyncthunk");function Kse(e,t){return`${e}/${t}`}function Vse({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[qse];return function(a){const{name:i,reducerPath:s=i}=a;if(!i)throw new Error(ea(11));const c=(typeof a.reducers=="function"?a.reducers(Xse()):a.reducers)||{},u=Object.keys(c),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},m={addCase(A,T){const N=typeof A=="string"?A:A.type;if(!N)throw new Error(ea(12));if(N in f.sliceCaseReducersByType)throw new Error(ea(13));return f.sliceCaseReducersByType[N]=T,m},addMatcher(A,T){return f.sliceMatchers.push({matcher:A,reducer:T}),m},exposeAction(A,T){return f.actionCreators[A]=T,m},exposeCaseReducer(A,T){return f.sliceCaseReducersByName[A]=T,m}};u.forEach(A=>{const T=c[A],N={reducerName:A,type:Kse(i,A),createNotation:typeof a.reducers=="function"};Wse(T)?Zse(N,T,m,t):Gse(N,T,m)});function d(){const[A={},T=[],N=void 0]=typeof a.extraReducers=="function"?B8(a.extraReducers):[a.extraReducers],P={...A,...f.sliceCaseReducersByType};return Use(a.initialState,k=>{for(let D in P)k.addCase(D,P[D]);for(let D of f.sliceMatchers)k.addMatcher(D.matcher,D.reducer);for(let D of T)k.addMatcher(D.matcher,D.reducer);N&&k.addDefaultCase(N)})}const p=A=>A,b=new Map,w=new WeakMap;let x;function S(A,T){return x||(x=d()),x(A,T)}function E(){return x||(x=d()),x.getInitialState()}function C(A,T=!1){function N(k){let D=k[A];return typeof D>"u"&&T&&(D=zv(w,N,E)),D}function P(k=p){const D=zv(b,T,()=>new WeakMap);return zv(D,k,()=>{const K={};for(const[B,I]of Object.entries(a.selectors??{}))K[B]=Yse(I,k,()=>zv(w,k,E),T);return K})}return{reducerPath:A,getSelectors:P,get selectors(){return P(N)},selectSlice:N}}const O={name:i,reducer:S,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:E,...C(s),injectInto(A,{reducerPath:T,...N}={}){const P=T??s;return A.inject({reducerPath:P,reducer:S},N),{...O,...C(P,!0)}}};return O}}function Yse(e,t,n,r){function a(i,...s){let c=t(i);return typeof c>"u"&&r&&(c=n()),e(c,...s)}return a.unwrapped=e,a}var fr=Vse();function Xse(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Gse({type:e,reducerName:t,createNotation:n},r,a){let i,s;if("reducer"in r){if(n&&!Qse(r))throw new Error(ea(17));i=r.reducer,s=r.prepare}else i=r;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?na(e,s):na(e))}function Wse(e){return e._reducerDefinitionType==="asyncThunk"}function Qse(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Zse({type:e,reducerName:t},n,r,a){if(!a)throw new Error(ea(18));const{payloadCreator:i,fulfilled:s,pending:c,rejected:u,settled:f,options:m}=n,d=a(e,i,m);r.exposeAction(t,d),s&&r.addCase(d.fulfilled,s),c&&r.addCase(d.pending,c),u&&r.addCase(d.rejected,u),f&&r.addMatcher(d.settled,f),r.exposeCaseReducer(t,{fulfilled:s||$v,pending:c||$v,rejected:u||$v,settled:f||$v})}function $v(){}var Jse="task",U8="listener",H8="completed",MO="cancelled",ele=`task-${MO}`,tle=`task-${H8}`,r_=`${U8}-${MO}`,nle=`${U8}-${H8}`,P0=class{constructor(e){Mw(this,"name","TaskAbortError");Mw(this,"message");this.code=e,this.message=`${Jse} ${MO} (reason: ${e})`}},RO=(e,t)=>{if(typeof e!="function")throw new TypeError(ea(32))},ny=()=>{},F8=(e,t=ny)=>(e.catch(t),e),q8=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),uc=e=>{if(e.aborted)throw new P0(e.reason)};function K8(e,t){let n=ny;return new Promise((r,a)=>{const i=()=>a(new P0(e.reason));if(e.aborted){i();return}n=q8(e,i),t.finally(()=>n()).then(r,a)}).finally(()=>{n=ny})}var rle=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof P0?"cancelled":"rejected",error:n}}finally{t==null||t()}},ry=e=>t=>F8(K8(e,t).then(n=>(uc(e),n))),V8=e=>{const t=ry(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:nf}=Object,sk={},M0="listenerMiddleware",ale=(e,t)=>{const n=r=>q8(e,()=>r.abort(e.reason));return(r,a)=>{RO(r);const i=new AbortController;n(i);const s=rle(async()=>{uc(e),uc(i.signal);const c=await r({pause:ry(i.signal),delay:V8(i.signal),signal:i.signal});return uc(i.signal),c},()=>i.abort(tle));return a!=null&&a.autoJoin&&t.push(s.catch(ny)),{result:ry(e)(s),cancel(){i.abort(ele)}}}},ile=(e,t)=>{const n=async(r,a)=>{uc(t);let i=()=>{};const c=[new Promise((u,f)=>{let m=e({predicate:r,effect:(d,p)=>{p.unsubscribe(),u([d,p.getState(),p.getOriginalState()])}});i=()=>{m(),f()}})];a!=null&&c.push(new Promise(u=>setTimeout(u,a,null)));try{const u=await K8(t,Promise.race(c));return uc(t),u}finally{i()}};return(r,a)=>F8(n(r,a))},Y8=e=>{let{type:t,actionCreator:n,matcher:r,predicate:a,effect:i}=e;if(t)a=na(t).match;else if(n)t=n.type,a=n.match;else if(r)a=r;else if(!a)throw new Error(ea(21));return RO(i),{predicate:a,type:t,effect:i}},X8=nf(e=>{const{type:t,predicate:n,effect:r}=Y8(e);return{id:Fse(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ea(22))}}},{withTypes:()=>X8}),lk=(e,t)=>{const{type:n,effect:r,predicate:a}=Y8(t);return Array.from(e.values()).find(i=>(typeof n=="string"?i.type===n:i.predicate===a)&&i.effect===r)},a_=e=>{e.pending.forEach(t=>{t.abort(r_)})},ole=(e,t)=>()=>{for(const n of t.keys())a_(n);e.clear()},ck=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},G8=nf(na(`${M0}/add`),{withTypes:()=>G8}),sle=na(`${M0}/removeAll`),W8=nf(na(`${M0}/remove`),{withTypes:()=>W8}),lle=(...e)=>{console.error(`${M0}/error`,...e)},Mm=(e={})=>{const t=new Map,n=new Map,r=b=>{const w=n.get(b)??0;n.set(b,w+1)},a=b=>{const w=n.get(b)??1;w===1?n.delete(b):n.set(b,w-1)},{extra:i,onError:s=lle}=e;RO(s);const c=b=>(b.unsubscribe=()=>t.delete(b.id),t.set(b.id,b),w=>{b.unsubscribe(),w!=null&&w.cancelActive&&a_(b)}),u=b=>{const w=lk(t,b)??X8(b);return c(w)};nf(u,{withTypes:()=>u});const f=b=>{const w=lk(t,b);return w&&(w.unsubscribe(),b.cancelActive&&a_(w)),!!w};nf(f,{withTypes:()=>f});const m=async(b,w,x,S)=>{const E=new AbortController,C=ile(u,E.signal),O=[];try{b.pending.add(E),r(b),await Promise.resolve(b.effect(w,nf({},x,{getOriginalState:S,condition:(A,T)=>C(A,T).then(Boolean),take:C,delay:V8(E.signal),pause:ry(E.signal),extra:i,signal:E.signal,fork:ale(E.signal,O),unsubscribe:b.unsubscribe,subscribe:()=>{t.set(b.id,b)},cancelActiveListeners:()=>{b.pending.forEach((A,T,N)=>{A!==E&&(A.abort(r_),N.delete(A))})},cancel:()=>{E.abort(r_),b.pending.delete(E)},throwIfCancelled:()=>{uc(E.signal)}})))}catch(A){A instanceof P0||ck(s,A,{raisedBy:"effect"})}finally{await Promise.all(O),E.abort(nle),a(b),b.pending.delete(E)}},d=ole(t,n);return{middleware:b=>w=>x=>{if(!j8(x))return w(x);if(G8.match(x))return u(x.payload);if(sle.match(x)){d();return}if(W8.match(x))return f(x.payload);let S=b.getState();const E=()=>{if(S===sk)throw new Error(ea(23));return S};let C;try{if(C=w(x),t.size>0){const O=b.getState(),A=Array.from(t.values());for(const T of A){let N=!1;try{N=T.predicate(x,O,S)}catch(P){N=!1,ck(s,P,{raisedBy:"predicate"})}N&&m(T,x,b,E)}}}finally{S=sk}return C},startListening:u,stopListening:f,clearListeners:d}};function ea(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var cle={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Q8=fr({name:"chartLayout",initialState:cle,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,a,i;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(a=t.payload.bottom)!==null&&a!==void 0?a:0,e.margin.left=(i=t.payload.left)!==null&&i!==void 0?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:ule,setLayout:fle,setChartSize:dle,setScale:hle}=Q8.actions,mle=Q8.reducer;function Z8(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function it(e){return Number.isFinite(e)}function Pi(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uk(Object(n),!0).forEach(function(r){ple(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ple(e,t,n){return(t=vle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vle(e){var t=gle(e,"string");return typeof t=="symbol"?t:t+""}function gle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function St(e,t,n){return Ht(e)||Ht(t)?n:Ti(t)?_c(e,t,n):typeof t=="function"?t(e):n}var yle=(e,t,n)=>{if(t&&n){var{width:r,height:a}=n,{align:i,verticalAlign:s,layout:c}=t;if((c==="vertical"||c==="horizontal"&&s==="middle")&&i!=="center"&&_e(e[i]))return Wu(Wu({},e),{},{[i]:e[i]+(r||0)});if((c==="horizontal"||c==="vertical"&&i==="center")&&s!=="middle"&&_e(e[s]))return Wu(Wu({},e),{},{[s]:e[s]+(a||0)})}return e},$o=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",J8=(e,t,n,r)=>{if(r)return e.map(c=>c.coordinate);var a,i,s=e.map(c=>(c.coordinate===t&&(a=!0),c.coordinate===n&&(i=!0),c.coordinate));return a||s.push(t),i||s.push(n),s},e6=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:a,range:i,scale:s,realScaleType:c,isCategorical:u,categoricalDomain:f,tickCount:m,ticks:d,niceTicks:p,axisType:b}=e;if(!s)return null;var w=c==="scaleBand"&&s.bandwidth?s.bandwidth()/2:2,x=a==="category"&&s.bandwidth?s.bandwidth()/w:0;if(x=b==="angleAxis"&&i&&i.length>=2?Ln(i[0]-i[1])*2*x:x,d||p){var S=(d||p||[]).map((E,C)=>{var O=r?r.indexOf(E):E,A=s.map(O);return it(A)?{coordinate:A+x,value:E,offset:x,index:C}:null}).filter(kr);return S}return u&&f?f.map((E,C)=>{var O=s.map(E);return it(O)?{coordinate:O+x,value:E,index:C,offset:x}:null}).filter(kr):s.ticks&&m!=null?s.ticks(m).map((E,C)=>{var O=s.map(E);return it(O)?{coordinate:O+x,value:E,index:C,offset:x}:null}).filter(kr):s.domain().map((E,C)=>{var O=s.map(E);return it(O)?{coordinate:O+x,value:r?r[E]:E,index:C,offset:x}:null}).filter(kr)},ble=(e,t)=>{if(!t||t.length!==2||!_e(t[0])||!_e(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),a=[e[0],e[1]];return(!_e(e[0])||e[0]<n)&&(a[0]=n),(!_e(e[1])||e[1]>r)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]<n&&(a[1]=n),a},xle=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0,c=0;c<n;++c){var u=e[c],f=u==null?void 0:u[a];if(f!=null){var m=f[1],d=f[0],p=Ni(m)?d:m;p>=0?(f[0]=i,i+=p,f[1]=i):(f[0]=s,s+=p,f[1]=s)}}}},wle=e=>{var t,n=e.length;if(!(n<=0)){var r=(t=e[0])===null||t===void 0?void 0:t.length;if(!(r==null||r<=0))for(var a=0;a<r;++a)for(var i=0,s=0;s<n;++s){var c=e[s],u=c==null?void 0:c[a];if(u!=null){var f=Ni(u[1])?u[0]:u[1];f>=0?(u[0]=i,i+=f,u[1]=i):(u[0]=0,u[1]=0)}}}},Sle={sign:xle,expand:qie,none:Ec,silhouette:Kie,wiggle:Vie,positive:wle},Ele=(e,t,n)=>{var r,a=(r=Sle[n])!==null&&r!==void 0?r:Ec,i=Fie().keys(t).value((c,u)=>Number(St(c,u,0))).order(YE).offset(a),s=i(e);return s.forEach((c,u)=>{c.forEach((f,m)=>{var d=St(e[m],t[u],0);Array.isArray(d)&&d.length===2&&_e(d[0])&&_e(d[1])&&(f[0]=d[0],f[1]=d[1])})}),s};function _le(e){return e==null?void 0:String(e)}function fk(e){var{axis:t,ticks:n,bandSize:r,entry:a,index:i,dataKey:s}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ht(a[t.dataKey])){var c=r8(n,"value",a[t.dataKey]);if(c)return c.coordinate+r/2}return n!=null&&n[i]?n[i].coordinate+r/2:null}var u=St(a,Ht(s)?t.dataKey:s),f=t.scale.map(u);return _e(f)?f:null}var dk=e=>{var{axis:t,ticks:n,offset:r,bandSize:a,entry:i,index:s}=e;if(t.type==="category")return n[s]?n[s].coordinate+r:null;var c=St(i,t.dataKey,t.scale.domain()[s]);if(Ht(c))return null;var u=t.scale.map(c);return _e(u)?u-a/2+r:null},jle=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return r<=0&&a>=0?0:a<0?a:r}return n[0]},Ole=e=>{var t=e.flat(2).filter(_e);return[Math.min(...t),Math.max(...t)]},Cle=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Ale=(e,t,n)=>{if(e!=null)return Cle(Object.keys(e).reduce((r,a)=>{var i=e[a];if(!i)return r;var{stackedData:s}=i,c=s.reduce((u,f)=>{var m=Z8(f,t,n),d=Ole(m);return!it(d[0])||!it(d[1])?u:[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],r[0]),Math.max(c[1],r[1])]},[1/0,-1/0]))},hk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,mk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Of=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var a=E0(t,m=>m.coordinate),i=1/0,s=1,c=a.length;s<c;s++){var u=a[s],f=a[s-1];i=Math.min(((u==null?void 0:u.coordinate)||0)-((f==null?void 0:f.coordinate)||0),i)}return i===1/0?0:i}return n?void 0:0};function pk(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:a,name:i}=e;return Wu(Wu({},t),{},{dataKey:n,payload:r,value:a,name:i})}function Zf(e,t){if(e)return String(e);if(typeof t=="string")return t}var Nle=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Tle=(e,t)=>t==="centric"?e.angle:e.radius,Bo=e=>e.layout.width,Uo=e=>e.layout.height,Ple=e=>e.layout.scale,t6=e=>e.layout.margin,R0=oe(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),k0=oe(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),n6="data-recharts-item-index",r6="data-recharts-item-id",Rm=60;function vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vk(Object(n),!0).forEach(function(r){Mle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mle(e,t,n){return(t=Rle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rle(e){var t=kle(e,"string");return typeof t=="symbol"?t:t+""}function kle(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Dle=e=>e.brush.height;function Ile(e){var t=k0(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Rm;return n+a}return n},0)}function Lle(e){var t=k0(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Rm;return n+a}return n},0)}function zle(e){var t=R0(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function $le(e){var t=R0(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var An=oe([Bo,Uo,t6,Dle,Ile,Lle,zle,$le,w8,fse],(e,t,n,r,a,i,s,c,u,f)=>{var m={left:(n.left||0)+a,right:(n.right||0)+i},d={top:(n.top||0)+s,bottom:(n.bottom||0)+c},p=Bv(Bv({},d),m),b=p.bottom;p.bottom+=r,p=yle(p,u,f);var w=e-p.left-p.right,x=t-p.top-p.bottom;return Bv(Bv({brushBottom:b},p),{},{width:Math.max(w,0),height:Math.max(x,0)})}),Ble=oe(An,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),kO=oe(Bo,Uo,(e,t)=>({x:0,y:0,width:e,height:t})),Ule=y.createContext(null),dr=()=>y.useContext(Ule)!=null,D0=e=>e.brush,I0=oe([D0,An,t6],(e,t,n)=>({height:e.height,x:_e(e.x)?e.x:t.left,y:_e(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:_e(e.width)?e.width:t.width})),oS={},sS={},lS={},gk;function Hle(){return gk||(gk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:a,edges:i}={}){let s,c=null;const u=i!=null&&i.includes("leading"),f=i==null||i.includes("trailing"),m=()=>{c!==null&&(n.apply(s,c),s=void 0,c=null)},d=()=>{f&&m(),x()};let p=null;const b=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,d()},r)},w=()=>{p!==null&&(clearTimeout(p),p=null)},x=()=>{w(),s=void 0,c=null},S=()=>{m()},E=function(...C){if(a!=null&&a.aborted)return;s=this,c=C;const O=p==null;b(),u&&O&&m()};return E.schedule=b,E.cancel=x,E.flush=S,a==null||a.addEventListener("abort",x,{once:!0}),E}e.debounce=t})(lS)),lS}var yk;function Fle(){return yk||(yk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Hle();function n(r,a=0,i={}){typeof i!="object"&&(i={});const{leading:s=!1,trailing:c=!0,maxWait:u}=i,f=Array(2);s&&(f[0]="leading"),c&&(f[1]="trailing");let m,d=null;const p=t.debounce(function(...x){m=r.apply(this,x),d=null},a,{edges:f}),b=function(...x){return u!=null&&(d===null&&(d=Date.now()),Date.now()-d>=u)?(m=r.apply(this,x),d=Date.now(),p.cancel(),p.schedule(),m):(p.apply(this,x),m)},w=()=>(p.flush(),m);return b.cancel=p.cancel,b.flush=w,b}e.debounce=n})(sS)),sS}var bk;function qle(){return bk||(bk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fle();function n(r,a=0,i={}){const{leading:s=!0,trailing:c=!0}=i;return t.debounce(r,a,{leading:s,maxWait:a,trailing:c})}e.throttle=n})(oS)),oS}var cS,xk;function Kle(){return xk||(xk=1,cS=qle().throttle),cS}var Vle=Kle();const Yle=Za(Vle);var ay=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];if(typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;console.warn(n.replace(/%s/g,()=>a[s++]))}},Ei={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},a6=(e,t,n)=>{var{width:r=Ei.width,height:a=Ei.height,aspect:i,maxHeight:s}=n,c=jc(r)?e:Number(r),u=jc(a)?t:Number(a);return i&&i>0&&(c?u=c/i:u&&(c=u*i),s&&u!=null&&u>s&&(u=s)),{calculatedWidth:c,calculatedHeight:u}},Xle={width:0,height:0,overflow:"visible"},Gle={width:0,overflowX:"visible"},Wle={height:0,overflowY:"visible"},Qle={},Zle=e=>{var{width:t,height:n}=e,r=jc(t),a=jc(n);return r&&a?Xle:r?Gle:a?Wle:Qle};function Jle(e){var{width:t,height:n,aspect:r}=e,a=t,i=n;return a===void 0&&i===void 0?(a=Ei.width,i=Ei.height):a===void 0?a=r&&r>0?void 0:Ei.width:i===void 0&&(i=r&&r>0?void 0:Ei.height),{width:a,height:i}}function i_(){return i_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i_.apply(null,arguments)}function wk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Sk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wk(Object(n),!0).forEach(function(r){ece(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ece(e,t,n){return(t=tce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tce(e){var t=nce(e,"string");return typeof t=="symbol"?t:t+""}function nce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i6=y.createContext(Ei.initialDimension);function rce(e){return Pi(e.width)&&Pi(e.height)}function o6(e){var{children:t,width:n,height:r}=e,a=y.useMemo(()=>({width:n,height:r}),[n,r]);return rce(a)?y.createElement(i6.Provider,{value:a},t):null}var DO=()=>y.useContext(i6),ace=y.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=Ei.initialDimension,width:a,height:i,minWidth:s=Ei.minWidth,minHeight:c,maxHeight:u,children:f,debounce:m=Ei.debounce,id:d,className:p,onResize:b,style:w={}}=e,x=y.useRef(null),S=y.useRef();S.current=b,y.useImperativeHandle(t,()=>x.current);var[E,C]=y.useState({containerWidth:r.width,containerHeight:r.height}),O=y.useCallback((k,D)=>{C(K=>{var B=Math.round(k),I=Math.round(D);return K.containerWidth===B&&K.containerHeight===I?K:{containerWidth:B,containerHeight:I}})},[]);y.useEffect(()=>{if(x.current==null||typeof ResizeObserver>"u")return hl;var k=I=>{var W,z=I[0];if(z!=null){var{width:V,height:R}=z.contentRect;O(V,R),(W=S.current)===null||W===void 0||W.call(S,V,R)}};m>0&&(k=Yle(k,m,{trailing:!0,leading:!1}));var D=new ResizeObserver(k),{width:K,height:B}=x.current.getBoundingClientRect();return O(K,B),D.observe(x.current),()=>{D.disconnect()}},[O,m]);var{containerWidth:A,containerHeight:T}=E;ay(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:N,calculatedHeight:P}=a6(A,T,{width:a,height:i,aspect:n,maxHeight:u});return ay(N!=null&&N>0||P!=null&&P>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,N,P,a,i,s,c,n),y.createElement("div",{id:d?"".concat(d):void 0,className:st("recharts-responsive-container",p),style:Sk(Sk({},w),{},{width:a,height:i,minWidth:s,minHeight:c,maxHeight:u}),ref:x},y.createElement("div",{style:Zle({width:a,height:i})},y.createElement(o6,{width:N,height:P},f)))}),IO=y.forwardRef((e,t)=>{var n=DO();if(Pi(n.width)&&Pi(n.height))return e.children;var{width:r,height:a}=Jle({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:s}=a6(void 0,void 0,{width:r,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return _e(i)&&_e(s)?y.createElement(o6,{width:i,height:s},e.children):y.createElement(ace,i_({},e,{width:r,height:a,ref:t}))});function LO(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var L0=()=>{var e,t=dr(),n=Ae(Ble),r=Ae(I0),a=(e=Ae(D0))===null||e===void 0?void 0:e.padding;return!t||!r||!a?n:{width:r.width-a.left-a.right,height:r.height-a.top-a.bottom,x:a.left,y:a.top}},ice={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},s6=()=>{var e;return(e=Ae(An))!==null&&e!==void 0?e:ice},zO=()=>Ae(Bo),$O=()=>Ae(Uo),oce=()=>Ae(e=>e.layout.margin),ft=e=>e.layout.layoutType,Vc=()=>Ae(ft),l6=()=>{var e=Vc();if(e==="horizontal"||e==="vertical")return e},c6=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},sce=()=>{var e=Vc();return e!==void 0},km=e=>{var t=_t(),n=dr(),{width:r,height:a}=e,i=DO(),s=r,c=a;return i&&(s=i.width>0?i.width:r,c=i.height>0?i.height:a),y.useEffect(()=>{!n&&Pi(s)&&Pi(c)&&t(dle({width:s,height:c}))},[t,n,s,c]),null},u6=Symbol.for("immer-nothing"),Ek=Symbol.for("immer-draftable"),ra=Symbol.for("immer-state");function Fa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fh=Object.getPrototypeOf;function Cf(e){return!!e&&!!e[ra]}function Cc(e){var t;return e?f6(e)||Array.isArray(e)||!!e[Ek]||!!((t=e.constructor)!=null&&t[Ek])||Dm(e)||$0(e):!1}var lce=Object.prototype.constructor.toString(),_k=new WeakMap;function f6(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=_k.get(n);return r===void 0&&(r=Function.toString.call(n),_k.set(n,r)),r===lce}function iy(e,t,n=!0){z0(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function z0(e){const t=e[ra];return t?t.type_:Array.isArray(e)?1:Dm(e)?2:$0(e)?3:0}function o_(e,t){return z0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function d6(e,t,n){const r=z0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function cce(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Dm(e){return e instanceof Map}function $0(e){return e instanceof Set}function Vl(e){return e.copy_||e.base_}function s_(e,t){if(Dm(e))return new Map(e);if($0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=f6(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ra];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const s=a[i],c=r[s];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[s]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[s]})}return Object.create(Fh(e),r)}else{const r=Fh(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function BO(e,t=!1){return B0(e)||Cf(e)||!Cc(e)||(z0(e)>1&&Object.defineProperties(e,{set:Uv,add:Uv,clear:Uv,delete:Uv}),Object.freeze(e),t&&Object.values(e).forEach(n=>BO(n,!0))),e}function uce(){Fa(2)}var Uv={value:uce};function B0(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var fce={};function Ac(e){const t=fce[e];return t||Fa(0,e),t}var qh;function h6(){return qh}function dce(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jk(e,t){t&&(Ac("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function l_(e){c_(e),e.drafts_.forEach(hce),e.drafts_=null}function c_(e){e===qh&&(qh=e.parent_)}function Ok(e){return qh=dce(qh,e)}function hce(e){const t=e[ra];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ck(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ra].modified_&&(l_(t),Fa(4)),Cc(e)&&(e=oy(t,e),t.parent_||sy(t,e)),t.patches_&&Ac("Patches").generateReplacementPatches_(n[ra].base_,e,t.patches_,t.inversePatches_)):e=oy(t,n,[]),l_(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==u6?e:void 0}function oy(e,t,n){if(B0(t))return t;const r=e.immer_.shouldUseStrictIteration(),a=t[ra];if(!a)return iy(t,(i,s)=>Ak(e,a,t,i,s,n),r),t;if(a.scope_!==e)return t;if(!a.modified_)return sy(e,a.base_,!0),a.base_;if(!a.finalized_){a.finalized_=!0,a.scope_.unfinalizedDrafts_--;const i=a.copy_;let s=i,c=!1;a.type_===3&&(s=new Set(i),i.clear(),c=!0),iy(s,(u,f)=>Ak(e,a,i,u,f,n,c),r),sy(e,i,!1),n&&e.patches_&&Ac("Patches").generatePatches_(a,n,e.patches_,e.inversePatches_)}return a.copy_}function Ak(e,t,n,r,a,i,s){if(a==null||typeof a!="object"&&!s)return;const c=B0(a);if(!(c&&!s)){if(Cf(a)){const u=i&&t&&t.type_!==3&&!o_(t.assigned_,r)?i.concat(r):void 0,f=oy(e,a,u);if(d6(n,r,f),Cf(f))e.canAutoFreeze_=!1;else return}else s&&n.add(a);if(Cc(a)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===a&&c)return;oy(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Dm(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&sy(e,a)}}}function sy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&BO(t,n)}function mce(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:h6(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,i=UO;n&&(a=[r],i=Kh);const{revoke:s,proxy:c}=Proxy.revocable(a,i);return r.draft_=c,r.revoke_=s,c}var UO={get(e,t){if(t===ra)return e;const n=Vl(e);if(!o_(n,t))return pce(e,n,t);const r=n[t];return e.finalized_||!Cc(r)?r:r===uS(e.base_,t)?(fS(e),e.copy_[t]=f_(r,e)):r},has(e,t){return t in Vl(e)},ownKeys(e){return Reflect.ownKeys(Vl(e))},set(e,t,n){const r=m6(Vl(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=uS(Vl(e),t),i=a==null?void 0:a[ra];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(cce(n,a)&&(n!==void 0||o_(e.base_,t)))return!0;fS(e),u_(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return uS(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,fS(e),u_(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Vl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fa(11)},getPrototypeOf(e){return Fh(e.base_)},setPrototypeOf(){Fa(12)}},Kh={};iy(UO,(e,t)=>{Kh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Kh.deleteProperty=function(e,t){return Kh.set.call(this,e,t,void 0)};Kh.set=function(e,t,n){return UO.set.call(this,e[0],t,n,e[0])};function uS(e,t){const n=e[ra];return(n?Vl(n):e)[t]}function pce(e,t,n){var a;const r=m6(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function m6(e,t){if(!(t in e))return;let n=Fh(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Fh(n)}}function u_(e){e.modified_||(e.modified_=!0,e.parent_&&u_(e.parent_))}function fS(e){e.copy_||(e.copy_=s_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var vce=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const s=this;return function(u=i,...f){return s.produce(u,m=>n.call(this,m,...f))}}typeof n!="function"&&Fa(6),r!==void 0&&typeof r!="function"&&Fa(7);let a;if(Cc(t)){const i=Ok(this),s=f_(t,void 0);let c=!0;try{a=n(s),c=!1}finally{c?l_(i):c_(i)}return jk(i,r),Ck(a,i)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===u6&&(a=void 0),this.autoFreeze_&&BO(a,!0),r){const i=[],s=[];Ac("Patches").generateReplacementPatches_(t,a,i,s),r(i,s)}return a}else Fa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...c)=>this.produceWithPatches(s,u=>t(u,...c));let r,a;return[this.produce(t,n,(s,c)=>{r=s,a=c}),r,a]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Cc(e)||Fa(8),Cf(e)&&(e=gce(e));const t=Ok(this),n=f_(e,void 0);return n[ra].isManual_=!0,c_(t),n}finishDraft(e,t){const n=e&&e[ra];(!n||!n.isManual_)&&Fa(9);const{scope_:r}=n;return jk(r,t),Ck(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const a=t[n];if(a.path.length===0&&a.op==="replace"){e=a.value;break}}n>-1&&(t=t.slice(n+1));const r=Ac("Patches").applyPatches_;return Cf(e)?r(e,t):this.produce(e,a=>r(a,t))}};function f_(e,t){const n=Dm(e)?Ac("MapSet").proxyMap_(e,t):$0(e)?Ac("MapSet").proxySet_(e,t):mce(e,t);return(t?t.scope_:h6()).drafts_.push(n),n}function gce(e){return Cf(e)||Fa(10,e),p6(e)}function p6(e){if(!Cc(e)||B0(e))return e;const t=e[ra];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=s_(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=s_(e,!0);return iy(n,(a,i)=>{d6(n,a,p6(i))},r),t&&(t.finalized_=!1),n}var yce=new vce;yce.produce;var bce={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},v6=fr({name:"legend",initialState:bce,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:Dt()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,a=ja(e).payload.indexOf(n);a>-1&&(e.payload[a]=r)},prepare:Dt()},removeLegendPayload:{reducer(e,t){var n=ja(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Dt()}}}),{setLegendSize:Nk,setLegendSettings:xce,addLegendPayload:g6,replaceLegendPayload:y6,removeLegendPayload:b6}=v6.actions,wce=v6.reducer,dS={exports:{}},hS={};/**
 * @license React
 * use-sync-external-store-with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Tk;function Sce(){if(Tk)return hS;Tk=1;var e=Uf();function t(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,a=e.useRef,i=e.useEffect,s=e.useMemo,c=e.useDebugValue;return hS.useSyncExternalStoreWithSelector=function(u,f,m,d,p){var b=a(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=s(function(){function S(T){if(!E){if(E=!0,C=T,T=d(T),p!==void 0&&w.hasValue){var N=w.value;if(p(N,T))return O=N}return O=T}if(N=O,n(C,T))return N;var P=d(T);return p!==void 0&&p(N,P)?(C=T,N):(C=T,O=P)}var E=!1,C,O,A=m===void 0?null:m;return[function(){return S(f())},A===null?void 0:function(){return S(A())}]},[f,m,d,p]);var x=r(u,b[0],b[1]);return i(function(){w.hasValue=!0,w.value=x},[x]),c(x),x},hS}var Pk;function Ece(){return Pk||(Pk=1,dS.exports=Sce()),dS.exports}Ece();function _ce(e){e()}function jce(){let e=null,t=null;return{clear(){e=null,t=null},notify(){_ce(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const a=t={callback:n,next:null,prev:t};return a.prev?a.prev.next=a:e=a,function(){!r||e===null||(r=!1,a.next?a.next.prev=a.prev:t=a.prev,a.prev?a.prev.next=a.next:e=a.next)}}}}var Mk={notify(){},get:()=>[]};function Oce(e,t){let n,r=Mk,a=0,i=!1;function s(x){m();const S=r.subscribe(x);let E=!1;return()=>{E||(E=!0,S(),d())}}function c(){r.notify()}function u(){w.onStateChange&&w.onStateChange()}function f(){return i}function m(){a++,n||(n=e.subscribe(u),r=jce())}function d(){a--,n&&a===0&&(n(),n=void 0,r.clear(),r=Mk)}function p(){i||(i=!0,m())}function b(){i&&(i=!1,d())}const w={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:u,isSubscribed:f,trySubscribe:p,tryUnsubscribe:b,getListeners:()=>r};return w}var Cce=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ace=Cce(),Nce=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Tce=Nce(),Pce=()=>Ace||Tce?y.useLayoutEffect:y.useEffect,Mce=Pce();function Rk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Rce(e,t){if(Rk(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Rk(e[n[a]],t[n[a]]))return!1;return!0}var mS=Symbol.for("react-redux-context"),pS=typeof globalThis<"u"?globalThis:{};function kce(){if(!y.createContext)return{};const e=pS[mS]??(pS[mS]=new Map);let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var Dce=kce();function Ice(e){const{children:t,context:n,serverState:r,store:a}=e,i=y.useMemo(()=>{const u=Oce(a);return{store:a,subscription:u,getServerState:r?()=>r:void 0}},[a,r]),s=y.useMemo(()=>a.getState(),[a]);Mce(()=>{const{subscription:u}=i;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),s!==a.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[i,s]);const c=n||Dce;return y.createElement(c.Provider,{value:i},t)}var Lce=Ice,zce=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function $ce(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Jf(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(zce.has(r)){if(e[r]==null&&t[r]==null)continue;if(!Rce(e[r],t[r]))return!1}else if(!$ce(e[r],t[r]))return!1;return!0}var Bce=["contextPayload"];function d_(){return d_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d_.apply(null,arguments)}function kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Af(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kk(Object(n),!0).forEach(function(r){Uce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Uce(e,t,n){return(t=Hce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hce(e){var t=Fce(e,"string");return typeof t=="symbol"?t:t+""}function Fce(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qce(e,t){if(e==null)return{};var n,r,a=Kce(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Kce(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Vce(e){return e.value}function Yce(e){var{contextPayload:t}=e,n=qce(e,Bce),r=v8(t,e.payloadUniqBy,Vce),a=Af(Af({},n),{},{payload:r});return y.isValidElement(e.content)?y.cloneElement(e.content,a):typeof e.content=="function"?y.createElement(e.content,a):y.createElement(woe,a)}function Xce(e,t,n,r,a,i){var{layout:s,align:c,verticalAlign:u}=t,f,m;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(c==="center"&&s==="vertical"?f={left:((r||0)-i.width)/2}:f=c==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(u==="middle"?m={top:((a||0)-i.height)/2}:m=u==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),Af(Af({},f),m)}function Gce(e){var t=_t();return y.useEffect(()=>{t(xce(e))},[t,e]),null}function Wce(e){var t=_t();return y.useEffect(()=>(t(Nk(e)),()=>{t(Nk({width:0,height:0}))}),[t,e]),null}function Qce(e,t,n,r){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:n||r}:null}var Zce={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function Jce(e){var t=bn(e,Zce),n=mse(),r=hie(),a=oce(),{width:i,height:s,wrapperStyle:c,portal:u}=t,[f,m]=S8([n]),d=zO(),p=$O();if(d==null||p==null)return null;var b=d-((a==null?void 0:a.left)||0)-((a==null?void 0:a.right)||0),w=Qce(t.layout,s,i,b),x=u?c:Af(Af({position:"absolute",width:(w==null?void 0:w.width)||i||"auto",height:(w==null?void 0:w.height)||s||"auto"},Xce(c,t,a,d,p,f)),c),S=u??r;if(S==null||n==null)return null;var E=y.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:m},y.createElement(Gce,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!u&&y.createElement(Wce,{width:f.width,height:f.height}),y.createElement(Yce,d_({},t,w,{margin:a,chartWidth:d,chartHeight:p,contextPayload:n})));return cl.createPortal(E,S)}var x6=y.memo(Jce,Jf);x6.displayName="Legend";function h_(){return h_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h_.apply(null,arguments)}function Dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dk(Object(n),!0).forEach(function(r){eue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eue(e,t,n){return(t=tue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tue(e){var t=nue(e,"string");return typeof t=="symbol"?t:t+""}function nue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rue(e){return Array.isArray(e)&&Ti(e[0])&&Ti(e[1])?e.join(" ~ "):e}var Iu={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function aue(e,t){return t==null?e:E0(e,t)}var iue=e=>{var{separator:t=Iu.separator,contentStyle:n,itemStyle:r,labelStyle:a=Iu.labelStyle,payload:i,formatter:s,itemSorter:c,wrapperClassName:u,labelClassName:f,label:m,labelFormatter:d,accessibilityLayer:p=Iu.accessibilityLayer}=e,b=()=>{if(i&&i.length){var T={padding:0,margin:0},N=aue(i,c),P=N.map((k,D)=>{if(k.type==="none")return null;var K=k.formatter||s||rue,{value:B,name:I}=k,W=B,z=I;if(K){var V=K(B,I,k,D,i);if(Array.isArray(V))[W,z]=V;else if(V!=null)W=V;else return null}var R=sh(sh({},Iu.itemStyle),{},{color:k.color||Iu.itemStyle.color},r);return y.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:R},Ti(z)?y.createElement("span",{className:"recharts-tooltip-item-name"},z):null,Ti(z)?y.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,y.createElement("span",{className:"recharts-tooltip-item-value"},W),y.createElement("span",{className:"recharts-tooltip-item-unit"},k.unit||""))});return y.createElement("ul",{className:"recharts-tooltip-item-list",style:T},P)}return null},w=sh(sh({},Iu.contentStyle),n),x=sh({margin:0},a),S=!Ht(m),E=S?m:"",C=st("recharts-default-tooltip",u),O=st("recharts-tooltip-label",f);S&&d&&i!==void 0&&i!==null&&(E=d(m,i));var A=p?{role:"status","aria-live":"assertive"}:{};return y.createElement("div",h_({className:C,style:w},A),y.createElement("p",{className:O,style:x},y.isValidElement(E)?E:"".concat(E)),b())},lh="recharts-tooltip-wrapper",oue={visibility:"hidden"};function sue(e){var{coordinate:t,translateX:n,translateY:r}=e;return st(lh,{["".concat(lh,"-right")]:_e(n)&&t&&_e(t.x)&&n>=t.x,["".concat(lh,"-left")]:_e(n)&&t&&_e(t.x)&&n<t.x,["".concat(lh,"-bottom")]:_e(r)&&t&&_e(t.y)&&r>=t.y,["".concat(lh,"-top")]:_e(r)&&t&&_e(t.y)&&r<t.y})}function Ik(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:a,position:i,reverseDirection:s,tooltipDimension:c,viewBox:u,viewBoxDimension:f}=e;if(i&&_e(i[r]))return i[r];var m=n[r]-c-(a>0?a:0),d=n[r]+a;if(t[r])return s[r]?m:d;var p=u[r];if(p==null)return 0;if(s[r]){var b=m,w=p;return b<w?Math.max(d,p):Math.max(m,p)}if(f==null)return 0;var x=d+c,S=p+f;return x>S?Math.max(m,p):Math.max(d,p)}function lue(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function cue(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:a,position:i,reverseDirection:s,tooltipBox:c,useTranslate3d:u,viewBox:f}=e,m,d,p;return c.height>0&&c.width>0&&n?(d=Ik({allowEscapeViewBox:t,coordinate:n,key:"x",offset:a,position:i,reverseDirection:s,tooltipDimension:c.width,viewBox:f,viewBoxDimension:f.width}),p=Ik({allowEscapeViewBox:t,coordinate:n,key:"y",offset:r,position:i,reverseDirection:s,tooltipDimension:c.height,viewBox:f,viewBoxDimension:f.height}),m=lue({translateX:d,translateY:p,useTranslate3d:u})):m=oue,{cssProperties:m,cssClasses:sue({translateX:d,translateY:p,coordinate:n})}}var uue=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Im={isSsr:uue()};function w6(){var[e,t]=y.useState(()=>Im.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return y.useEffect(()=>{if(window.matchMedia){var n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)}}},[]),e}function Lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Lu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lk(Object(n),!0).forEach(function(r){fue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fue(e,t,n){return(t=due(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function due(e){var t=hue(e,"string");return typeof t=="symbol"?t:t+""}function hue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mue(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function pue(e){var t,n,r,a,i,s,c=w6(),[u,f]=y.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));y.useEffect(()=>{var w=x=>{if(x.key==="Escape"){var S,E,C,O;f({dismissed:!0,dismissedAtCoordinate:{x:(S=(E=e.coordinate)===null||E===void 0?void 0:E.x)!==null&&S!==void 0?S:0,y:(C=(O=e.coordinate)===null||O===void 0?void 0:O.y)!==null&&C!==void 0?C:0}})}};return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(n=e.coordinate)===null||n===void 0?void 0:n.y]),u.dismissed&&(((r=(a=e.coordinate)===null||a===void 0?void 0:a.x)!==null&&r!==void 0?r:0)!==u.dismissedAtCoordinate.x||((i=(s=e.coordinate)===null||s===void 0?void 0:s.y)!==null&&i!==void 0?i:0)!==u.dismissedAtCoordinate.y)&&f(Lu(Lu({},u),{},{dismissed:!1}));var{cssClasses:m,cssProperties:d}=cue({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),p=e.hasPortalFromProps?{}:Lu(Lu({transition:mue({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},d),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),b=Lu(Lu({},p),{},{visibility:!u.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return y.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:m,style:b,ref:e.innerRef},e.children)}var vue=y.memo(pue),S6=()=>{var e;return(e=Ae(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};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)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},m_.apply(null,arguments)}function zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $k(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zk(Object(n),!0).forEach(function(r){gue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gue(e,t,n){return(t=yue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yue(e){var t=bue(e,"string");return typeof t=="symbol"?t:t+""}function bue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bk={curveBasisClosed:Mie,curveBasisOpen:Rie,curveBasis:Pie,curveBumpX:gie,curveBumpY:yie,curveLinearClosed:kie,curveLinear:w0,curveMonotoneX:Die,curveMonotoneY:Iie,curveNatural:Lie,curveStep:zie,curveStepAfter:Bie,curveStepBefore:$ie},ly=e=>it(e.x)&&it(e.y),Uk=e=>e.base!=null&&ly(e.base)&&ly(e),ch=e=>e.x,uh=e=>e.y,xue=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Nm(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=Bk["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return Bk[n]||w0},Hk={connectNulls:!1,type:"linear"},wue=e=>{var{type:t=Hk.type,points:n=[],baseLine:r,layout:a,connectNulls:i=Hk.connectNulls}=e,s=xue(t,a),c=i?n.filter(ly):n;if(Array.isArray(r)){var u,f=n.map((w,x)=>$k($k({},w),{},{base:r[x]}));a==="vertical"?u=kv().y(uh).x1(ch).x0(w=>w.base.x):u=kv().x(ch).y1(uh).y0(w=>w.base.y);var m=u.defined(Uk).curve(s),d=i?f.filter(Uk):f;return m(d)}var p;a==="vertical"&&_e(r)?p=kv().y(uh).x1(ch).x0(r):_e(r)?p=kv().x(ch).y1(uh).y0(r):p=qB().x(ch).y(uh);var b=p.defined(ly).curve(s);return b(c)},HO=e=>{var{className:t,points:n,path:r,pathRef:a}=e,i=Vc();if((!n||!n.length)&&!r)return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||i,connectNulls:e.connectNulls},c=n&&n.length?wue(s):r;return y.createElement("path",m_({},ta(e),jO(e),{className:st("recharts-curve",t),d:c===null?void 0:c,ref:a}))},Sue=["x","y","top","left","width","height","className"];function p_(){return p_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p_.apply(null,arguments)}function Fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Eue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fk(Object(n),!0).forEach(function(r){_ue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ue(e,t,n){return(t=jue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jue(e){var t=Oue(e,"string");return typeof t=="symbol"?t:t+""}function Oue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cue(e,t){if(e==null)return{};var n,r,a=Aue(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Aue(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Nue=(e,t,n,r,a,i)=>"M".concat(e,",").concat(a,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),Tue=e=>{var{x:t=0,y:n=0,top:r=0,left:a=0,width:i=0,height:s=0,className:c}=e,u=Cue(e,Sue),f=Eue({x:t,y:n,top:r,left:a,width:i,height:s},u);return!_e(t)||!_e(n)||!_e(i)||!_e(s)||!_e(r)||!_e(a)?null:y.createElement("path",p_({},br(f),{className:st("recharts-cross",c),d:Nue(t,n,i,s,r,a)}))};function Pue(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Kk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(n),!0).forEach(function(r){Mue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mue(e,t,n){return(t=Rue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rue(e){var t=kue(e,"string");return typeof t=="symbol"?t:t+""}function kue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Due=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),E6=(e,t,n)=>e.map(r=>"".concat(Due(r)," ").concat(t,"ms ").concat(n)).join(","),Iue=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(a=>r.includes(a))),Vh=(e,t)=>Object.keys(t).reduce((n,r)=>Kk(Kk({},n),{},{[r]:e(r,t[r])}),{});function Vk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Vk(Object(n),!0).forEach(function(r){Lue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lue(e,t,n){return(t=zue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zue(e){var t=$ue(e,"string");return typeof t=="symbol"?t:t+""}function $ue(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cy=(e,t,n)=>e+(t-e)*n,v_=e=>{var{from:t,to:n}=e;return t!==n},_6=(e,t,n)=>{var r=Vh((a,i)=>{if(v_(i)){var[s,c]=e(i.from,i.to,i.velocity);return On(On({},i),{},{from:s,velocity:c})}return i},t);return n<1?Vh((a,i)=>v_(i)&&r[a]!=null?On(On({},i),{},{velocity:cy(i.velocity,r[a].velocity,n),from:cy(i.from,r[a].from,n)}):i,t):_6(e,r,n-1)};function Bue(e,t,n,r,a,i){var s,c=r.reduce((p,b)=>On(On({},p),{},{[b]:{from:e[b],velocity:0,to:t[b]}}),{}),u=()=>Vh((p,b)=>b.from,c),f=()=>!Object.values(c).filter(v_).length,m=null,d=p=>{s||(s=p);var b=p-s,w=b/n.dt;c=_6(n,c,w),a(On(On(On({},e),t),u())),s=p,f()||(m=i.setTimeout(d))};return()=>(m=i.setTimeout(d),()=>{var p;(p=m)===null||p===void 0||p()})}function Uue(e,t,n,r,a,i,s){var c=null,u=a.reduce((d,p)=>{var b=e[p],w=t[p];return b==null||w==null?d:On(On({},d),{},{[p]:[b,w]})},{}),f,m=d=>{f||(f=d);var p=(d-f)/r,b=Vh((x,S)=>cy(...S,n(p)),u);if(i(On(On(On({},e),t),b)),p<1)c=s.setTimeout(m);else{var w=Vh((x,S)=>cy(...S,n(1)),u);i(On(On(On({},e),t),w))}};return()=>(c=s.setTimeout(m),()=>{var d;(d=c)===null||d===void 0||d()})}const Hue=(e,t,n,r,a,i)=>{var s=Iue(e,t);return n==null?()=>(a(On(On({},e),t)),()=>{}):n.isStepper===!0?Bue(e,t,n,s,a,i):Uue(e,t,n,r,s,a,i)};var uy=1e-4,j6=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],O6=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),Yk=(e,t)=>n=>{var r=j6(e,t);return O6(r,n)},Fue=(e,t)=>n=>{var r=j6(e,t),a=[...r.map((i,s)=>i*s).slice(1),0];return O6(a,n)},que=e=>{var t,n=e.split("(");if(n.length!==2||n[0]!=="cubic-bezier")return null;var r=(t=n[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(r==null||r.length!==4)return null;var a=r.map(i=>parseFloat(i));return[a[0],a[1],a[2],a[3]]},Kue=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(n.length===1)switch(n[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var a=que(n[0]);if(a)return a}}return n.length===4?n:[0,0,1,1]},Vue=(e,t,n,r)=>{var a=Yk(e,n),i=Yk(t,r),s=Fue(e,n),c=f=>f>1?1:f<0?0:f,u=f=>{for(var m=f>1?1:f,d=m,p=0;p<8;++p){var b=a(d)-m,w=s(d);if(Math.abs(b-m)<uy||w<uy)return i(d);d=c(d-b/w)}return i(d)};return u.isStepper=!1,u},Xk=function(){return Vue(...Kue(...arguments))},Yue=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:a=17}=t,i=(s,c,u)=>{var f=-(s-c)*n,m=u*r,d=u+(f-m)*a/1e3,p=u*a/1e3+s;return Math.abs(p-c)<uy&&Math.abs(d)<uy?[c,0]:[p,d]};return i.isStepper=!0,i.dt=a,i},Xue=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Xk(e);case"spring":return Yue();default:if(e.split("(")[0]==="cubic-bezier")return Xk(e)}return typeof e=="function"?e:null};function Gue(e){var t,n=()=>null,r=!1,a=null,i=s=>{if(!r){if(Array.isArray(s)){if(!s.length)return;var c=s,[u,...f]=c;if(typeof u=="number"){a=e.setTimeout(i.bind(null,f),u);return}i(u),a=e.setTimeout(i.bind(null,f));return}typeof s=="string"&&(t=s,n(t)),typeof s=="object"&&(t=s,n(t)),typeof s=="function"&&s()}};return{stop:()=>{r=!0},start:s=>{r=!1,a&&(a(),a=null),i(s)},subscribe:s=>(n=s,()=>{n=()=>null}),getTimeoutController:()=>e}}class Wue{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),a=null,i=s=>{s-r>=n?t(s):typeof requestAnimationFrame=="function"&&(a=requestAnimationFrame(i))};return a=requestAnimationFrame(i),()=>{a!=null&&cancelAnimationFrame(a)}}}function Que(){return Gue(new Wue)}var Zue=y.createContext(Que);function Jue(e,t){var n=y.useContext(Zue);return y.useMemo(()=>t??n(e),[e,t,n])}var efe={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Gk={t:0},vS={t:1};function Lm(e){var t=bn(e,efe),{isActive:n,canBegin:r,duration:a,easing:i,begin:s,onAnimationEnd:c,onAnimationStart:u,children:f}=t,m=w6(),d=n==="auto"?!Im.isSsr&&!m:n,p=Jue(t.animationId,t.animationManager),[b,w]=y.useState(d?Gk:vS),x=y.useRef(null);return y.useEffect(()=>{d||w(vS)},[d]),y.useEffect(()=>{if(!d||!r)return hl;var S=Hue(Gk,vS,Xue(i),a,w,p.getTimeoutController()),E=()=>{x.current=S()};return p.start([u,s,E,a,c]),()=>{p.stop(),x.current&&x.current(),c()}},[d,r,a,i,s,u,c,p]),f(b.t)}function zm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=y.useRef($h(t)),r=y.useRef(e);return r.current!==e&&(n.current=$h(t),r.current=e),n.current}var tfe=["radius"],nfe=["radius"],Wk,Qk,Zk,Jk,eD,tD,nD,rD,aD,iD;function oD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oD(Object(n),!0).forEach(function(r){rfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rfe(e,t,n){return(t=afe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function afe(e){var t=ife(e,"string");return typeof t=="symbol"?t:t+""}function ife(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fy(){return fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fy.apply(null,arguments)}function lD(e,t){if(e==null)return{};var n,r,a=ofe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function ofe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function hi(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var cD=(e,t,n,r,a)=>{var i=Xs(n),s=Xs(r),c=Math.min(Math.abs(i)/2,Math.abs(s)/2),u=s>=0?1:-1,f=i>=0?1:-1,m=s>=0&&i>=0||s<0&&i<0?1:0,d;if(c>0&&Array.isArray(a)){for(var p=[0,0,0,0],b=0,w=4;b<w;b++){var x,S=(x=a[b])!==null&&x!==void 0?x:0;p[b]=S>c?c:S}d=Jt(Wk||(Wk=hi(["M",",",""])),e,t+u*p[0]),p[0]>0&&(d+=Jt(Qk||(Qk=hi(["A ",",",",0,0,",",",",",""])),p[0],p[0],m,e+f*p[0],t)),d+=Jt(Zk||(Zk=hi(["L ",",",""])),e+n-f*p[1],t),p[1]>0&&(d+=Jt(Jk||(Jk=hi(["A ",",",",0,0,",`,
        `,",",""])),p[1],p[1],m,e+n,t+u*p[1])),d+=Jt(eD||(eD=hi(["L ",",",""])),e+n,t+r-u*p[2]),p[2]>0&&(d+=Jt(tD||(tD=hi(["A ",",",",0,0,",`,
        `,",",""])),p[2],p[2],m,e+n-f*p[2],t+r)),d+=Jt(nD||(nD=hi(["L ",",",""])),e+f*p[3],t+r),p[3]>0&&(d+=Jt(rD||(rD=hi(["A ",",",",0,0,",`,
        `,",",""])),p[3],p[3],m,e,t+r-u*p[3])),d+="Z"}else if(c>0&&a===+a&&a>0){var E=Math.min(c,a);d=Jt(aD||(aD=hi(["M ",",",`
            A `,",",",0,0,",",",",",`
            L `,",",`
            A `,",",",0,0,",",",",",`
            L `,",",`
            A `,",",",0,0,",",",",",`
            L `,",",`
            A `,",",",0,0,",",",","," Z"])),e,t+u*E,E,E,m,e+f*E,t,e+n-f*E,t,E,E,m,e+n,t+u*E,e+n,t+r-u*E,E,E,m,e+n-f*E,t+r,e+f*E,t+r,E,E,m,e,t+r-u*E)}else d=Jt(iD||(iD=hi(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return d},uD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},C6=e=>{var t=bn(e,uD),n=y.useRef(null),[r,a]=y.useState(-1);y.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var H=n.current.getTotalLength();H&&a(H)}catch{}},[]);var{x:i,y:s,width:c,height:u,radius:f,className:m}=t,{animationEasing:d,animationDuration:p,animationBegin:b,isAnimationActive:w,isUpdateAnimationActive:x}=t,S=y.useRef(c),E=y.useRef(u),C=y.useRef(i),O=y.useRef(s),A=y.useMemo(()=>({x:i,y:s,width:c,height:u,radius:f}),[i,s,c,u,f]),T=zm(A,"rectangle-");if(i!==+i||s!==+s||c!==+c||u!==+u||c===0||u===0)return null;var N=st("recharts-rectangle",m);if(!x){var P=br(t),{radius:k}=P,D=lD(P,tfe);return y.createElement("path",fy({},D,{x:Xs(i),y:Xs(s),width:Xs(c),height:Xs(u),radius:typeof f=="number"?f:void 0,className:N,d:cD(i,s,c,u,f)}))}var K=S.current,B=E.current,I=C.current,W=O.current,z="0px ".concat(r===-1?1:r,"px"),V="".concat(r,"px ").concat(r,"px"),R=E6(["strokeDasharray"],p,typeof d=="string"?d:uD.animationEasing);return y.createElement(Lm,{animationId:T,key:T,canBegin:r>0,duration:p,easing:d,isActive:x,begin:b},H=>{var q=$t(K,c,H),F=$t(B,u,H),Y=$t(I,i,H),$=$t(W,s,H);n.current&&(S.current=q,E.current=F,C.current=Y,O.current=$);var L;w?H>0?L={transition:R,strokeDasharray:V}:L={strokeDasharray:z}:L={strokeDasharray:V};var G=br(t),{radius:Z}=G,J=lD(G,nfe);return y.createElement("path",fy({},J,{radius:typeof f=="number"?f:void 0,className:N,d:cD(Y,$,q,F,f),ref:n,style:sD(sD({},L),t.style)}))})};function fD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function dD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fD(Object(n),!0).forEach(function(r){sfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fD(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sfe(e,t,n){return(t=lfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lfe(e){var t=cfe(e,"string");return typeof t=="symbol"?t:t+""}function cfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dy=Math.PI/180,ufe=e=>e*180/Math.PI,pn=(e,t,n,r)=>({x:e+Math.cos(-dy*r)*n,y:t+Math.sin(-dy*r)*n}),A6=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},ffe=(e,t)=>{var{x:n,y:r}=e,{x:a,y:i}=t;return Math.sqrt((n-a)**2+(r-i)**2)},dfe=(e,t)=>{var{x:n,y:r}=e,{cx:a,cy:i}=t,s=ffe({x:n,y:r},{x:a,y:i});if(s<=0)return{radius:s,angle:0};var c=(n-a)/s,u=Math.acos(c);return r>i&&(u=2*Math.PI-u),{radius:s,angle:ufe(u),angleInRadian:u}},hfe=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),a=Math.floor(n/360),i=Math.min(r,a);return{startAngle:t-i*360,endAngle:n-i*360}},mfe=(e,t)=>{var{startAngle:n,endAngle:r}=t,a=Math.floor(n/360),i=Math.floor(r/360),s=Math.min(a,i);return e+s*360},pfe=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:a,angle:i}=dfe({x:n,y:r},t),{innerRadius:s,outerRadius:c}=t;if(a<s||a>c||a===0)return null;var{startAngle:u,endAngle:f}=hfe(t),m=i,d;if(u<=f){for(;m>f;)m-=360;for(;m<u;)m+=360;d=m>=u&&m<=f}else{for(;m>u;)m-=360;for(;m<f;)m+=360;d=m>=f&&m<=u}return d?dD(dD({},t),{},{radius:a,angle:mfe(m,t)}):null};function N6(e){var{cx:t,cy:n,radius:r,startAngle:a,endAngle:i}=e,s=pn(t,n,r,a),c=pn(t,n,r,i);return{points:[s,c],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}var hD,mD,pD,vD,gD,yD,bD;function g_(){return g_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g_.apply(null,arguments)}function Wl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var vfe=(e,t)=>{var n=Ln(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Hv=e=>{var{cx:t,cy:n,radius:r,angle:a,sign:i,isExternal:s,cornerRadius:c,cornerIsExternal:u}=e,f=c*(s?1:-1)+r,m=Math.asin(c/f)/dy,d=u?a:a+i*m,p=pn(t,n,f,d),b=pn(t,n,r,d),w=u?a-i*m:a,x=pn(t,n,f*Math.cos(m*dy),w);return{center:p,circleTangency:b,lineTangency:x,theta:m}},T6=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:i,endAngle:s}=e,c=vfe(i,s),u=i+c,f=pn(t,n,a,i),m=pn(t,n,a,u),d=Jt(hD||(hD=Wl(["M ",",",`
    A `,",",`,0,
    `,",",`,
    `,",",`
  `])),f.x,f.y,a,a,+(Math.abs(c)>180),+(i>u),m.x,m.y);if(r>0){var p=pn(t,n,r,i),b=pn(t,n,r,u);d+=Jt(mD||(mD=Wl(["L ",",",`
            A `,",",`,0,
            `,",",`,
            `,","," Z"])),b.x,b.y,r,r,+(Math.abs(c)>180),+(i<=u),p.x,p.y)}else d+=Jt(pD||(pD=Wl(["L ",","," Z"])),t,n);return d},gfe=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,cornerRadius:i,forceCornerRadius:s,cornerIsExternal:c,startAngle:u,endAngle:f}=e,m=Ln(f-u),{circleTangency:d,lineTangency:p,theta:b}=Hv({cx:t,cy:n,radius:a,angle:u,sign:m,cornerRadius:i,cornerIsExternal:c}),{circleTangency:w,lineTangency:x,theta:S}=Hv({cx:t,cy:n,radius:a,angle:f,sign:-m,cornerRadius:i,cornerIsExternal:c}),E=c?Math.abs(u-f):Math.abs(u-f)-b-S;if(E<0)return s?Jt(vD||(vD=Wl(["M ",",",`
        a`,",",",0,0,1,",`,0
        a`,",",",0,0,1,",`,0
      `])),p.x,p.y,i,i,i*2,i,i,-i*2):T6({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:u,endAngle:f});var C=Jt(gD||(gD=Wl(["M ",",",`
    A`,",",",0,0,",",",",",`
    A`,",",",0,",",",",",",",`
    A`,",",",0,0,",",",",",`
  `])),p.x,p.y,i,i,+(m<0),d.x,d.y,a,a,+(E>180),+(m<0),w.x,w.y,i,i,+(m<0),x.x,x.y);if(r>0){var{circleTangency:O,lineTangency:A,theta:T}=Hv({cx:t,cy:n,radius:r,angle:u,sign:m,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),{circleTangency:N,lineTangency:P,theta:k}=Hv({cx:t,cy:n,radius:r,angle:f,sign:-m,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),D=c?Math.abs(u-f):Math.abs(u-f)-T-k;if(D<0&&i===0)return"".concat(C,"L").concat(t,",").concat(n,"Z");C+=Jt(yD||(yD=Wl(["L",",",`
      A`,",",",0,0,",",",",",`
      A`,",",",0,",",",",",",",`
      A`,",",",0,0,",",",",","Z"])),P.x,P.y,i,i,+(m<0),N.x,N.y,r,r,+(D>180),+(m>0),O.x,O.y,i,i,+(m<0),A.x,A.y)}else C+=Jt(bD||(bD=Wl(["L",",","Z"])),t,n);return C},yfe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},P6=e=>{var t=bn(e,yfe),{cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:s,forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:m,className:d}=t;if(i<a||f===m)return null;var p=st("recharts-sector",d),b=i-a,w=cr(s,b,0,!0),x;return w>0&&Math.abs(f-m)<360?x=gfe({cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:Math.min(w,b/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:m}):x=T6({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:f,endAngle:m}),y.createElement("path",g_({},br(t),{className:p,d:x}))};function bfe(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(i8(t)){if(e==="centric"){var{cx:r,cy:a,innerRadius:i,outerRadius:s,angle:c}=t,u=pn(r,a,i,c),f=pn(r,a,s,c);return[{x:u.x,y:u.y},{x:f.x,y:f.y}]}return N6(t)}}var gS={},yS={},bS={},xD;function xfe(){return xD||(xD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=b8();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(bS)),bS}var wD;function wfe(){return wD||(wD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xfe();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(yS)),yS}var SD;function Sfe(){return SD||(SD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=x8(),n=wfe();function r(a,i,s){s&&typeof s!="number"&&t.isIterateeCall(a,i,s)&&(i=s=void 0),a=n.toFinite(a),i===void 0?(i=a,a=0):i=n.toFinite(i),s=s===void 0?a<i?1:-1:n.toFinite(s);const c=Math.max(Math.ceil((i-a)/(s||1)),0),u=new Array(c);for(let f=0;f<c;f++)u[f]=a,a+=s;return u}e.range=r})(gS)),gS}var xS,ED;function Efe(){return ED||(ED=1,xS=Sfe().range),xS}var _fe=Efe();const M6=Za(_fe);var Ho=e=>e.chartData,U0=oe([Ho],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),FO=(e,t,n,r)=>r?U0(e):Ho(e),jfe=(e,t,n)=>n?U0(e):Ho(e);function Ci(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(it(t)&&it(n))return!0}return!1}function _D(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function R6(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,a,i;if(it(n))a=n;else if(typeof n=="function")return;if(it(r))i=r;else if(typeof r=="function")return;var s=[a,i];if(Ci(s))return s}}function Ofe(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(Ci(r))return _D(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[a,i]=e,s,c;if(a==="auto")t!=null&&(s=Math.min(...t));else if(_e(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t==null?void 0:t[0]))}catch{}else if(typeof a=="string"&&hk.test(a)){var u=hk.exec(a);if(u==null||u[1]==null||t==null)s=void 0;else{var f=+u[1];s=t[0]-f}}else s=t==null?void 0:t[0];if(i==="auto")t!=null&&(c=Math.max(...t));else if(_e(i))c=i;else if(typeof i=="function")try{t!=null&&(c=i(t==null?void 0:t[1]))}catch{}else if(typeof i=="string"&&mk.test(i)){var m=mk.exec(i);if(m==null||m[1]==null||t==null)c=void 0;else{var d=+m[1];c=t[1]+d}}else c=t==null?void 0:t[1];var p=[s,c];if(Ci(p))return t==null?p:_D(p,t,n)}}}var ed=1e9,Cfe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},KO,Ut=!0,Aa="[DecimalError] ",fc=Aa+"Invalid argument: ",qO=Aa+"Exponent out of range: ",td=Math.floor,Yl=Math.pow,Afe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Wr,In=1e7,It=7,k6=9007199254740991,hy=td(k6/It),je={};je.absoluteValue=je.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};je.comparedTo=je.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};je.decimalPlaces=je.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*It;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};je.dividedBy=je.div=function(e){return _o(this,new this.constructor(e))};je.dividedToIntegerBy=je.idiv=function(e){var t=this,n=t.constructor;return Ot(_o(t,new n(e),0,1),n.precision)};je.equals=je.eq=function(e){return!this.cmp(e)};je.exponent=function(){return yn(this)};je.greaterThan=je.gt=function(e){return this.cmp(e)>0};je.greaterThanOrEqualTo=je.gte=function(e){return this.cmp(e)>=0};je.isInteger=je.isint=function(){return this.e>this.d.length-2};je.isNegative=je.isneg=function(){return this.s<0};je.isPositive=je.ispos=function(){return this.s>0};je.isZero=function(){return this.s===0};je.lessThan=je.lt=function(e){return this.cmp(e)<0};je.lessThanOrEqualTo=je.lte=function(e){return this.cmp(e)<1};je.logarithm=je.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Wr))throw Error(Aa+"NaN");if(n.s<1)throw Error(Aa+(n.s?"NaN":"-Infinity"));return n.eq(Wr)?new r(0):(Ut=!1,t=_o(Yh(n,i),Yh(e,i),i),Ut=!0,Ot(t,a))};je.minus=je.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?L6(t,e):D6(t,(e.s=-e.s,e))};je.modulo=je.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Aa+"NaN");return n.s?(Ut=!1,t=_o(n,e,0,1).times(e),Ut=!0,n.minus(t)):Ot(new r(n),a)};je.naturalExponential=je.exp=function(){return I6(this)};je.naturalLogarithm=je.ln=function(){return Yh(this)};je.negated=je.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};je.plus=je.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?D6(t,e):L6(t,(e.s=-e.s,e))};je.precision=je.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(fc+e);if(t=yn(a)+1,r=a.d.length-1,n=r*It+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};je.squareRoot=je.sqrt=function(){var e,t,n,r,a,i,s,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(Aa+"NaN")}for(e=yn(c),Ut=!1,a=Math.sqrt(+c),a==0||a==1/0?(t=_i(c.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=td((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(a.toString()),n=u.precision,a=s=n+3;;)if(i=r,r=i.plus(_o(c,i,s+2)).times(.5),_i(i.d).slice(0,s)===(t=_i(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Ot(i,n+1,0),i.times(i).eq(c)){r=i;break}}else if(t!="9999")break;s+=4}return Ut=!0,Ot(r,n)};je.times=je.mul=function(e){var t,n,r,a,i,s,c,u,f,m=this,d=m.constructor,p=m.d,b=(e=new d(e)).d;if(!m.s||!e.s)return new d(0);for(e.s*=m.s,n=m.e+e.e,u=p.length,f=b.length,u<f&&(i=p,p=b,b=i,s=u,u=f,f=s),i=[],s=u+f,r=s;r--;)i.push(0);for(r=f;--r>=0;){for(t=0,a=u+r;a>r;)c=i[a]+b[r]*p[a-r-1]+t,i[a--]=c%In|0,t=c/In|0;i[a]=(i[a]+t)%In|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Ut?Ot(e,d.precision):e};je.toDecimalPlaces=je.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Mi(e,0,ed),t===void 0?t=r.rounding:Mi(t,0,8),Ot(n,e+yn(n)+1,t))};je.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Nc(r,!0):(Mi(e,0,ed),t===void 0?t=a.rounding:Mi(t,0,8),r=Ot(new a(r),e+1,t),n=Nc(r,!0,e+1)),n};je.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?Nc(a):(Mi(e,0,ed),t===void 0?t=i.rounding:Mi(t,0,8),r=Ot(new i(a),e+yn(a)+1,t),n=Nc(r.abs(),!1,e+yn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};je.toInteger=je.toint=function(){var e=this,t=e.constructor;return Ot(new t(e),yn(e)+1,t.rounding)};je.toNumber=function(){return+this};je.toPower=je.pow=function(e){var t,n,r,a,i,s,c=this,u=c.constructor,f=12,m=+(e=new u(e));if(!e.s)return new u(Wr);if(c=new u(c),!c.s){if(e.s<1)throw Error(Aa+"Infinity");return c}if(c.eq(Wr))return c;if(r=u.precision,e.eq(Wr))return Ot(c,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=c.s,s){if((n=m<0?-m:m)<=k6){for(a=new u(Wr),t=Math.ceil(r/It+4),Ut=!1;n%2&&(a=a.times(c),OD(a.d,t)),n=td(n/2),n!==0;)c=c.times(c),OD(c.d,t);return Ut=!0,e.s<0?new u(Wr).div(a):Ot(a,r)}}else if(i<0)throw Error(Aa+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,Ut=!1,a=e.times(Yh(c,r+f)),Ut=!0,a=I6(a),a.s=i,a};je.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=yn(a),r=Nc(a,n<=i.toExpNeg||n>=i.toExpPos)):(Mi(e,1,ed),t===void 0?t=i.rounding:Mi(t,0,8),a=Ot(new i(a),e,t),n=yn(a),r=Nc(a,e<=n||n<=i.toExpNeg,e)),r};je.toSignificantDigits=je.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Mi(e,1,ed),t===void 0?t=r.rounding:Mi(t,0,8)),Ot(new r(n),e,t)};je.toString=je.valueOf=je.val=je.toJSON=je[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=yn(e),n=e.constructor;return Nc(e,t<=n.toExpNeg||t>=n.toExpPos)};function D6(e,t){var n,r,a,i,s,c,u,f,m=e.constructor,d=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),Ut?Ot(t,d):t;if(u=e.d,f=t.d,s=e.e,a=t.e,u=u.slice(),i=s-a,i){for(i<0?(r=u,i=-i,c=f.length):(r=f,a=s,c=u.length),s=Math.ceil(d/It),c=s>c?s+1:c+1,i>c&&(i=c,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(c=u.length,i=f.length,c-i<0&&(i=c,r=f,f=u,u=r),n=0;i;)n=(u[--i]=u[i]+f[i]+n)/In|0,u[i]%=In;for(n&&(u.unshift(n),++a),c=u.length;u[--c]==0;)u.pop();return t.d=u,t.e=a,Ut?Ot(t,d):t}function Mi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(fc+e)}function _i(e){var t,n,r,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)r=e[t]+"",n=It-r.length,n&&(i+=Rs(n)),i+=r;s=e[t],r=s+"",n=It-r.length,n&&(i+=Rs(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var _o=(function(){function e(r,a){var i,s=0,c=r.length;for(r=r.slice();c--;)i=r[c]*a+s,r[c]=i%In|0,s=i/In|0;return s&&r.unshift(s),r}function t(r,a,i,s){var c,u;if(i!=s)u=i>s?1:-1;else for(c=u=0;c<i;c++)if(r[c]!=a[c]){u=r[c]>a[c]?1:-1;break}return u}function n(r,a,i){for(var s=0;i--;)r[i]-=s,s=r[i]<a[i]?1:0,r[i]=s*In+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,s){var c,u,f,m,d,p,b,w,x,S,E,C,O,A,T,N,P,k,D=r.constructor,K=r.s==a.s?1:-1,B=r.d,I=a.d;if(!r.s)return new D(r);if(!a.s)throw Error(Aa+"Division by zero");for(u=r.e-a.e,P=I.length,T=B.length,b=new D(K),w=b.d=[],f=0;I[f]==(B[f]||0);)++f;if(I[f]>(B[f]||0)&&--u,i==null?C=i=D.precision:s?C=i+(yn(r)-yn(a))+1:C=i,C<0)return new D(0);if(C=C/It+2|0,f=0,P==1)for(m=0,I=I[0],C++;(f<T||m)&&C--;f++)O=m*In+(B[f]||0),w[f]=O/I|0,m=O%I|0;else{for(m=In/(I[0]+1)|0,m>1&&(I=e(I,m),B=e(B,m),P=I.length,T=B.length),A=P,x=B.slice(0,P),S=x.length;S<P;)x[S++]=0;k=I.slice(),k.unshift(0),N=I[0],I[1]>=In/2&&++N;do m=0,c=t(I,x,P,S),c<0?(E=x[0],P!=S&&(E=E*In+(x[1]||0)),m=E/N|0,m>1?(m>=In&&(m=In-1),d=e(I,m),p=d.length,S=x.length,c=t(d,x,p,S),c==1&&(m--,n(d,P<p?k:I,p))):(m==0&&(c=m=1),d=I.slice()),p=d.length,p<S&&d.unshift(0),n(x,d,S),c==-1&&(S=x.length,c=t(I,x,P,S),c<1&&(m++,n(x,P<S?k:I,S))),S=x.length):c===0&&(m++,x=[0]),w[f++]=m,c&&x[0]?x[S++]=B[A]||0:(x=[B[A]],S=1);while((A++<T||x[0]!==void 0)&&C--)}return w[0]||w.shift(),b.e=u,Ot(b,s?i+yn(b)+1:i)}})();function I6(e,t){var n,r,a,i,s,c,u=0,f=0,m=e.constructor,d=m.precision;if(yn(e)>16)throw Error(qO+yn(e));if(!e.s)return new m(Wr);for(Ut=!1,c=d,s=new m(.03125);e.abs().gte(.1);)e=e.times(s),f+=5;for(r=Math.log(Yl(2,f))/Math.LN10*2+5|0,c+=r,n=a=i=new m(Wr),m.precision=c;;){if(a=Ot(a.times(e),c),n=n.times(++u),s=i.plus(_o(a,n,c)),_i(s.d).slice(0,c)===_i(i.d).slice(0,c)){for(;f--;)i=Ot(i.times(i),c);return m.precision=d,t==null?(Ut=!0,Ot(i,d)):i}i=s}}function yn(e){for(var t=e.e*It,n=e.d[0];n>=10;n/=10)t++;return t}function wS(e,t,n){if(t>e.LN10.sd())throw Ut=!0,n&&(e.precision=n),Error(Aa+"LN10 precision limit exceeded");return Ot(new e(e.LN10),t)}function Rs(e){for(var t="";e--;)t+="0";return t}function Yh(e,t){var n,r,a,i,s,c,u,f,m,d=1,p=10,b=e,w=b.d,x=b.constructor,S=x.precision;if(b.s<1)throw Error(Aa+(b.s?"NaN":"-Infinity"));if(b.eq(Wr))return new x(0);if(t==null?(Ut=!1,f=S):f=t,b.eq(10))return t==null&&(Ut=!0),wS(x,f);if(f+=p,x.precision=f,n=_i(w),r=n.charAt(0),i=yn(b),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)b=b.times(e),n=_i(b.d),r=n.charAt(0),d++;i=yn(b),r>1?(b=new x("0."+n),i++):b=new x(r+"."+n.slice(1))}else return u=wS(x,f+2,S).times(i+""),b=Yh(new x(r+"."+n.slice(1)),f-p).plus(u),x.precision=S,t==null?(Ut=!0,Ot(b,S)):b;for(c=s=b=_o(b.minus(Wr),b.plus(Wr),f),m=Ot(b.times(b),f),a=3;;){if(s=Ot(s.times(m),f),u=c.plus(_o(s,new x(a),f)),_i(u.d).slice(0,f)===_i(c.d).slice(0,f))return c=c.times(2),i!==0&&(c=c.plus(wS(x,f+2,S).times(i+""))),c=_o(c,new x(d),f),x.precision=S,t==null?(Ut=!0,Ot(c,S)):c;c=u,a+=2}}function jD(e,t){var n,r,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=td(n/It),e.d=[],r=(n+1)%It,n<0&&(r+=It),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=It;r<a;)e.d.push(+t.slice(r,r+=It));t=t.slice(r),r=It-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),Ut&&(e.e>hy||e.e<-hy))throw Error(qO+n)}else e.s=0,e.e=0,e.d=[0];return e}function Ot(e,t,n){var r,a,i,s,c,u,f,m,d=e.d;for(s=1,i=d[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=It,a=t,f=d[m=0];else{if(m=Math.ceil((r+1)/It),i=d.length,m>=i)return e;for(f=i=d[m],s=1;i>=10;i/=10)s++;r%=It,a=r-It+s}if(n!==void 0&&(i=Yl(10,s-a-1),c=f/i%10|0,u=t<0||d[m+1]!==void 0||f%i,u=n<4?(c||u)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||u||n==6&&(r>0?a>0?f/Yl(10,s-a):0:d[m-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return u?(i=yn(e),d.length=1,t=t-i-1,d[0]=Yl(10,(It-t%It)%It),e.e=td(-t/It)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=m,i=1,m--):(d.length=m+1,i=Yl(10,It-r),d[m]=a>0?(f/Yl(10,s-a)%Yl(10,a)|0)*i:0),u)for(;;)if(m==0){(d[0]+=i)==In&&(d[0]=1,++e.e);break}else{if(d[m]+=i,d[m]!=In)break;d[m--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(Ut&&(e.e>hy||e.e<-hy))throw Error(qO+yn(e));return e}function L6(e,t){var n,r,a,i,s,c,u,f,m,d,p=e.constructor,b=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Ut?Ot(t,b):t;if(u=e.d,d=t.d,r=t.e,f=e.e,u=u.slice(),s=f-r,s){for(m=s<0,m?(n=u,s=-s,c=d.length):(n=d,r=f,c=u.length),a=Math.max(Math.ceil(b/It),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=u.length,c=d.length,m=a<c,m&&(c=a),a=0;a<c;a++)if(u[a]!=d[a]){m=u[a]<d[a];break}s=0}for(m&&(n=u,u=d,d=n,t.s=-t.s),c=u.length,a=d.length-c;a>0;--a)u[c++]=0;for(a=d.length;a>s;){if(u[--a]<d[a]){for(i=a;i&&u[--i]===0;)u[i]=In-1;--u[i],u[a]+=In}u[a]-=d[a]}for(;u[--c]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=r,Ut?Ot(t,b):t):new p(0)}function Nc(e,t,n){var r,a=yn(e),i=_i(e.d),s=i.length;return t?(n&&(r=n-s)>0?i=i.charAt(0)+"."+i.slice(1)+Rs(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Rs(-a-1)+i,n&&(r=n-s)>0&&(i+=Rs(r))):a>=s?(i+=Rs(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+Rs(r))):((r=a+1)<s&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-s)>0&&(a+1===s&&(i+="."),i+=Rs(r))),e.s<0?"-"+i:i}function OD(e,t){if(e.length>t)return e.length=t,!0}function z6(e){var t,n,r;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(fc+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return jD(s,i.toString())}else if(typeof i!="string")throw Error(fc+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,Afe.test(i))jD(s,i);else throw Error(fc+i)}if(a.prototype=je,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=z6,a.config=a.set=Nfe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return a.config(e),a}function Nfe(e){if(!e||typeof e!="object")throw Error(Aa+"Object expected");var t,n,r,a=["precision",1,ed,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(td(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(fc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(fc+n+": "+r);return this}var KO=z6(Cfe);Wr=new KO(1);const at=KO;function $6(e){var t;return e===0?t=1:t=Math.floor(new at(e).abs().log(10).toNumber())+1,t}function B6(e,t,n){for(var r=new at(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var U6=e=>{var[t,n]=e,[r,a]=[t,n];return t>n&&([r,a]=[n,t]),[r,a]},VO=(e,t,n)=>{if(e.lte(0))return new at(0);var r=$6(e.toNumber()),a=new at(10).pow(r),i=e.div(a),s=r!==1?.05:.1,c=new at(Math.ceil(i.div(s).toNumber())).add(n).mul(s),u=c.mul(a);return t?new at(u.toNumber()):new at(Math.ceil(u.toNumber()))},H6=(e,t,n)=>{var r;if(e.lte(0))return new at(0);var a=[1,2,2.5,5],i=e.toNumber(),s=Math.floor(new at(i).abs().log(10).toNumber()),c=new at(10).pow(s),u=e.div(c).toNumber(),f=a.findIndex(b=>b>=u-1e-10);if(f===-1&&(c=c.mul(10),f=0),f+=n,f>=a.length){var m=Math.floor(f/a.length);f%=a.length,c=c.mul(new at(10).pow(m))}var d=(r=a[f])!==null&&r!==void 0?r:1,p=new at(d).mul(c);return t?p:new at(Math.ceil(p.toNumber()))},Tfe=(e,t,n)=>{var r=new at(1),a=new at(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new at(10).pow($6(e)-1),a=new at(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new at(Math.floor(e)))}else e===0?a=new at(Math.floor((t-1)/2)):n||(a=new at(Math.floor(e)));for(var s=Math.floor((t-1)/2),c=[],u=0;u<t;u++)c.push(a.add(new at(u-s).mul(r)).toNumber());return c},F6=function(t,n,r,a){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:VO;if(!Number.isFinite((n-t)/(r-1)))return{step:new at(0),tickMin:new at(0),tickMax:new at(0)};var c=s(new at(n).sub(t).div(r-1),a,i),u;t<=0&&n>=0?u=new at(0):(u=new at(t).add(n).div(2),u=u.sub(new at(u).mod(c)));var f=Math.ceil(u.sub(t).div(c).toNumber()),m=Math.ceil(new at(n).sub(u).div(c).toNumber()),d=f+m+1;return d>r?F6(t,n,r,a,i+1,s):(d<r&&(m=n>0?m+(r-d):m,f=n>0?f:f+(r-d)),{step:c,tickMin:u.sub(new at(f).mul(c)),tickMax:u.add(new at(m).mul(c))})},CD=function(t){var[n,r]=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",c=Math.max(a,2),[u,f]=U6([n,r]);if(u===-1/0||f===1/0){var m=f===1/0?[u,...Array(a-1).fill(1/0)]:[...Array(a-1).fill(-1/0),f];return n>r?m.reverse():m}if(u===f)return Tfe(u,a,i);var d=s==="snap125"?H6:VO,{step:p,tickMin:b,tickMax:w}=F6(u,f,c,i,0,d),x=B6(b,w.add(new at(.1).mul(p)),p);return n>r?x.reverse():x},AD=function(t,n){var[r,a]=t,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[c,u]=U6([r,a]);if(c===-1/0||u===1/0)return[r,a];if(c===u)return[c];var f=s==="snap125"?H6:VO,m=Math.max(n,2),d=f(new at(u).sub(c).div(m-1),i,0),p=[...B6(new at(c),new at(u),d),u];return i===!1&&(p=p.map(b=>Math.round(b))),r>a?p.reverse():p},q6=e=>e.rootProps.maxBarSize,Pfe=e=>e.rootProps.barGap,K6=e=>e.rootProps.barCategoryGap,Mfe=e=>e.rootProps.barSize,$m=e=>e.rootProps.stackOffset,V6=e=>e.rootProps.reverseStackOrder,YO=e=>e.options.chartName,XO=e=>e.rootProps.syncId,Y6=e=>e.rootProps.syncMethod,GO=e=>e.options.eventEmitter,vn={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Bl={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},mi={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},H0=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function F0(e,t,n){if(n!=="auto")return n;if(e!=null)return $o(e,t)?"category":"number"}function ND(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function my(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ND(Object(n),!0).forEach(function(r){Rfe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ND(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rfe(e,t,n){return(t=kfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kfe(e){var t=Dfe(e,"string");return typeof t=="symbol"?t:t+""}function Dfe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TD={allowDataOverflow:Bl.allowDataOverflow,allowDecimals:Bl.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Bl.angleAxisId,includeHidden:!1,name:void 0,reversed:Bl.reversed,scale:Bl.scale,tick:Bl.tick,tickCount:void 0,ticks:void 0,type:Bl.type,unit:void 0,niceTicks:"auto"},PD={allowDataOverflow:mi.allowDataOverflow,allowDecimals:mi.allowDecimals,allowDuplicatedCategory:mi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:mi.radiusAxisId,includeHidden:mi.includeHidden,name:void 0,reversed:mi.reversed,scale:mi.scale,tick:mi.tick,tickCount:mi.tickCount,ticks:void 0,type:mi.type,unit:void 0,niceTicks:"auto"},Ife=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},WO=oe([Ife,c6],(e,t)=>{var n;if(e!=null)return e;var r=(n=F0(t,"angleAxis",TD.type))!==null&&n!==void 0?n:"category";return my(my({},TD),{},{type:r})}),Lfe=(e,t)=>e.polarAxis.radiusAxis[t],QO=oe([Lfe,c6],(e,t)=>{var n;if(e!=null)return e;var r=(n=F0(t,"radiusAxis",PD.type))!==null&&n!==void 0?n:"category";return my(my({},PD),{},{type:r})}),q0=e=>e.polarOptions,ZO=oe([Bo,Uo,An],A6),X6=oe([q0,ZO],(e,t)=>{if(e!=null)return cr(e.innerRadius,t,0)}),G6=oe([q0,ZO],(e,t)=>{if(e!=null)return cr(e.outerRadius,t,t*.8)}),zfe=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},W6=oe([q0],zfe);oe([WO,W6],H0);var Q6=oe([ZO,X6,G6],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});oe([QO,Q6],H0);var Z6=oe([ft,q0,X6,G6,Bo,Uo],(e,t,n,r,a,i)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:s,cy:c,startAngle:u,endAngle:f}=t;return{cx:cr(s,a,a/2),cy:cr(c,i,i/2),innerRadius:n,outerRadius:r,startAngle:u,endAngle:f,clockWise:!1}}}),Yt=(e,t)=>t,Bm=(e,t,n)=>n;function JO(e){return e==null?void 0:e.id}function J6(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:a,dataKey:i}=n,s=new Map;return e.forEach(c=>{var u,f=(u=c.data)!==null&&u!==void 0?u:r;if(!(f==null||f.length===0)){var m=JO(c);f.forEach((d,p)=>{var b=i==null||a?p:String(St(d,i,null)),w=St(d,c.dataKey,0),x;s.has(b)?x=s.get(b):x={},Object.assign(x,{[m]:w}),s.set(b,x)})}}),Array.from(s.values())}function K0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var V0=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Y0(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function $fe(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var Un=e=>{var t=ft(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},nd=e=>e.tooltip.settings.axisId;function eC(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),a=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:(function(i){function s(){return i.apply(this,arguments)}return s.toString=function(){return i.toString()},s})(()=>a),rangeMin:()=>a[0],rangeMax:()=>a[1],isInRange(i){var s=a[0],c=a[1];return s<=c?i>=s&&i<=c:i>=c&&i<=s},bandwidth:n?()=>n.call(e):void 0,ticks:t?i=>t.call(e,i):void 0,map:(i,s)=>{var c=e(i);if(c!=null){if(e.bandwidth&&s!==null&&s!==void 0&&s.position){var u=e.bandwidth();switch(s.position){case"middle":c+=u/2;break;case"end":c+=u;break}}return c}}}}}var eU=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Ci(t)){for(var n,r,a=0;a<t.length;a++){var i=t[a];it(i)&&((n===void 0||i<n)&&(n=i),(r===void 0||i>r)&&(r=i))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t}default:return t}};function Ws(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Bfe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tC(e){let t,n,r;e.length!==2?(t=Ws,n=(c,u)=>Ws(e(c),u),r=(c,u)=>e(c)-u):(t=e===Ws||e===Bfe?e:Ufe,n=e,r=e);function a(c,u,f=0,m=c.length){if(f<m){if(t(u,u)!==0)return m;do{const d=f+m>>>1;n(c[d],u)<0?f=d+1:m=d}while(f<m)}return f}function i(c,u,f=0,m=c.length){if(f<m){if(t(u,u)!==0)return m;do{const d=f+m>>>1;n(c[d],u)<=0?f=d+1:m=d}while(f<m)}return f}function s(c,u,f=0,m=c.length){const d=a(c,u,f,m-1);return d>f&&r(c[d-1],u)>-r(c[d],u)?d-1:d}return{left:a,center:s,right:i}}function Ufe(){return 0}function tU(e){return e===null?NaN:+e}function*Hfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Ffe=tC(Ws),Um=Ffe.right;tC(tU).center;class MD extends Map{constructor(t,n=Vfe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(RD(this,t))}has(t){return super.has(RD(this,t))}set(t,n){return super.set(qfe(this,t),n)}delete(t){return super.delete(Kfe(this,t))}}function RD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function qfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Kfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function Vfe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Yfe(e=Ws){if(e===Ws)return nU;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 nU(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Xfe=Math.sqrt(50),Gfe=Math.sqrt(10),Wfe=Math.sqrt(2);function py(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),s=i>=Xfe?10:i>=Gfe?5:i>=Wfe?2:1;let c,u,f;return a<0?(f=Math.pow(10,-a)/s,c=Math.round(e*f),u=Math.round(t*f),c/f<e&&++c,u/f>t&&--u,f=-f):(f=Math.pow(10,a)*s,c=Math.round(e/f),u=Math.round(t/f),c*f<e&&++c,u*f>t&&--u),u<c&&.5<=n&&n<2?py(e,t,n*2):[c,u,f]}function y_(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,s]=r?py(t,e,n):py(e,t,n);if(!(i>=a))return[];const c=i-a+1,u=new Array(c);if(r)if(s<0)for(let f=0;f<c;++f)u[f]=(i-f)/-s;else for(let f=0;f<c;++f)u[f]=(i-f)*s;else if(s<0)for(let f=0;f<c;++f)u[f]=(a+f)/-s;else for(let f=0;f<c;++f)u[f]=(a+f)*s;return u}function b_(e,t,n){return t=+t,e=+e,n=+n,py(e,t,n)[2]}function x_(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?b_(t,e,n):b_(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function kD(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function DD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function rU(e,t,n=0,r=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(a=a===void 0?nU:Yfe(a);r>n;){if(r-n>600){const u=r-n+1,f=t-n+1,m=Math.log(u),d=.5*Math.exp(2*m/3),p=.5*Math.sqrt(m*d*(u-d)/u)*(f-u/2<0?-1:1),b=Math.max(n,Math.floor(t-f*d/u+p)),w=Math.min(r,Math.floor(t+(u-f)*d/u+p));rU(e,t,b,w,a)}const i=e[t];let s=n,c=r;for(fh(e,n,t),a(e[r],i)>0&&fh(e,n,r);s<c;){for(fh(e,s,c),++s,--c;a(e[s],i)<0;)++s;for(;a(e[c],i)>0;)--c}a(e[n],i)===0?fh(e,n,c):(++c,fh(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function fh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Qfe(e,t,n){if(e=Float64Array.from(Hfe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return DD(e);if(t>=1)return kD(e);var r,a=(r-1)*t,i=Math.floor(a),s=kD(rU(e,i).subarray(0,i+1)),c=DD(e.subarray(i+1));return s+(c-s)*(a-i)}}function Zfe(e,t,n=tU){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,a=(r-1)*t,i=Math.floor(a),s=+n(e[i],i,e),c=+n(e[i+1],i+1,e);return s+(c-s)*(a-i)}}function Jfe(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function Pa(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Fo(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 w_=Symbol("implicit");function nC(){var e=new MD,t=[],n=[],r=w_;function a(i){let s=e.get(i);if(s===void 0){if(r!==w_)return r;e.set(i,s=t.push(i)-1)}return n[s%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new MD;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return nC(t,n).unknown(r)},Pa.apply(a,arguments),a}function rC(){var e=nC().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,s,c=!1,u=0,f=0,m=.5;delete e.unknown;function d(){var p=t().length,b=a<r,w=b?a:r,x=b?r:a;i=(x-w)/Math.max(1,p-u+f*2),c&&(i=Math.floor(i)),w+=(x-w-i*(p-u))*m,s=i*(1-u),c&&(w=Math.round(w),s=Math.round(s));var S=Jfe(p).map(function(E){return w+i*E});return n(b?S.reverse():S)}return e.domain=function(p){return arguments.length?(t(p),d()):t()},e.range=function(p){return arguments.length?([r,a]=p,r=+r,a=+a,d()):[r,a]},e.rangeRound=function(p){return[r,a]=p,r=+r,a=+a,c=!0,d()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(p){return arguments.length?(c=!!p,d()):c},e.padding=function(p){return arguments.length?(u=Math.min(1,f=+p),d()):u},e.paddingInner=function(p){return arguments.length?(u=Math.min(1,p),d()):u},e.paddingOuter=function(p){return arguments.length?(f=+p,d()):f},e.align=function(p){return arguments.length?(m=Math.max(0,Math.min(1,p)),d()):m},e.copy=function(){return rC(t(),[r,a]).round(c).paddingInner(u).paddingOuter(f).align(m)},Pa.apply(d(),arguments)}function aU(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return aU(t())},e}function ede(){return aU(rC.apply(null,arguments).paddingInner(1))}function aC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function iU(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Hm(){}var Xh=.7,vy=1/Xh,rf="\\s*([+-]?\\d+)\\s*",Gh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ai="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tde=/^#([0-9a-f]{3,8})$/,nde=new RegExp(`^rgb\\(${rf},${rf},${rf}\\)$`),rde=new RegExp(`^rgb\\(${Ai},${Ai},${Ai}\\)$`),ade=new RegExp(`^rgba\\(${rf},${rf},${rf},${Gh}\\)$`),ide=new RegExp(`^rgba\\(${Ai},${Ai},${Ai},${Gh}\\)$`),ode=new RegExp(`^hsl\\(${Gh},${Ai},${Ai}\\)$`),sde=new RegExp(`^hsla\\(${Gh},${Ai},${Ai},${Gh}\\)$`),ID={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};aC(Hm,Tc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:LD,formatHex:LD,formatHex8:lde,formatHsl:cde,formatRgb:zD,toString:zD});function LD(){return this.rgb().formatHex()}function lde(){return this.rgb().formatHex8()}function cde(){return oU(this).formatHsl()}function zD(){return this.rgb().formatRgb()}function Tc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=tde.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$D(t):n===3?new Dr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Fv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Fv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=nde.exec(e))?new Dr(t[1],t[2],t[3],1):(t=rde.exec(e))?new Dr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ade.exec(e))?Fv(t[1],t[2],t[3],t[4]):(t=ide.exec(e))?Fv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ode.exec(e))?HD(t[1],t[2]/100,t[3]/100,1):(t=sde.exec(e))?HD(t[1],t[2]/100,t[3]/100,t[4]):ID.hasOwnProperty(e)?$D(ID[e]):e==="transparent"?new Dr(NaN,NaN,NaN,0):null}function $D(e){return new Dr(e>>16&255,e>>8&255,e&255,1)}function Fv(e,t,n,r){return r<=0&&(e=t=n=NaN),new Dr(e,t,n,r)}function ude(e){return e instanceof Hm||(e=Tc(e)),e?(e=e.rgb(),new Dr(e.r,e.g,e.b,e.opacity)):new Dr}function S_(e,t,n,r){return arguments.length===1?ude(e):new Dr(e,t,n,r??1)}function Dr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}aC(Dr,S_,iU(Hm,{brighter(e){return e=e==null?vy:Math.pow(vy,e),new Dr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Xh:Math.pow(Xh,e),new Dr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Dr(dc(this.r),dc(this.g),dc(this.b),gy(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:BD,formatHex:BD,formatHex8:fde,formatRgb:UD,toString:UD}));function BD(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}`}function fde(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}${Ql((isNaN(this.opacity)?1:this.opacity)*255)}`}function UD(){const e=gy(this.opacity);return`${e===1?"rgb(":"rgba("}${dc(this.r)}, ${dc(this.g)}, ${dc(this.b)}${e===1?")":`, ${e})`}`}function gy(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function dc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ql(e){return e=dc(e),(e<16?"0":"")+e.toString(16)}function HD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new qa(e,t,n,r)}function oU(e){if(e instanceof qa)return new qa(e.h,e.s,e.l,e.opacity);if(e instanceof Hm||(e=Tc(e)),!e)return new qa;if(e instanceof qa)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,c=i-a,u=(i+a)/2;return c?(t===i?s=(n-r)/c+(n<r)*6:n===i?s=(r-t)/c+2:s=(t-n)/c+4,c/=u<.5?i+a:2-i-a,s*=60):c=u>0&&u<1?0:s,new qa(s,c,u,e.opacity)}function dde(e,t,n,r){return arguments.length===1?oU(e):new qa(e,t,n,r??1)}function qa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}aC(qa,dde,iU(Hm,{brighter(e){return e=e==null?vy:Math.pow(vy,e),new qa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Xh:Math.pow(Xh,e),new qa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Dr(SS(e>=240?e-240:e+120,a,r),SS(e,a,r),SS(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new qa(FD(this.h),qv(this.s),qv(this.l),gy(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=gy(this.opacity);return`${e===1?"hsl(":"hsla("}${FD(this.h)}, ${qv(this.s)*100}%, ${qv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FD(e){return e=(e||0)%360,e<0?e+360:e}function qv(e){return Math.max(0,Math.min(1,e||0))}function SS(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 iC=e=>()=>e;function hde(e,t){return function(n){return e+n*t}}function mde(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 pde(e){return(e=+e)==1?sU:function(t,n){return n-t?mde(t,n,e):iC(isNaN(t)?n:t)}}function sU(e,t){var n=t-e;return n?hde(e,n):iC(isNaN(e)?t:e)}const yy=(function e(t){var n=pde(t);function r(a,i){var s=n((a=S_(a)).r,(i=S_(i)).r),c=n(a.g,i.g),u=n(a.b,i.b),f=sU(a.opacity,i.opacity);return function(m){return a.r=s(m),a.g=c(m),a.b=u(m),a.opacity=f(m),a+""}}return r.gamma=e,r})(1);function vde(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function gde(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function yde(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)a[s]=jo(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(c){for(s=0;s<r;++s)i[s]=a[s](c);return i}}function bde(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ua(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function xde(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=jo(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var E_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ES=new RegExp(E_.source,"g");function wde(e){return function(){return e}}function Sde(e){return function(t){return e(t)+""}}function lU(e,t){var n=E_.lastIndex=ES.lastIndex=0,r,a,i,s=-1,c=[],u=[];for(e=e+"",t=t+"";(r=E_.exec(e))&&(a=ES.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),c[s]?c[s]+=i:c[++s]=i),(r=r[0])===(a=a[0])?c[s]?c[s]+=a:c[++s]=a:(c[++s]=null,u.push({i:s,x:Ua(r,a)})),n=ES.lastIndex;return n<t.length&&(i=t.slice(n),c[s]?c[s]+=i:c[++s]=i),c.length<2?u[0]?Sde(u[0].x):wde(t):(t=u.length,function(f){for(var m=0,d;m<t;++m)c[(d=u[m]).i]=d.x(f);return c.join("")})}function jo(e,t){var n=typeof t,r;return t==null||n==="boolean"?iC(t):(n==="number"?Ua:n==="string"?(r=Tc(t))?(t=r,yy):lU:t instanceof Tc?yy:t instanceof Date?bde:gde(t)?vde:Array.isArray(t)?yde:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?xde:Ua)(e,t)}function oC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var qD=180/Math.PI,__={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cU(e,t,n,r,a,i){var s,c,u;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,u/=c),e*r<t*n&&(e=-e,t=-t,u=-u,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*qD,skewX:Math.atan(u)*qD,scaleX:s,scaleY:c}}var Kv;function Ede(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?__:cU(t.a,t.b,t.c,t.d,t.e,t.f)}function _de(e){return e==null||(Kv||(Kv=document.createElementNS("http://www.w3.org/2000/svg","g")),Kv.setAttribute("transform",e),!(e=Kv.transform.baseVal.consolidate()))?__:(e=e.matrix,cU(e.a,e.b,e.c,e.d,e.e,e.f))}function uU(e,t,n,r){function a(f){return f.length?f.pop()+" ":""}function i(f,m,d,p,b,w){if(f!==d||m!==p){var x=b.push("translate(",null,t,null,n);w.push({i:x-4,x:Ua(f,d)},{i:x-2,x:Ua(m,p)})}else(d||p)&&b.push("translate("+d+t+p+n)}function s(f,m,d,p){f!==m?(f-m>180?m+=360:m-f>180&&(f+=360),p.push({i:d.push(a(d)+"rotate(",null,r)-2,x:Ua(f,m)})):m&&d.push(a(d)+"rotate("+m+r)}function c(f,m,d,p){f!==m?p.push({i:d.push(a(d)+"skewX(",null,r)-2,x:Ua(f,m)}):m&&d.push(a(d)+"skewX("+m+r)}function u(f,m,d,p,b,w){if(f!==d||m!==p){var x=b.push(a(b)+"scale(",null,",",null,")");w.push({i:x-4,x:Ua(f,d)},{i:x-2,x:Ua(m,p)})}else(d!==1||p!==1)&&b.push(a(b)+"scale("+d+","+p+")")}return function(f,m){var d=[],p=[];return f=e(f),m=e(m),i(f.translateX,f.translateY,m.translateX,m.translateY,d,p),s(f.rotate,m.rotate,d,p),c(f.skewX,m.skewX,d,p),u(f.scaleX,f.scaleY,m.scaleX,m.scaleY,d,p),f=m=null,function(b){for(var w=-1,x=p.length,S;++w<x;)d[(S=p[w]).i]=S.x(b);return d.join("")}}}var jde=uU(Ede,"px, ","px)","deg)"),Ode=uU(_de,", ",")",")"),Cde=1e-12;function KD(e){return((e=Math.exp(e))+1/e)/2}function Ade(e){return((e=Math.exp(e))-1/e)/2}function Nde(e){return((e=Math.exp(2*e))-1)/(e+1)}const vg=(function e(t,n,r){function a(i,s){var c=i[0],u=i[1],f=i[2],m=s[0],d=s[1],p=s[2],b=m-c,w=d-u,x=b*b+w*w,S,E;if(x<Cde)E=Math.log(p/f)/t,S=function(P){return[c+P*b,u+P*w,f*Math.exp(t*P*E)]};else{var C=Math.sqrt(x),O=(p*p-f*f+r*x)/(2*f*n*C),A=(p*p-f*f-r*x)/(2*p*n*C),T=Math.log(Math.sqrt(O*O+1)-O),N=Math.log(Math.sqrt(A*A+1)-A);E=(N-T)/t,S=function(P){var k=P*E,D=KD(T),K=f/(n*C)*(D*Nde(t*k+T)-Ade(T));return[c+K*b,u+K*w,f*D/KD(t*k+T)]}}return S.duration=E*1e3*t/Math.SQRT2,S}return a.rho=function(i){var s=Math.max(.001,+i),c=s*s,u=c*c;return e(s,c,u)},a})(Math.SQRT2,2,4);function Tde(e,t){t===void 0&&(t=e,e=jo);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(s){var c=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return i[c](s-c)}}function Pde(e){return function(){return e}}function by(e){return+e}var VD=[0,1];function yr(e){return e}function j_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Pde(isNaN(t)?NaN:.5)}function Mde(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Rde(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=j_(a,r),i=n(s,i)):(r=j_(r,a),i=n(i,s)),function(c){return i(r(c))}}function kde(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)a[s]=j_(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(c){var u=Um(e,c,1,r)-1;return i[u](a[u](c))}}function Fm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function X0(){var e=VD,t=VD,n=jo,r,a,i,s=yr,c,u,f;function m(){var p=Math.min(e.length,t.length);return s!==yr&&(s=Mde(e[0],e[p-1])),c=p>2?kde:Rde,u=f=null,d}function d(p){return p==null||isNaN(p=+p)?i:(u||(u=c(e.map(r),t,n)))(r(s(p)))}return d.invert=function(p){return s(a((f||(f=c(t,e.map(r),Ua)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,by),m()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),m()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=oC,m()},d.clamp=function(p){return arguments.length?(s=p?!0:yr,m()):s!==yr},d.interpolate=function(p){return arguments.length?(n=p,m()):n},d.unknown=function(p){return arguments.length?(i=p,d):i},function(p,b){return r=p,a=b,m()}}function sC(){return X0()(yr,yr)}function Dde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function xy(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 Nf(e){return e=xy(Math.abs(e)),e?e[1]:NaN}function Ide(e,t){return function(n,r){for(var a=n.length,i=[],s=0,c=e[0],u=0;a>0&&c>0&&(u+c+1>r&&(c=Math.max(1,r-u)),i.push(n.substring(a-=c,a+c)),!((u+=c+1)>r));)c=e[s=(s+1)%e.length];return i.reverse().join(t)}}function Lde(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var zde=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wh(e){if(!(t=zde.exec(e)))throw new Error("invalid format: "+e);var t;return new lC({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]})}Wh.prototype=lC.prototype;function lC(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+""}lC.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 $de(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var wy;function Bde(e,t){var n=xy(e,t);if(!n)return wy=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(wy=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=r.length;return i===s?r:i>s?r+new Array(i-s+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+xy(e,Math.max(0,t+i-1))[0]}function YD(e,t){var n=xy(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const XD={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Dde,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)=>YD(e*100,t),r:YD,s:Bde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function GD(e){return e}var WD=Array.prototype.map,QD=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ude(e){var t=e.grouping===void 0||e.thousands===void 0?GD:Ide(WD.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?GD:Lde(WD.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function f(d,p){d=Wh(d);var b=d.fill,w=d.align,x=d.sign,S=d.symbol,E=d.zero,C=d.width,O=d.comma,A=d.precision,T=d.trim,N=d.type;N==="n"?(O=!0,N="g"):XD[N]||(A===void 0&&(A=12),T=!0,N="g"),(E||b==="0"&&w==="=")&&(E=!0,b="0",w="=");var P=(p&&p.prefix!==void 0?p.prefix:"")+(S==="$"?n:S==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():""),k=(S==="$"?r:/[%p]/.test(N)?s:"")+(p&&p.suffix!==void 0?p.suffix:""),D=XD[N],K=/[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 B(I){var W=P,z=k,V,R,H;if(N==="c")z=D(I)+z,I="";else{I=+I;var q=I<0||1/I<0;if(I=isNaN(I)?u:D(Math.abs(I),A),T&&(I=$de(I)),q&&+I==0&&x!=="+"&&(q=!1),W=(q?x==="("?x:c:x==="-"||x==="("?"":x)+W,z=(N==="s"&&!isNaN(I)&&wy!==void 0?QD[8+wy/3]:"")+z+(q&&x==="("?")":""),K){for(V=-1,R=I.length;++V<R;)if(H=I.charCodeAt(V),48>H||H>57){z=(H===46?a+I.slice(V+1):I.slice(V))+z,I=I.slice(0,V);break}}}O&&!E&&(I=t(I,1/0));var F=W.length+I.length+z.length,Y=F<C?new Array(C-F+1).join(b):"";switch(O&&E&&(I=t(Y+I,Y.length?C-z.length:1/0),Y=""),w){case"<":I=W+I+z+Y;break;case"=":I=W+Y+I+z;break;case"^":I=Y.slice(0,F=Y.length>>1)+W+I+z+Y.slice(F);break;default:I=Y+W+I+z;break}return i(I)}return B.toString=function(){return d+""},B}function m(d,p){var b=Math.max(-8,Math.min(8,Math.floor(Nf(p)/3)))*3,w=Math.pow(10,-b),x=f((d=Wh(d),d.type="f",d),{suffix:QD[8+b/3]});return function(S){return x(w*S)}}return{format:f,formatPrefix:m}}var Vv,cC,fU;Hde({thousands:",",grouping:[3],currency:["$",""]});function Hde(e){return Vv=Ude(e),cC=Vv.format,fU=Vv.formatPrefix,Vv}function Fde(e){return Math.max(0,-Nf(Math.abs(e)))}function qde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Nf(t)/3)))*3-Nf(Math.abs(e)))}function Kde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Nf(t)-Nf(e))+1}function dU(e,t,n,r){var a=x_(e,t,n),i;switch(r=Wh(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=qde(a,s))&&(r.precision=i),fU(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Kde(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Fde(a))&&(r.precision=i-(r.type==="%")*2);break}}return cC(r)}function ml(e){var t=e.domain;return e.ticks=function(n){var r=t();return y_(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return dU(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,s=r[a],c=r[i],u,f,m=10;for(c<s&&(f=s,s=c,c=f,f=a,a=i,i=f);m-- >0;){if(f=b_(s,c,n),f===u)return r[a]=s,r[i]=c,t(r);if(f>0)s=Math.floor(s/f)*f,c=Math.ceil(c/f)*f;else if(f<0)s=Math.ceil(s*f)/f,c=Math.floor(c*f)/f;else break;u=f}return e},e}function hU(){var e=sC();return e.copy=function(){return Fm(e,hU())},Pa.apply(e,arguments),ml(e)}function mU(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,by),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return mU(e).unknown(t)},e=arguments.length?Array.from(e,by):[0,1],ml(n)}function pU(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],s;return i<a&&(s=n,n=r,r=s,s=a,a=i,i=s),e[n]=t.floor(a),e[r]=t.ceil(i),e}function ZD(e){return Math.log(e)}function JD(e){return Math.exp(e)}function Vde(e){return-Math.log(-e)}function Yde(e){return-Math.exp(-e)}function Xde(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Gde(e){return e===10?Xde:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Wde(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 eI(e){return(t,n)=>-e(-t,n)}function uC(e){const t=e(ZD,JD),n=t.domain;let r=10,a,i;function s(){return a=Wde(r),i=Gde(r),n()[0]<0?(a=eI(a),i=eI(i),e(Vde,Yde)):e(ZD,JD),t}return t.base=function(c){return arguments.length?(r=+c,s()):r},t.domain=function(c){return arguments.length?(n(c),s()):n()},t.ticks=c=>{const u=n();let f=u[0],m=u[u.length-1];const d=m<f;d&&([f,m]=[m,f]);let p=a(f),b=a(m),w,x;const S=c==null?10:+c;let E=[];if(!(r%1)&&b-p<S){if(p=Math.floor(p),b=Math.ceil(b),f>0){for(;p<=b;++p)for(w=1;w<r;++w)if(x=p<0?w/i(-p):w*i(p),!(x<f)){if(x>m)break;E.push(x)}}else for(;p<=b;++p)for(w=r-1;w>=1;--w)if(x=p>0?w/i(-p):w*i(p),!(x<f)){if(x>m)break;E.push(x)}E.length*2<S&&(E=y_(f,m,S))}else E=y_(p,b,Math.min(b-p,S)).map(i);return d?E.reverse():E},t.tickFormat=(c,u)=>{if(c==null&&(c=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Wh(u)).precision==null&&(u.trim=!0),u=cC(u)),c===1/0)return u;const f=Math.max(1,r*c/t.ticks().length);return m=>{let d=m/i(Math.round(a(m)));return d*r<r-.5&&(d*=r),d<=f?u(m):""}},t.nice=()=>n(pU(n(),{floor:c=>i(Math.floor(a(c))),ceil:c=>i(Math.ceil(a(c)))})),t}function vU(){const e=uC(X0()).domain([1,10]);return e.copy=()=>Fm(e,vU()).base(e.base()),Pa.apply(e,arguments),e}function tI(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function nI(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function fC(e){var t=1,n=e(tI(t),nI(t));return n.constant=function(r){return arguments.length?e(tI(t=+r),nI(t)):t},ml(n)}function gU(){var e=fC(X0());return e.copy=function(){return Fm(e,gU()).constant(e.constant())},Pa.apply(e,arguments)}function rI(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Qde(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Zde(e){return e<0?-e*e:e*e}function dC(e){var t=e(yr,yr),n=1;function r(){return n===1?e(yr,yr):n===.5?e(Qde,Zde):e(rI(n),rI(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},ml(t)}function hC(){var e=dC(X0());return e.copy=function(){return Fm(e,hC()).exponent(e.exponent())},Pa.apply(e,arguments),e}function Jde(){return hC.apply(null,arguments).exponent(.5)}function aI(e){return Math.sign(e)*e*e}function ehe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function yU(){var e=sC(),t=[0,1],n=!1,r;function a(i){var s=ehe(e(i));return isNaN(s)?r:n?Math.round(s):s}return a.invert=function(i){return e.invert(aI(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,by)).map(aI)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return yU(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Pa.apply(a,arguments),ml(a)}function bU(){var e=[],t=[],n=[],r;function a(){var s=0,c=Math.max(1,t.length);for(n=new Array(c-1);++s<c;)n[s-1]=Zfe(e,s/c);return i}function i(s){return s==null||isNaN(s=+s)?r:t[Um(n,s)]}return i.invertExtent=function(s){var c=t.indexOf(s);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let c of s)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Ws),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(r=s,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return bU().domain(e).range(t).unknown(r)},Pa.apply(i,arguments)}function xU(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(u){return u!=null&&u<=u?a[Um(r,u,0,n)]:i}function c(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return s}return s.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,c()):[e,t]},s.range=function(u){return arguments.length?(n=(a=Array.from(u)).length-1,c()):a.slice()},s.invertExtent=function(u){var f=a.indexOf(u);return f<0?[NaN,NaN]:f<1?[e,r[0]]:f>=n?[r[n-1],t]:[r[f-1],r[f]]},s.unknown=function(u){return arguments.length&&(i=u),s},s.thresholds=function(){return r.slice()},s.copy=function(){return xU().domain([e,t]).range(a).unknown(i)},Pa.apply(ml(s),arguments)}function wU(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Um(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return wU().domain(e).range(t).unknown(n)},Pa.apply(a,arguments)}const _S=new Date,jS=new Date;function Nn(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),c=a.ceil(i);return i-s<c-i?s:c},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,c)=>{const u=[];if(i=a.ceil(i),c=c==null?1:Math.floor(c),!(i<s)||!(c>0))return u;let f;do u.push(f=new Date(+i)),t(i,c),e(i);while(f<i&&i<s);return u},a.filter=i=>Nn(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,c)=>{if(s>=s)if(c<0)for(;++c<=0;)for(;t(s,-1),!i(s););else for(;--c>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(_S.setTime(+i),jS.setTime(+s),e(_S),e(jS),Math.floor(n(_S,jS))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Sy=Nn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Sy.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Nn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Sy);Sy.range;const go=1e3,Oa=go*60,yo=Oa*60,Ro=yo*24,mC=Ro*7,iI=Ro*30,OS=Ro*365,Zl=Nn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*go)},(e,t)=>(t-e)/go,e=>e.getUTCSeconds());Zl.range;const pC=Nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*go)},(e,t)=>{e.setTime(+e+t*Oa)},(e,t)=>(t-e)/Oa,e=>e.getMinutes());pC.range;const vC=Nn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Oa)},(e,t)=>(t-e)/Oa,e=>e.getUTCMinutes());vC.range;const gC=Nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*go-e.getMinutes()*Oa)},(e,t)=>{e.setTime(+e+t*yo)},(e,t)=>(t-e)/yo,e=>e.getHours());gC.range;const yC=Nn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*yo)},(e,t)=>(t-e)/yo,e=>e.getUTCHours());yC.range;const qm=Nn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Oa)/Ro,e=>e.getDate()-1);qm.range;const G0=Nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ro,e=>e.getUTCDate()-1);G0.range;const SU=Nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ro,e=>Math.floor(e/Ro));SU.range;function Yc(e){return Nn(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())*Oa)/mC)}const W0=Yc(0),Ey=Yc(1),the=Yc(2),nhe=Yc(3),Tf=Yc(4),rhe=Yc(5),ahe=Yc(6);W0.range;Ey.range;the.range;nhe.range;Tf.range;rhe.range;ahe.range;function Xc(e){return Nn(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)/mC)}const Q0=Xc(0),_y=Xc(1),ihe=Xc(2),ohe=Xc(3),Pf=Xc(4),she=Xc(5),lhe=Xc(6);Q0.range;_y.range;ihe.range;ohe.range;Pf.range;she.range;lhe.range;const bC=Nn(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());bC.range;const xC=Nn(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());xC.range;const ko=Nn(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:Nn(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 Do=Nn(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());Do.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Nn(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)});Do.range;function EU(e,t,n,r,a,i){const s=[[Zl,1,go],[Zl,5,5*go],[Zl,15,15*go],[Zl,30,30*go],[i,1,Oa],[i,5,5*Oa],[i,15,15*Oa],[i,30,30*Oa],[a,1,yo],[a,3,3*yo],[a,6,6*yo],[a,12,12*yo],[r,1,Ro],[r,2,2*Ro],[n,1,mC],[t,1,iI],[t,3,3*iI],[e,1,OS]];function c(f,m,d){const p=m<f;p&&([f,m]=[m,f]);const b=d&&typeof d.range=="function"?d:u(f,m,d),w=b?b.range(f,+m+1):[];return p?w.reverse():w}function u(f,m,d){const p=Math.abs(m-f)/d,b=tC(([,,S])=>S).right(s,p);if(b===s.length)return e.every(x_(f/OS,m/OS,d));if(b===0)return Sy.every(Math.max(x_(f,m,d),1));const[w,x]=s[p/s[b-1][2]<s[b][2]/p?b-1:b];return w.every(x)}return[c,u]}const[che,uhe]=EU(Do,xC,Q0,SU,yC,vC),[fhe,dhe]=EU(ko,bC,W0,qm,gC,pC);function CS(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 AS(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 dh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function hhe(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,s=e.shortDays,c=e.months,u=e.shortMonths,f=hh(a),m=mh(a),d=hh(i),p=mh(i),b=hh(s),w=mh(s),x=hh(c),S=mh(c),E=hh(u),C=mh(u),O={a:H,A:q,b:F,B:Y,c:null,d:fI,e:fI,f:Ihe,g:Vhe,G:Xhe,H:Rhe,I:khe,j:Dhe,L:_U,m:Lhe,M:zhe,p:$,q:L,Q:mI,s:pI,S:$he,u:Bhe,U:Uhe,V:Hhe,w:Fhe,W:qhe,x:null,X:null,y:Khe,Y:Yhe,Z:Ghe,"%":hI},A={a:G,A:Z,b:J,B:se,c:null,d:dI,e:dI,f:Jhe,g:cme,G:fme,H:Whe,I:Qhe,j:Zhe,L:OU,m:eme,M:tme,p:ie,q:re,Q:mI,s:pI,S:nme,u:rme,U:ame,V:ime,w:ome,W:sme,x:null,X:null,y:lme,Y:ume,Z:dme,"%":hI},T={a:K,A:B,b:I,B:W,c:z,d:cI,e:cI,f:Nhe,g:lI,G:sI,H:uI,I:uI,j:jhe,L:Ahe,m:_he,M:Ohe,p:D,q:Ehe,Q:Phe,s:Mhe,S:Che,u:yhe,U:bhe,V:xhe,w:ghe,W:whe,x:V,X:R,y:lI,Y:sI,Z:She,"%":The};O.x=N(n,O),O.X=N(r,O),O.c=N(t,O),A.x=N(n,A),A.X=N(r,A),A.c=N(t,A);function N(ee,le){return function(me){var ne=[],ge=-1,be=0,Ie=ee.length,Pe,Ve,Xt;for(me instanceof Date||(me=new Date(+me));++ge<Ie;)ee.charCodeAt(ge)===37&&(ne.push(ee.slice(be,ge)),(Ve=oI[Pe=ee.charAt(++ge)])!=null?Pe=ee.charAt(++ge):Ve=Pe==="e"?" ":"0",(Xt=le[Pe])&&(Pe=Xt(me,Ve)),ne.push(Pe),be=ge+1);return ne.push(ee.slice(be,ge)),ne.join("")}}function P(ee,le){return function(me){var ne=dh(1900,void 0,1),ge=k(ne,ee,me+="",0),be,Ie;if(ge!=me.length)return null;if("Q"in ne)return new Date(ne.Q);if("s"in ne)return new Date(ne.s*1e3+("L"in ne?ne.L:0));if(le&&!("Z"in ne)&&(ne.Z=0),"p"in ne&&(ne.H=ne.H%12+ne.p*12),ne.m===void 0&&(ne.m="q"in ne?ne.q:0),"V"in ne){if(ne.V<1||ne.V>53)return null;"w"in ne||(ne.w=1),"Z"in ne?(be=AS(dh(ne.y,0,1)),Ie=be.getUTCDay(),be=Ie>4||Ie===0?_y.ceil(be):_y(be),be=G0.offset(be,(ne.V-1)*7),ne.y=be.getUTCFullYear(),ne.m=be.getUTCMonth(),ne.d=be.getUTCDate()+(ne.w+6)%7):(be=CS(dh(ne.y,0,1)),Ie=be.getDay(),be=Ie>4||Ie===0?Ey.ceil(be):Ey(be),be=qm.offset(be,(ne.V-1)*7),ne.y=be.getFullYear(),ne.m=be.getMonth(),ne.d=be.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),Ie="Z"in ne?AS(dh(ne.y,0,1)).getUTCDay():CS(dh(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(Ie+5)%7:ne.w+ne.U*7-(Ie+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,AS(ne)):CS(ne)}}function k(ee,le,me,ne){for(var ge=0,be=le.length,Ie=me.length,Pe,Ve;ge<be;){if(ne>=Ie)return-1;if(Pe=le.charCodeAt(ge++),Pe===37){if(Pe=le.charAt(ge++),Ve=T[Pe in oI?le.charAt(ge++):Pe],!Ve||(ne=Ve(ee,me,ne))<0)return-1}else if(Pe!=me.charCodeAt(ne++))return-1}return ne}function D(ee,le,me){var ne=f.exec(le.slice(me));return ne?(ee.p=m.get(ne[0].toLowerCase()),me+ne[0].length):-1}function K(ee,le,me){var ne=b.exec(le.slice(me));return ne?(ee.w=w.get(ne[0].toLowerCase()),me+ne[0].length):-1}function B(ee,le,me){var ne=d.exec(le.slice(me));return ne?(ee.w=p.get(ne[0].toLowerCase()),me+ne[0].length):-1}function I(ee,le,me){var ne=E.exec(le.slice(me));return ne?(ee.m=C.get(ne[0].toLowerCase()),me+ne[0].length):-1}function W(ee,le,me){var ne=x.exec(le.slice(me));return ne?(ee.m=S.get(ne[0].toLowerCase()),me+ne[0].length):-1}function z(ee,le,me){return k(ee,t,le,me)}function V(ee,le,me){return k(ee,n,le,me)}function R(ee,le,me){return k(ee,r,le,me)}function H(ee){return s[ee.getDay()]}function q(ee){return i[ee.getDay()]}function F(ee){return u[ee.getMonth()]}function Y(ee){return c[ee.getMonth()]}function $(ee){return a[+(ee.getHours()>=12)]}function L(ee){return 1+~~(ee.getMonth()/3)}function G(ee){return s[ee.getUTCDay()]}function Z(ee){return i[ee.getUTCDay()]}function J(ee){return u[ee.getUTCMonth()]}function se(ee){return c[ee.getUTCMonth()]}function ie(ee){return a[+(ee.getUTCHours()>=12)]}function re(ee){return 1+~~(ee.getUTCMonth()/3)}return{format:function(ee){var le=N(ee+="",O);return le.toString=function(){return ee},le},parse:function(ee){var le=P(ee+="",!1);return le.toString=function(){return ee},le},utcFormat:function(ee){var le=N(ee+="",A);return le.toString=function(){return ee},le},utcParse:function(ee){var le=P(ee+="",!0);return le.toString=function(){return ee},le}}}var oI={"-":"",_:" ",0:"0"},Hn=/^\s*\d+/,mhe=/^%/,phe=/[\\^$*+?|[\]().{}]/g;function ut(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function vhe(e){return e.replace(phe,"\\$&")}function hh(e){return new RegExp("^(?:"+e.map(vhe).join("|")+")","i")}function mh(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function ghe(e,t,n){var r=Hn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function yhe(e,t,n){var r=Hn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function bhe(e,t,n){var r=Hn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function xhe(e,t,n){var r=Hn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function whe(e,t,n){var r=Hn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function sI(e,t,n){var r=Hn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function lI(e,t,n){var r=Hn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function She(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 Ehe(e,t,n){var r=Hn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function _he(e,t,n){var r=Hn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function cI(e,t,n){var r=Hn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function jhe(e,t,n){var r=Hn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function uI(e,t,n){var r=Hn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Ohe(e,t,n){var r=Hn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Che(e,t,n){var r=Hn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ahe(e,t,n){var r=Hn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Nhe(e,t,n){var r=Hn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function The(e,t,n){var r=mhe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Phe(e,t,n){var r=Hn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Mhe(e,t,n){var r=Hn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function fI(e,t){return ut(e.getDate(),t,2)}function Rhe(e,t){return ut(e.getHours(),t,2)}function khe(e,t){return ut(e.getHours()%12||12,t,2)}function Dhe(e,t){return ut(1+qm.count(ko(e),e),t,3)}function _U(e,t){return ut(e.getMilliseconds(),t,3)}function Ihe(e,t){return _U(e,t)+"000"}function Lhe(e,t){return ut(e.getMonth()+1,t,2)}function zhe(e,t){return ut(e.getMinutes(),t,2)}function $he(e,t){return ut(e.getSeconds(),t,2)}function Bhe(e){var t=e.getDay();return t===0?7:t}function Uhe(e,t){return ut(W0.count(ko(e)-1,e),t,2)}function jU(e){var t=e.getDay();return t>=4||t===0?Tf(e):Tf.ceil(e)}function Hhe(e,t){return e=jU(e),ut(Tf.count(ko(e),e)+(ko(e).getDay()===4),t,2)}function Fhe(e){return e.getDay()}function qhe(e,t){return ut(Ey.count(ko(e)-1,e),t,2)}function Khe(e,t){return ut(e.getFullYear()%100,t,2)}function Vhe(e,t){return e=jU(e),ut(e.getFullYear()%100,t,2)}function Yhe(e,t){return ut(e.getFullYear()%1e4,t,4)}function Xhe(e,t){var n=e.getDay();return e=n>=4||n===0?Tf(e):Tf.ceil(e),ut(e.getFullYear()%1e4,t,4)}function Ghe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ut(t/60|0,"0",2)+ut(t%60,"0",2)}function dI(e,t){return ut(e.getUTCDate(),t,2)}function Whe(e,t){return ut(e.getUTCHours(),t,2)}function Qhe(e,t){return ut(e.getUTCHours()%12||12,t,2)}function Zhe(e,t){return ut(1+G0.count(Do(e),e),t,3)}function OU(e,t){return ut(e.getUTCMilliseconds(),t,3)}function Jhe(e,t){return OU(e,t)+"000"}function eme(e,t){return ut(e.getUTCMonth()+1,t,2)}function tme(e,t){return ut(e.getUTCMinutes(),t,2)}function nme(e,t){return ut(e.getUTCSeconds(),t,2)}function rme(e){var t=e.getUTCDay();return t===0?7:t}function ame(e,t){return ut(Q0.count(Do(e)-1,e),t,2)}function CU(e){var t=e.getUTCDay();return t>=4||t===0?Pf(e):Pf.ceil(e)}function ime(e,t){return e=CU(e),ut(Pf.count(Do(e),e)+(Do(e).getUTCDay()===4),t,2)}function ome(e){return e.getUTCDay()}function sme(e,t){return ut(_y.count(Do(e)-1,e),t,2)}function lme(e,t){return ut(e.getUTCFullYear()%100,t,2)}function cme(e,t){return e=CU(e),ut(e.getUTCFullYear()%100,t,2)}function ume(e,t){return ut(e.getUTCFullYear()%1e4,t,4)}function fme(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Pf(e):Pf.ceil(e),ut(e.getUTCFullYear()%1e4,t,4)}function dme(){return"+0000"}function hI(){return"%"}function mI(e){return+e}function pI(e){return Math.floor(+e/1e3)}var zu,AU,NU;hme({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 hme(e){return zu=hhe(e),AU=zu.format,zu.parse,NU=zu.utcFormat,zu.utcParse,zu}function mme(e){return new Date(e)}function pme(e){return e instanceof Date?+e:+new Date(+e)}function wC(e,t,n,r,a,i,s,c,u,f){var m=sC(),d=m.invert,p=m.domain,b=f(".%L"),w=f(":%S"),x=f("%I:%M"),S=f("%I %p"),E=f("%a %d"),C=f("%b %d"),O=f("%B"),A=f("%Y");function T(N){return(u(N)<N?b:c(N)<N?w:s(N)<N?x:i(N)<N?S:r(N)<N?a(N)<N?E:C:n(N)<N?O:A)(N)}return m.invert=function(N){return new Date(d(N))},m.domain=function(N){return arguments.length?p(Array.from(N,pme)):p().map(mme)},m.ticks=function(N){var P=p();return e(P[0],P[P.length-1],N??10)},m.tickFormat=function(N,P){return P==null?T:f(P)},m.nice=function(N){var P=p();return(!N||typeof N.range!="function")&&(N=t(P[0],P[P.length-1],N??10)),N?p(pU(P,N)):m},m.copy=function(){return Fm(m,wC(e,t,n,r,a,i,s,c,u,f))},m}function vme(){return Pa.apply(wC(fhe,dhe,ko,bC,W0,qm,gC,pC,Zl,AU).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function gme(){return Pa.apply(wC(che,uhe,Do,xC,Q0,G0,yC,vC,Zl,NU).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Z0(){var e=0,t=1,n,r,a,i,s=yr,c=!1,u;function f(d){return d==null||isNaN(d=+d)?u:s(a===0?.5:(d=(i(d)-n)*a,c?Math.max(0,Math.min(1,d)):d))}f.domain=function(d){return arguments.length?([e,t]=d,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),f):[e,t]},f.clamp=function(d){return arguments.length?(c=!!d,f):c},f.interpolator=function(d){return arguments.length?(s=d,f):s};function m(d){return function(p){var b,w;return arguments.length?([b,w]=p,s=d(b,w),f):[s(0),s(1)]}}return f.range=m(jo),f.rangeRound=m(oC),f.unknown=function(d){return arguments.length?(u=d,f):u},function(d){return i=d,n=d(e),r=d(t),a=n===r?0:1/(r-n),f}}function pl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function TU(){var e=ml(Z0()(yr));return e.copy=function(){return pl(e,TU())},Fo.apply(e,arguments)}function PU(){var e=uC(Z0()).domain([1,10]);return e.copy=function(){return pl(e,PU()).base(e.base())},Fo.apply(e,arguments)}function MU(){var e=fC(Z0());return e.copy=function(){return pl(e,MU()).constant(e.constant())},Fo.apply(e,arguments)}function SC(){var e=dC(Z0());return e.copy=function(){return pl(e,SC()).exponent(e.exponent())},Fo.apply(e,arguments)}function yme(){return SC.apply(null,arguments).exponent(.5)}function RU(){var e=[],t=yr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Um(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Ws),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>Qfe(e,i/r))},n.copy=function(){return RU(t).domain(e)},Fo.apply(n,arguments)}function J0(){var e=0,t=.5,n=1,r=1,a,i,s,c,u,f=yr,m,d=!1,p;function b(x){return isNaN(x=+x)?p:(x=.5+((x=+m(x))-i)*(r*x<r*i?c:u),f(d?Math.max(0,Math.min(1,x)):x))}b.domain=function(x){return arguments.length?([e,t,n]=x,a=m(e=+e),i=m(t=+t),s=m(n=+n),c=a===i?0:.5/(i-a),u=i===s?0:.5/(s-i),r=i<a?-1:1,b):[e,t,n]},b.clamp=function(x){return arguments.length?(d=!!x,b):d},b.interpolator=function(x){return arguments.length?(f=x,b):f};function w(x){return function(S){var E,C,O;return arguments.length?([E,C,O]=S,f=Tde(x,[E,C,O]),b):[f(0),f(.5),f(1)]}}return b.range=w(jo),b.rangeRound=w(oC),b.unknown=function(x){return arguments.length?(p=x,b):p},function(x){return m=x,a=x(e),i=x(t),s=x(n),c=a===i?0:.5/(i-a),u=i===s?0:.5/(s-i),r=i<a?-1:1,b}}function kU(){var e=ml(J0()(yr));return e.copy=function(){return pl(e,kU())},Fo.apply(e,arguments)}function DU(){var e=uC(J0()).domain([.1,1,10]);return e.copy=function(){return pl(e,DU()).base(e.base())},Fo.apply(e,arguments)}function IU(){var e=fC(J0());return e.copy=function(){return pl(e,IU()).constant(e.constant())},Fo.apply(e,arguments)}function EC(){var e=dC(J0());return e.copy=function(){return pl(e,EC()).exponent(e.exponent())},Fo.apply(e,arguments)}function bme(){return EC.apply(null,arguments).exponent(.5)}const jh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:rC,scaleDiverging:kU,scaleDivergingLog:DU,scaleDivergingPow:EC,scaleDivergingSqrt:bme,scaleDivergingSymlog:IU,scaleIdentity:mU,scaleImplicit:w_,scaleLinear:hU,scaleLog:vU,scaleOrdinal:nC,scalePoint:ede,scalePow:hC,scaleQuantile:bU,scaleQuantize:xU,scaleRadial:yU,scaleSequential:TU,scaleSequentialLog:PU,scaleSequentialPow:SC,scaleSequentialQuantile:RU,scaleSequentialSqrt:yme,scaleSequentialSymlog:MU,scaleSqrt:Jde,scaleSymlog:gU,scaleThreshold:wU,scaleTime:vme,scaleUtc:gme,tickFormat:dU},Symbol.toStringTag,{value:"Module"}));function xme(e){if(e in jh)return jh[e]();var t="scale".concat(Nm(e));if(t in jh)return jh[t]()}function vI(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=xme(e);if(r!=null)return r.domain(t).range(n),r}}function _C(e,t,n,r){if(!(n==null||r==null))return typeof e.scale=="function"?vI(e.scale,n,r):vI(t,n,r)}function wme(e){return"scale".concat(Nm(e))}function Sme(e){return wme(e)in jh}var LU=(e,t,n)=>{if(e!=null){var{scale:r,type:a}=e;if(r==="auto")return a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":a==="category"?"band":"linear";if(typeof r=="string")return Sme(r)?r:"point"}};function Eme(e,t){for(var n=0,r=e.length,a=e[0]<e[e.length-1];n<r;){var i=Math.floor((n+r)/2);(a?e[i]<t:e[i]>t)?n=i+1:r=i}return n}function zU(e,t){if(e){var n=t??e.domain(),r=n.map(i=>{var s;return(s=e(i))!==null&&s!==void 0?s:0}),a=e.range();if(!(n.length===0||a.length<2))return i=>{var s,c,u=Eme(r,i);if(u<=0)return n[0];if(u>=n.length)return n[n.length-1];var f=(s=r[u-1])!==null&&s!==void 0?s:0,m=(c=r[u])!==null&&c!==void 0?c:0;return Math.abs(i-f)<=Math.abs(i-m)?n[u-1]:n[u]}}}function _me(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):zU(e,void 0)}function gI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function jy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gI(Object(n),!0).forEach(function(r){jme(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jme(e,t,n){return(t=Ome(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ome(e){var t=Cme(e,"string");return typeof t=="symbol"?t:t+""}function Cme(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O_=[0,"auto"],_n={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},$U=(e,t)=>e.cartesianAxis.xAxis[t],qo=(e,t)=>{var n=$U(e,t);return n??_n},jn={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:O_,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:Rm},BU=(e,t)=>e.cartesianAxis.yAxis[t],Ko=(e,t)=>{var n=BU(e,t);return n??jn},Ame={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},jC=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??Ame},nn=(e,t,n)=>{switch(t){case"xAxis":return qo(e,n);case"yAxis":return Ko(e,n);case"zAxis":return jC(e,n);case"angleAxis":return WO(e,n);case"radiusAxis":return QO(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Nme=(e,t,n)=>{switch(t){case"xAxis":return qo(e,n);case"yAxis":return Ko(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},rd=(e,t,n)=>{switch(t){case"xAxis":return qo(e,n);case"yAxis":return Ko(e,n);case"angleAxis":return WO(e,n);case"radiusAxis":return QO(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},UU=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function OC(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var eb=e=>e.graphicalItems.cartesianItems,Tme=oe([Yt,Bm],OC),CC=(e,t,n)=>e.filter(n).filter(r=>(t==null?void 0:t.includeHidden)===!0?!0:!r.hide),Km=oe([eb,nn,Tme],CC,{memoizeOptions:{resultEqualityCheck:Y0}}),HU=oe([Km],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(K0)),FU=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),Pme=oe([Km],FU),AC=e=>e.map(t=>t.data).filter(Boolean).flat(1),Mme=oe([Km],AC,{memoizeOptions:{resultEqualityCheck:Y0}}),NC=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:a}=t;return e.length>0?e:n.slice(r,a+1)},TC=oe([Mme,FO],NC),PC=(e,t,n)=>(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:St(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(a=>({value:St(a,r)}))):e.map(r=>({value:r})),Vm=oe([TC,nn,Km],PC);function af(e){if(Ti(e)||e instanceof Date){var t=Number(e);if(it(t))return t}}function yI(e){if(Array.isArray(e)){var t=[af(e[0]),af(e[1])];return Ci(t)?t:void 0}var n=af(e);if(n!=null)return[n,n]}function Io(e){return e.map(af).filter(kr)}function Rme(e,t){var n=af(e),r=af(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var kme=oe([Vm],e=>e==null?void 0:e.map(t=>t.value).sort(Rme));function qU(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Dme(e,t,n){return!n||typeof t!="number"||Ni(t)?[]:n.length?Io(n.flatMap(r=>{var a=St(e,r.dataKey),i,s;if(Array.isArray(a)?[i,s]=a:i=s=a,!(!it(i)||!it(s)))return[t-i,t+s]})):[]}var Tn=e=>{var t=Un(e),n=nd(e);return rd(e,t,n)},Ym=oe([Tn],e=>e==null?void 0:e.dataKey),Ime=oe([HU,FO,Tn],J6),KU=(e,t,n,r)=>{var a={},i=t.reduce((s,c)=>{if(c.stackId==null)return s;var u=s[c.stackId];return u==null&&(u=[]),u.push(c),s[c.stackId]=u,s},a);return Object.fromEntries(Object.entries(i).map(s=>{var[c,u]=s,f=r?[...u].reverse():u,m=f.map(JO);return[c,{stackedData:Ele(e,m,n),graphicalItems:f}]}))},C_=oe([Ime,HU,$m,V6],KU),VU=(e,t,n,r)=>{var{dataStartIndex:a,dataEndIndex:i}=t;if(r==null&&n!=="zAxis"){var s=Ale(e,a,i);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},Lme=oe([nn],e=>e.allowDataOverflow),MC=e=>{var t;if(e==null||!("domain"in e))return O_;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var n=Io(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:O_},RC=oe([nn],MC),kC=oe([RC,Lme],R6),zme=oe([C_,Ho,Yt,kC],VU,{memoizeOptions:{resultEqualityCheck:V0}}),tb=e=>e.errorBars,$me=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>qU(n,r)),Oy=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.filter(Boolean);if(a.length!==0){var i=a.flat(),s=Math.min(...i),c=Math.max(...i);return[s,c]}},DC=(e,t,n,r,a)=>{var i,s;if(n.length>0&&e.forEach(c=>{n.forEach(u=>{var f,m,d=(f=r[u.id])===null||f===void 0?void 0:f.filter(E=>qU(a,E)),p=St(c,(m=t.dataKey)!==null&&m!==void 0?m:u.dataKey),b=Dme(c,p,d);if(b.length>=2){var w=Math.min(...b),x=Math.max(...b);(i==null||w<i)&&(i=w),(s==null||x>s)&&(s=x)}var S=yI(p);S!=null&&(i=i==null?S[0]:Math.min(i,S[0]),s=s==null?S[1]:Math.max(s,S[1]))})}),(t==null?void 0:t.dataKey)!=null&&e.forEach(c=>{var u=yI(St(c,t.dataKey));u!=null&&(i=i==null?u[0]:Math.min(i,u[0]),s=s==null?u[1]:Math.max(s,u[1]))}),it(i)&&it(s))return[i,s]},Bme=oe([TC,nn,Pme,tb,Yt],DC,{memoizeOptions:{resultEqualityCheck:V0}});function Ume(e){var{value:t}=e;if(Ti(t)||t instanceof Date)return t}var Hme=(e,t,n)=>{var r=e.map(Ume).filter(a=>a!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&n8(r))?M6(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},YU=e=>e.referenceElements.dots,ad=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),Fme=oe([YU,Yt,Bm],ad),XU=e=>e.referenceElements.areas,qme=oe([XU,Yt,Bm],ad),GU=e=>e.referenceElements.lines,Kme=oe([GU,Yt,Bm],ad),WU=(e,t)=>{if(e!=null){var n=Io(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Vme=oe(Fme,Yt,WU),QU=(e,t)=>{if(e!=null){var n=Io(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Yme=oe([qme,Yt],QU);function Xme(e){var t;if(e.x!=null)return Io([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:Io(n)}function Gme(e){var t;if(e.y!=null)return Io([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:Io(n)}var ZU=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?Xme(r):Gme(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Wme=oe([Kme,Yt],ZU),Qme=oe(Vme,Wme,Yme,(e,t,n)=>Oy(e,n,t)),IC=(e,t,n,r,a,i,s,c)=>{if(n!=null)return n;var u=s==="vertical"&&c==="xAxis"||s==="horizontal"&&c==="yAxis",f=u?Oy(r,i,a):Oy(i,a);return Ofe(t,f,e.allowDataOverflow)},Zme=oe([nn,RC,kC,zme,Bme,Qme,ft,Yt],IC,{memoizeOptions:{resultEqualityCheck:V0}}),Jme=[0,1],LC=(e,t,n,r,a,i,s)=>{if(!((e==null||n==null||n.length===0)&&s===void 0)){var{dataKey:c,type:u}=e,f=$o(t,i);if(f&&c==null){var m;return M6(0,(m=n==null?void 0:n.length)!==null&&m!==void 0?m:0)}return u==="category"?Hme(r,e,f):a==="expand"?Jme:s}},zC=oe([nn,ft,TC,Vm,$m,Yt,Zme],LC),vl=oe([nn,UU,YO],LU),$C=(e,t,n)=>{var{niceTicks:r}=t;if(r!=="none"){var a=MC(t),i=Array.isArray(a)&&(a[0]==="auto"||a[1]==="auto");if((r==="snap125"||r==="adaptive")&&t!=null&&t.tickCount&&Ci(e)){if(i)return CD(e,t.tickCount,t.allowDecimals,r);if(t.type==="number")return AD(e,t.tickCount,t.allowDecimals,r)}if(r==="auto"&&n==="linear"&&t!=null&&t.tickCount){if(i&&Ci(e))return CD(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Ci(e))return AD(e,t.tickCount,t.allowDecimals,"adaptive")}}},BC=oe([zC,rd,vl],$C),UC=(e,t,n,r)=>{if(r!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&Ci(t)&&Array.isArray(n)&&n.length>0){var a,i,s=t[0],c=(a=n[0])!==null&&a!==void 0?a:0,u=t[1],f=(i=n[n.length-1])!==null&&i!==void 0?i:0;return[Math.min(s,c),Math.max(u,f)]}return t},epe=oe([nn,zC,BC,Yt],UC),tpe=oe(Vm,nn,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Io(e.map(d=>d.value))).sort((d,p)=>d-p),a=r[0],i=r[r.length-1];if(a==null||i==null)return 1/0;var s=i-a;if(s===0)return 1/0;for(var c=0;c<r.length-1;c++){var u=r[c],f=r[c+1];if(!(u==null||f==null)){var m=f-u;n=Math.min(n,m)}}return n/s}}),JU=oe(tpe,ft,K6,An,(e,t,n,r,a)=>a,(e,t,n,r,a)=>{if(!it(e))return 0;var i=t==="vertical"?r.height:r.width;if(a==="gap")return e*i/2;if(a==="no-gap"){var s=cr(n,e*i),c=e*i/2;return c-s-(c-s)/i*s}return 0}),npe=(e,t,n)=>{var r=qo(e,t);return r==null||typeof r.padding!="string"?0:JU(e,"xAxis",t,n,r.padding)},rpe=(e,t,n)=>{var r=Ko(e,t);return r==null||typeof r.padding!="string"?0:JU(e,"yAxis",t,n,r.padding)},ape=oe(qo,npe,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:a}=e;return typeof a=="string"?{left:t,right:t}:{left:((n=a.left)!==null&&n!==void 0?n:0)+t,right:((r=a.right)!==null&&r!==void 0?r:0)+t}}),ipe=oe(Ko,rpe,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:a}=e;return typeof a=="string"?{top:t,bottom:t}:{top:((n=a.top)!==null&&n!==void 0?n:0)+t,bottom:((r=a.bottom)!==null&&r!==void 0?r:0)+t}}),ope=oe([An,ape,I0,D0,(e,t,n)=>n],(e,t,n,r,a)=>{var{padding:i}=r;return a?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),spe=oe([An,ft,ipe,I0,D0,(e,t,n)=>n],(e,t,n,r,a,i)=>{var{padding:s}=a;return i?[r.height-s.bottom,s.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Xm=(e,t,n,r)=>{var a;switch(t){case"xAxis":return ope(e,n,r);case"yAxis":return spe(e,n,r);case"zAxis":return(a=jC(e,n))===null||a===void 0?void 0:a.range;case"angleAxis":return W6(e);case"radiusAxis":return Q6(e,n);default:return}},eH=oe([nn,Xm],H0),lpe=oe([vl,epe],eU),HC=oe([nn,vl,lpe,eH],_C),tH=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:a,scale:i}=n,s=$o(e,r);if(s&&(a==="number"||i!=="auto"))return t.map(c=>c.value)}},FC=oe([ft,Vm,rd,Yt],tH),nb=oe([HC],eC);oe([HC],_me);oe([HC,kme],zU);oe([Km,tb,Yt],$me);function nH(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var rb=(e,t)=>t,ab=(e,t,n)=>n,cpe=oe(R0,rb,ab,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(nH)),upe=oe(k0,rb,ab,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(nH)),rH=(e,t)=>({width:e.width,height:t.height}),fpe=(e,t)=>{var n=typeof t.width=="number"?t.width:Rm;return{width:n,height:e.height}},aH=oe(An,qo,rH),dpe=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},hpe=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},mpe=oe(Uo,An,cpe,rb,ab,(e,t,n,r,a)=>{var i={},s;return n.forEach(c=>{var u=rH(t,c);s==null&&(s=dpe(t,r,e));var f=r==="top"&&!a||r==="bottom"&&a;i[c.id]=s-Number(f)*u.height,s+=(f?-1:1)*u.height}),i}),ppe=oe(Bo,An,upe,rb,ab,(e,t,n,r,a)=>{var i={},s;return n.forEach(c=>{var u=fpe(t,c);s==null&&(s=hpe(t,r,e));var f=r==="left"&&!a||r==="right"&&a;i[c.id]=s-Number(f)*u.width,s+=(f?-1:1)*u.width}),i}),vpe=(e,t)=>{var n=qo(e,t);if(n!=null)return mpe(e,n.orientation,n.mirror)},gpe=oe([An,qo,vpe,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:e.left,y:0}:{x:e.left,y:a}}}),ype=(e,t)=>{var n=Ko(e,t);if(n!=null)return ppe(e,n.orientation,n.mirror)},bpe=oe([An,Ko,ype,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var a=n==null?void 0:n[r];return a==null?{x:0,y:e.top}:{x:a,y:e.top}}}),iH=oe(An,Ko,(e,t)=>{var n=typeof t.width=="number"?t.width:Rm;return{width:n,height:e.height}}),bI=(e,t,n)=>{switch(t){case"xAxis":return aH(e,n).width;case"yAxis":return iH(e,n).height;default:return}},oH=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:a,type:i,dataKey:s}=n,c=$o(e,r),u=t.map(f=>f.value);if(s&&c&&i==="category"&&a&&n8(u))return u}},qC=oe([ft,Vm,nn,Yt],oH),xI=oe([ft,Nme,vl,nb,qC,FC,Xm,BC,Yt],(e,t,n,r,a,i,s,c,u)=>{if(t!=null){var f=$o(e,u);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:u,categoricalDomain:i,duplicateDomain:a,isCategorical:f,niceTicks:c,range:s,realScaleType:n,scale:r}}}),xpe=(e,t,n,r,a,i,s,c,u)=>{if(!(t==null||r==null)){var f=$o(e,u),{type:m,ticks:d,tickCount:p}=t,b=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,w=m==="category"&&r.bandwidth?r.bandwidth()/b:0;w=u==="angleAxis"&&i!=null&&i.length>=2?Ln(i[0]-i[1])*2*w:w;var x=d||a;return x?x.map((S,E)=>{var C=s?s.indexOf(S):S,O=r.map(C);return it(O)?{index:E,coordinate:O+w,value:S,offset:w}:null}).filter(kr):f&&c?c.map((S,E)=>{var C=r.map(S);return it(C)?{coordinate:C+w,value:S,index:E,offset:w}:null}).filter(kr):r.ticks?r.ticks(p).map((S,E)=>{var C=r.map(S);return it(C)?{coordinate:C+w,value:S,index:E,offset:w}:null}).filter(kr):r.domain().map((S,E)=>{var C=r.map(S);return it(C)?{coordinate:C+w,value:s?s[S]:S,index:E,offset:w}:null}).filter(kr)}},sH=oe([ft,rd,vl,nb,BC,Xm,qC,FC,Yt],xpe),wpe=(e,t,n,r,a,i,s)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var c=$o(e,s),{tickCount:u}=t,f=0;return f=s==="angleAxis"&&(r==null?void 0:r.length)>=2?Ln(r[0]-r[1])*2*f:f,c&&i?i.map((m,d)=>{var p=n.map(m);return it(p)?{coordinate:p+f,value:m,index:d,offset:f}:null}).filter(kr):n.ticks?n.ticks(u).map((m,d)=>{var p=n.map(m);return it(p)?{coordinate:p+f,value:m,index:d,offset:f}:null}).filter(kr):n.domain().map((m,d)=>{var p=n.map(m);return it(p)?{coordinate:p+f,value:a?a[m]:m,index:d,offset:f}:null}).filter(kr)}},al=oe([ft,rd,nb,Xm,qC,FC,Yt],wpe),il=oe(nn,nb,(e,t)=>{if(!(e==null||t==null))return jy(jy({},e),{},{scale:t})}),Spe=oe([nn,vl,zC,eH],_C),Epe=oe([Spe],eC);oe((e,t,n)=>jC(e,n),Epe,(e,t)=>{if(!(e==null||t==null))return jy(jy({},e),{},{scale:t})});var _pe=oe([ft,R0,k0],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),jpe=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};oe([jpe],e=>{if(!(!e||e.length===0))return t=>{var n,r=1/0,a=e[0];for(var i of e){var s=Math.abs(i.coordinate-t);s<r&&(r=s,a=i)}return(n=a)===null||n===void 0?void 0:n.value}});var lH=e=>e.options.defaultTooltipEventType,cH=e=>e.options.validateTooltipEventTypes;function uH(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function KC(e,t){var n=lH(e),r=cH(e);return uH(t,n,r)}function Ope(e){return Ae(t=>KC(t,e))}var fH=(e,t)=>{var n,r=Number(t);if(!(Ni(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},Cpe=e=>e.tooltip.settings,Is={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},Ape={itemInteraction:{click:Is,hover:Is},axisInteraction:{click:Is,hover:Is},keyboardInteraction:Is,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},dH=fr({name:"tooltip",initialState:Ape,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Dt()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,a=ja(e).tooltipItemPayloads.indexOf(n);a>-1&&(e.tooltipItemPayloads[a]=r)},prepare:Dt()},removeTooltipEntrySettings:{reducer(e,t){var n=ja(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Dt()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:Npe,replaceTooltipEntrySettings:Tpe,removeTooltipEntrySettings:Ppe,setTooltipSettingsState:Mpe,setActiveMouseOverItemIndex:hH,mouseLeaveItem:Rpe,mouseLeaveChart:mH,setActiveClickItemIndex:kpe,setMouseOverAxisIndex:pH,setMouseClickAxisIndex:Dpe,setSyncInteraction:A_,setKeyboardInteraction:Cy}=dH.actions,Ipe=dH.reducer;function wI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Yv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wI(Object(n),!0).forEach(function(r){Lpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lpe(e,t,n){return(t=zpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zpe(e){var t=$pe(e,"string");return typeof t=="symbol"?t:t+""}function $pe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bpe(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function Upe(e){return e.index!=null}var vH=(e,t,n,r)=>{if(t==null)return Is;var a=Bpe(e,t,n);if(a==null)return Is;if(a.active)return a;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var i=e.settings.active===!0;if(Upe(a)){if(i)return Yv(Yv({},a),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Yv(Yv({},Is),{},{coordinate:a.coordinate})};function Hpe(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function Fpe(e,t){var n=Hpe(e),r=t[0],a=t[1];if(n===void 0)return!1;var i=Math.min(r,a),s=Math.max(r,a);return n>=i&&n<=s}function qpe(e,t,n){if(n==null||t==null)return!0;var r=St(e,t);return r==null||!Ci(n)?!0:Fpe(r,n)}var VC=(e,t,n,r)=>{var a=e==null?void 0:e.index;if(a==null)return null;var i=Number(a);if(!it(i))return a;var s=0,c=1/0;t.length>0&&(c=t.length-1);var u=Math.max(s,Math.min(i,c)),f=t[u];return f==null||qpe(f,n,r)?String(u):null},gH=(e,t,n,r,a,i,s)=>{if(i!=null){var c=s[0],u=c==null?void 0:c.getPosition(i);if(u!=null)return u;var f=a==null?void 0:a[Number(i)];if(f)switch(n){case"horizontal":return{x:f.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:f.coordinate}}}},yH=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var a;if(n==="hover"?a=e.itemInteraction.hover.graphicalItemId:a=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&a==null)return e.tooltipItemPayloads;if(a==null&&r!=null){var i=e.tooltipItemPayloads[0];return i!=null?[i]:[]}return e.tooltipItemPayloads.filter(s=>{var c;return((c=s.settings)===null||c===void 0?void 0:c.graphicalItemId)===a})},bH=e=>e.options.tooltipPayloadSearcher,id=e=>e.tooltip;function SI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function EI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SI(Object(n),!0).forEach(function(r){Kpe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kpe(e,t,n){return(t=Vpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vpe(e){var t=Ype(e,"string");return typeof t=="symbol"?t:t+""}function Ype(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xpe(e){if(typeof e=="string"||typeof e=="number")return e}function Gpe(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Wpe(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function _I(e){if(typeof e=="string")return e}function Qpe(e){if(!(e==null||typeof e!="object")){var t="name"in e?Xpe(e.name):void 0,n="unit"in e?Gpe(e.unit):void 0,r="dataKey"in e?Wpe(e.dataKey):void 0,a="payload"in e?e.payload:void 0,i="color"in e?_I(e.color):void 0,s="fill"in e?_I(e.fill):void 0;return{name:t,unit:n,dataKey:r,payload:a,color:i,fill:s}}}function Zpe(e,t){return e??t}var xH=(e,t,n,r,a,i,s)=>{if(!(t==null||i==null)){var{chartData:c,computedData:u,dataStartIndex:f,dataEndIndex:m}=n,d=[];return e.reduce((p,b)=>{var w,{dataDefinedOnItem:x,settings:S}=b,E=Zpe(x,c),C=Array.isArray(E)?Z8(E,f,m):E,O=(w=S==null?void 0:S.dataKey)!==null&&w!==void 0?w:r,A=S==null?void 0:S.nameKey,T;if(r&&Array.isArray(C)&&!Array.isArray(C[0])&&s==="axis"?T=r8(C,r,a):T=i(C,t,u,A),Array.isArray(T))T.forEach(P=>{var k,D,K=Qpe(P),B=K==null?void 0:K.name,I=K==null?void 0:K.dataKey,W=K==null?void 0:K.payload,z=EI(EI({},S),{},{name:B,unit:K==null?void 0:K.unit,color:(k=K==null?void 0:K.color)!==null&&k!==void 0?k:S==null?void 0:S.color,fill:(D=K==null?void 0:K.fill)!==null&&D!==void 0?D:S==null?void 0:S.fill});p.push(pk({tooltipEntrySettings:z,dataKey:I,payload:W,value:St(W,I),name:B==null?void 0:String(B)}))});else{var N;p.push(pk({tooltipEntrySettings:S,dataKey:O,payload:T,value:St(T,O),name:(N=St(T,A))!==null&&N!==void 0?N:S==null?void 0:S.name}))}return p},d)}},YC=oe([Tn,UU,YO],LU),Jpe=oe([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),eve=oe([Un,nd],OC),od=oe([Jpe,Tn,eve],CC,{memoizeOptions:{resultEqualityCheck:Y0}}),tve=oe([od],e=>e.filter(K0)),nve=oe([od],AC,{memoizeOptions:{resultEqualityCheck:Y0}}),sd=oe([nve,Ho],NC),rve=oe([tve,Ho,Tn],J6),XC=oe([sd,Tn,od],PC),wH=oe([Tn],MC),ave=oe([Tn],e=>e.allowDataOverflow),SH=oe([wH,ave],R6),ive=oe([od],e=>e.filter(K0)),ove=oe([rve,ive,$m,V6],KU),sve=oe([ove,Ho,Un,SH],VU),lve=oe([od],FU),cve=oe([sd,Tn,lve,tb,Un],DC,{memoizeOptions:{resultEqualityCheck:V0}}),uve=oe([YU,Un,nd],ad),fve=oe([uve,Un],WU),dve=oe([XU,Un,nd],ad),hve=oe([dve,Un],QU),mve=oe([GU,Un,nd],ad),pve=oe([mve,Un],ZU),vve=oe([fve,pve,hve],Oy),gve=oe([Tn,wH,SH,sve,cve,vve,ft,Un],IC),Gm=oe([Tn,ft,sd,XC,$m,Un,gve],LC),yve=oe([Gm,Tn,YC],$C),bve=oe([Tn,Gm,yve,Un],UC),EH=e=>{var t=Un(e),n=nd(e),r=!1;return Xm(e,t,n,r)},_H=oe([Tn,EH],H0),xve=oe([Tn,YC,bve,_H],_C),jH=oe([xve],eC),wve=oe([ft,XC,Tn,Un],oH),Sve=oe([ft,XC,Tn,Un],tH),Eve=(e,t,n,r,a,i,s,c)=>{if(t){var{type:u}=t,f=$o(e,c);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=u==="category"&&r.bandwidth?r.bandwidth()/m:0;return d=c==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?Ln(a[0]-a[1])*2*d:d,f&&s?s.map((p,b)=>{var w=r.map(p);return it(w)?{coordinate:w+d,value:p,index:b,offset:d}:null}).filter(kr):r.domain().map((p,b)=>{var w=r.map(p);return it(w)?{coordinate:w+d,value:i?i[p]:p,index:b,offset:d}:null}).filter(kr)}}},Vo=oe([ft,Tn,YC,jH,EH,wve,Sve,Un],Eve),GC=oe([lH,cH,Cpe],(e,t,n)=>uH(n.shared,e,t)),OH=e=>e.tooltip.settings.trigger,WC=e=>e.tooltip.settings.defaultIndex,Wm=oe([id,GC,OH,WC],vH),ol=oe([Wm,sd,Ym,Gm],VC),CH=oe([Vo,ol],fH),QC=oe([Wm],e=>{if(e)return e.dataKey}),AH=oe([Wm],e=>{if(e)return e.graphicalItemId}),NH=oe([id,GC,OH,WC],yH),_ve=oe([Bo,Uo,ft,An,Vo,WC,NH],gH),jve=oe([Wm,_ve],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),Ove=oe([Wm],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),Cve=oe([NH,ol,Ho,Ym,CH,bH,GC],xH),Ave=oe([Cve],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function jI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function OI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jI(Object(n),!0).forEach(function(r){Nve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nve(e,t,n){return(t=Tve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tve(e){var t=Pve(e,"string");return typeof t=="symbol"?t:t+""}function Pve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mve=()=>Ae(Tn),Rve=()=>{var e=Mve(),t=Ae(Vo),n=Ae(jH);return Of(!e||!n?void 0:OI(OI({},e),{},{scale:n}),t)};function CI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CI(Object(n),!0).forEach(function(r){kve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kve(e,t,n){return(t=Dve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dve(e){var t=Ive(e,"string");return typeof t=="symbol"?t:t+""}function Ive(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lve=(e,t,n,r)=>{var a=t.find(i=>i&&i.index===n);if(a){if(e==="horizontal")return{x:a.coordinate,y:r.relativeY};if(e==="vertical")return{x:r.relativeX,y:a.coordinate}}return{x:0,y:0}},zve=(e,t,n,r)=>{var a=t.find(f=>f&&f.index===n);if(a){if(e==="centric"){var i=a.coordinate,{radius:s}=r;return $u($u($u({},r),pn(r.cx,r.cy,s,i)),{},{angle:i,radius:s})}var c=a.coordinate,{angle:u}=r;return $u($u($u({},r),pn(r.cx,r.cy,c,u)),{},{angle:u,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function $ve(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var TH=(e,t,n,r,a)=>{var i,s=(i=t==null?void 0:t.length)!==null&&i!==void 0?i:0;if(s<=1||e==null)return 0;if(r==="angleAxis"&&a!=null&&Math.abs(Math.abs(a[1]-a[0])-360)<=1e-6)for(var c=0;c<s;c++){var u,f,m,d,p,b=c>0?(u=n[c-1])===null||u===void 0?void 0:u.coordinate:(f=n[s-1])===null||f===void 0?void 0:f.coordinate,w=(m=n[c])===null||m===void 0?void 0:m.coordinate,x=c>=s-1?(d=n[0])===null||d===void 0?void 0:d.coordinate:(p=n[c+1])===null||p===void 0?void 0:p.coordinate,S=void 0;if(!(b==null||w==null||x==null))if(Ln(w-b)!==Ln(x-w)){var E=[];if(Ln(x-w)===Ln(a[1]-a[0])){S=x;var C=w+a[1]-a[0];E[0]=Math.min(C,(C+b)/2),E[1]=Math.max(C,(C+b)/2)}else{S=b;var O=x+a[1]-a[0];E[0]=Math.min(w,(O+w)/2),E[1]=Math.max(w,(O+w)/2)}var A=[Math.min(w,(S+w)/2),Math.max(w,(S+w)/2)];if(e>A[0]&&e<=A[1]||e>=E[0]&&e<=E[1]){var T;return(T=n[c])===null||T===void 0?void 0:T.index}}else{var N=Math.min(b,x),P=Math.max(b,x);if(e>(N+w)/2&&e<=(P+w)/2){var k;return(k=n[c])===null||k===void 0?void 0:k.index}}}else if(t)for(var D=0;D<s;D++){var K=t[D];if(K!=null){var B=t[D+1],I=t[D-1];if(D===0&&B!=null&&e<=(K.coordinate+B.coordinate)/2||D===s-1&&I!=null&&e>(K.coordinate+I.coordinate)/2||D>0&&D<s-1&&I!=null&&B!=null&&e>(K.coordinate+I.coordinate)/2&&e<=(K.coordinate+B.coordinate)/2)return K.index}}return-1},Bve=()=>Ae(YO),ZC=(e,t)=>t,PH=(e,t,n)=>n,JC=(e,t,n,r)=>r,Uve=oe(Vo,e=>E0(e,t=>t.coordinate)),eA=oe([id,ZC,PH,JC],vH),tA=oe([eA,sd,Ym,Gm],VC),Hve=(e,t,n)=>{if(t!=null){var r=id(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},MH=oe([id,ZC,PH,JC],yH),Ay=oe([Bo,Uo,ft,An,Vo,JC,MH],gH),Fve=oe([eA,Ay],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),RH=oe([Vo,tA],fH),qve=oe([MH,tA,Ho,Ym,RH,bH,ZC],xH),Kve=oe([eA,tA],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),Vve=(e,t,n,r,a,i,s)=>{if(!(!e||!n||!r||!a)&&$ve(e,s)){var c=Nle(e,t),u=TH(c,i,a,n,r),f=Lve(t,a,u,e);return{activeIndex:String(u),activeCoordinate:f}}},Yve=(e,t,n,r,a,i,s)=>{if(!(!e||!r||!a||!i||!n)){var c=pfe(e,n);if(c){var u=Tle(c,t),f=TH(u,s,i,r,a),m=zve(t,i,f,c);return{activeIndex:String(f),activeCoordinate:m}}}},Xve=(e,t,n,r,a,i,s,c)=>{if(!(!e||!t||!r||!a||!i))return t==="horizontal"||t==="vertical"?Vve(e,t,r,a,i,s,c):Yve(e,t,n,r,a,i,s)},Gve=oe(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),Wve=oe(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(vn)),n=Array.from(new Set(t));return n.sort((r,a)=>r-a)},{memoizeOptions:{resultEqualityCheck:$fe}});function AI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function NI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AI(Object(n),!0).forEach(function(r){Qve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Qve(e,t,n){return(t=Zve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zve(e){var t=Jve(e,"string");return typeof t=="symbol"?t:t+""}function Jve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ege={},tge={zIndexMap:Object.values(vn).reduce((e,t)=>NI(NI({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),ege)},nge=new Set(Object.values(vn));function rge(e){return nge.has(e)}var kH=fr({name:"zIndex",initialState:tge,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:Dt()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!rge(n)&&delete e.zIndexMap[n])},prepare:Dt()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:a}=t.payload;e.zIndexMap[n]?a?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:a?void 0:r,panoramaElement:a?r:void 0}},prepare:Dt()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:Dt()}}}),{registerZIndexPortal:age,unregisterZIndexPortal:ige,registerZIndexPortalElement:oge,unregisterZIndexPortalElement:sge}=kH.actions,lge=kH.reducer;function Lr(e){var{zIndex:t,children:n}=e,r=sce(),a=r&&t!==void 0&&t!==0,i=dr(),s=_t();y.useLayoutEffect(()=>a?(s(age({zIndex:t})),()=>{s(ige({zIndex:t}))}):hl,[s,t,a]);var c=Ae(u=>Gve(u,t,i));return a?c?cl.createPortal(n,c):null:n}function N_(){return N_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N_.apply(null,arguments)}function TI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Xv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TI(Object(n),!0).forEach(function(r){cge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cge(e,t,n){return(t=uge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uge(e){var t=fge(e,"string");return typeof t=="symbol"?t:t+""}function fge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dge(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return y.isValidElement(t)?y.cloneElement(t,r):y.createElement(n,r)}function hge(e){var t,{coordinate:n,payload:r,index:a,offset:i,tooltipAxisBandSize:s,layout:c,cursor:u,tooltipEventType:f,chartName:m}=e,d=n,p=r,b=a;if(!u||!d||m!=="ScatterChart"&&f!=="axis")return null;var w,x,S;if(m==="ScatterChart")w=d,x=Tue,S=vn.cursorLine;else if(m==="BarChart")w=Pue(c,d,i,s),x=C6,S=vn.cursorRectangle;else if(c==="radial"&&i8(d)){var{cx:E,cy:C,radius:O,startAngle:A,endAngle:T}=N6(d);w={cx:E,cy:C,startAngle:A,endAngle:T,innerRadius:O,outerRadius:O},x=P6,S=vn.cursorLine}else w={points:bfe(c,d,i)},x=HO,S=vn.cursorLine;var N=typeof u=="object"&&"className"in u?u.className:void 0,P=Xv(Xv(Xv(Xv({stroke:"#ccc",pointerEvents:"none"},i),w),Sc(u)),{},{payload:p,payloadIndex:b,className:st("recharts-tooltip-cursor",N)});return y.createElement(Lr,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},y.createElement(dge,{cursor:u,cursorComp:x,cursorProps:P}))}function mge(e){var t=Rve(),n=s6(),r=Vc(),a=Bve();return t==null||n==null||r==null||a==null?null:y.createElement(hge,N_({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:a}))}var DH=y.createContext(null),pge=()=>y.useContext(DH),NS={exports:{}},PI;function vge(){return PI||(PI=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(u,f,m){this.fn=u,this.context=f,this.once=m||!1}function i(u,f,m,d,p){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new a(m,d||u,p),w=n?n+f:f;return u._events[w]?u._events[w].fn?u._events[w]=[u._events[w],b]:u._events[w].push(b):(u._events[w]=b,u._eventsCount++),u}function s(u,f){--u._eventsCount===0?u._events=new r:delete u._events[f]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var f=[],m,d;if(this._eventsCount===0)return f;for(d in m=this._events)t.call(m,d)&&f.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(m)):f},c.prototype.listeners=function(f){var m=n?n+f:f,d=this._events[m];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,b=d.length,w=new Array(b);p<b;p++)w[p]=d[p].fn;return w},c.prototype.listenerCount=function(f){var m=n?n+f:f,d=this._events[m];return d?d.fn?1:d.length:0},c.prototype.emit=function(f,m,d,p,b,w){var x=n?n+f:f;if(!this._events[x])return!1;var S=this._events[x],E=arguments.length,C,O;if(S.fn){switch(S.once&&this.removeListener(f,S.fn,void 0,!0),E){case 1:return S.fn.call(S.context),!0;case 2:return S.fn.call(S.context,m),!0;case 3:return S.fn.call(S.context,m,d),!0;case 4:return S.fn.call(S.context,m,d,p),!0;case 5:return S.fn.call(S.context,m,d,p,b),!0;case 6:return S.fn.call(S.context,m,d,p,b,w),!0}for(O=1,C=new Array(E-1);O<E;O++)C[O-1]=arguments[O];S.fn.apply(S.context,C)}else{var A=S.length,T;for(O=0;O<A;O++)switch(S[O].once&&this.removeListener(f,S[O].fn,void 0,!0),E){case 1:S[O].fn.call(S[O].context);break;case 2:S[O].fn.call(S[O].context,m);break;case 3:S[O].fn.call(S[O].context,m,d);break;case 4:S[O].fn.call(S[O].context,m,d,p);break;default:if(!C)for(T=1,C=new Array(E-1);T<E;T++)C[T-1]=arguments[T];S[O].fn.apply(S[O].context,C)}}return!0},c.prototype.on=function(f,m,d){return i(this,f,m,d,!1)},c.prototype.once=function(f,m,d){return i(this,f,m,d,!0)},c.prototype.removeListener=function(f,m,d,p){var b=n?n+f:f;if(!this._events[b])return this;if(!m)return s(this,b),this;var w=this._events[b];if(w.fn)w.fn===m&&(!p||w.once)&&(!d||w.context===d)&&s(this,b);else{for(var x=0,S=[],E=w.length;x<E;x++)(w[x].fn!==m||p&&!w[x].once||d&&w[x].context!==d)&&S.push(w[x]);S.length?this._events[b]=S.length===1?S[0]:S:s(this,b)}return this},c.prototype.removeAllListeners=function(f){var m;return f?(m=n?n+f:f,this._events[m]&&s(this,m)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(NS)),NS.exports}var gge=vge();const yge=Za(gge);var Qh=new yge,T_="recharts.syncEvent.tooltip",MI="recharts.syncEvent.brush",nA=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Ni(n))return e[n]}},bge={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},IH=fr({name:"options",initialState:bge,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),xge=IH.reducer,{createEventEmitter:wge}=IH.actions;function Sge(e){return e.tooltip.syncInteraction}var Ege={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},LH=fr({name:"chartData",initialState:Ege,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:RI,setDataStartEndIndexes:_ge,setComputedData:t2e}=LH.actions,jge=LH.reducer,Oge=["x","y"];function kI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kI(Object(n),!0).forEach(function(r){Cge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cge(e,t,n){return(t=Age(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Age(e){var t=Nge(e,"string");return typeof t=="symbol"?t:t+""}function Nge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tge(e,t){if(e==null)return{};var n,r,a=Pge(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Pge(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Mge(){var e=Ae(XO),t=Ae(GO),n=_t(),r=Ae(Y6),a=Ae(Vo),i=Vc(),s=L0(),c=Ae(u=>u.rootProps.className);y.useEffect(()=>{if(e==null)return hl;var u=(f,m,d)=>{if(t!==d&&e===f){if(r==="index"){var p;if(s&&m!==null&&m!==void 0&&(p=m.payload)!==null&&p!==void 0&&p.coordinate&&m.payload.sourceViewBox){var b=m.payload.coordinate,{x:w,y:x}=b,S=Tge(b,Oge),{x:E,y:C,width:O,height:A}=m.payload.sourceViewBox,T=Bu(Bu({},S),{},{x:s.x+(O?(w-E)/O:0)*s.width,y:s.y+(A?(x-C)/A:0)*s.height});n(Bu(Bu({},m),{},{payload:Bu(Bu({},m.payload),{},{coordinate:T})}))}else n(m);return}if(a!=null){var N;if(typeof r=="function"){var P={activeTooltipIndex:m.payload.index==null?void 0:Number(m.payload.index),isTooltipActive:m.payload.active,activeIndex:m.payload.index==null?void 0:Number(m.payload.index),activeLabel:m.payload.label,activeDataKey:m.payload.dataKey,activeCoordinate:m.payload.coordinate},k=r(a,P);N=a[k]}else r==="value"&&(N=a.find(R=>String(R.value)===m.payload.label));var{coordinate:D}=m.payload;if(N==null||m.payload.active===!1||D==null||s==null){n(A_({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}var{x:K,y:B}=D,I=Math.min(K,s.x+s.width),W=Math.min(B,s.y+s.height),z={x:i==="horizontal"?N.coordinate:I,y:i==="horizontal"?W:N.coordinate},V=A_({active:m.payload.active,coordinate:z,dataKey:m.payload.dataKey,index:String(N.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});n(V)}}};return Qh.on(T_,u),()=>{Qh.off(T_,u)}},[c,n,t,e,r,a,i,s])}function Rge(){var e=Ae(XO),t=Ae(GO),n=_t();y.useEffect(()=>{if(e==null)return hl;var r=(a,i,s)=>{t!==s&&e===a&&n(_ge(i))};return Qh.on(MI,r),()=>{Qh.off(MI,r)}},[n,t,e])}function kge(){var e=_t();y.useEffect(()=>{e(wge())},[e]),Mge(),Rge()}function Dge(e,t,n,r,a,i){var s=Ae(w=>Hve(w,e,t)),c=Ae(AH),u=Ae(GO),f=Ae(XO),m=Ae(Y6),d=Ae(Sge),p=d==null?void 0:d.active,b=L0();y.useEffect(()=>{if(!p&&f!=null&&u!=null){var w=A_({active:i,coordinate:n,dataKey:s,index:a,label:typeof r=="number"?String(r):r,sourceViewBox:b,graphicalItemId:c});Qh.emit(T_,f,w,u)}},[p,n,s,c,a,r,u,f,m,i,b])}function DI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function II(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DI(Object(n),!0).forEach(function(r){Ige(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ige(e,t,n){return(t=Lge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lge(e){var t=zge(e,"string");return typeof t=="symbol"?t:t+""}function zge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $ge(e){return e.dataKey}function Bge(e,t){return y.isValidElement(e)?y.cloneElement(e,t):typeof e=="function"?y.createElement(e,t):y.createElement(iue,t)}var LI=[],Uge={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function zH(e){var t,n,r=bn(e,Uge),{active:a,allowEscapeViewBox:i,animationDuration:s,animationEasing:c,content:u,filterNull:f,isAnimationActive:m,offset:d,payloadUniqBy:p,position:b,reverseDirection:w,useTranslate3d:x,wrapperStyle:S,cursor:E,shared:C,trigger:O,defaultIndex:A,portal:T,axisId:N}=r,P=_t(),k=typeof A=="number"?String(A):A;y.useEffect(()=>{P(Mpe({shared:C,trigger:O,axisId:N,active:a,defaultIndex:k}))},[P,C,O,N,a,k]);var D=L0(),K=S6(),B=Ope(C),{activeIndex:I,isActive:W}=(t=Ae(re=>Kve(re,B,O,k)))!==null&&t!==void 0?t:{},z=Ae(re=>qve(re,B,O,k)),V=Ae(re=>RH(re,B,O,k)),R=Ae(re=>Fve(re,B,O,k)),H=z,q=pge(),F=(n=a??W)!==null&&n!==void 0?n:!1,[Y,$]=S8([H,F]),L=B==="axis"?V:void 0;Dge(B,O,R,L,I,F);var G=T??q;if(G==null||D==null||B==null)return null;var Z=H??LI;F||(Z=LI),f&&Z.length&&(Z=v8(Z.filter(re=>re.value!=null&&(re.hide!==!0||r.includeHidden)),p,$ge));var J=Z.length>0,se=II(II({},r),{},{payload:Z,label:L,active:F,activeIndex:I,coordinate:R,accessibilityLayer:K}),ie=y.createElement(vue,{allowEscapeViewBox:i,animationDuration:s,animationEasing:c,isAnimationActive:m,active:F,coordinate:R,hasPayload:J,offset:d,position:b,reverseDirection:w,useTranslate3d:x,viewBox:D,wrapperStyle:S,lastBoundingBox:Y,innerRef:$,hasPortalFromProps:!!T},Bge(u,se));return y.createElement(y.Fragment,null,cl.createPortal(ie,G),F&&y.createElement(mge,{cursor:E,tooltipEventType:B,coordinate:R,payload:Z,index:I}))}var Qm=e=>null;Qm.displayName="Cell";function Hge(e,t,n){return(t=Fge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fge(e){var t=qge(e,"string");return typeof t=="symbol"?t:t+""}function qge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class Kge{constructor(t){Hge(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;r!=null&&this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function zI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Vge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zI(Object(n),!0).forEach(function(r){Yge(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yge(e,t,n){return(t=Xge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xge(e){var t=Gge(e,"string");return typeof t=="symbol"?t:t+""}function Gge(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Wge={cacheSize:2e3,enableCache:!0},$H=Vge({},Wge),$I=new Kge($H.cacheSize),Qge={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},BI="recharts_measurement_span";function Zge(e,t){var n=t.fontSize||"",r=t.fontFamily||"",a=t.fontWeight||"",i=t.fontStyle||"",s=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(a,"|").concat(i,"|").concat(s,"|").concat(c)}var UI=(e,t)=>{try{var n=document.getElementById(BI);n||(n=document.createElement("span"),n.setAttribute("id",BI),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,Qge,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Nh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Im.isSsr)return{width:0,height:0};if(!$H.enableCache)return UI(t,n);var r=Zge(t,n),a=$I.get(r);if(a)return a;var i=UI(t,n);return $I.set(r,i),i},BH;function Jge(e,t,n){return(t=eye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eye(e){var t=tye(e,"string");return typeof t=="symbol"?t:t+""}function tye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,FI=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,nye=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,rye=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,aye={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},iye=["cm","mm","pt","pc","in","Q","px"];function oye(e){return iye.includes(e)}var Qu="NaN";function sye(e,t){return e*aye[t]}class Wn{static parse(t){var n,[,r,a]=(n=rye.exec(t))!==null&&n!==void 0?n:[];return r==null?Wn.NaN:new Wn(parseFloat(r),a??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Ni(t)&&(this.unit=""),n!==""&&!nye.test(n)&&(this.num=NaN,this.unit=""),oye(n)&&(this.num=sye(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Wn(NaN,""):new Wn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Wn(NaN,""):new Wn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Wn(NaN,""):new Wn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Wn(NaN,""):new Wn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Ni(this.num)}}BH=Wn;Jge(Wn,"NaN",new BH(NaN,""));function UH(e){if(e==null||e.includes(Qu))return Qu;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,a,i]=(n=HI.exec(t))!==null&&n!==void 0?n:[],s=Wn.parse(r??""),c=Wn.parse(i??""),u=a==="*"?s.multiply(c):s.divide(c);if(u.isNaN())return Qu;t=t.replace(HI,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,[,m,d,p]=(f=FI.exec(t))!==null&&f!==void 0?f:[],b=Wn.parse(m??""),w=Wn.parse(p??""),x=d==="+"?b.add(w):b.subtract(w);if(x.isNaN())return Qu;t=t.replace(FI,x.toString())}return t}var qI=/\(([^()]*)\)/;function lye(e){for(var t=e,n;(n=qI.exec(t))!=null;){var[,r]=n;t=t.replace(qI,UH(r))}return t}function cye(e){var t=e.replace(/\s+/g,"");return t=lye(t),t=UH(t),t}function uye(e){try{return cye(e)}catch{return Qu}}function TS(e){var t=uye(e.slice(5,-1));return t===Qu?"":t}var fye=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],dye=["dx","dy","angle","className","breakAll"];function P_(){return P_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P_.apply(null,arguments)}function KI(e,t){if(e==null)return{};var n,r,a=hye(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function hye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var HH=/[ \f\n\r\t\v\u2028\u2029]+/,FH=e=>{var{children:t,breakAll:n,style:r}=e;try{var a=[];Ht(t)||(n?a=t.toString().split(""):a=t.toString().split(HH));var i=a.map(c=>({word:c,width:Nh(c,r).width})),s=n?0:Nh(" ",r).width;return{wordsWithComputedWidth:i,spaceWidth:s}}catch{return null}};function qH(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function mye(e){return Ht(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var KH=(e,t,n,r)=>e.reduce((a,i)=>{var{word:s,width:c}=i,u=a[a.length-1];if(u&&c!=null&&(t==null||r||u.width+c+n<Number(t)))u.words.push(s),u.width+=c+n;else{var f={words:[s],width:c};a.push(f)}return a},[]),VH=e=>e.reduce((t,n)=>t.width>n.width?t:n),pye="…",VI=(e,t,n,r,a,i,s,c)=>{var u=e.slice(0,t),f=FH({breakAll:n,style:r,children:u+pye});if(!f)return[!1,[]];var m=KH(f.wordsWithComputedWidth,i,s,c),d=m.length>a||VH(m).width>Number(i);return[d,m]},vye=(e,t,n,r,a)=>{var{maxLines:i,children:s,style:c,breakAll:u}=e,f=_e(i),m=String(s),d=KH(t,r,n,a);if(!f||a)return d;var p=d.length>i||VH(d).width>Number(r);if(!p)return d;for(var b=0,w=m.length-1,x=0,S;b<=w&&x<=m.length-1;){var E=Math.floor((b+w)/2),C=E-1,[O,A]=VI(m,C,u,c,i,r,n,a),[T]=VI(m,E,u,c,i,r,n,a);if(!O&&!T&&(b=E+1),O&&T&&(w=E-1),!O&&T){S=A;break}x++}return S||d},YI=e=>{var t=Ht(e)?[]:e.toString().split(HH);return[{words:t,width:void 0}]},gye=e=>{var{width:t,scaleToFit:n,children:r,style:a,breakAll:i,maxLines:s}=e;if((t||n)&&!Im.isSsr){var c,u,f=FH({breakAll:i,children:r,style:a});if(f){var{wordsWithComputedWidth:m,spaceWidth:d}=f;c=m,u=d}else return YI(r);return vye({breakAll:i,children:r,maxLines:s,style:a},c,u,t,!!n)}return YI(r)},YH="#808080",yye={angle:0,breakAll:!1,capHeight:"0.71em",fill:YH,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},ib=y.forwardRef((e,t)=>{var n=bn(e,yye),{x:r,y:a,lineHeight:i,capHeight:s,fill:c,scaleToFit:u,textAnchor:f,verticalAnchor:m}=n,d=KI(n,fye),p=y.useMemo(()=>gye({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:u,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,u,d.style,d.width]),{dx:b,dy:w,angle:x,className:S,breakAll:E}=d,C=KI(d,dye);if(!Ti(r)||!Ti(a)||p.length===0)return null;var O=Number(r)+(_e(b)?b:0),A=Number(a)+(_e(w)?w:0);if(!it(O)||!it(A))return null;var T;switch(m){case"start":T=TS("calc(".concat(s,")"));break;case"middle":T=TS("calc(".concat((p.length-1)/2," * -").concat(i," + (").concat(s," / 2))"));break;default:T=TS("calc(".concat(p.length-1," * -").concat(i,")"));break}var N=[],P=p[0];if(u&&P!=null){var k=P.width,{width:D}=d;N.push("scale(".concat(_e(D)&&_e(k)?D/k:1,")"))}return x&&N.push("rotate(".concat(x,", ").concat(O,", ").concat(A,")")),N.length&&(C.transform=N.join(" ")),y.createElement("text",P_({},br(C),{ref:t,x:O,y:A,className:st("recharts-text",S),textAnchor:f,fill:c.includes("url")?YH:c}),p.map((K,B)=>{var I=K.words.join(E?"":" ");return y.createElement("tspan",{x:O,dy:B===0?T:i,key:"".concat(I,"-").concat(B)},I)}))});ib.displayName="Text";function XI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XI(Object(n),!0).forEach(function(r){bye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bye(e,t,n){return(t=xye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xye(e){var t=wye(e,"string");return typeof t=="symbol"?t:t+""}function wye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Sye=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:a}=e,{x:i,y:s,height:c,upperWidth:u,lowerWidth:f}=LO(t),m=i,d=i+(u-f)/2,p=(m+d)/2,b=(u+f)/2,w=m+u/2,x=c>=0?1:-1,S=x*r,E=x>0?"end":"start",C=x>0?"start":"end",O=u>=0?1:-1,A=O*r,T=O>0?"end":"start",N=O>0?"start":"end",P=a;if(n==="top"){var k={x:m+u/2,y:s-S,horizontalAnchor:"middle",verticalAnchor:E};return P&&(k.height=Math.max(s-P.y,0),k.width=u),k}if(n==="bottom"){var D={x:d+f/2,y:s+c+S,horizontalAnchor:"middle",verticalAnchor:C};return P&&(D.height=Math.max(P.y+P.height-(s+c),0),D.width=f),D}if(n==="left"){var K={x:p-A,y:s+c/2,horizontalAnchor:T,verticalAnchor:"middle"};return P&&(K.width=Math.max(K.x-P.x,0),K.height=c),K}if(n==="right"){var B={x:p+b+A,y:s+c/2,horizontalAnchor:N,verticalAnchor:"middle"};return P&&(B.width=Math.max(P.x+P.width-B.x,0),B.height=c),B}var I=P?{width:b,height:c}:{};return n==="insideLeft"?pi({x:p+A,y:s+c/2,horizontalAnchor:N,verticalAnchor:"middle"},I):n==="insideRight"?pi({x:p+b-A,y:s+c/2,horizontalAnchor:T,verticalAnchor:"middle"},I):n==="insideTop"?pi({x:m+u/2,y:s+S,horizontalAnchor:"middle",verticalAnchor:C},I):n==="insideBottom"?pi({x:d+f/2,y:s+c-S,horizontalAnchor:"middle",verticalAnchor:E},I):n==="insideTopLeft"?pi({x:m+A,y:s+S,horizontalAnchor:N,verticalAnchor:C},I):n==="insideTopRight"?pi({x:m+u-A,y:s+S,horizontalAnchor:T,verticalAnchor:C},I):n==="insideBottomLeft"?pi({x:d+A,y:s+c-S,horizontalAnchor:N,verticalAnchor:E},I):n==="insideBottomRight"?pi({x:d+f-A,y:s+c-S,horizontalAnchor:T,verticalAnchor:E},I):n&&typeof n=="object"&&(_e(n.x)||jc(n.x))&&(_e(n.y)||jc(n.y))?pi({x:i+cr(n.x,b),y:s+cr(n.y,c),horizontalAnchor:"end",verticalAnchor:"end"},I):pi({x:w,y:s+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},I)},Eye=["labelRef"],_ye=["content"];function GI(e,t){if(e==null)return{};var n,r,a=jye(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function jye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function WI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Oh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WI(Object(n),!0).forEach(function(r){Oye(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oye(e,t,n){return(t=Cye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cye(e){var t=Aye(e,"string");return typeof t=="symbol"?t:t+""}function Aye(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vo.apply(null,arguments)}var XH=y.createContext(null),Nye=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s,children:c}=e,u=y.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s}),[t,n,r,a,i,s]);return y.createElement(XH.Provider,{value:u},c)},GH=()=>{var e=y.useContext(XH),t=L0();return e||(t?LO(t):void 0)},Tye=y.createContext(null),Pye=()=>{var e=y.useContext(Tye),t=Ae(Z6);return e||t},Mye=e=>{var{value:t,formatter:n}=e,r=Ht(e.children)?t:e.children;return typeof n=="function"?n(r):r},rA=e=>e!=null&&typeof e=="function",Rye=(e,t)=>{var n=Ln(t-e),r=Math.min(Math.abs(t-e),360);return n*r},kye=(e,t,n,r,a)=>{var{offset:i,className:s}=e,{cx:c,cy:u,innerRadius:f,outerRadius:m,startAngle:d,endAngle:p,clockWise:b}=a,w=(f+m)/2,x=Rye(d,p),S=x>=0?1:-1,E,C;switch(t){case"insideStart":E=d+S*i,C=b;break;case"insideEnd":E=p-S*i,C=!b;break;case"end":E=p+S*i,C=b;break;default:throw new Error("Unsupported position ".concat(t))}C=x<=0?C:!C;var O=pn(c,u,w,E),A=pn(c,u,w,E+(C?1:-1)*359),T="M".concat(O.x,",").concat(O.y,`
    A`).concat(w,",").concat(w,",0,1,").concat(C?0:1,`,
    `).concat(A.x,",").concat(A.y),N=Ht(e.id)?$h("recharts-radial-line-"):e.id;return y.createElement("text",vo({},r,{dominantBaseline:"central",className:st("recharts-radial-bar-label",s)}),y.createElement("defs",null,y.createElement("path",{id:N,d:T})),y.createElement("textPath",{xlinkHref:"#".concat(N)},n))},Dye=(e,t,n)=>{var{cx:r,cy:a,innerRadius:i,outerRadius:s,startAngle:c,endAngle:u}=e,f=(c+u)/2;if(n==="outside"){var{x:m,y:d}=pn(r,a,s+t,f);return{x:m,y:d,textAnchor:m>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:a,textAnchor:"middle",verticalAnchor:"end"};var p=(i+s)/2,{x:b,y:w}=pn(r,a,p,f);return{x:b,y:w,textAnchor:"middle",verticalAnchor:"middle"}},gg=e=>e!=null&&"cx"in e&&_e(e.cx),Iye={angle:0,offset:5,zIndex:vn.label,position:"middle",textBreakAll:!1};function Lye(e){if(!gg(e))return e;var{cx:t,cy:n,outerRadius:r}=e,a=r*2;return{x:t-r,y:n-r,width:a,upperWidth:a,lowerWidth:a,height:a}}function ks(e){var t=bn(e,Iye),{viewBox:n,parentViewBox:r,position:a,value:i,children:s,content:c,className:u="",textBreakAll:f,labelRef:m}=t,d=Pye(),p=GH(),b=a==="center"?p:d??p,w,x,S;n==null?w=b:gg(n)?w=n:w=LO(n);var E=Lye(w);if(!w||Ht(i)&&Ht(s)&&!y.isValidElement(c)&&typeof c!="function")return null;var C=Oh(Oh({},t),{},{viewBox:w});if(y.isValidElement(c)){var{labelRef:O}=C,A=GI(C,Eye);return y.cloneElement(c,A)}if(typeof c=="function"){var{content:T}=C,N=GI(C,_ye);if(x=y.createElement(c,N),y.isValidElement(x))return x}else x=Mye(t);var P=br(t);if(gg(w)){if(a==="insideStart"||a==="insideEnd"||a==="end")return kye(t,a,x,P,w);S=Dye(w,t.offset,t.position)}else{if(!E)return null;var k=Sye({viewBox:E,position:a,offset:t.offset,parentViewBox:gg(r)?void 0:r});S=Oh(Oh({x:k.x,y:k.y,textAnchor:k.horizontalAnchor,verticalAnchor:k.verticalAnchor},k.width!==void 0?{width:k.width}:{}),k.height!==void 0?{height:k.height}:{})}return y.createElement(Lr,{zIndex:t.zIndex},y.createElement(ib,vo({ref:m,className:st("recharts-label",u)},P,S,{textAnchor:qH(P.textAnchor)?P.textAnchor:S.textAnchor,breakAll:f}),x))}ks.displayName="Label";var zye=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?y.createElement(ks,vo({key:"label-implicit"},r)):Ti(e)?y.createElement(ks,vo({key:"label-implicit",value:e},r)):y.isValidElement(e)?e.type===ks?y.cloneElement(e,Oh({key:"label-implicit"},r)):y.createElement(ks,vo({key:"label-implicit",content:e},r)):rA(e)?y.createElement(ks,vo({key:"label-implicit",content:e},r)):e&&typeof e=="object"?y.createElement(ks,vo({},e,{key:"label-implicit"},r)):null};function $ye(e){var{label:t,labelRef:n}=e,r=GH();return zye(t,r,n)||null}var Bye=["valueAccessor"],Uye=["dataKey","clockWise","id","textBreakAll","zIndex"];function Ny(){return Ny=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ny.apply(null,arguments)}function QI(e,t){if(e==null)return{};var n,r,a=Hye(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Hye(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Fye=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(mye(t))return t},WH=y.createContext(void 0),QH=WH.Provider,ZH=y.createContext(void 0),qye=ZH.Provider;function Kye(){return y.useContext(WH)}function Vye(){return y.useContext(ZH)}function yg(e){var{valueAccessor:t=Fye}=e,n=QI(e,Bye),{dataKey:r,clockWise:a,id:i,textBreakAll:s,zIndex:c}=n,u=QI(n,Uye),f=Kye(),m=Vye(),d=f||m;return!d||!d.length?null:y.createElement(Lr,{zIndex:c??vn.label},y.createElement(Cn,{className:"recharts-label-list"},d.map((p,b)=>{var w,x=Ht(r)?t(p,b):St(p.payload,r),S=Ht(i)?{}:{id:"".concat(i,"-").concat(b)};return y.createElement(ks,Ny({key:"label-".concat(b)},br(p),u,S,{fill:(w=n.fill)!==null&&w!==void 0?w:p.fill,parentViewBox:p.parentViewBox,value:x,textBreakAll:s,viewBox:p.viewBox,index:b,zIndex:0}))})))}yg.displayName="LabelList";function aA(e){var{label:t}=e;return t?t===!0?y.createElement(yg,{key:"labelList-implicit"}):y.isValidElement(t)||rA(t)?y.createElement(yg,{key:"labelList-implicit",content:t}):typeof t=="object"?y.createElement(yg,Ny({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}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)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},M_.apply(null,arguments)}var JH=e=>{var{cx:t,cy:n,r,className:a}=e,i=st("recharts-dot",a);return _e(t)&&_e(n)&&_e(r)?y.createElement("circle",M_({},ta(e),jO(e),{className:i,cx:t,cy:n,r})):null},eF=e=>e.graphicalItems.polarItems,Yye=oe([Yt,Bm],OC),ob=oe([eF,nn,Yye],CC),Xye=oe([ob],AC),sb=oe([Xye,U0],NC),Gye=oe([sb,nn,ob],PC);oe([sb,nn,ob],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(a=>{var i,s=St(r,(i=t.dataKey)!==null&&i!==void 0?i:a.dataKey);return{value:s,errorDomain:[]}})).filter(Boolean):(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:St(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var ZI=()=>{},Wye=oe([sb,nn,ob,tb,Yt],DC),Qye=oe([nn,RC,kC,ZI,Wye,ZI,ft,Yt],IC),tF=oe([nn,ft,sb,Gye,$m,Yt,Qye],LC),Zye=oe([tF,rd,vl],$C),Jye=oe([nn,tF,Zye,Yt],UC);oe([vl,Jye],eU);var e0e={radiusAxis:{},angleAxis:{}},nF=fr({name:"polarAxis",initialState:e0e,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:n2e,removeRadiusAxis:r2e,addAngleAxis:a2e,removeAngleAxis:i2e}=nF.actions,t0e=nF.reducer;function rF(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}function JI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function eL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JI(Object(n),!0).forEach(function(r){n0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n0e(e,t,n){return(t=r0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r0e(e){var t=a0e(e,"string");return typeof t=="symbol"?t:t+""}function a0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i0e=(e,t)=>t,iA=oe([eF,i0e],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),o0e=[],oA=(e,t,n)=>(n==null?void 0:n.length)===0?o0e:n,aF=oe([U0,iA,oA],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var a;if((t==null?void 0:t.data)!=null&&t.data.length>0?a=t.data:a=r,(!a||!a.length)&&n!=null&&(a=n.map(i=>eL(eL({},t.presentationProps),i.props))),a!=null)return a}}),s0e=oe([aF,iA,oA],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,a)=>{var i,s=St(r,t.nameKey,t.name),c;return n!=null&&(i=n[a])!==null&&i!==void 0&&(i=i.props)!==null&&i!==void 0&&i.fill?c=n[a].props.fill:typeof r=="object"&&r!=null&&"fill"in r?c=r.fill:c=t.fill,{value:Zf(s,t.dataKey),color:c,payload:r,type:t.legendType}})}),l0e=oe([aF,iA,oA,An],(e,t,n,r)=>{if(!(t==null||e==null))return dbe({offset:r,pieSettings:t,displayedData:e,cells:n})}),PS={exports:{}},wt={};/**
 * @license React
 * react-is.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var tL;function c0e(){if(tL)return wt;tL=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function w(x){if(typeof x=="object"&&x!==null){var S=x.$$typeof;switch(S){case e:switch(x=x.type,x){case n:case a:case r:case u:case f:case p:return x;default:switch(x=x&&x.$$typeof,x){case s:case c:case d:case m:return x;case i:return x;default:return S}}case t:return S}}}return wt.ContextConsumer=i,wt.ContextProvider=s,wt.Element=e,wt.ForwardRef=c,wt.Fragment=n,wt.Lazy=d,wt.Memo=m,wt.Portal=t,wt.Profiler=a,wt.StrictMode=r,wt.Suspense=u,wt.SuspenseList=f,wt.isContextConsumer=function(x){return w(x)===i},wt.isContextProvider=function(x){return w(x)===s},wt.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},wt.isForwardRef=function(x){return w(x)===c},wt.isFragment=function(x){return w(x)===n},wt.isLazy=function(x){return w(x)===d},wt.isMemo=function(x){return w(x)===m},wt.isPortal=function(x){return w(x)===t},wt.isProfiler=function(x){return w(x)===a},wt.isStrictMode=function(x){return w(x)===r},wt.isSuspense=function(x){return w(x)===u},wt.isSuspenseList=function(x){return w(x)===f},wt.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===a||x===r||x===u||x===f||typeof x=="object"&&x!==null&&(x.$$typeof===d||x.$$typeof===m||x.$$typeof===s||x.$$typeof===i||x.$$typeof===c||x.$$typeof===b||x.getModuleId!==void 0)},wt.typeOf=w,wt}var nL;function u0e(){return nL||(nL=1,PS.exports=c0e()),PS.exports}var f0e=u0e(),rL=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",aL=null,MS=null,iF=e=>{if(e===aL&&Array.isArray(MS))return MS;var t=[];return y.Children.forEach(e,n=>{Ht(n)||(f0e.isFragment(n)?t=t.concat(iF(n.props.children)):t.push(n))}),MS=t,aL=e,t};function sA(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(a=>rL(a)):r=[rL(t)],iF(e).forEach(a=>{var i=_c(a,"type.displayName")||_c(a,"type.name");i&&r.indexOf(i)!==-1&&n.push(a)}),n}var oF=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,RS={},iL;function d0e(){return iL||(iL=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){var a;if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!((a=Object.getOwnPropertyDescriptor(n,Symbol.toStringTag))!=null&&a.writable)?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(RS)),RS}var kS,oL;function h0e(){return oL||(oL=1,kS=d0e().isPlainObject),kS}var m0e=h0e();const p0e=Za(m0e);var sL,lL,cL,uL,fL;function dL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dL(Object(n),!0).forEach(function(r){v0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function v0e(e,t,n){return(t=g0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g0e(e){var t=y0e(e,"string");return typeof t=="symbol"?t:t+""}function y0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ty(){return Ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ty.apply(null,arguments)}function ph(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var mL=(e,t,n,r,a)=>{var i=n-r,s;return s=Jt(sL||(sL=ph(["M ",",",""])),e,t),s+=Jt(lL||(lL=ph(["L ",",",""])),e+n,t),s+=Jt(cL||(cL=ph(["L ",",",""])),e+n-i/2,t+a),s+=Jt(uL||(uL=ph(["L ",",",""])),e+n-i/2-r,t+a),s+=Jt(fL||(fL=ph(["L ",","," Z"])),e,t),s},b0e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},x0e=e=>{var t=bn(e,b0e),{x:n,y:r,upperWidth:a,lowerWidth:i,height:s,className:c}=t,{animationEasing:u,animationDuration:f,animationBegin:m,isUpdateAnimationActive:d}=t,p=y.useRef(null),[b,w]=y.useState(-1),x=y.useRef(a),S=y.useRef(i),E=y.useRef(s),C=y.useRef(n),O=y.useRef(r),A=zm(e,"trapezoid-");if(y.useEffect(()=>{if(p.current&&p.current.getTotalLength)try{var z=p.current.getTotalLength();z&&w(z)}catch{}},[]),n!==+n||r!==+r||a!==+a||i!==+i||s!==+s||a===0&&i===0||s===0)return null;var T=st("recharts-trapezoid",c);if(!d)return y.createElement("g",null,y.createElement("path",Ty({},br(t),{className:T,d:mL(n,r,a,i,s)})));var N=x.current,P=S.current,k=E.current,D=C.current,K=O.current,B="0px ".concat(b===-1?1:b,"px"),I="".concat(b,"px ").concat(b,"px"),W=E6(["strokeDasharray"],f,u);return y.createElement(Lm,{animationId:A,key:A,canBegin:b>0,duration:f,easing:u,isActive:d,begin:m},z=>{var V=$t(N,a,z),R=$t(P,i,z),H=$t(k,s,z),q=$t(D,n,z),F=$t(K,r,z);p.current&&(x.current=V,S.current=R,E.current=H,C.current=q,O.current=F);var Y=z>0?{transition:W,strokeDasharray:I}:{strokeDasharray:B};return y.createElement("path",Ty({},br(t),{className:T,d:mL(q,F,V,R,H),ref:p,style:hL(hL({},Y),t.style)}))})},w0e=["option","shapeType","activeClassName","inActiveClassName"];function S0e(e,t){if(e==null)return{};var n,r,a=E0e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function E0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function pL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Py(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pL(Object(n),!0).forEach(function(r){_0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _0e(e,t,n){return(t=j0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j0e(e){var t=O0e(e,"string");return typeof t=="symbol"?t:t+""}function O0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function C0e(e,t){return Py(Py({},t),e)}function A0e(e,t){return e==="symbols"}function vL(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return y.createElement(C6,n);case"trapezoid":return y.createElement(x0e,n);case"sector":return y.createElement(P6,n);case"symbols":if(A0e(t))return y.createElement(_O,n);break;case"curve":return y.createElement(HO,n);default:return null}}function N0e(e){return y.isValidElement(e)?e.props:e}function lA(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:a="recharts-shape"}=e,i=S0e(e,w0e),s;if(y.isValidElement(t))s=y.cloneElement(t,Py(Py({},i),N0e(t)));else if(typeof t=="function")s=t(i,i.index);else if(p0e(t)&&typeof t!="boolean"){var c=C0e(t,i);s=y.createElement(vL,{shapeType:n,elementProps:c})}else{var u=i;s=y.createElement(vL,{shapeType:n,elementProps:u})}return i.isActive?y.createElement(Cn,{className:r},s):y.createElement(Cn,{className:a},s)}var cA=(e,t,n)=>{var r=_t();return(a,i)=>s=>{e==null||e(a,i,s),r(hH({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}},uA=e=>{var t=_t();return(n,r)=>a=>{e==null||e(n,r,a),t(Rpe())}},fA=(e,t,n)=>{var r=_t();return(a,i)=>s=>{e==null||e(a,i,s),r(kpe({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}};function dA(e){var{tooltipEntrySettings:t}=e,n=_t(),r=dr(),a=y.useRef(null);return y.useLayoutEffect(()=>{r||(a.current===null?n(Npe(t)):a.current!==t&&n(Tpe({prev:a.current,next:t})),a.current=t)},[t,n,r]),y.useLayoutEffect(()=>()=>{a.current&&(n(Ppe(a.current)),a.current=null)},[n]),null}function sF(e){var{legendPayload:t}=e,n=_t(),r=dr(),a=y.useRef(null);return y.useLayoutEffect(()=>{r||(a.current===null?n(g6(t)):a.current!==t&&n(y6({prev:a.current,next:t})),a.current=t)},[n,r,t]),y.useLayoutEffect(()=>()=>{a.current&&(n(b6(a.current)),a.current=null)},[n]),null}function T0e(e){var{legendPayload:t}=e,n=_t(),r=Ae(ft),a=y.useRef(null);return y.useLayoutEffect(()=>{r!=="centric"&&r!=="radial"||(a.current===null?n(g6(t)):a.current!==t&&n(y6({prev:a.current,next:t})),a.current=t)},[n,r,t]),y.useLayoutEffect(()=>()=>{a.current&&(n(b6(a.current)),a.current=null)},[n]),null}var DS,P0e=()=>{var[e]=y.useState(()=>$h("uid-"));return e},M0e=(DS=tj.useId)!==null&&DS!==void 0?DS:P0e;function R0e(e,t){var n=M0e();return t||(e?"".concat(e,"-").concat(n):n)}var k0e=y.createContext(void 0),hA=e=>{var{id:t,type:n,children:r}=e,a=R0e("recharts-".concat(n),t);return y.createElement(k0e.Provider,{value:a},r(a))},D0e={cartesianItems:[],polarItems:[]},lF=fr({name:"graphicalItems",initialState:D0e,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Dt()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=ja(e).cartesianItems.indexOf(n);a>-1&&(e.cartesianItems[a]=r)},prepare:Dt()},removeCartesianGraphicalItem:{reducer(e,t){var n=ja(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Dt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Dt()},removePolarGraphicalItem:{reducer(e,t){var n=ja(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Dt()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=ja(e).polarItems.indexOf(n);a>-1&&(e.polarItems[a]=r)},prepare:Dt()}}}),{addCartesianGraphicalItem:I0e,replaceCartesianGraphicalItem:L0e,removeCartesianGraphicalItem:z0e,addPolarGraphicalItem:$0e,removePolarGraphicalItem:B0e,replacePolarGraphicalItem:U0e}=lF.actions,H0e=lF.reducer,F0e=e=>{var t=_t(),n=y.useRef(null);return y.useLayoutEffect(()=>{n.current===null?t(I0e(e)):n.current!==e&&t(L0e({prev:n.current,next:e})),n.current=e},[t,e]),y.useLayoutEffect(()=>()=>{n.current&&(t(z0e(n.current)),n.current=null)},[t]),null},cF=y.memo(F0e),q0e=e=>{var t=_t(),n=y.useRef(null);return y.useLayoutEffect(()=>{n.current===null?t($0e(e)):n.current!==e&&t(U0e({prev:n.current,next:e})),n.current=e},[t,e]),y.useLayoutEffect(()=>()=>{n.current&&(t(B0e(n.current)),n.current=null)},[t]),null},K0e=y.memo(q0e),V0e=["key"],Y0e=["onMouseEnter","onClick","onMouseLeave"],X0e=["id"],G0e=["id"];function sl(){return sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sl.apply(null,arguments)}function lb(e,t){if(e==null)return{};var n,r,a=W0e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function W0e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function gL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gL(Object(n),!0).forEach(function(r){Q0e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Q0e(e,t,n){return(t=Z0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z0e(e){var t=J0e(e,"string");return typeof t=="symbol"?t:t+""}function J0e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ebe(e){var t=y.useMemo(()=>sA(e.children,Qm),[e.children]),n=Ae(r=>s0e(r,e.id,t));return n==null?null:y.createElement(T0e,{legendPayload:n})}function tbe(e){if(!(e==null||typeof e=="boolean"||typeof e=="function")){if(y.isValidElement(e)){var t,n=(t=e.props)===null||t===void 0?void 0:t.fill;return typeof n=="string"?n:void 0}var{fill:r}=e;return typeof r=="string"?r:void 0}}var nbe=y.memo(e=>{var{dataKey:t,nameKey:n,sectors:r,stroke:a,strokeWidth:i,fill:s,name:c,hide:u,tooltipType:f,id:m,activeShape:d}=e,p=tbe(d),b=r.map(x=>{var S=x.tooltipPayload;return p==null||S==null?S:S.map(E=>Bt(Bt({},E),{},{color:p,fill:p}))}),w={dataDefinedOnItem:b,getPosition:x=>{var S;return(S=r[Number(x)])===null||S===void 0?void 0:S.tooltipPosition},settings:{stroke:a,strokeWidth:i,fill:s,dataKey:t,nameKey:n,name:Zf(c,t),hide:u,type:f,color:s,unit:"",graphicalItemId:m}};return y.createElement(dA,{tooltipEntrySettings:w})}),rbe=(e,t)=>e>t?"start":e<t?"end":"middle",abe=(e,t,n)=>cr(typeof t=="function"?t(e):t,n,n*.8),ibe=(e,t,n)=>{var{top:r,left:a,width:i,height:s}=t,c=A6(i,s),u=a+cr(e.cx,i,i/2),f=r+cr(e.cy,s,s/2),m=cr(e.innerRadius,c,0),d=abe(n,e.outerRadius,c),p=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:u,cy:f,innerRadius:m,outerRadius:d,maxRadius:p}},obe=(e,t)=>{var n=Ln(t-e),r=Math.min(Math.abs(t-e),360);return n*r},sbe=(e,t)=>{if(y.isValidElement(e))return y.cloneElement(e,t);if(typeof e=="function")return e(t);var n=st("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:r}=t,a=lb(t,V0e);return y.createElement(HO,sl({},a,{type:"linear",className:n}))},lbe=(e,t,n)=>{if(y.isValidElement(e))return y.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),y.isValidElement(r)))return r;var a=st("recharts-pie-label-text",rF(e));return y.createElement(ib,sl({},t,{alignmentBaseline:"middle",className:a}),r)};function cbe(e){var{sectors:t,props:n,showLabels:r}=e,{label:a,labelLine:i,dataKey:s}=n;if(!r||!a||!t)return null;var c=ta(n),u=Sc(a),f=Sc(i),m=typeof a=="object"&&"offsetRadius"in a&&typeof a.offsetRadius=="number"&&a.offsetRadius||20,d=t.map((p,b)=>{var w=(p.startAngle+p.endAngle)/2,x=pn(p.cx,p.cy,p.outerRadius+m,w),S=Bt(Bt(Bt(Bt({},c),p),{},{stroke:"none"},u),{},{index:b,textAnchor:rbe(x.x,p.cx)},x),E=Bt(Bt(Bt(Bt({},c),p),{},{fill:"none",stroke:p.fill},f),{},{index:b,points:[pn(p.cx,p.cy,p.outerRadius,w),x],key:"line"});return y.createElement(Lr,{zIndex:vn.label,key:"label-".concat(p.startAngle,"-").concat(p.endAngle,"-").concat(p.midAngle,"-").concat(b)},y.createElement(Cn,null,i&&sbe(i,E),lbe(a,S,St(p,s))))});return y.createElement(Cn,{className:"recharts-pie-labels"},d)}function ube(e){var{sectors:t,props:n,showLabels:r}=e,{label:a}=n;return typeof a=="object"&&a!=null&&"position"in a?y.createElement(aA,{label:a}):y.createElement(cbe,{sectors:t,props:n,showLabels:r})}function fbe(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:a,shape:i,id:s}=e,c=Ae(ol),u=Ae(QC),f=Ae(AH),{onMouseEnter:m,onClick:d,onMouseLeave:p}=a,b=lb(a,Y0e),w=cA(m,a.dataKey,s),x=uA(p),S=fA(d,a.dataKey,s);return t==null||t.length===0?null:y.createElement(y.Fragment,null,t.map((E,C)=>{if((E==null?void 0:E.startAngle)===0&&(E==null?void 0:E.endAngle)===0&&t.length!==1)return null;var O=f==null||f===s,A=String(C)===c&&(u==null||a.dataKey===u)&&O,T=c?r:null,N=n&&A?n:T,P=Bt(Bt({},E),{},{stroke:E.stroke,tabIndex:-1,[n6]:C,[r6]:s});return y.createElement(Cn,sl({key:"sector-".concat(E==null?void 0:E.startAngle,"-").concat(E==null?void 0:E.endAngle,"-").concat(E.midAngle,"-").concat(C),tabIndex:-1,className:"recharts-pie-sector"},Tm(b,E,C),{onMouseEnter:w(E,C),onMouseLeave:x(E,C),onClick:S(E,C)}),y.createElement(lA,sl({option:i??N,index:C,shapeType:"sector",isActive:A},P)))}))}function dbe(e){var t,{pieSettings:n,displayedData:r,cells:a,offset:i}=e,{cornerRadius:s,startAngle:c,endAngle:u,dataKey:f,nameKey:m,tooltipType:d}=n,p=Math.abs(n.minAngle),b=obe(c,u),w=Math.abs(b),x=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,S=r.filter(N=>St(N,f,0)!==0).length,E=(w>=360?S:S-1)*x,C=w-S*p-E,O=r.reduce((N,P)=>{var k=St(P,f,0);return N+(_e(k)?k:0)},0),A;if(O>0){var T;A=r.map((N,P)=>{var k=St(N,f,0),D=St(N,m,P),K=ibe(n,i,N),B=(_e(k)?k:0)/O,I,W=Bt(Bt({},N),a&&a[P]&&a[P].props),z=W!=null&&"fill"in W&&typeof W.fill=="string"?W.fill:n.fill;P?I=T.endAngle+Ln(b)*x*(k!==0?1:0):I=c;var V=I+Ln(b)*((k!==0?p:0)+B*C),R=(I+V)/2,H=(K.innerRadius+K.outerRadius)/2,q=[{name:D,value:k,payload:W,dataKey:f,type:d,color:z,fill:z,graphicalItemId:n.id}],F=pn(K.cx,K.cy,H,R);return T=Bt(Bt(Bt(Bt({},n.presentationProps),{},{percent:B,cornerRadius:typeof s=="string"?parseFloat(s):s,name:D,tooltipPayload:q,midAngle:R,middleRadius:H,tooltipPosition:F},W),K),{},{value:k,dataKey:f,startAngle:I,endAngle:V,payload:W,paddingAngle:Ln(b)*x}),T})}return A}function hbe(e){var{showLabels:t,sectors:n,children:r}=e,a=y.useMemo(()=>!t||!n?[]:n.map(i=>({value:i.value,payload:i.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:i.cx,cy:i.cy,innerRadius:i.innerRadius,outerRadius:i.outerRadius,startAngle:i.startAngle,endAngle:i.endAngle,clockWise:!1},fill:i.fill})),[n,t]);return y.createElement(qye,{value:t?a:void 0},r)}function mbe(e){var{props:t,previousSectorsRef:n,id:r}=e,{sectors:a,isAnimationActive:i,animationBegin:s,animationDuration:c,animationEasing:u,activeShape:f,inactiveShape:m,onAnimationStart:d,onAnimationEnd:p}=t,b=zm(t,"recharts-pie-"),w=n.current,[x,S]=y.useState(!1),E=y.useCallback(()=>{typeof p=="function"&&p(),S(!1)},[p]),C=y.useCallback(()=>{typeof d=="function"&&d(),S(!0)},[d]);return y.createElement(hbe,{showLabels:!x,sectors:a},y.createElement(Lm,{animationId:b,begin:s,duration:c,isActive:i,easing:u,onAnimationStart:C,onAnimationEnd:E,key:b},O=>{var A,T=[],N=a&&a[0],P=(A=N==null?void 0:N.startAngle)!==null&&A!==void 0?A:0;return a==null||a.forEach((k,D)=>{var K=w&&w[D],B=D>0?_c(k,"paddingAngle",0):0;if(K){var I=$t(K.endAngle-K.startAngle,k.endAngle-k.startAngle,O),W=Bt(Bt({},k),{},{startAngle:P+B,endAngle:P+I+B});T.push(W),P=W.endAngle}else{var{endAngle:z,startAngle:V}=k,R=$t(0,z-V,O),H=Bt(Bt({},k),{},{startAngle:P+B,endAngle:P+R+B});T.push(H),P=H.endAngle}}),n.current=T,y.createElement(Cn,null,y.createElement(fbe,{sectors:T,activeShape:f,inactiveShape:m,allOtherPieProps:t,shape:t.shape,id:r}))}),y.createElement(ube,{showLabels:!x,sectors:a,props:t}),t.children)}var pbe={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:vn.area};function vbe(e){var{id:t}=e,n=lb(e,X0e),{hide:r,className:a,rootTabIndex:i}=e,s=y.useMemo(()=>sA(e.children,Qm),[e.children]),c=Ae(m=>l0e(m,t,s)),u=y.useRef(null),f=st("recharts-pie",a);return r||c==null?(u.current=null,y.createElement(Cn,{tabIndex:i,className:f})):y.createElement(Lr,{zIndex:e.zIndex},y.createElement(nbe,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:c,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t,activeShape:e.activeShape}),y.createElement(Cn,{tabIndex:i,className:f},y.createElement(mbe,{props:Bt(Bt({},n),{},{sectors:c}),previousSectorsRef:u,id:t})))}function gbe(e){var t=bn(e,pbe),{id:n}=t,r=lb(t,G0e),a=ta(r);return y.createElement(hA,{id:n,type:"pie"},i=>y.createElement(y.Fragment,null,y.createElement(K0e,{type:"pie",id:i,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:a,maxRadius:t.maxRadius}),y.createElement(ebe,sl({},r,{id:i})),y.createElement(vbe,sl({},r,{id:i}))))}var uF=gbe;uF.displayName="Pie";var ybe=["points"];function yL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function IS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yL(Object(n),!0).forEach(function(r){bbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bbe(e,t,n){return(t=xbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xbe(e){var t=wbe(e,"string");return typeof t=="symbol"?t:t+""}function wbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function My(){return My=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},My.apply(null,arguments)}function Sbe(e,t){if(e==null)return{};var n,r,a=Ebe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Ebe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _be(e){var{option:t,dotProps:n,className:r}=e;if(y.isValidElement(t))return y.cloneElement(t,n);if(typeof t=="function")return t(n);var a=st(r,typeof t!="boolean"?t.className:""),i=n??{},{points:s}=i,c=Sbe(i,ybe);return y.createElement(JH,My({},c,{className:a}))}function jbe(e,t){return e==null?!1:t?!0:e.length===1}function Obe(e){var{points:t,dot:n,className:r,dotClassName:a,dataKey:i,baseProps:s,needClip:c,clipPathId:u,zIndex:f=vn.scatter}=e;if(!jbe(t,n))return null;var m=oF(n),d=oie(n),p=t.map((w,x)=>{var S,E,C=IS(IS(IS({r:3},s),d),{},{index:x,cx:(S=w.x)!==null&&S!==void 0?S:void 0,cy:(E=w.y)!==null&&E!==void 0?E:void 0,dataKey:i,value:w.value,payload:w.payload,points:t});return y.createElement(_be,{key:"dot-".concat(x),option:n,dotProps:C,className:a})}),b={};return c&&u!=null&&(b.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(u,")")),y.createElement(Lr,{zIndex:f},y.createElement(Cn,My({className:r},b),p))}function bL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bL(Object(n),!0).forEach(function(r){Cbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cbe(e,t,n){return(t=Abe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Abe(e){var t=Nbe(e,"string");return typeof t=="symbol"?t:t+""}function Nbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fF=0,Tbe={xAxis:{},yAxis:{},zAxis:{}},dF=fr({name:"cartesianAxis",initialState:Tbe,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Dt()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.xAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:Dt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Dt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Dt()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.yAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:Dt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Dt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Dt()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;e.zAxis[n.id]!==void 0&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:Dt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Dt()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,a=e.yAxis[n];if(a){var i,s=a.widthHistory||[];if(s.length===3&&s[0]===s[2]&&r===s[1]&&r!==a.width&&Math.abs(r-((i=s[0])!==null&&i!==void 0?i:0))<=1)return;var c=[...s,r].slice(-3);e.yAxis[n]=xL(xL({},a),{},{width:r,widthHistory:c})}}}}),{addXAxis:Pbe,replaceXAxis:Mbe,removeXAxis:Rbe,addYAxis:kbe,replaceYAxis:Dbe,removeYAxis:Ibe,addZAxis:o2e,replaceZAxis:s2e,removeZAxis:l2e,updateYAxisWidth:Lbe}=dF.actions,zbe=dF.reducer,$be=oe([An],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Bbe=oe([$be,Bo,Uo],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),mA=()=>Ae(Bbe),Ube=()=>Ae(Ave);function wL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function LS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wL(Object(n),!0).forEach(function(r){Hbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hbe(e,t,n){return(t=Fbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fbe(e){var t=qbe(e,"string");return typeof t=="symbol"?t:t+""}function qbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kbe=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:a,dataKey:i,clipPath:s}=e;if(a===!1||t.x==null||t.y==null)return null;var c={index:n,dataKey:i,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},u=LS(LS(LS({},c),Sc(a)),jO(a)),f;return y.isValidElement(a)?f=y.cloneElement(a,u):typeof a=="function"?f=a(u):f=y.createElement(JH,u),y.createElement(Cn,{className:"recharts-active-dot",clipPath:s},f)};function Vbe(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:a,clipPath:i,zIndex:s=vn.activeDot}=e,c=Ae(ol),u=Ube();if(t==null||u==null)return null;var f=t.find(m=>u.includes(m.payload));return Ht(f)?null:y.createElement(Lr,{zIndex:s},y.createElement(Kbe,{point:f,childIndex:Number(c),mainColor:n,dataKey:a,activeDot:r,clipPath:i}))}var SL=(e,t,n)=>{var r=n??e;if(!Ht(r))return cr(r,t,0)},Ybe=(e,t,n)=>{var r={},a=e.filter(K0),i=e.filter(f=>f.stackId==null),s=a.reduce((f,m)=>{var d=f[m.stackId];return d==null&&(d=[]),d.push(m),f[m.stackId]=d,f},r),c=Object.entries(s).map(f=>{var m,[d,p]=f,b=p.map(x=>x.dataKey),w=SL(t,n,(m=p[0])===null||m===void 0?void 0:m.barSize);return{stackId:d,dataKeys:b,barSize:w}}),u=i.map(f=>{var m=[f.dataKey].filter(p=>p!=null),d=SL(t,n,f.barSize);return{stackId:void 0,dataKeys:m,barSize:d}});return[...c,...u]};function EL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EL(Object(n),!0).forEach(function(r){Xbe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xbe(e,t,n){return(t=Gbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gbe(e){var t=Wbe(e,"string");return typeof t=="symbol"?t:t+""}function Wbe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qbe(e,t,n,r,a){var i,s=r.length;if(!(s<1)){var c=cr(e,n,0,!0),u,f=[];if(it((i=r[0])===null||i===void 0?void 0:i.barSize)){var m=!1,d=n/s,p=r.reduce((C,O)=>C+(O.barSize||0),0);p+=(s-1)*c,p>=n&&(p-=(s-1)*c,c=0),p>=n&&d>0&&(m=!0,d*=.9,p=s*d);var b=(n-p)/2>>0,w={offset:b-c,size:0};u=r.reduce((C,O)=>{var A,T={stackId:O.stackId,dataKeys:O.dataKeys,position:{offset:w.offset+w.size+c,size:m?d:(A=O.barSize)!==null&&A!==void 0?A:0}},N=[...C,T];return w=T.position,N},f)}else{var x=cr(t,n,0,!0);n-2*x-(s-1)*c<=0&&(c=0);var S=(n-2*x-(s-1)*c)/s;S>1&&(S>>=0);var E=it(a)?Math.min(S,a):S;u=r.reduce((C,O,A)=>[...C,{stackId:O.stackId,dataKeys:O.dataKeys,position:{offset:x+(S+c)*A+(S-E)/2,size:E}}],f)}return u}}var Zbe=(e,t,n,r,a,i,s)=>{var c=Ht(s)?t:s,u=Qbe(n,r,a!==i?a:i,e,c);return a!==i&&u!=null&&(u=u.map(f=>Gv(Gv({},f),{},{position:Gv(Gv({},f.position),{},{offset:f.position.offset-a/2})}))),u},Jbe=(e,t)=>{var n=JO(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var a=e[r];if(a){var{stackedData:i}=a;if(i)return i.find(s=>s.key===n)}}}},exe=(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function txe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&it(e.zIndex)?e.zIndex:t}var hF=e=>{var{chartData:t}=e,n=_t(),r=dr();return y.useEffect(()=>r?()=>{}:(n(RI(t)),()=>{n(RI(void 0))}),[t,n,r]),null},_L={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},mF=fr({name:"brush",initialState:_L,reducers:{setBrushSettings(e,t){return t.payload==null?_L:t.payload}}}),{setBrushSettings:c2e}=mF.actions,nxe=mF.reducer;function rxe(e){return(e%180+180)%180}var axe=function(t){var{width:n,height:r}=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=rxe(a),s=i*Math.PI/180,c=Math.atan(r/n),u=s>c&&s<Math.PI-c?r/Math.sin(s):n/Math.cos(s);return Math.abs(u)},ixe={dots:[],areas:[],lines:[]},pF=fr({name:"referenceElements",initialState:ixe,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=ja(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=ja(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=ja(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:u2e,removeDot:f2e,addArea:d2e,removeArea:h2e,addLine:m2e,removeLine:p2e}=pF.actions,oxe=pF.reducer,sxe=y.createContext(void 0),lxe=e=>{var{children:t}=e,[n]=y.useState("".concat($h("recharts"),"-clip")),r=mA();if(r==null)return null;var{x:a,y:i,width:s,height:c}=r;return y.createElement(sxe.Provider,{value:n},y.createElement("defs",null,y.createElement("clipPath",{id:n},y.createElement("rect",{x:a,y:i,height:c,width:s}))),t)};function vF(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var a=e[r];a!==void 0&&n.push(a)}return n}function cxe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return axe(r,n)}function uxe(e,t,n){var r=n==="width",{x:a,y:i,width:s,height:c}=e;return t===1?{start:r?a:i,end:r?a+s:i+c}:{start:r?a+s:i+c,end:r?a:i}}function Zh(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function fxe(e,t){return vF(e,t+1)}function dxe(e,t,n,r,a){for(var i=(r||[]).slice(),{start:s,end:c}=t,u=0,f=1,m=s,d=function(){var w=r==null?void 0:r[u];if(w===void 0)return{v:vF(r,f)};var x=u,S,E=()=>(S===void 0&&(S=n(w,x)),S),C=w.coordinate,O=u===0||Zh(e,C,E,m,c);O||(u=0,m=s,f+=1),O&&(m=C+e*(E()/2+a),u+=f)},p;f<=i.length;)if(p=d(),p)return p.v;return[]}function hxe(e,t,n,r,a){var i=(r||[]).slice(),s=i.length;if(s===0)return[];for(var{start:c,end:u}=t,f=1;f<=s;f++){for(var m=(s-1)%f,d=c,p=!0,b=function(){var A=r[x];if(A==null)return 0;var T=x,N,P=()=>(N===void 0&&(N=n(A,T)),N),k=A.coordinate,D=x===m||Zh(e,k,P,d,u);if(!D)return p=!1,1;D&&(d=k+e*(P()/2+a))},w,x=m;x<s&&(w=b(),!(w!==0&&w===1));x+=f);if(p){for(var S=[],E=m;E<s;E+=f){var C=r[E];C!=null&&S.push(C)}return S}}return[]}function jL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jL(Object(n),!0).forEach(function(r){mxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mxe(e,t,n){return(t=pxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pxe(e){var t=vxe(e,"string");return typeof t=="symbol"?t:t+""}function vxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gxe(e,t,n,r,a){for(var i=(r||[]).slice(),s=i.length,{start:c}=t,{end:u}=t,f=function(p){var b=i[p];if(b==null)return 1;var w=b,x,S=()=>(x===void 0&&(x=n(b,p)),x);if(p===s-1){var E=e*(w.coordinate+e*S()/2-u);i[p]=w=or(or({},w),{},{tickCoord:E>0?w.coordinate-E*e:w.coordinate})}else i[p]=w=or(or({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var C=Zh(e,w.tickCoord,S,c,u);C&&(u=w.tickCoord-e*(S()/2+a),i[p]=or(or({},w),{},{isShow:!0}))}},m=s-1;m>=0;m--)f(m);return i}function yxe(e,t,n,r,a,i){var s=(r||[]).slice(),c=s.length,{start:u,end:f}=t;if(i){var m=r[c-1];if(m!=null){var d=n(m,c-1),p=e*(m.coordinate+e*d/2-f);if(s[c-1]=m=or(or({},m),{},{tickCoord:p>0?m.coordinate-p*e:m.coordinate}),m.tickCoord!=null){var b=Zh(e,m.tickCoord,()=>d,u,f);b&&(f=m.tickCoord-e*(d/2+a),s[c-1]=or(or({},m),{},{isShow:!0}))}}}for(var w=i?c-1:c,x=function(C){var O=s[C];if(O==null)return 1;var A=O,T,N=()=>(T===void 0&&(T=n(O,C)),T);if(C===0){var P=e*(A.coordinate-e*N()/2-u);s[C]=A=or(or({},A),{},{tickCoord:P<0?A.coordinate-P*e:A.coordinate})}else s[C]=A=or(or({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var k=Zh(e,A.tickCoord,N,u,f);k&&(u=A.tickCoord+e*(N()/2+a),s[C]=or(or({},A),{},{isShow:!0}))}},S=0;S<w;S++)x(S);return s}function pA(e,t,n){var{tick:r,ticks:a,viewBox:i,minTickGap:s,orientation:c,interval:u,tickFormatter:f,unit:m,angle:d}=e;if(!a||!a.length||!r)return[];if(_e(u)||Im.isSsr){var p;return(p=fxe(a,_e(u)?u:0))!==null&&p!==void 0?p:[]}var b=[],w=c==="top"||c==="bottom"?"width":"height",x=m&&w==="width"?Nh(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=(T,N)=>{var P=typeof f=="function"?f(T.value,N):T.value;return w==="width"?cxe(Nh(P,{fontSize:t,letterSpacing:n}),x,d):Nh(P,{fontSize:t,letterSpacing:n})[w]},E=a[0],C=a[1],O=a.length>=2&&E!=null&&C!=null?Ln(C.coordinate-E.coordinate):1,A=uxe(i,O,w);return u==="equidistantPreserveStart"?dxe(O,A,S,a,s):u==="equidistantPreserveEnd"?hxe(O,A,S,a,s):(u==="preserveStart"||u==="preserveStartEnd"?b=yxe(O,A,S,a,s,u==="preserveStartEnd"):b=gxe(O,A,S,a,s),b.filter(T=>T.isShow))}var bxe=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:a=0,tickMargin:i=0}=e,s=0;if(t){Array.from(t).forEach(m=>{if(m){var d=m.getBoundingClientRect();d.width>s&&(s=d.width)}});var c=n?n.getBoundingClientRect().width:0,u=a+i,f=s+u+c+(n?r:0);return Math.round(f)}return 0},xxe={xAxis:{},yAxis:{}},gF=fr({name:"renderedTicks",initialState:xxe,reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:a}=t.payload;e[n][r]=a},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:wxe,removeRenderedTicks:Sxe}=gF.actions,Exe=gF.reducer,_xe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function jxe(e,t){if(e==null)return{};var n,r,a=Oxe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Oxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Pc(){return Pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pc.apply(null,arguments)}function OL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OL(Object(n),!0).forEach(function(r){Cxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cxe(e,t,n){return(t=Axe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Axe(e){var t=Nxe(e,"string");return typeof t=="symbol"?t:t+""}function Nxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oo={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",zIndex:vn.axis};function Txe(e){var{x:t,y:n,width:r,height:a,orientation:i,mirror:s,axisLine:c,otherSvgProps:u}=e;if(!c)return null;var f=Zt(Zt(Zt({},u),ta(c)),{},{fill:"none"});if(i==="top"||i==="bottom"){var m=+(i==="top"&&!s||i==="bottom"&&s);f=Zt(Zt({},f),{},{x1:t,y1:n+m*a,x2:t+r,y2:n+m*a})}else{var d=+(i==="left"&&!s||i==="right"&&s);f=Zt(Zt({},f),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+a})}return y.createElement("line",Pc({},f,{className:st("recharts-cartesian-axis-line",_c(c,"className"))}))}function Pxe(e,t,n,r,a,i,s,c,u){var f,m,d,p,b,w,x=c?-1:1,S=e.tickSize||s,E=_e(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":f=m=e.coordinate,p=n+ +!c*a,d=p-x*S,w=d-x*u,b=E;break;case"left":d=p=e.coordinate,m=t+ +!c*r,f=m-x*S,b=f-x*u,w=E;break;case"right":d=p=e.coordinate,m=t+ +c*r,f=m+x*S,b=f+x*u,w=E;break;default:f=m=e.coordinate,p=n+ +c*a,d=p+x*S,w=d+x*u,b=E;break}return{line:{x1:f,y1:d,x2:m,y2:p},tick:{x:b,y:w}}}function Mxe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function Rxe(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function kxe(e){var{option:t,tickProps:n,value:r}=e,a,i=st(n.className,"recharts-cartesian-axis-tick-value");if(y.isValidElement(t))a=y.cloneElement(t,Zt(Zt({},n),{},{className:i}));else if(typeof t=="function")a=t(Zt(Zt({},n),{},{className:i}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=st(s,rF(t))),a=y.createElement(ib,Pc({},n,{className:s}),r)}return a}function Dxe(e){var{ticks:t,axisType:n,axisId:r}=e,a=_t();return y.useEffect(()=>{if(r==null||n==null)return hl;var i=t.map(s=>({value:s.value,coordinate:s.coordinate,offset:s.offset,index:s.index}));return a(wxe({ticks:i,axisId:r,axisType:n})),()=>{a(Sxe({axisId:r,axisType:n}))}},[a,t,r,n]),null}var Ixe=y.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:a,stroke:i,tickFormatter:s,unit:c,padding:u,tickTextProps:f,orientation:m,mirror:d,x:p,y:b,width:w,height:x,tickSize:S,tickMargin:E,fontSize:C,letterSpacing:O,getTicksConfig:A,events:T,axisType:N,axisId:P}=e,k=pA(Zt(Zt({},A),{},{ticks:n}),C,O),D=ta(A),K=Sc(r),B=qH(D.textAnchor)?D.textAnchor:Mxe(m,d),I=Rxe(m,d),W={};typeof a=="object"&&(W=a);var z=Zt(Zt({},D),{},{fill:"none"},W),V=k.map(q=>Zt({entry:q},Pxe(q,p,b,w,x,m,S,d,E))),R=V.map(q=>{var{entry:F,line:Y}=q;return y.createElement(Cn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(F.value,"-").concat(F.coordinate,"-").concat(F.tickCoord)},a&&y.createElement("line",Pc({},z,Y,{className:st("recharts-cartesian-axis-tick-line",_c(a,"className"))})))}),H=V.map((q,F)=>{var Y,$,{entry:L,tick:G}=q,Z=Zt(Zt(Zt(Zt({verticalAnchor:I},D),{},{textAnchor:B,stroke:"none",fill:i},G),{},{index:F,payload:L,visibleTicksCount:k.length,tickFormatter:s,padding:u},f),{},{angle:(Y=($=f==null?void 0:f.angle)!==null&&$!==void 0?$:D.angle)!==null&&Y!==void 0?Y:0}),J=Zt(Zt({},Z),K);return y.createElement(Cn,Pc({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(L.value,"-").concat(L.coordinate,"-").concat(L.tickCoord)},Tm(T,L,F)),r&&y.createElement(kxe,{option:r,tickProps:J,value:"".concat(typeof s=="function"?s(L.value,F):L.value).concat(c||"")}))});return y.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(N,"-ticks")},y.createElement(Dxe,{ticks:k,axisId:P,axisType:N}),H.length>0&&y.createElement(Lr,{zIndex:vn.label},y.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(N,"-tick-labels"),ref:t},H)),R.length>0&&y.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(N,"-tick-lines")},R))}),Lxe=y.forwardRef((e,t)=>{var{axisLine:n,width:r,height:a,className:i,hide:s,ticks:c,axisType:u,axisId:f}=e,m=jxe(e,_xe),[d,p]=y.useState(""),[b,w]=y.useState(""),x=y.useRef(null);y.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var E;return bxe({ticks:x.current,label:(E=e.labelRef)===null||E===void 0?void 0:E.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var S=y.useCallback(E=>{if(E){var C=E.getElementsByClassName("recharts-cartesian-axis-tick-value");x.current=C;var O=C[0];if(O){var A=window.getComputedStyle(O),T=A.fontSize,N=A.letterSpacing;(T!==d||N!==b)&&(p(T),w(N))}}},[d,b]);return s||r!=null&&r<=0||a!=null&&a<=0?null:y.createElement(Lr,{zIndex:e.zIndex},y.createElement(Cn,{className:st("recharts-cartesian-axis",i)},y.createElement(Txe,{x:e.x,y:e.y,width:r,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:ta(e)}),y.createElement(Ixe,{ref:S,axisType:u,events:m,fontSize:d,getTicksConfig:e,height:e.height,letterSpacing:b,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:f}),y.createElement(Nye,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},y.createElement($ye,{label:e.label,labelRef:e.labelRef}),e.children)))}),vA=y.forwardRef((e,t)=>{var n=bn(e,Oo);return y.createElement(Lxe,Pc({},n,{ref:t}))});vA.displayName="CartesianAxis";var zxe=["x1","y1","x2","y2","key"],$xe=["offset"],Bxe=["xAxisId","yAxisId"],Uxe=["xAxisId","yAxisId"];function CL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function lr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CL(Object(n),!0).forEach(function(r){Hxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hxe(e,t,n){return(t=Fxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fxe(e){var t=qxe(e,"string");return typeof t=="symbol"?t:t+""}function qxe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jl(){return Jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jl.apply(null,arguments)}function Ry(e,t){if(e==null)return{};var n,r,a=Kxe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function Kxe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Vxe=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:a,width:i,height:s,ry:c}=e;return y.createElement("rect",{x:r,y:a,ry:c,width:i,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function yF(e){var{option:t,lineItemProps:n}=e,r;if(y.isValidElement(t))r=y.cloneElement(t,n);else if(typeof t=="function")r=t(n);else{var a,{x1:i,y1:s,x2:c,y2:u,key:f}=n,m=Ry(n,zxe),d=(a=ta(m))!==null&&a!==void 0?a:{},{offset:p}=d,b=Ry(d,$xe);r=y.createElement("line",Jl({},b,{x1:i,y1:s,x2:c,y2:u,fill:"none",key:f}))}return r}function Yxe(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:a}=e;if(!r||!a||!a.length)return null;var{xAxisId:i,yAxisId:s}=e,c=Ry(e,Bxe),u=a.map((f,m)=>{var d=lr(lr({},c),{},{x1:t,y1:f,x2:t+n,y2:f,key:"line-".concat(m),index:m});return y.createElement(yF,{key:"line-".concat(m),option:r,lineItemProps:d})});return y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Xxe(e){var{y:t,height:n,vertical:r=!0,verticalPoints:a}=e;if(!r||!a||!a.length)return null;var{xAxisId:i,yAxisId:s}=e,c=Ry(e,Uxe),u=a.map((f,m)=>{var d=lr(lr({},c),{},{x1:f,y1:t,x2:f,y2:t+n,key:"line-".concat(m),index:m});return y.createElement(yF,{option:r,lineItemProps:d,key:"line-".concat(m)})});return y.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function Gxe(e){var{horizontalFill:t,fillOpacity:n,x:r,y:a,width:i,height:s,horizontalPoints:c,horizontal:u=!0}=e;if(!u||!t||!t.length||c==null)return null;var f=c.map(d=>Math.round(d+a-a)).sort((d,p)=>d-p);a!==f[0]&&f.unshift(0);var m=f.map((d,p)=>{var b=f[p+1],w=b==null,x=w?a+s-d:b-d;if(x<=0)return null;var S=p%t.length;return y.createElement("rect",{key:"react-".concat(p),y:d,x:r,height:x,width:i,stroke:"none",fill:t[S],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Wxe(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:a,y:i,width:s,height:c,verticalPoints:u}=e;if(!t||!n||!n.length)return null;var f=u.map(d=>Math.round(d+a-a)).sort((d,p)=>d-p);a!==f[0]&&f.unshift(0);var m=f.map((d,p)=>{var b=f[p+1],w=b==null,x=w?a+s-d:b-d;if(x<=0)return null;var S=p%n.length;return y.createElement("rect",{key:"react-".concat(p),x:d,y:i,width:x,height:c,stroke:"none",fill:n[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var Qxe=(e,t)=>{var{xAxis:n,width:r,height:a,offset:i}=e;return J8(pA(lr(lr(lr({},Oo),n),{},{ticks:e6(n),viewBox:{x:0,y:0,width:r,height:a}})),i.left,i.left+i.width,t)},Zxe=(e,t)=>{var{yAxis:n,width:r,height:a,offset:i}=e;return J8(pA(lr(lr(lr({},Oo),n),{},{ticks:e6(n),viewBox:{x:0,y:0,width:r,height:a}})),i.top,i.top+i.height,t)},Jxe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:vn.grid};function gA(e){var t=zO(),n=$O(),r=s6(),a=lr(lr({},bn(e,Jxe)),{},{x:_e(e.x)?e.x:r.left,y:_e(e.y)?e.y:r.top,width:_e(e.width)?e.width:r.width,height:_e(e.height)?e.height:r.height}),{xAxisId:i,yAxisId:s,x:c,y:u,width:f,height:m,syncWithTicks:d,horizontalValues:p,verticalValues:b}=a,w=dr(),x=Ae(D=>xI(D,"xAxis",i,w)),S=Ae(D=>xI(D,"yAxis",s,w));if(!Pi(f)||!Pi(m)||!_e(c)||!_e(u))return null;var E=a.verticalCoordinatesGenerator||Qxe,C=a.horizontalCoordinatesGenerator||Zxe,{horizontalPoints:O,verticalPoints:A}=a;if((!O||!O.length)&&typeof C=="function"){var T=p&&p.length,N=C({yAxis:S?lr(lr({},S),{},{ticks:T?p:S.ticks}):void 0,width:t??f,height:n??m,offset:r},T?!0:d);ay(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(O=N)}if((!A||!A.length)&&typeof E=="function"){var P=b&&b.length,k=E({xAxis:x?lr(lr({},x),{},{ticks:P?b:x.ticks}):void 0,width:t??f,height:n??m,offset:r},P?!0:d);ay(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(A=k)}return y.createElement(Lr,{zIndex:a.zIndex},y.createElement("g",{className:"recharts-cartesian-grid"},y.createElement(Vxe,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),y.createElement(Gxe,Jl({},a,{horizontalPoints:O})),y.createElement(Wxe,Jl({},a,{verticalPoints:A})),y.createElement(Yxe,Jl({},a,{offset:r,horizontalPoints:O,xAxis:x,yAxis:S})),y.createElement(Xxe,Jl({},a,{offset:r,verticalPoints:A,xAxis:x,yAxis:S}))))}gA.displayName="CartesianGrid";var ewe={},bF=fr({name:"errorBars",initialState:ewe,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:a}=t.payload;e[n]&&(e[n]=e[n].map(i=>i.dataKey===r.dataKey&&i.direction===r.direction?a:i))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(a=>a.dataKey!==r.dataKey||a.direction!==r.direction))}}}),{addErrorBar:v2e,replaceErrorBar:g2e,removeErrorBar:y2e}=bF.actions,twe=bF.reducer,nwe=["children"];function rwe(e,t){if(e==null)return{};var n,r,a=awe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function awe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var iwe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},owe=y.createContext(iwe);function xF(e){var{children:t}=e,n=rwe(e,nwe);return y.createElement(owe.Provider,{value:n},t)}function yA(e,t){var n,r,a=Ae(f=>qo(f,e)),i=Ae(f=>Ko(f,t)),s=(n=a==null?void 0:a.allowDataOverflow)!==null&&n!==void 0?n:_n.allowDataOverflow,c=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:jn.allowDataOverflow,u=s||c;return{needClip:u,needClipX:s,needClipY:c}}function wF(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,a=mA(),{needClipX:i,needClipY:s,needClip:c}=yA(t,n);if(!c||!a)return null;var{x:u,y:f,width:m,height:d}=a;return y.createElement("clipPath",{id:"clipPath-".concat(r)},y.createElement("rect",{x:i?u:u-m/2,y:s?f:f-d/2,width:i?m:m*2,height:s?d:d*2}))}var SF=(e,t,n,r)=>il(e,"xAxis",t,r),EF=(e,t,n,r)=>al(e,"xAxis",t,r),_F=(e,t,n,r)=>il(e,"yAxis",n,r),jF=(e,t,n,r)=>al(e,"yAxis",n,r),swe=oe([ft,SF,_F,EF,jF],(e,t,n,r,a)=>$o(e,"xAxis")?Of(t,r,!1):Of(n,a,!1)),lwe=(e,t,n,r,a)=>a;function cwe(e){return e.type==="line"}var uwe=oe([eb,lwe],(e,t)=>e.filter(cwe).find(n=>n.id===t)),fwe=oe([ft,SF,_F,EF,jF,uwe,swe,FO],(e,t,n,r,a,i,s,c)=>{var{chartData:u,dataStartIndex:f,dataEndIndex:m}=c;if(!(i==null||t==null||n==null||r==null||a==null||r.length===0||a.length===0||s==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:d,data:p}=i,b;if(p!=null&&p.length>0?b=p:b=u==null?void 0:u.slice(f,m+1),b!=null)return Mwe({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:a,dataKey:d,bandSize:s,displayedData:b})}});function dwe(e){var t=Sc(e),n=3,r=2;if(t!=null){var{r:a,strokeWidth:i}=t,s=Number(a),c=Number(i);return(Number.isNaN(s)||s<0)&&(s=n),(Number.isNaN(c)||c<0)&&(c=r),{r:s,strokeWidth:c}}return{r:n,strokeWidth:r}}var hwe=["id"],mwe=["type","layout","connectNulls","needClip","shape"],pwe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jh.apply(null,arguments)}function AL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AL(Object(n),!0).forEach(function(r){vwe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vwe(e,t,n){return(t=gwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gwe(e){var t=ywe(e,"string");return typeof t=="symbol"?t:t+""}function ywe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bA(e,t){if(e==null)return{};var n,r,a=bwe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function bwe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var xwe=e=>{var{dataKey:t,name:n,stroke:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:Zf(n,t),payload:e}]},wwe=y.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:a,fill:i,name:s,hide:c,unit:u,tooltipType:f,id:m}=e,d={dataDefinedOnItem:n,getPosition:hl,settings:{stroke:r,strokeWidth:a,fill:i,dataKey:t,nameKey:void 0,name:Zf(s,t),hide:c,type:f,color:r,unit:u,graphicalItemId:m}};return y.createElement(dA,{tooltipEntrySettings:d})}),OF=(e,t)=>"".concat(t,"px ").concat(e,"px");function Swe(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],a=0;a<t;++a)r.push(...n);return r}var Ewe=(e,t,n)=>{var r=n.reduce((p,b)=>p+b,0);if(!r)return OF(t,e);for(var a=Math.floor(e/r),i=e%r,s=[],c=0,u=0;c<n.length;u+=(f=n[c])!==null&&f!==void 0?f:0,++c){var f,m=n[c];if(m!=null&&u+m>i){s=[...n.slice(0,c),i-u];break}}var d=s.length%2===0?[0,t]:[t];return[...Swe(n,a),...s,...d].map(p=>"".concat(p,"px")).join(", ")};function _we(e){var{clipPathId:t,points:n,props:r}=e,{dot:a,dataKey:i,needClip:s}=r,{id:c}=r,u=bA(r,hwe),f=ta(u);return y.createElement(Obe,{points:n,dot:a,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:f,needClip:s,clipPathId:t})}function jwe(e){var{showLabels:t,children:n,points:r}=e,a=y.useMemo(()=>r==null?void 0:r.map(i=>{var s,c,u={x:(s=i.x)!==null&&s!==void 0?s:0,y:(c=i.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return xi(xi({},u),{},{value:i.value,payload:i.payload,viewBox:u,parentViewBox:void 0,fill:void 0})}),[r]);return y.createElement(QH,{value:t?a:void 0},n)}function NL(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:a,props:i}=e,{type:s,layout:c,connectNulls:u,needClip:f,shape:m}=i,d=bA(i,mwe),p=xi(xi({},br(d)),{},{fill:"none",className:"recharts-line-curve",clipPath:f?"url(#clipPath-".concat(t,")"):void 0,points:r,type:s,layout:c,connectNulls:u,strokeDasharray:a??i.strokeDasharray});return y.createElement(y.Fragment,null,(r==null?void 0:r.length)>1&&y.createElement(lA,Jh({shapeType:"curve",option:m},p,{pathRef:n})),y.createElement(_we,{points:r,clipPathId:t,props:i}))}function Owe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Cwe(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:a,longestAnimatedLengthRef:i}=e,{points:s,strokeDasharray:c,isAnimationActive:u,animationBegin:f,animationDuration:m,animationEasing:d,animateNewValues:p,width:b,height:w,onAnimationEnd:x,onAnimationStart:S}=n,E=a.current,C=zm(s,"recharts-line-"),O=y.useRef(C),[A,T]=y.useState(!1),N=!A,P=y.useCallback(()=>{typeof x=="function"&&x(),T(!1)},[x]),k=y.useCallback(()=>{typeof S=="function"&&S(),T(!0)},[S]),D=Owe(r.current),K=y.useRef(0);O.current!==C&&(K.current=i.current,O.current=C);var B=K.current;return y.createElement(jwe,{points:s,showLabels:N},n.children,y.createElement(Lm,{animationId:C,begin:f,duration:m,isActive:u,easing:d,onAnimationEnd:P,onAnimationStart:k,key:C},I=>{var W=$t(B,D+B,I),z=Math.min(W,D),V;if(u)if(c){var R="".concat(c).split(/[,\s]+/gim).map(F=>parseFloat(F));V=Ewe(z,D,R)}else V=OF(D,z);else V=c==null?void 0:String(c);if(I>0&&D>0&&(a.current=s,i.current=Math.max(i.current,z)),E){var H=E.length/s.length,q=I===1?s:s.map((F,Y)=>{var $=Math.floor(Y*H);if(E[$]){var L=E[$];return xi(xi({},F),{},{x:$t(L.x,F.x,I),y:$t(L.y,F.y,I)})}return p?xi(xi({},F),{},{x:$t(b*2,F.x,I),y:$t(w/2,F.y,I)}):xi(xi({},F),{},{x:F.x,y:F.y})});return a.current=q,y.createElement(NL,{props:n,points:q,clipPathId:t,pathRef:r,strokeDasharray:V})}return y.createElement(NL,{props:n,points:s,clipPathId:t,pathRef:r,strokeDasharray:V})}),y.createElement(aA,{label:n.label}))}function Awe(e){var{clipPathId:t,props:n}=e,r=y.useRef(null),a=y.useRef(0),i=y.useRef(null);return y.createElement(Cwe,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:a,pathRef:i})}var Nwe=(e,t)=>{var n,r;return{x:(n=e.x)!==null&&n!==void 0?n:void 0,y:(r=e.y)!==null&&r!==void 0?r:void 0,value:e.value,errorVal:St(e.payload,t)}};class Twe extends y.Component{render(){var{hide:t,dot:n,points:r,className:a,xAxisId:i,yAxisId:s,top:c,left:u,width:f,height:m,id:d,needClip:p,zIndex:b}=this.props;if(t)return null;var w=st("recharts-line",a),x=d,{r:S,strokeWidth:E}=dwe(n),C=oF(n),O=S*2+E,A=p?"url(#clipPath-".concat(C?"":"dots-").concat(x,")"):void 0;return y.createElement(Lr,{zIndex:b},y.createElement(Cn,{className:w},p&&y.createElement("defs",null,y.createElement(wF,{clipPathId:x,xAxisId:i,yAxisId:s}),!C&&y.createElement("clipPath",{id:"clipPath-dots-".concat(x)},y.createElement("rect",{x:u-O/2,y:c-O/2,width:f+O,height:m+O}))),y.createElement(xF,{xAxisId:i,yAxisId:s,data:r,dataPointFormatter:Nwe,errorBarOffset:0},y.createElement(Awe,{props:this.props,clipPathId:x}))),y.createElement(Vbe,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}var CF={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:vn.line,type:"linear"};function Pwe(e){var t=bn(e,CF),{activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,connectNulls:c,dot:u,hide:f,isAnimationActive:m,label:d,legendType:p,xAxisId:b,yAxisId:w,id:x}=t,S=bA(t,pwe),{needClip:E}=yA(b,w),C=mA(),O=Vc(),A=dr(),T=Ae(K=>fwe(K,b,w,A,x));if(O!=="horizontal"&&O!=="vertical"||T==null||C==null)return null;var{height:N,width:P,x:k,y:D}=C;return y.createElement(Twe,Jh({},S,{id:x,connectNulls:c,dot:u,activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,isAnimationActive:m,hide:f,label:d,legendType:p,xAxisId:b,yAxisId:w,points:T,layout:O,height:N,width:P,left:k,top:D,needClip:E}))}function Mwe(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,dataKey:s,bandSize:c,displayedData:u}=e;return u.map((f,m)=>{var d=St(f,s);if(t==="horizontal"){var p=fk({axis:n,ticks:a,bandSize:c,entry:f,index:m}),b=Ht(d)?null:r.scale.map(d);return{x:p,y:b??null,value:d,payload:f}}var w=Ht(d)?null:n.scale.map(d),x=fk({axis:r,ticks:i,bandSize:c,entry:f,index:m});return w==null||x==null?null:{x:w,y:x,value:d,payload:f}}).filter(Boolean)}function Rwe(e){var t=bn(e,CF),n=dr();return y.createElement(hA,{id:t.id,type:"line"},r=>y.createElement(y.Fragment,null,y.createElement(sF,{legendPayload:xwe(t)}),y.createElement(wwe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:r}),y.createElement(cF,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),y.createElement(Pwe,Jh({},t,{id:r}))))}var AF=y.memo(Rwe,Jf);AF.displayName="Line";function Gc(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.xAxisId)!==null&&n!==void 0?n:fF}function Wc(e,t){var n,r;return(n=(r=e.graphicalItems.cartesianItems.find(a=>a.id===t))===null||r===void 0?void 0:r.yAxisId)!==null&&n!==void 0?n:fF}var kwe="Invariant failed";function Dwe(e,t){throw new Error(kwe)}function R_(){return R_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R_.apply(null,arguments)}function xA(e){return y.createElement(lA,R_({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var Iwe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,a)=>{if(_e(t))return t;var i=_e(r)||Ht(r);return i?t(r,a):(i||Dwe(),n)}},Lwe=(e,t,n)=>n,zwe=(e,t)=>t,Zm=oe([eb,zwe],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),$we=oe([Zm],e=>e==null?void 0:e.maxBarSize),Bwe=(e,t,n,r)=>r,Uwe=oe([ft,eb,Gc,Wc,Lwe],(e,t,n,r,a)=>t.filter(i=>e==="horizontal"?i.xAxisId===n:i.yAxisId===r).filter(i=>i.isPanorama===a).filter(i=>i.hide===!1).filter(i=>i.type==="bar")),Hwe=(e,t,n)=>{var r=ft(e),a=Gc(e,t),i=Wc(e,t);if(!(a==null||i==null))return r==="horizontal"?C_(e,"yAxis",i,n):C_(e,"xAxis",a,n)},Fwe=(e,t)=>{var n=ft(e),r=Gc(e,t),a=Wc(e,t);if(!(r==null||a==null))return n==="horizontal"?bI(e,"xAxis",r):bI(e,"yAxis",a)},qwe=oe([Uwe,Mfe,Fwe],Ybe),Kwe=(e,t,n)=>{var r,a,i=Zm(e,t);if(i==null)return 0;var s=Gc(e,t),c=Wc(e,t);if(s==null||c==null)return 0;var u=ft(e),f=q6(e),{maxBarSize:m}=i,d=Ht(m)?f:m,p,b;return u==="horizontal"?(p=il(e,"xAxis",s,n),b=al(e,"xAxis",s,n)):(p=il(e,"yAxis",c,n),b=al(e,"yAxis",c,n)),(r=(a=Of(p,b,!0))!==null&&a!==void 0?a:d)!==null&&r!==void 0?r:0},NF=(e,t,n)=>{var r=ft(e),a=Gc(e,t),i=Wc(e,t);if(!(a==null||i==null)){var s,c;return r==="horizontal"?(s=il(e,"xAxis",a,n),c=al(e,"xAxis",a,n)):(s=il(e,"yAxis",i,n),c=al(e,"yAxis",i,n)),Of(s,c)}},Vwe=oe([qwe,q6,Pfe,K6,Kwe,NF,$we],Zbe),Ywe=(e,t,n)=>{var r=Gc(e,t);if(r!=null)return il(e,"xAxis",r,n)},Xwe=(e,t,n)=>{var r=Wc(e,t);if(r!=null)return il(e,"yAxis",r,n)},Gwe=(e,t,n)=>{var r=Gc(e,t);if(r!=null)return al(e,"xAxis",r,n)},Wwe=(e,t,n)=>{var r=Wc(e,t);if(r!=null)return al(e,"yAxis",r,n)},Qwe=oe([Vwe,Zm],exe),Zwe=oe([Hwe,Zm],Jbe),Jwe=oe([An,kO,Ywe,Xwe,Gwe,Wwe,Qwe,ft,jfe,NF,Zwe,Zm,Bwe],(e,t,n,r,a,i,s,c,u,f,m,d,p)=>{var{chartData:b,dataStartIndex:w,dataEndIndex:x}=u;if(!(d==null||s==null||t==null||c!=="horizontal"&&c!=="vertical"||n==null||r==null||a==null||i==null||f==null)){var{data:S}=d,E;if(S!=null&&S.length>0?E=S:E=b==null?void 0:b.slice(w,x+1),E!=null)return C1e({layout:c,barSettings:d,pos:s,parentViewBox:t,bandSize:f,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,stackedData:m,displayedData:E,offset:e,cells:p,dataStartIndex:w})}}),e1e=["index"];function k_(){return k_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},k_.apply(null,arguments)}function t1e(e,t){if(e==null)return{};var n,r,a=n1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function n1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var TF=y.createContext(void 0),r1e=e=>{var t=y.useContext(TF);if(t!=null)return t.stackId;if(e!=null)return _le(e)},a1e=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),i1e=e=>{var t=y.useContext(TF);if(t!=null){var{stackId:n}=t;return"url(#".concat(a1e(n,e),")")}},PF=e=>{var{index:t}=e,n=t1e(e,e1e),r=i1e(t);return y.createElement(Cn,k_({className:"recharts-bar-stack-layer",clipPath:r},n))},o1e=["onMouseEnter","onMouseLeave","onClick"],s1e=["value","background","tooltipPosition"],l1e=["id"],c1e=["onMouseEnter","onClick","onMouseLeave"];function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ll.apply(null,arguments)}function TL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TL(Object(n),!0).forEach(function(r){u1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u1e(e,t,n){return(t=f1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f1e(e){var t=d1e(e,"string");return typeof t=="symbol"?t:t+""}function d1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ky(e,t){if(e==null)return{};var n,r,a=h1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function h1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var m1e=e=>{var{dataKey:t,name:n,fill:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:Zf(n,t),payload:e}]},p1e=y.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:r,fill:a,name:i,hide:s,unit:c,tooltipType:u,id:f}=e,m={dataDefinedOnItem:void 0,getPosition:hl,settings:{stroke:n,strokeWidth:r,fill:a,dataKey:t,nameKey:void 0,name:Zf(i,t),hide:s,type:u,color:a,unit:c,graphicalItemId:f}};return y.createElement(dA,{tooltipEntrySettings:m})});function v1e(e){var t=Ae(ol),{data:n,dataKey:r,background:a,allOtherBarProps:i}=e,{onMouseEnter:s,onMouseLeave:c,onClick:u}=i,f=ky(i,o1e),m=cA(s,r,i.id),d=uA(c),p=fA(u,r,i.id);if(!a||n==null)return null;var b=Sc(a);return y.createElement(Lr,{zIndex:txe(a,vn.barBackground)},n.map((w,x)=>{var{value:S,background:E,tooltipPosition:C}=w,O=ky(w,s1e);if(!E)return null;var A=m(w,x),T=d(w,x),N=p(w,x),P=gr(gr(gr(gr(gr({option:a,isActive:String(x)===t},O),{},{fill:"#eee"},E),b),Tm(f,w,x)),{},{onMouseEnter:A,onMouseLeave:T,onClick:N,dataKey:r,index:x,className:"recharts-bar-background-rectangle"});return y.createElement(xA,ll({key:"background-bar-".concat(x)},P))}))}function g1e(e){var{showLabels:t,children:n,rects:r}=e,a=r==null?void 0:r.map(i=>{var s={x:i.x,y:i.y,width:i.width,lowerWidth:i.width,upperWidth:i.width,height:i.height};return gr(gr({},s),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:s,fill:i.fill})});return y.createElement(QH,{value:t?a:void 0},n)}function y1e(e){var{shape:t,activeBar:n,baseProps:r,entry:a,index:i,dataKey:s}=e,c=Ae(ol),u=Ae(QC),f=n&&String(a.originalDataIndex)===c&&(u==null||s===u),[m,d]=y.useState(!1),[p,b]=y.useState(!1);y.useEffect(()=>{var O;return f?(d(!0),O=requestAnimationFrame(()=>{b(!0)})):b(!1),()=>{cancelAnimationFrame(O)}},[f]);var w=y.useCallback(()=>{f||d(!1)},[f]),x=f&&p,S=f||m,E;f?n===!0?E=t:E=n:E=t;var C=y.createElement(xA,ll({},r,{name:String(r.name)},a,{isActive:x,option:E,index:i,dataKey:s,onTransitionEnd:w}));return S?y.createElement(Lr,{zIndex:vn.activeBar},y.createElement(PF,{index:a.originalDataIndex},C)):C}function b1e(e){var{shape:t,baseProps:n,entry:r,index:a,dataKey:i}=e;return y.createElement(xA,ll({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:a,dataKey:i}))}function x1e(e){var t,{data:n,props:r}=e,a=(t=ta(r))!==null&&t!==void 0?t:{},{id:i}=a,s=ky(a,l1e),{shape:c,dataKey:u,activeBar:f}=r,{onMouseEnter:m,onClick:d,onMouseLeave:p}=r,b=ky(r,c1e),w=cA(m,u,i),x=uA(p),S=fA(d,u,i);return n?y.createElement(y.Fragment,null,n.map((E,C)=>y.createElement(PF,ll({index:E.originalDataIndex,key:"rectangle-".concat(E==null?void 0:E.x,"-").concat(E==null?void 0:E.y,"-").concat(E==null?void 0:E.value,"-").concat(C),className:"recharts-bar-rectangle"},Tm(b,E,C),{onMouseEnter:w(E,C),onMouseLeave:x(E,C),onClick:S(E,C)}),f?y.createElement(y1e,{shape:c,activeBar:f,baseProps:s,entry:E,index:C,dataKey:u}):y.createElement(b1e,{shape:c,baseProps:s,entry:E,index:C,dataKey:u})))):null}function w1e(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:a,isAnimationActive:i,animationBegin:s,animationDuration:c,animationEasing:u,onAnimationEnd:f,onAnimationStart:m}=t,d=n.current,p=zm(t,"recharts-bar-"),[b,w]=y.useState(!1),x=!b,S=y.useCallback(()=>{typeof f=="function"&&f(),w(!1)},[f]),E=y.useCallback(()=>{typeof m=="function"&&m(),w(!0)},[m]);return y.createElement(g1e,{showLabels:x,rects:r},y.createElement(Lm,{animationId:p,begin:s,duration:c,isActive:i,easing:u,onAnimationEnd:S,onAnimationStart:E,key:p},C=>{var O=C===1?r:r==null?void 0:r.map((A,T)=>{var N=d&&d[T];if(N)return gr(gr({},A),{},{x:$t(N.x,A.x,C),y:$t(N.y,A.y,C),width:$t(N.width,A.width,C),height:$t(N.height,A.height,C)});if(a==="horizontal"){var P=$t(0,A.height,C),k=$t(A.stackedBarStart,A.y,C);return gr(gr({},A),{},{y:k,height:P})}var D=$t(0,A.width,C),K=$t(A.stackedBarStart,A.x,C);return gr(gr({},A),{},{width:D,x:K})});return C>0&&(n.current=O??null),O==null?null:y.createElement(Cn,null,y.createElement(x1e,{props:t,data:O}))}),y.createElement(aA,{label:t.label}),t.children)}function S1e(e){var t=y.useRef(null);return y.createElement(w1e,{previousRectanglesRef:t,props:e})}var MF=0,E1e=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:St(e,t)}};class _1e extends y.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:a,xAxisId:i,yAxisId:s,needClip:c,background:u,id:f}=this.props;if(t||n==null)return null;var m=st("recharts-bar",a),d=f;return y.createElement(Cn,{className:m,id:f},c&&y.createElement("defs",null,y.createElement(wF,{clipPathId:d,xAxisId:i,yAxisId:s})),y.createElement(Cn,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(d,")"):void 0},y.createElement(v1e,{data:n,dataKey:r,background:u,allOtherBarProps:this.props}),y.createElement(S1e,this.props)))}}var j1e={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:MF,xAxisId:0,yAxisId:0,zIndex:vn.bar};function O1e(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:c,animationDuration:u,animationEasing:f,isAnimationActive:m}=e,{needClip:d}=yA(t,n),p=Vc(),b=dr(),w=sA(e.children,Qm),x=Ae(C=>Jwe(C,e.id,b,w));if(p!=="vertical"&&p!=="horizontal")return null;var S,E=x==null?void 0:x[0];return E==null||E.height==null||E.width==null?S=0:S=p==="vertical"?E.height/2:E.width/2,y.createElement(xF,{xAxisId:t,yAxisId:n,data:x,dataPointFormatter:E1e,errorBarOffset:S},y.createElement(_1e,ll({},e,{layout:p,needClip:d,data:x,xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:c,animationDuration:u,animationEasing:f,isAnimationActive:m})))}function C1e(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:a},pos:i,bandSize:s,xAxis:c,yAxis:u,xAxisTicks:f,yAxisTicks:m,stackedData:d,displayedData:p,offset:b,cells:w,parentViewBox:x,dataStartIndex:S}=e,E=t==="horizontal"?u:c,C=d?E.scale.domain():null,O=jle({numericAxis:E}),A=E.scale.map(O);return p.map((T,N)=>{var P,k,D,K,B,I;if(d){var W=d[N+S];if(W==null)return null;P=ble(W,C)}else P=St(T,n),Array.isArray(P)||(P=[O,P]);var z=Iwe(r,MF)(P[1],N);if(t==="horizontal"){var V,R=u.scale.map(P[0]),H=u.scale.map(P[1]);if(R==null||H==null)return null;k=dk({axis:c,ticks:f,bandSize:s,offset:i.offset,entry:T,index:N}),D=(V=H??R)!==null&&V!==void 0?V:void 0,K=i.size;var q=R-H;if(B=Ni(q)?0:q,I={x:k,y:b.top,width:K,height:b.height},Math.abs(z)>0&&Math.abs(B)<Math.abs(z)){var F=Ln(B||z)*(Math.abs(z)-Math.abs(B));D-=F,B+=F}}else{var Y=c.scale.map(P[0]),$=c.scale.map(P[1]);if(Y==null||$==null)return null;if(k=Y,D=dk({axis:u,ticks:m,bandSize:s,offset:i.offset,entry:T,index:N}),K=$-Y,B=i.size,I={x:b.left,y:D,width:b.width,height:B},Math.abs(z)>0&&Math.abs(K)<Math.abs(z)){var L=Ln(K||z)*(Math.abs(z)-Math.abs(K));K+=L}}if(k==null||D==null||K==null||B==null||!a&&(K===0||B===0))return null;var G=gr(gr({},T),{},{stackedBarStart:A,x:k,y:D,width:K,height:B,value:d?P:P[1],payload:T,background:I,tooltipPosition:{x:k+K/2,y:D+B/2},parentViewBox:x,originalDataIndex:N},w&&w[N]&&w[N].props);return G}).filter(Boolean)}function A1e(e){var t=bn(e,j1e),n=r1e(t.stackId),r=dr();return y.createElement(hA,{id:t.id,type:"bar"},a=>y.createElement(y.Fragment,null,y.createElement(sF,{legendPayload:m1e(t)}),y.createElement(p1e,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:a}),y.createElement(cF,{type:"bar",id:a,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:n,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r,hasCustomShape:t.shape!=null}),y.createElement(Lr,{zIndex:t.zIndex},y.createElement(O1e,ll({},t,{id:a})))))}var D_=y.memo(A1e,Jf);D_.displayName="Bar";var N1e=["domain","range"],T1e=["domain","range"];function PL(e,t){if(e==null)return{};var n,r,a=P1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function P1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function ML(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function RF(e,t){if(e===t)return!0;var{domain:n,range:r}=e,a=PL(e,N1e),{domain:i,range:s}=t,c=PL(t,T1e);return!ML(n,i)||!ML(r,s)?!1:Jf(a,c)}var M1e=["type"],R1e=["dangerouslySetInnerHTML","ticks","scale"],k1e=["id","scale"];function I_(){return I_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I_.apply(null,arguments)}function RL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function kL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RL(Object(n),!0).forEach(function(r){D1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function D1e(e,t,n){return(t=I1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I1e(e){var t=L1e(e,"string");return typeof t=="symbol"?t:t+""}function L1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function L_(e,t){if(e==null)return{};var n,r,a=z1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function z1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $1e(e){var t=_t(),n=y.useRef(null),r=l6(),{type:a}=e,i=L_(e,M1e),s=F0(r,"xAxis",a),c=y.useMemo(()=>{if(s!=null)return kL(kL({},i),{},{type:s})},[i,s]);return y.useLayoutEffect(()=>{c!=null&&(n.current===null?t(Pbe(c)):n.current!==c&&t(Mbe({prev:n.current,next:c})),n.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{n.current&&(t(Rbe(n.current)),n.current=null)},[t]),null}var B1e=e=>{var{xAxisId:t,className:n}=e,r=Ae(kO),a=dr(),i="xAxis",s=Ae(E=>sH(E,i,t,a)),c=Ae(E=>aH(E,t)),u=Ae(E=>gpe(E,t)),f=Ae(E=>$U(E,t));if(c==null||u==null||f==null)return null;var{dangerouslySetInnerHTML:m,ticks:d,scale:p}=e,b=L_(e,R1e),{id:w,scale:x}=f,S=L_(f,k1e);return y.createElement(vA,I_({},b,S,{x:u.x,y:u.y,width:c.width,height:c.height,className:st("recharts-".concat(i," ").concat(i),n),viewBox:r,ticks:s,axisType:i,axisId:t}))},U1e={allowDataOverflow:_n.allowDataOverflow,allowDecimals:_n.allowDecimals,allowDuplicatedCategory:_n.allowDuplicatedCategory,angle:_n.angle,axisLine:Oo.axisLine,height:_n.height,hide:!1,includeHidden:_n.includeHidden,interval:_n.interval,label:!1,minTickGap:_n.minTickGap,mirror:_n.mirror,orientation:_n.orientation,padding:_n.padding,reversed:_n.reversed,scale:_n.scale,tick:_n.tick,tickCount:_n.tickCount,tickLine:Oo.tickLine,tickSize:Oo.tickSize,type:_n.type,niceTicks:_n.niceTicks,xAxisId:0},H1e=e=>{var t=bn(e,U1e);return y.createElement(y.Fragment,null,y.createElement($1e,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),y.createElement(B1e,t))},wA=y.memo(H1e,RF);wA.displayName="XAxis";var F1e=["type"],q1e=["dangerouslySetInnerHTML","ticks","scale"],K1e=["id","scale"];function z_(){return z_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z_.apply(null,arguments)}function DL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function IL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DL(Object(n),!0).forEach(function(r){V1e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V1e(e,t,n){return(t=Y1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y1e(e){var t=X1e(e,"string");return typeof t=="symbol"?t:t+""}function X1e(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $_(e,t){if(e==null)return{};var n,r,a=G1e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function G1e(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function W1e(e){var t=_t(),n=y.useRef(null),r=l6(),{type:a}=e,i=$_(e,F1e),s=F0(r,"yAxis",a),c=y.useMemo(()=>{if(s!=null)return IL(IL({},i),{},{type:s})},[s,i]);return y.useLayoutEffect(()=>{c!=null&&(n.current===null?t(kbe(c)):n.current!==c&&t(Dbe({prev:n.current,next:c})),n.current=c)},[c,t]),y.useLayoutEffect(()=>()=>{n.current&&(t(Ibe(n.current)),n.current=null)},[t]),null}function Q1e(e){var{yAxisId:t,className:n,width:r,label:a}=e,i=y.useRef(null),s=y.useRef(null),c=Ae(kO),u=dr(),f=_t(),m="yAxis",d=Ae(N=>iH(N,t)),p=Ae(N=>bpe(N,t)),b=Ae(N=>sH(N,m,t,u)),w=Ae(N=>BU(N,t));if(y.useLayoutEffect(()=>{if(!(r!=="auto"||!d||rA(a)||y.isValidElement(a)||w==null)){var N=i.current;if(N){var P=N.getCalculatedWidth();Math.round(d.width)!==Math.round(P)&&f(Lbe({id:t,width:P}))}}},[b,d,f,a,t,r,w]),d==null||p==null||w==null)return null;var{dangerouslySetInnerHTML:x,ticks:S,scale:E}=e,C=$_(e,q1e),{id:O,scale:A}=w,T=$_(w,K1e);return y.createElement(vA,z_({},C,T,{ref:i,labelRef:s,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:d.width,height:d.height,className:st("recharts-".concat(m," ").concat(m),n),viewBox:c,ticks:b,axisType:m,axisId:t}))}var Z1e={allowDataOverflow:jn.allowDataOverflow,allowDecimals:jn.allowDecimals,allowDuplicatedCategory:jn.allowDuplicatedCategory,angle:jn.angle,axisLine:Oo.axisLine,hide:!1,includeHidden:jn.includeHidden,interval:jn.interval,label:!1,minTickGap:jn.minTickGap,mirror:jn.mirror,orientation:jn.orientation,padding:jn.padding,reversed:jn.reversed,scale:jn.scale,tick:jn.tick,tickCount:jn.tickCount,tickLine:Oo.tickLine,tickSize:Oo.tickSize,type:jn.type,niceTicks:jn.niceTicks,width:jn.width,yAxisId:0},J1e=e=>{var t=bn(e,Z1e);return y.createElement(y.Fragment,null,y.createElement(W1e,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),y.createElement(Q1e,t))},SA=y.memo(J1e,RF);SA.displayName="YAxis";var eSe=(e,t)=>t,EA=oe([eSe,ft,Z6,Un,_H,Vo,Uve,An],Xve);function tSe(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function _A(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(tSe(e)){var a=e.currentTarget.getBBox();n=a.width>0?t.width/a.width:1,r=a.height>0?t.height/a.height:1}else{var i=e.currentTarget;n=i.offsetWidth>0?t.width/i.offsetWidth:1,r=i.offsetHeight>0?t.height/i.offsetHeight:1}var s=(c,u)=>({relativeX:Math.round((c-t.left)/n),relativeY:Math.round((u-t.top)/r)});return"touches"in e?Array.from(e.touches).map(c=>s(c.clientX,c.clientY)):s(e.clientX,e.clientY)}var kF=na("mouseClick"),DF=Mm();DF.startListening({actionCreator:kF,effect:(e,t)=>{var n=e.payload,r=EA(t.getState(),_A(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(Dpe({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var B_=na("mouseMove"),IF=Mm(),Uu=null,Ul=null,zS=null;IF.startListening({actionCreator:B_,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s=i==="all"||(i==null?void 0:i.includes("mousemove"));Uu!==null&&(cancelAnimationFrame(Uu),Uu=null),Ul!==null&&(typeof a!="number"||!s)&&(clearTimeout(Ul),Ul=null),zS=_A(n);var c=()=>{var u=t.getState(),f=KC(u,u.tooltip.settings.shared);if(!zS){Uu=null,Ul=null;return}if(f==="axis"){var m=EA(u,zS);(m==null?void 0:m.activeIndex)!=null?t.dispatch(pH({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(mH())}Uu=null,Ul=null};if(!s){c();return}a==="raf"?Uu=requestAnimationFrame(c):typeof a=="number"&&Ul===null&&(Ul=setTimeout(c,a))}});function nSe(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var LL={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},LF=fr({name:"rootProps",initialState:LL,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:LL.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),rSe=LF.reducer,{updateOptions:aSe}=LF.actions,iSe=null,oSe={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},zF=fr({name:"polarOptions",initialState:iSe,reducers:oSe}),{updatePolarOptions:sSe}=zF.actions,lSe=zF.reducer,$F=na("keyDown"),BF=na("focus"),UF=na("blur"),cb=Mm(),Hu=null,Hl=null,Wv=null;cb.startListening({actionCreator:$F,effect:(e,t)=>{Wv=e.payload,Hu!==null&&(cancelAnimationFrame(Hu),Hu=null);var n=t.getState(),{throttleDelay:r,throttledEvents:a}=n.eventSettings,i=a==="all"||a.includes("keydown");Hl!==null&&(typeof r!="number"||!i)&&(clearTimeout(Hl),Hl=null);var s=()=>{try{var c=t.getState(),u=c.rootProps.accessibilityLayer!==!1;if(!u)return;var{keyboardInteraction:f}=c.tooltip,m=Wv;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var d=VC(f,sd(c),Ym(c),Gm(c)),p=d==null?-1:Number(d);if(!Number.isFinite(p)||p<0)return;var b=Vo(c);if(m==="Enter"){var w=Ay(c,"axis","hover",String(f.index));t.dispatch(Cy({active:!f.active,activeIndex:f.index,activeCoordinate:w}));return}var x=_pe(c),S=x==="left-to-right"?1:-1,E=m==="ArrowRight"?1:-1,C=p+E*S;if(b==null||C>=b.length||C<0)return;var O=Ay(c,"axis","hover",String(C));t.dispatch(Cy({active:!0,activeIndex:C.toString(),activeCoordinate:O}))}finally{Hu=null,Hl=null}};if(!i){s();return}r==="raf"?Hu=requestAnimationFrame(s):typeof r=="number"&&Hl===null&&(s(),Wv=null,Hl=setTimeout(()=>{Wv?s():(Hl=null,Hu=null)},r))}});cb.startListening({actionCreator:BF,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:a}=n.tooltip;if(!a.active&&a.index==null){var i="0",s=Ay(n,"axis","hover",String(i));t.dispatch(Cy({active:!0,activeIndex:i,activeCoordinate:s}))}}}});cb.startListening({actionCreator:UF,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:a}=n.tooltip;a.active&&t.dispatch(Cy({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function HF(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(n,r)=>{if(r==="currentTarget")return t;var a=Reflect.get(n,r);return typeof a=="function"?a.bind(n):a}})}var ya=na("externalEvent"),FF=Mm(),Qv=new Map,vh=new Map,$S=new Map;FF.startListening({actionCreator:ya,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var a=r.type,i=HF(r);$S.set(a,{handler:n,reactEvent:i});var s=Qv.get(a);s!==void 0&&(cancelAnimationFrame(s),Qv.delete(a));var c=t.getState(),{throttleDelay:u,throttledEvents:f}=c.eventSettings,m=f,d=m==="all"||(m==null?void 0:m.includes(a)),p=vh.get(a);p!==void 0&&(typeof u!="number"||!d)&&(clearTimeout(p),vh.delete(a));var b=()=>{var S=$S.get(a);try{if(!S)return;var{handler:E,reactEvent:C}=S,O=t.getState(),A={activeCoordinate:jve(O),activeDataKey:QC(O),activeIndex:ol(O),activeLabel:CH(O),activeTooltipIndex:ol(O),isTooltipActive:Ove(O)};E&&E(A,C)}finally{Qv.delete(a),vh.delete(a),$S.delete(a)}};if(!d){b();return}if(u==="raf"){var w=requestAnimationFrame(b);Qv.set(a,w)}else if(typeof u=="number"){if(!vh.has(a)){b();var x=setTimeout(b,u);vh.set(a,x)}}else b()}}});var cSe=oe([id],e=>e.tooltipItemPayloads),uSe=oe([cSe,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(i=>i.settings.graphicalItemId===n);if(r!=null){var{getPosition:a}=r;if(a!=null)return a(t)}}}),qF=na("touchMove"),KF=Mm(),Fl=null,As=null,zL=null,gh=null;KF.startListening({actionCreator:qF,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){gh=HF(n);var r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s=i==="all"||i.includes("touchmove");Fl!==null&&(cancelAnimationFrame(Fl),Fl=null),As!==null&&(typeof a!="number"||!s)&&(clearTimeout(As),As=null),zL=Array.from(n.touches).map(u=>_A({clientX:u.clientX,clientY:u.clientY,currentTarget:n.currentTarget}));var c=()=>{if(gh!=null){var u=t.getState(),f=KC(u,u.tooltip.settings.shared);if(f==="axis"){var m,d=(m=zL)===null||m===void 0?void 0:m[0];if(d==null){Fl=null,As=null;return}var p=EA(u,d);(p==null?void 0:p.activeIndex)!=null&&t.dispatch(pH({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate}))}else if(f==="item"){var b,w=gh.touches[0];if(document.elementFromPoint==null||w==null)return;var x=document.elementFromPoint(w.clientX,w.clientY);if(!x||!x.getAttribute)return;var S=x.getAttribute(n6),E=(b=x.getAttribute(r6))!==null&&b!==void 0?b:void 0,C=od(u).find(T=>T.id===E);if(S==null||C==null||E==null)return;var{dataKey:O}=C,A=uSe(u,S,E);t.dispatch(hH({activeDataKey:O,activeIndex:S,activeCoordinate:A,activeGraphicalItemId:E}))}Fl=null,As=null}};if(!s){c();return}a==="raf"?Fl=requestAnimationFrame(c):typeof a=="number"&&As===null&&(c(),gh=null,As=setTimeout(()=>{gh?c():(As=null,Fl=null)},a))}}});var jA={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},VF=fr({name:"eventSettings",initialState:jA,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:fSe}=VF.actions,dSe=VF.reducer,hSe=_8({brush:nxe,cartesianAxis:zbe,chartData:jge,errorBars:twe,eventSettings:dSe,graphicalItems:H0e,layout:mle,legend:wce,options:xge,polarAxis:t0e,polarOptions:lSe,referenceElements:oxe,renderedTicks:Exe,rootProps:rSe,tooltip:Ipe,zIndex:lge}),mSe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return $se({reducer:hSe,preloadedState:t,middleware:r=>{var a;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([DF.middleware,IF.middleware,cb.middleware,FF.middleware,KF.middleware])},enhancers:r=>{var a=r;return typeof r=="function"&&(a=r()),a.concat($8({type:"raf"}))},devTools:{serialize:{replacer:nSe},name:"recharts-".concat(n)}})};function YF(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,a=dr(),i=y.useRef(null);if(a)return n;i.current==null&&(i.current=mSe(t,r));var s=CO;return y.createElement(Lce,{context:s,store:i.current},n)}function pSe(e){var{layout:t,margin:n}=e,r=_t(),a=dr();return y.useEffect(()=>{a||(r(fle(t)),r(ule(n)))},[r,a,t,n]),null}var XF=y.memo(pSe,Jf);function GF(e){var t=_t();return y.useEffect(()=>{t(aSe(e))},[t,e]),null}var vSe=e=>{var t=_t();return y.useEffect(()=>{t(fSe(e))},[t,e]),null},WF=y.memo(vSe,Jf);function $L(e){var{zIndex:t,isPanorama:n}=e,r=y.useRef(null),a=_t();return y.useLayoutEffect(()=>(r.current&&a(oge({zIndex:t,element:r.current,isPanorama:n})),()=>{a(sge({zIndex:t,isPanorama:n}))}),[a,t,n]),y.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function BL(e){var{children:t,isPanorama:n}=e,r=Ae(Wve);if(!r||r.length===0)return t;var a=r.filter(s=>s<0),i=r.filter(s=>s>0);return y.createElement(y.Fragment,null,a.map(s=>y.createElement($L,{key:s,zIndex:s,isPanorama:n})),t,i.map(s=>y.createElement($L,{key:s,zIndex:s,isPanorama:n})))}var gSe=["children"];function ySe(e,t){if(e==null)return{};var n,r,a=bSe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function bSe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Dy(){return Dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dy.apply(null,arguments)}var xSe={width:"100%",height:"100%",display:"block"},wSe=y.forwardRef((e,t)=>{var n=zO(),r=$O(),a=S6();if(!Pi(n)||!Pi(r))return null;var{children:i,otherAttributes:s,title:c,desc:u}=e,f,m;return s!=null&&(typeof s.tabIndex=="number"?f=s.tabIndex:f=a?0:void 0,typeof s.role=="string"?m=s.role:m=a?"application":void 0),y.createElement(gO,Dy({},s,{title:c,desc:u,role:m,tabIndex:f,width:n,height:r,style:xSe,ref:t}),i)}),SSe=e=>{var{children:t}=e,n=Ae(I0);if(!n)return null;var{width:r,height:a,y:i,x:s}=n;return y.createElement(gO,{width:r,height:a,x:s,y:i},t)},UL=y.forwardRef((e,t)=>{var{children:n}=e,r=ySe(e,gSe),a=dr();return a?y.createElement(SSe,null,y.createElement(BL,{isPanorama:!0},n)):y.createElement(wSe,Dy({ref:t},r),y.createElement(BL,{isPanorama:!1},n))});function ESe(){var e=_t(),[t,n]=y.useState(null),r=Ae(Ple);return y.useEffect(()=>{if(t!=null){var a=t.getBoundingClientRect(),i=a.width/t.offsetWidth;it(i)&&i!==r&&e(hle(i))}},[t,e,r]),n}function HL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function _Se(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HL(Object(n),!0).forEach(function(r){jSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jSe(e,t,n){return(t=OSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OSe(e){var t=CSe(e,"string");return typeof t=="symbol"?t:t+""}function CSe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qs(){return Qs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qs.apply(null,arguments)}var ASe=()=>(kge(),null);function Iy(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var NSe=y.forwardRef((e,t)=>{var n,r,a=y.useRef(null),[i,s]=y.useState({containerWidth:Iy((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:Iy((r=e.style)===null||r===void 0?void 0:r.height)}),c=y.useCallback((f,m)=>{s(d=>{var p=Math.round(f),b=Math.round(m);return d.containerWidth===p&&d.containerHeight===b?d:{containerWidth:p,containerHeight:b}})},[]),u=y.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null&&typeof ResizeObserver<"u"){var{width:m,height:d}=f.getBoundingClientRect();c(m,d);var p=w=>{var x=w[0];if(x!=null){var{width:S,height:E}=x.contentRect;c(S,E)}},b=new ResizeObserver(p);b.observe(f),a.current=b}},[t,c]);return y.useEffect(()=>()=>{var f=a.current;f!=null&&f.disconnect()},[c]),y.createElement(y.Fragment,null,y.createElement(km,{width:i.containerWidth,height:i.containerHeight}),y.createElement("div",Qs({ref:u},e)))}),TSe=y.forwardRef((e,t)=>{var{width:n,height:r}=e,[a,i]=y.useState({containerWidth:Iy(n),containerHeight:Iy(r)}),s=y.useCallback((u,f)=>{i(m=>{var d=Math.round(u),p=Math.round(f);return m.containerWidth===d&&m.containerHeight===p?m:{containerWidth:d,containerHeight:p}})},[]),c=y.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null){var{width:f,height:m}=u.getBoundingClientRect();s(f,m)}},[t,s]);return y.createElement(y.Fragment,null,y.createElement(km,{width:a.containerWidth,height:a.containerHeight}),y.createElement("div",Qs({ref:c},e)))}),PSe=y.forwardRef((e,t)=>{var{width:n,height:r}=e;return y.createElement(y.Fragment,null,y.createElement(km,{width:n,height:r}),y.createElement("div",Qs({ref:t},e)))}),MSe=y.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?y.createElement(TSe,Qs({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?y.createElement(PSe,Qs({},e,{width:n,height:r,ref:t})):y.createElement(y.Fragment,null,y.createElement(km,{width:n,height:r}),y.createElement("div",Qs({ref:t},e)))});function RSe(e){return e?NSe:MSe}var kSe=y.forwardRef((e,t)=>{var{children:n,className:r,height:a,onClick:i,onContextMenu:s,onDoubleClick:c,onMouseDown:u,onMouseEnter:f,onMouseLeave:m,onMouseMove:d,onMouseUp:p,onTouchEnd:b,onTouchMove:w,onTouchStart:x,style:S,width:E,responsive:C,dispatchTouchEvents:O=!0}=e,A=y.useRef(null),T=_t(),[N,P]=y.useState(null),[k,D]=y.useState(null),K=ESe(),B=DO(),I=(B==null?void 0:B.width)>0?B.width:E,W=(B==null?void 0:B.height)>0?B.height:a,z=y.useCallback(le=>{K(le),typeof t=="function"&&t(le),P(le),D(le),le!=null&&(A.current=le)},[K,t,P,D]),V=y.useCallback(le=>{T(kF(le)),T(ya({handler:i,reactEvent:le}))},[T,i]),R=y.useCallback(le=>{T(B_(le)),T(ya({handler:f,reactEvent:le}))},[T,f]),H=y.useCallback(le=>{T(mH()),T(ya({handler:m,reactEvent:le}))},[T,m]),q=y.useCallback(le=>{T(B_(le)),T(ya({handler:d,reactEvent:le}))},[T,d]),F=y.useCallback(()=>{T(BF())},[T]),Y=y.useCallback(()=>{T(UF())},[T]),$=y.useCallback(le=>{T($F(le.key))},[T]),L=y.useCallback(le=>{T(ya({handler:s,reactEvent:le}))},[T,s]),G=y.useCallback(le=>{T(ya({handler:c,reactEvent:le}))},[T,c]),Z=y.useCallback(le=>{T(ya({handler:u,reactEvent:le}))},[T,u]),J=y.useCallback(le=>{T(ya({handler:p,reactEvent:le}))},[T,p]),se=y.useCallback(le=>{T(ya({handler:x,reactEvent:le}))},[T,x]),ie=y.useCallback(le=>{O&&T(qF(le)),T(ya({handler:w,reactEvent:le}))},[T,O,w]),re=y.useCallback(le=>{T(ya({handler:b,reactEvent:le}))},[T,b]),ee=RSe(C);return y.createElement(DH.Provider,{value:N},y.createElement(zB.Provider,{value:k},y.createElement(ee,{width:I??(S==null?void 0:S.width),height:W??(S==null?void 0:S.height),className:st("recharts-wrapper",r),style:_Se({position:"relative",cursor:"default",width:I,height:W},S),onClick:V,onContextMenu:L,onDoubleClick:G,onFocus:F,onBlur:Y,onKeyDown:$,onMouseDown:Z,onMouseEnter:R,onMouseLeave:H,onMouseMove:q,onMouseUp:J,onTouchEnd:re,onTouchMove:ie,onTouchStart:se,ref:z},y.createElement(ASe,null),n)))}),DSe=["width","height","responsive","children","className","style","compact","title","desc"];function ISe(e,t){if(e==null)return{};var n,r,a=LSe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function LSe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var QF=y.forwardRef((e,t)=>{var{width:n,height:r,responsive:a,children:i,className:s,style:c,compact:u,title:f,desc:m}=e,d=ISe(e,DSe),p=ta(d);return u?y.createElement(y.Fragment,null,y.createElement(km,{width:n,height:r}),y.createElement(UL,{otherAttributes:p,title:f,desc:m},i)):y.createElement(kSe,{className:s,style:c,width:n,height:r,responsive:a??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},y.createElement(UL,{otherAttributes:p,title:f,desc:m,ref:t},y.createElement(lxe,null,i)))});function U_(){return U_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U_.apply(null,arguments)}function FL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function zSe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FL(Object(n),!0).forEach(function(r){$Se(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $Se(e,t,n){return(t=BSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BSe(e){var t=USe(e,"string");return typeof t=="symbol"?t:t+""}function USe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var HSe={top:5,right:5,bottom:5,left:5},FSe=zSe({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:HSe,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},jA),ZF=y.forwardRef(function(t,n){var r,a=bn(t.categoricalChartProps,FSe),{chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:u,categoricalChartProps:f}=t,m={chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:u,eventEmitter:void 0};return y.createElement(YF,{preloadedState:{options:m},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:i},y.createElement(hF,{chartData:f.data}),y.createElement(XF,{layout:a.layout,margin:a.margin}),y.createElement(WF,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),y.createElement(GF,{baseValue:a.baseValue,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),y.createElement(QF,U_({},a,{ref:n})))}),qSe=["axis"],KSe=y.forwardRef((e,t)=>y.createElement(ZF,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:qSe,tooltipPayloadSearcher:nA,categoricalChartProps:e,ref:t})),VSe=["axis","item"],YSe=y.forwardRef((e,t)=>y.createElement(ZF,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:VSe,tooltipPayloadSearcher:nA,categoricalChartProps:e,ref:t}));function XSe(e){var t=_t();return y.useEffect(()=>{t(sSe(e))},[t,e]),null}var GSe=["layout"];function H_(){return H_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H_.apply(null,arguments)}function WSe(e,t){if(e==null)return{};var n,r,a=QSe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function QSe(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function qL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ZSe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qL(Object(n),!0).forEach(function(r){JSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JSe(e,t,n){return(t=eEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eEe(e){var t=tEe(e,"string");return typeof t=="symbol"?t:t+""}function tEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nEe={top:5,right:5,bottom:5,left:5},JF=ZSe({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:nEe,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},jA),rEe=y.forwardRef(function(t,n){var r,a=bn(t.categoricalChartProps,JF),{layout:i}=a,s=WSe(a,GSe),{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:m}=t,d={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:m,eventEmitter:void 0};return y.createElement(YF,{preloadedState:{options:d},reduxStoreName:(r=a.id)!==null&&r!==void 0?r:c},y.createElement(hF,{chartData:a.data}),y.createElement(XF,{layout:i,margin:a.margin}),y.createElement(WF,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),y.createElement(GF,{baseValue:void 0,accessibilityLayer:a.accessibilityLayer,barCategoryGap:a.barCategoryGap,maxBarSize:a.maxBarSize,stackOffset:a.stackOffset,barGap:a.barGap,barSize:a.barSize,syncId:a.syncId,syncMethod:a.syncMethod,className:a.className,reverseStackOrder:a.reverseStackOrder}),y.createElement(XSe,{cx:a.cx,cy:a.cy,startAngle:a.startAngle,endAngle:a.endAngle,innerRadius:a.innerRadius,outerRadius:a.outerRadius}),y.createElement(QF,H_({},s,{ref:n})))});function KL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function VL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KL(Object(n),!0).forEach(function(r){aEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KL(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aEe(e,t,n){return(t=iEe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iEe(e){var t=oEe(e,"string");return typeof t=="symbol"?t:t+""}function oEe(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sEe=["item"],lEe=VL(VL({},JF),{},{layout:"centric",startAngle:0,endAngle:360}),cEe=y.forwardRef((e,t)=>{var n=bn(e,lEe);return y.createElement(rEe,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:sEe,tooltipPayloadSearcher:nA,categoricalChartProps:n,ref:t})});function uEe({completed:e,failed:t}){const n=e+t;if(n===0)return v.jsx("div",{className:"flex h-full items-center justify-center",children:v.jsxs("div",{className:"relative h-32 w-32",children:[v.jsx("svg",{viewBox:"0 0 100 100",className:"h-full w-full",children:v.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"hsl(var(--muted))",strokeWidth:"12"})}),v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("span",{className:"text-sm text-muted-foreground",children:"N/A"})})]})});const r=Math.round(e/n*1e3)/10,a=[{name:"Completed",value:e},{name:"Failed",value:t}],i=["#2e7d32","#c62828"];return v.jsxs("div",{className:"relative flex h-full items-center justify-center",children:[v.jsx(IO,{width:140,height:140,children:v.jsx(cEe,{children:v.jsx(uF,{data:a,cx:"50%",cy:"50%",innerRadius:40,outerRadius:56,dataKey:"value",strokeWidth:0,children:a.map((s,c)=>v.jsx(Qm,{fill:i[c]},c))})})}),v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsxs("span",{className:"text-lg font-semibold",children:[r,"%"]})})]})}function YL(e){return new Date(e+"T00:00:00").toLocaleDateString(void 0,{month:"short",day:"numeric"})}function fEe({data:e}){return e.some(n=>n.total>0)?v.jsx(IO,{width:"100%",height:280,children:v.jsxs(YSe,{data:e,margin:{top:8,right:8,left:-16,bottom:0},children:[v.jsx(gA,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),v.jsx(wA,{dataKey:"date",tickFormatter:YL,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),v.jsx(SA,{allowDecimals:!1,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),v.jsx(zH,{contentStyle:{backgroundColor:"hsl(var(--popover))",color:"hsl(var(--popover-foreground))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:13},labelFormatter:n=>YL(String(n))}),v.jsx(x6,{wrapperStyle:{fontSize:12,paddingTop:8}}),v.jsx(D_,{dataKey:"completed",name:"Completed",stackId:"a",fill:"#2e7d32",radius:[0,0,0,0]}),v.jsx(D_,{dataKey:"failed",name:"Failed",stackId:"a",fill:"#c62828",radius:[2,2,0,0]})]})}):v.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No data"})}function XL(e){return new Date(e+"T00:00:00").toLocaleDateString(void 0,{month:"short",day:"numeric"})}function dEe(e){return e<6e4?`${Math.round(e/1e3)}s`:`${(e/6e4).toFixed(1)}m`}function hEe({data:e}){if(e.filter(r=>r.avg_duration_ms!==null).length===0)return v.jsx("div",{className:"flex h-64 items-center justify-center text-muted-foreground",children:"No data"});const n=e.map(r=>({...r,avg_minutes:r.avg_duration_ms!==null?r.avg_duration_ms/6e4:null}));return v.jsx(IO,{width:"100%",height:280,children:v.jsxs(KSe,{data:n,margin:{top:8,right:8,left:-16,bottom:0},children:[v.jsx(gA,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),v.jsx(wA,{dataKey:"date",tickFormatter:XL,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),v.jsx(SA,{tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,tickFormatter:r=>`${r.toFixed(0)}m`}),v.jsx(zH,{contentStyle:{backgroundColor:"hsl(var(--popover))",color:"hsl(var(--popover-foreground))",border:"1px solid hsl(var(--border))",borderRadius:"6px",fontSize:13},labelFormatter:r=>XL(String(r)),formatter:r=>[dEe(Number(r)*6e4),"Avg Duration"]}),v.jsx(AF,{type:"monotone",dataKey:"avg_minutes",name:"Avg Duration",stroke:"#1565c0",strokeWidth:2,dot:{r:3,fill:"#1565c0"},connectNulls:!0})]})})}const mEe=["7d","30d","90d"];function pEe(e){return e===null?"—":e<6e4?`${Math.round(e/1e3)}s`:`${(e/6e4).toFixed(1)}m`}function vEe({projectId:e}){const[t,n]=y.useState("30d"),{data:r,isLoading:a}=nie(e,t);return a?v.jsxs("div",{className:"space-y-4",children:[v.jsx(tn,{className:"h-8 w-48"}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsx(tn,{className:"h-32"}),v.jsx(tn,{className:"h-32"}),v.jsx(tn,{className:"h-32"})]}),v.jsx(tn,{className:"h-72"})]}):r?v.jsxs("div",{className:"space-y-6",children:[v.jsx("div",{className:"flex gap-1",children:mEe.map(i=>v.jsx(Te,{size:"sm",variant:t===i?"default":"outline",onClick:()=>n(i),children:i},i))}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsxs(hn,{children:[v.jsx(Yu,{className:"pb-2",children:v.jsx(Xu,{className:"text-sm font-medium text-muted-foreground",children:"Total Runs"})}),v.jsxs(mn,{children:[v.jsx("div",{className:"text-3xl font-bold",children:r.total_runs}),v.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[r.completed," completed · ",r.failed," failed"]})]})]}),v.jsxs(hn,{children:[v.jsx(Yu,{className:"pb-2",children:v.jsx(Xu,{className:"text-sm font-medium text-muted-foreground",children:"Success Rate"})}),v.jsx(mn,{className:"h-36",children:v.jsx(uEe,{completed:r.completed,failed:r.failed})})]}),v.jsxs(hn,{children:[v.jsx(Yu,{className:"pb-2",children:v.jsx(Xu,{className:"text-sm font-medium text-muted-foreground",children:"Avg Duration"})}),v.jsxs(mn,{children:[v.jsx("div",{className:"text-3xl font-bold",children:pEe(r.avg_duration_ms)}),v.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"per session"})]})]})]}),v.jsxs(hn,{children:[v.jsx(Yu,{children:v.jsx(Xu,{className:"text-base",children:"Run Frequency"})}),v.jsx(mn,{children:v.jsx(fEe,{data:r.daily})})]}),v.jsxs(hn,{children:[v.jsx(Yu,{children:v.jsx(Xu,{className:"text-base",children:"Duration Trends"})}),v.jsx(mn,{children:v.jsx(hEe,{data:r.daily})})]})]}):null}function OA({className:e,orientation:t="horizontal",...n}){return v.jsx(KJ,{"data-slot":"tabs","data-orientation":t,orientation:t,className:Oe("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const gEe=y0("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function CA({className:e,variant:t="default",...n}){return v.jsx(VJ,{"data-slot":"tabs-list","data-variant":t,className:Oe(gEe({variant:t}),e),...n})}function Ea({className:e,...t}){return v.jsx(YJ,{"data-slot":"tabs-trigger",className:Oe("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function _a({className:e,...t}){return v.jsx(XJ,{"data-slot":"tabs-content",className:Oe("flex-1 outline-none",e),...t})}function yEe(){return v.jsxs("div",{className:"space-y-6",children:[v.jsx(tn,{className:"h-8 w-48"}),v.jsx(tn,{className:"h-24 rounded-lg"}),v.jsx(tn,{className:"h-64 rounded-lg"})]})}const GL={roles:"Role",skills:"Skill",agents:"Agent",memories:"Memory"};function bEe(){const{projectId:e}=aj(),t=Number(e),n=mB(t),[r,a]=y.useState(1),i=lre(t,r),s=TB(t),[c,u]=y.useState(!1),[f,m]=y.useState(!1),[d,p]=y.useState("sessions"),b=n.isLoading||i.isLoading,w=n.error||i.error;if(b)return v.jsx(yEe,{});if(w)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",w.message]})]});if(!n.data)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsx("span",{children:"Project not found"})]});const x=n.data,S=i.data,E=(S==null?void 0:S.items)??[],C=(S==null?void 0:S.total)??0,O=S?Math.ceil(S.total/S.per_page):0,A=s.data??[],T=A.reduce((N,P)=>(N[P.type]=(N[P.type]||0)+1,N),{});return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:x.display_name}),v.jsxs("div",{className:"flex gap-2",children:[v.jsxs(Te,{onClick:()=>u(!0),disabled:!x.dir_exists,children:[v.jsx(lO,{className:"mr-2 h-4 w-4"}),"Launch Session"]}),v.jsxs(Te,{variant:"outline",onClick:()=>{p("resources"),m(!0)},children:[v.jsx(v0,{className:"mr-2 h-4 w-4"}),"Install Resource"]}),v.jsx(Te,{variant:"outline",asChild:!0,children:v.jsxs(Xa,{to:"/projects",children:[v.jsx(eB,{className:"mr-2 h-4 w-4"}),"Back"]})})]})]}),v.jsx(hn,{children:v.jsx(mn,{className:"pt-6",children:v.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Directory"}),v.jsxs("dd",{className:"flex items-center gap-2 break-all",children:[x.working_dir,x.dir_exists?v.jsx(gn,{variant:"outline",className:"border-green-200 bg-green-50 text-xs text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",children:"OK"}):v.jsx(gn,{variant:"outline",className:"border-orange-200 bg-orange-50 text-xs text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",children:"Missing"})]}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Created"}),v.jsx("dd",{children:new Date(x.created_at).toLocaleString()}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Resources"}),v.jsx("dd",{children:A.length===0?v.jsx("span",{className:"text-sm text-muted-foreground",children:"None installed"}):v.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(T).map(([N,P])=>v.jsxs(gn,{variant:"secondary",className:"cursor-pointer text-xs",onClick:()=>p("resources"),children:[P," ",P===1?GL[N]??N:`${GL[N]??N}s`]},N))})})]})})}),v.jsx(Pae,{projectId:t,open:c,onOpenChange:u}),v.jsx(pO,{open:f,onOpenChange:m,projectId:t}),v.jsxs(OA,{value:d,onValueChange:p,children:[v.jsxs(CA,{children:[v.jsxs(Ea,{value:"sessions",children:["Sessions (",C,")"]}),v.jsx(Ea,{value:"activity",children:"Activity"}),v.jsxs(Ea,{value:"resources",children:["Resources (",A.length,")"]}),v.jsx(Ea,{value:"files",children:"Files"})]}),v.jsx(_a,{value:"sessions",className:"mt-4 space-y-3",children:C===0?v.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No sessions yet."}):v.jsxs(v.Fragment,{children:[v.jsx(hn,{children:v.jsx(mn,{className:"p-0",children:v.jsx(UE,{sessions:E})})}),v.jsx(Oae,{page:r,totalPages:O,onPageChange:a})]})}),v.jsx(_a,{value:"activity",className:"mt-4",children:v.jsx(vEe,{projectId:t})}),v.jsx(_a,{value:"resources",className:"mt-4",children:v.jsx(eie,{projectId:t,installOpen:f,onInstallOpenChange:m})}),v.jsx(_a,{value:"files",className:"mt-4",children:v.jsx(Rae,{projectId:t})})]})]})}function xn(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=xn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var xEe={value:()=>{}};function ub(){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 bg(n)}function bg(e){this._=e}function wEe(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}bg.prototype=ub.prototype={constructor:bg,on:function(e,t){var n=this._,r=wEe(e+"",n),a,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((a=(e=r[i]).type)&&(a=SEe(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(a=(e=r[i]).type)n[a]=WL(n[a],e.name,t);else if(t==null)for(a in n)n[a]=WL(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new bg(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,i;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,a=i.length;r<a;++r)i[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],a=0,i=r.length;a<i;++a)r[a].value.apply(t,n)}};function SEe(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function WL(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=xEe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var F_="http://www.w3.org/1999/xhtml";const QL={svg:"http://www.w3.org/2000/svg",xhtml:F_,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fb(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),QL.hasOwnProperty(t)?{space:QL[t],local:e}:e}function EEe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===F_&&t.documentElement.namespaceURI===F_?t.createElement(e):t.createElementNS(n,e)}}function _Ee(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function eq(e){var t=fb(e);return(t.local?_Ee:EEe)(t)}function jEe(){}function AA(e){return e==null?jEe:function(){return this.querySelector(e)}}function OEe(e){typeof e!="function"&&(e=AA(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,c=r[a]=new Array(s),u,f,m=0;m<s;++m)(u=i[m])&&(f=e.call(u,u.__data__,m,i))&&("__data__"in u&&(f.__data__=u.__data__),c[m]=f);return new aa(r,this._parents)}function CEe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function AEe(){return[]}function tq(e){return e==null?AEe:function(){return this.querySelectorAll(e)}}function NEe(e){return function(){return CEe(e.apply(this,arguments))}}function TEe(e){typeof e=="function"?e=NEe(e):e=tq(e);for(var t=this._groups,n=t.length,r=[],a=[],i=0;i<n;++i)for(var s=t[i],c=s.length,u,f=0;f<c;++f)(u=s[f])&&(r.push(e.call(u,u.__data__,f,s)),a.push(u));return new aa(r,a)}function nq(e){return function(){return this.matches(e)}}function rq(e){return function(t){return t.matches(e)}}var PEe=Array.prototype.find;function MEe(e){return function(){return PEe.call(this.children,e)}}function REe(){return this.firstElementChild}function kEe(e){return this.select(e==null?REe:MEe(typeof e=="function"?e:rq(e)))}var DEe=Array.prototype.filter;function IEe(){return Array.from(this.children)}function LEe(e){return function(){return DEe.call(this.children,e)}}function zEe(e){return this.selectAll(e==null?IEe:LEe(typeof e=="function"?e:rq(e)))}function $Ee(e){typeof e!="function"&&(e=nq(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,c=r[a]=[],u,f=0;f<s;++f)(u=i[f])&&e.call(u,u.__data__,f,i)&&c.push(u);return new aa(r,this._parents)}function aq(e){return new Array(e.length)}function BEe(){return new aa(this._enter||this._groups.map(aq),this._parents)}function Ly(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ly.prototype={constructor:Ly,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 UEe(e){return function(){return e}}function HEe(e,t,n,r,a,i){for(var s=0,c,u=t.length,f=i.length;s<f;++s)(c=t[s])?(c.__data__=i[s],r[s]=c):n[s]=new Ly(e,i[s]);for(;s<u;++s)(c=t[s])&&(a[s]=c)}function FEe(e,t,n,r,a,i,s){var c,u,f=new Map,m=t.length,d=i.length,p=new Array(m),b;for(c=0;c<m;++c)(u=t[c])&&(p[c]=b=s.call(u,u.__data__,c,t)+"",f.has(b)?a[c]=u:f.set(b,u));for(c=0;c<d;++c)b=s.call(e,i[c],c,i)+"",(u=f.get(b))?(r[c]=u,u.__data__=i[c],f.delete(b)):n[c]=new Ly(e,i[c]);for(c=0;c<m;++c)(u=t[c])&&f.get(p[c])===u&&(a[c]=u)}function qEe(e){return e.__data__}function KEe(e,t){if(!arguments.length)return Array.from(this,qEe);var n=t?FEe:HEe,r=this._parents,a=this._groups;typeof e!="function"&&(e=UEe(e));for(var i=a.length,s=new Array(i),c=new Array(i),u=new Array(i),f=0;f<i;++f){var m=r[f],d=a[f],p=d.length,b=VEe(e.call(m,m&&m.__data__,f,r)),w=b.length,x=c[f]=new Array(w),S=s[f]=new Array(w),E=u[f]=new Array(p);n(m,d,x,S,E,b,t);for(var C=0,O=0,A,T;C<w;++C)if(A=x[C]){for(C>=O&&(O=C+1);!(T=S[O])&&++O<w;);A._next=T||null}}return s=new aa(s,r),s._enter=c,s._exit=u,s}function VEe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function YEe(){return new aa(this._exit||this._groups.map(aq),this._parents)}function XEe(e,t,n){var r=this.enter(),a=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?i.remove():n(i),r&&a?r.merge(a).order():a}function GEe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,i=r.length,s=Math.min(a,i),c=new Array(a),u=0;u<s;++u)for(var f=n[u],m=r[u],d=f.length,p=c[u]=new Array(d),b,w=0;w<d;++w)(b=f[w]||m[w])&&(p[w]=b);for(;u<a;++u)c[u]=n[u];return new aa(c,this._parents)}function WEe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,i=r[a],s;--a>=0;)(s=r[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function QEe(e){e||(e=ZEe);function t(d,p){return d&&p?e(d.__data__,p.__data__):!d-!p}for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var s=n[i],c=s.length,u=a[i]=new Array(c),f,m=0;m<c;++m)(f=s[m])&&(u[m]=f);u.sort(t)}return new aa(a,this._parents).order()}function ZEe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function JEe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function e_e(){return Array.from(this)}function t_e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length;a<i;++a){var s=r[a];if(s)return s}return null}function n_e(){let e=0;for(const t of this)++e;return e}function r_e(){return!this.node()}function a_e(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],i=0,s=a.length,c;i<s;++i)(c=a[i])&&e.call(c,c.__data__,i,a);return this}function i_e(e){return function(){this.removeAttribute(e)}}function o_e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function s_e(e,t){return function(){this.setAttribute(e,t)}}function l_e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function c_e(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function u_e(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 f_e(e,t){var n=fb(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?o_e:i_e:typeof t=="function"?n.local?u_e:c_e:n.local?l_e:s_e)(n,t))}function iq(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function d_e(e){return function(){this.style.removeProperty(e)}}function h_e(e,t,n){return function(){this.style.setProperty(e,t,n)}}function m_e(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function p_e(e,t,n){return arguments.length>1?this.each((t==null?d_e:typeof t=="function"?m_e:h_e)(e,t,n??"")):Mf(this.node(),e)}function Mf(e,t){return e.style.getPropertyValue(t)||iq(e).getComputedStyle(e,null).getPropertyValue(t)}function v_e(e){return function(){delete this[e]}}function g_e(e,t){return function(){this[e]=t}}function y_e(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function b_e(e,t){return arguments.length>1?this.each((t==null?v_e:typeof t=="function"?y_e:g_e)(e,t)):this.node()[e]}function oq(e){return e.trim().split(/^|\s+/)}function NA(e){return e.classList||new sq(e)}function sq(e){this._node=e,this._names=oq(e.getAttribute("class")||"")}sq.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 lq(e,t){for(var n=NA(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function cq(e,t){for(var n=NA(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function x_e(e){return function(){lq(this,e)}}function w_e(e){return function(){cq(this,e)}}function S_e(e,t){return function(){(t.apply(this,arguments)?lq:cq)(this,e)}}function E_e(e,t){var n=oq(e+"");if(arguments.length<2){for(var r=NA(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?S_e:t?x_e:w_e)(n,t))}function __e(){this.textContent=""}function j_e(e){return function(){this.textContent=e}}function O_e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function C_e(e){return arguments.length?this.each(e==null?__e:(typeof e=="function"?O_e:j_e)(e)):this.node().textContent}function A_e(){this.innerHTML=""}function N_e(e){return function(){this.innerHTML=e}}function T_e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function P_e(e){return arguments.length?this.each(e==null?A_e:(typeof e=="function"?T_e:N_e)(e)):this.node().innerHTML}function M_e(){this.nextSibling&&this.parentNode.appendChild(this)}function R_e(){return this.each(M_e)}function k_e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function D_e(){return this.each(k_e)}function I_e(e){var t=typeof e=="function"?e:eq(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function L_e(){return null}function z_e(e,t){var n=typeof e=="function"?e:eq(e),r=t==null?L_e:typeof t=="function"?t:AA(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function $_e(){var e=this.parentNode;e&&e.removeChild(this)}function B_e(){return this.each($_e)}function U_e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function H_e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function F_e(e){return this.select(e?H_e:U_e)}function q_e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function K_e(e){return function(t){e.call(this,t,this.__data__)}}function V_e(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 Y_e(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,i;n<a;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function X_e(e,t,n){return function(){var r=this.__on,a,i=K_e(t);if(r){for(var s=0,c=r.length;s<c;++s)if((a=r[s]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=n),a.value=t;return}}this.addEventListener(e.type,i,n),a={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(a):this.__on=[a]}}function G_e(e,t,n){var r=V_e(e+""),a,i=r.length,s;if(arguments.length<2){var c=this.node().__on;if(c){for(var u=0,f=c.length,m;u<f;++u)for(a=0,m=c[u];a<i;++a)if((s=r[a]).type===m.type&&s.name===m.name)return m.value}return}for(c=t?X_e:Y_e,a=0;a<i;++a)this.each(c(r[a],t,n));return this}function uq(e,t,n){var r=iq(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function W_e(e,t){return function(){return uq(this,e,t)}}function Q_e(e,t){return function(){return uq(this,e,t.apply(this,arguments))}}function Z_e(e,t){return this.each((typeof t=="function"?Q_e:W_e)(e,t))}function*J_e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length,s;a<i;++a)(s=r[a])&&(yield s)}var fq=[null];function aa(e,t){this._groups=e,this._parents=t}function Jm(){return new aa([[document.documentElement]],fq)}function eje(){return this}aa.prototype=Jm.prototype={constructor:aa,select:OEe,selectAll:TEe,selectChild:kEe,selectChildren:zEe,filter:$Ee,data:KEe,enter:BEe,exit:YEe,join:XEe,merge:GEe,selection:eje,order:WEe,sort:QEe,call:JEe,nodes:e_e,node:t_e,size:n_e,empty:r_e,each:a_e,attr:f_e,style:p_e,property:b_e,classed:E_e,text:C_e,html:P_e,raise:R_e,lower:D_e,append:I_e,insert:z_e,remove:B_e,clone:F_e,datum:q_e,on:G_e,dispatch:Z_e,[Symbol.iterator]:J_e};function Qr(e){return typeof e=="string"?new aa([[document.querySelector(e)]],[document.documentElement]):new aa([[e]],fq)}function tje(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ba(e,t){if(e=tje(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 a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const nje={passive:!1},em={capture:!0,passive:!1};function BS(e){e.stopImmediatePropagation()}function of(e){e.preventDefault(),e.stopImmediatePropagation()}function dq(e){var t=e.document.documentElement,n=Qr(e).on("dragstart.drag",of,em);"onselectstart"in t?n.on("selectstart.drag",of,em):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function hq(e,t){var n=e.document.documentElement,r=Qr(e).on("dragstart.drag",null);t&&(r.on("click.drag",of,em),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 Zv=e=>()=>e;function q_(e,{sourceEvent:t,subject:n,target:r,identifier:a,active:i,x:s,y:c,dx:u,dy:f,dispatch:m}){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:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:m}})}q_.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function rje(e){return!e.ctrlKey&&!e.button}function aje(){return this.parentNode}function ije(e,t){return t??{x:e.x,y:e.y}}function oje(){return navigator.maxTouchPoints||"ontouchstart"in this}function mq(){var e=rje,t=aje,n=ije,r=oje,a={},i=ub("start","drag","end"),s=0,c,u,f,m,d=0;function p(A){A.on("mousedown.drag",b).filter(r).on("touchstart.drag",S).on("touchmove.drag",E,nje).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(A,T){if(!(m||!e.call(this,A,T))){var N=O(this,t.call(this,A,T),A,T,"mouse");N&&(Qr(A.view).on("mousemove.drag",w,em).on("mouseup.drag",x,em),dq(A.view),BS(A),f=!1,c=A.clientX,u=A.clientY,N("start",A))}}function w(A){if(of(A),!f){var T=A.clientX-c,N=A.clientY-u;f=T*T+N*N>d}a.mouse("drag",A)}function x(A){Qr(A.view).on("mousemove.drag mouseup.drag",null),hq(A.view,f),of(A),a.mouse("end",A)}function S(A,T){if(e.call(this,A,T)){var N=A.changedTouches,P=t.call(this,A,T),k=N.length,D,K;for(D=0;D<k;++D)(K=O(this,P,A,T,N[D].identifier,N[D]))&&(BS(A),K("start",A,N[D]))}}function E(A){var T=A.changedTouches,N=T.length,P,k;for(P=0;P<N;++P)(k=a[T[P].identifier])&&(of(A),k("drag",A,T[P]))}function C(A){var T=A.changedTouches,N=T.length,P,k;for(m&&clearTimeout(m),m=setTimeout(function(){m=null},500),P=0;P<N;++P)(k=a[T[P].identifier])&&(BS(A),k("end",A,T[P]))}function O(A,T,N,P,k,D){var K=i.copy(),B=Ba(D||N,T),I,W,z;if((z=n.call(A,new q_("beforestart",{sourceEvent:N,target:p,identifier:k,active:s,x:B[0],y:B[1],dx:0,dy:0,dispatch:K}),P))!=null)return I=z.x-B[0]||0,W=z.y-B[1]||0,function V(R,H,q){var F=B,Y;switch(R){case"start":a[k]=V,Y=s++;break;case"end":delete a[k],--s;case"drag":B=Ba(q||H,T),Y=s;break}K.call(R,A,new q_(R,{sourceEvent:H,subject:z,target:p,identifier:k,active:Y,x:B[0]+I,y:B[1]+W,dx:B[0]-F[0],dy:B[1]-F[1],dispatch:K}),P)}}return p.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Zv(!!A),p):e},p.container=function(A){return arguments.length?(t=typeof A=="function"?A:Zv(A),p):t},p.subject=function(A){return arguments.length?(n=typeof A=="function"?A:Zv(A),p):n},p.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Zv(!!A),p):r},p.on=function(){var A=i.on.apply(i,arguments);return A===i?p:A},p.clickDistance=function(A){return arguments.length?(d=(A=+A)*A,p):Math.sqrt(d)},p}var Rf=0,Ch=0,yh=0,pq=1e3,zy,Ah,$y=0,Mc=0,db=0,tm=typeof performance=="object"&&performance.now?performance:Date,vq=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function TA(){return Mc||(vq(sje),Mc=tm.now()+db)}function sje(){Mc=0}function By(){this._call=this._time=this._next=null}By.prototype=gq.prototype={constructor:By,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?TA():+n)+(t==null?0:+t),!this._next&&Ah!==this&&(Ah?Ah._next=this:zy=this,Ah=this),this._call=e,this._time=n,K_()},stop:function(){this._call&&(this._call=null,this._time=1/0,K_())}};function gq(e,t,n){var r=new By;return r.restart(e,t,n),r}function lje(){TA(),++Rf;for(var e=zy,t;e;)(t=Mc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Rf}function ZL(){Mc=($y=tm.now())+db,Rf=Ch=0;try{lje()}finally{Rf=0,uje(),Mc=0}}function cje(){var e=tm.now(),t=e-$y;t>pq&&(db-=t,$y=e)}function uje(){for(var e,t=zy,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:zy=n);Ah=e,K_(r)}function K_(e){if(!Rf){Ch&&(Ch=clearTimeout(Ch));var t=e-Mc;t>24?(e<1/0&&(Ch=setTimeout(ZL,e-tm.now()-db)),yh&&(yh=clearInterval(yh))):(yh||($y=tm.now(),yh=setInterval(cje,pq)),Rf=1,vq(ZL))}}function JL(e,t,n){var r=new By;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var fje=ub("start","end","cancel","interrupt"),dje=[],yq=0,e3=1,V_=2,xg=3,t3=4,Y_=5,wg=6;function hb(e,t,n,r,a,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;hje(e,n,{name:t,index:r,group:a,on:fje,tween:dje,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:yq})}function PA(e,t){var n=ri(e,t);if(n.state>yq)throw new Error("too late; already scheduled");return n}function Li(e,t){var n=ri(e,t);if(n.state>xg)throw new Error("too late; already running");return n}function ri(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function hje(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=gq(i,0,n.time);function i(f){n.state=e3,n.timer.restart(s,n.delay,n.time),n.delay<=f&&s(f-n.delay)}function s(f){var m,d,p,b;if(n.state!==e3)return u();for(m in r)if(b=r[m],b.name===n.name){if(b.state===xg)return JL(s);b.state===t3?(b.state=wg,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete r[m]):+m<t&&(b.state=wg,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete r[m])}if(JL(function(){n.state===xg&&(n.state=t3,n.timer.restart(c,n.delay,n.time),c(f))}),n.state=V_,n.on.call("start",e,e.__data__,n.index,n.group),n.state===V_){for(n.state=xg,a=new Array(p=n.tween.length),m=0,d=-1;m<p;++m)(b=n.tween[m].value.call(e,e.__data__,n.index,n.group))&&(a[++d]=b);a.length=d+1}}function c(f){for(var m=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(u),n.state=Y_,1),d=-1,p=a.length;++d<p;)a[d].call(e,m);n.state===Y_&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=wg,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Sg(e,t){var n=e.__transition,r,a,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}a=r.state>V_&&r.state<Y_,r.state=wg,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function mje(e){return this.each(function(){Sg(this,e)})}function pje(e,t){var n,r;return function(){var a=Li(this,e),i=a.tween;if(i!==n){r=n=i;for(var s=0,c=r.length;s<c;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}a.tween=r}}function vje(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var i=Li(this,e),s=i.tween;if(s!==r){a=(r=s).slice();for(var c={name:t,value:n},u=0,f=a.length;u<f;++u)if(a[u].name===t){a[u]=c;break}u===f&&a.push(c)}i.tween=a}}function gje(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ri(this.node(),n).tween,a=0,i=r.length,s;a<i;++a)if((s=r[a]).name===e)return s.value;return null}return this.each((t==null?pje:vje)(n,e,t))}function MA(e,t,n){var r=e._id;return e.each(function(){var a=Li(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return ri(a,r).value[t]}}function bq(e,t){var n;return(typeof t=="number"?Ua:t instanceof Tc?yy:(n=Tc(t))?(t=n,yy):lU)(e,t)}function yje(e){return function(){this.removeAttribute(e)}}function bje(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xje(e,t,n){var r,a=n+"",i;return function(){var s=this.getAttribute(e);return s===a?null:s===r?i:i=t(r=s,n)}}function wje(e,t,n){var r,a=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===r?i:i=t(r=s,n)}}function Sje(e,t,n){var r,a,i;return function(){var s,c=n(this),u;return c==null?void this.removeAttribute(e):(s=this.getAttribute(e),u=c+"",s===u?null:s===r&&u===a?i:(a=u,i=t(r=s,c)))}}function Eje(e,t,n){var r,a,i;return function(){var s,c=n(this),u;return c==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),u=c+"",s===u?null:s===r&&u===a?i:(a=u,i=t(r=s,c)))}}function _je(e,t){var n=fb(e),r=n==="transform"?Ode:bq;return this.attrTween(e,typeof t=="function"?(n.local?Eje:Sje)(n,r,MA(this,"attr."+e,t)):t==null?(n.local?bje:yje)(n):(n.local?wje:xje)(n,r,t))}function jje(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Oje(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Cje(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Oje(e,i)),n}return a._value=t,a}function Aje(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&jje(e,i)),n}return a._value=t,a}function Nje(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=fb(e);return this.tween(n,(r.local?Cje:Aje)(r,t))}function Tje(e,t){return function(){PA(this,e).delay=+t.apply(this,arguments)}}function Pje(e,t){return t=+t,function(){PA(this,e).delay=t}}function Mje(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Tje:Pje)(t,e)):ri(this.node(),t).delay}function Rje(e,t){return function(){Li(this,e).duration=+t.apply(this,arguments)}}function kje(e,t){return t=+t,function(){Li(this,e).duration=t}}function Dje(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Rje:kje)(t,e)):ri(this.node(),t).duration}function Ije(e,t){if(typeof t!="function")throw new Error;return function(){Li(this,e).ease=t}}function Lje(e){var t=this._id;return arguments.length?this.each(Ije(t,e)):ri(this.node(),t).ease}function zje(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Li(this,e).ease=n}}function $je(e){if(typeof e!="function")throw new Error;return this.each(zje(this._id,e))}function Bje(e){typeof e!="function"&&(e=nq(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],s=i.length,c=r[a]=[],u,f=0;f<s;++f)(u=i[f])&&e.call(u,u.__data__,f,i)&&c.push(u);return new Lo(r,this._parents,this._name,this._id)}function Uje(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,i=Math.min(r,a),s=new Array(r),c=0;c<i;++c)for(var u=t[c],f=n[c],m=u.length,d=s[c]=new Array(m),p,b=0;b<m;++b)(p=u[b]||f[b])&&(d[b]=p);for(;c<r;++c)s[c]=t[c];return new Lo(s,this._parents,this._name,this._id)}function Hje(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 Fje(e,t,n){var r,a,i=Hje(t)?PA:Li;return function(){var s=i(this,e),c=s.on;c!==r&&(a=(r=c).copy()).on(t,n),s.on=a}}function qje(e,t){var n=this._id;return arguments.length<2?ri(this.node(),n).on.on(e):this.each(Fje(n,e,t))}function Kje(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Vje(){return this.on("end.remove",Kje(this._id))}function Yje(e){var t=this._name,n=this._id;typeof e!="function"&&(e=AA(e));for(var r=this._groups,a=r.length,i=new Array(a),s=0;s<a;++s)for(var c=r[s],u=c.length,f=i[s]=new Array(u),m,d,p=0;p<u;++p)(m=c[p])&&(d=e.call(m,m.__data__,p,c))&&("__data__"in m&&(d.__data__=m.__data__),f[p]=d,hb(f[p],t,n,p,f,ri(m,n)));return new Lo(i,this._parents,t,n)}function Xje(e){var t=this._name,n=this._id;typeof e!="function"&&(e=tq(e));for(var r=this._groups,a=r.length,i=[],s=[],c=0;c<a;++c)for(var u=r[c],f=u.length,m,d=0;d<f;++d)if(m=u[d]){for(var p=e.call(m,m.__data__,d,u),b,w=ri(m,n),x=0,S=p.length;x<S;++x)(b=p[x])&&hb(b,t,n,x,p,w);i.push(p),s.push(m)}return new Lo(i,s,t,n)}var Gje=Jm.prototype.constructor;function Wje(){return new Gje(this._groups,this._parents)}function Qje(e,t){var n,r,a;return function(){var i=Mf(this,e),s=(this.style.removeProperty(e),Mf(this,e));return i===s?null:i===n&&s===r?a:a=t(n=i,r=s)}}function xq(e){return function(){this.style.removeProperty(e)}}function Zje(e,t,n){var r,a=n+"",i;return function(){var s=Mf(this,e);return s===a?null:s===r?i:i=t(r=s,n)}}function Jje(e,t,n){var r,a,i;return function(){var s=Mf(this,e),c=n(this),u=c+"";return c==null&&(u=c=(this.style.removeProperty(e),Mf(this,e))),s===u?null:s===r&&u===a?i:(a=u,i=t(r=s,c))}}function eOe(e,t){var n,r,a,i="style."+t,s="end."+i,c;return function(){var u=Li(this,e),f=u.on,m=u.value[i]==null?c||(c=xq(t)):void 0;(f!==n||a!==m)&&(r=(n=f).copy()).on(s,a=m),u.on=r}}function tOe(e,t,n){var r=(e+="")=="transform"?jde:bq;return t==null?this.styleTween(e,Qje(e,r)).on("end.style."+e,xq(e)):typeof t=="function"?this.styleTween(e,Jje(e,r,MA(this,"style."+e,t))).each(eOe(this._id,e)):this.styleTween(e,Zje(e,r,t),n).on("end.style."+e,null)}function nOe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function rOe(e,t,n){var r,a;function i(){var s=t.apply(this,arguments);return s!==a&&(r=(a=s)&&nOe(e,s,n)),r}return i._value=t,i}function aOe(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,rOe(e,t,n??""))}function iOe(e){return function(){this.textContent=e}}function oOe(e){return function(){var t=e(this);this.textContent=t??""}}function sOe(e){return this.tween("text",typeof e=="function"?oOe(MA(this,"text",e)):iOe(e==null?"":e+""))}function lOe(e){return function(t){this.textContent=e.call(this,t)}}function cOe(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&lOe(a)),t}return r._value=e,r}function uOe(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,cOe(e))}function fOe(){for(var e=this._name,t=this._id,n=wq(),r=this._groups,a=r.length,i=0;i<a;++i)for(var s=r[i],c=s.length,u,f=0;f<c;++f)if(u=s[f]){var m=ri(u,t);hb(u,e,n,f,s,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new Lo(r,this._parents,e,n)}function dOe(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(i,s){var c={value:s},u={value:function(){--a===0&&i()}};n.each(function(){var f=Li(this,r),m=f.on;m!==e&&(t=(e=m).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(u)),f.on=t}),a===0&&i()})}var hOe=0;function Lo(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function wq(){return++hOe}var lo=Jm.prototype;Lo.prototype={constructor:Lo,select:Yje,selectAll:Xje,selectChild:lo.selectChild,selectChildren:lo.selectChildren,filter:Bje,merge:Uje,selection:Wje,transition:fOe,call:lo.call,nodes:lo.nodes,node:lo.node,size:lo.size,empty:lo.empty,each:lo.each,on:qje,attr:_je,attrTween:Nje,style:tOe,styleTween:aOe,text:sOe,textTween:uOe,remove:Vje,tween:gje,delay:Mje,duration:Dje,ease:Lje,easeVarying:$je,end:dOe,[Symbol.iterator]:lo[Symbol.iterator]};function mOe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var pOe={time:null,delay:0,duration:250,ease:mOe};function vOe(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 gOe(e){var t,n;e instanceof Lo?(t=e._id,e=e._name):(t=wq(),(n=pOe).time=TA(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var s=r[i],c=s.length,u,f=0;f<c;++f)(u=s[f])&&hb(u,e,t,f,s,n||vOe(u,t));return new Lo(r,this._parents,e,t)}Jm.prototype.interrupt=mje;Jm.prototype.transition=gOe;const Jv=e=>()=>e;function yOe(e,{sourceEvent:t,target:n,transform:r,dispatch:a}){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:a}})}function bo(e,t,n){this.k=e,this.x=t,this.y=n}bo.prototype={constructor:bo,scale:function(e){return e===1?this:new bo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new bo(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 mb=new bo(1,0,0);Sq.prototype=bo.prototype;function Sq(e){for(;!e.__zoom;)if(!(e=e.parentNode))return mb;return e.__zoom}function US(e){e.stopImmediatePropagation()}function bh(e){e.preventDefault(),e.stopImmediatePropagation()}function bOe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function xOe(){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 n3(){return this.__zoom||mb}function wOe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function SOe(){return navigator.maxTouchPoints||"ontouchstart"in this}function EOe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],a=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function Eq(){var e=bOe,t=xOe,n=EOe,r=wOe,a=SOe,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,u=vg,f=ub("start","zoom","end"),m,d,p,b=500,w=150,x=0,S=10;function E(z){z.property("__zoom",n3).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",K).filter(a).on("touchstart.zoom",B).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(z,V,R,H){var q=z.selection?z.selection():z;q.property("__zoom",n3),z!==q?T(z,V,R,H):q.interrupt().each(function(){N(this,arguments).event(H).start().zoom(null,typeof V=="function"?V.apply(this,arguments):V).end()})},E.scaleBy=function(z,V,R,H){E.scaleTo(z,function(){var q=this.__zoom.k,F=typeof V=="function"?V.apply(this,arguments):V;return q*F},R,H)},E.scaleTo=function(z,V,R,H){E.transform(z,function(){var q=t.apply(this,arguments),F=this.__zoom,Y=R==null?A(q):typeof R=="function"?R.apply(this,arguments):R,$=F.invert(Y),L=typeof V=="function"?V.apply(this,arguments):V;return n(O(C(F,L),Y,$),q,s)},R,H)},E.translateBy=function(z,V,R,H){E.transform(z,function(){return n(this.__zoom.translate(typeof V=="function"?V.apply(this,arguments):V,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),s)},null,H)},E.translateTo=function(z,V,R,H,q){E.transform(z,function(){var F=t.apply(this,arguments),Y=this.__zoom,$=H==null?A(F):typeof H=="function"?H.apply(this,arguments):H;return n(mb.translate($[0],$[1]).scale(Y.k).translate(typeof V=="function"?-V.apply(this,arguments):-V,typeof R=="function"?-R.apply(this,arguments):-R),F,s)},H,q)};function C(z,V){return V=Math.max(i[0],Math.min(i[1],V)),V===z.k?z:new bo(V,z.x,z.y)}function O(z,V,R){var H=V[0]-R[0]*z.k,q=V[1]-R[1]*z.k;return H===z.x&&q===z.y?z:new bo(z.k,H,q)}function A(z){return[(+z[0][0]+ +z[1][0])/2,(+z[0][1]+ +z[1][1])/2]}function T(z,V,R,H){z.on("start.zoom",function(){N(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(H).end()}).tween("zoom",function(){var q=this,F=arguments,Y=N(q,F).event(H),$=t.apply(q,F),L=R==null?A($):typeof R=="function"?R.apply(q,F):R,G=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),Z=q.__zoom,J=typeof V=="function"?V.apply(q,F):V,se=u(Z.invert(L).concat(G/Z.k),J.invert(L).concat(G/J.k));return function(ie){if(ie===1)ie=J;else{var re=se(ie),ee=G/re[2];ie=new bo(ee,L[0]-re[0]*ee,L[1]-re[1]*ee)}Y.zoom(null,ie)}})}function N(z,V,R){return!R&&z.__zooming||new P(z,V)}function P(z,V){this.that=z,this.args=V,this.active=0,this.sourceEvent=null,this.extent=t.apply(z,V),this.taps=0}P.prototype={event:function(z){return z&&(this.sourceEvent=z),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(z,V){return this.mouse&&z!=="mouse"&&(this.mouse[1]=V.invert(this.mouse[0])),this.touch0&&z!=="touch"&&(this.touch0[1]=V.invert(this.touch0[0])),this.touch1&&z!=="touch"&&(this.touch1[1]=V.invert(this.touch1[0])),this.that.__zoom=V,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(z){var V=Qr(this.that).datum();f.call(z,this.that,new yOe(z,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:f}),V)}};function k(z,...V){if(!e.apply(this,arguments))return;var R=N(this,V).event(z),H=this.__zoom,q=Math.max(i[0],Math.min(i[1],H.k*Math.pow(2,r.apply(this,arguments)))),F=Ba(z);if(R.wheel)(R.mouse[0][0]!==F[0]||R.mouse[0][1]!==F[1])&&(R.mouse[1]=H.invert(R.mouse[0]=F)),clearTimeout(R.wheel);else{if(H.k===q)return;R.mouse=[F,H.invert(F)],Sg(this),R.start()}bh(z),R.wheel=setTimeout(Y,w),R.zoom("mouse",n(O(C(H,q),R.mouse[0],R.mouse[1]),R.extent,s));function Y(){R.wheel=null,R.end()}}function D(z,...V){if(p||!e.apply(this,arguments))return;var R=z.currentTarget,H=N(this,V,!0).event(z),q=Qr(z.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",G,!0),F=Ba(z,R),Y=z.clientX,$=z.clientY;dq(z.view),US(z),H.mouse=[F,this.__zoom.invert(F)],Sg(this),H.start();function L(Z){if(bh(Z),!H.moved){var J=Z.clientX-Y,se=Z.clientY-$;H.moved=J*J+se*se>x}H.event(Z).zoom("mouse",n(O(H.that.__zoom,H.mouse[0]=Ba(Z,R),H.mouse[1]),H.extent,s))}function G(Z){q.on("mousemove.zoom mouseup.zoom",null),hq(Z.view,H.moved),bh(Z),H.event(Z).end()}}function K(z,...V){if(e.apply(this,arguments)){var R=this.__zoom,H=Ba(z.changedTouches?z.changedTouches[0]:z,this),q=R.invert(H),F=R.k*(z.shiftKey?.5:2),Y=n(O(C(R,F),H,q),t.apply(this,V),s);bh(z),c>0?Qr(this).transition().duration(c).call(T,Y,H,z):Qr(this).call(E.transform,Y,H,z)}}function B(z,...V){if(e.apply(this,arguments)){var R=z.touches,H=R.length,q=N(this,V,z.changedTouches.length===H).event(z),F,Y,$,L;for(US(z),Y=0;Y<H;++Y)$=R[Y],L=Ba($,this),L=[L,this.__zoom.invert(L),$.identifier],q.touch0?!q.touch1&&q.touch0[2]!==L[2]&&(q.touch1=L,q.taps=0):(q.touch0=L,F=!0,q.taps=1+!!m);m&&(m=clearTimeout(m)),F&&(q.taps<2&&(d=L[0],m=setTimeout(function(){m=null},b)),Sg(this),q.start())}}function I(z,...V){if(this.__zooming){var R=N(this,V).event(z),H=z.changedTouches,q=H.length,F,Y,$,L;for(bh(z),F=0;F<q;++F)Y=H[F],$=Ba(Y,this),R.touch0&&R.touch0[2]===Y.identifier?R.touch0[0]=$:R.touch1&&R.touch1[2]===Y.identifier&&(R.touch1[0]=$);if(Y=R.that.__zoom,R.touch1){var G=R.touch0[0],Z=R.touch0[1],J=R.touch1[0],se=R.touch1[1],ie=(ie=J[0]-G[0])*ie+(ie=J[1]-G[1])*ie,re=(re=se[0]-Z[0])*re+(re=se[1]-Z[1])*re;Y=C(Y,Math.sqrt(ie/re)),$=[(G[0]+J[0])/2,(G[1]+J[1])/2],L=[(Z[0]+se[0])/2,(Z[1]+se[1])/2]}else if(R.touch0)$=R.touch0[0],L=R.touch0[1];else return;R.zoom("touch",n(O(Y,$,L),R.extent,s))}}function W(z,...V){if(this.__zooming){var R=N(this,V).event(z),H=z.changedTouches,q=H.length,F,Y;for(US(z),p&&clearTimeout(p),p=setTimeout(function(){p=null},b),F=0;F<q;++F)Y=H[F],R.touch0&&R.touch0[2]===Y.identifier?delete R.touch0:R.touch1&&R.touch1[2]===Y.identifier&&delete R.touch1;if(R.touch1&&!R.touch0&&(R.touch0=R.touch1,delete R.touch1),R.touch0)R.touch0[1]=this.__zoom.invert(R.touch0[0]);else if(R.end(),R.taps===2&&(Y=Ba(Y,this),Math.hypot(d[0]-Y[0],d[1]-Y[1])<S)){var $=Qr(this).on("dblclick.zoom");$&&$.apply(this,arguments)}}}return E.wheelDelta=function(z){return arguments.length?(r=typeof z=="function"?z:Jv(+z),E):r},E.filter=function(z){return arguments.length?(e=typeof z=="function"?z:Jv(!!z),E):e},E.touchable=function(z){return arguments.length?(a=typeof z=="function"?z:Jv(!!z),E):a},E.extent=function(z){return arguments.length?(t=typeof z=="function"?z:Jv([[+z[0][0],+z[0][1]],[+z[1][0],+z[1][1]]]),E):t},E.scaleExtent=function(z){return arguments.length?(i[0]=+z[0],i[1]=+z[1],E):[i[0],i[1]]},E.translateExtent=function(z){return arguments.length?(s[0][0]=+z[0][0],s[1][0]=+z[1][0],s[0][1]=+z[0][1],s[1][1]=+z[1][1],E):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},E.constrain=function(z){return arguments.length?(n=z,E):n},E.duration=function(z){return arguments.length?(c=+z,E):c},E.interpolate=function(z){return arguments.length?(u=z,E):u},E.on=function(){var z=f.on.apply(f,arguments);return z===f?E:z},E.clickDistance=function(z){return arguments.length?(x=(z=+z)*z,E):Math.sqrt(x)},E.tapDistance=function(z){return arguments.length?(S=+z,E):S},E}const Ri={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."},nm=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],_q=["Enter"," ","Escape"],jq={"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 kf;(function(e){e.Strict="strict",e.Loose="loose"})(kf||(kf={}));var hc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(hc||(hc={}));var rm;(function(e){e.Partial="partial",e.Full="full"})(rm||(rm={}));const Oq={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Ls;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Ls||(Ls={}));var Df;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Df||(Df={}));var De;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(De||(De={}));const r3={[De.Left]:De.Right,[De.Right]:De.Left,[De.Top]:De.Bottom,[De.Bottom]:De.Top};function Cq(e){return e===null?null:e?"valid":"invalid"}const Aq=e=>"id"in e&&"source"in e&&"target"in e,_Oe=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),RA=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),ep=(e,t=[0,0])=>{const{width:n,height:r}=Yo(e),a=e.origin??t,i=n*a[0],s=r*a[1];return{x:e.position.x-i,y:e.position.y-s}},jOe=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,a)=>{const i=typeof a=="string";let s=!t.nodeLookup&&!i?a:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(a):RA(a)?a:t.nodeLookup.get(a.id));const c=s?Uy(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return pb(r,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return vb(n)},tp=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(a=>{(t.filter===void 0||t.filter(a))&&(n=pb(n,Uy(a)),r=!0)}),r?vb(n):{x:0,y:0,width:0,height:0}},kA=(e,t,[n,r,a]=[0,0,1],i=!1,s=!1)=>{const c={...rp(t,[n,r,a]),width:t.width/a,height:t.height/a},u=[];for(const f of e.values()){const{measured:m,selectable:d=!0,hidden:p=!1}=f;if(s&&!d||p)continue;const b=m.width??f.width??f.initialWidth??null,w=m.height??f.height??f.initialHeight??null,x=am(c,Lf(f)),S=(b??0)*(w??0),E=i&&x>0;(!f.internals.handleBounds||E||x>=S||f.dragging)&&u.push(f)}return u},OOe=(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 COe(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(a=>a.id)):null;return e.forEach(a=>{a.measured.width&&a.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!a.hidden)&&(!r||r.has(a.id))&&n.set(a.id,a)}),n}async function AOe({nodes:e,width:t,height:n,panZoom:r,minZoom:a,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const c=COe(e,s),u=tp(c),f=DA(u,t,n,(s==null?void 0:s.minZoom)??a,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(f,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function Nq({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:a,onError:i}){const s=n.get(e),c=s.parentId?n.get(s.parentId):void 0,{x:u,y:f}=c?c.internals.positionAbsolute:{x:0,y:0},m=s.origin??r;let d=s.extent||a;if(s.extent==="parent"&&!s.expandParent)if(!c)i==null||i("005",Ri.error005());else{const b=c.measured.width,w=c.measured.height;b&&w&&(d=[[u,f],[u+b,f+w]])}else c&&zf(s.extent)&&(d=[[s.extent[0][0]+u,s.extent[0][1]+f],[s.extent[1][0]+u,s.extent[1][1]+f]]);const p=zf(d)?Rc(t,d,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",Ri.error015())),{position:{x:p.x-u+(s.measured.width??0)*m[0],y:p.y-f+(s.measured.height??0)*m[1]},positionAbsolute:p}}async function NOe({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:a}){const i=new Set(e.map(p=>p.id)),s=[];for(const p of n){if(p.deletable===!1)continue;const b=i.has(p.id),w=!b&&p.parentId&&s.find(x=>x.id===p.parentId);(b||w)&&s.push(p)}const c=new Set(t.map(p=>p.id)),u=r.filter(p=>p.deletable!==!1),m=OOe(s,u);for(const p of u)c.has(p.id)&&!m.find(w=>w.id===p.id)&&m.push(p);if(!a)return{edges:m,nodes:s};const d=await a({nodes:s,edges:m});return typeof d=="boolean"?d?{edges:m,nodes:s}:{edges:[],nodes:[]}:d}const If=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Rc=(e={x:0,y:0},t,n)=>({x:If(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:If(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function Tq(e,t,n){const{width:r,height:a}=Yo(n),{x:i,y:s}=n.internals.positionAbsolute;return Rc(e,[[i,s],[i+r,s+a]],t)}const a3=(e,t,n)=>e<t?If(Math.abs(e-t),1,t)/t:e>n?-If(Math.abs(e-n),1,t)/t:0,Pq=(e,t,n=15,r=40)=>{const a=a3(e.x,r,t.width-r)*n,i=a3(e.y,r,t.height-r)*n;return[a,i]},pb=(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)}),X_=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),vb=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Lf=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=RA(e)?e.internals.positionAbsolute:ep(e,t);return{x:n,y:r,width:((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Uy=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=RA(e)?e.internals.positionAbsolute:ep(e,t);return{x:n,y:r,x2:n+(((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},Mq=(e,t)=>vb(pb(X_(e),X_(t))),am=(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)},i3=e=>Ka(e.width)&&Ka(e.height)&&Ka(e.x)&&Ka(e.y),Ka=e=>!isNaN(e)&&isFinite(e),TOe=(e,t)=>{},np=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),rp=({x:e,y:t},[n,r,a],i=!1,s=[1,1])=>{const c={x:(e-n)/a,y:(t-r)/a};return i?np(c,s):c},Hy=({x:e,y:t},[n,r,a])=>({x:e*a+n,y:t*a+r});function Fu(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 POe(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Fu(e,n),a=Fu(e,t);return{top:r,right:a,bottom:r,left:a,x:a*2,y:r*2}}if(typeof e=="object"){const r=Fu(e.top??e.y??0,n),a=Fu(e.bottom??e.y??0,n),i=Fu(e.left??e.x??0,t),s=Fu(e.right??e.x??0,t);return{top:r,right:s,bottom:a,left:i,x:i+s,y:r+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function MOe(e,t,n,r,a,i){const{x:s,y:c}=Hy(e,[t,n,r]),{x:u,y:f}=Hy({x:e.x+e.width,y:e.y+e.height},[t,n,r]),m=a-u,d=i-f;return{left:Math.floor(s),top:Math.floor(c),right:Math.floor(m),bottom:Math.floor(d)}}const DA=(e,t,n,r,a,i)=>{const s=POe(i,t,n),c=(t-s.x)/e.width,u=(n-s.y)/e.height,f=Math.min(c,u),m=If(f,r,a),d=e.x+e.width/2,p=e.y+e.height/2,b=t/2-d*m,w=n/2-p*m,x=MOe(e,b,w,m,t,n),S={left:Math.min(x.left-s.left,0),top:Math.min(x.top-s.top,0),right:Math.min(x.right-s.right,0),bottom:Math.min(x.bottom-s.bottom,0)};return{x:b-S.left+S.right,y:w-S.top+S.bottom,zoom:m}},im=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function zf(e){return e!=null&&e!=="parent"}function Yo(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 Rq(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 kq(e,t={width:0,height:0},n,r,a){const i={...e},s=r.get(n);if(s){const c=s.origin||a;i.x+=s.internals.positionAbsolute.x-(t.width??0)*c[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*c[1]}return i}function o3(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function ROe(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function kOe(e){return{...jq,...e||{}}}function Th(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:a}){const{x:i,y:s}=Va(e),c=rp({x:i-((a==null?void 0:a.left)??0),y:s-((a==null?void 0:a.top)??0)},r),{x:u,y:f}=n?np(c,t):c;return{xSnapped:u,ySnapped:f,...c}}const IA=e=>({width:e.offsetWidth,height:e.offsetHeight}),Dq=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},DOe=["INPUT","SELECT","TEXTAREA"];function Iq(e){var r,a;const t=((a=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:a[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:DOe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Lq=e=>"clientX"in e,Va=(e,t)=>{var i,s;const n=Lq(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,a=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}},s3=(e,t,n,r,a)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const c=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:a,position:s.getAttribute("data-handlepos"),x:(c.left-n.left)/r,y:(c.top-n.top)/r,...IA(s)}})};function zq({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:a,sourceControlY:i,targetControlX:s,targetControlY:c}){const u=e*.125+a*.375+s*.375+n*.125,f=t*.125+i*.375+c*.375+r*.125,m=Math.abs(u-e),d=Math.abs(f-t);return[u,f,m,d]}function eg(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function l3({pos:e,x1:t,y1:n,x2:r,y2:a,c:i}){switch(e){case De.Left:return[t-eg(t-r,i),n];case De.Right:return[t+eg(r-t,i),n];case De.Top:return[t,n-eg(n-a,i)];case De.Bottom:return[t,n+eg(a-n,i)]}}function $q({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:a,targetPosition:i=De.Top,curvature:s=.25}){const[c,u]=l3({pos:n,x1:e,y1:t,x2:r,y2:a,c:s}),[f,m]=l3({pos:i,x1:r,y1:a,x2:e,y2:t,c:s}),[d,p,b,w]=zq({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:c,sourceControlY:u,targetControlX:f,targetControlY:m});return[`M${e},${t} C${c},${u} ${f},${m} ${r},${a}`,d,p,b,w]}function Bq({sourceX:e,sourceY:t,targetX:n,targetY:r}){const a=Math.abs(n-e)/2,i=n<e?n+a:n-a,s=Math.abs(r-t)/2,c=r<t?r+s:r-s;return[i,c,a,s]}function IOe({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:a=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=a&&n?r+1e3:r,c=Math.max(e.parentId||a&&e.selected?e.internals.z:0,t.parentId||a&&t.selected?t.internals.z:0);return s+c}function LOe({sourceNode:e,targetNode:t,width:n,height:r,transform:a}){const i=pb(Uy(e),Uy(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-a[0]/a[2],y:-a[1]/a[2],width:n/a[2],height:r/a[2]};return am(s,vb(i))>0}const zOe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,$Oe=(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)),BOe=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||zOe;let a;return Aq(e)?a={...e}:a={...e,id:r(e)},$Oe(a,t)?t:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,t.concat(a))};function Uq({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[a,i,s,c]=Bq({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,a,i,s,c]}const c3={[De.Left]:{x:-1,y:0},[De.Right]:{x:1,y:0},[De.Top]:{x:0,y:-1},[De.Bottom]:{x:0,y:1}},UOe=({source:e,sourcePosition:t=De.Bottom,target:n})=>t===De.Left||t===De.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},u3=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function HOe({source:e,sourcePosition:t=De.Bottom,target:n,targetPosition:r=De.Top,center:a,offset:i,stepPosition:s}){const c=c3[t],u=c3[r],f={x:e.x+c.x*i,y:e.y+c.y*i},m={x:n.x+u.x*i,y:n.y+u.y*i},d=UOe({source:f,sourcePosition:t,target:m}),p=d.x!==0?"x":"y",b=d[p];let w=[],x,S;const E={x:0,y:0},C={x:0,y:0},[,,O,A]=Bq({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(c[p]*u[p]===-1){p==="x"?(x=a.x??f.x+(m.x-f.x)*s,S=a.y??(f.y+m.y)/2):(x=a.x??(f.x+m.x)/2,S=a.y??f.y+(m.y-f.y)*s);const N=[{x,y:f.y},{x,y:m.y}],P=[{x:f.x,y:S},{x:m.x,y:S}];c[p]===b?w=p==="x"?N:P:w=p==="x"?P:N}else{const N=[{x:f.x,y:m.y}],P=[{x:m.x,y:f.y}];if(p==="x"?w=c.x===b?P:N:w=c.y===b?N:P,t===r){const I=Math.abs(e[p]-n[p]);if(I<=i){const W=Math.min(i-1,i-I);c[p]===b?E[p]=(f[p]>e[p]?-1:1)*W:C[p]=(m[p]>n[p]?-1:1)*W}}if(t!==r){const I=p==="x"?"y":"x",W=c[p]===u[I],z=f[I]>m[I],V=f[I]<m[I];(c[p]===1&&(!W&&z||W&&V)||c[p]!==1&&(!W&&V||W&&z))&&(w=p==="x"?N:P)}const k={x:f.x+E.x,y:f.y+E.y},D={x:m.x+C.x,y:m.y+C.y},K=Math.max(Math.abs(k.x-w[0].x),Math.abs(D.x-w[0].x)),B=Math.max(Math.abs(k.y-w[0].y),Math.abs(D.y-w[0].y));K>=B?(x=(k.x+D.x)/2,S=w[0].y):(x=w[0].x,S=(k.y+D.y)/2)}return[[e,{x:f.x+E.x,y:f.y+E.y},...w,{x:m.x+C.x,y:m.y+C.y},n],x,S,O,A]}function FOe(e,t,n,r){const a=Math.min(u3(e,t)/2,u3(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const f=e.x<n.x?-1:1,m=e.y<n.y?1:-1;return`L ${i+a*f},${s}Q ${i},${s} ${i},${s+a*m}`}const c=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${i},${s+a*u}Q ${i},${s} ${i+a*c},${s}`}function G_({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:a,targetPosition:i=De.Top,borderRadius:s=5,centerX:c,centerY:u,offset:f=20,stepPosition:m=.5}){const[d,p,b,w,x]=HOe({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:i,center:{x:c,y:u},offset:f,stepPosition:m});return[d.reduce((E,C,O)=>{let A="";return O>0&&O<d.length-1?A=FOe(d[O-1],C,d[O+1],s):A=`${O===0?"M":"L"}${C.x} ${C.y}`,E+=A,E},""),p,b,w,x]}function f3(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function qOe(e){var d;const{sourceNode:t,targetNode:n}=e;if(!f3(t)||!f3(n))return null;const r=t.internals.handleBounds||d3(t.handles),a=n.internals.handleBounds||d3(n.handles),i=h3((r==null?void 0:r.source)??[],e.sourceHandle),s=h3(e.connectionMode===kf.Strict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),e.targetHandle);if(!i||!s)return(d=e.onError)==null||d.call(e,"008",Ri.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(i==null?void 0:i.position)||De.Bottom,u=(s==null?void 0:s.position)||De.Top,f=kc(t,i,c),m=kc(n,s,u);return{sourceX:f.x,sourceY:f.y,targetX:m.x,targetY:m.y,sourcePosition:c,targetPosition:u}}function d3(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 kc(e,t,n=De.Left,r=!1){const a=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:c}=t??Yo(e);if(r)return{x:a+s/2,y:i+c/2};switch((t==null?void 0:t.position)??n){case De.Top:return{x:a+s/2,y:i};case De.Right:return{x:a+s,y:i+c/2};case De.Bottom:return{x:a+s/2,y:i+c};case De.Left:return{x:a,y:i+c/2}}}function h3(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function W_(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function KOe(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:a}){const i=new Set;return e.reduce((s,c)=>([c.markerStart||r,c.markerEnd||a].forEach(u=>{if(u&&typeof u=="object"){const f=W_(u,t);i.has(f)||(s.push({id:f,color:u.color||n,...u}),i.add(f))}}),s),[]).sort((s,c)=>s.id.localeCompare(c.id))}const Hq=1e3,VOe=10,LA={nodeOrigin:[0,0],nodeExtent:nm,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},YOe={...LA,checkEquality:!0};function zA(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function XOe(e,t,n){const r=zA(LA,n);for(const a of e.values())if(a.parentId)BA(a,e,t,r);else{const i=ep(a,r.nodeOrigin),s=zf(a.extent)?a.extent:r.nodeExtent,c=Rc(i,s,Yo(a));a.internals.positionAbsolute=c}}function GOe(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const a of e.handles){const i={id:a.id,width:a.width??1,height:a.height??1,nodeId:e.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?n.push(i):a.type==="target"&&r.push(i)}return{source:n,target:r}}function $A(e){return e==="manual"}function Q_(e,t,n,r={}){var f,m;const a=zA(YOe,r),i={i:0},s=new Map(t),c=a!=null&&a.elevateNodesOnSelect&&!$A(a.zIndexMode)?Hq:0;let u=e.length>0;t.clear(),n.clear();for(const d of e){let p=s.get(d.id);if(a.checkEquality&&d===(p==null?void 0:p.internals.userNode))t.set(d.id,p);else{const b=ep(d,a.nodeOrigin),w=zf(d.extent)?d.extent:a.nodeExtent,x=Rc(b,w,Yo(d));p={...a.defaults,...d,measured:{width:(f=d.measured)==null?void 0:f.width,height:(m=d.measured)==null?void 0:m.height},internals:{positionAbsolute:x,handleBounds:GOe(d,p),z:Fq(d,c,a.zIndexMode),userNode:d}},t.set(d.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(u=!1),d.parentId&&BA(p,t,n,r,i)}return u}function WOe(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 BA(e,t,n,r,a){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:c,zIndexMode:u}=zA(LA,r),f=e.parentId,m=t.get(f);if(!m){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}WOe(e,n),a&&!m.parentId&&m.internals.rootParentIndex===void 0&&u==="auto"&&(m.internals.rootParentIndex=++a.i,m.internals.z=m.internals.z+a.i*VOe),a&&m.internals.rootParentIndex!==void 0&&(a.i=m.internals.rootParentIndex);const d=i&&!$A(u)?Hq:0,{x:p,y:b,z:w}=QOe(e,m,s,c,d,u),{positionAbsolute:x}=e.internals,S=p!==x.x||b!==x.y;(S||w!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:p,y:b}:x,z:w}})}function Fq(e,t,n){const r=Ka(e.zIndex)?e.zIndex:0;return $A(n)?r:r+(e.selected?t:0)}function QOe(e,t,n,r,a,i){const{x:s,y:c}=t.internals.positionAbsolute,u=Yo(e),f=ep(e,n),m=zf(e.extent)?Rc(f,e.extent,u):f;let d=Rc({x:s+m.x,y:c+m.y},r,u);e.extent==="parent"&&(d=Tq(d,u,t));const p=Fq(e,a,i),b=t.internals.z??0;return{x:d.x,y:d.y,z:b>=p?b+1:p}}function UA(e,t,n,r=[0,0]){var s;const a=[],i=new Map;for(const c of e){const u=t.get(c.parentId);if(!u)continue;const f=((s=i.get(c.parentId))==null?void 0:s.expandedRect)??Lf(u),m=Mq(f,c.rect);i.set(c.parentId,{expandedRect:m,parent:u})}return i.size>0&&i.forEach(({expandedRect:c,parent:u},f)=>{var O;const m=u.internals.positionAbsolute,d=Yo(u),p=u.origin??r,b=c.x<m.x?Math.round(Math.abs(m.x-c.x)):0,w=c.y<m.y?Math.round(Math.abs(m.y-c.y)):0,x=Math.max(d.width,Math.round(c.width)),S=Math.max(d.height,Math.round(c.height)),E=(x-d.width)*p[0],C=(S-d.height)*p[1];(b>0||w>0||E||C)&&(a.push({id:f,type:"position",position:{x:u.position.x-b+E,y:u.position.y-w+C}}),(O=n.get(f))==null||O.forEach(A=>{e.some(T=>T.id===A.id)||a.push({id:A.id,type:"position",position:{x:A.position.x+b,y:A.position.y+w}})})),(d.width<c.width||d.height<c.height||b||w)&&a.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:x+(b?p[0]*b-E:0),height:S+(w?p[1]*w-C:0)}})}),a}function ZOe(e,t,n,r,a,i,s){const c=r==null?void 0:r.querySelector(".xyflow__viewport");let u=!1;if(!c)return{changes:[],updatedInternals:u};const f=[],m=window.getComputedStyle(c),{m22:d}=new window.DOMMatrixReadOnly(m.transform),p=[];for(const b of e.values()){const w=t.get(b.id);if(!w)continue;if(w.hidden){t.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),u=!0;continue}const x=IA(b.nodeElement),S=w.measured.width!==x.width||w.measured.height!==x.height;if(!!(x.width&&x.height&&(S||!w.internals.handleBounds||b.force))){const C=b.nodeElement.getBoundingClientRect(),O=zf(w.extent)?w.extent:i;let{positionAbsolute:A}=w.internals;w.parentId&&w.extent==="parent"?A=Tq(A,x,t.get(w.parentId)):O&&(A=Rc(A,O,x));const T={...w,measured:x,internals:{...w.internals,positionAbsolute:A,handleBounds:{source:s3("source",b.nodeElement,C,d,w.id),target:s3("target",b.nodeElement,C,d,w.id)}}};t.set(w.id,T),w.parentId&&BA(T,t,n,{nodeOrigin:a,zIndexMode:s}),u=!0,S&&(f.push({id:w.id,type:"dimensions",dimensions:x}),w.expandParent&&w.parentId&&p.push({id:w.id,parentId:w.parentId,rect:Lf(T,a)}))}}if(p.length>0){const b=UA(p,t,n,a);f.push(...b)}return{changes:f,updatedInternals:u}}async function JOe({delta:e,panZoom:t,transform:n,translateExtent:r,width:a,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[a,i]],r),c=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(c)}function m3(e,t,n,r,a,i){let s=a;const c=r.get(s)||new Map;r.set(s,c.set(n,t)),s=`${a}-${e}`;const u=r.get(s)||new Map;if(r.set(s,u.set(n,t)),i){s=`${a}-${e}-${i}`;const f=r.get(s)||new Map;r.set(s,f.set(n,t))}}function qq(e,t,n){e.clear(),t.clear();for(const r of n){const{source:a,target:i,sourceHandle:s=null,targetHandle:c=null}=r,u={edgeId:r.id,source:a,target:i,sourceHandle:s,targetHandle:c},f=`${a}-${s}--${i}-${c}`,m=`${i}-${c}--${a}-${s}`;m3("source",u,m,e,a,s),m3("target",u,f,e,i,c),t.set(r.id,r)}}function Kq(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Kq(n,t):!1}function p3(e,t,n){var a;let r=e;do{if((a=r==null?void 0:r.matches)!=null&&a.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function eCe(e,t,n,r){const a=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!Kq(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const c=e.get(i);c&&a.set(i,{id:i,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return a}function HS({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,c,u;const a=[];for(const[f,m]of t){const d=(s=n.get(f))==null?void 0:s.internals.userNode;d&&a.push({...d,position:m.position,dragging:r})}if(!e)return[a[0],a];const i=(c=n.get(e))==null?void 0:c.internals.userNode;return[i?{...i,position:((u=t.get(e))==null?void 0:u.position)||i.position,dragging:r}:a[0],a]}function tCe({dragItems:e,snapGrid:t,x:n,y:r}){const a=e.values().next().value;if(!a)return null;const i={x:n-a.distance.x,y:r-a.distance.y},s=np(i,t);return{x:s.x-i.x,y:s.y-i.y}}function nCe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:a}){let i={x:null,y:null},s=0,c=new Map,u=!1,f={x:0,y:0},m=null,d=!1,p=null,b=!1,w=!1,x=null;function S({noDragClassName:C,handleSelector:O,domNode:A,isSelectable:T,nodeId:N,nodeClickDistance:P=0}){p=Qr(A);function k({x:I,y:W}){const{nodeLookup:z,nodeExtent:V,snapGrid:R,snapToGrid:H,nodeOrigin:q,onNodeDrag:F,onSelectionDrag:Y,onError:$,updateNodePositions:L}=t();i={x:I,y:W};let G=!1;const Z=c.size>1,J=Z&&V?X_(tp(c)):null,se=Z&&H?tCe({dragItems:c,snapGrid:R,x:I,y:W}):null;for(const[ie,re]of c){if(!z.has(ie))continue;let ee={x:I-re.distance.x,y:W-re.distance.y};H&&(ee=se?{x:Math.round(ee.x+se.x),y:Math.round(ee.y+se.y)}:np(ee,R));let le=null;if(Z&&V&&!re.extent&&J){const{positionAbsolute:ge}=re.internals,be=ge.x-J.x+V[0][0],Ie=ge.x+re.measured.width-J.x2+V[1][0],Pe=ge.y-J.y+V[0][1],Ve=ge.y+re.measured.height-J.y2+V[1][1];le=[[be,Pe],[Ie,Ve]]}const{position:me,positionAbsolute:ne}=Nq({nodeId:ie,nextPosition:ee,nodeLookup:z,nodeExtent:le||V,nodeOrigin:q,onError:$});G=G||re.position.x!==me.x||re.position.y!==me.y,re.position=me,re.internals.positionAbsolute=ne}if(w=w||G,!!G&&(L(c,!0),x&&(r||F||!N&&Y))){const[ie,re]=HS({nodeId:N,dragItems:c,nodeLookup:z});r==null||r(x,c,ie,re),F==null||F(x,ie,re),N||Y==null||Y(x,re)}}async function D(){if(!m)return;const{transform:I,panBy:W,autoPanSpeed:z,autoPanOnNodeDrag:V}=t();if(!V){u=!1,cancelAnimationFrame(s);return}const[R,H]=Pq(f,m,z);(R!==0||H!==0)&&(i.x=(i.x??0)-R/I[2],i.y=(i.y??0)-H/I[2],await W({x:R,y:H})&&k(i)),s=requestAnimationFrame(D)}function K(I){var Z;const{nodeLookup:W,multiSelectionActive:z,nodesDraggable:V,transform:R,snapGrid:H,snapToGrid:q,selectNodesOnDrag:F,onNodeDragStart:Y,onSelectionDragStart:$,unselectNodesAndEdges:L}=t();d=!0,(!F||!T)&&!z&&N&&((Z=W.get(N))!=null&&Z.selected||L()),T&&F&&N&&(e==null||e(N));const G=Th(I.sourceEvent,{transform:R,snapGrid:H,snapToGrid:q,containerBounds:m});if(i=G,c=eCe(W,V,G,N),c.size>0&&(n||Y||!N&&$)){const[J,se]=HS({nodeId:N,dragItems:c,nodeLookup:W});n==null||n(I.sourceEvent,c,J,se),Y==null||Y(I.sourceEvent,J,se),N||$==null||$(I.sourceEvent,se)}}const B=mq().clickDistance(P).on("start",I=>{const{domNode:W,nodeDragThreshold:z,transform:V,snapGrid:R,snapToGrid:H}=t();m=(W==null?void 0:W.getBoundingClientRect())||null,b=!1,w=!1,x=I.sourceEvent,z===0&&K(I),i=Th(I.sourceEvent,{transform:V,snapGrid:R,snapToGrid:H,containerBounds:m}),f=Va(I.sourceEvent,m)}).on("drag",I=>{const{autoPanOnNodeDrag:W,transform:z,snapGrid:V,snapToGrid:R,nodeDragThreshold:H,nodeLookup:q}=t(),F=Th(I.sourceEvent,{transform:z,snapGrid:V,snapToGrid:R,containerBounds:m});if(x=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||N&&!q.has(N))&&(b=!0),!b){if(!u&&W&&d&&(u=!0,D()),!d){const Y=Va(I.sourceEvent,m),$=Y.x-f.x,L=Y.y-f.y;Math.sqrt($*$+L*L)>H&&K(I)}(i.x!==F.xSnapped||i.y!==F.ySnapped)&&c&&d&&(f=Va(I.sourceEvent,m),k(F))}}).on("end",I=>{if(!(!d||b)&&(u=!1,d=!1,cancelAnimationFrame(s),c.size>0)){const{nodeLookup:W,updateNodePositions:z,onNodeDragStop:V,onSelectionDragStop:R}=t();if(w&&(z(c,!1),w=!1),a||V||!N&&R){const[H,q]=HS({nodeId:N,dragItems:c,nodeLookup:W,dragging:!1});a==null||a(I.sourceEvent,c,H,q),V==null||V(I.sourceEvent,H,q),N||R==null||R(I.sourceEvent,q)}}}).filter(I=>{const W=I.target;return!I.button&&(!C||!p3(W,`.${C}`,A))&&(!O||p3(W,O,A))});p.call(B)}function E(){p==null||p.on(".drag",null)}return{update:S,destroy:E}}function rCe(e,t,n){const r=[],a={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())am(a,Lf(i))>0&&r.push(i);return r}const aCe=250;function iCe(e,t,n,r){var c,u;let a=[],i=1/0;const s=rCe(e,n,t+aCe);for(const f of s){const m=[...((c=f.internals.handleBounds)==null?void 0:c.source)??[],...((u=f.internals.handleBounds)==null?void 0:u.target)??[]];for(const d of m){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:p,y:b}=kc(f,d,d.position,!0),w=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(b-e.y,2));w>t||(w<i?(a=[{...d,x:p,y:b}],i=w):w===i&&a.push({...d,x:p,y:b}))}}if(!a.length)return null;if(a.length>1){const f=r.type==="source"?"target":"source";return a.find(m=>m.type===f)??a[0]}return a[0]}function Vq(e,t,n,r,a,i=!1){var f,m,d;const s=r.get(e);if(!s)return null;const c=a==="strict"?(f=s.internals.handleBounds)==null?void 0:f[t]:[...((m=s.internals.handleBounds)==null?void 0:m.source)??[],...((d=s.internals.handleBounds)==null?void 0:d.target)??[]],u=(n?c==null?void 0:c.find(p=>p.id===n):c==null?void 0:c[0])??null;return u&&i?{...u,...kc(s,u,u.position,!0)}:u}function Yq(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function oCe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Xq=()=>!0;function sCe(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:a,edgeUpdaterType:i,isTarget:s,domNode:c,nodeLookup:u,lib:f,autoPanOnConnect:m,flowId:d,panBy:p,cancelConnection:b,onConnectStart:w,onConnect:x,onConnectEnd:S,isValidConnection:E=Xq,onReconnectEnd:C,updateConnection:O,getTransform:A,getFromHandle:T,autoPanSpeed:N,dragThreshold:P=1,handleDomNode:k}){const D=Dq(e.target);let K=0,B;const{x:I,y:W}=Va(e),z=Yq(i,k),V=c==null?void 0:c.getBoundingClientRect();let R=!1;if(!V||!z)return;const H=Vq(a,z,r,u,t);if(!H)return;let q=Va(e,V),F=!1,Y=null,$=!1,L=null;function G(){if(!m||!V)return;const[me,ne]=Pq(q,V,N);p({x:me,y:ne}),K=requestAnimationFrame(G)}const Z={...H,nodeId:a,type:z,position:H.position},J=u.get(a);let ie={inProgress:!0,isValid:null,from:kc(J,Z,De.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:J,to:q,toHandle:null,toPosition:r3[Z.position],toNode:null,pointer:q};function re(){R=!0,O(ie),w==null||w(e,{nodeId:a,handleId:r,handleType:z})}P===0&&re();function ee(me){if(!R){const{x:Ve,y:Xt}=Va(me),dt=Ve-I,Jn=Xt-W;if(!(dt*dt+Jn*Jn>P*P))return;re()}if(!T()||!Z){le(me);return}const ne=A();q=Va(me,V),B=iCe(rp(q,ne,!1,[1,1]),n,u,Z),F||(G(),F=!0);const ge=Gq(me,{handle:B,connectionMode:t,fromNodeId:a,fromHandleId:r,fromType:s?"target":"source",isValidConnection:E,doc:D,lib:f,flowId:d,nodeLookup:u});L=ge.handleDomNode,Y=ge.connection,$=oCe(!!B,ge.isValid);const be=u.get(a),Ie=be?kc(be,Z,De.Left,!0):ie.from,Pe={...ie,from:Ie,isValid:$,to:ge.toHandle&&$?Hy({x:ge.toHandle.x,y:ge.toHandle.y},ne):q,toHandle:ge.toHandle,toPosition:$&&ge.toHandle?ge.toHandle.position:r3[Z.position],toNode:ge.toHandle?u.get(ge.toHandle.nodeId):null,pointer:q};O(Pe),ie=Pe}function le(me){if(!("touches"in me&&me.touches.length>0)){if(R){(B||L)&&Y&&$&&(x==null||x(Y));const{inProgress:ne,...ge}=ie,be={...ge,toPosition:ie.toHandle?ie.toPosition:null};S==null||S(me,be),i&&(C==null||C(me,be))}b(),cancelAnimationFrame(K),F=!1,$=!1,Y=null,L=null,D.removeEventListener("mousemove",ee),D.removeEventListener("mouseup",le),D.removeEventListener("touchmove",ee),D.removeEventListener("touchend",le)}}D.addEventListener("mousemove",ee),D.addEventListener("mouseup",le),D.addEventListener("touchmove",ee),D.addEventListener("touchend",le)}function Gq(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:a,fromType:i,doc:s,lib:c,flowId:u,isValidConnection:f=Xq,nodeLookup:m}){const d=i==="target",p=t?s.querySelector(`.${c}-flow__handle[data-id="${u}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:b,y:w}=Va(e),x=s.elementFromPoint(b,w),S=x!=null&&x.classList.contains(`${c}-flow__handle`)?x:p,E={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const C=Yq(void 0,S),O=S.getAttribute("data-nodeid"),A=S.getAttribute("data-handleid"),T=S.classList.contains("connectable"),N=S.classList.contains("connectableend");if(!O||!C)return E;const P={source:d?O:r,sourceHandle:d?A:a,target:d?r:O,targetHandle:d?a:A};E.connection=P;const D=T&&N&&(n===kf.Strict?d&&C==="source"||!d&&C==="target":O!==r||A!==a);E.isValid=D&&f(P),E.toHandle=Vq(O,C,A,m,n,!0)}return E}const Z_={onPointerDown:sCe,isValid:Gq};function lCe({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const a=Qr(e);function i({translateExtent:c,width:u,height:f,zoomStep:m=1,pannable:d=!0,zoomable:p=!0,inversePan:b=!1}){const w=O=>{if(O.sourceEvent.type!=="wheel"||!t)return;const A=n(),T=O.sourceEvent.ctrlKey&&im()?10:1,N=-O.sourceEvent.deltaY*(O.sourceEvent.deltaMode===1?.05:O.sourceEvent.deltaMode?1:.002)*m,P=A[2]*Math.pow(2,N*T);t.scaleTo(P)};let x=[0,0];const S=O=>{(O.sourceEvent.type==="mousedown"||O.sourceEvent.type==="touchstart")&&(x=[O.sourceEvent.clientX??O.sourceEvent.touches[0].clientX,O.sourceEvent.clientY??O.sourceEvent.touches[0].clientY])},E=O=>{const A=n();if(O.sourceEvent.type!=="mousemove"&&O.sourceEvent.type!=="touchmove"||!t)return;const T=[O.sourceEvent.clientX??O.sourceEvent.touches[0].clientX,O.sourceEvent.clientY??O.sourceEvent.touches[0].clientY],N=[T[0]-x[0],T[1]-x[1]];x=T;const P=r()*Math.max(A[2],Math.log(A[2]))*(b?-1:1),k={x:A[0]-N[0]*P,y:A[1]-N[1]*P},D=[[0,0],[u,f]];t.setViewportConstrained({x:k.x,y:k.y,zoom:A[2]},D,c)},C=Eq().on("start",S).on("zoom",d?E:null).on("zoom.wheel",p?w:null);a.call(C,{})}function s(){a.on("zoom",null)}return{update:i,destroy:s,pointer:Ba}}const gb=e=>({x:e.x,y:e.y,zoom:e.k}),FS=({x:e,y:t,zoom:n})=>mb.translate(e,t).scale(n),Zu=(e,t)=>e.target.closest(`.${t}`),Wq=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),cCe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,qS=(e,t=0,n=cCe,r=()=>{})=>{const a=typeof t=="number"&&t>0;return a||r(),a?e.transition().duration(t).ease(n).on("end",r):e},Qq=e=>{const t=e.ctrlKey&&im()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function uCe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:a,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:c,onPanZoom:u,onPanZoomEnd:f}){return m=>{if(Zu(m,t))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(m.ctrlKey&&s){const S=Ba(m),E=Qq(m),C=d*Math.pow(2,E);r.scaleTo(n,C,S,m);return}const p=m.deltaMode===1?20:1;let b=a===hc.Vertical?0:m.deltaX*p,w=a===hc.Horizontal?0:m.deltaY*p;!im()&&m.shiftKey&&a!==hc.Vertical&&(b=m.deltaY*p,w=0),r.translateBy(n,-(b/d)*i,-(w/d)*i,{internal:!0});const x=gb(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(u==null||u(m,x),e.panScrollTimeout=setTimeout(()=>{f==null||f(m,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,c==null||c(m,x))}}function fCe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,a){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,c=Zu(r,e);if(r.ctrlKey&&i&&c&&r.preventDefault(),s||c)return null;r.preventDefault(),n.call(this,r,a)}}function dCe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,c;if((i=r.sourceEvent)!=null&&i.internal)return;const a=gb(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=a,((c=r.sourceEvent)==null?void 0:c.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,a))}}function hCe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:a}){return i=>{var s,c;e.usedRightMouseButton=!!(n&&Wq(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),a&&!((c=i.sourceEvent)!=null&&c.internal)&&(a==null||a(i.sourceEvent,gb(i.transform)))}}function mCe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:a,onPaneContextMenu:i}){return s=>{var c;if(!((c=s.sourceEvent)!=null&&c.internal)&&(e.isZoomingOrPanning=!1,i&&Wq(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),a)){const u=gb(s.transform);e.prevViewport=u,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a==null||a(s.sourceEvent,u)},n?150:0)}}}function pCe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:a,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:c,noPanClassName:u,lib:f,connectionInProgress:m}){return d=>{var S;const p=e||t,b=n&&d.ctrlKey,w=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Zu(d,`${f}-flow__node`)||Zu(d,`${f}-flow__edge`)))return!0;if(!r&&!p&&!a&&!i&&!n||s||m&&!w||Zu(d,c)&&w||Zu(d,u)&&(!w||a&&w&&!e)||!n&&d.ctrlKey&&w)return!1;if(!n&&d.type==="touchstart"&&((S=d.touches)==null?void 0:S.length)>1)return d.preventDefault(),!1;if(!p&&!a&&!b&&w||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const x=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||w)&&x}}function vCe({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:a,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:c,onDraggingChange:u}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=e.getBoundingClientRect(),d=Eq().scaleExtent([t,n]).translateExtent(r),p=Qr(e).call(d);C({x:a.x,y:a.y,zoom:If(a.zoom,t,n)},[[0,0],[m.width,m.height]],r);const b=p.on("wheel.zoom"),w=p.on("dblclick.zoom");d.wheelDelta(Qq);function x(B,I){return p?new Promise(W=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?jo:vg).transform(qS(p,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function S({noWheelClassName:B,noPanClassName:I,onPaneContextMenu:W,userSelectionActive:z,panOnScroll:V,panOnDrag:R,panOnScrollMode:H,panOnScrollSpeed:q,preventScrolling:F,zoomOnPinch:Y,zoomOnScroll:$,zoomOnDoubleClick:L,zoomActivationKeyPressed:G,lib:Z,onTransformChange:J,connectionInProgress:se,paneClickDistance:ie,selectionOnDrag:re}){z&&!f.isZoomingOrPanning&&E();const ee=V&&!G&&!z;d.clickDistance(re?1/0:!Ka(ie)||ie<0?0:ie);const le=ee?uCe({zoomPanValues:f,noWheelClassName:B,d3Selection:p,d3Zoom:d,panOnScrollMode:H,panOnScrollSpeed:q,zoomOnPinch:Y,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:c}):fCe({noWheelClassName:B,preventScrolling:F,d3ZoomHandler:b});if(p.on("wheel.zoom",le,{passive:!1}),!z){const ne=dCe({zoomPanValues:f,onDraggingChange:u,onPanZoomStart:s});d.on("start",ne);const ge=hCe({zoomPanValues:f,panOnDrag:R,onPaneContextMenu:!!W,onPanZoom:i,onTransformChange:J});d.on("zoom",ge);const be=mCe({zoomPanValues:f,panOnDrag:R,panOnScroll:V,onPaneContextMenu:W,onPanZoomEnd:c,onDraggingChange:u});d.on("end",be)}const me=pCe({zoomActivationKeyPressed:G,panOnDrag:R,zoomOnScroll:$,panOnScroll:V,zoomOnDoubleClick:L,zoomOnPinch:Y,userSelectionActive:z,noPanClassName:I,noWheelClassName:B,lib:Z,connectionInProgress:se});d.filter(me),L?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function E(){d.on("zoom",null)}async function C(B,I,W){const z=FS(B),V=d==null?void 0:d.constrain()(z,I,W);return V&&await x(V),new Promise(R=>R(V))}async function O(B,I){const W=FS(B);return await x(W,I),new Promise(z=>z(W))}function A(B){if(p){const I=FS(B),W=p.property("__zoom");(W.k!==B.zoom||W.x!==B.x||W.y!==B.y)&&(d==null||d.transform(p,I,null,{sync:!0}))}}function T(){const B=p?Sq(p.node()):{x:0,y:0,k:1};return{x:B.x,y:B.y,zoom:B.k}}function N(B,I){return p?new Promise(W=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?jo:vg).scaleTo(qS(p,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function P(B,I){return p?new Promise(W=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?jo:vg).scaleBy(qS(p,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function k(B){d==null||d.scaleExtent(B)}function D(B){d==null||d.translateExtent(B)}function K(B){const I=!Ka(B)||B<0?0:B;d==null||d.clickDistance(I)}return{update:S,destroy:E,setViewport:O,setViewportConstrained:C,getViewport:T,scaleTo:N,scaleBy:P,setScaleExtent:k,setTranslateExtent:D,syncViewport:A,setClickDistance:K}}var $f;(function(e){e.Line="line",e.Handle="handle"})($f||($f={}));function gCe({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:a,affectsY:i}){const s=e-t,c=n-r,u=[s>0?1:s<0?-1:0,c>0?1:c<0?-1:0];return s&&a&&(u[0]=u[0]*-1),c&&i&&(u[1]=u[1]*-1),u}function v3(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),a=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:a}}function Ns(e,t){return Math.max(0,t-e)}function Ts(e,t){return Math.max(0,e-t)}function tg(e,t,n){return Math.max(0,t-e,e-n)}function g3(e,t){return e?!t:t}function yCe(e,t,n,r,a,i,s,c){let{affectsX:u,affectsY:f}=t;const{isHorizontal:m,isVertical:d}=t,p=m&&d,{xSnapped:b,ySnapped:w}=n,{minWidth:x,maxWidth:S,minHeight:E,maxHeight:C}=r,{x:O,y:A,width:T,height:N,aspectRatio:P}=e;let k=Math.floor(m?b-e.pointerX:0),D=Math.floor(d?w-e.pointerY:0);const K=T+(u?-k:k),B=N+(f?-D:D),I=-i[0]*T,W=-i[1]*N;let z=tg(K,x,S),V=tg(B,E,C);if(s){let q=0,F=0;u&&k<0?q=Ns(O+k+I,s[0][0]):!u&&k>0&&(q=Ts(O+K+I,s[1][0])),f&&D<0?F=Ns(A+D+W,s[0][1]):!f&&D>0&&(F=Ts(A+B+W,s[1][1])),z=Math.max(z,q),V=Math.max(V,F)}if(c){let q=0,F=0;u&&k>0?q=Ts(O+k,c[0][0]):!u&&k<0&&(q=Ns(O+K,c[1][0])),f&&D>0?F=Ts(A+D,c[0][1]):!f&&D<0&&(F=Ns(A+B,c[1][1])),z=Math.max(z,q),V=Math.max(V,F)}if(a){if(m){const q=tg(K/P,E,C)*P;if(z=Math.max(z,q),s){let F=0;!u&&!f||u&&!f&&p?F=Ts(A+W+K/P,s[1][1])*P:F=Ns(A+W+(u?k:-k)/P,s[0][1])*P,z=Math.max(z,F)}if(c){let F=0;!u&&!f||u&&!f&&p?F=Ns(A+K/P,c[1][1])*P:F=Ts(A+(u?k:-k)/P,c[0][1])*P,z=Math.max(z,F)}}if(d){const q=tg(B*P,x,S)/P;if(V=Math.max(V,q),s){let F=0;!u&&!f||f&&!u&&p?F=Ts(O+B*P+I,s[1][0])/P:F=Ns(O+(f?D:-D)*P+I,s[0][0])/P,V=Math.max(V,F)}if(c){let F=0;!u&&!f||f&&!u&&p?F=Ns(O+B*P,c[1][0])/P:F=Ts(O+(f?D:-D)*P,c[0][0])/P,V=Math.max(V,F)}}}D=D+(D<0?V:-V),k=k+(k<0?z:-z),a&&(p?K>B*P?D=(g3(u,f)?-k:k)/P:k=(g3(u,f)?-D:D)*P:m?(D=k/P,f=u):(k=D*P,u=f));const R=u?O+k:O,H=f?A+D:A;return{width:T+(u?-k:k),height:N+(f?-D:D),x:i[0]*k*(u?-1:1)+R,y:i[1]*D*(f?-1:1)+H}}const Zq={width:0,height:0,x:0,y:0},bCe={...Zq,pointerX:0,pointerY:0,aspectRatio:1};function xCe(e){return[[0,0],[e.measured.width,e.measured.height]]}function wCe(e,t,n){const r=t.position.x+e.position.x,a=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,c=n[0]*i,u=n[1]*s;return[[r-c,a-u],[r+i-c,a+s-u]]}function SCe({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:a}){const i=Qr(e);let s={controlDirection:v3("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:f,boundaries:m,keepAspectRatio:d,resizeDirection:p,onResizeStart:b,onResize:w,onResizeEnd:x,shouldResize:S}){let E={...Zq},C={...bCe};s={boundaries:m,resizeDirection:p,keepAspectRatio:d,controlDirection:v3(f)};let O,A=null,T=[],N,P,k,D=!1;const K=mq().on("start",B=>{const{nodeLookup:I,transform:W,snapGrid:z,snapToGrid:V,nodeOrigin:R,paneDomNode:H}=n();if(O=I.get(t),!O)return;A=(H==null?void 0:H.getBoundingClientRect())??null;const{xSnapped:q,ySnapped:F}=Th(B.sourceEvent,{transform:W,snapGrid:z,snapToGrid:V,containerBounds:A});E={width:O.measured.width??0,height:O.measured.height??0,x:O.position.x??0,y:O.position.y??0},C={...E,pointerX:q,pointerY:F,aspectRatio:E.width/E.height},N=void 0,O.parentId&&(O.extent==="parent"||O.expandParent)&&(N=I.get(O.parentId),P=N&&O.extent==="parent"?xCe(N):void 0),T=[],k=void 0;for(const[Y,$]of I)if($.parentId===t&&(T.push({id:Y,position:{...$.position},extent:$.extent}),$.extent==="parent"||$.expandParent)){const L=wCe($,O,$.origin??R);k?k=[[Math.min(L[0][0],k[0][0]),Math.min(L[0][1],k[0][1])],[Math.max(L[1][0],k[1][0]),Math.max(L[1][1],k[1][1])]]:k=L}b==null||b(B,{...E})}).on("drag",B=>{const{transform:I,snapGrid:W,snapToGrid:z,nodeOrigin:V}=n(),R=Th(B.sourceEvent,{transform:I,snapGrid:W,snapToGrid:z,containerBounds:A}),H=[];if(!O)return;const{x:q,y:F,width:Y,height:$}=E,L={},G=O.origin??V,{width:Z,height:J,x:se,y:ie}=yCe(C,s.controlDirection,R,s.boundaries,s.keepAspectRatio,G,P,k),re=Z!==Y,ee=J!==$,le=se!==q&&re,me=ie!==F&&ee;if(!le&&!me&&!re&&!ee)return;if((le||me||G[0]===1||G[1]===1)&&(L.x=le?se:E.x,L.y=me?ie:E.y,E.x=L.x,E.y=L.y,T.length>0)){const Ie=se-q,Pe=ie-F;for(const Ve of T)Ve.position={x:Ve.position.x-Ie+G[0]*(Z-Y),y:Ve.position.y-Pe+G[1]*(J-$)},H.push(Ve)}if((re||ee)&&(L.width=re&&(!s.resizeDirection||s.resizeDirection==="horizontal")?Z:E.width,L.height=ee&&(!s.resizeDirection||s.resizeDirection==="vertical")?J:E.height,E.width=L.width,E.height=L.height),N&&O.expandParent){const Ie=G[0]*(L.width??0);L.x&&L.x<Ie&&(E.x=Ie,C.x=C.x-(L.x-Ie));const Pe=G[1]*(L.height??0);L.y&&L.y<Pe&&(E.y=Pe,C.y=C.y-(L.y-Pe))}const ne=gCe({width:E.width,prevWidth:Y,height:E.height,prevHeight:$,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ge={...E,direction:ne};(S==null?void 0:S(B,ge))!==!1&&(D=!0,w==null||w(B,ge),r(L,H))}).on("end",B=>{D&&(x==null||x(B,{...E}),a==null||a({...E}),D=!1)});i.call(K)}function u(){i.on(".drag",null)}return{update:c,destroy:u}}const ECe={},y3=e=>{let t;const n=new Set,r=(m,d)=>{const p=typeof m=="function"?m(t):m;if(!Object.is(p,t)){const b=t;t=d??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(w=>w(t,b))}},a=()=>t,u={setState:r,getState:a,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(ECe?"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,a,u);return u},_Ce=e=>e?y3(e):y3,{useDebugValue:jCe}=ye,{useSyncExternalStoreWithSelector:OCe}=qoe,CCe=e=>e;function Jq(e,t=CCe,n){const r=OCe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return jCe(r),r}const b3=(e,t)=>{const n=_Ce(e),r=(a,i=t)=>Jq(n,a,i);return Object.assign(r,n),r},ACe=(e,t)=>e?b3(e,t):b3;function Ft(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,a]of e)if(!Object.is(a,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 yb=y.createContext(null),NCe=yb.Provider,e9=Ri.error001();function ot(e,t){const n=y.useContext(yb);if(n===null)throw new Error(e9);return Jq(n,e,t)}function Kt(){const e=y.useContext(yb);if(e===null)throw new Error(e9);return y.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const x3={display:"none"},TCe={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},t9="react-flow__node-desc",n9="react-flow__edge-desc",PCe="react-flow__aria-live",MCe=e=>e.ariaLiveMessage,RCe=e=>e.ariaLabelConfig;function kCe({rfId:e}){const t=ot(MCe);return v.jsx("div",{id:`${PCe}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:TCe,children:t})}function DCe({rfId:e,disableKeyboardA11y:t}){const n=ot(RCe);return v.jsxs(v.Fragment,{children:[v.jsx("div",{id:`${t9}-${e}`,style:x3,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),v.jsx("div",{id:`${n9}-${e}`,style:x3,children:n["edge.a11yDescription.default"]}),!t&&v.jsx(kCe,{rfId:e})]})}const bb=y.forwardRef(({position:e="top-left",children:t,className:n,style:r,...a},i)=>{const s=`${e}`.split("-");return v.jsx("div",{className:xn(["react-flow__panel",n,...s]),style:r,ref:i,...a,children:t})});bb.displayName="Panel";function ICe({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:v.jsx(bb,{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:v.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const LCe=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}},ng=e=>e.id;function zCe(e,t){return Ft(e.selectedNodes.map(ng),t.selectedNodes.map(ng))&&Ft(e.selectedEdges.map(ng),t.selectedEdges.map(ng))}function $Ce({onSelectionChange:e}){const t=Kt(),{selectedNodes:n,selectedEdges:r}=ot(LCe,zCe);return y.useEffect(()=>{const a={nodes:n,edges:r};e==null||e(a),t.getState().onSelectionChangeHandlers.forEach(i=>i(a))},[n,r,e]),null}const BCe=e=>!!e.onSelectionChangeHandlers;function UCe({onSelectionChange:e}){const t=ot(BCe);return e||t?v.jsx($Ce,{onSelectionChange:e}):null}const r9=[0,0],HCe={x:0,y:0,zoom:1},FCe=["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"],w3=[...FCe,"rfId"],qCe=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}),S3={translateExtent:nm,nodeOrigin:r9,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function KCe(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:a,setTranslateExtent:i,setNodeExtent:s,reset:c,setDefaultNodesAndEdges:u}=ot(qCe,Ft),f=Kt();y.useEffect(()=>(u(e.defaultNodes,e.defaultEdges),()=>{m.current=S3,c()}),[]);const m=y.useRef(S3);return y.useEffect(()=>{for(const d of w3){const p=e[d],b=m.current[d];p!==b&&(typeof e[d]>"u"||(d==="nodes"?t(p):d==="edges"?n(p):d==="minZoom"?r(p):d==="maxZoom"?a(p):d==="translateExtent"?i(p):d==="nodeExtent"?s(p):d==="ariaLabelConfig"?f.setState({ariaLabelConfig:kOe(p)}):d==="fitView"?f.setState({fitViewQueued:p}):d==="fitViewOptions"?f.setState({fitViewOptions:p}):f.setState({[d]:p})))}m.current=e},w3.map(d=>e[d])),null}function E3(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function VCe(e){var r;const[t,n]=y.useState(e==="system"?null:e);return y.useEffect(()=>{if(e!=="system"){n(e);return}const a=E3(),i=()=>n(a!=null&&a.matches?"dark":"light");return i(),a==null||a.addEventListener("change",i),()=>{a==null||a.removeEventListener("change",i)}},[e]),t!==null?t:(r=E3())!=null&&r.matches?"dark":"light"}const _3=typeof document<"u"?document:null;function om(e=null,t={target:_3,actInsideInputWithModifier:!0}){const[n,r]=y.useState(!1),a=y.useRef(!1),i=y.useRef(new Set([])),[s,c]=y.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
`).replace(`

`,`
+`).split(`
`)),m=f.reduce((d,p)=>d.concat(...p),[]);return[f,m]}return[[],[]]},[e]);return y.useEffect(()=>{const u=(t==null?void 0:t.target)??_3,f=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const m=b=>{var S,E;if(a.current=b.ctrlKey||b.metaKey||b.shiftKey||b.altKey,(!a.current||a.current&&!f)&&Iq(b))return!1;const x=O3(b.code,c);if(i.current.add(b[x]),j3(s,i.current,!1)){const C=((E=(S=b.composedPath)==null?void 0:S.call(b))==null?void 0:E[0])||b.target,O=(C==null?void 0:C.nodeName)==="BUTTON"||(C==null?void 0:C.nodeName)==="A";t.preventDefault!==!1&&(a.current||!O)&&b.preventDefault(),r(!0)}},d=b=>{const w=O3(b.code,c);j3(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(b[w]),b.key==="Meta"&&i.current.clear(),a.current=!1},p=()=>{i.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",m),u==null||u.addEventListener("keyup",d),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{u==null||u.removeEventListener("keydown",m),u==null||u.removeEventListener("keyup",d),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),n}function j3(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(a=>t.has(a)))}function O3(e,t){return t.includes(e)?"code":"key"}const YCe=()=>{const e=Kt();return y.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,a,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??a,zoom:t.zoom??i},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:a,minZoom:i,maxZoom:s,panZoom:c}=e.getState(),u=DA(t,r,a,i,s,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(u,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:a,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:c,y:u}=s.getBoundingClientRect(),f={x:t.x-c,y:t.y-u},m=n.snapGrid??a,d=n.snapToGrid??i;return rp(f,r,d,m)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:a,y:i}=r.getBoundingClientRect(),s=Hy(t,n);return{x:s.x+a,y:s.y+i}}}),[])};function a9(e,t){const n=[],r=new Map,a=[];for(const i of e)if(i.type==="add"){a.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const c={...i};for(const u of s)XCe(u,c);n.push(c)}return a.length&&a.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function XCe(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 GCe(e,t){return a9(e,t)}function WCe(e,t){return a9(e,t)}function Xl(e,t){return{id:e,type:"select",selected:t}}function Ju(e,t=new Set,n=!1){const r=[];for(const[a,i]of e){const s=t.has(a);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(Xl(i.id,s)))}return r}function C3({items:e=[],lookup:t}){var a;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const c=t.get(s.id),u=((a=c==null?void 0:c.internals)==null?void 0:a.userNode)??c;u!==void 0&&u!==s&&n.push({id:s.id,item:s,type:"replace"}),u===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function A3(e){return{id:e.id,type:"remove"}}const N3=e=>_Oe(e),QCe=e=>Aq(e);function i9(e){return y.forwardRef(e)}const ZCe=typeof window<"u"?y.useLayoutEffect:y.useEffect;function T3(e){const[t,n]=y.useState(BigInt(0)),[r]=y.useState(()=>JCe(()=>n(a=>a+BigInt(1))));return ZCe(()=>{const a=r.get();a.length&&(e(a),r.reset())},[t]),r}function JCe(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const o9=y.createContext(null);function eAe({children:e}){const t=Kt(),n=y.useCallback(c=>{const{nodes:u=[],setNodes:f,hasDefaultNodes:m,onNodesChange:d,nodeLookup:p,fitViewQueued:b,onNodesChangeMiddlewareMap:w}=t.getState();let x=u;for(const E of c)x=typeof E=="function"?E(x):E;let S=C3({items:x,lookup:p});for(const E of w.values())S=E(S);m&&f(x),S.length>0?d==null||d(S):b&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:C,setNodes:O}=t.getState();E&&O(C)})},[]),r=T3(n),a=y.useCallback(c=>{const{edges:u=[],setEdges:f,hasDefaultEdges:m,onEdgesChange:d,edgeLookup:p}=t.getState();let b=u;for(const w of c)b=typeof w=="function"?w(b):w;m?f(b):d&&d(C3({items:b,lookup:p}))},[]),i=T3(a),s=y.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return v.jsx(o9.Provider,{value:s,children:e})}function tAe(){const e=y.useContext(o9);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const nAe=e=>!!e.panZoom;function xb(){const e=YCe(),t=Kt(),n=tAe(),r=ot(nAe),a=y.useMemo(()=>{const i=d=>t.getState().nodeLookup.get(d),s=d=>{n.nodeQueue.push(d)},c=d=>{n.edgeQueue.push(d)},u=d=>{var E,C;const{nodeLookup:p,nodeOrigin:b}=t.getState(),w=N3(d)?d:p.get(d.id),x=w.parentId?kq(w.position,w.measured,w.parentId,p,b):w.position,S={...w,position:x,width:((E=w.measured)==null?void 0:E.width)??w.width,height:((C=w.measured)==null?void 0:C.height)??w.height};return Lf(S)},f=(d,p,b={replace:!1})=>{s(w=>w.map(x=>{if(x.id===d){const S=typeof p=="function"?p(x):p;return b.replace&&N3(S)?S:{...x,...S}}return x}))},m=(d,p,b={replace:!1})=>{c(w=>w.map(x=>{if(x.id===d){const S=typeof p=="function"?p(x):p;return b.replace&&QCe(S)?S:{...x,...S}}return x}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>{var p;return(p=i(d))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:d=[]}=t.getState();return d.map(p=>({...p}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:s,setEdges:c,addNodes:d=>{const p=Array.isArray(d)?d:[d];n.nodeQueue.push(b=>[...b,...p])},addEdges:d=>{const p=Array.isArray(d)?d:[d];n.edgeQueue.push(b=>[...b,...p])},toObject:()=>{const{nodes:d=[],edges:p=[],transform:b}=t.getState(),[w,x,S]=b;return{nodes:d.map(E=>({...E})),edges:p.map(E=>({...E})),viewport:{x:w,y:x,zoom:S}}},deleteElements:async({nodes:d=[],edges:p=[]})=>{const{nodes:b,edges:w,onNodesDelete:x,onEdgesDelete:S,triggerNodeChanges:E,triggerEdgeChanges:C,onDelete:O,onBeforeDelete:A}=t.getState(),{nodes:T,edges:N}=await NOe({nodesToRemove:d,edgesToRemove:p,nodes:b,edges:w,onBeforeDelete:A}),P=N.length>0,k=T.length>0;if(P){const D=N.map(A3);S==null||S(N),C(D)}if(k){const D=T.map(A3);x==null||x(T),E(D)}return(k||P)&&(O==null||O({nodes:T,edges:N})),{deletedNodes:T,deletedEdges:N}},getIntersectingNodes:(d,p=!0,b)=>{const w=i3(d),x=w?d:u(d),S=b!==void 0;return x?(b||t.getState().nodes).filter(E=>{const C=t.getState().nodeLookup.get(E.id);if(C&&!w&&(E.id===d.id||!C.internals.positionAbsolute))return!1;const O=Lf(S?E:C),A=am(O,x);return p&&A>0||A>=O.width*O.height||A>=x.width*x.height}):[]},isNodeIntersecting:(d,p,b=!0)=>{const x=i3(d)?d:u(d);if(!x)return!1;const S=am(x,p);return b&&S>0||S>=p.width*p.height||S>=x.width*x.height},updateNode:f,updateNodeData:(d,p,b={replace:!1})=>{f(d,w=>{const x=typeof p=="function"?p(w):p;return b.replace?{...w,data:x}:{...w,data:{...w.data,...x}}},b)},updateEdge:m,updateEdgeData:(d,p,b={replace:!1})=>{m(d,w=>{const x=typeof p=="function"?p(w):p;return b.replace?{...w,data:x}:{...w,data:{...w.data,...x}}},b)},getNodesBounds:d=>{const{nodeLookup:p,nodeOrigin:b}=t.getState();return jOe(d,{nodeLookup:p,nodeOrigin:b})},getHandleConnections:({type:d,id:p,nodeId:b})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${b}-${d}${p?`-${p}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:d,handleId:p,nodeId:b})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${b}${d?p?`-${d}-${p}`:`-${d}`:""}`))==null?void 0:w.values())??[])},fitView:async d=>{const p=t.getState().fitViewResolver??ROe();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:p}),n.nodeQueue.push(b=>[...b]),p.promise}}},[]);return y.useMemo(()=>({...a,...e,viewportInitialized:r}),[r])}const P3=e=>e.selected,rAe=typeof window<"u"?window:void 0;function aAe({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Kt(),{deleteElements:r}=xb(),a=om(e,{actInsideInputWithModifier:!1}),i=om(t,{target:rAe});y.useEffect(()=>{if(a){const{edges:s,nodes:c}=n.getState();r({nodes:c.filter(P3),edges:s.filter(P3)}),n.setState({nodesSelectionActive:!1})}},[a]),y.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function iAe(e){const t=Kt();y.useEffect(()=>{const n=()=>{var a,i,s,c;if(!e.current||!(((i=(a=e.current).checkVisibility)==null?void 0:i.call(a))??!0))return!1;const r=IA(e.current);(r.height===0||r.width===0)&&((c=(s=t.getState()).onError)==null||c.call(s,"004",Ri.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 wb={position:"absolute",width:"100%",height:"100%",top:0,left:0},oAe=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function sAe({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:a=.5,panOnScrollMode:i=hc.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:u,translateExtent:f,minZoom:m,maxZoom:d,zoomActivationKeyCode:p,preventScrolling:b=!0,children:w,noWheelClassName:x,noPanClassName:S,onViewportChange:E,isControlledViewport:C,paneClickDistance:O,selectionOnDrag:A}){const T=Kt(),N=y.useRef(null),{userSelectionActive:P,lib:k,connectionInProgress:D}=ot(oAe,Ft),K=om(p),B=y.useRef();iAe(N);const I=y.useCallback(W=>{E==null||E({x:W[0],y:W[1],zoom:W[2]}),C||T.setState({transform:W})},[E,C]);return y.useEffect(()=>{if(N.current){B.current=vCe({domNode:N.current,minZoom:m,maxZoom:d,translateExtent:f,viewport:u,onDraggingChange:R=>T.setState(H=>H.paneDragging===R?H:{paneDragging:R}),onPanZoomStart:(R,H)=>{const{onViewportChangeStart:q,onMoveStart:F}=T.getState();F==null||F(R,H),q==null||q(H)},onPanZoom:(R,H)=>{const{onViewportChange:q,onMove:F}=T.getState();F==null||F(R,H),q==null||q(H)},onPanZoomEnd:(R,H)=>{const{onViewportChangeEnd:q,onMoveEnd:F}=T.getState();F==null||F(R,H),q==null||q(H)}});const{x:W,y:z,zoom:V}=B.current.getViewport();return T.setState({panZoom:B.current,transform:[W,z,V],domNode:N.current.closest(".react-flow")}),()=>{var R;(R=B.current)==null||R.destroy()}}},[]),y.useEffect(()=>{var W;(W=B.current)==null||W.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:a,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:c,zoomActivationKeyPressed:K,preventScrolling:b,noPanClassName:S,userSelectionActive:P,noWheelClassName:x,lib:k,onTransformChange:I,connectionInProgress:D,selectionOnDrag:A,paneClickDistance:O})},[e,t,n,r,a,i,s,c,K,b,S,P,x,k,I,D,A,O]),v.jsx("div",{className:"react-flow__renderer",ref:N,style:wb,children:w})}const lAe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function cAe(){const{userSelectionActive:e,userSelectionRect:t}=ot(lAe,Ft);return e&&t?v.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 KS=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},uAe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function fAe({isSelecting:e,selectionKeyPressed:t,selectionMode:n=rm.Full,panOnDrag:r,paneClickDistance:a,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:f,onPaneScroll:m,onPaneMouseEnter:d,onPaneMouseMove:p,onPaneMouseLeave:b,children:w}){const x=Kt(),{userSelectionActive:S,elementsSelectable:E,dragging:C,connectionInProgress:O}=ot(uAe,Ft),A=E&&(e||S),T=y.useRef(null),N=y.useRef(),P=y.useRef(new Set),k=y.useRef(new Set),D=y.useRef(!1),K=q=>{if(D.current||O){D.current=!1;return}u==null||u(q),x.getState().resetSelectedElements(),x.setState({nodesSelectionActive:!1})},B=q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){q.preventDefault();return}f==null||f(q)},I=m?q=>m(q):void 0,W=q=>{D.current&&(q.stopPropagation(),D.current=!1)},z=q=>{var J,se;const{domNode:F}=x.getState();if(N.current=F==null?void 0:F.getBoundingClientRect(),!N.current)return;const Y=q.target===T.current;if(!Y&&!!q.target.closest(".nokey")||!e||!(i&&Y||t)||q.button!==0||!q.isPrimary)return;(se=(J=q.target)==null?void 0:J.setPointerCapture)==null||se.call(J,q.pointerId),D.current=!1;const{x:G,y:Z}=Va(q.nativeEvent,N.current);x.setState({userSelectionRect:{width:0,height:0,startX:G,startY:Z,x:G,y:Z}}),Y||(q.stopPropagation(),q.preventDefault())},V=q=>{const{userSelectionRect:F,transform:Y,nodeLookup:$,edgeLookup:L,connectionLookup:G,triggerNodeChanges:Z,triggerEdgeChanges:J,defaultEdgeOptions:se,resetSelectedElements:ie}=x.getState();if(!N.current||!F)return;const{x:re,y:ee}=Va(q.nativeEvent,N.current),{startX:le,startY:me}=F;if(!D.current){const Pe=t?0:a;if(Math.hypot(re-le,ee-me)<=Pe)return;ie(),s==null||s(q)}D.current=!0;const ne={startX:le,startY:me,x:re<le?re:le,y:ee<me?ee:me,width:Math.abs(re-le),height:Math.abs(ee-me)},ge=P.current,be=k.current;P.current=new Set(kA($,ne,Y,n===rm.Partial,!0).map(Pe=>Pe.id)),k.current=new Set;const Ie=(se==null?void 0:se.selectable)??!0;for(const Pe of P.current){const Ve=G.get(Pe);if(Ve)for(const{edgeId:Xt}of Ve.values()){const dt=L.get(Xt);dt&&(dt.selectable??Ie)&&k.current.add(Xt)}}if(!o3(ge,P.current)){const Pe=Ju($,P.current,!0);Z(Pe)}if(!o3(be,k.current)){const Pe=Ju(L,k.current);J(Pe)}x.setState({userSelectionRect:ne,userSelectionActive:!0,nodesSelectionActive:!1})},R=q=>{var F,Y;q.button===0&&((Y=(F=q.target)==null?void 0:F.releasePointerCapture)==null||Y.call(F,q.pointerId),!S&&q.target===T.current&&x.getState().userSelectionRect&&(K==null||K(q)),x.setState({userSelectionActive:!1,userSelectionRect:null}),D.current&&(c==null||c(q),x.setState({nodesSelectionActive:P.current.size>0})))},H=r===!0||Array.isArray(r)&&r.includes(0);return v.jsxs("div",{className:xn(["react-flow__pane",{draggable:H,dragging:C,selection:e}]),onClick:A?void 0:KS(K,T),onContextMenu:KS(B,T),onWheel:KS(I,T),onPointerEnter:A?void 0:d,onPointerMove:A?V:p,onPointerUp:A?R:void 0,onPointerDownCapture:A?z:void 0,onClickCapture:A?W:void 0,onPointerLeave:b,ref:T,style:wb,children:[w,v.jsx(cAe,{})]})}function J_({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:c,onError:u}=t.getState(),f=c.get(e);if(!f){u==null||u("012",Ri.error012(e));return}t.setState({nodesSelectionActive:!1}),f.selected?(n||f.selected&&s)&&(i({nodes:[f],edges:[]}),requestAnimationFrame(()=>{var m;return(m=r==null?void 0:r.current)==null?void 0:m.blur()})):a([e])}function s9({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:a,isSelectable:i,nodeClickDistance:s}){const c=Kt(),[u,f]=y.useState(!1),m=y.useRef();return y.useEffect(()=>{m.current=nCe({getStoreItems:()=>c.getState(),onNodeMouseDown:d=>{J_({id:d,store:c,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),y.useEffect(()=>{if(!(t||!e.current||!m.current))return m.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:a,nodeClickDistance:s}),()=>{var d;(d=m.current)==null||d.destroy()}},[n,r,t,i,e,a,s]),u}const dAe=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function l9(){const e=Kt();return y.useCallback(n=>{const{nodeExtent:r,snapToGrid:a,snapGrid:i,nodesDraggable:s,onError:c,updateNodePositions:u,nodeLookup:f,nodeOrigin:m}=e.getState(),d=new Map,p=dAe(s),b=a?i[0]:5,w=a?i[1]:5,x=n.direction.x*b*n.factor,S=n.direction.y*w*n.factor;for(const[,E]of f){if(!p(E))continue;let C={x:E.internals.positionAbsolute.x+x,y:E.internals.positionAbsolute.y+S};a&&(C=np(C,i));const{position:O,positionAbsolute:A}=Nq({nodeId:E.id,nextPosition:C,nodeLookup:f,nodeExtent:r,nodeOrigin:m,onError:c});E.position=O,E.internals.positionAbsolute=A,d.set(E.id,E)}u(d)},[])}const HA=y.createContext(null),hAe=HA.Provider;HA.Consumer;const c9=()=>y.useContext(HA),mAe=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),pAe=(e,t,n)=>r=>{const{connectionClickStartHandle:a,connectionMode:i,connection:s}=r,{fromHandle:c,toHandle:u,isValid:f}=s,m=(u==null?void 0:u.nodeId)===e&&(u==null?void 0:u.id)===t&&(u==null?void 0:u.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n,connectingTo:m,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,isPossibleEndHandle:i===kf.Strict?(c==null?void 0:c.type)!==n:e!==(c==null?void 0:c.nodeId)||t!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!a,valid:m&&f}};function vAe({type:e="source",position:t=De.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:a=!0,isConnectableEnd:i=!0,id:s,onConnect:c,children:u,className:f,onMouseDown:m,onTouchStart:d,...p},b){var V,R;const w=s||null,x=e==="target",S=Kt(),E=c9(),{connectOnClick:C,noPanClassName:O,rfId:A}=ot(mAe,Ft),{connectingFrom:T,connectingTo:N,clickConnecting:P,isPossibleEndHandle:k,connectionInProcess:D,clickConnectionInProcess:K,valid:B}=ot(pAe(E,w,e),Ft);E||(R=(V=S.getState()).onError)==null||R.call(V,"010",Ri.error010());const I=H=>{const{defaultEdgeOptions:q,onConnect:F,hasDefaultEdges:Y}=S.getState(),$={...q,...H};if(Y){const{edges:L,setEdges:G}=S.getState();G(BOe($,L))}F==null||F($),c==null||c($)},W=H=>{if(!E)return;const q=Lq(H.nativeEvent);if(a&&(q&&H.button===0||!q)){const F=S.getState();Z_.onPointerDown(H.nativeEvent,{handleDomNode:H.currentTarget,autoPanOnConnect:F.autoPanOnConnect,connectionMode:F.connectionMode,connectionRadius:F.connectionRadius,domNode:F.domNode,nodeLookup:F.nodeLookup,lib:F.lib,isTarget:x,handleId:w,nodeId:E,flowId:F.rfId,panBy:F.panBy,cancelConnection:F.cancelConnection,onConnectStart:F.onConnectStart,onConnectEnd:(...Y)=>{var $,L;return(L=($=S.getState()).onConnectEnd)==null?void 0:L.call($,...Y)},updateConnection:F.updateConnection,onConnect:I,isValidConnection:n||((...Y)=>{var $,L;return((L=($=S.getState()).isValidConnection)==null?void 0:L.call($,...Y))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:F.autoPanSpeed,dragThreshold:F.connectionDragThreshold})}q?m==null||m(H):d==null||d(H)},z=H=>{const{onClickConnectStart:q,onClickConnectEnd:F,connectionClickStartHandle:Y,connectionMode:$,isValidConnection:L,lib:G,rfId:Z,nodeLookup:J,connection:se}=S.getState();if(!E||!Y&&!a)return;if(!Y){q==null||q(H.nativeEvent,{nodeId:E,handleId:w,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:E,type:e,id:w}});return}const ie=Dq(H.target),re=n||L,{connection:ee,isValid:le}=Z_.isValid(H.nativeEvent,{handle:{nodeId:E,id:w,type:e},connectionMode:$,fromNodeId:Y.nodeId,fromHandleId:Y.id||null,fromType:Y.type,isValidConnection:re,flowId:Z,doc:ie,lib:G,nodeLookup:J});le&&ee&&I(ee);const me=structuredClone(se);delete me.inProgress,me.toPosition=me.toHandle?me.toHandle.position:null,F==null||F(H,me),S.setState({connectionClickStartHandle:null})};return v.jsx("div",{"data-handleid":w,"data-nodeid":E,"data-handlepos":t,"data-id":`${A}-${E}-${w}-${e}`,className:xn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",O,f,{source:!x,target:x,connectable:r,connectablestart:a,connectableend:i,clickconnecting:P,connectingfrom:T,connectingto:N,valid:B,connectionindicator:r&&(!D||k)&&(D||K?i:a)}]),onMouseDown:W,onTouchStart:W,onClick:C?z:void 0,ref:b,...p,children:u})}const Bf=y.memo(i9(vAe));function gAe({data:e,isConnectable:t,sourcePosition:n=De.Bottom}){return v.jsxs(v.Fragment,{children:[e==null?void 0:e.label,v.jsx(Bf,{type:"source",position:n,isConnectable:t})]})}function yAe({data:e,isConnectable:t,targetPosition:n=De.Top,sourcePosition:r=De.Bottom}){return v.jsxs(v.Fragment,{children:[v.jsx(Bf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,v.jsx(Bf,{type:"source",position:r,isConnectable:t})]})}function bAe(){return null}function xAe({data:e,isConnectable:t,targetPosition:n=De.Top}){return v.jsxs(v.Fragment,{children:[v.jsx(Bf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Fy={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},M3={input:gAe,default:yAe,output:xAe,group:bAe};function wAe(e){var t,n,r,a;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??((a=e.style)==null?void 0:a.height)}}const SAe=e=>{const{width:t,height:n,x:r,y:a}=tp(e.nodeLookup,{filter:i=>!!i.selected});return{width:Ka(t)?t:null,height:Ka(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${a}px)`}};function EAe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Kt(),{width:a,height:i,transformString:s,userSelectionActive:c}=ot(SAe,Ft),u=l9(),f=y.useRef(null);y.useEffect(()=>{var b;n||(b=f.current)==null||b.focus({preventScroll:!0})},[n]);const m=!c&&a!==null&&i!==null;if(s9({nodeRef:f,disabled:!m}),!m)return null;const d=e?b=>{const w=r.getState().nodes.filter(x=>x.selected);e(b,w)}:void 0,p=b=>{Object.prototype.hasOwnProperty.call(Fy,b.key)&&(b.preventDefault(),u({direction:Fy[b.key],factor:b.shiftKey?4:1}))};return v.jsx("div",{className:xn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:v.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:a,height:i}})})}const R3=typeof window<"u"?window:void 0,_Ae=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function u9({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:c,deleteKeyCode:u,selectionKeyCode:f,selectionOnDrag:m,selectionMode:d,onSelectionStart:p,onSelectionEnd:b,multiSelectionKeyCode:w,panActivationKeyCode:x,zoomActivationKeyCode:S,elementsSelectable:E,zoomOnScroll:C,zoomOnPinch:O,panOnScroll:A,panOnScrollSpeed:T,panOnScrollMode:N,zoomOnDoubleClick:P,panOnDrag:k,defaultViewport:D,translateExtent:K,minZoom:B,maxZoom:I,preventScrolling:W,onSelectionContextMenu:z,noWheelClassName:V,noPanClassName:R,disableKeyboardA11y:H,onViewportChange:q,isControlledViewport:F}){const{nodesSelectionActive:Y,userSelectionActive:$}=ot(_Ae,Ft),L=om(f,{target:R3}),G=om(x,{target:R3}),Z=G||k,J=G||A,se=m&&Z!==!0,ie=L||$||se;return aAe({deleteKeyCode:u,multiSelectionKeyCode:w}),v.jsx(sAe,{onPaneContextMenu:i,elementsSelectable:E,zoomOnScroll:C,zoomOnPinch:O,panOnScroll:J,panOnScrollSpeed:T,panOnScrollMode:N,zoomOnDoubleClick:P,panOnDrag:!L&&Z,defaultViewport:D,translateExtent:K,minZoom:B,maxZoom:I,zoomActivationKeyCode:S,preventScrolling:W,noWheelClassName:V,noPanClassName:R,onViewportChange:q,isControlledViewport:F,paneClickDistance:c,selectionOnDrag:se,children:v.jsxs(fAe,{onSelectionStart:p,onSelectionEnd:b,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:Z,isSelecting:!!ie,selectionMode:d,selectionKeyPressed:L,paneClickDistance:c,selectionOnDrag:se,children:[e,Y&&v.jsx(EAe,{onSelectionContextMenu:z,noPanClassName:R,disableKeyboardA11y:H})]})})}u9.displayName="FlowRenderer";const jAe=y.memo(u9),OAe=e=>t=>e?kA(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 CAe(e){return ot(y.useCallback(OAe(e),[e]),Ft)}const AAe=e=>e.updateNodeInternals;function NAe(){const e=ot(AAe),[t]=y.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(a=>{const i=a.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:a.target,force:!0})}),e(r)}));return y.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function TAe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const a=Kt(),i=y.useRef(null),s=y.useRef(null),c=y.useRef(e.sourcePosition),u=y.useRef(e.targetPosition),f=y.useRef(t),m=n&&!!e.internals.handleBounds;return y.useEffect(()=>{i.current&&!e.hidden&&(!m||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[m,e.hidden]),y.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),y.useEffect(()=>{if(i.current){const d=f.current!==t,p=c.current!==e.sourcePosition,b=u.current!==e.targetPosition;(d||p||b)&&(f.current=t,c.current=e.sourcePosition,u.current=e.targetPosition,a.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function PAe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:a,onContextMenu:i,onDoubleClick:s,nodesDraggable:c,elementsSelectable:u,nodesConnectable:f,nodesFocusable:m,resizeObserver:d,noDragClassName:p,noPanClassName:b,disableKeyboardA11y:w,rfId:x,nodeTypes:S,nodeClickDistance:E,onError:C}){const{node:O,internals:A,isParent:T}=ot(re=>{const ee=re.nodeLookup.get(e),le=re.parentLookup.has(e);return{node:ee,internals:ee.internals,isParent:le}},Ft);let N=O.type||"default",P=(S==null?void 0:S[N])||M3[N];P===void 0&&(C==null||C("003",Ri.error003(N)),N="default",P=(S==null?void 0:S.default)||M3.default);const k=!!(O.draggable||c&&typeof O.draggable>"u"),D=!!(O.selectable||u&&typeof O.selectable>"u"),K=!!(O.connectable||f&&typeof O.connectable>"u"),B=!!(O.focusable||m&&typeof O.focusable>"u"),I=Kt(),W=Rq(O),z=TAe({node:O,nodeType:N,hasDimensions:W,resizeObserver:d}),V=s9({nodeRef:z,disabled:O.hidden||!k,noDragClassName:p,handleSelector:O.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:E}),R=l9();if(O.hidden)return null;const H=Yo(O),q=wAe(O),F=D||k||t||n||r||a,Y=n?re=>n(re,{...A.userNode}):void 0,$=r?re=>r(re,{...A.userNode}):void 0,L=a?re=>a(re,{...A.userNode}):void 0,G=i?re=>i(re,{...A.userNode}):void 0,Z=s?re=>s(re,{...A.userNode}):void 0,J=re=>{const{selectNodesOnDrag:ee,nodeDragThreshold:le}=I.getState();D&&(!ee||!k||le>0)&&J_({id:e,store:I,nodeRef:z}),t&&t(re,{...A.userNode})},se=re=>{if(!(Iq(re.nativeEvent)||w)){if(_q.includes(re.key)&&D){const ee=re.key==="Escape";J_({id:e,store:I,unselect:ee,nodeRef:z})}else if(k&&O.selected&&Object.prototype.hasOwnProperty.call(Fy,re.key)){re.preventDefault();const{ariaLabelConfig:ee}=I.getState();I.setState({ariaLiveMessage:ee["node.a11yDescription.ariaLiveMessage"]({direction:re.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),R({direction:Fy[re.key],factor:re.shiftKey?4:1})}}},ie=()=>{var be;if(w||!((be=z.current)!=null&&be.matches(":focus-visible")))return;const{transform:re,width:ee,height:le,autoPanOnNodeFocus:me,setCenter:ne}=I.getState();if(!me)return;kA(new Map([[e,O]]),{x:0,y:0,width:ee,height:le},re,!0).length>0||ne(O.position.x+H.width/2,O.position.y+H.height/2,{zoom:re[2]})};return v.jsx("div",{className:xn(["react-flow__node",`react-flow__node-${N}`,{[b]:k},O.className,{selected:O.selected,selectable:D,parent:T,draggable:k,dragging:V}]),ref:z,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:F?"all":"none",visibility:W?"visible":"hidden",...O.style,...q},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:Y,onMouseMove:$,onMouseLeave:L,onContextMenu:G,onClick:J,onDoubleClick:Z,onKeyDown:B?se:void 0,tabIndex:B?0:void 0,onFocus:B?ie:void 0,role:O.ariaRole??(B?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${t9}-${x}`,"aria-label":O.ariaLabel,...O.domAttributes,children:v.jsx(hAe,{value:e,children:v.jsx(P,{id:e,data:O.data,type:N,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:O.selected??!1,selectable:D,draggable:k,deletable:O.deletable??!0,isConnectable:K,sourcePosition:O.sourcePosition,targetPosition:O.targetPosition,dragging:V,dragHandle:O.dragHandle,zIndex:A.z,parentId:O.parentId,...H})})})}var MAe=y.memo(PAe);const RAe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function f9(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,onError:i}=ot(RAe,Ft),s=CAe(e.onlyRenderVisibleElements),c=NAe();return v.jsx("div",{className:"react-flow__nodes",style:wb,children:s.map(u=>v.jsx(MAe,{id:u,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:c,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:i},u))})}f9.displayName="NodeRenderer";const kAe=y.memo(f9);function DAe(e){return ot(y.useCallback(n=>{if(!e)return n.edges.map(a=>a.id);const r=[];if(n.width&&n.height)for(const a of n.edges){const i=n.nodeLookup.get(a.source),s=n.nodeLookup.get(a.target);i&&s&&LOe({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(a.id)}return r},[e]),Ft)}const IAe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return v.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},LAe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return v.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},k3={[Df.Arrow]:IAe,[Df.ArrowClosed]:LAe};function zAe(e){const t=Kt();return y.useMemo(()=>{var a,i;return Object.prototype.hasOwnProperty.call(k3,e)?k3[e]:((i=(a=t.getState()).onError)==null||i.call(a,"009",Ri.error009(e)),null)},[e])}const $Ae=({id:e,type:t,color:n,width:r=12.5,height:a=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:c="auto-start-reverse"})=>{const u=zAe(t);return u?v.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:c,refX:"0",refY:"0",children:v.jsx(u,{color:n,strokeWidth:s})}):null},d9=({defaultColor:e,rfId:t})=>{const n=ot(i=>i.edges),r=ot(i=>i.defaultEdgeOptions),a=y.useMemo(()=>KOe(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return a.length?v.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:v.jsx("defs",{children:a.map(i=>v.jsx($Ae,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};d9.displayName="MarkerDefinitions";var BAe=y.memo(d9);function h9({x:e,y:t,label:n,labelStyle:r,labelShowBg:a=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:c=2,children:u,className:f,...m}){const[d,p]=y.useState({x:1,y:0,width:0,height:0}),b=xn(["react-flow__edge-textwrapper",f]),w=y.useRef(null);return y.useEffect(()=>{if(w.current){const x=w.current.getBBox();p({x:x.x,y:x.y,width:x.width,height:x.height})}},[n]),n?v.jsxs("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:b,visibility:d.width?"visible":"hidden",...m,children:[a&&v.jsx("rect",{width:d.width+2*s[0],x:-s[0],y:-s[1],height:d.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:c,ry:c}),v.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:w,style:r,children:n}),u]}):null}h9.displayName="EdgeText";const UAe=y.memo(h9);function Sb({path:e,labelX:t,labelY:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u,interactionWidth:f=20,...m}){return v.jsxs(v.Fragment,{children:[v.jsx("path",{...m,d:e,fill:"none",className:xn(["react-flow__edge-path",m.className])}),f?v.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}):null,r&&Ka(t)&&Ka(n)?v.jsx(UAe,{x:t,y:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u}):null]})}function D3({pos:e,x1:t,y1:n,x2:r,y2:a}){return e===De.Left||e===De.Right?[.5*(t+r),n]:[t,.5*(n+a)]}function m9({sourceX:e,sourceY:t,sourcePosition:n=De.Bottom,targetX:r,targetY:a,targetPosition:i=De.Top}){const[s,c]=D3({pos:n,x1:e,y1:t,x2:r,y2:a}),[u,f]=D3({pos:i,x1:r,y1:a,x2:e,y2:t}),[m,d,p,b]=zq({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:s,sourceControlY:c,targetControlX:u,targetControlY:f});return[`M${e},${t} C${s},${c} ${u},${f} ${r},${a}`,m,d,p,b]}function p9(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s,targetPosition:c,label:u,labelStyle:f,labelShowBg:m,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:b,style:w,markerEnd:x,markerStart:S,interactionWidth:E})=>{const[C,O,A]=m9({sourceX:n,sourceY:r,sourcePosition:s,targetX:a,targetY:i,targetPosition:c}),T=e.isInternal?void 0:t;return v.jsx(Sb,{id:T,path:C,labelX:O,labelY:A,label:u,labelStyle:f,labelShowBg:m,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:b,style:w,markerEnd:x,markerStart:S,interactionWidth:E})})}const HAe=p9({isInternal:!1}),v9=p9({isInternal:!0});HAe.displayName="SimpleBezierEdge";v9.displayName="SimpleBezierEdgeInternal";function g9(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:c,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:d,style:p,sourcePosition:b=De.Bottom,targetPosition:w=De.Top,markerEnd:x,markerStart:S,pathOptions:E,interactionWidth:C})=>{const[O,A,T]=G_({sourceX:n,sourceY:r,sourcePosition:b,targetX:a,targetY:i,targetPosition:w,borderRadius:E==null?void 0:E.borderRadius,offset:E==null?void 0:E.offset,stepPosition:E==null?void 0:E.stepPosition}),N=e.isInternal?void 0:t;return v.jsx(Sb,{id:N,path:O,labelX:A,labelY:T,label:s,labelStyle:c,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:d,style:p,markerEnd:x,markerStart:S,interactionWidth:C})})}const y9=g9({isInternal:!1}),b9=g9({isInternal:!0});y9.displayName="SmoothStepEdge";b9.displayName="SmoothStepEdgeInternal";function x9(e){return y.memo(({id:t,...n})=>{var a;const r=e.isInternal?void 0:t;return v.jsx(y9,{...n,id:r,pathOptions:y.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(a=n.pathOptions)==null?void 0:a.offset])})})}const FAe=x9({isInternal:!1}),w9=x9({isInternal:!0});FAe.displayName="StepEdge";w9.displayName="StepEdgeInternal";function S9(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:c,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:d,style:p,markerEnd:b,markerStart:w,interactionWidth:x})=>{const[S,E,C]=Uq({sourceX:n,sourceY:r,targetX:a,targetY:i}),O=e.isInternal?void 0:t;return v.jsx(Sb,{id:O,path:S,labelX:E,labelY:C,label:s,labelStyle:c,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:d,style:p,markerEnd:b,markerStart:w,interactionWidth:x})})}const qAe=S9({isInternal:!1}),E9=S9({isInternal:!0});qAe.displayName="StraightEdge";E9.displayName="StraightEdgeInternal";function _9(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s=De.Bottom,targetPosition:c=De.Top,label:u,labelStyle:f,labelShowBg:m,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:b,style:w,markerEnd:x,markerStart:S,pathOptions:E,interactionWidth:C})=>{const[O,A,T]=$q({sourceX:n,sourceY:r,sourcePosition:s,targetX:a,targetY:i,targetPosition:c,curvature:E==null?void 0:E.curvature}),N=e.isInternal?void 0:t;return v.jsx(Sb,{id:N,path:O,labelX:A,labelY:T,label:u,labelStyle:f,labelShowBg:m,labelBgStyle:d,labelBgPadding:p,labelBgBorderRadius:b,style:w,markerEnd:x,markerStart:S,interactionWidth:C})})}const KAe=_9({isInternal:!1}),j9=_9({isInternal:!0});KAe.displayName="BezierEdge";j9.displayName="BezierEdgeInternal";const I3={default:j9,straight:E9,step:w9,smoothstep:b9,simplebezier:v9},L3={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},VAe=(e,t,n)=>n===De.Left?e-t:n===De.Right?e+t:e,YAe=(e,t,n)=>n===De.Top?e-t:n===De.Bottom?e+t:e,z3="react-flow__edgeupdater";function $3({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:a,onMouseEnter:i,onMouseOut:s,type:c}){return v.jsx("circle",{onMouseDown:a,onMouseEnter:i,onMouseOut:s,className:xn([z3,`${z3}-${c}`]),cx:VAe(t,r,e),cy:YAe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function XAe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:a,targetX:i,targetY:s,sourcePosition:c,targetPosition:u,onReconnect:f,onReconnectStart:m,onReconnectEnd:d,setReconnecting:p,setUpdateHover:b}){const w=Kt(),x=(A,T)=>{if(A.button!==0)return;const{autoPanOnConnect:N,domNode:P,connectionMode:k,connectionRadius:D,lib:K,onConnectStart:B,cancelConnection:I,nodeLookup:W,rfId:z,panBy:V,updateConnection:R}=w.getState(),H=T.type==="target",q=($,L)=>{p(!1),d==null||d($,n,T.type,L)},F=$=>f==null?void 0:f(n,$),Y=($,L)=>{p(!0),m==null||m(A,n,T.type),B==null||B($,L)};Z_.onPointerDown(A.nativeEvent,{autoPanOnConnect:N,connectionMode:k,connectionRadius:D,domNode:P,handleId:T.id,nodeId:T.nodeId,nodeLookup:W,isTarget:H,edgeUpdaterType:T.type,lib:K,flowId:z,cancelConnection:I,panBy:V,isValidConnection:(...$)=>{var L,G;return((G=(L=w.getState()).isValidConnection)==null?void 0:G.call(L,...$))??!0},onConnect:F,onConnectStart:Y,onConnectEnd:(...$)=>{var L,G;return(G=(L=w.getState()).onConnectEnd)==null?void 0:G.call(L,...$)},onReconnectEnd:q,updateConnection:R,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},S=A=>x(A,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),E=A=>x(A,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>b(!0),O=()=>b(!1);return v.jsxs(v.Fragment,{children:[(e===!0||e==="source")&&v.jsx($3,{position:c,centerX:r,centerY:a,radius:t,onMouseDown:S,onMouseEnter:C,onMouseOut:O,type:"source"}),(e===!0||e==="target")&&v.jsx($3,{position:u,centerX:i,centerY:s,radius:t,onMouseDown:E,onMouseEnter:C,onMouseOut:O,type:"target"})]})}function GAe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:a,onDoubleClick:i,onContextMenu:s,onMouseEnter:c,onMouseMove:u,onMouseLeave:f,reconnectRadius:m,onReconnect:d,onReconnectStart:p,onReconnectEnd:b,rfId:w,edgeTypes:x,noPanClassName:S,onError:E,disableKeyboardA11y:C}){let O=ot(ne=>ne.edgeLookup.get(e));const A=ot(ne=>ne.defaultEdgeOptions);O=A?{...A,...O}:O;let T=O.type||"default",N=(x==null?void 0:x[T])||I3[T];N===void 0&&(E==null||E("011",Ri.error011(T)),T="default",N=(x==null?void 0:x.default)||I3.default);const P=!!(O.focusable||t&&typeof O.focusable>"u"),k=typeof d<"u"&&(O.reconnectable||n&&typeof O.reconnectable>"u"),D=!!(O.selectable||r&&typeof O.selectable>"u"),K=y.useRef(null),[B,I]=y.useState(!1),[W,z]=y.useState(!1),V=Kt(),{zIndex:R,sourceX:H,sourceY:q,targetX:F,targetY:Y,sourcePosition:$,targetPosition:L}=ot(y.useCallback(ne=>{const ge=ne.nodeLookup.get(O.source),be=ne.nodeLookup.get(O.target);if(!ge||!be)return{zIndex:O.zIndex,...L3};const Ie=qOe({id:e,sourceNode:ge,targetNode:be,sourceHandle:O.sourceHandle||null,targetHandle:O.targetHandle||null,connectionMode:ne.connectionMode,onError:E});return{zIndex:IOe({selected:O.selected,zIndex:O.zIndex,sourceNode:ge,targetNode:be,elevateOnSelect:ne.elevateEdgesOnSelect,zIndexMode:ne.zIndexMode}),...Ie||L3}},[O.source,O.target,O.sourceHandle,O.targetHandle,O.selected,O.zIndex]),Ft),G=y.useMemo(()=>O.markerStart?`url('#${W_(O.markerStart,w)}')`:void 0,[O.markerStart,w]),Z=y.useMemo(()=>O.markerEnd?`url('#${W_(O.markerEnd,w)}')`:void 0,[O.markerEnd,w]);if(O.hidden||H===null||q===null||F===null||Y===null)return null;const J=ne=>{var Pe;const{addSelectedEdges:ge,unselectNodesAndEdges:be,multiSelectionActive:Ie}=V.getState();D&&(V.setState({nodesSelectionActive:!1}),O.selected&&Ie?(be({nodes:[],edges:[O]}),(Pe=K.current)==null||Pe.blur()):ge([e])),a&&a(ne,O)},se=i?ne=>{i(ne,{...O})}:void 0,ie=s?ne=>{s(ne,{...O})}:void 0,re=c?ne=>{c(ne,{...O})}:void 0,ee=u?ne=>{u(ne,{...O})}:void 0,le=f?ne=>{f(ne,{...O})}:void 0,me=ne=>{var ge;if(!C&&_q.includes(ne.key)&&D){const{unselectNodesAndEdges:be,addSelectedEdges:Ie}=V.getState();ne.key==="Escape"?((ge=K.current)==null||ge.blur(),be({edges:[O]})):Ie([e])}};return v.jsx("svg",{style:{zIndex:R},children:v.jsxs("g",{className:xn(["react-flow__edge",`react-flow__edge-${T}`,O.className,S,{selected:O.selected,animated:O.animated,inactive:!D&&!a,updating:B,selectable:D}]),onClick:J,onDoubleClick:se,onContextMenu:ie,onMouseEnter:re,onMouseMove:ee,onMouseLeave:le,onKeyDown:P?me:void 0,tabIndex:P?0:void 0,role:O.ariaRole??(P?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":O.ariaLabel===null?void 0:O.ariaLabel||`Edge from ${O.source} to ${O.target}`,"aria-describedby":P?`${n9}-${w}`:void 0,ref:K,...O.domAttributes,children:[!W&&v.jsx(N,{id:e,source:O.source,target:O.target,type:O.type,selected:O.selected,animated:O.animated,selectable:D,deletable:O.deletable??!0,label:O.label,labelStyle:O.labelStyle,labelShowBg:O.labelShowBg,labelBgStyle:O.labelBgStyle,labelBgPadding:O.labelBgPadding,labelBgBorderRadius:O.labelBgBorderRadius,sourceX:H,sourceY:q,targetX:F,targetY:Y,sourcePosition:$,targetPosition:L,data:O.data,style:O.style,sourceHandleId:O.sourceHandle,targetHandleId:O.targetHandle,markerStart:G,markerEnd:Z,pathOptions:"pathOptions"in O?O.pathOptions:void 0,interactionWidth:O.interactionWidth}),k&&v.jsx(XAe,{edge:O,isReconnectable:k,reconnectRadius:m,onReconnect:d,onReconnectStart:p,onReconnectEnd:b,sourceX:H,sourceY:q,targetX:F,targetY:Y,sourcePosition:$,targetPosition:L,setUpdateHover:I,setReconnecting:z})]})})}var WAe=y.memo(GAe);const QAe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function O9({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:a,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:c,onEdgeMouseMove:u,onEdgeMouseLeave:f,onEdgeClick:m,reconnectRadius:d,onEdgeDoubleClick:p,onReconnectStart:b,onReconnectEnd:w,disableKeyboardA11y:x}){const{edgesFocusable:S,edgesReconnectable:E,elementsSelectable:C,onError:O}=ot(QAe,Ft),A=DAe(t);return v.jsxs("div",{className:"react-flow__edges",children:[v.jsx(BAe,{defaultColor:e,rfId:n}),A.map(T=>v.jsx(WAe,{id:T,edgesFocusable:S,edgesReconnectable:E,elementsSelectable:C,noPanClassName:a,onReconnect:i,onContextMenu:s,onMouseEnter:c,onMouseMove:u,onMouseLeave:f,onClick:m,reconnectRadius:d,onDoubleClick:p,onReconnectStart:b,onReconnectEnd:w,rfId:n,onError:O,edgeTypes:r,disableKeyboardA11y:x},T))]})}O9.displayName="EdgeRenderer";const ZAe=y.memo(O9),JAe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function eNe({children:e}){const t=ot(JAe);return v.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function tNe(e){const t=xb(),n=y.useRef(!1);y.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const nNe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function rNe(e){const t=ot(nNe),n=Kt();return y.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function aNe(e){return e.connection.inProgress?{...e.connection,to:rp(e.connection.to,e.transform)}:{...e.connection}}function iNe(e){return aNe}function oNe(e){const t=iNe();return ot(t,Ft)}const sNe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function lNe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:a,width:i,height:s,isValid:c,inProgress:u}=ot(sNe,Ft);return!(i&&a&&u)?null:v.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:v.jsx("g",{className:xn(["react-flow__connection",Cq(c)]),children:v.jsx(C9,{style:t,type:n,CustomComponent:r,isValid:c})})})}const C9=({style:e,type:t=Ls.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:a,from:i,fromNode:s,fromHandle:c,fromPosition:u,to:f,toNode:m,toHandle:d,toPosition:p,pointer:b}=oNe();if(!a)return;if(n)return v.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:c,fromX:i.x,fromY:i.y,toX:f.x,toY:f.y,fromPosition:u,toPosition:p,connectionStatus:Cq(r),toNode:m,toHandle:d,pointer:b});let w="";const x={sourceX:i.x,sourceY:i.y,sourcePosition:u,targetX:f.x,targetY:f.y,targetPosition:p};switch(t){case Ls.Bezier:[w]=$q(x);break;case Ls.SimpleBezier:[w]=m9(x);break;case Ls.Step:[w]=G_({...x,borderRadius:0});break;case Ls.SmoothStep:[w]=G_(x);break;default:[w]=Uq(x)}return v.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};C9.displayName="ConnectionLine";const cNe={};function B3(e=cNe){y.useRef(e),Kt(),y.useEffect(()=>{},[e])}function uNe(){Kt(),y.useRef(!1),y.useEffect(()=>{},[])}function A9({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:a,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:f,onNodeContextMenu:m,onSelectionContextMenu:d,onSelectionStart:p,onSelectionEnd:b,connectionLineType:w,connectionLineStyle:x,connectionLineComponent:S,connectionLineContainerStyle:E,selectionKeyCode:C,selectionOnDrag:O,selectionMode:A,multiSelectionKeyCode:T,panActivationKeyCode:N,zoomActivationKeyCode:P,deleteKeyCode:k,onlyRenderVisibleElements:D,elementsSelectable:K,defaultViewport:B,translateExtent:I,minZoom:W,maxZoom:z,preventScrolling:V,defaultMarkerColor:R,zoomOnScroll:H,zoomOnPinch:q,panOnScroll:F,panOnScrollSpeed:Y,panOnScrollMode:$,zoomOnDoubleClick:L,panOnDrag:G,onPaneClick:Z,onPaneMouseEnter:J,onPaneMouseMove:se,onPaneMouseLeave:ie,onPaneScroll:re,onPaneContextMenu:ee,paneClickDistance:le,nodeClickDistance:me,onEdgeContextMenu:ne,onEdgeMouseEnter:ge,onEdgeMouseMove:be,onEdgeMouseLeave:Ie,reconnectRadius:Pe,onReconnect:Ve,onReconnectStart:Xt,onReconnectEnd:dt,noDragClassName:Jn,noWheelClassName:Sr,noPanClassName:Lt,disableKeyboardA11y:Fn,nodeExtent:we,rfId:rn,viewport:Ct,onViewportChange:ia}){return B3(e),B3(t),uNe(),tNe(n),rNe(Ct),v.jsx(jAe,{onPaneClick:Z,onPaneMouseEnter:J,onPaneMouseMove:se,onPaneMouseLeave:ie,onPaneContextMenu:ee,onPaneScroll:re,paneClickDistance:le,deleteKeyCode:k,selectionKeyCode:C,selectionOnDrag:O,selectionMode:A,onSelectionStart:p,onSelectionEnd:b,multiSelectionKeyCode:T,panActivationKeyCode:N,zoomActivationKeyCode:P,elementsSelectable:K,zoomOnScroll:H,zoomOnPinch:q,zoomOnDoubleClick:L,panOnScroll:F,panOnScrollSpeed:Y,panOnScrollMode:$,panOnDrag:G,defaultViewport:B,translateExtent:I,minZoom:W,maxZoom:z,onSelectionContextMenu:d,preventScrolling:V,noDragClassName:Jn,noWheelClassName:Sr,noPanClassName:Lt,disableKeyboardA11y:Fn,onViewportChange:ia,isControlledViewport:!!Ct,children:v.jsxs(eNe,{children:[v.jsx(ZAe,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:s,onReconnect:Ve,onReconnectStart:Xt,onReconnectEnd:dt,onlyRenderVisibleElements:D,onEdgeContextMenu:ne,onEdgeMouseEnter:ge,onEdgeMouseMove:be,onEdgeMouseLeave:Ie,reconnectRadius:Pe,defaultMarkerColor:R,noPanClassName:Lt,disableKeyboardA11y:Fn,rfId:rn}),v.jsx(lNe,{style:x,type:w,component:S,containerStyle:E}),v.jsx("div",{className:"react-flow__edgelabel-renderer"}),v.jsx(kAe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:f,onNodeContextMenu:m,nodeClickDistance:me,onlyRenderVisibleElements:D,noPanClassName:Lt,noDragClassName:Jn,disableKeyboardA11y:Fn,nodeExtent:we,rfId:rn}),v.jsx("div",{className:"react-flow__viewport-portal"})]})})}A9.displayName="GraphView";const fNe=y.memo(A9),U3=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:u=.5,maxZoom:f=2,nodeOrigin:m,nodeExtent:d,zIndexMode:p="basic"}={})=>{const b=new Map,w=new Map,x=new Map,S=new Map,E=r??t??[],C=n??e??[],O=m??[0,0],A=d??nm;qq(x,S,E);const T=Q_(C,b,w,{nodeOrigin:O,nodeExtent:A,zIndexMode:p});let N=[0,0,1];if(s&&a&&i){const P=tp(b,{filter:B=>!!((B.width||B.initialWidth)&&(B.height||B.initialHeight))}),{x:k,y:D,zoom:K}=DA(P,a,i,u,f,(c==null?void 0:c.padding)??.1);N=[k,D,K]}return{rfId:"1",width:a??0,height:i??0,transform:N,nodes:C,nodesInitialized:T,nodeLookup:b,parentLookup:w,edges:E,edgeLookup:S,connectionLookup:x,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:u,maxZoom:f,translateExtent:nm,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:kf.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:O,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:s??!1,fitViewOptions:c,fitViewResolver:null,connection:{...Oq},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:TOe,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:jq,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},dNe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:u,maxZoom:f,nodeOrigin:m,nodeExtent:d,zIndexMode:p})=>ACe((b,w)=>{async function x(){const{nodeLookup:S,panZoom:E,fitViewOptions:C,fitViewResolver:O,width:A,height:T,minZoom:N,maxZoom:P}=w();E&&(await AOe({nodes:S,width:A,height:T,panZoom:E,minZoom:N,maxZoom:P},C),O==null||O.resolve(!0),b({fitViewResolver:null}))}return{...U3({nodes:e,edges:t,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:u,maxZoom:f,nodeOrigin:m,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:p}),setNodes:S=>{const{nodeLookup:E,parentLookup:C,nodeOrigin:O,elevateNodesOnSelect:A,fitViewQueued:T,zIndexMode:N}=w(),P=Q_(S,E,C,{nodeOrigin:O,nodeExtent:d,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:N});T&&P?(x(),b({nodes:S,nodesInitialized:P,fitViewQueued:!1,fitViewOptions:void 0})):b({nodes:S,nodesInitialized:P})},setEdges:S=>{const{connectionLookup:E,edgeLookup:C}=w();qq(E,C,S),b({edges:S})},setDefaultNodesAndEdges:(S,E)=>{if(S){const{setNodes:C}=w();C(S),b({hasDefaultNodes:!0})}if(E){const{setEdges:C}=w();C(E),b({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:E,nodeLookup:C,parentLookup:O,domNode:A,nodeOrigin:T,nodeExtent:N,debug:P,fitViewQueued:k,zIndexMode:D}=w(),{changes:K,updatedInternals:B}=ZOe(S,C,O,A,T,N,D);B&&(XOe(C,O,{nodeOrigin:T,nodeExtent:N,zIndexMode:D}),k?(x(),b({fitViewQueued:!1,fitViewOptions:void 0})):b({}),(K==null?void 0:K.length)>0&&(P&&console.log("React Flow: trigger node changes",K),E==null||E(K)))},updateNodePositions:(S,E=!1)=>{const C=[];let O=[];const{nodeLookup:A,triggerNodeChanges:T,connection:N,updateConnection:P,onNodesChangeMiddlewareMap:k}=w();for(const[D,K]of S){const B=A.get(D),I=!!(B!=null&&B.expandParent&&(B!=null&&B.parentId)&&(K!=null&&K.position)),W={id:D,type:"position",position:I?{x:Math.max(0,K.position.x),y:Math.max(0,K.position.y)}:K.position,dragging:E};if(B&&N.inProgress&&N.fromNode.id===B.id){const z=kc(B,N.fromHandle,De.Left,!0);P({...N,from:z})}I&&B.parentId&&C.push({id:D,parentId:B.parentId,rect:{...K.internals.positionAbsolute,width:K.measured.width??0,height:K.measured.height??0}}),O.push(W)}if(C.length>0){const{parentLookup:D,nodeOrigin:K}=w(),B=UA(C,A,D,K);O.push(...B)}for(const D of k.values())O=D(O);T(O)},triggerNodeChanges:S=>{const{onNodesChange:E,setNodes:C,nodes:O,hasDefaultNodes:A,debug:T}=w();if(S!=null&&S.length){if(A){const N=GCe(S,O);C(N)}T&&console.log("React Flow: trigger node changes",S),E==null||E(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:E,setEdges:C,edges:O,hasDefaultEdges:A,debug:T}=w();if(S!=null&&S.length){if(A){const N=WCe(S,O);C(N)}T&&console.log("React Flow: trigger edge changes",S),E==null||E(S)}},addSelectedNodes:S=>{const{multiSelectionActive:E,edgeLookup:C,nodeLookup:O,triggerNodeChanges:A,triggerEdgeChanges:T}=w();if(E){const N=S.map(P=>Xl(P,!0));A(N);return}A(Ju(O,new Set([...S]),!0)),T(Ju(C))},addSelectedEdges:S=>{const{multiSelectionActive:E,edgeLookup:C,nodeLookup:O,triggerNodeChanges:A,triggerEdgeChanges:T}=w();if(E){const N=S.map(P=>Xl(P,!0));T(N);return}T(Ju(C,new Set([...S]))),A(Ju(O,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:E}={})=>{const{edges:C,nodes:O,nodeLookup:A,triggerNodeChanges:T,triggerEdgeChanges:N}=w(),P=S||O,k=E||C,D=[];for(const B of P){if(!B.selected)continue;const I=A.get(B.id);I&&(I.selected=!1),D.push(Xl(B.id,!1))}const K=[];for(const B of k)B.selected&&K.push(Xl(B.id,!1));T(D),N(K)},setMinZoom:S=>{const{panZoom:E,maxZoom:C}=w();E==null||E.setScaleExtent([S,C]),b({minZoom:S})},setMaxZoom:S=>{const{panZoom:E,minZoom:C}=w();E==null||E.setScaleExtent([C,S]),b({maxZoom:S})},setTranslateExtent:S=>{var E;(E=w().panZoom)==null||E.setTranslateExtent(S),b({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:E,triggerNodeChanges:C,triggerEdgeChanges:O,elementsSelectable:A}=w();if(!A)return;const T=E.reduce((P,k)=>k.selected?[...P,Xl(k.id,!1)]:P,[]),N=S.reduce((P,k)=>k.selected?[...P,Xl(k.id,!1)]:P,[]);C(T),O(N)},setNodeExtent:S=>{const{nodes:E,nodeLookup:C,parentLookup:O,nodeOrigin:A,elevateNodesOnSelect:T,nodeExtent:N,zIndexMode:P}=w();S[0][0]===N[0][0]&&S[0][1]===N[0][1]&&S[1][0]===N[1][0]&&S[1][1]===N[1][1]||(Q_(E,C,O,{nodeOrigin:A,nodeExtent:S,elevateNodesOnSelect:T,checkEquality:!1,zIndexMode:P}),b({nodeExtent:S}))},panBy:S=>{const{transform:E,width:C,height:O,panZoom:A,translateExtent:T}=w();return JOe({delta:S,panZoom:A,transform:E,translateExtent:T,width:C,height:O})},setCenter:async(S,E,C)=>{const{width:O,height:A,maxZoom:T,panZoom:N}=w();if(!N)return Promise.resolve(!1);const P=typeof(C==null?void 0:C.zoom)<"u"?C.zoom:T;return await N.setViewport({x:O/2-S*P,y:A/2-E*P,zoom:P},{duration:C==null?void 0:C.duration,ease:C==null?void 0:C.ease,interpolate:C==null?void 0:C.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{b({connection:{...Oq}})},updateConnection:S=>{b({connection:S})},reset:()=>b({...U3()})}},Object.is);function N9({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:a,initialHeight:i,initialMinZoom:s,initialMaxZoom:c,initialFitViewOptions:u,fitView:f,nodeOrigin:m,nodeExtent:d,zIndexMode:p,children:b}){const[w]=y.useState(()=>dNe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:f,minZoom:s,maxZoom:c,fitViewOptions:u,nodeOrigin:m,nodeExtent:d,zIndexMode:p}));return v.jsx(NCe,{value:w,children:v.jsx(eAe,{children:b})})}function hNe({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:a,width:i,height:s,fitView:c,fitViewOptions:u,minZoom:f,maxZoom:m,nodeOrigin:d,nodeExtent:p,zIndexMode:b}){return y.useContext(yb)?v.jsx(v.Fragment,{children:e}):v.jsx(N9,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:a,initialWidth:i,initialHeight:s,fitView:c,initialFitViewOptions:u,initialMinZoom:f,initialMaxZoom:m,nodeOrigin:d,nodeExtent:p,zIndexMode:b,children:e})}const mNe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function pNe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:a,nodeTypes:i,edgeTypes:s,onNodeClick:c,onEdgeClick:u,onInit:f,onMove:m,onMoveStart:d,onMoveEnd:p,onConnect:b,onConnectStart:w,onConnectEnd:x,onClickConnectStart:S,onClickConnectEnd:E,onNodeMouseEnter:C,onNodeMouseMove:O,onNodeMouseLeave:A,onNodeContextMenu:T,onNodeDoubleClick:N,onNodeDragStart:P,onNodeDrag:k,onNodeDragStop:D,onNodesDelete:K,onEdgesDelete:B,onDelete:I,onSelectionChange:W,onSelectionDragStart:z,onSelectionDrag:V,onSelectionDragStop:R,onSelectionContextMenu:H,onSelectionStart:q,onSelectionEnd:F,onBeforeDelete:Y,connectionMode:$,connectionLineType:L=Ls.Bezier,connectionLineStyle:G,connectionLineComponent:Z,connectionLineContainerStyle:J,deleteKeyCode:se="Backspace",selectionKeyCode:ie="Shift",selectionOnDrag:re=!1,selectionMode:ee=rm.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:me=im()?"Meta":"Control",zoomActivationKeyCode:ne=im()?"Meta":"Control",snapToGrid:ge,snapGrid:be,onlyRenderVisibleElements:Ie=!1,selectNodesOnDrag:Pe,nodesDraggable:Ve,autoPanOnNodeFocus:Xt,nodesConnectable:dt,nodesFocusable:Jn,nodeOrigin:Sr=r9,edgesFocusable:Lt,edgesReconnectable:Fn,elementsSelectable:we=!0,defaultViewport:rn=HCe,minZoom:Ct=.5,maxZoom:ia=2,translateExtent:ai=nm,preventScrolling:gl=!0,nodeExtent:zr,defaultMarkerColor:Qc="#b1b1b7",zoomOnScroll:ii=!0,zoomOnPinch:zi=!0,panOnScroll:qn=!1,panOnScrollSpeed:$r=.5,panOnScrollMode:Pn=hc.Free,zoomOnDoubleClick:ld=!0,panOnDrag:yl=!0,onPaneClick:oa,onPaneMouseEnter:Xo,onPaneMouseMove:Go,onPaneMouseLeave:$i,onPaneScroll:sa,onPaneContextMenu:Be,paneClickDistance:At=1,nodeClickDistance:sn=0,children:Mn,onReconnect:oi,onReconnectStart:Pt,onReconnectEnd:er,onEdgeContextMenu:Bi,onEdgeDoubleClick:tr,onEdgeMouseEnter:nr,onEdgeMouseMove:Wo,onEdgeMouseLeave:Br,reconnectRadius:cd=10,onNodesChange:ap,onEdgesChange:si,noDragClassName:wn="nodrag",noWheelClassName:rr="nowheel",noPanClassName:Ui="nopan",fitView:Zc,fitViewOptions:ip,connectOnClick:Eb,attributionPosition:op,proOptions:bl,defaultEdgeOptions:ud,elevateNodesOnSelect:Qo=!0,elevateEdgesOnSelect:Zo=!1,disableKeyboardA11y:Jo=!1,autoPanOnConnect:es,autoPanOnNodeDrag:ln,autoPanSpeed:sp,connectionRadius:lp,isValidConnection:Hi,onError:ts,style:_b,id:fd,nodeDragThreshold:cp,connectionDragThreshold:jb,viewport:Jc,onViewportChange:eu,width:Ma,height:Er,colorMode:up="light",debug:Ob,onScroll:ns,ariaLabelConfig:fp,zIndexMode:xl="basic",...Cb},_r){const wl=fd||"1",dp=VCe(up),dd=y.useCallback(Fi=>{Fi.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ns==null||ns(Fi)},[ns]);return v.jsx("div",{"data-testid":"rf__wrapper",...Cb,onScroll:dd,style:{..._b,...mNe},ref:_r,className:xn(["react-flow",a,dp]),id:fd,role:"application",children:v.jsxs(hNe,{nodes:e,edges:t,width:Ma,height:Er,fitView:Zc,fitViewOptions:ip,minZoom:Ct,maxZoom:ia,nodeOrigin:Sr,nodeExtent:zr,zIndexMode:xl,children:[v.jsx(fNe,{onInit:f,onNodeClick:c,onEdgeClick:u,onNodeMouseEnter:C,onNodeMouseMove:O,onNodeMouseLeave:A,onNodeContextMenu:T,onNodeDoubleClick:N,nodeTypes:i,edgeTypes:s,connectionLineType:L,connectionLineStyle:G,connectionLineComponent:Z,connectionLineContainerStyle:J,selectionKeyCode:ie,selectionOnDrag:re,selectionMode:ee,deleteKeyCode:se,multiSelectionKeyCode:me,panActivationKeyCode:le,zoomActivationKeyCode:ne,onlyRenderVisibleElements:Ie,defaultViewport:rn,translateExtent:ai,minZoom:Ct,maxZoom:ia,preventScrolling:gl,zoomOnScroll:ii,zoomOnPinch:zi,zoomOnDoubleClick:ld,panOnScroll:qn,panOnScrollSpeed:$r,panOnScrollMode:Pn,panOnDrag:yl,onPaneClick:oa,onPaneMouseEnter:Xo,onPaneMouseMove:Go,onPaneMouseLeave:$i,onPaneScroll:sa,onPaneContextMenu:Be,paneClickDistance:At,nodeClickDistance:sn,onSelectionContextMenu:H,onSelectionStart:q,onSelectionEnd:F,onReconnect:oi,onReconnectStart:Pt,onReconnectEnd:er,onEdgeContextMenu:Bi,onEdgeDoubleClick:tr,onEdgeMouseEnter:nr,onEdgeMouseMove:Wo,onEdgeMouseLeave:Br,reconnectRadius:cd,defaultMarkerColor:Qc,noDragClassName:wn,noWheelClassName:rr,noPanClassName:Ui,rfId:wl,disableKeyboardA11y:Jo,nodeExtent:zr,viewport:Jc,onViewportChange:eu}),v.jsx(KCe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:b,onConnectStart:w,onConnectEnd:x,onClickConnectStart:S,onClickConnectEnd:E,nodesDraggable:Ve,autoPanOnNodeFocus:Xt,nodesConnectable:dt,nodesFocusable:Jn,edgesFocusable:Lt,edgesReconnectable:Fn,elementsSelectable:we,elevateNodesOnSelect:Qo,elevateEdgesOnSelect:Zo,minZoom:Ct,maxZoom:ia,nodeExtent:zr,onNodesChange:ap,onEdgesChange:si,snapToGrid:ge,snapGrid:be,connectionMode:$,translateExtent:ai,connectOnClick:Eb,defaultEdgeOptions:ud,fitView:Zc,fitViewOptions:ip,onNodesDelete:K,onEdgesDelete:B,onDelete:I,onNodeDragStart:P,onNodeDrag:k,onNodeDragStop:D,onSelectionDrag:V,onSelectionDragStart:z,onSelectionDragStop:R,onMove:m,onMoveStart:d,onMoveEnd:p,noPanClassName:Ui,nodeOrigin:Sr,rfId:wl,autoPanOnConnect:es,autoPanOnNodeDrag:ln,autoPanSpeed:sp,onError:ts,connectionRadius:lp,isValidConnection:Hi,selectNodesOnDrag:Pe,nodeDragThreshold:cp,connectionDragThreshold:jb,onBeforeDelete:Y,debug:Ob,ariaLabelConfig:fp,zIndexMode:xl}),v.jsx(UCe,{onSelectionChange:W}),Mn,v.jsx(ICe,{proOptions:bl,position:op}),v.jsx(DCe,{rfId:wl,disableKeyboardA11y:Jo})]})})}var vNe=i9(pNe);function gNe({dimensions:e,lineWidth:t,variant:n,className:r}){return v.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:xn(["react-flow__background-pattern",n,r])})}function yNe({radius:e,className:t}){return v.jsx("circle",{cx:e,cy:e,r:e,className:xn(["react-flow__background-pattern","dots",t])})}var Zs;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Zs||(Zs={}));const bNe={[Zs.Dots]:1,[Zs.Lines]:1,[Zs.Cross]:6},xNe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function T9({id:e,variant:t=Zs.Dots,gap:n=20,size:r,lineWidth:a=1,offset:i=0,color:s,bgColor:c,style:u,className:f,patternClassName:m}){const d=y.useRef(null),{transform:p,patternId:b}=ot(xNe,Ft),w=r||bNe[t],x=t===Zs.Dots,S=t===Zs.Cross,E=Array.isArray(n)?n:[n,n],C=[E[0]*p[2]||1,E[1]*p[2]||1],O=w*p[2],A=Array.isArray(i)?i:[i,i],T=S?[O,O]:C,N=[A[0]*p[2]||1+T[0]/2,A[1]*p[2]||1+T[1]/2],P=`${b}${e||""}`;return v.jsxs("svg",{className:xn(["react-flow__background",f]),style:{...u,...wb,"--xy-background-color-props":c,"--xy-background-pattern-color-props":s},ref:d,"data-testid":"rf__background",children:[v.jsx("pattern",{id:P,x:p[0]%C[0],y:p[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${N[0]},-${N[1]})`,children:x?v.jsx(yNe,{radius:O/2,className:m}):v.jsx(gNe,{dimensions:T,lineWidth:a,variant:t,className:m})}),v.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}T9.displayName="Background";y.memo(T9);function wNe(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:v.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function SNe(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:v.jsx("path",{d:"M0 0h32v4.2H0z"})})}function ENe(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:v.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 _Ne(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.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 jNe(){return v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:v.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 rg({children:e,className:t,...n}){return v.jsx("button",{type:"button",className:xn(["react-flow__controls-button",t]),...n,children:e})}const ONe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function P9({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:a,onZoomIn:i,onZoomOut:s,onFitView:c,onInteractiveChange:u,className:f,children:m,position:d="bottom-left",orientation:p="vertical","aria-label":b}){const w=Kt(),{isInteractive:x,minZoomReached:S,maxZoomReached:E,ariaLabelConfig:C}=ot(ONe,Ft),{zoomIn:O,zoomOut:A,fitView:T}=xb(),N=()=>{O(),i==null||i()},P=()=>{A(),s==null||s()},k=()=>{T(a),c==null||c()},D=()=>{w.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),u==null||u(!x)},K=p==="horizontal"?"horizontal":"vertical";return v.jsxs(bb,{className:xn(["react-flow__controls",K,f]),position:d,style:e,"data-testid":"rf__controls","aria-label":b??C["controls.ariaLabel"],children:[t&&v.jsxs(v.Fragment,{children:[v.jsx(rg,{onClick:N,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:E,children:v.jsx(wNe,{})}),v.jsx(rg,{onClick:P,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:S,children:v.jsx(SNe,{})})]}),n&&v.jsx(rg,{className:"react-flow__controls-fitview",onClick:k,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:v.jsx(ENe,{})}),r&&v.jsx(rg,{className:"react-flow__controls-interactive",onClick:D,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:x?v.jsx(jNe,{}):v.jsx(_Ne,{})}),m]})}P9.displayName="Controls";y.memo(P9);function CNe({id:e,x:t,y:n,width:r,height:a,style:i,color:s,strokeColor:c,strokeWidth:u,className:f,borderRadius:m,shapeRendering:d,selected:p,onClick:b}){const{background:w,backgroundColor:x}=i||{},S=s||w||x;return v.jsx("rect",{className:xn(["react-flow__minimap-node",{selected:p},f]),x:t,y:n,rx:m,ry:m,width:r,height:a,style:{fill:S,stroke:c,strokeWidth:u},shapeRendering:d,onClick:b?E=>b(E,e):void 0})}const ANe=y.memo(CNe),NNe=e=>e.nodes.map(t=>t.id),VS=e=>e instanceof Function?e:()=>e;function TNe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:a,nodeComponent:i=ANe,onClick:s}){const c=ot(NNe,Ft),u=VS(t),f=VS(e),m=VS(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return v.jsx(v.Fragment,{children:c.map(p=>v.jsx(MNe,{id:p,nodeColorFunc:u,nodeStrokeColorFunc:f,nodeClassNameFunc:m,nodeBorderRadius:r,nodeStrokeWidth:a,NodeComponent:i,onClick:s,shapeRendering:d},p))})}function PNe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:a,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:c,onClick:u}){const{node:f,x:m,y:d,width:p,height:b}=ot(w=>{const x=w.nodeLookup.get(e);if(!x)return{node:void 0,x:0,y:0,width:0,height:0};const S=x.internals.userNode,{x:E,y:C}=x.internals.positionAbsolute,{width:O,height:A}=Yo(S);return{node:S,x:E,y:C,width:O,height:A}},Ft);return!f||f.hidden||!Rq(f)?null:v.jsx(c,{x:m,y:d,width:p,height:b,style:f.style,selected:!!f.selected,className:r(f),color:t(f),borderRadius:a,strokeColor:n(f),strokeWidth:i,shapeRendering:s,onClick:u,id:f.id})}const MNe=y.memo(PNe);var RNe=y.memo(TNe);const kNe=200,DNe=150,INe=e=>!e.hidden,LNe=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?Mq(tp(e.nodeLookup,{filter:INe}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},zNe="react-flow__minimap-desc";function M9({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:a="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:c,bgColor:u,maskColor:f,maskStrokeColor:m,maskStrokeWidth:d,position:p="bottom-right",onClick:b,onNodeClick:w,pannable:x=!1,zoomable:S=!1,ariaLabel:E,inversePan:C,zoomStep:O=1,offsetScale:A=5}){const T=Kt(),N=y.useRef(null),{boundingRect:P,viewBB:k,rfId:D,panZoom:K,translateExtent:B,flowWidth:I,flowHeight:W,ariaLabelConfig:z}=ot(LNe,Ft),V=(e==null?void 0:e.width)??kNe,R=(e==null?void 0:e.height)??DNe,H=P.width/V,q=P.height/R,F=Math.max(H,q),Y=F*V,$=F*R,L=A*F,G=P.x-(Y-P.width)/2-L,Z=P.y-($-P.height)/2-L,J=Y+L*2,se=$+L*2,ie=`${zNe}-${D}`,re=y.useRef(0),ee=y.useRef();re.current=F,y.useEffect(()=>{if(N.current&&K)return ee.current=lCe({domNode:N.current,panZoom:K,getTransform:()=>T.getState().transform,getViewScale:()=>re.current}),()=>{var ge;(ge=ee.current)==null||ge.destroy()}},[K]),y.useEffect(()=>{var ge;(ge=ee.current)==null||ge.update({translateExtent:B,width:I,height:W,inversePan:C,pannable:x,zoomStep:O,zoomable:S})},[x,S,C,O,B,I,W]);const le=b?ge=>{var Pe;const[be,Ie]=((Pe=ee.current)==null?void 0:Pe.pointer(ge))||[0,0];b(ge,{x:be,y:Ie})}:void 0,me=w?y.useCallback((ge,be)=>{const Ie=T.getState().nodeLookup.get(be).internals.userNode;w(ge,Ie)},[]):void 0,ne=E??z["minimap.ariaLabel"];return v.jsx(bb,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*F: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 s=="number"?s:void 0},className:xn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:v.jsxs("svg",{width:V,height:R,viewBox:`${G} ${Z} ${J} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ie,ref:N,onClick:le,children:[ne&&v.jsx("title",{id:ie,children:ne}),v.jsx(RNe,{onClick:me,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:a,nodeStrokeWidth:s,nodeComponent:c}),v.jsx("path",{className:"react-flow__minimap-mask",d:`M${G-L},${Z-L}h${J+L*2}v${se+L*2}h${-J-L*2}z
        M${k.x},${k.y}h${k.width}v${k.height}h${-k.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}M9.displayName="MiniMap";y.memo(M9);const $Ne=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,BNe={[$f.Line]:"right",[$f.Handle]:"bottom-right"};function UNe({nodeId:e,position:t,variant:n=$f.Handle,className:r,style:a=void 0,children:i,color:s,minWidth:c=10,minHeight:u=10,maxWidth:f=Number.MAX_VALUE,maxHeight:m=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:p,autoScale:b=!0,shouldResize:w,onResizeStart:x,onResize:S,onResizeEnd:E}){const C=c9(),O=typeof e=="string"?e:C,A=Kt(),T=y.useRef(null),N=n===$f.Handle,P=ot(y.useCallback($Ne(N&&b),[N,b]),Ft),k=y.useRef(null),D=t??BNe[n];y.useEffect(()=>{if(!(!T.current||!O))return k.current||(k.current=SCe({domNode:T.current,nodeId:O,getStoreItems:()=>{const{nodeLookup:B,transform:I,snapGrid:W,snapToGrid:z,nodeOrigin:V,domNode:R}=A.getState();return{nodeLookup:B,transform:I,snapGrid:W,snapToGrid:z,nodeOrigin:V,paneDomNode:R}},onChange:(B,I)=>{const{triggerNodeChanges:W,nodeLookup:z,parentLookup:V,nodeOrigin:R}=A.getState(),H=[],q={x:B.x,y:B.y},F=z.get(O);if(F&&F.expandParent&&F.parentId){const Y=F.origin??R,$=B.width??F.measured.width??0,L=B.height??F.measured.height??0,G={id:F.id,parentId:F.parentId,rect:{width:$,height:L,...kq({x:B.x??F.position.x,y:B.y??F.position.y},{width:$,height:L},F.parentId,z,Y)}},Z=UA([G],z,V,R);H.push(...Z),q.x=B.x?Math.max(Y[0]*$,B.x):void 0,q.y=B.y?Math.max(Y[1]*L,B.y):void 0}if(q.x!==void 0&&q.y!==void 0){const Y={id:O,type:"position",position:{...q}};H.push(Y)}if(B.width!==void 0&&B.height!==void 0){const $={id:O,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:B.width,height:B.height}};H.push($)}for(const Y of I){const $={...Y,type:"position"};H.push($)}W(H)},onEnd:({width:B,height:I})=>{const W={id:O,type:"dimensions",resizing:!1,dimensions:{width:B,height:I}};A.getState().triggerNodeChanges([W])}})),k.current.update({controlPosition:D,boundaries:{minWidth:c,minHeight:u,maxWidth:f,maxHeight:m},keepAspectRatio:d,resizeDirection:p,onResizeStart:x,onResize:S,onResizeEnd:E,shouldResize:w}),()=>{var B;(B=k.current)==null||B.destroy()}},[D,c,u,f,m,d,x,S,E,w]);const K=D.split("-");return v.jsx("div",{className:xn(["react-flow__resize-control","nodrag",...K,n,r]),ref:T,style:{...a,scale:P,...s&&{[N?"backgroundColor":"borderColor"]:s}},children:i})}y.memo(UNe);function HNe(e){const[t,n]=y.useState(null),[r,a]=y.useState(!1),i=y.useRef(null);return y.useEffect(()=>{const s=new EventSource(`/api/sessions/${e}/tree`);return i.current=s,s.onopen=()=>a(!0),s.onmessage=c=>{try{const u=JSON.parse(c.data);n(u)}catch{}},s.onerror=()=>{a(!1)},()=>{s.close(),i.current=null}},[e]),{tree:t,connected:r}}const R9=180,FNe=70,qy=24,qNe=60;function KNe({data:e}){const t=e.pending?"agent-flow-node pending":`agent-flow-node ${KM(e.status)}`;return v.jsxs("div",{className:t,children:[v.jsx(Bf,{type:"target",position:De.Top}),v.jsx("div",{className:"agent-flow-role",children:e.pending?`[pending: ${e.role}]`:e.role}),!e.pending&&v.jsxs("div",{className:"agent-flow-meta",children:[v.jsx("span",{className:`status-dot ${KM(e.status)}`}),v.jsx("span",{children:e.status}),e.duration_ms!=null&&v.jsx("span",{children:b0(e.duration_ms)}),e.exit_code!=null&&v.jsxs("span",{children:["exit ",e.exit_code]})]}),v.jsx(Bf,{type:"source",position:De.Bottom})]})}const VNe={agent:KNe};function YNe(e,t){const n=new Map(e.map(c=>[c.agent_id,c])),r=new Map;for(const c of e){const u=c.parent;r.has(u)||r.set(u,[]),r.get(u).push(c.agent_id)}const a=new Map;for(const c of t){const u=c.requested_by;u&&n.has(u)&&(a.has(u)||a.set(u,[]),a.get(u).push(c))}function i(c){const u=(r.get(c)||[]).map(i),f=(a.get(c)||[]).map(m=>({id:`pending-${m.span_id}`,children:[]}));return{id:c,children:[...u,...f]}}return(r.get(null)||[]).map(i)}function Ky(e){return e.children.length===0?R9:e.children.reduce((t,n)=>t+Ky(n)+qy,-qy)}function k9(e,t,n,r){if(r.set(e.id,{x:t-R9/2,y:n}),e.children.length===0)return;const a=Ky(e);let i=t-a/2;for(const s of e.children){const c=Ky(s),u=i+c/2;k9(s,u,n+FNe+qNe,r),i+=c+qy}}function XNe({runId:e}){return v.jsx(N9,{children:v.jsx(GNe,{runId:e})})}function GNe({runId:e}){const{tree:t,connected:n}=HNe(e),{fitView:r}=xb(),a=y.useCallback(()=>{r({duration:300})},[r]),{flowNodes:i,flowEdges:s}=y.useMemo(()=>{if(!t)return{flowNodes:[],flowEdges:[]};const c=YNe(t.nodes,t.pending_delegations),u=new Map;let f=0;for(const w of c){const x=Ky(w),S=f+x/2;k9(w,S,0,u),f+=x+qy*2}const m=new Map(t.nodes.map(w=>[w.agent_id,w])),d=new Map(t.pending_delegations.map(w=>[`pending-${w.span_id}`,w])),p=[];for(const[w,x]of u){const S=m.get(w),E=d.get(w);S?p.push({id:w,type:"agent",position:x,data:{label:S.role,role:S.role,status:S.status,runtime:S.runtime,duration_ms:S.duration_ms,exit_code:S.exit_code}}):E&&p.push({id:w,type:"agent",position:x,data:{label:E.role,role:E.role,status:"running",runtime:"",duration_ms:null,exit_code:null,pending:!0}})}const b=[];for(const w of t.nodes)w.parent&&b.push({id:`e-${w.parent}-${w.agent_id}`,source:w.parent,target:w.agent_id,type:"smoothstep",markerEnd:{type:Df.ArrowClosed,width:16,height:16}});for(const w of t.pending_delegations)w.requested_by&&b.push({id:`e-${w.requested_by}-pending-${w.span_id}`,source:w.requested_by,target:`pending-${w.span_id}`,type:"smoothstep",markerEnd:{type:Df.ArrowClosed,width:16,height:16},style:{strokeDasharray:"5 3"}});return{flowNodes:p,flowEdges:b}},[t]);return t?v.jsxs("div",{children:[v.jsxs("div",{className:"react-flow-wrapper",children:[v.jsx(vNe,{nodes:i,edges:s,nodeTypes:VNe,fitView:!0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0}}),v.jsx("button",{className:"tree-reset-btn",onClick:a,children:"Reset View"})]}),t.denied_delegations.length>0&&v.jsxs("div",{className:"denied-list",children:[v.jsx("strong",{children:"Denied delegations:"}),t.denied_delegations.map(c=>v.jsxs("span",{className:"denied-item",children:[c.role," (",c.reason,")"]},c.span_id))]})]}):v.jsx("div",{className:"agent-tree",children:v.jsx("p",{className:"agent-meta",children:n?"Loading tree...":"Connecting..."})})}const ql=18,H3=10;function WNe({runId:e,agents:t,active:n}){var V;const r=Object.keys(t),a=r.find(R=>t[R].parent===null)??r[0]??"",[i,s]=y.useState(a),{lines:c,connected:u,done:f}=NB(e,i,!0),[m,d]=y.useState(""),p=m.toLowerCase(),b=m?c.reduce((R,H,q)=>(H.toLowerCase().includes(p)&&R.push(q),R),[]):[],w=y.useRef(null),[x,S]=y.useState(0),[E,C]=y.useState(0),[O,A]=y.useState(!0),T=y.useRef(0),N=c.length*ql,P=Math.max(0,Math.floor(x/ql)-H3),k=Math.ceil(E/ql)+H3*2,D=Math.min(c.length,P+k),K=c.slice(P,D),B=String(c.length).length,I=y.useCallback(()=>{const R=w.current;if(!R)return;S(R.scrollTop),C(R.clientHeight);const H=R.scrollTop+R.clientHeight>=R.scrollHeight-ql*2;A(H)},[]);y.useEffect(()=>{const R=w.current;R&&C(R.clientHeight)},[]),y.useEffect(()=>{if(O&&c.length>T.current){const R=w.current;R&&(R.scrollTop=R.scrollHeight)}T.current=c.length},[c.length,O]);const W=()=>{const R=w.current;R&&(R.scrollTop=R.scrollHeight,A(!0))},z=async()=>{try{const R=await fetch(`/api/sessions/${e}/logs/${i}/full`);if(!R.ok)return;const H=await R.text(),q=new Blob([H],{type:"text/plain"}),F=URL.createObjectURL(q),Y=document.createElement("a");Y.href=F,Y.download=`${i}.log`,Y.click(),URL.revokeObjectURL(F)}catch{}};return v.jsxs("div",{className:"space-y-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[r.length>1&&v.jsxs(xo,{value:i,onValueChange:s,children:[v.jsx(So,{className:"w-[220px]",children:v.jsx(wo,{})}),v.jsx(Eo,{children:r.map(R=>v.jsxs(Dn,{value:R,children:[t[R].role," (",R.slice(0,8),")"]},R))})]}),r.length===1&&v.jsxs("span",{className:"text-sm text-muted-foreground",children:[(V=t[i])==null?void 0:V.role," (",i.slice(0,8),")"]}),v.jsxs("div",{className:"relative ml-auto",children:[v.jsx(lB,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),v.jsx(Tt,{className:"h-8 w-[200px] pl-7 text-xs",placeholder:"Search logs...",value:m,onChange:R=>d(R.target.value)})]}),m&&v.jsxs("span",{className:"text-xs text-muted-foreground",children:[b.length," match",b.length!==1?"es":""]}),v.jsxs(Te,{variant:"outline",size:"sm",onClick:z,children:[v.jsx(v0,{className:"mr-1 h-3.5 w-3.5"}),"Download"]}),v.jsx(QNe,{connected:u,done:f,active:n})]}),v.jsxs("div",{className:"relative",children:[v.jsx("div",{ref:w,className:"h-[500px] overflow-auto rounded-md bg-[#1e1e1e] font-mono text-xs text-[#d4d4d4]",onScroll:I,children:c.length===0?v.jsx("div",{className:"flex h-full items-center justify-center text-[#666]",children:n&&!f?"Waiting for log output...":"No log output."}):v.jsx("div",{style:{height:N,position:"relative"},children:v.jsx("div",{style:{position:"absolute",top:P*ql,left:0,right:0},children:K.map((R,H)=>{const q=P+H,F=m&&R.toLowerCase().includes(p);return v.jsxs("div",{className:F?"bg-yellow-900/30":void 0,style:{height:ql,lineHeight:`${ql}px`,display:"flex",whiteSpace:"pre"},children:[v.jsx("span",{className:"select-none text-right text-[#555]",style:{width:`${(B+2)*.6}em`,paddingRight:"1em",flexShrink:0},children:q+1}),v.jsx("span",{children:F?v.jsx(ZNe,{line:R,search:p}):R})]},q)})})})}),!O&&c.length>0&&v.jsxs(Te,{size:"sm",variant:"secondary",className:"absolute bottom-3 right-4 shadow-md",onClick:W,children:[v.jsx(mte,{className:"mr-1 h-3.5 w-3.5"}),"Jump to bottom"]})]})]})}function QNe({connected:e,done:t,active:n}){return t||!n?v.jsx("span",{className:"text-xs text-muted-foreground",children:"Session ended"}):v.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[v.jsx("span",{className:`inline-block h-1.5 w-1.5 rounded-full ${e?"animate-pulse bg-green-500":"bg-orange-400"}`}),e?"Live":"Connecting..."]})}function ZNe({line:e,search:t}){const n=[],r=e.toLowerCase();let a=0,i=r.indexOf(t,a),s=0;for(;i!==-1;)i>a&&n.push(e.slice(a,i)),n.push(v.jsx("span",{className:"bg-yellow-500/60 text-white",children:e.slice(i,i+t.length)},s++)),a=i+t.length,i=r.indexOf(t,a);return a<e.length&&n.push(e.slice(a)),v.jsx(v.Fragment,{children:n})}function JNe(e){return qt({mutationFn:t=>He.post(`/sessions/${e}/respond`,t)})}function eTe({runId:e,pendingAskUser:t}){const[n,r]=y.useState([]),[a,i]=y.useState(""),s=JNe(e),c=y.useRef(null),u=y.useRef(null);y.useEffect(()=>{t&&u.current!==t.request_id&&(u.current=t.request_id,r(d=>[...d,{id:t.request_id,role:"agent",text:t.question,timestamp:t.timestamp}]))},[t]),y.useEffect(()=>{var d;(d=c.current)==null||d.scrollIntoView({behavior:"smooth"})},[n]);const f=async d=>{if(!(!d.trim()||!t)){r(p=>[...p,{id:`user-${Date.now()}`,role:"user",text:d.trim(),timestamp:Date.now()/1e3}]),i("");try{await s.mutateAsync({request_id:t.request_id,text:d.trim()})}catch{}}},m=d=>{f(d)};return v.jsx(hn,{className:"flex h-[500px] flex-col",children:v.jsxs(mn,{className:"flex flex-1 flex-col gap-3 overflow-hidden p-4",children:[v.jsx(Am,{className:"flex-1",children:v.jsxs("div",{className:"space-y-3 pr-3",children:[n.length===0&&v.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-muted-foreground",children:[v.jsx(Jte,{className:"h-8 w-8"}),v.jsx("p",{className:"text-sm",children:"Waiting for the agent to ask a question..."})]}),n.map(d=>v.jsx("div",{className:Oe("flex",d.role==="user"?"justify-end":"justify-start"),children:v.jsx("div",{className:Oe("max-w-[80%] rounded-lg px-3 py-2 text-sm",d.role==="user"?"bg-primary text-primary-foreground":"bg-muted"),children:v.jsx("p",{className:"whitespace-pre-wrap",children:d.text})})},d.id)),v.jsx("div",{ref:c})]})}),t&&v.jsxs("div",{className:"space-y-2",children:[v.jsx("div",{className:"flex items-center gap-2",children:v.jsxs(gn,{variant:"outline",className:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-400",children:[v.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-amber-500"}),"Waiting for response"]})}),t.choices&&t.choices.length>0&&v.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.choices.map(d=>v.jsx(Te,{variant:"outline",size:"sm",onClick:()=>m(d),disabled:s.isPending,children:d},d))})]}),v.jsxs("form",{className:"flex gap-2",onSubmit:d=>{d.preventDefault(),f(a)},children:[v.jsx(Tt,{value:a,onChange:d=>i(d.target.value),placeholder:t?"Type your response...":"Waiting for agent question...",disabled:!t||s.isPending}),v.jsx(Te,{type:"submit",size:"icon",disabled:!t||!a.trim()||s.isPending,children:v.jsx(pne,{className:"h-4 w-4"})})]})]})})}function tTe(e,t){const[n,r]=y.useState([]),[a,i]=y.useState(!1),s=y.useRef(null),c=y.useRef(""),u=y.useRef(void 0),f=y.useRef(1e3);return y.useEffect(()=>{if(!t)return;c.current!==e&&(r([]),c.current=e);function m(){const d=new EventSource(`/api/sessions/${e}/events`);s.current=d,d.onopen=()=>{i(!0),f.current=1e3},d.addEventListener("snapshot",p=>{try{const b=JSON.parse(p.data);b.events&&Array.isArray(b.events)&&r(b.events)}catch{}}),d.addEventListener("delta",p=>{try{const b=JSON.parse(p.data);b.events&&Array.isArray(b.events)&&r(w=>[...w,...b.events])}catch{}}),d.onmessage=p=>{try{const b=JSON.parse(p.data);b.events&&Array.isArray(b.events)&&r(b.events)}catch{}},d.onerror=()=>{d.close(),s.current=null,i(!1),u.current=setTimeout(()=>{f.current=Math.min(f.current*2,15e3),m()},f.current)}}return m(),()=>{var d;(d=s.current)==null||d.close(),s.current=null,u.current&&clearTimeout(u.current)}},[e,t]),{events:n,connected:a}}function nTe(e,t){const[n,r]=y.useState(null),a=y.useRef(null),i=y.useRef(void 0),s=y.useRef(1e3);return y.useEffect(()=>{if(!t){r(null);return}function c(){const u=new EventSource(`/api/sessions/${e}/tree`);a.current=u,u.onopen=()=>{s.current=1e3},u.addEventListener("ask_user",f=>{try{const m=JSON.parse(f.data);r(m)}catch{}}),u.addEventListener("ask_user_resolved",()=>{r(null)}),u.onerror=()=>{u.close(),a.current=null,i.current=setTimeout(()=>{s.current=Math.min(s.current*2,15e3),c()},s.current)}}return c(),()=>{var u;(u=a.current)==null||u.close(),a.current=null,i.current&&clearTimeout(i.current)}},[e,t]),{pendingAskUser:n}}function rTe(){return v.jsxs("div",{className:"space-y-6",children:[v.jsx(tn,{className:"h-8 w-64"}),v.jsx(tn,{className:"h-32 rounded-lg"}),v.jsx(tn,{className:"h-64 rounded-lg"})]})}function aTe(){const{projectId:e,runId:t}=aj(),[n]=OY(),r=Number(e),a=C=>C==="starting"||C==="running",i=cre(r,t??"",{refetchInterval:void 0}),s=i.data,c=a(s==null?void 0:s.status);y.useEffect(()=>{if(!c)return;const C=setInterval(()=>i.refetch(),2e3);return()=>clearInterval(C)},[c,i]);const{events:u}=tTe(t??"",c),f=(s==null?void 0:s.events)??[],m=u.length>0?u:f,d=!!(s!=null&&s.interactive),{pendingAskUser:p}=nTe(t??"",c&&d),[b,w]=y.useState(void 0);if(y.useEffect(()=>{p&&w("chat")},[p]),i.isLoading)return v.jsx(rTe,{});if(i.error)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",i.error.message]})]});if(!s)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsx("span",{children:"Session not found"})]});const x=fTe(m),S=uTe(m),E=n.get("tab")??(c?"agent-tree":"overview");return v.jsxs("div",{className:"space-y-6",children:[v.jsx(iTe,{session:s,projectId:r,runId:t??"",onStopped:()=>i.refetch()}),v.jsx(lTe,{session:s}),v.jsxs(OA,{value:b??E,onValueChange:w,children:[v.jsxs(CA,{children:[v.jsx(Ea,{value:"overview",children:"Overview"}),v.jsx(Ea,{value:"agent-tree",children:"Agent Tree"}),v.jsx(Ea,{value:"logs",children:"Logs"}),d&&v.jsxs(Ea,{value:"chat",className:"relative",children:["Chat",p&&v.jsx("span",{className:"ml-1.5 inline-block h-2 w-2 animate-pulse rounded-full bg-amber-500"})]}),v.jsxs(Ea,{value:"trace",children:["Trace",m.length>0&&` (${m.length})`]}),v.jsxs(Ea,{value:"artifacts",children:["Artifacts",x.length>0&&` (${x.length})`]})]}),v.jsxs(_a,{value:"overview",className:"space-y-4",children:[s.task&&v.jsxs("section",{className:"space-y-2",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Task"}),v.jsx(hn,{children:v.jsx(mn,{className:"pt-4",children:v.jsx("pre",{className:"whitespace-pre-wrap break-words text-sm",children:s.task})})})]}),S&&v.jsxs("section",{className:"space-y-2",children:[v.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Output"}),v.jsx(hn,{children:v.jsx(mn,{className:"pt-4",children:v.jsx("pre",{className:"whitespace-pre-wrap break-words text-sm leading-relaxed",children:v.jsx(cTe,{runId:s.run_id,hash:S})})})})]}),!s.task&&!S&&v.jsx("p",{className:"text-sm text-muted-foreground",children:"No overview information available yet."})]}),v.jsx(_a,{value:"agent-tree",children:v.jsx(XNe,{runId:s.run_id})}),v.jsx(_a,{value:"logs",children:Object.keys(s.agents).length>0?v.jsx(WNe,{runId:s.run_id,agents:s.agents,active:c}):v.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents registered yet."})}),d&&v.jsx(_a,{value:"chat",children:v.jsx(eTe,{runId:s.run_id,pendingAskUser:p})}),v.jsx(_a,{value:"trace",children:m.length>0?v.jsx(vTe,{events:m,runId:s.run_id}):v.jsx("p",{className:"text-sm text-muted-foreground",children:"No trace events recorded yet."})}),v.jsx(_a,{value:"artifacts",children:x.length>0?v.jsx(dTe,{artifacts:x,runId:s.run_id}):v.jsx("p",{className:"text-sm text-muted-foreground",children:"No artifacts recorded yet."})})]})]})}function iTe({session:e,projectId:t,runId:n,onStopped:r}){const[a,i]=y.useState(!1),s=rae(),c=e.status==="starting"||e.status==="running";return v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("h1",{className:"text-2xl font-bold tracking-tight",children:["Session ",e.run_id.slice(0,16)]}),v.jsxs("div",{className:"flex gap-2",children:[c&&(a?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(Te,{size:"sm",variant:"destructive",onClick:async()=>{await s.mutateAsync(n),i(!1),r()},disabled:s.isPending,children:"Confirm"}),v.jsx(Te,{size:"sm",variant:"outline",onClick:()=>i(!1),children:"Cancel"})]}):v.jsxs(Te,{variant:"destructive",onClick:()=>i(!0),children:[v.jsx(oB,{className:"mr-2 h-4 w-4"}),"Stop Session"]})),v.jsx(Te,{variant:"outline",asChild:!0,children:v.jsxs(Xa,{to:`/projects/${t}`,children:[v.jsx(eB,{className:"mr-2 h-4 w-4"}),"Back"]})})]})]})}function oTe({status:e}){const t=sTe(e);return v.jsxs(gn,{variant:"outline",className:Oe("text-xs font-medium",t==="running"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="success"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="error"&&"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-400",t==="warning"&&"border-orange-200 bg-orange-50 text-orange-700 dark:border-orange-800 dark:bg-orange-950 dark:text-orange-400",t==="default"&&"border-muted bg-muted text-muted-foreground"),children:[e==="running"&&v.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),e]})}function sTe(e){switch(e){case"running":case"starting":return"running";case"completed":return"success";case"failed":return"error";case"stopped":return"warning";default:return"default"}}function lTe({session:e}){return v.jsx(hn,{children:v.jsx(mn,{className:"pt-6",children:v.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Status"}),v.jsx("dd",{children:v.jsx(oTe,{status:e.status})}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Role"}),v.jsx("dd",{children:e.role}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Runtime"}),v.jsx("dd",{children:e.runtime}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Isolation"}),v.jsx("dd",{children:e.isolation}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Started"}),v.jsx("dd",{children:Bg(e.started_at)}),e.ended_at&&v.jsxs(v.Fragment,{children:[v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Ended"}),v.jsx("dd",{children:Bg(e.ended_at)})]}),v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Duration"}),v.jsx("dd",{children:b0(e.duration_ms)}),e.exit_code!==null&&v.jsxs(v.Fragment,{children:[v.jsx("dt",{className:"font-medium text-muted-foreground",children:"Exit Code"}),v.jsx("dd",{children:e.exit_code})]})]})})})}function cTe({runId:e,hash:t}){const[n,r]=y.useState(null),[a,i]=y.useState(null);return y.useEffect(()=>{fetch(`/api/sessions/${e}/artifacts/${t}`).then(s=>{if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.text()}).then(r).catch(s=>i(s.message))},[e,t]),a?v.jsxs("span",{className:"text-destructive",children:["Error: ",a]}):n===null?v.jsx("span",{className:"text-muted-foreground",children:"Loading..."}):v.jsx(v.Fragment,{children:n})}function uTe(e){for(const t of e)if(t.event==="session_end"&&t.data.output_ref)return String(t.data.output_ref);return null}function fTe(e){const t=[];for(const n of e){const r=n.data;n.event==="agent_spawn"&&(r.context_ref&&t.push({label:`Agent Context (${r.role||"agent"})`,hash:String(r.context_ref),event:n.event,agentId:r.agent_id?String(r.agent_id):void 0}),r.task_ref&&t.push({label:`Agent Task (${r.role||"agent"})`,hash:String(r.task_ref),event:n.event,agentId:r.agent_id?String(r.agent_id):void 0})),n.event==="session_end"&&r.output_ref&&t.push({label:"Session Output",hash:String(r.output_ref),event:n.event}),n.event==="agent_end"&&r.output_ref&&t.push({label:`Agent Output (${r.agent_id||"agent"})`,hash:String(r.output_ref),event:n.event,agentId:r.agent_id?String(r.agent_id):void 0}),n.event==="memory_get"&&(r.cards_ref&&t.push({label:`Memory Cards (${r.provider||"memory"})`,hash:String(r.cards_ref),event:n.event}),r.behavior_ref&&t.push({label:`Memory Get Behavior (${r.role||"agent"})`,hash:String(r.behavior_ref),event:n.event}),r.task_ref&&t.push({label:`Memory Get Task (${r.role||"agent"})`,hash:String(r.task_ref),event:n.event})),n.event==="memory_dump"&&(r.output_ref&&t.push({label:`Memory Dump Output (${r.provider||"memory"})`,hash:String(r.output_ref),event:n.event}),r.behavior_ref&&t.push({label:`Memory Dump Behavior (${r.provider||"memory"})`,hash:String(r.behavior_ref),event:n.event}),r.task_ref&&t.push({label:`Memory Dump Task (${r.provider||"memory"})`,hash:String(r.task_ref),event:n.event})),n.event==="delegate_start"&&r.context_ref&&t.push({label:`Delegation Context (${r.role||"delegate"})`,hash:String(r.context_ref),event:n.event}),n.event==="delegate_end"&&r.output_ref&&t.push({label:`Delegation Output (${r.role||"delegate"})`,hash:String(r.output_ref),event:n.event})}return t}function dTe({artifacts:e,runId:t}){return v.jsx("div",{className:"space-y-1",children:e.map(n=>v.jsxs(dO,{children:[v.jsxs(hO,{className:"flex w-full items-center gap-2 rounded-md bg-muted/50 px-3 py-2 text-sm hover:bg-muted",children:[v.jsx(p0,{className:"h-3 w-3 transition-transform [[data-state=open]>&]:rotate-90"}),v.jsx("span",{className:"font-medium text-primary",children:n.label})]}),v.jsx(mO,{children:v.jsx(hTe,{runId:t,hash:n.hash})})]},`${n.event}-${n.hash}`))})}function hTe({runId:e,hash:t}){const[n,r]=y.useState(null),[a,i]=y.useState(null);return y.useEffect(()=>{fetch(`/api/sessions/${e}/artifacts/${t}`).then(s=>{if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.text()}).then(r).catch(s=>i(s.message))},[e,t]),a?v.jsxs("p",{className:"px-3 py-2 text-sm text-destructive",children:["Error: ",a]}):n===null?v.jsx("p",{className:"px-3 py-2 text-sm text-muted-foreground",children:"Loading..."}):v.jsx(Am,{className:"max-h-[300px]",children:v.jsx("pre",{className:"whitespace-pre-wrap break-words rounded-b-md bg-muted/30 px-3 py-2 font-mono text-xs leading-relaxed",children:n})})}function mTe({event:e}){const t=pTe(e);return v.jsx(gn,{variant:"outline",className:Oe("text-xs font-medium",t==="running"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="success"&&"border-green-200 bg-green-50 text-green-700 dark:border-green-800 dark:bg-green-950 dark:text-green-400",t==="error"&&"border-red-200 bg-red-50 text-red-700 dark:border-red-800 dark:bg-red-950 dark:text-red-400",t==="default"&&"border-muted bg-muted text-muted-foreground"),children:e})}function pTe(e){return e.endsWith("_start")||e==="agent_spawn"?"running":e.endsWith("_end")?"success":e.includes("denied")||e.includes("error")?"error":"default"}function vTe({events:e,runId:t}){const[n,r]=y.useState(null);return v.jsxs(v.Fragment,{children:[v.jsx(hn,{children:v.jsx(mn,{className:"p-0",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Ge,{children:"Time"}),v.jsx(Ge,{children:"Event"}),v.jsx(Ge,{children:"Span"}),v.jsx(Ge,{children:"Details"})]})}),v.jsx(Kc,{children:e.map((a,i)=>v.jsxs(Ir,{children:[v.jsx(We,{className:"text-sm text-muted-foreground",children:Bg(a.ts)}),v.jsx(We,{children:v.jsx(mTe,{event:a.event})}),v.jsx(We,{className:"font-mono text-xs text-muted-foreground",children:a.span_id.slice(0,8)}),v.jsx(We,{className:"max-w-[400px] text-sm",children:yTe(a,(s,c)=>r({hash:s,label:c}))})]},i))})]})})}),v.jsx($c,{open:!!n,onOpenChange:()=>r(null),children:v.jsxs(Bc,{className:"max-w-3xl overflow-hidden",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:n==null?void 0:n.label})}),n&&v.jsx(gTe,{runId:t,hash:n.hash})]})})]})}function gTe({runId:e,hash:t}){const[n,r]=y.useState(null),[a,i]=y.useState(null);return y.useEffect(()=>{fetch(`/api/sessions/${e}/artifacts/${t}`).then(s=>{if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return s.text()}).then(r).catch(s=>i(s.message))},[e,t]),a?v.jsxs("p",{className:"text-sm text-destructive",children:["Error: ",a]}):n===null?v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):v.jsx(Am,{className:"max-h-[60vh]",children:v.jsx("pre",{className:"whitespace-pre-wrap break-words rounded-md bg-muted/30 p-4 font-mono text-xs leading-relaxed",children:n})})}function yTe(e,t){const n=e.data,r=[];for(const[i,s]of Object.entries(n))if(i.endsWith("_ref")&&s){const c=i.replace(/_ref$/,"");r.push(v.jsx("button",{className:"rounded border border-primary/30 bg-primary/5 px-1.5 py-0.5 font-mono text-xs text-primary hover:bg-primary/10",onClick:()=>t(String(s),c),children:c},i))}const a=[];for(const[i,s]of Object.entries(n)){if(i.endsWith("_ref")||s==null||s==="")continue;const c=i==="duration_ms"?b0(s):Array.isArray(s)?s.join(", "):String(s);a.push(v.jsxs("span",{children:[v.jsxs("span",{className:"text-muted-foreground",children:[i,"="]}),v.jsx("span",{children:c})]},i))}return v.jsxs(v.Fragment,{children:[r.length>0&&v.jsx("div",{className:"mb-1 flex flex-wrap gap-1",children:r}),a.length>0&&v.jsx("div",{className:"flex flex-wrap gap-x-2 gap-y-0.5 text-xs text-muted-foreground",children:a})]})}const bTe={skills:["denden"],roles:["ai-ceo","ai-employee"],agents:["strawpot-claude-code"],memories:["dial"]},xTe={roles:"Roles",skills:"Skills",agents:"Agents",memories:"Memory Providers"};function wTe(){const{resourceType:e="roles"}=aj(),{data:t,isLoading:n}=cc(e),[r,a]=y.useState(null),[i,s]=y.useState(!1),[c,u]=y.useState(!1),{data:f}=Aae(e,r??"",{enabled:i&&!!r}),m=xTe[e]??e;return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:m}),v.jsxs("p",{className:"text-sm text-muted-foreground",children:["Installed ",m.toLowerCase()," from StrawHub"]})]}),v.jsxs(Te,{onClick:()=>u(!0),size:"sm",children:[v.jsx(v0,{className:"mr-2 h-4 w-4"}),"Install"]})]}),n?v.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((d,p)=>v.jsx(tn,{className:"h-12 w-full"},p))}):!t||t.length===0?v.jsxs("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-muted-foreground",children:["No ",m.toLowerCase()," installed yet."]}):v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Ge,{children:"Name"}),v.jsx(Ge,{children:"Version"}),v.jsx(Ge,{children:"Description"}),v.jsx(Ge,{children:"Source"}),v.jsx(Ge,{className:"w-24"})]})}),v.jsx(Kc,{children:t.map(d=>{var p;return v.jsxs(Ir,{className:"cursor-pointer",onClick:()=>{a(d.name),s(!0)},children:[v.jsx(We,{className:"font-medium",children:d.name}),v.jsx(We,{className:"text-sm text-muted-foreground",children:d.version??"—"}),v.jsx(We,{className:"max-w-[300px] truncate text-sm",children:d.description||"—"}),v.jsx(We,{children:v.jsx(gn,{variant:"outline",className:"text-xs",children:d.source})}),v.jsx(We,{children:!((p=bTe[e])!=null&&p.includes(d.name))&&v.jsx(STe,{resourceType:e,name:d.name})})]},d.name)})})]}),v.jsx(DB,{resource:f??null,resourceType:e,open:i,onOpenChange:s}),v.jsx(pO,{open:c,onOpenChange:u,defaultType:e})]})}function STe({resourceType:e,name:t}){const[n,r]=y.useState(!1),a=RB(),i=s=>{s.stopPropagation(),a.mutate({type:e,name:t},{onSuccess:c=>{c.exit_code===0?mt.success(`Uninstalled ${t}`):mt.error(`Uninstall failed: ${c.stderr||c.stdout}`),r(!1)},onError:()=>{mt.error("Uninstall request failed"),r(!1)}})};return n?v.jsxs("div",{className:"flex gap-1",children:[v.jsx(Te,{size:"sm",variant:"destructive",onClick:i,disabled:a.isPending,children:"Confirm"}),v.jsx(Te,{size:"sm",variant:"outline",onClick:s=>{s.stopPropagation(),r(!1)},children:"No"})]}):v.jsx(Te,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:s=>{s.stopPropagation(),r(!0)},children:v.jsx(Gf,{className:"h-4 w-4"})})}function ETe(){return Bn({queryKey:Ye.schedules.all,queryFn:()=>He.get("/schedules")})}function _Te(){const e=Et();return qt({mutationFn:t=>He.post("/schedules",t),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.schedules.all})}})}function jTe(){const e=Et();return qt({mutationFn:({id:t,...n})=>He.put(`/schedules/${t}`,n),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.schedules.all})}})}function OTe(){const e=Et();return qt({mutationFn:t=>He.delete(`/schedules/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.schedules.all})}})}function CTe(){const e=Et();return qt({mutationFn:({id:t,enable:n})=>He.post(`/schedules/${t}/${n?"enable":"disable"}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ye.schedules.all})}})}var YS={exports:{}},F3;function ATe(){return F3||(F3=1,(function(e,t){(function(r,a){e.exports=a()})(globalThis,()=>(()=>{var n={949(s,c,u){Object.defineProperty(c,"__esModule",{value:!0}),c.CronParser=void 0;var f=u(515),m=(function(){function d(p,b,w){b===void 0&&(b=!0),w===void 0&&(w=!1),this.expression=p,this.dayOfWeekStartIndexZero=b,this.monthStartIndexZero=w}return d.prototype.parse=function(){var p,b,w=(p=this.expression)!==null&&p!==void 0?p:"";if(w==="@reboot")return b=["@reboot","","","","","",""],b;if(w.startsWith("@")){var x=this.parseSpecial(this.expression);b=this.extractParts(x)}else b=this.extractParts(this.expression);return this.normalize(b),this.validate(b),b},d.prototype.parseSpecial=function(p){var b={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},w=b[p];if(!w)throw new Error("Unknown special expression.");return w},d.prototype.extractParts=function(p){if(!this.expression)throw new Error("cron expression is empty");for(var b=p.trim().split(/[ ]+/),w=0;w<b.length;w++)if(b[w].includes(",")){var x=b[w].split(",").map(function(E){return E.trim()}).filter(function(E){return E!==""}).map(function(E){return isNaN(Number(E))?E:Number(E)}).filter(function(E){return E!==null&&E!==""});x.length===0&&x.push("*"),x.sort(function(E,C){return E!==null&&C!==null?E-C:0}),b[w]=x.map(function(E){return E!==null?E.toString():""}).join(",")}if(b.length<5)throw new Error("Expression has only ".concat(b.length," part").concat(b.length==1?"":"s",". At least 5 parts are required."));if(b.length==5)b.unshift(""),b.push("");else if(b.length==6){var S=/\d{4}$/.test(b[5])||b[4]=="?"||b[2]=="?";S?b.unshift(""):b.push("")}else if(b.length>7)throw new Error("Expression has ".concat(b.length," parts; too many!"));return b},d.prototype.normalize=function(p){var b=this;if(p[3]=p[3].replace("?","*"),p[5]=p[5].replace("?","*"),p[2]=p[2].replace("?","*"),p[0].indexOf("0/")==0&&(p[0]=p[0].replace("0/","*/")),p[1].indexOf("0/")==0&&(p[1]=p[1].replace("0/","*/")),p[2].indexOf("0/")==0&&(p[2]=p[2].replace("0/","*/")),p[3].indexOf("1/")==0&&(p[3]=p[3].replace("1/","*/")),p[4].indexOf("1/")==0&&(p[4]=p[4].replace("1/","*/")),p[6].indexOf("1/")==0&&(p[6]=p[6].replace("1/","*/")),p[5]=p[5].replace(/(^\d)|([^#/\s]\d)/g,function(T){var N=T.replace(/\D/,""),P=N;return b.dayOfWeekStartIndexZero?N=="7"&&(P="0"):P=(parseInt(N)-1).toString(),T.replace(N,P)}),p[5]=="L"&&(p[5]="6"),p[3]=="?"&&(p[3]="*"),p[3].indexOf("W")>-1&&(p[3].indexOf(",")>-1||p[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var w={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var x in w)p[5]=p[5].replace(new RegExp(x,"gi"),w[x].toString());p[4]=p[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(T){var N=T.replace(/\D/,""),P=N;return b.monthStartIndexZero&&(P=(parseInt(N)+1).toString()),T.replace(N,P)});var S={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var E in S)p[4]=p[4].replace(new RegExp(E,"gi"),S[E].toString());p[0]=="0"&&(p[0]=""),!/\*|\-|\,|\//.test(p[2])&&(/\*|\//.test(p[1])||/\*|\//.test(p[0]))&&(p[2]+="-".concat(p[2]));for(var C=0;C<p.length;C++)if(p[C].indexOf(",")!=-1&&(p[C]=p[C].split(",").filter(function(T){return T!==""}).join(",")||"*"),p[C]=="*/1"&&(p[C]="*"),p[C].indexOf("/")>-1&&!/^\*|\-|\,/.test(p[C])){var O=null;switch(C){case 4:O="12";break;case 5:O="6";break;case 6:O="9999";break;default:O=null;break}if(O!==null){var A=p[C].split("/");p[C]="".concat(A[0],"-").concat(O,"/").concat(A[1])}}},d.prototype.validate=function(p){var b="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(p[0],b),this.validateOnlyExpectedCharactersFound(p[1],b),this.validateOnlyExpectedCharactersFound(p[2],b),this.validateOnlyExpectedCharactersFound(p[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(p[4],b),this.validateOnlyExpectedCharactersFound(p[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(p[6],b),this.validateAnyRanges(p)},d.prototype.validateAnyRanges=function(p){f.default.secondRange(p[0]),f.default.minuteRange(p[1]),f.default.hourRange(p[2]),f.default.dayOfMonthRange(p[3]),f.default.monthRange(p[4],this.monthStartIndexZero),f.default.dayOfWeekRange(p[5],this.dayOfWeekStartIndexZero)},d.prototype.validateOnlyExpectedCharactersFound=function(p,b){var w=p.match(new RegExp("[^".concat(b,"]+"),"gi"));if(w&&w.length)throw new Error("Expression contains invalid values: '".concat(w.toString(),"'"))},d})();c.CronParser=m},333(s,c,u){Object.defineProperty(c,"__esModule",{value:!0}),c.ExpressionDescriptor=void 0;var f=u(823),m=u(949),d=(function(){function p(b,w){if(this.expression=b,this.options=w,this.expressionParts=new Array(5),!this.options.locale&&p.defaultLocale&&(this.options.locale=p.defaultLocale),!p.locales[this.options.locale]){var x=Object.keys(p.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(x,"'.")),this.options.locale=x}this.i18n=p.locales[this.options.locale],w.use24HourTimeFormat===void 0&&(w.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return p.toString=function(b,w){var x=w===void 0?{}:w,S=x.throwExceptionOnParseError,E=S===void 0?!0:S,C=x.verbose,O=C===void 0?!1:C,A=x.dayOfWeekStartIndexZero,T=A===void 0?!0:A,N=x.monthStartIndexZero,P=N===void 0?!1:N,k=x.use24HourTimeFormat,D=x.locale,K=D===void 0?null:D,B=x.logicalAndDayFields,I=B===void 0?!1:B,W={throwExceptionOnParseError:E,verbose:O,dayOfWeekStartIndexZero:T,monthStartIndexZero:P,use24HourTimeFormat:k,locale:K,logicalAndDayFields:I};W.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var z=new p(b,W);return z.getFullDescription()},p.initialize=function(b,w){w===void 0&&(w="en"),p.specialCharacters=["/","-",",","*"],p.defaultLocale=w,b.load(p.locales)},p.prototype.getFullDescription=function(){var b,w,x="";try{var S=new m.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=S.parse(),this.expressionParts[0]==="@reboot")return((w=(b=this.i18n).atReboot)===null||w===void 0?void 0:w.call(b))||"Run once, at startup";var E=this.getTimeOfDayDescription(),C=this.getDayOfMonthDescription(),O=this.getMonthDescription(),A=this.getDayOfWeekDescription(),T=this.getYearDescription();x+=E+C+A+O+T,x=this.transformVerbosity(x,!!this.options.verbose),x=x.charAt(0).toLocaleUpperCase()+x.substr(1)}catch(N){if(!this.options.throwExceptionOnParseError)x=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(N)}return x},p.prototype.getTimeOfDayDescription=function(){var b=this.expressionParts[0],w=this.expressionParts[1],x=this.expressionParts[2],S="";if(!f.StringUtilities.containsAny(w,p.specialCharacters)&&!f.StringUtilities.containsAny(x,p.specialCharacters)&&!f.StringUtilities.containsAny(b,p.specialCharacters))S+=this.i18n.atSpace()+this.formatTime(x,w,b);else if(!b&&w.indexOf("-")>-1&&!(w.indexOf(",")>-1)&&!(w.indexOf("/")>-1)&&!f.StringUtilities.containsAny(x,p.specialCharacters)){var E=w.split("-");S+=f.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(x,E[0],""),this.formatTime(x,E[1],""))}else if(!b&&x.indexOf(",")>-1&&x.indexOf("-")==-1&&x.indexOf("/")==-1&&!f.StringUtilities.containsAny(w,p.specialCharacters)){var C=x.split(",");S+=this.i18n.at();for(var O=0;O<C.length;O++)S+=" ",S+=this.formatTime(C[O],w,""),O<C.length-2&&(S+=","),O==C.length-2&&(S+=this.i18n.spaceAnd())}else{var A=this.getSecondsDescription(),T=this.getMinutesDescription(),N=this.getHoursDescription();if(S+=A,S&&T&&(S+=", "),S+=T,T===N)return S;S&&N&&(S+=", "),S+=N}return S},p.prototype.getSecondsDescription=function(){var b=this,w=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(x){return x},function(x){return f.StringUtilities.format(b.i18n.everyX0Seconds(x),x)},function(x){return b.i18n.secondsX0ThroughX1PastTheMinute()},function(x){return x=="0"?"":parseInt(x)<20?b.i18n.atX0SecondsPastTheMinute(x):b.i18n.atX0SecondsPastTheMinuteGt20()||b.i18n.atX0SecondsPastTheMinute(x)});return w},p.prototype.getMinutesDescription=function(){var b=this,w=this.expressionParts[0],x=this.expressionParts[2],S=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(E){return E},function(E){return f.StringUtilities.format(b.i18n.everyX0Minutes(E),E)},function(E){return b.i18n.minutesX0ThroughX1PastTheHour()},function(E){var C,O;try{return E=="0"&&x.indexOf("/")==-1&&w==""?b.i18n.everyHour():E=="0"?((O=(C=b.i18n).onTheHour)===null||O===void 0?void 0:O.call(C))||b.i18n.atX0MinutesPastTheHour(E):parseInt(E)<20?b.i18n.atX0MinutesPastTheHour(E):b.i18n.atX0MinutesPastTheHourGt20()||b.i18n.atX0MinutesPastTheHour(E)}catch{return b.i18n.atX0MinutesPastTheHour(E)}});return S},p.prototype.getHoursDescription=function(){var b=this,w=this.expressionParts[2],x=0,S=[];w.split("/")[0].split(",").forEach(function(O){var A=O.split("-");A.length===2&&S.push({value:A[1],index:x+1}),x+=A.length});var E=0,C=this.getSegmentDescription(w,this.i18n.everyHour(),function(O){var A=S.find(function(N){return N.value===O&&N.index===E}),T=A&&b.expressionParts[1]!=="0";return E++,T?b.formatTime(O,"59",""):b.formatTime(O,"0","")},function(O){return f.StringUtilities.format(b.i18n.everyX0Hours(O),O)},function(O){return b.i18n.betweenX0AndX1()},function(O){return b.i18n.atX0()});return C},p.prototype.getDayOfWeekDescription=function(){var b=this,w=this.i18n.daysOfTheWeek(),x=null;return this.expressionParts[5]=="*"?x="":x=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(S,E){var C=S;S.indexOf("#")>-1?C=S.substring(0,S.indexOf("#")):S.indexOf("L")>-1&&(C=C.replace("L",""));var O=parseInt(C),A=b.i18n.daysOfTheWeekInCase?b.i18n.daysOfTheWeekInCase(E)[O]:w[O];if(S.indexOf("#")>-1){var T=null,N=S.substring(S.indexOf("#")+1),P=S.substring(0,S.indexOf("#"));switch(N){case"1":T=b.i18n.first(P);break;case"2":T=b.i18n.second(P);break;case"3":T=b.i18n.third(P);break;case"4":T=b.i18n.fourth(P);break;case"5":T=b.i18n.fifth(P);break}A=T+" "+A}return A},function(S){return parseInt(S)==1?"":f.StringUtilities.format(b.i18n.commaEveryX0DaysOfTheWeek(S),S)},function(S){var E=S.substring(0,S.indexOf("-")),C=b.expressionParts[3]!="*";return C?b.i18n.commaAndX0ThroughX1(E):b.i18n.commaX0ThroughX1(E)},function(S){var E=null;if(S.indexOf("#")>-1){var C=S.substring(S.indexOf("#")+1),O=S.substring(0,S.indexOf("#"));E=b.i18n.commaOnThe(C,O).trim()+b.i18n.spaceX0OfTheMonth()}else if(S.indexOf("L")>-1)E=b.i18n.commaOnTheLastX0OfTheMonth(S.replace("L",""));else{var A=b.expressionParts[3]!="*";A?b.options.logicalAndDayFields?E=b.i18n.commaOnlyOnX0(S):E=b.i18n.commaAndOnX0():E=b.i18n.commaOnlyOnX0(S)}return E}),x},p.prototype.getMonthDescription=function(){var b=this,w=this.i18n.monthsOfTheYear(),x=this.getSegmentDescription(this.expressionParts[4],"",function(S,E){return E&&b.i18n.monthsOfTheYearInCase?b.i18n.monthsOfTheYearInCase(E)[parseInt(S)-1]:w[parseInt(S)-1]},function(S){return parseInt(S)==1?"":f.StringUtilities.format(b.i18n.commaEveryX0Months(S),S)},function(S){return b.i18n.commaMonthX0ThroughMonthX1()||b.i18n.commaX0ThroughX1()},function(S){return b.i18n.commaOnlyInMonthX0?b.i18n.commaOnlyInMonthX0():b.i18n.commaOnlyInX0()});return x},p.prototype.getDayOfMonthDescription=function(){var b=this,w=null,x=this.expressionParts[3];switch(x){case"L":w=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":w=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var S=x.match(/(\d{1,2}W)|(W\d{1,2})/);if(S){var E=parseInt(S[0].replace("W","")),C=E==1?this.i18n.firstWeekday():f.StringUtilities.format(this.i18n.weekdayNearestDayX0(),E.toString());w=f.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),C);break}else{var O=x.match(/L-(\d{1,2})/);if(O){var A=O[1];w=f.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(A),A);break}else{if(x=="*"&&this.expressionParts[5]!="*")return"";w=this.getSegmentDescription(x,this.i18n.commaEveryDay(),function(T){return T=="L"?b.i18n.lastDay():b.i18n.dayX0?f.StringUtilities.format(b.i18n.dayX0(),T):T},function(T){return T=="1"?b.i18n.commaEveryDay():b.i18n.commaEveryX0Days(T)},function(T){return b.i18n.commaBetweenDayX0AndX1OfTheMonth(T)},function(T){return b.i18n.commaOnDayX0OfTheMonth(T)})}break}}return w},p.prototype.getYearDescription=function(){var b=this,w=this.getSegmentDescription(this.expressionParts[6],"",function(x){return/^\d+$/.test(x)?new Date(parseInt(x),1).getFullYear().toString():x},function(x){return f.StringUtilities.format(b.i18n.commaEveryX0Years(x),x)},function(x){return b.i18n.commaYearX0ThroughYearX1()||b.i18n.commaX0ThroughX1()},function(x){return b.i18n.commaOnlyInYearX0?b.i18n.commaOnlyInYearX0():b.i18n.commaOnlyInX0()});return w},p.prototype.getSegmentDescription=function(b,w,x,S,E,C){var O=null,A=b.indexOf("/")>-1,T=b.indexOf("-")>-1,N=b.indexOf(",")>-1;if(!b)O="";else if(b==="*")O=w;else if(!A&&!T&&!N)O=f.StringUtilities.format(C(b),x(b));else if(N){for(var P=b.split(","),k="",D=0;D<P.length;D++)if(D>0&&P.length>2&&(k+=",",D<P.length-1&&(k+=" ")),D>0&&P.length>1&&(D==P.length-1||P.length==2)&&(k+="".concat(this.i18n.spaceAnd()," ")),P[D].indexOf("/")>-1||P[D].indexOf("-")>-1){var K=P[D].indexOf("-")>-1&&P[D].indexOf("/")==-1,B=this.getSegmentDescription(P[D],w,x,S,K?this.i18n.commaX0ThroughX1:E,C);K&&(B=B.replace(", ","")),k+=B}else if(!A)k+=x(P[D]);else{var I=this.getSegmentDescription(P[D],w,x,S,E,C);I&&I.startsWith(", ")&&(I=I.substring(2)),k+=I}A?O=k:O=f.StringUtilities.format(C(b),k)}else if(A){var P=b.split("/");if(O=f.StringUtilities.format(S(P[1]),P[1]),P[0].indexOf("-")>-1){var W=this.generateRangeSegmentDescription(P[0],E,x);W.indexOf(", ")!=0&&(O+=", "),O+=W}else if(P[0].indexOf("*")==-1){var z=f.StringUtilities.format(C(P[0]),x(P[0]));z=z.replace(", ",""),O+=f.StringUtilities.format(this.i18n.commaStartingX0(),z)}}else T&&(O=this.generateRangeSegmentDescription(b,E,x));return O},p.prototype.generateRangeSegmentDescription=function(b,w,x){var S="",E=b.split("-"),C=x(E[0],1),O=x(E[1],2),A=w(b);return S+=f.StringUtilities.format(A,C,O),S},p.prototype.formatTime=function(b,w,x){var S=0,E=0,C=parseInt(b)+S,O=parseInt(w)+E;O>=60?(O-=60,C+=1):O<0&&(O+=60,C-=1),C>=24?C=C-24:C<0&&(C=24+C);var A="",T=!1;this.options.use24HourTimeFormat||(T=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),A=T?"".concat(this.getPeriod(C)," "):" ".concat(this.getPeriod(C)),C>12&&(C-=12),C===0&&(C=12));var N="";return x&&(N=":".concat(("00"+x).substring(x.length))),"".concat(T?A:"").concat(("00"+C.toString()).substring(C.toString().length),":").concat(("00"+O.toString()).substring(O.toString().length)).concat(N).concat(T?"":A)},p.prototype.transformVerbosity=function(b,w){if(!w&&(b=b.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),b=b.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),b=b.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),b=b.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var x=0,S=Object.entries(this.i18n.conciseVerbosityReplacements());x<S.length;x++){var E=S[x],C=E[0],O=E[1];b=b.replace(new RegExp(C,"g"),O)}return b},p.prototype.getPeriod=function(b){return b>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},p.locales={},p})();c.ExpressionDescriptor=d},747(s,c,u){Object.defineProperty(c,"__esModule",{value:!0}),c.enLocaleLoader=void 0;var f=u(486),m=(function(){function d(){}return d.prototype.load=function(p){p.en=new f.en},d})();c.enLocaleLoader=m},486(s,c){Object.defineProperty(c,"__esModule",{value:!0}),c.en=void 0;var u=(function(){function f(){}return f.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},f.prototype.atX0MinutesPastTheHourGt20=function(){return null},f.prototype.commaMonthX0ThroughMonthX1=function(){return null},f.prototype.commaYearX0ThroughYearX1=function(){return null},f.prototype.use24HourTimeFormatByDefault=function(){return!1},f.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},f.prototype.everyMinute=function(){return"every minute"},f.prototype.everyHour=function(){return"every hour"},f.prototype.atSpace=function(){return"At "},f.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},f.prototype.at=function(){return"At"},f.prototype.spaceAnd=function(){return" and"},f.prototype.everySecond=function(){return"every second"},f.prototype.everyX0Seconds=function(){return"every %s seconds"},f.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},f.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},f.prototype.everyX0Minutes=function(){return"every %s minutes"},f.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},f.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},f.prototype.everyX0Hours=function(){return"every %s hours"},f.prototype.betweenX0AndX1=function(){return"between %s and %s"},f.prototype.atX0=function(){return"at %s"},f.prototype.commaEveryDay=function(){return", every day"},f.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},f.prototype.commaX0ThroughX1=function(){return", %s through %s"},f.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},f.prototype.first=function(){return"first"},f.prototype.second=function(){return"second"},f.prototype.third=function(){return"third"},f.prototype.fourth=function(){return"fourth"},f.prototype.fifth=function(){return"fifth"},f.prototype.commaOnThe=function(){return", on the "},f.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},f.prototype.lastDay=function(){return"the last day"},f.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},f.prototype.commaOnlyOnX0=function(){return", only on %s"},f.prototype.commaAndOnX0=function(){return", and on %s"},f.prototype.commaEveryX0Months=function(){return", every %s months"},f.prototype.commaOnlyInX0=function(){return", only in %s"},f.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},f.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},f.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},f.prototype.firstWeekday=function(){return"first weekday"},f.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},f.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},f.prototype.commaEveryX0Days=function(){return", every %s days in a month"},f.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},f.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},f.prototype.commaEveryHour=function(){return", every hour"},f.prototype.commaEveryX0Years=function(){return", every %s years"},f.prototype.commaStartingX0=function(){return", starting %s"},f.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},f.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},f.prototype.atReboot=function(){return"Run once, at startup"},f.prototype.onTheHour=function(){return"on the hour"},f})();c.en=u},515(s,c){Object.defineProperty(c,"__esModule",{value:!0});function u(m,d){if(!m)throw new Error(d)}var f=(function(){function m(){}return m.secondRange=function(d){for(var p=d.split(","),b=0;b<p.length;b++)if(!isNaN(parseInt(p[b],10))){var w=parseInt(p[b],10);u(w>=0&&w<=59,"seconds part must be >= 0 and <= 59")}},m.minuteRange=function(d){for(var p=d.split(","),b=0;b<p.length;b++)if(!isNaN(parseInt(p[b],10))){var w=parseInt(p[b],10);u(w>=0&&w<=59,"minutes part must be >= 0 and <= 59")}},m.hourRange=function(d){for(var p=d.split(","),b=0;b<p.length;b++)if(!isNaN(parseInt(p[b],10))){var w=parseInt(p[b],10);u(w>=0&&w<=23,"hours part must be >= 0 and <= 23")}},m.dayOfMonthRange=function(d){for(var p=d.split(","),b=0;b<p.length;b++)if(!isNaN(parseInt(p[b],10))){var w=parseInt(p[b],10);u(w>=1&&w<=31,"DOM part must be >= 1 and <= 31")}},m.monthRange=function(d,p){for(var b=d.split(","),w=0;w<b.length;w++)if(!isNaN(parseInt(b[w],10))){var x=parseInt(b[w],10);u(x>=1&&x<=12,p?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},m.dayOfWeekRange=function(d,p){for(var b=d.split(","),w=0;w<b.length;w++)if(!isNaN(parseInt(b[w],10))){var x=parseInt(b[w],10);u(x>=0&&x<=6,p?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},m})();c.default=f},823(s,c){Object.defineProperty(c,"__esModule",{value:!0}),c.StringUtilities=void 0;var u=(function(){function f(){}return f.format=function(m){for(var d=[],p=1;p<arguments.length;p++)d[p-1]=arguments[p];return m.replace(/%s/g,function(b){return d.shift()})},f.containsAny=function(m,d){return d.some(function(p){return m.indexOf(p)>-1})},f})();c.StringUtilities=u}},r={};function a(s){var c=r[s];if(c!==void 0)return c.exports;var u=r[s]={exports:{}};return n[s](u,u.exports,a),u.exports}var i={};return(()=>{var s=i;Object.defineProperty(s,"__esModule",{value:!0}),s.toString=void 0;var c=a(333),u=a(747);c.ExpressionDescriptor.initialize(new u.enLocaleLoader),s.default=c.ExpressionDescriptor;var f=c.ExpressionDescriptor.toString;s.toString=f})(),i})())})(YS)),YS.exports}var NTe=ATe();const TTe=Za(NTe),PTe=[{label:"Every 1 minute",value:"* * * * *"},{label:"Every 5 minutes",value:"*/5 * * * *"},{label:"Every hour",value:"0 * * * *"},{label:"Daily at midnight",value:"0 0 * * *"},{label:"Weekdays at 9am",value:"0 9 * * 1-5"},{label:"Weekly Monday 9am",value:"0 9 * * 1"}];function MTe({open:e,onOpenChange:t,editing:n}){const{data:r}=Wf(),{data:a}=PB(),i=_Te(),s=jTe(),[c,u]=y.useState(""),[f,m]=y.useState(""),[d,p]=y.useState(""),[b,w]=y.useState(""),[x,S]=y.useState(""),[E,C]=y.useState(""),[O,A]=y.useState(!0),[T,N]=y.useState(!1);y.useEffect(()=>{e&&n?(u(n.name),m(String(n.project_id)),p(n.task),w(n.cron_expr),S(n.role??""),C(n.system_prompt??""),A(n.skip_if_running)):e&&!n&&P()},[e,n]);function P(){u(""),m(""),p(""),w(""),S(""),C(""),A(!0),N(!1)}async function k(I){I.preventDefault();try{const W={name:c.trim(),task:d.trim(),cron_expr:b.trim(),role:x.trim()||void 0,system_prompt:E.trim()||void 0,skip_if_running:O};n?await s.mutateAsync({id:n.id,...W}):await i.mutateAsync({...W,project_id:Number(f)}),P(),t(!1)}catch{}}const D=y.useMemo(()=>{if(!b.trim())return null;try{return TTe.toString(b.trim())}catch{return null}},[b]),K=i.isPending||s.isPending,B=i.error||s.error;return v.jsx($c,{open:e,onOpenChange:t,children:v.jsxs(Bc,{className:"max-w-lg",children:[v.jsx(Uc,{children:v.jsx(Hc,{children:n?"Edit Schedule":"Create Schedule"})}),v.jsxs("form",{onSubmit:k,className:"space-y-4",children:[v.jsxs("div",{className:"space-y-2",children:[v.jsxs(kt,{htmlFor:"sched-name",children:["Name ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsx(Tt,{id:"sched-name",value:c,onChange:I=>u(I.target.value),placeholder:"e.g. github-issue-checker",required:!0,autoFocus:!0})]}),!n&&v.jsxs("div",{className:"space-y-2",children:[v.jsxs(kt,{htmlFor:"sched-project",children:["Project ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsxs(xo,{value:f,onValueChange:m,required:!0,children:[v.jsx(So,{id:"sched-project",children:v.jsx(wo,{placeholder:"Select a project"})}),v.jsx(Eo,{children:(r??[]).map(I=>v.jsx(Dn,{value:String(I.id),children:I.display_name},I.id))})]})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsxs(kt,{htmlFor:"sched-task",children:["Task ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsx(Ug,{id:"sched-task",value:d,onChange:I=>p(I.target.value),placeholder:"What should the agent do each time this runs?",required:!0,rows:3})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs(kt,{htmlFor:"sched-cron",children:["Cron Expression ",v.jsx("span",{className:"text-destructive",children:"*"})]}),v.jsxs(Lg,{children:[v.jsx(zg,{asChild:!0,children:v.jsxs(Te,{variant:"ghost",size:"sm",className:"h-6 text-xs",children:["Presets",v.jsx(zh,{className:"ml-1 h-3 w-3"})]})}),v.jsx($g,{align:"end",children:PTe.map(I=>v.jsxs(Eh,{onClick:()=>w(I.value),children:[v.jsx("span",{className:"mr-3 font-mono text-xs text-muted-foreground",children:I.value}),I.label]},I.value))})]})]}),v.jsx(Tt,{id:"sched-cron",value:b,onChange:I=>w(I.target.value),placeholder:"*/5 * * * *",required:!0,className:"font-mono"}),D&&v.jsx("p",{className:"text-xs text-muted-foreground",children:D})]}),v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"sched-role",children:"Role"}),v.jsx(Tt,{id:"sched-role",value:x,onChange:I=>S(I.target.value),placeholder:(a==null?void 0:a[0])??"orchestrator",list:"sched-role-list"}),v.jsx("datalist",{id:"sched-role-list",children:(a??[]).map(I=>v.jsx("option",{value:I},I))})]}),v.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[v.jsx("input",{type:"checkbox",checked:O,onChange:I=>A(I.target.checked),className:"rounded border-input"}),v.jsx("span",{className:"text-sm",children:"Skip if already running"}),v.jsx("span",{className:"text-xs text-muted-foreground",children:"— don't start a new session while a previous one is still active"})]}),v.jsxs(dO,{open:T,onOpenChange:N,children:[v.jsx(hO,{asChild:!0,children:v.jsxs(Te,{type:"button",variant:"ghost",size:"sm",className:"flex items-center gap-1 px-0 text-xs text-muted-foreground",children:[v.jsx(zh,{className:`h-3 w-3 transition-transform ${T?"rotate-180":""}`}),"Advanced Options"]})}),v.jsx(mO,{className:"space-y-4 pt-2",children:v.jsxs("div",{className:"space-y-2",children:[v.jsx(kt,{htmlFor:"sched-prompt",children:"System Prompt"}),v.jsx(Ug,{id:"sched-prompt",value:E,onChange:I=>C(I.target.value),placeholder:"Additional instructions for the agent...",rows:3})]})})]}),B&&v.jsx("p",{className:"text-sm text-destructive",children:B.message}),v.jsxs("div",{className:"flex justify-end gap-2",children:[v.jsx(Te,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),v.jsx(Te,{type:"submit",disabled:K,children:K?"Saving...":n?"Update":"Create"})]})]})]})})}function q3(e){if(!e)return"—";try{const t=new Date(e),n=new Date,r=t.getTime()-n.getTime(),a=Math.abs(r);if(a<6e4)return r>0?"in < 1m":"< 1m ago";if(a<36e5){const i=Math.round(a/6e4);return r>0?`in ${i}m`:`${i}m ago`}if(a<864e5){const i=Math.round(a/36e5);return r>0?`in ${i}h`:`${i}h ago`}return t.toLocaleDateString()}catch{return"—"}}function RTe({schedule:e}){return e.enabled?e.last_error?v.jsx(Z$,{children:v.jsxs(ite,{children:[v.jsx(ote,{children:v.jsx(gn,{variant:"destructive",children:"Error"})}),v.jsx(ste,{className:"max-w-xs",children:v.jsx("p",{className:"text-xs",children:e.last_error})})]})}):v.jsx(gn,{className:"bg-emerald-600 hover:bg-emerald-600",children:"Active"}):v.jsx(gn,{variant:"secondary",children:"Disabled"})}function kTe(){const{data:e,isLoading:t,error:n}=ETe(),[r,a]=y.useState(!1),[i,s]=y.useState(null),c=OTe(),u=CTe();if(t)return v.jsxs("div",{className:"space-y-6",children:[v.jsx(tn,{className:"h-8 w-48"}),v.jsx(tn,{className:"h-64 rounded-lg"})]});if(n)return v.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[v.jsx(nl,{className:"h-4 w-4"}),v.jsxs("span",{children:["Error: ",n.message]})]});const f=e??[];return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Scheduled Tasks"}),v.jsxs(Te,{onClick:()=>{s(null),a(!0)},children:[v.jsx(LE,{className:"mr-2 h-4 w-4"}),"Create Schedule"]})]}),f.length===0?v.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed p-12 text-center",children:[v.jsx("p",{className:"text-muted-foreground",children:"No scheduled tasks yet."}),v.jsxs(Te,{variant:"outline",className:"mt-4",onClick:()=>{s(null),a(!0)},children:[v.jsx(LE,{className:"mr-2 h-4 w-4"}),"Create your first schedule"]})]}):v.jsx("div",{className:"rounded-lg border",children:v.jsxs(Fc,{children:[v.jsx(qc,{children:v.jsxs(Ir,{children:[v.jsx(Ge,{children:"Name"}),v.jsx(Ge,{children:"Project"}),v.jsx(Ge,{children:"Cron"}),v.jsx(Ge,{children:"Next Run"}),v.jsx(Ge,{children:"Last Run"}),v.jsx(Ge,{children:"Status"}),v.jsx(Ge,{className:"w-[120px]",children:"Actions"})]})}),v.jsx(Kc,{children:f.map(m=>v.jsxs(Ir,{children:[v.jsx(We,{className:"font-medium",children:m.name}),v.jsx(We,{className:"text-muted-foreground",children:m.project_name}),v.jsx(We,{children:v.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:m.cron_expr})}),v.jsx(We,{className:"text-sm text-muted-foreground",children:q3(m.next_run_at)}),v.jsx(We,{className:"text-sm text-muted-foreground",children:q3(m.last_run_at)}),v.jsx(We,{children:v.jsx(RTe,{schedule:m})}),v.jsx(We,{children:v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx(Te,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{s(m),a(!0)},children:v.jsx(cne,{className:"h-3.5 w-3.5"})}),v.jsx(Te,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>u.mutate({id:m.id,enable:!m.enabled}),children:m.enabled?v.jsx(sne,{className:"h-3.5 w-3.5"}):v.jsx(lO,{className:"h-3.5 w-3.5"})}),v.jsx(Te,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:text-destructive",onClick:()=>{confirm(`Delete schedule "${m.name}"?`)&&c.mutate(m.id)},children:v.jsx(Gf,{className:"h-3.5 w-3.5"})})]})})]},m.id))})]})}),v.jsx(MTe,{open:r,onOpenChange:a,editing:i})]})}function DTe(){return Bn({queryKey:Ye.config.global,queryFn:()=>He.get("/config/global")})}function ITe(){const e=Et();return qt({mutationFn:t=>He.put("/config/global",t),onSuccess:(t,n)=>{e.setQueryData(Ye.config.global,r=>({...r??{},values:n})),e.invalidateQueries({queryKey:Ye.config.global})}})}function LTe(){const e=Et();return qt({mutationFn:({projectId:t,data:n})=>He.put(`/projects/${t}/config`,n),onSuccess:(t,n)=>{e.setQueryData(Ye.projects.config(n.projectId),r=>({...r??{},project:n.data})),e.invalidateQueries({queryKey:Ye.projects.config(n.projectId)})}})}function XS(e){const t=e.orchestrator??{},n=e.policy??{},r=e.session??{},a=e.trace??{};return{runtime:mr(e.runtime),isolation:mr(e.isolation),memory:mr(e.memory),orchestrator_role:mr(t.role),orchestrator_permission_mode:mr(t.permission_mode),policy_max_depth:mr(n.max_depth),policy_agent_timeout:mr(n.agent_timeout),policy_max_delegate_retries:mr(n.max_delegate_retries),policy_cache_delegations:mr(n.cache_delegations),policy_cache_max_entries:mr(n.cache_max_entries),policy_cache_ttl_seconds:mr(n.cache_ttl_seconds),session_merge_strategy:mr(r.merge_strategy),session_pull_before_session:mr(r.pull_before_session),session_pr_command:mr(r.pr_command),trace_enabled:mr(a.enabled)}}function mr(e){return e==null?"":String(e)}function zTe(e){const t={};e.runtime&&(t.runtime=e.runtime),e.isolation&&(t.isolation=e.isolation),e.memory&&(t.memory=e.memory);const n={};e.orchestrator_role&&(n.role=e.orchestrator_role),e.orchestrator_permission_mode&&(n.permission_mode=e.orchestrator_permission_mode),Object.keys(n).length>0&&(t.orchestrator=n);const r={};e.policy_max_depth&&(r.max_depth=Number(e.policy_max_depth)),e.policy_agent_timeout&&(r.agent_timeout=Number(e.policy_agent_timeout)),e.policy_max_delegate_retries&&(r.max_delegate_retries=Number(e.policy_max_delegate_retries)),e.policy_cache_delegations&&(r.cache_delegations=e.policy_cache_delegations==="true"),e.policy_cache_max_entries&&(r.cache_max_entries=Number(e.policy_cache_max_entries)),e.policy_cache_ttl_seconds&&(r.cache_ttl_seconds=Number(e.policy_cache_ttl_seconds)),Object.keys(r).length>0&&(t.policy=r);const a={};e.session_merge_strategy&&(a.merge_strategy=e.session_merge_strategy),e.session_pull_before_session&&(a.pull_before_session=e.session_pull_before_session),e.session_pr_command&&(a.pr_command=e.session_pr_command),Object.keys(a).length>0&&(t.session=a);const i={};return e.trace_enabled&&(i.enabled=e.trace_enabled==="true"),Object.keys(i).length>0&&(t.trace=i),t}const $Te=["none","worktree"],BTe=["default","plan","bypassPermissions"],UTe=["auto","local","pr"],HTe=["prompt","always","never"],K3=["true","false"],GS="__empty__";function V3({values:e,placeholders:t,onSave:n,saving:r}){const[a,i]=y.useState(XS(e)),{data:s}=cc("agents"),{data:c}=cc("roles"),{data:u}=cc("memories"),f=t?XS(t):void 0,m=JSON.stringify(e);y.useEffect(()=>{i(XS(e))},[m]);const d=E=>C=>i(O=>({...O,[E]:C})),p=()=>{n(zTe(a))},b=(s??[]).map(E=>E.name),w=(c??[]).map(E=>E.name),x=new Set((u??[]).map(E=>E.name));x.add("none");const S=[...x].sort();return v.jsxs("div",{className:"flex flex-col gap-6",children:[v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"General"}),v.jsx(Ds,{}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsxs(pr,{label:"Runtime",children:[v.jsx(Tt,{list:"cfg-dl-runtime",value:a.runtime,onChange:E=>d("runtime")(E.target.value),placeholder:(f==null?void 0:f.runtime)||"strawpot-claude-code",className:"h-8 text-xs"}),b.length>0&&v.jsx("datalist",{id:"cfg-dl-runtime",children:b.map(E=>v.jsx("option",{value:E},E))})]}),v.jsx(pr,{label:"Isolation",children:v.jsx(qu,{value:a.isolation,onChange:d("isolation"),options:$Te,placeholder:(f==null?void 0:f.isolation)||"none",allowEmpty:!0})}),v.jsxs(pr,{label:"Memory",children:[v.jsx(Tt,{list:"cfg-dl-memory",value:a.memory,onChange:E=>d("memory")(E.target.value),placeholder:(f==null?void 0:f.memory)||"dial",className:"h-8 text-xs"}),v.jsx("datalist",{id:"cfg-dl-memory",children:S.map(E=>v.jsx("option",{value:E},E))})]})]})]}),v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"Orchestrator"}),v.jsx(Ds,{}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[v.jsxs(pr,{label:"Role",children:[v.jsx(Tt,{list:"cfg-dl-role",value:a.orchestrator_role,onChange:E=>d("orchestrator_role")(E.target.value),placeholder:(f==null?void 0:f.orchestrator_role)||"ai-ceo",className:"h-8 text-xs"}),w.length>0&&v.jsx("datalist",{id:"cfg-dl-role",children:w.map(E=>v.jsx("option",{value:E},E))})]}),v.jsx(pr,{label:"Permission Mode",children:v.jsx(qu,{value:a.orchestrator_permission_mode,onChange:d("orchestrator_permission_mode"),options:BTe,placeholder:(f==null?void 0:f.orchestrator_permission_mode)||"default",allowEmpty:!0})})]})]}),v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"Policy"}),v.jsx(Ds,{}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsx(pr,{label:"Max Depth",children:v.jsx(Tt,{type:"number",value:a.policy_max_depth,onChange:E=>d("policy_max_depth")(E.target.value),placeholder:(f==null?void 0:f.policy_max_depth)||"3",className:"h-8 text-xs"})}),v.jsx(pr,{label:"Agent Timeout (seconds)",children:v.jsx(Tt,{type:"number",value:a.policy_agent_timeout,onChange:E=>d("policy_agent_timeout")(E.target.value),placeholder:(f==null?void 0:f.policy_agent_timeout)||"none",className:"h-8 text-xs"})}),v.jsx(pr,{label:"Max Delegate Retries",children:v.jsx(Tt,{type:"number",value:a.policy_max_delegate_retries,onChange:E=>d("policy_max_delegate_retries")(E.target.value),placeholder:(f==null?void 0:f.policy_max_delegate_retries)||"0",className:"h-8 text-xs"})}),v.jsx(pr,{label:"Cache Delegations",children:v.jsx(qu,{value:a.policy_cache_delegations,onChange:d("policy_cache_delegations"),options:K3,placeholder:(f==null?void 0:f.policy_cache_delegations)==="false"?"false":"true",allowEmpty:!0})}),v.jsx(pr,{label:"Cache Max Entries",children:v.jsx(Tt,{value:a.policy_cache_max_entries,onChange:E=>d("policy_cache_max_entries")(E.target.value),placeholder:(f==null?void 0:f.policy_cache_max_entries)||"0 (unlimited)",className:"h-8 text-xs"})}),v.jsx(pr,{label:"Cache TTL (seconds)",children:v.jsx(Tt,{value:a.policy_cache_ttl_seconds,onChange:E=>d("policy_cache_ttl_seconds")(E.target.value),placeholder:(f==null?void 0:f.policy_cache_ttl_seconds)||"0 (unlimited)",className:"h-8 text-xs"})})]})]}),v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"Session"}),v.jsx(Ds,{}),v.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[v.jsx(pr,{label:"Merge Strategy",children:v.jsx(qu,{value:a.session_merge_strategy,onChange:d("session_merge_strategy"),options:UTe,placeholder:(f==null?void 0:f.session_merge_strategy)||"auto",allowEmpty:!0})}),v.jsx(pr,{label:"Pull Before Session",children:v.jsx(qu,{value:a.session_pull_before_session,onChange:d("session_pull_before_session"),options:HTe,placeholder:(f==null?void 0:f.session_pull_before_session)||"prompt",allowEmpty:!0})}),v.jsx(pr,{label:"PR Command",className:"sm:col-span-3",children:v.jsx(Tt,{value:a.session_pr_command,onChange:E=>d("session_pr_command")(E.target.value),placeholder:(f==null?void 0:f.session_pr_command)||"gh pr create --base {base_branch} --head {session_branch}",className:"h-8 text-xs font-mono"})})]})]}),v.jsxs("section",{className:"flex flex-col gap-3",children:[v.jsx("h3",{className:"text-sm font-semibold",children:"Trace"}),v.jsx(Ds,{}),v.jsx("div",{className:"grid gap-4 sm:grid-cols-3",children:v.jsx(pr,{label:"Enabled",children:v.jsx(qu,{value:a.trace_enabled,onChange:d("trace_enabled"),options:K3,placeholder:(f==null?void 0:f.trace_enabled)||"true",allowEmpty:!0})})})]}),v.jsxs(Te,{size:"sm",onClick:p,disabled:r,className:"self-start",children:[v.jsx(sB,{className:"mr-2 h-3.5 w-3.5"}),r?"Saving...":"Save Configuration"]})]})}function pr({label:e,children:t,className:n}){return v.jsxs("div",{className:`flex flex-col gap-1 ${n??""}`,children:[v.jsx(kt,{className:"text-xs",children:e}),t]})}function qu({value:e,onChange:t,options:n,placeholder:r,allowEmpty:a}){return v.jsxs(xo,{value:e||(a?GS:""),onValueChange:i=>t(i===GS?"":i),children:[v.jsx(So,{className:"h-8 text-xs",children:v.jsx(wo,{placeholder:r})}),v.jsxs(Eo,{children:[a&&v.jsx(Dn,{value:GS,className:"text-muted-foreground",children:r?`Default (${r})`:"Default"}),n.map(i=>v.jsx(Dn,{value:i,children:i},i))]})]})}function FTe(){var p,b;const[e,t]=y.useState("global"),[n,r]=y.useState(null),a=Et(),i=DTe(),s=Wf(),c=vB(n??0,{enabled:n!=null}),u=ITe(),f=LTe(),m=w=>{u.mutate(w,{onSuccess:()=>mt.success("Global configuration saved"),onError:()=>mt.error("Failed to save global configuration")})},d=w=>{n!=null&&f.mutate({projectId:n,data:w},{onSuccess:()=>mt.success("Project configuration saved"),onError:()=>mt.error("Failed to save project configuration")})};return y.useEffect(()=>{e==="project"&&n!=null&&a.invalidateQueries({queryKey:Ye.projects.config(n)})},[e,n,a]),v.jsxs("div",{className:"space-y-6",children:[v.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Settings"}),v.jsxs(OA,{value:e,onValueChange:t,children:[v.jsxs(CA,{children:[v.jsx(Ea,{value:"global",children:"Global"}),v.jsx(Ea,{value:"project",children:"Project"})]}),v.jsx(_a,{value:"global",className:"mt-4",children:i.isLoading?v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):v.jsx(V3,{values:((p=i.data)==null?void 0:p.values)??{},placeholders:(b=i.data)==null?void 0:b.defaults,onSave:m,saving:u.isPending})}),v.jsx(_a,{value:"project",className:"mt-4",children:v.jsxs("div",{className:"flex flex-col gap-4",children:[v.jsxs("div",{className:"flex flex-col gap-1 max-w-xs",children:[v.jsx(kt,{className:"text-xs",children:"Project"}),v.jsxs(xo,{value:n!=null?String(n):"",onValueChange:w=>r(Number(w)),children:[v.jsx(So,{className:"h-8 text-xs",children:v.jsx(wo,{placeholder:"Select a project"})}),v.jsx(Eo,{children:(s.data??[]).map(w=>v.jsx(Dn,{value:String(w.id),children:w.display_name},w.id))})]})]}),n!=null&&c.isLoading&&v.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),n!=null&&c.data&&v.jsx(V3,{values:c.data.project,placeholders:c.data.merged_nested,onSave:d,saving:f.isPending},n)]})})]})]})}function qTe(){return v.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20",children:[v.jsx("h1",{className:"text-2xl font-bold",children:"Page not found"}),v.jsx(Te,{variant:"outline",asChild:!0,children:v.jsxs(Xa,{to:"/",children:[v.jsx(qte,{className:"mr-2 h-4 w-4"}),"Back to Dashboard"]})})]})}const KTe=3,VTe=1e4,YTe=2e3;function XTe(){const e=Et(),t=y.useRef(null),n=y.useRef(void 0),r=y.useRef(1e3),a=y.useRef(0),i=y.useRef({});y.useEffect(()=>{function s(u){const f=Date.now();if(f-a.current<YTe)return!1;const m=(i.current[u]??[]).filter(d=>f-d<VTe);return m.length>=KTe?!1:(m.push(f),i.current[u]=m,!0)}function c(){const u=new EventSource("/api/events");t.current=u,u.onopen=()=>{r.current=1e3,a.current=Date.now()};const f=m=>{try{const d=JSON.parse(m.data),p=(d.run_id??"unknown").slice(0,12);s(m.type)&&(m.type==="session_started"?mt.info(`Session ${p} started`):m.type==="session_completed"?mt.success(`Session ${p} completed`):m.type==="session_failed"?mt.error(`Session ${p} failed`):m.type==="session_stopped"&&mt.warning(`Session ${p} stopped`)),e.invalidateQueries({queryKey:["sessions"]}),d.project_id&&e.invalidateQueries({queryKey:Ye.projects.sessions(d.project_id)})}catch{}};u.addEventListener("session_started",f),u.addEventListener("session_completed",f),u.addEventListener("session_failed",f),u.addEventListener("session_stopped",f),u.onerror=()=>{u.close(),t.current=null,n.current=setTimeout(()=>{r.current=Math.min(r.current*2,15e3),c()},r.current)}}return c(),()=>{var u;(u=t.current)==null||u.close(),t.current=null,n.current&&clearTimeout(n.current)}},[e])}function GTe(){return XTe(),v.jsx(QV,{children:v.jsxs(vi,{element:v.jsx(tae,{}),children:[v.jsx(vi,{index:!0,element:v.jsx(dae,{})}),v.jsx(vi,{path:"projects",element:v.jsx(bae,{})}),v.jsx(vi,{path:"projects/:projectId",element:v.jsx(bEe,{})}),v.jsx(vi,{path:"projects/:projectId/sessions/:runId",element:v.jsx(aTe,{})}),v.jsx(vi,{path:"schedules",element:v.jsx(kTe,{})}),v.jsx(vi,{path:"resources/:resourceType",element:v.jsx(wTe,{})}),v.jsx(vi,{path:"settings",element:v.jsx(FTe,{})}),v.jsx(vi,{path:"*",element:v.jsx(qTe,{})})]})})}QK.createRoot(document.getElementById("root")).render(v.jsx(y.StrictMode,{children:v.jsx(dX,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:v.jsx(rX,{client:rre,children:v.jsxs(Z$,{children:[v.jsx(SY,{children:v.jsx(GTe,{})}),v.jsx(nre,{})]})})})}));
