var IK=Object.defineProperty;var OP=e=>{throw TypeError(e)};var LK=(e,t,n)=>t in e?IK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Pw=(e,t,n)=>LK(e,typeof t!="symbol"?t+"":t,n),Mw=(e,t,n)=>t.has(e)||OP("Cannot "+n);var G=(e,t,n)=>(Mw(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?OP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),be=(e,t,n,r)=>(Mw(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ze=(e,t,n)=>(Mw(e,t,"access private method"),n);var xv=(e,t,n,r)=>({set _(a){be(e,t,a,n)},get _(){return G(e,t,r)}});function zK(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 Wa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rw={exports:{}},Qd={};/**
 * @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 jP;function $K(){if(jP)return Qd;jP=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 Qd.Fragment=t,Qd.jsx=n,Qd.jsxs=n,Qd}var CP;function BK(){return CP||(CP=1,Rw.exports=$K()),Rw.exports}var g=BK(),kw={exports:{}},Be={};/**
 * @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 UK(){if(AP)return Be;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"),h=Symbol.for("react.activity"),p=Symbol.iterator;function y(I){return I===null||typeof I!="object"?null:(I=p&&I[p]||I["@@iterator"],typeof I=="function"?I:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,S={};function E(I,z,X){this.props=I,this.context=z,this.refs=S,this.updater=X||w}E.prototype.isReactComponent={},E.prototype.setState=function(I,z){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,z,"setState")},E.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function C(){}C.prototype=E.prototype;function j(I,z,X){this.props=I,this.context=z,this.refs=S,this.updater=X||w}var A=j.prototype=new C;A.constructor=j,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(I,z,X){var Z=X.ref;return{$$typeof:e,type:I,key:z,ref:Z!==void 0?Z:null,props:X}}function K(I,z){return D(I.type,z,I.props)}function B(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function L(I){var z={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(X){return z[X]})}var W=/\/+/g;function $(I,z){return typeof I=="object"&&I!==null&&I.key!=null?L(""+I.key):z.toString(36)}function Y(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(N,N):(I.status="pending",I.then(function(z){I.status==="pending"&&(I.status="fulfilled",I.value=z)},function(z){I.status==="pending"&&(I.status="rejected",I.reason=z)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function R(I,z,X,Z,ee){var se=typeof I;(se==="undefined"||se==="boolean")&&(I=null);var ie=!1;if(I===null)ie=!0;else switch(se){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(I.$$typeof){case e:case t:ie=!0;break;case m:return ie=I._init,R(ie(I._payload),z,X,Z,ee)}}if(ie)return ee=ee(I),ie=Z===""?"."+$(I,0):Z,T(ee)?(X="",ie!=null&&(X=ie.replace(W,"$&/")+"/"),R(ee,z,X,"",function(ce){return ce})):ee!=null&&(B(ee)&&(ee=K(ee,X+(ee.key==null||I&&I.key===ee.key?"":(""+ee.key).replace(W,"$&/")+"/")+ie)),z.push(ee)),1;ie=0;var re=Z===""?".":Z+":";if(T(I))for(var J=0;J<I.length;J++)Z=I[J],se=re+$(Z,J),ie+=R(Z,z,X,se,ee);else if(J=y(I),typeof J=="function")for(I=J.call(I),J=0;!(Z=I.next()).done;)Z=Z.value,se=re+$(Z,J++),ie+=R(Z,z,X,se,ee);else if(se==="object"){if(typeof I.then=="function")return R(Y(I),z,X,Z,ee);throw z=String(I),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return ie}function H(I,z,X){if(I==null)return I;var Z=[],ee=0;return R(I,Z,"","",function(se){return z.call(X,se,ee++)}),Z}function q(I){if(I._status===-1){var z=I._result;z=z(),z.then(function(X){(I._status===0||I._status===-1)&&(I._status=1,I._result=X)},function(X){(I._status===0||I._status===-1)&&(I._status=2,I._result=X)}),I._status===-1&&(I._status=0,I._result=z)}if(I._status===1)return I._result.default;throw I._result}var F=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},V={map:H,forEach:function(I,z,X){H(I,function(){z.apply(this,arguments)},X)},count:function(I){var z=0;return H(I,function(){z++}),z},toArray:function(I){return H(I,function(z){return z})||[]},only:function(I){if(!B(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Be.Activity=h,Be.Children=V,Be.Component=E,Be.Fragment=n,Be.Profiler=a,Be.PureComponent=j,Be.StrictMode=r,Be.Suspense=u,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Be.__COMPILER_RUNTIME={__proto__:null,c:function(I){return P.H.useMemoCache(I)}},Be.cache=function(I){return function(){return I.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(I,z,X){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var Z=x({},I.props),ee=I.key;if(z!=null)for(se in z.key!==void 0&&(ee=""+z.key),z)!k.call(z,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&z.ref===void 0||(Z[se]=z[se]);var se=arguments.length-2;if(se===1)Z.children=X;else if(1<se){for(var ie=Array(se),re=0;re<se;re++)ie[re]=arguments[re+2];Z.children=ie}return D(I.type,ee,Z)},Be.createContext=function(I){return I={$$typeof:s,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:i,_context:I},I},Be.createElement=function(I,z,X){var Z,ee={},se=null;if(z!=null)for(Z in z.key!==void 0&&(se=""+z.key),z)k.call(z,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(ee[Z]=z[Z]);var ie=arguments.length-2;if(ie===1)ee.children=X;else if(1<ie){for(var re=Array(ie),J=0;J<ie;J++)re[J]=arguments[J+2];ee.children=re}if(I&&I.defaultProps)for(Z in ie=I.defaultProps,ie)ee[Z]===void 0&&(ee[Z]=ie[Z]);return D(I,se,ee)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(I){return{$$typeof:c,render:I}},Be.isValidElement=B,Be.lazy=function(I){return{$$typeof:m,_payload:{_status:-1,_result:I},_init:q}},Be.memo=function(I,z){return{$$typeof:f,type:I,compare:z===void 0?null:z}},Be.startTransition=function(I){var z=P.T,X={};P.T=X;try{var Z=I(),ee=P.S;ee!==null&&ee(X,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(N,F)}catch(se){F(se)}finally{z!==null&&X.types!==null&&(z.types=X.types),P.T=z}},Be.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Be.use=function(I){return P.H.use(I)},Be.useActionState=function(I,z,X){return P.H.useActionState(I,z,X)},Be.useCallback=function(I,z){return P.H.useCallback(I,z)},Be.useContext=function(I){return P.H.useContext(I)},Be.useDebugValue=function(){},Be.useDeferredValue=function(I,z){return P.H.useDeferredValue(I,z)},Be.useEffect=function(I,z){return P.H.useEffect(I,z)},Be.useEffectEvent=function(I){return P.H.useEffectEvent(I)},Be.useId=function(){return P.H.useId()},Be.useImperativeHandle=function(I,z,X){return P.H.useImperativeHandle(I,z,X)},Be.useInsertionEffect=function(I,z){return P.H.useInsertionEffect(I,z)},Be.useLayoutEffect=function(I,z){return P.H.useLayoutEffect(I,z)},Be.useMemo=function(I,z){return P.H.useMemo(I,z)},Be.useOptimistic=function(I,z){return P.H.useOptimistic(I,z)},Be.useReducer=function(I,z,X){return P.H.useReducer(I,z,X)},Be.useRef=function(I){return P.H.useRef(I)},Be.useState=function(I){return P.H.useState(I)},Be.useSyncExternalStore=function(I,z,X){return P.H.useSyncExternalStore(I,z,X)},Be.useTransition=function(){return P.H.useTransition()},Be.version="19.2.4",Be}var NP;function $f(){return NP||(NP=1,kw.exports=UK()),kw.exports}var b=$f();const ge=Wa(b),eO=zK({__proto__:null,default:ge},[b]);var Dw={exports:{}},Zd={},Iw={exports:{}},Lw={};/**
 * @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 HK(){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,V=R[F];if(0<a(V,H))R[F]=H,R[q]=V,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,V=R.length,I=V>>>1;F<I;){var z=2*(F+1)-1,X=R[z],Z=z+1,ee=R[Z];if(0>a(X,q))Z<V&&0>a(ee,X)?(R[F]=ee,R[Z]=q,F=Z):(R[F]=X,R[z]=q,F=z);else if(Z<V&&0>a(ee,q))R[F]=ee,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,h=null,p=3,y=!1,w=!1,x=!1,S=!1,E=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,j=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,L());else{var H=n(f);H!==null&&Y(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),y=!0;var q=p;try{t:{for(A(R),h=n(u);h!==null&&!(h.expirationTime>R&&K());){var F=h.callback;if(typeof F=="function"){h.callback=null,p=h.priorityLevel;var V=F(h.expirationTime<=R);if(R=e.unstable_now(),typeof V=="function"){h.callback=V,A(R),H=!0;break t}h===n(u)&&r(u),A(R)}else r(u);h=n(u)}if(h!==null)H=!0;else{var I=n(f);I!==null&&Y(T,I.startTime-R),H=!1}}break e}finally{h=null,p=q,y=!1}H=void 0}}finally{H?L():N=!1}}}var L;if(typeof j=="function")L=function(){j(B)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,$=W.port2;W.port1.onmessage=B,L=function(){$.postMessage(null)}}else L=function(){E(B,0)};function Y(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 V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=q+V,R={id:m++,callback:H,priorityLevel:R,startTime:q,expirationTime:V,sortIndex:-1},q>F?(R.sortIndex=q,t(f,R),n(u)===null&&R===n(f)&&(x?(C(P),P=-1):x=!0,Y(T,q-F))):(R.sortIndex=V,t(u,R),w||y||(w=!0,N||(N=!0,L()))),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}}}})(Lw)),Lw}var PP;function FK(){return PP||(PP=1,Iw.exports=HK()),Iw.exports}var zw={exports:{}},Jn={};/**
 * @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 qK(){if(MP)return Jn;MP=1;var e=$f();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 h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:h==null?null:""+h,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 Jn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Jn.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)},Jn.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()}},Jn.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))},Jn.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Jn.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var m=f.as,h=c(m,f.crossOrigin),p=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:p,fetchPriority:y}):m==="script"&&r.d.X(u,{crossOrigin:h,integrity:p,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Jn.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)},Jn.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,h=c(m,f.crossOrigin);r.d.L(u,m,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Jn.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)},Jn.requestFormReset=function(u){r.d.r(u)},Jn.unstable_batchedUpdates=function(u,f){return u(f)},Jn.useFormState=function(u,f,m){return s.H.useFormState(u,f,m)},Jn.useFormStatus=function(){return s.H.useHostTransitionStatus()},Jn.version="19.2.4",Jn}var RP;function az(){if(RP)return zw.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(),zw.exports=qK(),zw.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 KK(){if(kP)return Zd;kP=1;var e=FK(),t=$f(),n=az();function r(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}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,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d: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 d=o,v=l;;){var _=d.return;if(_===null)break;var O=_.alternate;if(O===null){if(v=_.return,v!==null){d=v;continue}break}if(_.child===O.child){for(O=_.child;O;){if(O===d)return u(_),o;if(O===v)return u(_),l;O=O.sibling}throw Error(r(188))}if(d.return!==v.return)d=_,v=O;else{for(var M=!1,U=_.child;U;){if(U===d){M=!0,d=_,v=O;break}if(U===v){M=!0,v=_,d=O;break}U=U.sibling}if(!M){for(U=O.child;U;){if(U===d){M=!0,d=O,v=_;break}if(U===v){M=!0,v=O,d=_;break}U=U.sibling}if(!M)throw Error(r(189))}}if(d.alternate!==v)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?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 h=Object.assign,p=Symbol.for("react.element"),y=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"),j=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 L(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 $(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 j: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:$(o.type)||"Memo";case k:l=o._payload,o=o._init;try{return $(o(l))}catch{}}return null}var Y=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=[],V=-1;function I(o){return{current:o}}function z(o){0>V||(o.current=F[V],F[V]=null,V--)}function X(o,l){V++,F[V]=o.current,o.current=l}var Z=I(null),ee=I(null),se=I(null),ie=I(null);function re(o,l){switch(X(se,l),X(ee,o),X(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}}z(Z),X(Z,o)}function J(){z(Z),z(ee),z(se)}function ce(o){o.memoizedState!==null&&X(ie,o);var l=Z.current,d=G2(l,o.type);l!==d&&(X(ee,o),X(Z,d))}function me(o){ee.current===o&&(z(Z),z(ee)),ie.current===o&&(z(ie),Yd._currentValue=q)}var ne,ye;function xe(o){if(ne===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);ne=l&&l[1]||"",ye=-1<d.stack.indexOf(`
    at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ne+o+ye}var Ie=!1;function Pe(o,l){if(!o||Ie)return"";Ie=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={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]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var O=v.DetermineComponentFrameRoot(),M=O[0],U=O[1];if(M&&U){var Q=M.split(`
`),ue=U.split(`
`);for(_=v=0;v<Q.length&&!Q[v].includes("DetermineComponentFrameRoot");)v++;for(;_<ue.length&&!ue[_].includes("DetermineComponentFrameRoot");)_++;if(v===Q.length||_===ue.length)for(v=Q.length-1,_=ue.length-1;1<=v&&0<=_&&Q[v]!==ue[_];)_--;for(;1<=v&&0<=_;v--,_--)if(Q[v]!==ue[_]){if(v!==1||_!==1)do if(v--,_--,0>_||Q[v]!==ue[_]){var he=`
`+Q[v].replace(" at new "," at ");return o.displayName&&he.includes("<anonymous>")&&(he=he.replace("<anonymous>",o.displayName)),he}while(1<=v&&0<=_);break}}}finally{Ie=!1,Error.prepareStackTrace=d}return(d=o?o.displayName||o.name:"")?xe(d):""}function Ve(o,l){switch(o.tag){case 26:case 27:case 5:return xe(o.type);case 16:return xe("Lazy");case 13:return o.child!==l&&l!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("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 xe("Activity");default:return""}}function mn(o){try{var l="",d=null;do l+=Ve(o,d),d=o,o=o.return;while(o);return l}catch(v){return`
Error generating stack: `+v.message+`
`+v.stack}}var pt=Object.prototype.hasOwnProperty,Mr=e.unstable_scheduleCallback,Ca=e.unstable_cancelCallback,Qt=e.unstable_shouldYield,pr=e.unstable_requestPaint,pn=e.unstable_now,Fo=e.unstable_getCurrentPriorityLevel,vr=e.unstable_ImmediatePriority,ni=e.unstable_UserBlockingPriority,ri=e.unstable_NormalPriority,gl=e.unstable_LowPriority,Rr=e.unstable_IdlePriority,Wc=e.log,ai=e.unstable_setDisableYieldValue,Li=null,Bn=null;function kr(o){if(typeof Wc=="function"&&ai(o),Bn&&typeof Bn.setStrictMode=="function")try{Bn.setStrictMode(Li,o)}catch{}}var Nn=Math.clz32?Math.clz32:ta,id=Math.log,yl=Math.LN2;function ta(o){return o>>>=0,o===0?32:31-(id(o)/yl|0)|0}var qo=256,Ko=262144,zi=4194304;function na(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 $e(o,l,d){var v=o.pendingLanes;if(v===0)return 0;var _=0,O=o.suspendedLanes,M=o.pingedLanes;o=o.warmLanes;var U=v&134217727;return U!==0?(v=U&~O,v!==0?_=na(v):(M&=U,M!==0?_=na(M):d||(d=U&~o,d!==0&&(_=na(d))))):(U=v&~O,U!==0?_=na(U):M!==0?_=na(M):d||(d=v&~o,d!==0&&(_=na(d)))),_===0?0:l!==0&&l!==_&&(l&O)===0&&(O=_&-_,d=l&-l,O>=d||O===32&&(d&4194048)!==0)?l:_}function _t(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function tn(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 Tn(){var o=zi;return zi<<=1,(zi&62914560)===0&&(zi=4194304),o}function ii(o){for(var l=[],d=0;31>d;d++)l.push(o);return l}function Ct(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function Gn(o,l,d,v,_,O){var M=o.pendingLanes;o.pendingLanes=d,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=d,o.entangledLanes&=d,o.errorRecoveryDisabledLanes&=d,o.shellSuspendCounter=0;var U=o.entanglements,Q=o.expirationTimes,ue=o.hiddenUpdates;for(d=M&~d;0<d;){var he=31-Nn(d),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)}d&=~ve}v!==0&&$i(o,v,0),O!==0&&_===0&&o.tag!==0&&(o.suspendedLanes|=O&~(M&~l))}function $i(o,l,d){o.pendingLanes|=l,o.suspendedLanes&=~l;var v=31-Nn(l);o.entangledLanes|=l,o.entanglements[v]=o.entanglements[v]|1073741824|d&261930}function Wn(o,l){var d=o.entangledLanes|=l;for(o=o.entanglements;d;){var v=31-Nn(d),_=1<<v;_&l|o[v]&l&&(o[v]|=l),d&=~_}}function Qn(o,l){var d=l&-l;return d=(d&42)!==0?1:Vo(d),(d&(o.suspendedLanes|l))!==0?0:d}function Vo(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 Dr(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function od(){var o=H.p;return o!==0?o:(o=window.event,o===void 0?32:yP(o.type))}function np(o,l){var d=H.p;try{return H.p=o,l()}finally{H.p=d}}var oi=Math.random().toString(36).slice(2),vn="__reactFiber$"+oi,Zn="__reactProps$"+oi,Bi="__reactContainer$"+oi,Qc="__reactEvents$"+oi,rp="__reactListeners$"+oi,Sb="__reactHandles$"+oi,ap="__reactResources$"+oi,bl="__reactMarker$"+oi;function sd(o){delete o[vn],delete o[Zn],delete o[Qc],delete o[rp],delete o[Sb]}function Yo(o){var l=o[vn];if(l)return l;for(var d=o.parentNode;d;){if(l=d[Bi]||d[vn]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(o=nP(o);o!==null;){if(d=o[vn])return d;o=nP(o)}return l}o=d,d=o.parentNode}return null}function Xo(o){if(o=o[vn]||o[Bi]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function Go(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(r(33))}function Wo(o){var l=o[ap];return l||(l=o[ap]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function nn(o){o[bl]=!0}var ip=new Set,op={};function Ui(o,l){Qo(o,l),Qo(o+"Capture",l)}function Qo(o,l){for(op[o]=l,o=0;o<l.length;o++)ip.add(l[o])}var Eb=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]*$"),ld={},sp={};function _b(o){return pt.call(sp,o)?!0:pt.call(ld,o)?!1:Eb.test(o)?sp[o]=!0:(ld[o]=!0,!1)}function Zc(o,l,d){if(_b(l))if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var v=l.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,""+d)}}function Jc(o,l,d){if(d===null)o.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,""+d)}}function Aa(o,l,d,v){if(v===null)o.removeAttribute(d);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(d);return}o.setAttributeNS(l,d,""+v)}}function gr(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function lp(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Ob(o,l,d){var v=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var _=v.get,O=v.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return _.call(this)},set:function(M){d=""+M,O.call(this,M)}}),Object.defineProperty(o,l,{enumerable:v.enumerable}),{getValue:function(){return d},setValue:function(M){d=""+M},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Zo(o){if(!o._valueTracker){var l=lp(o)?"checked":"value";o._valueTracker=Ob(o,l,""+o[l])}}function cp(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var d=l.getValue(),v="";return o&&(v=lp(o)?o.checked?"true":"false":o.value),o=v,o!==d?(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 jb=/[\n"\\]/g;function yr(o){return o.replace(jb,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function wl(o,l,d,v,_,O,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=""+gr(l)):o.value!==""+gr(l)&&(o.value=""+gr(l)):M!=="submit"&&M!=="reset"||o.removeAttribute("value"),l!=null?cd(o,M,gr(l)):d!=null?cd(o,M,gr(d)):v!=null&&o.removeAttribute("value"),_==null&&O!=null&&(o.defaultChecked=!!O),_!=null&&(o.checked=_&&typeof _!="function"&&typeof _!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?o.name=""+gr(U):o.removeAttribute("name")}function up(o,l,d,v,_,O,M,U){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(o.type=O),l!=null||d!=null){if(!(O!=="submit"&&O!=="reset"||l!=null)){Zo(o);return}d=d!=null?""+gr(d):"",l=l!=null?""+gr(l):d,U||l===o.value||(o.value=l),o.defaultValue=l}v=v??_,v=typeof v!="function"&&typeof v!="symbol"&&!!v,o.checked=U?o.checked:!!v,o.defaultChecked=!!v,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(o.name=M),Zo(o)}function cd(o,l,d){l==="number"&&xl(o.ownerDocument)===o||o.defaultValue===""+d||(o.defaultValue=""+d)}function Hi(o,l,d,v){if(o=o.options,l){l={};for(var _=0;_<d.length;_++)l["$"+d[_]]=!0;for(d=0;d<o.length;d++)_=l.hasOwnProperty("$"+o[d].value),o[d].selected!==_&&(o[d].selected=_),_&&v&&(o[d].defaultSelected=!0)}else{for(d=""+gr(d),l=null,_=0;_<o.length;_++){if(o[_].value===d){o[_].selected=!0,v&&(o[_].defaultSelected=!0);return}l!==null||o[_].disabled||(l=o[_])}l!==null&&(l.selected=!0)}}function FA(o,l,d){if(l!=null&&(l=""+gr(l),l!==o.value&&(o.value=l),d==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=d!=null?""+gr(d):""}function qA(o,l,d,v){if(l==null){if(v!=null){if(d!=null)throw Error(r(92));if(Y(v)){if(1<v.length)throw Error(r(93));v=v[0]}d=v}d==null&&(d=""),l=d}d=gr(l),o.defaultValue=d,v=o.textContent,v===d&&v!==""&&v!==null&&(o.value=v),Zo(o)}function eu(o,l){if(l){var d=o.firstChild;if(d&&d===o.lastChild&&d.nodeType===3){d.nodeValue=l;return}}o.textContent=l}var P9=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,d){var v=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?v?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":v?o.setProperty(l,d):typeof d!="number"||d===0||P9.has(l)?l==="float"?o.cssFloat=d:o[l]=(""+d).trim():o[l]=d+"px"}function VA(o,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(o=o.style,d!=null){for(var v in d)!d.hasOwnProperty(v)||l!=null&&l.hasOwnProperty(v)||(v.indexOf("--")===0?o.setProperty(v,""):v==="float"?o.cssFloat="":o[v]="");for(var _ in l)v=l[_],l.hasOwnProperty(_)&&d[_]!==v&&KA(o,_,v)}else for(var O in l)l.hasOwnProperty(O)&&KA(o,O,l[O])}function Cb(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 M9=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"]]),R9=/^[\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 fp(o){return R9.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function Fi(){}var Ab=null;function Nb(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var tu=null,nu=null;function YA(o){var l=Xo(o);if(l&&(o=l.stateNode)){var d=o[Zn]||null;e:switch(o=l.stateNode,l.type){case"input":if(wl(o,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=o;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+yr(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var v=d[l];if(v!==o&&v.form===o.form){var _=v[Zn]||null;if(!_)throw Error(r(90));wl(v,_.value,_.defaultValue,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name)}}for(l=0;l<d.length;l++)v=d[l],v.form===o.form&&cp(v)}break e;case"textarea":FA(o,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&Hi(o,!!d.multiple,l,!1)}}}var Tb=!1;function XA(o,l,d){if(Tb)return o(l,d);Tb=!0;try{var v=o(l);return v}finally{if(Tb=!1,(tu!==null||nu!==null)&&(Zp(),tu&&(l=tu,o=nu,nu=tu=null,YA(l),o)))for(l=0;l<o.length;l++)YA(o[l])}}function ud(o,l){var d=o.stateNode;if(d===null)return null;var v=d[Zn]||null;if(v===null)return null;d=v[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":(v=!v.disabled)||(o=o.type,v=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!v;break e;default:o=!1}if(o)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var qi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pb=!1;if(qi)try{var fd={};Object.defineProperty(fd,"passive",{get:function(){Pb=!0}}),window.addEventListener("test",fd,fd),window.removeEventListener("test",fd,fd)}catch{Pb=!1}var Jo=null,Mb=null,dp=null;function GA(){if(dp)return dp;var o,l=Mb,d=l.length,v,_="value"in Jo?Jo.value:Jo.textContent,O=_.length;for(o=0;o<d&&l[o]===_[o];o++);var M=d-o;for(v=1;v<=M&&l[d-v]===_[O-v];v++);return dp=_.slice(o,1<v?1-v:void 0)}function hp(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 mp(){return!0}function WA(){return!1}function br(o){function l(d,v,_,O,M){this._reactName=d,this._targetInst=_,this.type=v,this.nativeEvent=O,this.target=M,this.currentTarget=null;for(var U in o)o.hasOwnProperty(U)&&(d=o[U],this[U]=d?d(O):O[U]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?mp:WA,this.isPropagationStopped=WA,this}return h(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=mp)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=mp)},persist:function(){},isPersistent:mp}),l}var Sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pp=br(Sl),dd=h({},Sl,{view:0,detail:0}),k9=br(dd),Rb,kb,hd,vp=h({},dd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ib,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!==hd&&(hd&&o.type==="mousemove"?(Rb=o.screenX-hd.screenX,kb=o.screenY-hd.screenY):kb=Rb=0,hd=o),Rb)},movementY:function(o){return"movementY"in o?o.movementY:kb}}),QA=br(vp),D9=h({},vp,{dataTransfer:0}),I9=br(D9),L9=h({},dd,{relatedTarget:0}),Db=br(L9),z9=h({},Sl,{animationName:0,elapsedTime:0,pseudoElement:0}),$9=br(z9),B9=h({},Sl,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),U9=br(B9),H9=h({},Sl,{data:0}),ZA=br(H9),F9={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q9={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"},K9={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V9(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=K9[o])?!!l[o]:!1}function Ib(){return V9}var Y9=h({},dd,{key:function(o){if(o.key){var l=F9[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=hp(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?q9[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ib,charCode:function(o){return o.type==="keypress"?hp(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?hp(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),X9=br(Y9),G9=h({},vp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),JA=br(G9),W9=h({},dd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ib}),Q9=br(W9),Z9=h({},Sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),J9=br(Z9),e7=h({},vp,{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}),t7=br(e7),n7=h({},Sl,{newState:0,oldState:0}),r7=br(n7),a7=[9,13,27,32],Lb=qi&&"CompositionEvent"in window,md=null;qi&&"documentMode"in document&&(md=document.documentMode);var i7=qi&&"TextEvent"in window&&!md,eN=qi&&(!Lb||md&&8<md&&11>=md),tN=" ",nN=!1;function rN(o,l){switch(o){case"keyup":return a7.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 ru=!1;function o7(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 s7(o,l){if(ru)return o==="compositionend"||!Lb&&rN(o,l)?(o=GA(),dp=Mb=Jo=null,ru=!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 l7={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"?!!l7[o.type]:l==="textarea"}function oN(o,l,d,v){tu?nu?nu.push(v):nu=[v]:tu=v,l=iv(l,"onChange"),0<l.length&&(d=new pp("onChange","change",null,d,v),o.push({event:d,listeners:l}))}var pd=null,vd=null;function c7(o){H2(o,0)}function gp(o){var l=Go(o);if(cp(l))return o}function sN(o,l){if(o==="change")return l}var lN=!1;if(qi){var zb;if(qi){var $b="oninput"in document;if(!$b){var cN=document.createElement("div");cN.setAttribute("oninput","return;"),$b=typeof cN.oninput=="function"}zb=$b}else zb=!1;lN=zb&&(!document.documentMode||9<document.documentMode)}function uN(){pd&&(pd.detachEvent("onpropertychange",fN),vd=pd=null)}function fN(o){if(o.propertyName==="value"&&gp(vd)){var l=[];oN(l,vd,o,Nb(o)),XA(c7,l)}}function u7(o,l,d){o==="focusin"?(uN(),pd=l,vd=d,pd.attachEvent("onpropertychange",fN)):o==="focusout"&&uN()}function f7(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return gp(vd)}function d7(o,l){if(o==="click")return gp(l)}function h7(o,l){if(o==="input"||o==="change")return gp(l)}function m7(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Ir=typeof Object.is=="function"?Object.is:m7;function gd(o,l){if(Ir(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var d=Object.keys(o),v=Object.keys(l);if(d.length!==v.length)return!1;for(v=0;v<d.length;v++){var _=d[v];if(!pt.call(l,_)||!Ir(o[_],l[_]))return!1}return!0}function dN(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function hN(o,l){var d=dN(o);o=0;for(var v;d;){if(d.nodeType===3){if(v=o+d.textContent.length,o<=l&&v>=l)return{node:d,offset:l-o};o=v}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=dN(d)}}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 d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)o=l.contentWindow;else break;l=xl(o.document)}return l}function Bb(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 p7=qi&&"documentMode"in document&&11>=document.documentMode,au=null,Ub=null,yd=null,Hb=!1;function vN(o,l,d){var v=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Hb||au==null||au!==xl(v)||(v=au,"selectionStart"in v&&Bb(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),yd&&gd(yd,v)||(yd=v,v=iv(Ub,"onSelect"),0<v.length&&(l=new pp("onSelect","select",null,l,d),o.push({event:l,listeners:v}),l.target=au)))}function El(o,l){var d={};return d[o.toLowerCase()]=l.toLowerCase(),d["Webkit"+o]="webkit"+l,d["Moz"+o]="moz"+l,d}var iu={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")},Fb={},gN={};qi&&(gN=document.createElement("div").style,"AnimationEvent"in window||(delete iu.animationend.animation,delete iu.animationiteration.animation,delete iu.animationstart.animation),"TransitionEvent"in window||delete iu.transitionend.transition);function _l(o){if(Fb[o])return Fb[o];if(!iu[o])return o;var l=iu[o],d;for(d in l)if(l.hasOwnProperty(d)&&d in gN)return Fb[o]=l[d];return o}var yN=_l("animationend"),bN=_l("animationiteration"),xN=_l("animationstart"),v7=_l("transitionrun"),g7=_l("transitionstart"),y7=_l("transitioncancel"),wN=_l("transitionend"),SN=new Map,qb="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(" ");qb.push("scrollEnd");function Na(o,l){SN.set(o,l),Ui(l,[o])}var yp=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)},ra=[],ou=0,Kb=0;function bp(){for(var o=ou,l=Kb=ou=0;l<o;){var d=ra[l];ra[l++]=null;var v=ra[l];ra[l++]=null;var _=ra[l];ra[l++]=null;var O=ra[l];if(ra[l++]=null,v!==null&&_!==null){var M=v.pending;M===null?_.next=_:(_.next=M.next,M.next=_),v.pending=_}O!==0&&EN(d,_,O)}}function xp(o,l,d,v){ra[ou++]=o,ra[ou++]=l,ra[ou++]=d,ra[ou++]=v,Kb|=v,o.lanes|=v,o=o.alternate,o!==null&&(o.lanes|=v)}function Vb(o,l,d,v){return xp(o,l,d,v),wp(o)}function Ol(o,l){return xp(o,null,null,l),wp(o)}function EN(o,l,d){o.lanes|=d;var v=o.alternate;v!==null&&(v.lanes|=d);for(var _=!1,O=o.return;O!==null;)O.childLanes|=d,v=O.alternate,v!==null&&(v.childLanes|=d),O.tag===22&&(o=O.stateNode,o===null||o._visibility&1||(_=!0)),o=O,O=O.return;return o.tag===3?(O=o.stateNode,_&&l!==null&&(_=31-Nn(d),o=O.hiddenUpdates,v=o[_],v===null?o[_]=[l]:v.push(l),l.lane=d|536870912),O):null}function wp(o){if(50<Bd)throw Bd=0,tw=null,Error(r(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var su={};function b7(o,l,d,v){this.tag=o,this.key=d,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=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lr(o,l,d,v){return new b7(o,l,d,v)}function Yb(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Ki(o,l){var d=o.alternate;return d===null?(d=Lr(o.tag,l,o.key,o.mode),d.elementType=o.elementType,d.type=o.type,d.stateNode=o.stateNode,d.alternate=o,o.alternate=d):(d.pendingProps=l,d.type=o.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=o.flags&65011712,d.childLanes=o.childLanes,d.lanes=o.lanes,d.child=o.child,d.memoizedProps=o.memoizedProps,d.memoizedState=o.memoizedState,d.updateQueue=o.updateQueue,l=o.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=o.sibling,d.index=o.index,d.ref=o.ref,d.refCleanup=o.refCleanup,d}function _N(o,l){o.flags&=65011714;var d=o.alternate;return d===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=d.childLanes,o.lanes=d.lanes,o.child=d.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=d.memoizedProps,o.memoizedState=d.memoizedState,o.updateQueue=d.updateQueue,o.type=d.type,l=d.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function Sp(o,l,d,v,_,O){var M=0;if(v=o,typeof o=="function")Yb(o)&&(M=1);else if(typeof o=="string")M=_K(o,d,Z.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case D:return o=Lr(31,d,l,_),o.elementType=D,o.lanes=O,o;case x:return jl(d.children,_,O,l);case S:M=8,_|=24;break;case E:return o=Lr(12,d,l,_|2),o.elementType=E,o.lanes=O,o;case T:return o=Lr(13,d,l,_),o.elementType=T,o.lanes=O,o;case N:return o=Lr(19,d,l,_),o.elementType=N,o.lanes=O,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case j: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,v=null;break e}M=29,d=Error(r(130,o===null?"null":typeof o,"")),v=null}return l=Lr(M,d,l,_),l.elementType=o,l.type=v,l.lanes=O,l}function jl(o,l,d,v){return o=Lr(7,o,v,l),o.lanes=d,o}function Xb(o,l,d){return o=Lr(6,o,null,l),o.lanes=d,o}function ON(o){var l=Lr(18,null,null,0);return l.stateNode=o,l}function Gb(o,l,d){return l=Lr(4,o.children!==null?o.children:[],o.key,l),l.lanes=d,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var jN=new WeakMap;function aa(o,l){if(typeof o=="object"&&o!==null){var d=jN.get(o);return d!==void 0?d:(l={value:o,source:l,stack:mn(l)},jN.set(o,l),l)}return{value:o,source:l,stack:mn(l)}}var lu=[],cu=0,Ep=null,bd=0,ia=[],oa=0,es=null,si=1,li="";function Vi(o,l){lu[cu++]=bd,lu[cu++]=Ep,Ep=o,bd=l}function CN(o,l,d){ia[oa++]=si,ia[oa++]=li,ia[oa++]=es,es=o;var v=si;o=li;var _=32-Nn(v)-1;v&=~(1<<_),d+=1;var O=32-Nn(l)+_;if(30<O){var M=_-_%5;O=(v&(1<<M)-1).toString(32),v>>=M,_-=M,si=1<<32-Nn(l)+_|d<<_|v,li=O+o}else si=1<<O|d<<_|v,li=o}function Wb(o){o.return!==null&&(Vi(o,1),CN(o,1,0))}function Qb(o){for(;o===Ep;)Ep=lu[--cu],lu[cu]=null,bd=lu[--cu],lu[cu]=null;for(;o===es;)es=ia[--oa],ia[oa]=null,li=ia[--oa],ia[oa]=null,si=ia[--oa],ia[oa]=null}function AN(o,l){ia[oa++]=si,ia[oa++]=li,ia[oa++]=es,si=l.id,li=l.overflow,es=o}var Un=null,At=null,Je=!1,ts=null,sa=!1,Zb=Error(r(519));function ns(o){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xd(aa(l,o)),Zb}function NN(o){var l=o.stateNode,d=o.type,v=o.memoizedProps;switch(l[vn]=o,l[Zn]=v,d){case"dialog":Xe("cancel",l),Xe("close",l);break;case"iframe":case"object":case"embed":Xe("load",l);break;case"video":case"audio":for(d=0;d<Hd.length;d++)Xe(Hd[d],l);break;case"source":Xe("error",l);break;case"img":case"image":case"link":Xe("error",l),Xe("load",l);break;case"details":Xe("toggle",l);break;case"input":Xe("invalid",l),up(l,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":Xe("invalid",l);break;case"textarea":Xe("invalid",l),qA(l,v.value,v.defaultValue,v.children)}d=v.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||v.suppressHydrationWarning===!0||V2(l.textContent,d)?(v.popover!=null&&(Xe("beforetoggle",l),Xe("toggle",l)),v.onScroll!=null&&Xe("scroll",l),v.onScrollEnd!=null&&Xe("scrollend",l),v.onClick!=null&&(l.onclick=Fi),l=!0):l=!1,l||ns(o,!0)}function TN(o){for(Un=o.return;Un;)switch(Un.tag){case 5:case 31:case 13:sa=!1;return;case 27:case 3:sa=!0;return;default:Un=Un.return}}function uu(o){if(o!==Un)return!1;if(!Je)return TN(o),Je=!0,!1;var l=o.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=o.type,d=!(d!=="form"&&d!=="button")||vw(o.type,o.memoizedProps)),d=!d),d&&At&&ns(o),TN(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));At=tP(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));At=tP(o)}else l===27?(l=At,vs(o.type)?(o=ww,ww=null,At=o):At=l):At=Un?ca(o.stateNode.nextSibling):null;return!0}function Cl(){At=Un=null,Je=!1}function Jb(){var o=ts;return o!==null&&(Er===null?Er=o:Er.push.apply(Er,o),ts=null),o}function xd(o){ts===null?ts=[o]:ts.push(o)}var ex=I(null),Al=null,Yi=null;function rs(o,l,d){X(ex,l._currentValue),l._currentValue=d}function Xi(o){o._currentValue=ex.current,z(ex)}function tx(o,l,d){for(;o!==null;){var v=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,v!==null&&(v.childLanes|=l)):v!==null&&(v.childLanes&l)!==l&&(v.childLanes|=l),o===d)break;o=o.return}}function nx(o,l,d,v){var _=o.child;for(_!==null&&(_.return=o);_!==null;){var O=_.dependencies;if(O!==null){var M=_.child;O=O.firstContext;e:for(;O!==null;){var U=O;O=_;for(var Q=0;Q<l.length;Q++)if(U.context===l[Q]){O.lanes|=d,U=O.alternate,U!==null&&(U.lanes|=d),tx(O.return,d,o),v||(M=null);break e}O=U.next}}else if(_.tag===18){if(M=_.return,M===null)throw Error(r(341));M.lanes|=d,O=M.alternate,O!==null&&(O.lanes|=d),tx(M,d,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 fu(o,l,d,v){o=null;for(var _=l,O=!1;_!==null;){if(!O){if((_.flags&524288)!==0)O=!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;Ir(_.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(Yd):o=[Yd])}_=_.return}o!==null&&nx(l,o,d,v),l.flags|=262144}function _p(o){for(o=o.firstContext;o!==null;){if(!Ir(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function Nl(o){Al=o,Yi=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Hn(o){return PN(Al,o)}function Op(o,l){return Al===null&&Nl(o),PN(o,l)}function PN(o,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},Yi===null){if(o===null)throw Error(r(308));Yi=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else Yi=Yi.next=l;return d}var x7=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(d,v){o.push(v)}};this.abort=function(){l.aborted=!0,o.forEach(function(d){return d()})}},w7=e.unstable_scheduleCallback,S7=e.unstable_NormalPriority,rn={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rx(){return{controller:new x7,data:new Map,refCount:0}}function wd(o){o.refCount--,o.refCount===0&&w7(S7,function(){o.controller.abort()})}var Sd=null,ax=0,du=0,hu=null;function E7(o,l){if(Sd===null){var d=Sd=[];ax=0,du=sw(),hu={status:"pending",value:void 0,then:function(v){d.push(v)}}}return ax++,l.then(MN,MN),l}function MN(){if(--ax===0&&Sd!==null){hu!==null&&(hu.status="fulfilled");var o=Sd;Sd=null,du=0,hu=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function _7(o,l){var d=[],v={status:"pending",value:null,reason:null,then:function(_){d.push(_)}};return o.then(function(){v.status="fulfilled",v.value=l;for(var _=0;_<d.length;_++)(0,d[_])(l)},function(_){for(v.status="rejected",v.reason=_,_=0;_<d.length;_++)(0,d[_])(void 0)}),v}var RN=R.S;R.S=function(o,l){v2=pn(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&E7(o,l),RN!==null&&RN(o,l)};var Tl=I(null);function ix(){var o=Tl.current;return o!==null?o:St.pooledCache}function jp(o,l){l===null?X(Tl,Tl.current):X(Tl,l.pool)}function kN(){var o=ix();return o===null?null:{parent:rn._currentValue,pool:o}}var mu=Error(r(460)),ox=Error(r(474)),Cp=Error(r(542)),Ap={then:function(){}};function DN(o){return o=o.status,o==="fulfilled"||o==="rejected"}function IN(o,l,d){switch(d=o[d],d===void 0?o.push(l):d!==l&&(l.then(Fi,Fi),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,zN(o),o;default:if(typeof l.status=="string")l.then(Fi,Fi);else{if(o=St,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=l,o.status="pending",o.then(function(v){if(l.status==="pending"){var _=l;_.status="fulfilled",_.value=v}},function(v){if(l.status==="pending"){var _=l;_.status="rejected",_.reason=v}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,zN(o),o}throw Ml=l,mu}}function Pl(o){try{var l=o._init;return l(o._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Ml=d,mu):d}}var Ml=null;function LN(){if(Ml===null)throw Error(r(459));var o=Ml;return Ml=null,o}function zN(o){if(o===mu||o===Cp)throw Error(r(483))}var pu=null,Ed=0;function Np(o){var l=Ed;return Ed+=1,pu===null&&(pu=[]),IN(pu,o,l)}function _d(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Tp(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 le=ae.deletions;le===null?(ae.deletions=[te],ae.flags|=16):le.push(te)}}function d(ae,te){if(!o)return null;for(;te!==null;)l(ae,te),te=te.sibling;return null}function v(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=Ki(ae,te),ae.index=0,ae.sibling=null,ae}function O(ae,te,le){return ae.index=le,o?(le=ae.alternate,le!==null?(le=le.index,le<te?(ae.flags|=67108866,te):le):(ae.flags|=67108866,te)):(ae.flags|=1048576,te)}function M(ae){return o&&ae.alternate===null&&(ae.flags|=67108866),ae}function U(ae,te,le,pe){return te===null||te.tag!==6?(te=Xb(le,ae.mode,pe),te.return=ae,te):(te=_(te,le),te.return=ae,te)}function Q(ae,te,le,pe){var ke=le.type;return ke===x?he(ae,te,le.props.children,pe,le.key):te!==null&&(te.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===k&&Pl(ke)===te.type)?(te=_(te,le.props),_d(te,le),te.return=ae,te):(te=Sp(le.type,le.key,le.props,null,ae.mode,pe),_d(te,le),te.return=ae,te)}function ue(ae,te,le,pe){return te===null||te.tag!==4||te.stateNode.containerInfo!==le.containerInfo||te.stateNode.implementation!==le.implementation?(te=Gb(le,ae.mode,pe),te.return=ae,te):(te=_(te,le.children||[]),te.return=ae,te)}function he(ae,te,le,pe,ke){return te===null||te.tag!==7?(te=jl(le,ae.mode,pe,ke),te.return=ae,te):(te=_(te,le),te.return=ae,te)}function ve(ae,te,le){if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return te=Xb(""+te,ae.mode,le),te.return=ae,te;if(typeof te=="object"&&te!==null){switch(te.$$typeof){case y:return le=Sp(te.type,te.key,te.props,null,ae.mode,le),_d(le,te),le.return=ae,le;case w:return te=Gb(te,ae.mode,le),te.return=ae,te;case k:return te=Pl(te),ve(ae,te,le)}if(Y(te)||L(te))return te=jl(te,ae.mode,le,null),te.return=ae,te;if(typeof te.then=="function")return ve(ae,Np(te),le);if(te.$$typeof===j)return ve(ae,Op(ae,te),le);Tp(ae,te)}return null}function fe(ae,te,le,pe){var ke=te!==null?te.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return ke!==null?null:U(ae,te,""+le,pe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case y:return le.key===ke?Q(ae,te,le,pe):null;case w:return le.key===ke?ue(ae,te,le,pe):null;case k:return le=Pl(le),fe(ae,te,le,pe)}if(Y(le)||L(le))return ke!==null?null:he(ae,te,le,pe,null);if(typeof le.then=="function")return fe(ae,te,Np(le),pe);if(le.$$typeof===j)return fe(ae,te,Op(ae,le),pe);Tp(ae,le)}return null}function de(ae,te,le,pe,ke){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return ae=ae.get(le)||null,U(te,ae,""+pe,ke);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case y:return ae=ae.get(pe.key===null?le:pe.key)||null,Q(te,ae,pe,ke);case w:return ae=ae.get(pe.key===null?le:pe.key)||null,ue(te,ae,pe,ke);case k:return pe=Pl(pe),de(ae,te,le,pe,ke)}if(Y(pe)||L(pe))return ae=ae.get(le)||null,he(te,ae,pe,ke,null);if(typeof pe.then=="function")return de(ae,te,le,Np(pe),ke);if(pe.$$typeof===j)return de(ae,te,le,Op(te,pe),ke);Tp(te,pe)}return null}function Oe(ae,te,le,pe){for(var ke=null,st=null,Te=te,qe=te=0,Qe=null;Te!==null&&qe<le.length;qe++){Te.index>qe?(Qe=Te,Te=null):Qe=Te.sibling;var lt=fe(ae,Te,le[qe],pe);if(lt===null){Te===null&&(Te=Qe);break}o&&Te&&lt.alternate===null&&l(ae,Te),te=O(lt,te,qe),st===null?ke=lt:st.sibling=lt,st=lt,Te=Qe}if(qe===le.length)return d(ae,Te),Je&&Vi(ae,qe),ke;if(Te===null){for(;qe<le.length;qe++)Te=ve(ae,le[qe],pe),Te!==null&&(te=O(Te,te,qe),st===null?ke=Te:st.sibling=Te,st=Te);return Je&&Vi(ae,qe),ke}for(Te=v(Te);qe<le.length;qe++)Qe=de(Te,ae,qe,le[qe],pe),Qe!==null&&(o&&Qe.alternate!==null&&Te.delete(Qe.key===null?qe:Qe.key),te=O(Qe,te,qe),st===null?ke=Qe:st.sibling=Qe,st=Qe);return o&&Te.forEach(function(ws){return l(ae,ws)}),Je&&Vi(ae,qe),ke}function Le(ae,te,le,pe){if(le==null)throw Error(r(151));for(var ke=null,st=null,Te=te,qe=te=0,Qe=null,lt=le.next();Te!==null&&!lt.done;qe++,lt=le.next()){Te.index>qe?(Qe=Te,Te=null):Qe=Te.sibling;var ws=fe(ae,Te,lt.value,pe);if(ws===null){Te===null&&(Te=Qe);break}o&&Te&&ws.alternate===null&&l(ae,Te),te=O(ws,te,qe),st===null?ke=ws:st.sibling=ws,st=ws,Te=Qe}if(lt.done)return d(ae,Te),Je&&Vi(ae,qe),ke;if(Te===null){for(;!lt.done;qe++,lt=le.next())lt=ve(ae,lt.value,pe),lt!==null&&(te=O(lt,te,qe),st===null?ke=lt:st.sibling=lt,st=lt);return Je&&Vi(ae,qe),ke}for(Te=v(Te);!lt.done;qe++,lt=le.next())lt=de(Te,ae,qe,lt.value,pe),lt!==null&&(o&&lt.alternate!==null&&Te.delete(lt.key===null?qe:lt.key),te=O(lt,te,qe),st===null?ke=lt:st.sibling=lt,st=lt);return o&&Te.forEach(function(DK){return l(ae,DK)}),Je&&Vi(ae,qe),ke}function yt(ae,te,le,pe){if(typeof le=="object"&&le!==null&&le.type===x&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case y:e:{for(var ke=le.key;te!==null;){if(te.key===ke){if(ke=le.type,ke===x){if(te.tag===7){d(ae,te.sibling),pe=_(te,le.props.children),pe.return=ae,ae=pe;break e}}else if(te.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===k&&Pl(ke)===te.type){d(ae,te.sibling),pe=_(te,le.props),_d(pe,le),pe.return=ae,ae=pe;break e}d(ae,te);break}else l(ae,te);te=te.sibling}le.type===x?(pe=jl(le.props.children,ae.mode,pe,le.key),pe.return=ae,ae=pe):(pe=Sp(le.type,le.key,le.props,null,ae.mode,pe),_d(pe,le),pe.return=ae,ae=pe)}return M(ae);case w:e:{for(ke=le.key;te!==null;){if(te.key===ke)if(te.tag===4&&te.stateNode.containerInfo===le.containerInfo&&te.stateNode.implementation===le.implementation){d(ae,te.sibling),pe=_(te,le.children||[]),pe.return=ae,ae=pe;break e}else{d(ae,te);break}else l(ae,te);te=te.sibling}pe=Gb(le,ae.mode,pe),pe.return=ae,ae=pe}return M(ae);case k:return le=Pl(le),yt(ae,te,le,pe)}if(Y(le))return Oe(ae,te,le,pe);if(L(le)){if(ke=L(le),typeof ke!="function")throw Error(r(150));return le=ke.call(le),Le(ae,te,le,pe)}if(typeof le.then=="function")return yt(ae,te,Np(le),pe);if(le.$$typeof===j)return yt(ae,te,Op(ae,le),pe);Tp(ae,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,te!==null&&te.tag===6?(d(ae,te.sibling),pe=_(te,le),pe.return=ae,ae=pe):(d(ae,te),pe=Xb(le,ae.mode,pe),pe.return=ae,ae=pe),M(ae)):d(ae,te)}return function(ae,te,le,pe){try{Ed=0;var ke=yt(ae,te,le,pe);return pu=null,ke}catch(Te){if(Te===mu||Te===Cp)throw Te;var st=Lr(29,Te,null,ae.mode);return st.lanes=pe,st.return=ae,st}finally{}}}var Rl=$N(!0),BN=$N(!1),as=!1;function sx(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lx(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 is(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function os(o,l,d){var v=o.updateQueue;if(v===null)return null;if(v=v.shared,(ft&2)!==0){var _=v.pending;return _===null?l.next=l:(l.next=_.next,_.next=l),v.pending=l,l=wp(o),EN(o,null,d),l}return xp(o,v,l,d),wp(o)}function Od(o,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var v=l.lanes;v&=o.pendingLanes,d|=v,l.lanes=d,Wn(o,d)}}function cx(o,l){var d=o.updateQueue,v=o.alternate;if(v!==null&&(v=v.updateQueue,d===v)){var _=null,O=null;if(d=d.firstBaseUpdate,d!==null){do{var M={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};O===null?_=O=M:O=O.next=M,d=d.next}while(d!==null);O===null?_=O=l:O=O.next=l}else _=O=l;d={baseState:v.baseState,firstBaseUpdate:_,lastBaseUpdate:O,shared:v.shared,callbacks:v.callbacks},o.updateQueue=d;return}o=d.lastBaseUpdate,o===null?d.firstBaseUpdate=l:o.next=l,d.lastBaseUpdate=l}var ux=!1;function jd(){if(ux){var o=hu;if(o!==null)throw o}}function Cd(o,l,d,v){ux=!1;var _=o.updateQueue;as=!1;var O=_.firstBaseUpdate,M=_.lastBaseUpdate,U=_.shared.pending;if(U!==null){_.shared.pending=null;var Q=U,ue=Q.next;Q.next=null,M===null?O=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(O!==null){var ve=_.baseState;M=0,he=ue=Q=null,U=O;do{var fe=U.lane&-536870913,de=fe!==U.lane;if(de?(We&fe)===fe:(v&fe)===fe){fe!==0&&fe===du&&(ux=!0),he!==null&&(he=he.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Oe=o,Le=U;fe=l;var yt=d;switch(Le.tag){case 1:if(Oe=Le.payload,typeof Oe=="function"){ve=Oe.call(yt,ve,fe);break e}ve=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Le.payload,fe=typeof Oe=="function"?Oe.call(yt,ve,fe):Oe,fe==null)break e;ve=h({},ve,fe);break e;case 2:as=!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,O===null&&(_.shared.lanes=0),fs|=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 d=o.callbacks;if(d!==null)for(o.callbacks=null,o=0;o<d.length;o++)UN(d[o],l)}var vu=I(null),Pp=I(0);function FN(o,l){o=ro,X(Pp,o),X(vu,l),ro=o|l.baseLanes}function fx(){X(Pp,ro),X(vu,vu.current)}function dx(){ro=Pp.current,z(vu),z(Pp)}var zr=I(null),la=null;function ss(o){var l=o.alternate;X(Zt,Zt.current&1),X(zr,o),la===null&&(l===null||vu.current!==null||l.memoizedState!==null)&&(la=o)}function hx(o){X(Zt,Zt.current),X(zr,o),la===null&&(la=o)}function qN(o){o.tag===22?(X(Zt,Zt.current),X(zr,o),la===null&&(la=o)):ls()}function ls(){X(Zt,Zt.current),X(zr,zr.current)}function $r(o){z(zr),la===o&&(la=null),z(Zt)}var Zt=I(0);function Mp(o){for(var l=o;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||bw(d)||xw(d)))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 Gi=0,Fe=null,vt=null,an=null,Rp=!1,gu=!1,kl=!1,kp=0,Ad=0,yu=null,O7=0;function Ht(){throw Error(r(321))}function mx(o,l){if(l===null)return!1;for(var d=0;d<l.length&&d<o.length;d++)if(!Ir(o[d],l[d]))return!1;return!0}function px(o,l,d,v,_,O){return Gi=O,Fe=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,R.H=o===null||o.memoizedState===null?CT:Tx,kl=!1,O=d(v,_),kl=!1,gu&&(O=VN(l,d,v,_)),KN(o),O}function KN(o){R.H=Pd;var l=vt!==null&&vt.next!==null;if(Gi=0,an=vt=Fe=null,Rp=!1,Ad=0,yu=null,l)throw Error(r(300));o===null||on||(o=o.dependencies,o!==null&&_p(o)&&(on=!0))}function VN(o,l,d,v){Fe=o;var _=0;do{if(gu&&(yu=null),Ad=0,gu=!1,25<=_)throw Error(r(301));if(_+=1,an=vt=null,o.updateQueue!=null){var O=o.updateQueue;O.lastEffect=null,O.events=null,O.stores=null,O.memoCache!=null&&(O.memoCache.index=0)}R.H=AT,O=l(d,v)}while(gu);return O}function j7(){var o=R.H,l=o.useState()[0];return l=typeof l.then=="function"?Nd(l):l,o=o.useState()[0],(vt!==null?vt.memoizedState:null)!==o&&(Fe.flags|=1024),l}function vx(){var o=kp!==0;return kp=0,o}function gx(o,l,d){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~d}function yx(o){if(Rp){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}Rp=!1}Gi=0,an=vt=Fe=null,gu=!1,Ad=kp=0,yu=null}function lr(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return an===null?Fe.memoizedState=an=o:an=an.next=o,an}function Jt(){if(vt===null){var o=Fe.alternate;o=o!==null?o.memoizedState:null}else o=vt.next;var l=an===null?Fe.memoizedState:an.next;if(l!==null)an=l,vt=o;else{if(o===null)throw Fe.alternate===null?Error(r(467)):Error(r(310));vt=o,o={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},an===null?Fe.memoizedState=an=o:an=an.next=o}return an}function Dp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Nd(o){var l=Ad;return Ad+=1,yu===null&&(yu=[]),o=IN(yu,o,l),l=Fe,(an===null?l.memoizedState:an.next)===null&&(l=l.alternate,R.H=l===null||l.memoizedState===null?CT:Tx),o}function Ip(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Nd(o);if(o.$$typeof===j)return Hn(o)}throw Error(r(438,String(o)))}function bx(o){var l=null,d=Fe.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var v=Fe.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(l={data:v.data.map(function(_){return _.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Dp(),Fe.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(o),v=0;v<o;v++)d[v]=K;return l.index++,d}function Wi(o,l){return typeof l=="function"?l(o):l}function Lp(o){var l=Jt();return xx(l,vt,o)}function xx(o,l,d){var v=o.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=d;var _=o.baseQueue,O=v.pending;if(O!==null){if(_!==null){var M=_.next;_.next=O.next,O.next=M}l.baseQueue=_=O,v.pending=null}if(O=o.baseState,_===null)o.memoizedState=O;else{l=_.next;var U=M=null,Q=null,ue=l,he=!1;do{var ve=ue.lane&-536870913;if(ve!==ue.lane?(We&ve)===ve:(Gi&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===du&&(he=!0);else if((Gi&fe)===fe){ue=ue.next,fe===du&&(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=O):Q=Q.next=ve,Fe.lanes|=fe,fs|=fe;ve=ue.action,kl&&d(O,ve),O=ue.hasEagerState?ue.eagerState:d(O,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=O):Q=Q.next=fe,Fe.lanes|=ve,fs|=ve;ue=ue.next}while(ue!==null&&ue!==l);if(Q===null?M=O:Q.next=U,!Ir(O,o.memoizedState)&&(on=!0,he&&(d=hu,d!==null)))throw d;o.memoizedState=O,o.baseState=M,o.baseQueue=Q,v.lastRenderedState=O}return _===null&&(v.lanes=0),[o.memoizedState,v.dispatch]}function wx(o){var l=Jt(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=o;var v=d.dispatch,_=d.pending,O=l.memoizedState;if(_!==null){d.pending=null;var M=_=_.next;do O=o(O,M.action),M=M.next;while(M!==_);Ir(O,l.memoizedState)||(on=!0),l.memoizedState=O,l.baseQueue===null&&(l.baseState=O),d.lastRenderedState=O}return[O,v]}function YN(o,l,d){var v=Fe,_=Jt(),O=Je;if(O){if(d===void 0)throw Error(r(407));d=d()}else d=l();var M=!Ir((vt||_).memoizedState,d);if(M&&(_.memoizedState=d,on=!0),_=_.queue,_x(WN.bind(null,v,_,o),[o]),_.getSnapshot!==l||M||an!==null&&an.memoizedState.tag&1){if(v.flags|=2048,bu(9,{destroy:void 0},GN.bind(null,v,_,d,l),null),St===null)throw Error(r(349));O||(Gi&127)!==0||XN(v,l,d)}return d}function XN(o,l,d){o.flags|=16384,o={getSnapshot:l,value:d},l=Fe.updateQueue,l===null?(l=Dp(),Fe.updateQueue=l,l.stores=[o]):(d=l.stores,d===null?l.stores=[o]:d.push(o))}function GN(o,l,d,v){l.value=d,l.getSnapshot=v,QN(l)&&ZN(o)}function WN(o,l,d){return d(function(){QN(l)&&ZN(o)})}function QN(o){var l=o.getSnapshot;o=o.value;try{var d=l();return!Ir(o,d)}catch{return!0}}function ZN(o){var l=Ol(o,2);l!==null&&_r(l,o,2)}function Sx(o){var l=lr();if(typeof o=="function"){var d=o;if(o=d(),kl){kr(!0);try{d()}finally{kr(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:o},l}function JN(o,l,d,v){return o.baseState=d,xx(o,vt,typeof v=="function"?v:Wi)}function C7(o,l,d,v,_){if(Bp(o))throw Error(r(485));if(o=l.action,o!==null){var O={payload:_,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){O.listeners.push(M)}};R.T!==null?d(!0):O.isTransition=!1,v(O),d=l.pending,d===null?(O.next=l.pending=O,eT(l,O)):(O.next=d.next,l.pending=d.next=O)}}function eT(o,l){var d=l.action,v=l.payload,_=o.state;if(l.isTransition){var O=R.T,M={};R.T=M;try{var U=d(_,v),Q=R.S;Q!==null&&Q(M,U),tT(o,l,U)}catch(ue){Ex(o,l,ue)}finally{O!==null&&M.types!==null&&(O.types=M.types),R.T=O}}else try{O=d(_,v),tT(o,l,O)}catch(ue){Ex(o,l,ue)}}function tT(o,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(v){nT(o,l,v)},function(v){return Ex(o,l,v)}):nT(o,l,d)}function nT(o,l,d){l.status="fulfilled",l.value=d,rT(l),o.state=d,l=o.pending,l!==null&&(d=l.next,d===l?o.pending=null:(d=d.next,l.next=d,eT(o,d)))}function Ex(o,l,d){var v=o.pending;if(o.pending=null,v!==null){v=v.next;do l.status="rejected",l.reason=d,rT(l),l=l.next;while(l!==v)}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(Je){var d=St.formState;if(d!==null){e:{var v=Fe;if(Je){if(At){t:{for(var _=At,O=sa;_.nodeType!==8;){if(!O){_=null;break t}if(_=ca(_.nextSibling),_===null){_=null;break t}}O=_.data,_=O==="F!"||O==="F"?_:null}if(_){At=ca(_.nextSibling),v=_.data==="F!";break e}}ns(v)}v=!1}v&&(l=d[0])}}return d=lr(),d.memoizedState=d.baseState=l,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aT,lastRenderedState:l},d.queue=v,d=_T.bind(null,Fe,v),v.dispatch=d,v=Sx(!1),O=Nx.bind(null,Fe,!1,v.queue),v=lr(),_={state:l,dispatch:null,action:o,pending:null},v.queue=_,d=C7.bind(null,Fe,_,O,d),_.dispatch=d,v.memoizedState=o,[l,d,!1]}function oT(o){var l=Jt();return sT(l,vt,o)}function sT(o,l,d){if(l=xx(o,l,aT)[0],o=Lp(Wi)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var v=Nd(l)}catch(M){throw M===mu?Cp:M}else v=l;l=Jt();var _=l.queue,O=_.dispatch;return d!==l.memoizedState&&(Fe.flags|=2048,bu(9,{destroy:void 0},A7.bind(null,_,d),null)),[v,O,o]}function A7(o,l){o.action=l}function lT(o){var l=Jt(),d=vt;if(d!==null)return sT(l,d,o);Jt(),l=l.memoizedState,d=Jt();var v=d.queue.dispatch;return d.memoizedState=o,[l,v,!1]}function bu(o,l,d,v){return o={tag:o,create:d,deps:v,inst:l,next:null},l=Fe.updateQueue,l===null&&(l=Dp(),Fe.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=o.next=o:(v=d.next,d.next=o,o.next=v,l.lastEffect=o),o}function cT(){return Jt().memoizedState}function zp(o,l,d,v){var _=lr();Fe.flags|=o,_.memoizedState=bu(1|l,{destroy:void 0},d,v===void 0?null:v)}function $p(o,l,d,v){var _=Jt();v=v===void 0?null:v;var O=_.memoizedState.inst;vt!==null&&v!==null&&mx(v,vt.memoizedState.deps)?_.memoizedState=bu(l,O,d,v):(Fe.flags|=o,_.memoizedState=bu(1|l,O,d,v))}function uT(o,l){zp(8390656,8,o,l)}function _x(o,l){$p(2048,8,o,l)}function N7(o){Fe.flags|=4;var l=Fe.updateQueue;if(l===null)l=Dp(),Fe.updateQueue=l,l.events=[o];else{var d=l.events;d===null?l.events=[o]:d.push(o)}}function fT(o){var l=Jt().memoizedState;return N7({ref:l,nextImpl:o}),function(){if((ft&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function dT(o,l){return $p(4,2,o,l)}function hT(o,l){return $p(4,4,o,l)}function mT(o,l){if(typeof l=="function"){o=o();var d=l(o);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function pT(o,l,d){d=d!=null?d.concat([o]):null,$p(4,4,mT.bind(null,l,o),d)}function Ox(){}function vT(o,l){var d=Jt();l=l===void 0?null:l;var v=d.memoizedState;return l!==null&&mx(l,v[1])?v[0]:(d.memoizedState=[o,l],o)}function gT(o,l){var d=Jt();l=l===void 0?null:l;var v=d.memoizedState;if(l!==null&&mx(l,v[1]))return v[0];if(v=o(),kl){kr(!0);try{o()}finally{kr(!1)}}return d.memoizedState=[v,l],v}function jx(o,l,d){return d===void 0||(Gi&1073741824)!==0&&(We&261930)===0?o.memoizedState=l:(o.memoizedState=d,o=y2(),Fe.lanes|=o,fs|=o,d)}function yT(o,l,d,v){return Ir(d,l)?d:vu.current!==null?(o=jx(o,d,v),Ir(o,l)||(on=!0),o):(Gi&42)===0||(Gi&1073741824)!==0&&(We&261930)===0?(on=!0,o.memoizedState=d):(o=y2(),Fe.lanes|=o,fs|=o,l)}function bT(o,l,d,v,_){var O=H.p;H.p=O!==0&&8>O?O:8;var M=R.T,U={};R.T=U,Nx(o,!1,l,d);try{var Q=_(),ue=R.S;if(ue!==null&&ue(U,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var he=_7(Q,v);Td(o,l,he,Hr(o))}else Td(o,l,v,Hr(o))}catch(ve){Td(o,l,{then:function(){},status:"rejected",reason:ve},Hr())}finally{H.p=O,M!==null&&U.types!==null&&(M.types=U.types),R.T=M}}function T7(){}function Cx(o,l,d,v){if(o.tag!==5)throw Error(r(476));var _=xT(o).queue;bT(o,_,l,q,d===null?T7:function(){return wT(o),d(v)})}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:Wi,lastRenderedState:q},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:d},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),Td(o,l.next.queue,{},Hr())}function Ax(){return Hn(Yd)}function ST(){return Jt().memoizedState}function ET(){return Jt().memoizedState}function P7(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var d=Hr();o=is(d);var v=os(l,o,d);v!==null&&(_r(v,l,d),Od(v,l,d)),l={cache:rx()},o.payload=l;return}l=l.return}}function M7(o,l,d){var v=Hr();d={lane:v,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Bp(o)?OT(l,d):(d=Vb(o,l,d,v),d!==null&&(_r(d,o,v),jT(d,l,v)))}function _T(o,l,d){var v=Hr();Td(o,l,d,v)}function Td(o,l,d,v){var _={lane:v,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Bp(o))OT(l,_);else{var O=o.alternate;if(o.lanes===0&&(O===null||O.lanes===0)&&(O=l.lastRenderedReducer,O!==null))try{var M=l.lastRenderedState,U=O(M,d);if(_.hasEagerState=!0,_.eagerState=U,Ir(U,M))return xp(o,l,_,0),St===null&&bp(),!1}catch{}finally{}if(d=Vb(o,l,_,v),d!==null)return _r(d,o,v),jT(d,l,v),!0}return!1}function Nx(o,l,d,v){if(v={lane:2,revertLane:sw(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},Bp(o)){if(l)throw Error(r(479))}else l=Vb(o,d,v,2),l!==null&&_r(l,o,2)}function Bp(o){var l=o.alternate;return o===Fe||l!==null&&l===Fe}function OT(o,l){gu=Rp=!0;var d=o.pending;d===null?l.next=l:(l.next=d.next,d.next=l),o.pending=l}function jT(o,l,d){if((d&4194048)!==0){var v=l.lanes;v&=o.pendingLanes,d|=v,l.lanes=d,Wn(o,d)}}var Pd={readContext:Hn,use:Ip,useCallback:Ht,useContext:Ht,useEffect:Ht,useImperativeHandle:Ht,useLayoutEffect:Ht,useInsertionEffect:Ht,useMemo:Ht,useReducer:Ht,useRef:Ht,useState:Ht,useDebugValue:Ht,useDeferredValue:Ht,useTransition:Ht,useSyncExternalStore:Ht,useId:Ht,useHostTransitionStatus:Ht,useFormState:Ht,useActionState:Ht,useOptimistic:Ht,useMemoCache:Ht,useCacheRefresh:Ht};Pd.useEffectEvent=Ht;var CT={readContext:Hn,use:Ip,useCallback:function(o,l){return lr().memoizedState=[o,l===void 0?null:l],o},useContext:Hn,useEffect:uT,useImperativeHandle:function(o,l,d){d=d!=null?d.concat([o]):null,zp(4194308,4,mT.bind(null,l,o),d)},useLayoutEffect:function(o,l){return zp(4194308,4,o,l)},useInsertionEffect:function(o,l){zp(4,2,o,l)},useMemo:function(o,l){var d=lr();l=l===void 0?null:l;var v=o();if(kl){kr(!0);try{o()}finally{kr(!1)}}return d.memoizedState=[v,l],v},useReducer:function(o,l,d){var v=lr();if(d!==void 0){var _=d(l);if(kl){kr(!0);try{d(l)}finally{kr(!1)}}}else _=l;return v.memoizedState=v.baseState=_,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:_},v.queue=o,o=o.dispatch=M7.bind(null,Fe,o),[v.memoizedState,o]},useRef:function(o){var l=lr();return o={current:o},l.memoizedState=o},useState:function(o){o=Sx(o);var l=o.queue,d=_T.bind(null,Fe,l);return l.dispatch=d,[o.memoizedState,d]},useDebugValue:Ox,useDeferredValue:function(o,l){var d=lr();return jx(d,o,l)},useTransition:function(){var o=Sx(!1);return o=bT.bind(null,Fe,o.queue,!0,!1),lr().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,d){var v=Fe,_=lr();if(Je){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),St===null)throw Error(r(349));(We&127)!==0||XN(v,l,d)}_.memoizedState=d;var O={value:d,getSnapshot:l};return _.queue=O,uT(WN.bind(null,v,O,o),[o]),v.flags|=2048,bu(9,{destroy:void 0},GN.bind(null,v,O,d,l),null),d},useId:function(){var o=lr(),l=St.identifierPrefix;if(Je){var d=li,v=si;d=(v&~(1<<32-Nn(v)-1)).toString(32)+d,l="_"+l+"R_"+d,d=kp++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=O7++,l="_"+l+"r_"+d.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:Ax,useFormState:iT,useActionState:iT,useOptimistic:function(o){var l=lr();l.memoizedState=l.baseState=o;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=Nx.bind(null,Fe,!0,d),d.dispatch=l,[o,l]},useMemoCache:bx,useCacheRefresh:function(){return lr().memoizedState=P7.bind(null,Fe)},useEffectEvent:function(o){var l=lr(),d={impl:o};return l.memoizedState=d,function(){if((ft&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},Tx={readContext:Hn,use:Ip,useCallback:vT,useContext:Hn,useEffect:_x,useImperativeHandle:pT,useInsertionEffect:dT,useLayoutEffect:hT,useMemo:gT,useReducer:Lp,useRef:cT,useState:function(){return Lp(Wi)},useDebugValue:Ox,useDeferredValue:function(o,l){var d=Jt();return yT(d,vt.memoizedState,o,l)},useTransition:function(){var o=Lp(Wi)[0],l=Jt().memoizedState;return[typeof o=="boolean"?o:Nd(o),l]},useSyncExternalStore:YN,useId:ST,useHostTransitionStatus:Ax,useFormState:oT,useActionState:oT,useOptimistic:function(o,l){var d=Jt();return JN(d,vt,o,l)},useMemoCache:bx,useCacheRefresh:ET};Tx.useEffectEvent=fT;var AT={readContext:Hn,use:Ip,useCallback:vT,useContext:Hn,useEffect:_x,useImperativeHandle:pT,useInsertionEffect:dT,useLayoutEffect:hT,useMemo:gT,useReducer:wx,useRef:cT,useState:function(){return wx(Wi)},useDebugValue:Ox,useDeferredValue:function(o,l){var d=Jt();return vt===null?jx(d,o,l):yT(d,vt.memoizedState,o,l)},useTransition:function(){var o=wx(Wi)[0],l=Jt().memoizedState;return[typeof o=="boolean"?o:Nd(o),l]},useSyncExternalStore:YN,useId:ST,useHostTransitionStatus:Ax,useFormState:lT,useActionState:lT,useOptimistic:function(o,l){var d=Jt();return vt!==null?JN(d,vt,o,l):(d.baseState=o,[o,d.queue.dispatch])},useMemoCache:bx,useCacheRefresh:ET};AT.useEffectEvent=fT;function Px(o,l,d,v){l=o.memoizedState,d=d(v,l),d=d==null?l:h({},l,d),o.memoizedState=d,o.lanes===0&&(o.updateQueue.baseState=d)}var Mx={enqueueSetState:function(o,l,d){o=o._reactInternals;var v=Hr(),_=is(v);_.payload=l,d!=null&&(_.callback=d),l=os(o,_,v),l!==null&&(_r(l,o,v),Od(l,o,v))},enqueueReplaceState:function(o,l,d){o=o._reactInternals;var v=Hr(),_=is(v);_.tag=1,_.payload=l,d!=null&&(_.callback=d),l=os(o,_,v),l!==null&&(_r(l,o,v),Od(l,o,v))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var d=Hr(),v=is(d);v.tag=2,l!=null&&(v.callback=l),l=os(o,v,d),l!==null&&(_r(l,o,d),Od(l,o,d))}};function NT(o,l,d,v,_,O,M){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(v,O,M):l.prototype&&l.prototype.isPureReactComponent?!gd(d,v)||!gd(_,O):!0}function TT(o,l,d,v){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,v),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,v),l.state!==o&&Mx.enqueueReplaceState(l,l.state,null)}function Dl(o,l){var d=l;if("ref"in l){d={};for(var v in l)v!=="ref"&&(d[v]=l[v])}if(o=o.defaultProps){d===l&&(d=h({},d));for(var _ in o)d[_]===void 0&&(d[_]=o[_])}return d}function PT(o){yp(o)}function MT(o){console.error(o)}function RT(o){yp(o)}function Up(o,l){try{var d=o.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(v){setTimeout(function(){throw v})}}function kT(o,l,d){try{var v=o.onCaughtError;v(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function Rx(o,l,d){return d=is(d),d.tag=3,d.payload={element:null},d.callback=function(){Up(o,l)},d}function DT(o){return o=is(o),o.tag=3,o}function IT(o,l,d,v){var _=d.type.getDerivedStateFromError;if(typeof _=="function"){var O=v.value;o.payload=function(){return _(O)},o.callback=function(){kT(l,d,v)}}var M=d.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(o.callback=function(){kT(l,d,v),typeof _!="function"&&(ds===null?ds=new Set([this]):ds.add(this));var U=v.stack;this.componentDidCatch(v.value,{componentStack:U!==null?U:""})})}function R7(o,l,d,v,_){if(d.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(l=d.alternate,l!==null&&fu(l,d,_,!0),d=zr.current,d!==null){switch(d.tag){case 31:case 13:return la===null?Jp():d.alternate===null&&Ft===0&&(Ft=3),d.flags&=-257,d.flags|=65536,d.lanes=_,v===Ap?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([v]):l.add(v),aw(o,v,_)),!1;case 22:return d.flags|=65536,v===Ap?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([v])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([v]):d.add(v)),aw(o,v,_)),!1}throw Error(r(435,d.tag))}return aw(o,v,_),Jp(),!1}if(Je)return l=zr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=_,v!==Zb&&(o=Error(r(422),{cause:v}),xd(aa(o,d)))):(v!==Zb&&(l=Error(r(423),{cause:v}),xd(aa(l,d))),o=o.current.alternate,o.flags|=65536,_&=-_,o.lanes|=_,v=aa(v,d),_=Rx(o.stateNode,v,_),cx(o,_),Ft!==4&&(Ft=2)),!1;var O=Error(r(520),{cause:v});if(O=aa(O,d),$d===null?$d=[O]:$d.push(O),Ft!==4&&(Ft=2),l===null)return!0;v=aa(v,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,o=_&-_,d.lanes|=o,o=Rx(d.stateNode,v,o),cx(d,o),!1;case 1:if(l=d.type,O=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(ds===null||!ds.has(O))))return d.flags|=65536,_&=-_,d.lanes|=_,_=DT(_),IT(_,o,d,v),cx(d,_),!1}d=d.return}while(d!==null);return!1}var kx=Error(r(461)),on=!1;function Fn(o,l,d,v){l.child=o===null?BN(l,null,d,v):Rl(l,o.child,d,v)}function LT(o,l,d,v,_){d=d.render;var O=l.ref;if("ref"in v){var M={};for(var U in v)U!=="ref"&&(M[U]=v[U])}else M=v;return Nl(l),v=px(o,l,d,M,O,_),U=vx(),o!==null&&!on?(gx(o,l,_),Qi(o,l,_)):(Je&&U&&Wb(l),l.flags|=1,Fn(o,l,v,_),l.child)}function zT(o,l,d,v,_){if(o===null){var O=d.type;return typeof O=="function"&&!Yb(O)&&O.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=O,$T(o,l,O,v,_)):(o=Sp(d.type,null,v,l,l.mode,_),o.ref=l.ref,o.return=l,l.child=o)}if(O=o.child,!Hx(o,_)){var M=O.memoizedProps;if(d=d.compare,d=d!==null?d:gd,d(M,v)&&o.ref===l.ref)return Qi(o,l,_)}return l.flags|=1,o=Ki(O,v),o.ref=l.ref,o.return=l,l.child=o}function $T(o,l,d,v,_){if(o!==null){var O=o.memoizedProps;if(gd(O,v)&&o.ref===l.ref)if(on=!1,l.pendingProps=v=O,Hx(o,_))(o.flags&131072)!==0&&(on=!0);else return l.lanes=o.lanes,Qi(o,l,_)}return Dx(o,l,d,v,_)}function BT(o,l,d,v){var _=v.children,O=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((l.flags&128)!==0){if(O=O!==null?O.baseLanes|d:d,o!==null){for(v=l.child=o.child,_=0;v!==null;)_=_|v.lanes|v.childLanes,v=v.sibling;v=_&~O}else v=0,l.child=null;return UT(o,l,O,d,v)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&jp(l,O!==null?O.cachePool:null),O!==null?FN(l,O):fx(),qN(l);else return v=l.lanes=536870912,UT(o,l,O!==null?O.baseLanes|d:d,d,v)}else O!==null?(jp(l,O.cachePool),FN(l,O),ls(),l.memoizedState=null):(o!==null&&jp(l,null),fx(),ls());return Fn(o,l,_,d),l.child}function Md(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,d,v,_){var O=ix();return O=O===null?null:{parent:rn._currentValue,pool:O},l.memoizedState={baseLanes:d,cachePool:O},o!==null&&jp(l,null),fx(),qN(l),o!==null&&fu(o,l,v,!0),l.childLanes=_,null}function Hp(o,l){return l=qp({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function HT(o,l,d){return Rl(l,o.child,null,d),o=Hp(l,l.pendingProps),o.flags|=2,$r(l),l.memoizedState=null,o}function k7(o,l,d){var v=l.pendingProps,_=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(Je){if(v.mode==="hidden")return o=Hp(l,v),l.lanes=536870912,Md(null,o);if(hx(l),(o=At)?(o=eP(o,sa),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:es!==null?{id:si,overflow:li}:null,retryLane:536870912,hydrationErrors:null},d=ON(o),d.return=l,l.child=d,Un=l,At=null)):o=null,o===null)throw ns(l);return l.lanes=536870912,null}return Hp(l,v)}var O=o.memoizedState;if(O!==null){var M=O.dehydrated;if(hx(l),_)if(l.flags&256)l.flags&=-257,l=HT(o,l,d);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(r(558));else if(on||fu(o,l,d,!1),_=(d&o.childLanes)!==0,on||_){if(v=St,v!==null&&(M=Qn(v,d),M!==0&&M!==O.retryLane))throw O.retryLane=M,Ol(o,M),_r(v,o,M),kx;Jp(),l=HT(o,l,d)}else o=O.treeContext,At=ca(M.nextSibling),Un=l,Je=!0,ts=null,sa=!1,o!==null&&AN(l,o),l=Hp(l,v),l.flags|=4096;return l}return o=Ki(o.child,{mode:v.mode,children:v.children}),o.ref=l.ref,l.child=o,o.return=l,o}function Fp(o,l){var d=l.ref;if(d===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(o===null||o.ref!==d)&&(l.flags|=4194816)}}function Dx(o,l,d,v,_){return Nl(l),d=px(o,l,d,v,void 0,_),v=vx(),o!==null&&!on?(gx(o,l,_),Qi(o,l,_)):(Je&&v&&Wb(l),l.flags|=1,Fn(o,l,d,_),l.child)}function FT(o,l,d,v,_,O){return Nl(l),l.updateQueue=null,d=VN(l,v,d,_),KN(o),v=vx(),o!==null&&!on?(gx(o,l,O),Qi(o,l,O)):(Je&&v&&Wb(l),l.flags|=1,Fn(o,l,d,O),l.child)}function qT(o,l,d,v,_){if(Nl(l),l.stateNode===null){var O=su,M=d.contextType;typeof M=="object"&&M!==null&&(O=Hn(M)),O=new d(v,O),l.memoizedState=O.state!==null&&O.state!==void 0?O.state:null,O.updater=Mx,l.stateNode=O,O._reactInternals=l,O=l.stateNode,O.props=v,O.state=l.memoizedState,O.refs={},sx(l),M=d.contextType,O.context=typeof M=="object"&&M!==null?Hn(M):su,O.state=l.memoizedState,M=d.getDerivedStateFromProps,typeof M=="function"&&(Px(l,d,M,v),O.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof O.getSnapshotBeforeUpdate=="function"||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(M=O.state,typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount(),M!==O.state&&Mx.enqueueReplaceState(O,O.state,null),Cd(l,v,O,_),jd(),O.state=l.memoizedState),typeof O.componentDidMount=="function"&&(l.flags|=4194308),v=!0}else if(o===null){O=l.stateNode;var U=l.memoizedProps,Q=Dl(d,U);O.props=Q;var ue=O.context,he=d.contextType;M=su,typeof he=="object"&&he!==null&&(M=Hn(he));var ve=d.getDerivedStateFromProps;he=typeof ve=="function"||typeof O.getSnapshotBeforeUpdate=="function",U=l.pendingProps!==U,he||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(U||ue!==M)&&TT(l,O,v,M),as=!1;var fe=l.memoizedState;O.state=fe,Cd(l,v,O,_),jd(),ue=l.memoizedState,U||fe!==ue||as?(typeof ve=="function"&&(Px(l,d,ve,v),ue=l.memoizedState),(Q=as||NT(l,d,Q,v,fe,ue,M))?(he||typeof O.UNSAFE_componentWillMount!="function"&&typeof O.componentWillMount!="function"||(typeof O.componentWillMount=="function"&&O.componentWillMount(),typeof O.UNSAFE_componentWillMount=="function"&&O.UNSAFE_componentWillMount()),typeof O.componentDidMount=="function"&&(l.flags|=4194308)):(typeof O.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=v,l.memoizedState=ue),O.props=v,O.state=ue,O.context=M,v=Q):(typeof O.componentDidMount=="function"&&(l.flags|=4194308),v=!1)}else{O=l.stateNode,lx(o,l),M=l.memoizedProps,he=Dl(d,M),O.props=he,ve=l.pendingProps,fe=O.context,ue=d.contextType,Q=su,typeof ue=="object"&&ue!==null&&(Q=Hn(ue)),U=d.getDerivedStateFromProps,(ue=typeof U=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(M!==ve||fe!==Q)&&TT(l,O,v,Q),as=!1,fe=l.memoizedState,O.state=fe,Cd(l,v,O,_),jd();var de=l.memoizedState;M!==ve||fe!==de||as||o!==null&&o.dependencies!==null&&_p(o.dependencies)?(typeof U=="function"&&(Px(l,d,U,v),de=l.memoizedState),(he=as||NT(l,d,he,v,fe,de,Q)||o!==null&&o.dependencies!==null&&_p(o.dependencies))?(ue||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(v,de,Q),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(v,de,Q)),typeof O.componentDidUpdate=="function"&&(l.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof O.componentDidUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=1024),l.memoizedProps=v,l.memoizedState=de),O.props=v,O.state=de,O.context=Q,v=he):(typeof O.componentDidUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||M===o.memoizedProps&&fe===o.memoizedState||(l.flags|=1024),v=!1)}return O=v,Fp(o,l),v=(l.flags&128)!==0,O||v?(O=l.stateNode,d=v&&typeof d.getDerivedStateFromError!="function"?null:O.render(),l.flags|=1,o!==null&&v?(l.child=Rl(l,o.child,null,_),l.child=Rl(l,null,d,_)):Fn(o,l,d,_),l.memoizedState=O.state,o=l.child):o=Qi(o,l,_),o}function KT(o,l,d,v){return Cl(),l.flags|=256,Fn(o,l,d,v),l.child}var Ix={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lx(o){return{baseLanes:o,cachePool:kN()}}function zx(o,l,d){return o=o!==null?o.childLanes&~d:0,l&&(o|=Ur),o}function VT(o,l,d){var v=l.pendingProps,_=!1,O=(l.flags&128)!==0,M;if((M=O)||(M=o!==null&&o.memoizedState===null?!1:(Zt.current&2)!==0),M&&(_=!0,l.flags&=-129),M=(l.flags&32)!==0,l.flags&=-33,o===null){if(Je){if(_?ss(l):ls(),(o=At)?(o=eP(o,sa),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:es!==null?{id:si,overflow:li}:null,retryLane:536870912,hydrationErrors:null},d=ON(o),d.return=l,l.child=d,Un=l,At=null)):o=null,o===null)throw ns(l);return xw(o)?l.lanes=32:l.lanes=536870912,null}var U=v.children;return v=v.fallback,_?(ls(),_=l.mode,U=qp({mode:"hidden",children:U},_),v=jl(v,_,d,null),U.return=l,v.return=l,U.sibling=v,l.child=U,v=l.child,v.memoizedState=Lx(d),v.childLanes=zx(o,M,d),l.memoizedState=Ix,Md(null,v)):(ss(l),$x(l,U))}var Q=o.memoizedState;if(Q!==null&&(U=Q.dehydrated,U!==null)){if(O)l.flags&256?(ss(l),l.flags&=-257,l=Bx(o,l,d)):l.memoizedState!==null?(ls(),l.child=o.child,l.flags|=128,l=null):(ls(),U=v.fallback,_=l.mode,v=qp({mode:"visible",children:v.children},_),U=jl(U,_,d,null),U.flags|=2,v.return=l,U.return=l,v.sibling=U,l.child=v,Rl(l,o.child,null,d),v=l.child,v.memoizedState=Lx(d),v.childLanes=zx(o,M,d),l.memoizedState=Ix,l=Md(null,v));else if(ss(l),xw(U)){if(M=U.nextSibling&&U.nextSibling.dataset,M)var ue=M.dgst;M=ue,v=Error(r(419)),v.stack="",v.digest=M,xd({value:v,source:null,stack:null}),l=Bx(o,l,d)}else if(on||fu(o,l,d,!1),M=(d&o.childLanes)!==0,on||M){if(M=St,M!==null&&(v=Qn(M,d),v!==0&&v!==Q.retryLane))throw Q.retryLane=v,Ol(o,v),_r(M,o,v),kx;bw(U)||Jp(),l=Bx(o,l,d)}else bw(U)?(l.flags|=192,l.child=o.child,l=null):(o=Q.treeContext,At=ca(U.nextSibling),Un=l,Je=!0,ts=null,sa=!1,o!==null&&AN(l,o),l=$x(l,v.children),l.flags|=4096);return l}return _?(ls(),U=v.fallback,_=l.mode,Q=o.child,ue=Q.sibling,v=Ki(Q,{mode:"hidden",children:v.children}),v.subtreeFlags=Q.subtreeFlags&65011712,ue!==null?U=Ki(ue,U):(U=jl(U,_,d,null),U.flags|=2),U.return=l,v.return=l,v.sibling=U,l.child=v,Md(null,v),v=l.child,U=o.child.memoizedState,U===null?U=Lx(d):(_=U.cachePool,_!==null?(Q=rn._currentValue,_=_.parent!==Q?{parent:Q,pool:Q}:_):_=kN(),U={baseLanes:U.baseLanes|d,cachePool:_}),v.memoizedState=U,v.childLanes=zx(o,M,d),l.memoizedState=Ix,Md(o.child,v)):(ss(l),d=o.child,o=d.sibling,d=Ki(d,{mode:"visible",children:v.children}),d.return=l,d.sibling=null,o!==null&&(M=l.deletions,M===null?(l.deletions=[o],l.flags|=16):M.push(o)),l.child=d,l.memoizedState=null,d)}function $x(o,l){return l=qp({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function qp(o,l){return o=Lr(22,o,null,l),o.lanes=0,o}function Bx(o,l,d){return Rl(l,o.child,null,d),o=$x(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function YT(o,l,d){o.lanes|=l;var v=o.alternate;v!==null&&(v.lanes|=l),tx(o.return,l,d)}function Ux(o,l,d,v,_,O){var M=o.memoizedState;M===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:v,tail:d,tailMode:_,treeForkCount:O}:(M.isBackwards=l,M.rendering=null,M.renderingStartTime=0,M.last=v,M.tail=d,M.tailMode=_,M.treeForkCount=O)}function XT(o,l,d){var v=l.pendingProps,_=v.revealOrder,O=v.tail;v=v.children;var M=Zt.current,U=(M&2)!==0;if(U?(M=M&1|2,l.flags|=128):M&=1,X(Zt,M),Fn(o,l,v,d),v=Je?bd:0,!U&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&YT(o,d,l);else if(o.tag===19)YT(o,d,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(d=l.child,_=null;d!==null;)o=d.alternate,o!==null&&Mp(o)===null&&(_=d),d=d.sibling;d=_,d===null?(_=l.child,l.child=null):(_=d.sibling,d.sibling=null),Ux(l,!1,_,d,O,v);break;case"backwards":case"unstable_legacy-backwards":for(d=null,_=l.child,l.child=null;_!==null;){if(o=_.alternate,o!==null&&Mp(o)===null){l.child=_;break}o=_.sibling,_.sibling=d,d=_,_=o}Ux(l,!0,d,null,O,v);break;case"together":Ux(l,!1,null,null,void 0,v);break;default:l.memoizedState=null}return l.child}function Qi(o,l,d){if(o!==null&&(l.dependencies=o.dependencies),fs|=l.lanes,(d&l.childLanes)===0)if(o!==null){if(fu(o,l,d,!1),(d&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,d=Ki(o,o.pendingProps),l.child=d,d.return=l;o.sibling!==null;)o=o.sibling,d=d.sibling=Ki(o,o.pendingProps),d.return=l;d.sibling=null}return l.child}function Hx(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&_p(o)))}function D7(o,l,d){switch(l.tag){case 3:re(l,l.stateNode.containerInfo),rs(l,rn,o.memoizedState.cache),Cl();break;case 27:case 5:ce(l);break;case 4:re(l,l.stateNode.containerInfo);break;case 10:rs(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,hx(l),null;break;case 13:var v=l.memoizedState;if(v!==null)return v.dehydrated!==null?(ss(l),l.flags|=128,null):(d&l.child.childLanes)!==0?VT(o,l,d):(ss(l),o=Qi(o,l,d),o!==null?o.sibling:null);ss(l);break;case 19:var _=(o.flags&128)!==0;if(v=(d&l.childLanes)!==0,v||(fu(o,l,d,!1),v=(d&l.childLanes)!==0),_){if(v)return XT(o,l,d);l.flags|=128}if(_=l.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),X(Zt,Zt.current),v)break;return null;case 22:return l.lanes=0,BT(o,l,d,l.pendingProps);case 24:rs(l,rn,o.memoizedState.cache)}return Qi(o,l,d)}function GT(o,l,d){if(o!==null)if(o.memoizedProps!==l.pendingProps)on=!0;else{if(!Hx(o,d)&&(l.flags&128)===0)return on=!1,D7(o,l,d);on=(o.flags&131072)!==0}else on=!1,Je&&(l.flags&1048576)!==0&&CN(l,bd,l.index);switch(l.lanes=0,l.tag){case 16:e:{var v=l.pendingProps;if(o=Pl(l.elementType),l.type=o,typeof o=="function")Yb(o)?(v=Dl(o,v),l.tag=1,l=qT(null,l,o,v,d)):(l.tag=0,l=Dx(null,l,o,v,d));else{if(o!=null){var _=o.$$typeof;if(_===A){l.tag=11,l=LT(null,l,o,v,d);break e}else if(_===P){l.tag=14,l=zT(null,l,o,v,d);break e}}throw l=$(o)||o,Error(r(306,l,""))}}return l;case 0:return Dx(o,l,l.type,l.pendingProps,d);case 1:return v=l.type,_=Dl(v,l.pendingProps),qT(o,l,v,_,d);case 3:e:{if(re(l,l.stateNode.containerInfo),o===null)throw Error(r(387));v=l.pendingProps;var O=l.memoizedState;_=O.element,lx(o,l),Cd(l,v,null,d);var M=l.memoizedState;if(v=M.cache,rs(l,rn,v),v!==O.cache&&nx(l,[rn],d,!0),jd(),v=M.element,O.isDehydrated)if(O={element:v,isDehydrated:!1,cache:M.cache},l.updateQueue.baseState=O,l.memoizedState=O,l.flags&256){l=KT(o,l,v,d);break e}else if(v!==_){_=aa(Error(r(424)),l),xd(_),l=KT(o,l,v,d);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(At=ca(o.firstChild),Un=l,Je=!0,ts=null,sa=!0,d=BN(l,null,v,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Cl(),v===_){l=Qi(o,l,d);break e}Fn(o,l,v,d)}l=l.child}return l;case 26:return Fp(o,l),o===null?(d=oP(l.type,null,l.pendingProps,null))?l.memoizedState=d:Je||(d=l.type,o=l.pendingProps,v=ov(se.current).createElement(d),v[vn]=l,v[Zn]=o,qn(v,d,o),nn(v),l.stateNode=v):l.memoizedState=oP(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return ce(l),o===null&&Je&&(v=l.stateNode=rP(l.type,l.pendingProps,se.current),Un=l,sa=!0,_=At,vs(l.type)?(ww=_,At=ca(v.firstChild)):At=_),Fn(o,l,l.pendingProps.children,d),Fp(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&Je&&((_=v=At)&&(v=fK(v,l.type,l.pendingProps,sa),v!==null?(l.stateNode=v,Un=l,At=ca(v.firstChild),sa=!1,_=!0):_=!1),_||ns(l)),ce(l),_=l.type,O=l.pendingProps,M=o!==null?o.memoizedProps:null,v=O.children,vw(_,O)?v=null:M!==null&&vw(_,M)&&(l.flags|=32),l.memoizedState!==null&&(_=px(o,l,j7,null,null,d),Yd._currentValue=_),Fp(o,l),Fn(o,l,v,d),l.child;case 6:return o===null&&Je&&((o=d=At)&&(d=dK(d,l.pendingProps,sa),d!==null?(l.stateNode=d,Un=l,At=null,o=!0):o=!1),o||ns(l)),null;case 13:return VT(o,l,d);case 4:return re(l,l.stateNode.containerInfo),v=l.pendingProps,o===null?l.child=Rl(l,null,v,d):Fn(o,l,v,d),l.child;case 11:return LT(o,l,l.type,l.pendingProps,d);case 7:return Fn(o,l,l.pendingProps,d),l.child;case 8:return Fn(o,l,l.pendingProps.children,d),l.child;case 12:return Fn(o,l,l.pendingProps.children,d),l.child;case 10:return v=l.pendingProps,rs(l,l.type,v.value),Fn(o,l,v.children,d),l.child;case 9:return _=l.type._context,v=l.pendingProps.children,Nl(l),_=Hn(_),v=v(_),l.flags|=1,Fn(o,l,v,d),l.child;case 14:return zT(o,l,l.type,l.pendingProps,d);case 15:return $T(o,l,l.type,l.pendingProps,d);case 19:return XT(o,l,d);case 31:return k7(o,l,d);case 22:return BT(o,l,d,l.pendingProps);case 24:return Nl(l),v=Hn(rn),o===null?(_=ix(),_===null&&(_=St,O=rx(),_.pooledCache=O,O.refCount++,O!==null&&(_.pooledCacheLanes|=d),_=O),l.memoizedState={parent:v,cache:_},sx(l),rs(l,rn,_)):((o.lanes&d)!==0&&(lx(o,l),Cd(l,null,null,d),jd()),_=o.memoizedState,O=l.memoizedState,_.parent!==v?(_={parent:v,cache:v},l.memoizedState=_,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=_),rs(l,rn,v)):(v=O.cache,rs(l,rn,v),v!==_.cache&&nx(l,[rn],d,!0))),Fn(o,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Zi(o){o.flags|=4}function Fx(o,l,d,v,_){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=Ap,ox}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=Ap,ox}function Kp(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?Tn():536870912,o.lanes|=l,Eu|=l)}function Rd(o,l){if(!Je)switch(o.tailMode){case"hidden":l=o.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?o.tail=null:d.sibling=null;break;case"collapsed":d=o.tail;for(var v=null;d!==null;)d.alternate!==null&&(v=d),d=d.sibling;v===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:v.sibling=null}}function Nt(o){var l=o.alternate!==null&&o.alternate.child===o.child,d=0,v=0;if(l)for(var _=o.child;_!==null;)d|=_.lanes|_.childLanes,v|=_.subtreeFlags&65011712,v|=_.flags&65011712,_.return=o,_=_.sibling;else for(_=o.child;_!==null;)d|=_.lanes|_.childLanes,v|=_.subtreeFlags,v|=_.flags,_.return=o,_=_.sibling;return o.subtreeFlags|=v,o.childLanes=d,l}function I7(o,l,d){var v=l.pendingProps;switch(Qb(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(l),null;case 1:return Nt(l),null;case 3:return d=l.stateNode,v=null,o!==null&&(v=o.memoizedState.cache),l.memoizedState.cache!==v&&(l.flags|=2048),Xi(rn),J(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(o===null||o.child===null)&&(uu(l)?Zi(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Jb())),Nt(l),null;case 26:var _=l.type,O=l.memoizedState;return o===null?(Zi(l),O!==null?(Nt(l),WT(l,O)):(Nt(l),Fx(l,_,null,v,d))):O?O!==o.memoizedState?(Zi(l),Nt(l),WT(l,O)):(Nt(l),l.flags&=-16777217):(o=o.memoizedProps,o!==v&&Zi(l),Nt(l),Fx(l,_,o,v,d)),null;case 27:if(me(l),d=se.current,_=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==v&&Zi(l);else{if(!v){if(l.stateNode===null)throw Error(r(166));return Nt(l),null}o=Z.current,uu(l)?NN(l):(o=rP(_,v,d),l.stateNode=o,Zi(l))}return Nt(l),null;case 5:if(me(l),_=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==v&&Zi(l);else{if(!v){if(l.stateNode===null)throw Error(r(166));return Nt(l),null}if(O=Z.current,uu(l))NN(l);else{var M=ov(se.current);switch(O){case 1:O=M.createElementNS("http://www.w3.org/2000/svg",_);break;case 2:O=M.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;default:switch(_){case"svg":O=M.createElementNS("http://www.w3.org/2000/svg",_);break;case"math":O=M.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;case"script":O=M.createElement("div"),O.innerHTML="<script><\/script>",O=O.removeChild(O.firstChild);break;case"select":O=typeof v.is=="string"?M.createElement("select",{is:v.is}):M.createElement("select"),v.multiple?O.multiple=!0:v.size&&(O.size=v.size);break;default:O=typeof v.is=="string"?M.createElement(_,{is:v.is}):M.createElement(_)}}O[vn]=l,O[Zn]=v;e:for(M=l.child;M!==null;){if(M.tag===5||M.tag===6)O.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=O;e:switch(qn(O,_,v),_){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&Zi(l)}}return Nt(l),Fx(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,d),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==v&&Zi(l);else{if(typeof v!="string"&&l.stateNode===null)throw Error(r(166));if(o=se.current,uu(l)){if(o=l.stateNode,d=l.memoizedProps,v=null,_=Un,_!==null)switch(_.tag){case 27:case 5:v=_.memoizedProps}o[vn]=l,o=!!(o.nodeValue===d||v!==null&&v.suppressHydrationWarning===!0||V2(o.nodeValue,d)),o||ns(l,!0)}else o=ov(o).createTextNode(v),o[vn]=l,l.stateNode=o}return Nt(l),null;case 31:if(d=l.memoizedState,o===null||o.memoizedState!==null){if(v=uu(l),d!==null){if(o===null){if(!v)throw Error(r(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[vn]=l}else Cl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Nt(l),o=!1}else d=Jb(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=d),o=!0;if(!o)return l.flags&256?($r(l),l):($r(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Nt(l),null;case 13:if(v=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(_=uu(l),v!==null&&v.dehydrated!==null){if(o===null){if(!_)throw Error(r(318));if(_=l.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[vn]=l}else Cl(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Nt(l),_=!1}else _=Jb(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=_),_=!0;if(!_)return l.flags&256?($r(l),l):($r(l),null)}return $r(l),(l.flags&128)!==0?(l.lanes=d,l):(d=v!==null,o=o!==null&&o.memoizedState!==null,d&&(v=l.child,_=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(_=v.alternate.memoizedState.cachePool.pool),O=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(O=v.memoizedState.cachePool.pool),O!==_&&(v.flags|=2048)),d!==o&&d&&(l.child.flags|=8192),Kp(l,l.updateQueue),Nt(l),null);case 4:return J(),o===null&&fw(l.stateNode.containerInfo),Nt(l),null;case 10:return Xi(l.type),Nt(l),null;case 19:if(z(Zt),v=l.memoizedState,v===null)return Nt(l),null;if(_=(l.flags&128)!==0,O=v.rendering,O===null)if(_)Rd(v,!1);else{if(Ft!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(O=Mp(o),O!==null){for(l.flags|=128,Rd(v,!1),o=O.updateQueue,l.updateQueue=o,Kp(l,o),l.subtreeFlags=0,o=d,d=l.child;d!==null;)_N(d,o),d=d.sibling;return X(Zt,Zt.current&1|2),Je&&Vi(l,v.treeForkCount),l.child}o=o.sibling}v.tail!==null&&pn()>Wp&&(l.flags|=128,_=!0,Rd(v,!1),l.lanes=4194304)}else{if(!_)if(o=Mp(O),o!==null){if(l.flags|=128,_=!0,o=o.updateQueue,l.updateQueue=o,Kp(l,o),Rd(v,!0),v.tail===null&&v.tailMode==="hidden"&&!O.alternate&&!Je)return Nt(l),null}else 2*pn()-v.renderingStartTime>Wp&&d!==536870912&&(l.flags|=128,_=!0,Rd(v,!1),l.lanes=4194304);v.isBackwards?(O.sibling=l.child,l.child=O):(o=v.last,o!==null?o.sibling=O:l.child=O,v.last=O)}return v.tail!==null?(o=v.tail,v.rendering=o,v.tail=o.sibling,v.renderingStartTime=pn(),o.sibling=null,d=Zt.current,X(Zt,_?d&1|2:d&1),Je&&Vi(l,v.treeForkCount),o):(Nt(l),null);case 22:case 23:return $r(l),dx(),v=l.memoizedState!==null,o!==null?o.memoizedState!==null!==v&&(l.flags|=8192):v&&(l.flags|=8192),v?(d&536870912)!==0&&(l.flags&128)===0&&(Nt(l),l.subtreeFlags&6&&(l.flags|=8192)):Nt(l),d=l.updateQueue,d!==null&&Kp(l,d.retryQueue),d=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),v=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(v=l.memoizedState.cachePool.pool),v!==d&&(l.flags|=2048),o!==null&&z(Tl),null;case 24:return d=null,o!==null&&(d=o.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),Xi(rn),Nt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function L7(o,l){switch(Qb(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return Xi(rn),J(),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($r(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($r(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 z(Zt),null;case 4:return J(),null;case 10:return Xi(l.type),null;case 22:case 23:return $r(l),dx(),o!==null&&z(Tl),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return Xi(rn),null;case 25:return null;default:return null}}function QT(o,l){switch(Qb(l),l.tag){case 3:Xi(rn),J();break;case 26:case 27:case 5:me(l);break;case 4:J();break;case 31:l.memoizedState!==null&&$r(l);break;case 13:$r(l);break;case 19:z(Zt);break;case 10:Xi(l.type);break;case 22:case 23:$r(l),dx(),o!==null&&z(Tl);break;case 24:Xi(rn)}}function kd(o,l){try{var d=l.updateQueue,v=d!==null?d.lastEffect:null;if(v!==null){var _=v.next;d=_;do{if((d.tag&o)===o){v=void 0;var O=d.create,M=d.inst;v=O(),M.destroy=v}d=d.next}while(d!==_)}}catch(U){mt(l,l.return,U)}}function cs(o,l,d){try{var v=l.updateQueue,_=v!==null?v.lastEffect:null;if(_!==null){var O=_.next;v=O;do{if((v.tag&o)===o){var M=v.inst,U=M.destroy;if(U!==void 0){M.destroy=void 0,_=l;var Q=d,ue=U;try{ue()}catch(he){mt(_,Q,he)}}}v=v.next}while(v!==O)}}catch(he){mt(l,l.return,he)}}function ZT(o){var l=o.updateQueue;if(l!==null){var d=o.stateNode;try{HN(l,d)}catch(v){mt(o,o.return,v)}}}function JT(o,l,d){d.props=Dl(o.type,o.memoizedProps),d.state=o.memoizedState;try{d.componentWillUnmount()}catch(v){mt(o,l,v)}}function Dd(o,l){try{var d=o.ref;if(d!==null){switch(o.tag){case 26:case 27:case 5:var v=o.stateNode;break;case 30:v=o.stateNode;break;default:v=o.stateNode}typeof d=="function"?o.refCleanup=d(v):d.current=v}}catch(_){mt(o,l,_)}}function ci(o,l){var d=o.ref,v=o.refCleanup;if(d!==null)if(typeof v=="function")try{v()}catch(_){mt(o,l,_)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(_){mt(o,l,_)}else d.current=null}function e2(o){var l=o.type,d=o.memoizedProps,v=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&v.focus();break e;case"img":d.src?v.src=d.src:d.srcSet&&(v.srcset=d.srcSet)}}catch(_){mt(o,o.return,_)}}function qx(o,l,d){try{var v=o.stateNode;iK(v,o.type,d,l),v[Zn]=l}catch(_){mt(o,o.return,_)}}function t2(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&vs(o.type)||o.tag===4}function Kx(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&&vs(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 Vx(o,l,d){var v=o.tag;if(v===5||v===6)o=o.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(o,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(o),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=Fi));else if(v!==4&&(v===27&&vs(o.type)&&(d=o.stateNode,l=null),o=o.child,o!==null))for(Vx(o,l,d),o=o.sibling;o!==null;)Vx(o,l,d),o=o.sibling}function Vp(o,l,d){var v=o.tag;if(v===5||v===6)o=o.stateNode,l?d.insertBefore(o,l):d.appendChild(o);else if(v!==4&&(v===27&&vs(o.type)&&(d=o.stateNode),o=o.child,o!==null))for(Vp(o,l,d),o=o.sibling;o!==null;)Vp(o,l,d),o=o.sibling}function n2(o){var l=o.stateNode,d=o.memoizedProps;try{for(var v=o.type,_=l.attributes;_.length;)l.removeAttributeNode(_[0]);qn(l,v,d),l[vn]=o,l[Zn]=d}catch(O){mt(o,o.return,O)}}var Ji=!1,sn=!1,Yx=!1,r2=typeof WeakSet=="function"?WeakSet:Set,Pn=null;function z7(o,l){if(o=o.containerInfo,mw=hv,o=pN(o),Bb(o)){if("selectionStart"in o)var d={start:o.selectionStart,end:o.selectionEnd};else e:{d=(d=o.ownerDocument)&&d.defaultView||window;var v=d.getSelection&&d.getSelection();if(v&&v.rangeCount!==0){d=v.anchorNode;var _=v.anchorOffset,O=v.focusNode;v=v.focusOffset;try{d.nodeType,O.nodeType}catch{d=null;break e}var M=0,U=-1,Q=-1,ue=0,he=0,ve=o,fe=null;t:for(;;){for(var de;ve!==d||_!==0&&ve.nodeType!==3||(U=M+_),ve!==O||v!==0&&ve.nodeType!==3||(Q=M+v),ve.nodeType===3&&(M+=ve.nodeValue.length),(de=ve.firstChild)!==null;)fe=ve,ve=de;for(;;){if(ve===o)break t;if(fe===d&&++ue===_&&(U=M),fe===O&&++he===v&&(Q=M),(de=ve.nextSibling)!==null)break;ve=fe,fe=ve.parentNode}ve=de}d=U===-1||Q===-1?null:{start:U,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for(pw={focusedElem:o,selectionRange:d},hv=!1,Pn=l;Pn!==null;)if(l=Pn,o=l.child,(l.subtreeFlags&1028)!==0&&o!==null)o.return=l,Pn=o;else for(;Pn!==null;){switch(l=Pn,O=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(d=0;d<o.length;d++)_=o[d],_.ref.impl=_.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&O!==null){o=void 0,d=l,_=O.memoizedProps,O=O.memoizedState,v=d.stateNode;try{var Oe=Dl(d.type,_);o=v.getSnapshotBeforeUpdate(Oe,O),v.__reactInternalSnapshotBeforeUpdate=o}catch(Le){mt(d,d.return,Le)}}break;case 3:if((o&1024)!==0){if(o=l.stateNode.containerInfo,d=o.nodeType,d===9)yw(o);else if(d===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":yw(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,Pn=o;break}Pn=l.return}}function a2(o,l,d){var v=d.flags;switch(d.tag){case 0:case 11:case 15:to(o,d),v&4&&kd(5,d);break;case 1:if(to(o,d),v&4)if(o=d.stateNode,l===null)try{o.componentDidMount()}catch(M){mt(d,d.return,M)}else{var _=Dl(d.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(_,l,o.__reactInternalSnapshotBeforeUpdate)}catch(M){mt(d,d.return,M)}}v&64&&ZT(d),v&512&&Dd(d,d.return);break;case 3:if(to(o,d),v&64&&(o=d.updateQueue,o!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{HN(o,l)}catch(M){mt(d,d.return,M)}}break;case 27:l===null&&v&4&&n2(d);case 26:case 5:to(o,d),l===null&&v&4&&e2(d),v&512&&Dd(d,d.return);break;case 12:to(o,d);break;case 31:to(o,d),v&4&&s2(o,d);break;case 13:to(o,d),v&4&&l2(o,d),v&64&&(o=d.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(d=Y7.bind(null,d),hK(o,d))));break;case 22:if(v=d.memoizedState!==null||Ji,!v){l=l!==null&&l.memoizedState!==null||sn,_=Ji;var O=sn;Ji=v,(sn=l)&&!O?no(o,d,(d.subtreeFlags&8772)!==0):to(o,d),Ji=_,sn=O}break;case 30:break;default:to(o,d)}}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&&sd(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 Rt=null,xr=!1;function eo(o,l,d){for(d=d.child;d!==null;)o2(o,l,d),d=d.sibling}function o2(o,l,d){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(Li,d)}catch{}switch(d.tag){case 26:sn||ci(d,l),eo(o,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:sn||ci(d,l);var v=Rt,_=xr;vs(d.type)&&(Rt=d.stateNode,xr=!1),eo(o,l,d),qd(d.stateNode),Rt=v,xr=_;break;case 5:sn||ci(d,l);case 6:if(v=Rt,_=xr,Rt=null,eo(o,l,d),Rt=v,xr=_,Rt!==null)if(xr)try{(Rt.nodeType===9?Rt.body:Rt.nodeName==="HTML"?Rt.ownerDocument.body:Rt).removeChild(d.stateNode)}catch(O){mt(d,l,O)}else try{Rt.removeChild(d.stateNode)}catch(O){mt(d,l,O)}break;case 18:Rt!==null&&(xr?(o=Rt,Z2(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,d.stateNode),Pu(o)):Z2(Rt,d.stateNode));break;case 4:v=Rt,_=xr,Rt=d.stateNode.containerInfo,xr=!0,eo(o,l,d),Rt=v,xr=_;break;case 0:case 11:case 14:case 15:cs(2,d,l),sn||cs(4,d,l),eo(o,l,d);break;case 1:sn||(ci(d,l),v=d.stateNode,typeof v.componentWillUnmount=="function"&&JT(d,l,v)),eo(o,l,d);break;case 21:eo(o,l,d);break;case 22:sn=(v=sn)||d.memoizedState!==null,eo(o,l,d),sn=v;break;default:eo(o,l,d)}}function s2(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Pu(o)}catch(d){mt(l,l.return,d)}}}function l2(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Pu(o)}catch(d){mt(l,l.return,d)}}function $7(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 Yp(o,l){var d=$7(o);l.forEach(function(v){if(!d.has(v)){d.add(v);var _=X7.bind(null,o,v);v.then(_,_)}})}function wr(o,l){var d=l.deletions;if(d!==null)for(var v=0;v<d.length;v++){var _=d[v],O=o,M=l,U=M;e:for(;U!==null;){switch(U.tag){case 27:if(vs(U.type)){Rt=U.stateNode,xr=!1;break e}break;case 5:Rt=U.stateNode,xr=!1;break e;case 3:case 4:Rt=U.stateNode.containerInfo,xr=!0;break e}U=U.return}if(Rt===null)throw Error(r(160));o2(O,M,_),Rt=null,xr=!1,O=_.alternate,O!==null&&(O.return=null),_.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)c2(l,o),l=l.sibling}var Ta=null;function c2(o,l){var d=o.alternate,v=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:wr(l,o),Sr(o),v&4&&(cs(3,o,o.return),kd(3,o),cs(5,o,o.return));break;case 1:wr(l,o),Sr(o),v&512&&(sn||d===null||ci(d,d.return)),v&64&&Ji&&(o=o.updateQueue,o!==null&&(v=o.callbacks,v!==null&&(d=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=d===null?v:d.concat(v))));break;case 26:var _=Ta;if(wr(l,o),Sr(o),v&512&&(sn||d===null||ci(d,d.return)),v&4){var O=d!==null?d.memoizedState:null;if(v=o.memoizedState,d===null)if(v===null)if(o.stateNode===null){e:{v=o.type,d=o.memoizedProps,_=_.ownerDocument||_;t:switch(v){case"title":O=_.getElementsByTagName("title")[0],(!O||O[bl]||O[vn]||O.namespaceURI==="http://www.w3.org/2000/svg"||O.hasAttribute("itemprop"))&&(O=_.createElement(v),_.head.insertBefore(O,_.querySelector("head > title"))),qn(O,v,d),O[vn]=o,nn(O),v=O;break e;case"link":var M=cP("link","href",_).get(v+(d.href||""));if(M){for(var U=0;U<M.length;U++)if(O=M[U],O.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&O.getAttribute("rel")===(d.rel==null?null:d.rel)&&O.getAttribute("title")===(d.title==null?null:d.title)&&O.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){M.splice(U,1);break t}}O=_.createElement(v),qn(O,v,d),_.head.appendChild(O);break;case"meta":if(M=cP("meta","content",_).get(v+(d.content||""))){for(U=0;U<M.length;U++)if(O=M[U],O.getAttribute("content")===(d.content==null?null:""+d.content)&&O.getAttribute("name")===(d.name==null?null:d.name)&&O.getAttribute("property")===(d.property==null?null:d.property)&&O.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&O.getAttribute("charset")===(d.charSet==null?null:d.charSet)){M.splice(U,1);break t}}O=_.createElement(v),qn(O,v,d),_.head.appendChild(O);break;default:throw Error(r(468,v))}O[vn]=o,nn(O),v=O}o.stateNode=v}else uP(_,o.type,o.stateNode);else o.stateNode=lP(_,v,o.memoizedProps);else O!==v?(O===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):O.count--,v===null?uP(_,o.type,o.stateNode):lP(_,v,o.memoizedProps)):v===null&&o.stateNode!==null&&qx(o,o.memoizedProps,d.memoizedProps)}break;case 27:wr(l,o),Sr(o),v&512&&(sn||d===null||ci(d,d.return)),d!==null&&v&4&&qx(o,o.memoizedProps,d.memoizedProps);break;case 5:if(wr(l,o),Sr(o),v&512&&(sn||d===null||ci(d,d.return)),o.flags&32){_=o.stateNode;try{eu(_,"")}catch(Oe){mt(o,o.return,Oe)}}v&4&&o.stateNode!=null&&(_=o.memoizedProps,qx(o,_,d!==null?d.memoizedProps:_)),v&1024&&(Yx=!0);break;case 6:if(wr(l,o),Sr(o),v&4){if(o.stateNode===null)throw Error(r(162));v=o.memoizedProps,d=o.stateNode;try{d.nodeValue=v}catch(Oe){mt(o,o.return,Oe)}}break;case 3:if(cv=null,_=Ta,Ta=sv(l.containerInfo),wr(l,o),Ta=_,Sr(o),v&4&&d!==null&&d.memoizedState.isDehydrated)try{Pu(l.containerInfo)}catch(Oe){mt(o,o.return,Oe)}Yx&&(Yx=!1,u2(o));break;case 4:v=Ta,Ta=sv(o.stateNode.containerInfo),wr(l,o),Sr(o),Ta=v;break;case 12:wr(l,o),Sr(o);break;case 31:wr(l,o),Sr(o),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,Yp(o,v)));break;case 13:wr(l,o),Sr(o),o.child.flags&8192&&o.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Gp=pn()),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,Yp(o,v)));break;case 22:_=o.memoizedState!==null;var Q=d!==null&&d.memoizedState!==null,ue=Ji,he=sn;if(Ji=ue||_,sn=he||Q,wr(l,o),sn=he,Ji=ue,Sr(o),v&8192)e:for(l=o.stateNode,l._visibility=_?l._visibility&-2:l._visibility|1,_&&(d===null||Q||Ji||sn||Il(o)),d=null,l=o;;){if(l.tag===5||l.tag===26){if(d===null){Q=d=l;try{if(O=Q.stateNode,_)M=O.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(Oe){mt(Q,Q.return,Oe)}}}else if(l.tag===6){if(d===null){Q=l;try{Q.stateNode.nodeValue=_?"":Q.memoizedProps}catch(Oe){mt(Q,Q.return,Oe)}}}else if(l.tag===18){if(d===null){Q=l;try{var de=Q.stateNode;_?J2(de,!0):J2(Q.stateNode,!1)}catch(Oe){mt(Q,Q.return,Oe)}}}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;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}v&4&&(v=o.updateQueue,v!==null&&(d=v.retryQueue,d!==null&&(v.retryQueue=null,Yp(o,d))));break;case 19:wr(l,o),Sr(o),v&4&&(v=o.updateQueue,v!==null&&(o.updateQueue=null,Yp(o,v)));break;case 30:break;case 21:break;default:wr(l,o),Sr(o)}}function Sr(o){var l=o.flags;if(l&2){try{for(var d,v=o.return;v!==null;){if(t2(v)){d=v;break}v=v.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var _=d.stateNode,O=Kx(o);Vp(o,O,_);break;case 5:var M=d.stateNode;d.flags&32&&(eu(M,""),d.flags&=-33);var U=Kx(o);Vp(o,U,M);break;case 3:case 4:var Q=d.stateNode.containerInfo,ue=Kx(o);Vx(o,ue,Q);break;default:throw Error(r(161))}}catch(he){mt(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 to(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:cs(4,l,l.return),Il(l);break;case 1:ci(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&JT(l,l.return,d),Il(l);break;case 27:qd(l.stateNode);case 26:case 5:ci(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 no(o,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var v=l.alternate,_=o,O=l,M=O.flags;switch(O.tag){case 0:case 11:case 15:no(_,O,d),kd(4,O);break;case 1:if(no(_,O,d),v=O,_=v.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(ue){mt(v,v.return,ue)}if(v=O,_=v.updateQueue,_!==null){var U=v.stateNode;try{var Q=_.shared.hiddenCallbacks;if(Q!==null)for(_.shared.hiddenCallbacks=null,_=0;_<Q.length;_++)UN(Q[_],U)}catch(ue){mt(v,v.return,ue)}}d&&M&64&&ZT(O),Dd(O,O.return);break;case 27:n2(O);case 26:case 5:no(_,O,d),d&&v===null&&M&4&&e2(O),Dd(O,O.return);break;case 12:no(_,O,d);break;case 31:no(_,O,d),d&&M&4&&s2(_,O);break;case 13:no(_,O,d),d&&M&4&&l2(_,O);break;case 22:O.memoizedState===null&&no(_,O,d),Dd(O,O.return);break;case 30:break;default:no(_,O,d)}l=l.sibling}}function Xx(o,l){var d=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==d&&(o!=null&&o.refCount++,d!=null&&wd(d))}function Gx(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&wd(o))}function Pa(o,l,d,v){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)f2(o,l,d,v),l=l.sibling}function f2(o,l,d,v){var _=l.flags;switch(l.tag){case 0:case 11:case 15:Pa(o,l,d,v),_&2048&&kd(9,l);break;case 1:Pa(o,l,d,v);break;case 3:Pa(o,l,d,v),_&2048&&(o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&wd(o)));break;case 12:if(_&2048){Pa(o,l,d,v),o=l.stateNode;try{var O=l.memoizedProps,M=O.id,U=O.onPostCommit;typeof U=="function"&&U(M,l.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(Q){mt(l,l.return,Q)}}else Pa(o,l,d,v);break;case 31:Pa(o,l,d,v);break;case 13:Pa(o,l,d,v);break;case 23:break;case 22:O=l.stateNode,M=l.alternate,l.memoizedState!==null?O._visibility&2?Pa(o,l,d,v):Id(o,l):O._visibility&2?Pa(o,l,d,v):(O._visibility|=2,xu(o,l,d,v,(l.subtreeFlags&10256)!==0||!1)),_&2048&&Xx(M,l);break;case 24:Pa(o,l,d,v),_&2048&&Gx(l.alternate,l);break;default:Pa(o,l,d,v)}}function xu(o,l,d,v,_){for(_=_&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var O=o,M=l,U=d,Q=v,ue=M.flags;switch(M.tag){case 0:case 11:case 15:xu(O,M,U,Q,_),kd(8,M);break;case 23:break;case 22:var he=M.stateNode;M.memoizedState!==null?he._visibility&2?xu(O,M,U,Q,_):Id(O,M):(he._visibility|=2,xu(O,M,U,Q,_)),_&&ue&2048&&Xx(M.alternate,M);break;case 24:xu(O,M,U,Q,_),_&&ue&2048&&Gx(M.alternate,M);break;default:xu(O,M,U,Q,_)}l=l.sibling}}function Id(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=o,v=l,_=v.flags;switch(v.tag){case 22:Id(d,v),_&2048&&Xx(v.alternate,v);break;case 24:Id(d,v),_&2048&&Gx(v.alternate,v);break;default:Id(d,v)}l=l.sibling}}var Ld=8192;function wu(o,l,d){if(o.subtreeFlags&Ld)for(o=o.child;o!==null;)d2(o,l,d),o=o.sibling}function d2(o,l,d){switch(o.tag){case 26:wu(o,l,d),o.flags&Ld&&o.memoizedState!==null&&OK(d,Ta,o.memoizedState,o.memoizedProps);break;case 5:wu(o,l,d);break;case 3:case 4:var v=Ta;Ta=sv(o.stateNode.containerInfo),wu(o,l,d),Ta=v;break;case 22:o.memoizedState===null&&(v=o.alternate,v!==null&&v.memoizedState!==null?(v=Ld,Ld=16777216,wu(o,l,d),Ld=v):wu(o,l,d));break;default:wu(o,l,d)}}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 zd(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var v=l[d];Pn=v,p2(v,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:zd(o),o.flags&2048&&cs(9,o,o.return);break;case 3:zd(o);break;case 12:zd(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,Xp(o)):zd(o);break;default:zd(o)}}function Xp(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var v=l[d];Pn=v,p2(v,o)}h2(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:cs(8,l,l.return),Xp(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Xp(l));break;default:Xp(l)}o=o.sibling}}function p2(o,l){for(;Pn!==null;){var d=Pn;switch(d.tag){case 0:case 11:case 15:cs(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var v=d.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:wd(d.memoizedState.cache)}if(v=d.child,v!==null)v.return=d,Pn=v;else e:for(d=o;Pn!==null;){v=Pn;var _=v.sibling,O=v.return;if(i2(v),v===d){Pn=null;break e}if(_!==null){_.return=O,Pn=_;break e}Pn=O}}}var B7={getCacheForType:function(o){var l=Hn(rn),d=l.data.get(o);return d===void 0&&(d=o(),l.data.set(o,d)),d},cacheSignal:function(){return Hn(rn).controller.signal}},U7=typeof WeakMap=="function"?WeakMap:Map,ft=0,St=null,Ye=null,We=0,ht=0,Br=null,us=!1,Su=!1,Wx=!1,ro=0,Ft=0,fs=0,Ll=0,Qx=0,Ur=0,Eu=0,$d=null,Er=null,Zx=!1,Gp=0,v2=0,Wp=1/0,Qp=null,ds=null,gn=0,hs=null,_u=null,ao=0,Jx=0,ew=null,g2=null,Bd=0,tw=null;function Hr(){return(ft&2)!==0&&We!==0?We&-We:R.T!==null?sw():od()}function y2(){if(Ur===0)if((We&536870912)===0||Je){var o=Ko;Ko<<=1,(Ko&3932160)===0&&(Ko=262144),Ur=o}else Ur=536870912;return o=zr.current,o!==null&&(o.flags|=32),Ur}function _r(o,l,d){(o===St&&(ht===2||ht===9)||o.cancelPendingCommit!==null)&&(Ou(o,0),ms(o,We,Ur,!1)),Ct(o,d),((ft&2)===0||o!==St)&&(o===St&&((ft&2)===0&&(Ll|=d),Ft===4&&ms(o,We,Ur,!1)),ui(o))}function b2(o,l,d){if((ft&6)!==0)throw Error(r(327));var v=!d&&(l&127)===0&&(l&o.expiredLanes)===0||_t(o,l),_=v?q7(o,l):rw(o,l,!0),O=v;do{if(_===0){Su&&!v&&ms(o,l,0,!1);break}else{if(d=o.current.alternate,O&&!H7(d)){_=rw(o,l,!1),O=!1;continue}if(_===2){if(O=l,o.errorRecoveryDisabledLanes&O)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;_=$d;var Q=U.current.memoizedState.isDehydrated;if(Q&&(Ou(U,M).flags|=256),M=rw(U,M,!1),M!==2){if(Wx&&!Q){U.errorRecoveryDisabledLanes|=O,Ll|=O,_=4;break e}O=Er,Er=_,O!==null&&(Er===null?Er=O:Er.push.apply(Er,O))}_=M}if(O=!1,_!==2)continue}}if(_===1){Ou(o,0),ms(o,l,0,!0);break}e:{switch(v=o,O=_,O){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:ms(v,l,Ur,!us);break e;case 2:Er=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(_=Gp+300-pn(),10<_)){if(ms(v,l,Ur,!us),$e(v,0,!0)!==0)break e;ao=l,v.timeoutHandle=W2(x2.bind(null,v,d,Er,Qp,Zx,l,Ur,Ll,Eu,us,O,"Throttled",-0,0),_);break e}x2(v,d,Er,Qp,Zx,l,Ur,Ll,Eu,us,O,null,-0,0)}}break}while(!0);ui(o)}function x2(o,l,d,v,_,O,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:Fi},d2(l,O,ve);var Oe=(O&62914560)===O?Gp-pn():(O&4194048)===O?v2-pn():0;if(Oe=jK(ve,Oe),Oe!==null){ao=O,o.cancelPendingCommit=Oe(A2.bind(null,o,l,O,d,v,_,M,U,Q,he,ve,null,fe,de)),ms(o,O,M,!ue);return}}A2(o,l,O,d,v,_,M,U,Q)}function H7(o){for(var l=o;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var v=0;v<d.length;v++){var _=d[v],O=_.getSnapshot;_=_.value;try{if(!Ir(O(),_))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;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 ms(o,l,d,v){l&=~Qx,l&=~Ll,o.suspendedLanes|=l,o.pingedLanes&=~l,v&&(o.warmLanes|=l),v=o.expirationTimes;for(var _=l;0<_;){var O=31-Nn(_),M=1<<O;v[O]=-1,_&=~M}d!==0&&$i(o,d,l)}function Zp(){return(ft&6)===0?(Ud(0),!1):!0}function nw(){if(Ye!==null){if(ht===0)var o=Ye.return;else o=Ye,Yi=Al=null,yx(o),pu=null,Ed=0,o=Ye;for(;o!==null;)QT(o.alternate,o),o=o.return;Ye=null}}function Ou(o,l){var d=o.timeoutHandle;d!==-1&&(o.timeoutHandle=-1,lK(d)),d=o.cancelPendingCommit,d!==null&&(o.cancelPendingCommit=null,d()),ao=0,nw(),St=o,Ye=d=Ki(o.current,null),We=l,ht=0,Br=null,us=!1,Su=_t(o,l),Wx=!1,Eu=Ur=Qx=Ll=fs=Ft=0,Er=$d=null,Zx=!1,(l&8)!==0&&(l|=l&32);var v=o.entangledLanes;if(v!==0)for(o=o.entanglements,v&=l;0<v;){var _=31-Nn(v),O=1<<_;l|=o[_],v&=~O}return ro=l,bp(),d}function w2(o,l){Fe=null,R.H=Pd,l===mu||l===Cp?(l=LN(),ht=3):l===ox?(l=LN(),ht=4):ht=l===kx?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Br=l,Ye===null&&(Ft=1,Up(o,aa(l,o.current)))}function S2(){var o=zr.current;return o===null?!0:(We&4194048)===We?la===null:(We&62914560)===We||(We&536870912)!==0?o===la:!1}function E2(){var o=R.H;return R.H=Pd,o===null?Pd:o}function _2(){var o=R.A;return R.A=B7,o}function Jp(){Ft=4,us||(We&4194048)!==We&&zr.current!==null||(Su=!0),(fs&134217727)===0&&(Ll&134217727)===0||St===null||ms(St,We,Ur,!1)}function rw(o,l,d){var v=ft;ft|=2;var _=E2(),O=_2();(St!==o||We!==l)&&(Qp=null,Ou(o,l)),l=!1;var M=Ft;e:do try{if(ht!==0&&Ye!==null){var U=Ye,Q=Br;switch(ht){case 8:nw(),M=6;break e;case 3:case 2:case 9:case 6:zr.current===null&&(l=!0);var ue=ht;if(ht=0,Br=null,ju(o,U,Q,ue),d&&Su){M=0;break e}break;default:ue=ht,ht=0,Br=null,ju(o,U,Q,ue)}}F7(),M=Ft;break}catch(he){w2(o,he)}while(!0);return l&&o.shellSuspendCounter++,Yi=Al=null,ft=v,R.H=_,R.A=O,Ye===null&&(St=null,We=0,bp()),M}function F7(){for(;Ye!==null;)O2(Ye)}function q7(o,l){var d=ft;ft|=2;var v=E2(),_=_2();St!==o||We!==l?(Qp=null,Wp=pn()+500,Ou(o,l)):Su=_t(o,l);e:do try{if(ht!==0&&Ye!==null){l=Ye;var O=Br;t:switch(ht){case 1:ht=0,Br=null,ju(o,l,O,1);break;case 2:case 9:if(DN(O)){ht=0,Br=null,j2(l);break}l=function(){ht!==2&&ht!==9||St!==o||(ht=7),ui(o)},O.then(l,l);break e;case 3:ht=7;break e;case 4:ht=5;break e;case 7:DN(O)?(ht=0,Br=null,j2(l)):(ht=0,Br=null,ju(o,l,O,7));break;case 5:var M=null;switch(Ye.tag){case 26:M=Ye.memoizedState;case 5:case 27:var U=Ye;if(M?fP(M):U.stateNode.complete){ht=0,Br=null;var Q=U.sibling;if(Q!==null)Ye=Q;else{var ue=U.return;ue!==null?(Ye=ue,ev(ue)):Ye=null}break t}}ht=0,Br=null,ju(o,l,O,5);break;case 6:ht=0,Br=null,ju(o,l,O,6);break;case 8:nw(),Ft=6;break e;default:throw Error(r(462))}}K7();break}catch(he){w2(o,he)}while(!0);return Yi=Al=null,R.H=v,R.A=_,ft=d,Ye!==null?0:(St=null,We=0,bp(),Ft)}function K7(){for(;Ye!==null&&!Qt();)O2(Ye)}function O2(o){var l=GT(o.alternate,o,ro);o.memoizedProps=o.pendingProps,l===null?ev(o):Ye=l}function j2(o){var l=o,d=l.alternate;switch(l.tag){case 15:case 0:l=FT(d,l,l.pendingProps,l.type,void 0,We);break;case 11:l=FT(d,l,l.pendingProps,l.type.render,l.ref,We);break;case 5:yx(l);default:QT(d,l),l=Ye=_N(l,ro),l=GT(d,l,ro)}o.memoizedProps=o.pendingProps,l===null?ev(o):Ye=l}function ju(o,l,d,v){Yi=Al=null,yx(l),pu=null,Ed=0;var _=l.return;try{if(R7(o,_,l,d,We)){Ft=1,Up(o,aa(d,o.current)),Ye=null;return}}catch(O){if(_!==null)throw Ye=_,O;Ft=1,Up(o,aa(d,o.current)),Ye=null;return}l.flags&32768?(Je||v===1?o=!0:Su||(We&536870912)!==0?o=!1:(us=o=!0,(v===2||v===9||v===3||v===6)&&(v=zr.current,v!==null&&v.tag===13&&(v.flags|=16384))),C2(l,o)):ev(l)}function ev(o){var l=o;do{if((l.flags&32768)!==0){C2(l,us);return}o=l.return;var d=I7(l.alternate,l,ro);if(d!==null){Ye=d;return}if(l=l.sibling,l!==null){Ye=l;return}Ye=l=o}while(l!==null);Ft===0&&(Ft=5)}function C2(o,l){do{var d=L7(o.alternate,o);if(d!==null){d.flags&=32767,Ye=d;return}if(d=o.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(o=o.sibling,o!==null)){Ye=o;return}Ye=o=d}while(o!==null);Ft=6,Ye=null}function A2(o,l,d,v,_,O,M,U,Q){o.cancelPendingCommit=null;do tv();while(gn!==0);if((ft&6)!==0)throw Error(r(327));if(l!==null){if(l===o.current)throw Error(r(177));if(O=l.lanes|l.childLanes,O|=Kb,Gn(o,d,O,M,U,Q),o===St&&(Ye=St=null,We=0),_u=l,hs=o,ao=d,Jx=O,ew=_,g2=v,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,G7(ri,function(){return R2(),null})):(o.callbackNode=null,o.callbackPriority=0),v=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||v){v=R.T,R.T=null,_=H.p,H.p=2,M=ft,ft|=4;try{z7(o,l,d)}finally{ft=M,H.p=_,R.T=v}}gn=1,N2(),T2(),P2()}}function N2(){if(gn===1){gn=0;var o=hs,l=_u,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=R.T,R.T=null;var v=H.p;H.p=2;var _=ft;ft|=4;try{c2(l,o);var O=pw,M=pN(o.containerInfo),U=O.focusedElem,Q=O.selectionRange;if(M!==U&&U&&U.ownerDocument&&mN(U.ownerDocument.documentElement,U)){if(Q!==null&&Bb(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(),Oe=U.textContent.length,Le=Math.min(Q.start,Oe),yt=Q.end===void 0?Le:Math.min(Q.end,Oe);!de.extend&&Le>yt&&(M=yt,yt=Le,Le=M);var ae=hN(U,Le),te=hN(U,yt);if(ae&&te&&(de.rangeCount!==1||de.anchorNode!==ae.node||de.anchorOffset!==ae.offset||de.focusNode!==te.node||de.focusOffset!==te.offset)){var le=ve.createRange();le.setStart(ae.node,ae.offset),de.removeAllRanges(),Le>yt?(de.addRange(le),de.extend(te.node,te.offset)):(le.setEnd(te.node,te.offset),de.addRange(le))}}}}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}}hv=!!mw,pw=mw=null}finally{ft=_,H.p=v,R.T=d}}o.current=l,gn=2}}function T2(){if(gn===2){gn=0;var o=hs,l=_u,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=R.T,R.T=null;var v=H.p;H.p=2;var _=ft;ft|=4;try{a2(o,l.alternate,l)}finally{ft=_,H.p=v,R.T=d}}gn=3}}function P2(){if(gn===4||gn===3){gn=0,pr();var o=hs,l=_u,d=ao,v=g2;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?gn=5:(gn=0,_u=hs=null,M2(o,o.pendingLanes));var _=o.pendingLanes;if(_===0&&(ds=null),Dr(d),l=l.stateNode,Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(Li,l,void 0,(l.current.flags&128)===128)}catch{}if(v!==null){l=R.T,_=H.p,H.p=2,R.T=null;try{for(var O=o.onRecoverableError,M=0;M<v.length;M++){var U=v[M];O(U.value,{componentStack:U.stack})}}finally{R.T=l,H.p=_}}(ao&3)!==0&&tv(),ui(o),_=o.pendingLanes,(d&261930)!==0&&(_&42)!==0?o===tw?Bd++:(Bd=0,tw=o):Bd=0,Ud(0)}}function M2(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,wd(l)))}function tv(){return N2(),T2(),P2(),R2()}function R2(){if(gn!==5)return!1;var o=hs,l=Jx;Jx=0;var d=Dr(ao),v=R.T,_=H.p;try{H.p=32>d?32:d,R.T=null,d=ew,ew=null;var O=hs,M=ao;if(gn=0,_u=hs=null,ao=0,(ft&6)!==0)throw Error(r(331));var U=ft;if(ft|=4,m2(O.current),f2(O,O.current,M,d),ft=U,Ud(0,!1),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(Li,O)}catch{}return!0}finally{H.p=_,R.T=v,M2(o,l)}}function k2(o,l,d){l=aa(d,l),l=Rx(o.stateNode,l,2),o=os(o,l,2),o!==null&&(Ct(o,2),ui(o))}function mt(o,l,d){if(o.tag===3)k2(o,o,d);else for(;l!==null;){if(l.tag===3){k2(l,o,d);break}else if(l.tag===1){var v=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(ds===null||!ds.has(v))){o=aa(d,o),d=DT(2),v=os(l,d,2),v!==null&&(IT(d,v,l,o),Ct(v,2),ui(v));break}}l=l.return}}function aw(o,l,d){var v=o.pingCache;if(v===null){v=o.pingCache=new U7;var _=new Set;v.set(l,_)}else _=v.get(l),_===void 0&&(_=new Set,v.set(l,_));_.has(d)||(Wx=!0,_.add(d),o=V7.bind(null,o,l,d),l.then(o,o))}function V7(o,l,d){var v=o.pingCache;v!==null&&v.delete(l),o.pingedLanes|=o.suspendedLanes&d,o.warmLanes&=~d,St===o&&(We&d)===d&&(Ft===4||Ft===3&&(We&62914560)===We&&300>pn()-Gp?(ft&2)===0&&Ou(o,0):Qx|=d,Eu===We&&(Eu=0)),ui(o)}function D2(o,l){l===0&&(l=Tn()),o=Ol(o,l),o!==null&&(Ct(o,l),ui(o))}function Y7(o){var l=o.memoizedState,d=0;l!==null&&(d=l.retryLane),D2(o,d)}function X7(o,l){var d=0;switch(o.tag){case 31:case 13:var v=o.stateNode,_=o.memoizedState;_!==null&&(d=_.retryLane);break;case 19:v=o.stateNode;break;case 22:v=o.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(l),D2(o,d)}function G7(o,l){return Mr(o,l)}var nv=null,Cu=null,iw=!1,rv=!1,ow=!1,ps=0;function ui(o){o!==Cu&&o.next===null&&(Cu===null?nv=Cu=o:Cu=Cu.next=o),rv=!0,iw||(iw=!0,Q7())}function Ud(o,l){if(!ow&&rv){ow=!0;do for(var d=!1,v=nv;v!==null;){if(o!==0){var _=v.pendingLanes;if(_===0)var O=0;else{var M=v.suspendedLanes,U=v.pingedLanes;O=(1<<31-Nn(42|o)+1)-1,O&=_&~(M&~U),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(d=!0,$2(v,O))}else O=We,O=$e(v,v===St?O:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(O&3)===0||_t(v,O)||(d=!0,$2(v,O));v=v.next}while(d);ow=!1}}function W7(){I2()}function I2(){rv=iw=!1;var o=0;ps!==0&&sK()&&(o=ps);for(var l=pn(),d=null,v=nv;v!==null;){var _=v.next,O=L2(v,l);O===0?(v.next=null,d===null?nv=_:d.next=_,_===null&&(Cu=d)):(d=v,(o!==0||(O&3)!==0)&&(rv=!0)),v=_}gn!==0&&gn!==5||Ud(o),ps!==0&&(ps=0)}function L2(o,l){for(var d=o.suspendedLanes,v=o.pingedLanes,_=o.expirationTimes,O=o.pendingLanes&-62914561;0<O;){var M=31-Nn(O),U=1<<M,Q=_[M];Q===-1?((U&d)===0||(U&v)!==0)&&(_[M]=tn(U,l)):Q<=l&&(o.expiredLanes|=U),O&=~U}if(l=St,d=We,d=$e(o,o===l?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),v=o.callbackNode,d===0||o===l&&(ht===2||ht===9)||o.cancelPendingCommit!==null)return v!==null&&v!==null&&Ca(v),o.callbackNode=null,o.callbackPriority=0;if((d&3)===0||_t(o,d)){if(l=d&-d,l===o.callbackPriority)return l;switch(v!==null&&Ca(v),Dr(d)){case 2:case 8:d=ni;break;case 32:d=ri;break;case 268435456:d=Rr;break;default:d=ri}return v=z2.bind(null,o),d=Mr(d,v),o.callbackPriority=l,o.callbackNode=d,l}return v!==null&&v!==null&&Ca(v),o.callbackPriority=2,o.callbackNode=null,2}function z2(o,l){if(gn!==0&&gn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var d=o.callbackNode;if(tv()&&o.callbackNode!==d)return null;var v=We;return v=$e(o,o===St?v:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),v===0?null:(b2(o,v,l),L2(o,pn()),o.callbackNode!=null&&o.callbackNode===d?z2.bind(null,o):null)}function $2(o,l){if(tv())return null;b2(o,l,!0)}function Q7(){cK(function(){(ft&6)!==0?Mr(vr,W7):I2()})}function sw(){if(ps===0){var o=du;o===0&&(o=qo,qo<<=1,(qo&261888)===0&&(qo=256)),ps=o}return ps}function B2(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:fp(""+o)}function U2(o,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,o.id&&d.setAttribute("form",o.id),l.parentNode.insertBefore(d,l),o=new FormData(o),d.parentNode.removeChild(d),o}function Z7(o,l,d,v,_){if(l==="submit"&&d&&d.stateNode===_){var O=B2((_[Zn]||null).action),M=v.submitter;M&&(l=(l=M[Zn]||null)?B2(l.formAction):M.getAttribute("formAction"),l!==null&&(O=l,M=null));var U=new pp("action","action",null,v,_);o.push({event:U,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(ps!==0){var Q=M?U2(_,M):new FormData(_);Cx(d,{pending:!0,data:Q,method:_.method,action:O},null,Q)}}else typeof O=="function"&&(U.preventDefault(),Q=M?U2(_,M):new FormData(_),Cx(d,{pending:!0,data:Q,method:_.method,action:O},O,Q))},currentTarget:_}]})}}for(var lw=0;lw<qb.length;lw++){var cw=qb[lw],J7=cw.toLowerCase(),eK=cw[0].toUpperCase()+cw.slice(1);Na(J7,"on"+eK)}Na(yN,"onAnimationEnd"),Na(bN,"onAnimationIteration"),Na(xN,"onAnimationStart"),Na("dblclick","onDoubleClick"),Na("focusin","onFocus"),Na("focusout","onBlur"),Na(v7,"onTransitionRun"),Na(g7,"onTransitionStart"),Na(y7,"onTransitionCancel"),Na(wN,"onTransitionEnd"),Qo("onMouseEnter",["mouseout","mouseover"]),Qo("onMouseLeave",["mouseout","mouseover"]),Qo("onPointerEnter",["pointerout","pointerover"]),Qo("onPointerLeave",["pointerout","pointerover"]),Ui("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ui("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ui("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ui("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ui("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ui("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hd="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(" "),tK=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hd));function H2(o,l){l=(l&4)!==0;for(var d=0;d<o.length;d++){var v=o[d],_=v.event;v=v.listeners;e:{var O=void 0;if(l)for(var M=v.length-1;0<=M;M--){var U=v[M],Q=U.instance,ue=U.currentTarget;if(U=U.listener,Q!==O&&_.isPropagationStopped())break e;O=U,_.currentTarget=ue;try{O(_)}catch(he){yp(he)}_.currentTarget=null,O=Q}else for(M=0;M<v.length;M++){if(U=v[M],Q=U.instance,ue=U.currentTarget,U=U.listener,Q!==O&&_.isPropagationStopped())break e;O=U,_.currentTarget=ue;try{O(_)}catch(he){yp(he)}_.currentTarget=null,O=Q}}}}function Xe(o,l){var d=l[Qc];d===void 0&&(d=l[Qc]=new Set);var v=o+"__bubble";d.has(v)||(F2(l,o,2,!1),d.add(v))}function uw(o,l,d){var v=0;l&&(v|=4),F2(d,o,v,l)}var av="_reactListening"+Math.random().toString(36).slice(2);function fw(o){if(!o[av]){o[av]=!0,ip.forEach(function(d){d!=="selectionchange"&&(tK.has(d)||uw(d,!1,o),uw(d,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[av]||(l[av]=!0,uw("selectionchange",!1,l))}}function F2(o,l,d,v){switch(yP(l)){case 2:var _=NK;break;case 8:_=TK;break;default:_=jw}d=_.bind(null,l,d,o),_=void 0,!Pb||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(_=!0),v?_!==void 0?o.addEventListener(l,d,{capture:!0,passive:_}):o.addEventListener(l,d,!0):_!==void 0?o.addEventListener(l,d,{passive:_}):o.addEventListener(l,d,!1)}function dw(o,l,d,v,_){var O=v;if((l&1)===0&&(l&2)===0&&v!==null)e:for(;;){if(v===null)return;var M=v.tag;if(M===3||M===4){var U=v.stateNode.containerInfo;if(U===_)break;if(M===4)for(M=v.return;M!==null;){var Q=M.tag;if((Q===3||Q===4)&&M.stateNode.containerInfo===_)return;M=M.return}for(;U!==null;){if(M=Yo(U),M===null)return;if(Q=M.tag,Q===5||Q===6||Q===26||Q===27){v=O=M;continue e}U=U.parentNode}}v=v.return}XA(function(){var ue=O,he=Nb(d),ve=[];e:{var fe=SN.get(o);if(fe!==void 0){var de=pp,Oe=o;switch(o){case"keypress":if(hp(d)===0)break e;case"keydown":case"keyup":de=X9;break;case"focusin":Oe="focus",de=Db;break;case"focusout":Oe="blur",de=Db;break;case"beforeblur":case"afterblur":de=Db;break;case"click":if(d.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=I9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=Q9;break;case yN:case bN:case xN:de=$9;break;case wN:de=J9;break;case"scroll":case"scrollend":de=k9;break;case"wheel":de=t7;break;case"copy":case"cut":case"paste":de=U9;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=r7}var Le=(l&4)!==0,yt=!Le&&(o==="scroll"||o==="scrollend"),ae=Le?fe!==null?fe+"Capture":null:fe;Le=[];for(var te=ue,le;te!==null;){var pe=te;if(le=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||le===null||ae===null||(pe=ud(te,ae),pe!=null&&Le.push(Fd(te,pe,le))),yt)break;te=te.return}0<Le.length&&(fe=new de(fe,Oe,null,d,he),ve.push({event:fe,listeners:Le}))}}if((l&7)===0){e:{if(fe=o==="mouseover"||o==="pointerover",de=o==="mouseout"||o==="pointerout",fe&&d!==Ab&&(Oe=d.relatedTarget||d.fromElement)&&(Yo(Oe)||Oe[Bi]))break e;if((de||fe)&&(fe=he.window===he?he:(fe=he.ownerDocument)?fe.defaultView||fe.parentWindow:window,de?(Oe=d.relatedTarget||d.toElement,de=ue,Oe=Oe?Yo(Oe):null,Oe!==null&&(yt=i(Oe),Le=Oe.tag,Oe!==yt||Le!==5&&Le!==27&&Le!==6)&&(Oe=null)):(de=null,Oe=ue),de!==Oe)){if(Le=QA,pe="onMouseLeave",ae="onMouseEnter",te="mouse",(o==="pointerout"||o==="pointerover")&&(Le=JA,pe="onPointerLeave",ae="onPointerEnter",te="pointer"),yt=de==null?fe:Go(de),le=Oe==null?fe:Go(Oe),fe=new Le(pe,te+"leave",de,d,he),fe.target=yt,fe.relatedTarget=le,pe=null,Yo(he)===ue&&(Le=new Le(ae,te+"enter",Oe,d,he),Le.target=le,Le.relatedTarget=yt,pe=Le),yt=pe,de&&Oe)t:{for(Le=nK,ae=de,te=Oe,le=0,pe=ae;pe;pe=Le(pe))le++;pe=0;for(var ke=te;ke;ke=Le(ke))pe++;for(;0<le-pe;)ae=Le(ae),le--;for(;0<pe-le;)te=Le(te),pe--;for(;le--;){if(ae===te||te!==null&&ae===te.alternate){Le=ae;break t}ae=Le(ae),te=Le(te)}Le=null}else Le=null;de!==null&&q2(ve,fe,de,Le,!1),Oe!==null&&yt!==null&&q2(ve,yt,Oe,Le,!0)}}e:{if(fe=ue?Go(ue):window,de=fe.nodeName&&fe.nodeName.toLowerCase(),de==="select"||de==="input"&&fe.type==="file")var st=sN;else if(iN(fe))if(lN)st=h7;else{st=f7;var Te=u7}else de=fe.nodeName,!de||de.toLowerCase()!=="input"||fe.type!=="checkbox"&&fe.type!=="radio"?ue&&Cb(ue.elementType)&&(st=sN):st=d7;if(st&&(st=st(o,ue))){oN(ve,st,d,he);break e}Te&&Te(o,fe,ue),o==="focusout"&&ue&&fe.type==="number"&&ue.memoizedProps.value!=null&&cd(fe,"number",fe.value)}switch(Te=ue?Go(ue):window,o){case"focusin":(iN(Te)||Te.contentEditable==="true")&&(au=Te,Ub=ue,yd=null);break;case"focusout":yd=Ub=au=null;break;case"mousedown":Hb=!0;break;case"contextmenu":case"mouseup":case"dragend":Hb=!1,vN(ve,d,he);break;case"selectionchange":if(p7)break;case"keydown":case"keyup":vN(ve,d,he)}var qe;if(Lb)e:{switch(o){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else ru?rN(o,d)&&(Qe="onCompositionEnd"):o==="keydown"&&d.keyCode===229&&(Qe="onCompositionStart");Qe&&(eN&&d.locale!=="ko"&&(ru||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&ru&&(qe=GA()):(Jo=he,Mb="value"in Jo?Jo.value:Jo.textContent,ru=!0)),Te=iv(ue,Qe),0<Te.length&&(Qe=new ZA(Qe,o,null,d,he),ve.push({event:Qe,listeners:Te}),qe?Qe.data=qe:(qe=aN(d),qe!==null&&(Qe.data=qe)))),(qe=i7?o7(o,d):s7(o,d))&&(Qe=iv(ue,"onBeforeInput"),0<Qe.length&&(Te=new ZA("onBeforeInput","beforeinput",null,d,he),ve.push({event:Te,listeners:Qe}),Te.data=qe)),Z7(ve,o,ue,d,he)}H2(ve,l)})}function Fd(o,l,d){return{instance:o,listener:l,currentTarget:d}}function iv(o,l){for(var d=l+"Capture",v=[];o!==null;){var _=o,O=_.stateNode;if(_=_.tag,_!==5&&_!==26&&_!==27||O===null||(_=ud(o,d),_!=null&&v.unshift(Fd(o,_,O)),_=ud(o,l),_!=null&&v.push(Fd(o,_,O))),o.tag===3)return v;o=o.return}return[]}function nK(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,d,v,_){for(var O=l._reactName,M=[];d!==null&&d!==v;){var U=d,Q=U.alternate,ue=U.stateNode;if(U=U.tag,Q!==null&&Q===v)break;U!==5&&U!==26&&U!==27||ue===null||(Q=ue,_?(ue=ud(d,O),ue!=null&&M.unshift(Fd(d,ue,Q))):_||(ue=ud(d,O),ue!=null&&M.push(Fd(d,ue,Q)))),d=d.return}M.length!==0&&o.push({event:l,listeners:M})}var rK=/\r\n?/g,aK=/\u0000|\uFFFD/g;function K2(o){return(typeof o=="string"?o:""+o).replace(rK,`
`).replace(aK,"")}function V2(o,l){return l=K2(l),K2(o)===l}function gt(o,l,d,v,_,O){switch(d){case"children":typeof v=="string"?l==="body"||l==="textarea"&&v===""||eu(o,v):(typeof v=="number"||typeof v=="bigint")&&l!=="body"&&eu(o,""+v);break;case"className":Jc(o,"class",v);break;case"tabIndex":Jc(o,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":Jc(o,d,v);break;case"style":VA(o,v,O);break;case"data":if(l!=="object"){Jc(o,"data",v);break}case"src":case"href":if(v===""&&(l!=="a"||d!=="href")){o.removeAttribute(d);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){o.removeAttribute(d);break}v=fp(""+v),o.setAttribute(d,v);break;case"action":case"formAction":if(typeof v=="function"){o.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof O=="function"&&(d==="formAction"?(l!=="input"&&gt(o,l,"name",_.name,_,null),gt(o,l,"formEncType",_.formEncType,_,null),gt(o,l,"formMethod",_.formMethod,_,null),gt(o,l,"formTarget",_.formTarget,_,null)):(gt(o,l,"encType",_.encType,_,null),gt(o,l,"method",_.method,_,null),gt(o,l,"target",_.target,_,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){o.removeAttribute(d);break}v=fp(""+v),o.setAttribute(d,v);break;case"onClick":v!=null&&(o.onclick=Fi);break;case"onScroll":v!=null&&Xe("scroll",o);break;case"onScrollEnd":v!=null&&Xe("scrollend",o);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(d=v.__html,d!=null){if(_.children!=null)throw Error(r(60));o.innerHTML=d}}break;case"multiple":o.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":o.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){o.removeAttribute("xlink:href");break}d=fp(""+v),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(d,""+v):o.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":v&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(d,""):o.removeAttribute(d);break;case"capture":case"download":v===!0?o.setAttribute(d,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?o.setAttribute(d,v):o.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?o.setAttribute(d,v):o.removeAttribute(d);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?o.removeAttribute(d):o.setAttribute(d,v);break;case"popover":Xe("beforetoggle",o),Xe("toggle",o),Zc(o,"popover",v);break;case"xlinkActuate":Aa(o,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":Aa(o,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":Aa(o,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":Aa(o,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":Aa(o,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":Aa(o,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":Aa(o,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":Aa(o,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":Aa(o,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":Zc(o,"is",v);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=M9.get(d)||d,Zc(o,d,v))}}function hw(o,l,d,v,_,O){switch(d){case"style":VA(o,v,O);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(d=v.__html,d!=null){if(_.children!=null)throw Error(r(60));o.innerHTML=d}}break;case"children":typeof v=="string"?eu(o,v):(typeof v=="number"||typeof v=="bigint")&&eu(o,""+v);break;case"onScroll":v!=null&&Xe("scroll",o);break;case"onScrollEnd":v!=null&&Xe("scrollend",o);break;case"onClick":v!=null&&(o.onclick=Fi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!op.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(_=d.endsWith("Capture"),l=d.slice(2,_?d.length-7:void 0),O=o[Zn]||null,O=O!=null?O[d]:null,typeof O=="function"&&o.removeEventListener(l,O,_),typeof v=="function")){typeof O!="function"&&O!==null&&(d in o?o[d]=null:o.hasAttribute(d)&&o.removeAttribute(d)),o.addEventListener(l,v,_);break e}d in o?o[d]=v:v===!0?o.setAttribute(d,""):Zc(o,d,v)}}}function qn(o,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Xe("error",o),Xe("load",o);var v=!1,_=!1,O;for(O in d)if(d.hasOwnProperty(O)){var M=d[O];if(M!=null)switch(O){case"src":v=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:gt(o,l,O,M,d,null)}}_&&gt(o,l,"srcSet",d.srcSet,d,null),v&&gt(o,l,"src",d.src,d,null);return;case"input":Xe("invalid",o);var U=O=M=_=null,Q=null,ue=null;for(v in d)if(d.hasOwnProperty(v)){var he=d[v];if(he!=null)switch(v){case"name":_=he;break;case"type":M=he;break;case"checked":Q=he;break;case"defaultChecked":ue=he;break;case"value":O=he;break;case"defaultValue":U=he;break;case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,l));break;default:gt(o,l,v,he,d,null)}}up(o,O,U,Q,ue,M,_,!1);return;case"select":Xe("invalid",o),v=M=O=null;for(_ in d)if(d.hasOwnProperty(_)&&(U=d[_],U!=null))switch(_){case"value":O=U;break;case"defaultValue":M=U;break;case"multiple":v=U;default:gt(o,l,_,U,d,null)}l=O,d=M,o.multiple=!!v,l!=null?Hi(o,!!v,l,!1):d!=null&&Hi(o,!!v,d,!0);return;case"textarea":Xe("invalid",o),O=_=v=null;for(M in d)if(d.hasOwnProperty(M)&&(U=d[M],U!=null))switch(M){case"value":v=U;break;case"defaultValue":_=U;break;case"children":O=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(91));break;default:gt(o,l,M,U,d,null)}qA(o,v,_,O);return;case"option":for(Q in d)if(d.hasOwnProperty(Q)&&(v=d[Q],v!=null))switch(Q){case"selected":o.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:gt(o,l,Q,v,d,null)}return;case"dialog":Xe("beforetoggle",o),Xe("toggle",o),Xe("cancel",o),Xe("close",o);break;case"iframe":case"object":Xe("load",o);break;case"video":case"audio":for(v=0;v<Hd.length;v++)Xe(Hd[v],o);break;case"image":Xe("error",o),Xe("load",o);break;case"details":Xe("toggle",o);break;case"embed":case"source":case"link":Xe("error",o),Xe("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 d)if(d.hasOwnProperty(ue)&&(v=d[ue],v!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:gt(o,l,ue,v,d,null)}return;default:if(Cb(l)){for(he in d)d.hasOwnProperty(he)&&(v=d[he],v!==void 0&&hw(o,l,he,v,d,void 0));return}}for(U in d)d.hasOwnProperty(U)&&(v=d[U],v!=null&&gt(o,l,U,v,d,null))}function iK(o,l,d,v){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,O=null,M=null,U=null,Q=null,ue=null,he=null;for(de in d){var ve=d[de];if(d.hasOwnProperty(de)&&ve!=null)switch(de){case"checked":break;case"value":break;case"defaultValue":Q=ve;default:v.hasOwnProperty(de)||gt(o,l,de,null,v,ve)}}for(var fe in v){var de=v[fe];if(ve=d[fe],v.hasOwnProperty(fe)&&(de!=null||ve!=null))switch(fe){case"type":O=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&&gt(o,l,fe,de,v,ve)}}wl(o,M,U,Q,ue,he,O,_);return;case"select":de=M=U=fe=null;for(O in d)if(Q=d[O],d.hasOwnProperty(O)&&Q!=null)switch(O){case"value":break;case"multiple":de=Q;default:v.hasOwnProperty(O)||gt(o,l,O,null,v,Q)}for(_ in v)if(O=v[_],Q=d[_],v.hasOwnProperty(_)&&(O!=null||Q!=null))switch(_){case"value":fe=O;break;case"defaultValue":U=O;break;case"multiple":M=O;default:O!==Q&&gt(o,l,_,O,v,Q)}l=U,d=M,v=de,fe!=null?Hi(o,!!d,fe,!1):!!v!=!!d&&(l!=null?Hi(o,!!d,l,!0):Hi(o,!!d,d?[]:"",!1));return;case"textarea":de=fe=null;for(U in d)if(_=d[U],d.hasOwnProperty(U)&&_!=null&&!v.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:gt(o,l,U,null,v,_)}for(M in v)if(_=v[M],O=d[M],v.hasOwnProperty(M)&&(_!=null||O!=null))switch(M){case"value":fe=_;break;case"defaultValue":de=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:_!==O&&gt(o,l,M,_,v,O)}FA(o,fe,de);return;case"option":for(var Oe in d)if(fe=d[Oe],d.hasOwnProperty(Oe)&&fe!=null&&!v.hasOwnProperty(Oe))switch(Oe){case"selected":o.selected=!1;break;default:gt(o,l,Oe,null,v,fe)}for(Q in v)if(fe=v[Q],de=d[Q],v.hasOwnProperty(Q)&&fe!==de&&(fe!=null||de!=null))switch(Q){case"selected":o.selected=fe&&typeof fe!="function"&&typeof fe!="symbol";break;default:gt(o,l,Q,fe,v,de)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Le in d)fe=d[Le],d.hasOwnProperty(Le)&&fe!=null&&!v.hasOwnProperty(Le)&&gt(o,l,Le,null,v,fe);for(ue in v)if(fe=v[ue],de=d[ue],v.hasOwnProperty(ue)&&fe!==de&&(fe!=null||de!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(r(137,l));break;default:gt(o,l,ue,fe,v,de)}return;default:if(Cb(l)){for(var yt in d)fe=d[yt],d.hasOwnProperty(yt)&&fe!==void 0&&!v.hasOwnProperty(yt)&&hw(o,l,yt,void 0,v,fe);for(he in v)fe=v[he],de=d[he],!v.hasOwnProperty(he)||fe===de||fe===void 0&&de===void 0||hw(o,l,he,fe,v,de);return}}for(var ae in d)fe=d[ae],d.hasOwnProperty(ae)&&fe!=null&&!v.hasOwnProperty(ae)&&gt(o,l,ae,null,v,fe);for(ve in v)fe=v[ve],de=d[ve],!v.hasOwnProperty(ve)||fe===de||fe==null&&de==null||gt(o,l,ve,fe,v,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 oK(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,d=performance.getEntriesByType("resource"),v=0;v<d.length;v++){var _=d[v],O=_.transferSize,M=_.initiatorType,U=_.duration;if(O&&U&&Y2(M)){for(M=0,U=_.responseEnd,v+=1;v<d.length;v++){var Q=d[v],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(--v,l+=8*(O+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 mw=null,pw=null;function ov(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 vw(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 gw=null;function sK(){var o=window.event;return o&&o.type==="popstate"?o===gw?!1:(gw=o,!0):(gw=null,!1)}var W2=typeof setTimeout=="function"?setTimeout:void 0,lK=typeof clearTimeout=="function"?clearTimeout:void 0,Q2=typeof Promise=="function"?Promise:void 0,cK=typeof queueMicrotask=="function"?queueMicrotask:typeof Q2<"u"?function(o){return Q2.resolve(null).then(o).catch(uK)}:W2;function uK(o){setTimeout(function(){throw o})}function vs(o){return o==="head"}function Z2(o,l){var d=l,v=0;do{var _=d.nextSibling;if(o.removeChild(d),_&&_.nodeType===8)if(d=_.data,d==="/$"||d==="/&"){if(v===0){o.removeChild(_),Pu(l);return}v--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")v++;else if(d==="html")qd(o.ownerDocument.documentElement);else if(d==="head"){d=o.ownerDocument.head,qd(d);for(var O=d.firstChild;O;){var M=O.nextSibling,U=O.nodeName;O[bl]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&O.rel.toLowerCase()==="stylesheet"||d.removeChild(O),O=M}}else d==="body"&&qd(o.ownerDocument.body);d=_}while(d);Pu(l)}function J2(o,l){var d=o;o=0;do{var v=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),v&&v.nodeType===8)if(d=v.data,d==="/$"){if(o===0)break;o--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||o++;d=v}while(d)}function yw(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":yw(d),sd(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}o.removeChild(d)}}function fK(o,l,d,v){for(;o.nodeType===1;){var _=d;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!v&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(v){if(!o[bl])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(O=o.getAttribute("rel"),O==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(O!==_.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(O=o.getAttribute("src"),(O!==(_.src==null?null:_.src)||o.getAttribute("type")!==(_.type==null?null:_.type)||o.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&O&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var O=_.name==null?null:""+_.name;if(_.type==="hidden"&&o.getAttribute("name")===O)return o}else return o;if(o=ca(o.nextSibling),o===null)break}return null}function dK(o,l,d){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!d||(o=ca(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=ca(o.nextSibling),o===null))return null;return o}function bw(o){return o.data==="$?"||o.data==="$~"}function xw(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function hK(o,l){var d=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||d.readyState!=="loading")l();else{var v=function(){l(),d.removeEventListener("DOMContentLoaded",v)};d.addEventListener("DOMContentLoaded",v),o._reactRetry=v}}function ca(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 ww=null;function tP(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="/$"||d==="/&"){if(l===0)return ca(o.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}o=o.nextSibling}return null}function nP(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var d=o.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return o;l--}else d!=="/$"&&d!=="/&"||l++}o=o.previousSibling}return null}function rP(o,l,d){switch(l=ov(d),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 qd(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);sd(o)}var ua=new Map,aP=new Set;function sv(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var io=H.d;H.d={f:mK,r:pK,D:vK,C:gK,L:yK,m:bK,X:wK,S:xK,M:SK};function mK(){var o=io.f(),l=Zp();return o||l}function pK(o){var l=Xo(o);l!==null&&l.tag===5&&l.type==="form"?wT(l):io.r(o)}var Au=typeof document>"u"?null:document;function iP(o,l,d){var v=Au;if(v&&typeof l=="string"&&l){var _=yr(l);_='link[rel="'+o+'"][href="'+_+'"]',typeof d=="string"&&(_+='[crossorigin="'+d+'"]'),aP.has(_)||(aP.add(_),o={rel:o,crossOrigin:d,href:l},v.querySelector(_)===null&&(l=v.createElement("link"),qn(l,"link",o),nn(l),v.head.appendChild(l)))}}function vK(o){io.D(o),iP("dns-prefetch",o,null)}function gK(o,l){io.C(o,l),iP("preconnect",o,l)}function yK(o,l,d){io.L(o,l,d);var v=Au;if(v&&o&&l){var _='link[rel="preload"][as="'+yr(l)+'"]';l==="image"&&d&&d.imageSrcSet?(_+='[imagesrcset="'+yr(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(_+='[imagesizes="'+yr(d.imageSizes)+'"]')):_+='[href="'+yr(o)+'"]';var O=_;switch(l){case"style":O=Nu(o);break;case"script":O=Tu(o)}ua.has(O)||(o=h({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:o,as:l},d),ua.set(O,o),v.querySelector(_)!==null||l==="style"&&v.querySelector(Kd(O))||l==="script"&&v.querySelector(Vd(O))||(l=v.createElement("link"),qn(l,"link",o),nn(l),v.head.appendChild(l)))}}function bK(o,l){io.m(o,l);var d=Au;if(d&&o){var v=l&&typeof l.as=="string"?l.as:"script",_='link[rel="modulepreload"][as="'+yr(v)+'"][href="'+yr(o)+'"]',O=_;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=Tu(o)}if(!ua.has(O)&&(o=h({rel:"modulepreload",href:o},l),ua.set(O,o),d.querySelector(_)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Vd(O)))return}v=d.createElement("link"),qn(v,"link",o),nn(v),d.head.appendChild(v)}}}function xK(o,l,d){io.S(o,l,d);var v=Au;if(v&&o){var _=Wo(v).hoistableStyles,O=Nu(o);l=l||"default";var M=_.get(O);if(!M){var U={loading:0,preload:null};if(M=v.querySelector(Kd(O)))U.loading=5;else{o=h({rel:"stylesheet",href:o,"data-precedence":l},d),(d=ua.get(O))&&Sw(o,d);var Q=M=v.createElement("link");nn(Q),qn(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,lv(M,l,v)}M={type:"stylesheet",instance:M,count:1,state:U},_.set(O,M)}}}function wK(o,l){io.X(o,l);var d=Au;if(d&&o){var v=Wo(d).hoistableScripts,_=Tu(o),O=v.get(_);O||(O=d.querySelector(Vd(_)),O||(o=h({src:o,async:!0},l),(l=ua.get(_))&&Ew(o,l),O=d.createElement("script"),nn(O),qn(O,"link",o),d.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},v.set(_,O))}}function SK(o,l){io.M(o,l);var d=Au;if(d&&o){var v=Wo(d).hoistableScripts,_=Tu(o),O=v.get(_);O||(O=d.querySelector(Vd(_)),O||(o=h({src:o,async:!0,type:"module"},l),(l=ua.get(_))&&Ew(o,l),O=d.createElement("script"),nn(O),qn(O,"link",o),d.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},v.set(_,O))}}function oP(o,l,d,v){var _=(_=se.current)?sv(_):null;if(!_)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Nu(d.href),d=Wo(_).hoistableStyles,v=d.get(l),v||(v={type:"style",instance:null,count:0,state:null},d.set(l,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){o=Nu(d.href);var O=Wo(_).hoistableStyles,M=O.get(o);if(M||(_=_.ownerDocument||_,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},O.set(o,M),(O=_.querySelector(Kd(o)))&&!O._p&&(M.instance=O,M.state.loading=5),ua.has(o)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},ua.set(o,d),O||EK(_,o,d,M.state))),l&&v===null)throw Error(r(528,""));return M}if(l&&v!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=Tu(d),d=Wo(_).hoistableScripts,v=d.get(l),v||(v={type:"script",instance:null,count:0,state:null},d.set(l,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Nu(o){return'href="'+yr(o)+'"'}function Kd(o){return'link[rel="stylesheet"]['+o+"]"}function sP(o){return h({},o,{"data-precedence":o.precedence,precedence:null})}function EK(o,l,d,v){o.querySelector('link[rel="preload"][as="style"]['+l+"]")?v.loading=1:(l=o.createElement("link"),v.preload=l,l.addEventListener("load",function(){return v.loading|=1}),l.addEventListener("error",function(){return v.loading|=2}),qn(l,"link",d),nn(l),o.head.appendChild(l))}function Tu(o){return'[src="'+yr(o)+'"]'}function Vd(o){return"script[async]"+o}function lP(o,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var v=o.querySelector('style[data-href~="'+yr(d.href)+'"]');if(v)return l.instance=v,nn(v),v;var _=h({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return v=(o.ownerDocument||o).createElement("style"),nn(v),qn(v,"style",_),lv(v,d.precedence,o),l.instance=v;case"stylesheet":_=Nu(d.href);var O=o.querySelector(Kd(_));if(O)return l.state.loading|=4,l.instance=O,nn(O),O;v=sP(d),(_=ua.get(_))&&Sw(v,_),O=(o.ownerDocument||o).createElement("link"),nn(O);var M=O;return M._p=new Promise(function(U,Q){M.onload=U,M.onerror=Q}),qn(O,"link",v),l.state.loading|=4,lv(O,d.precedence,o),l.instance=O;case"script":return O=Tu(d.src),(_=o.querySelector(Vd(O)))?(l.instance=_,nn(_),_):(v=d,(_=ua.get(O))&&(v=h({},d),Ew(v,_)),o=o.ownerDocument||o,_=o.createElement("script"),nn(_),qn(_,"link",v),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&&(v=l.instance,l.state.loading|=4,lv(v,d.precedence,o));return l.instance}function lv(o,l,d){for(var v=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=v.length?v[v.length-1]:null,O=_,M=0;M<v.length;M++){var U=v[M];if(U.dataset.precedence===l)O=U;else if(O!==_)break}O?O.parentNode.insertBefore(o,O.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(o,l.firstChild))}function Sw(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function Ew(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var cv=null;function cP(o,l,d){if(cv===null){var v=new Map,_=cv=new Map;_.set(d,v)}else _=cv,v=_.get(d),v||(v=new Map,_.set(d,v));if(v.has(o))return v;for(v.set(o,null),d=d.getElementsByTagName(o),_=0;_<d.length;_++){var O=d[_];if(!(O[bl]||O[vn]||o==="link"&&O.getAttribute("rel")==="stylesheet")&&O.namespaceURI!=="http://www.w3.org/2000/svg"){var M=O.getAttribute(l)||"";M=o+M;var U=v.get(M);U?U.push(O):v.set(M,[O])}}return v}function uP(o,l,d){o=o.ownerDocument||o,o.head.insertBefore(d,l==="title"?o.querySelector("head > title"):null)}function _K(o,l,d){if(d===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 OK(o,l,d,v){if(d.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var _=Nu(v.href),O=l.querySelector(Kd(_));if(O){l=O._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=uv.bind(o),l.then(o,o)),d.state.loading|=4,d.instance=O,nn(O);return}O=l.ownerDocument||l,v=sP(v),(_=ua.get(_))&&Sw(v,_),O=O.createElement("link"),nn(O);var M=O;M._p=new Promise(function(U,Q){M.onload=U,M.onerror=Q}),qn(O,"link",v),d.instance=O}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(o.count++,d=uv.bind(o),l.addEventListener("load",d),l.addEventListener("error",d))}}var _w=0;function jK(o,l){return o.stylesheets&&o.count===0&&dv(o,o.stylesheets),0<o.count||0<o.imgCount?function(d){var v=setTimeout(function(){if(o.stylesheets&&dv(o,o.stylesheets),o.unsuspend){var O=o.unsuspend;o.unsuspend=null,O()}},6e4+l);0<o.imgBytes&&_w===0&&(_w=62500*oK());var _=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&dv(o,o.stylesheets),o.unsuspend)){var O=o.unsuspend;o.unsuspend=null,O()}},(o.imgBytes>_w?50:800)+l);return o.unsuspend=d,function(){o.unsuspend=null,clearTimeout(v),clearTimeout(_)}}:null}function uv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dv(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var fv=null;function dv(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,fv=new Map,l.forEach(CK,o),fv=null,uv.call(o))}function CK(o,l){if(!(l.state.loading&4)){var d=fv.get(o);if(d)var v=d.get(null);else{d=new Map,fv.set(o,d);for(var _=o.querySelectorAll("link[data-precedence],style[data-precedence]"),O=0;O<_.length;O++){var M=_[O];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(d.set(M.dataset.precedence,M),v=M)}v&&d.set(null,v)}_=l.instance,M=_.getAttribute("data-precedence"),O=d.get(M)||v,O===v&&d.set(null,_),d.set(M,_),this.count++,v=uv.bind(this),_.addEventListener("load",v),_.addEventListener("error",v),O?O.parentNode.insertBefore(_,O.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(_,o.firstChild)),l.state.loading|=4}}var Yd={$$typeof:j,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function AK(o,l,d,v,_,O,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=ii(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ii(0),this.hiddenUpdates=ii(null),this.identifierPrefix=v,this.onUncaughtError=_,this.onCaughtError=O,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function dP(o,l,d,v,_,O,M,U,Q,ue,he,ve){return o=new AK(o,l,d,M,Q,ue,he,ve,U),l=1,O===!0&&(l|=24),O=Lr(3,null,null,l),o.current=O,O.stateNode=o,l=rx(),l.refCount++,o.pooledCache=l,l.refCount++,O.memoizedState={element:v,isDehydrated:d,cache:l},sx(O),o}function hP(o){return o?(o=su,o):su}function mP(o,l,d,v,_,O){_=hP(_),v.context===null?v.context=_:v.pendingContext=_,v=is(l),v.payload={element:d},O=O===void 0?null:O,O!==null&&(v.callback=O),d=os(o,v,l),d!==null&&(_r(d,o,l),Od(d,o,l))}function pP(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var d=o.retryLane;o.retryLane=d!==0&&d<l?d: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=Ol(o,67108864);l!==null&&_r(l,o,67108864),Ow(o,67108864)}}function gP(o){if(o.tag===13||o.tag===31){var l=Hr();l=Vo(l);var d=Ol(o,l);d!==null&&_r(d,o,l),Ow(o,l)}}var hv=!0;function NK(o,l,d,v){var _=R.T;R.T=null;var O=H.p;try{H.p=2,jw(o,l,d,v)}finally{H.p=O,R.T=_}}function TK(o,l,d,v){var _=R.T;R.T=null;var O=H.p;try{H.p=8,jw(o,l,d,v)}finally{H.p=O,R.T=_}}function jw(o,l,d,v){if(hv){var _=Cw(v);if(_===null)dw(o,l,v,mv,d),bP(o,v);else if(MK(_,o,l,d,v))v.stopPropagation();else if(bP(o,v),l&4&&-1<PK.indexOf(o)){for(;_!==null;){var O=Xo(_);if(O!==null)switch(O.tag){case 3:if(O=O.stateNode,O.current.memoizedState.isDehydrated){var M=na(O.pendingLanes);if(M!==0){var U=O;for(U.pendingLanes|=2,U.entangledLanes|=2;M;){var Q=1<<31-Nn(M);U.entanglements[1]|=Q,M&=~Q}ui(O),(ft&6)===0&&(Wp=pn()+500,Ud(0))}}break;case 31:case 13:U=Ol(O,2),U!==null&&_r(U,O,2),Zp(),Ow(O,2)}if(O=Cw(v),O===null&&dw(o,l,v,mv,d),O===_)break;_=O}_!==null&&v.stopPropagation()}else dw(o,l,v,null,d)}}function Cw(o){return o=Nb(o),Aw(o)}var mv=null;function Aw(o){if(mv=null,o=Yo(o),o!==null){var l=i(o);if(l===null)o=null;else{var d=l.tag;if(d===13){if(o=s(l),o!==null)return o;o=null}else if(d===31){if(o=c(l),o!==null)return o;o=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return mv=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(Fo()){case vr:return 2;case ni:return 8;case ri:case gl:return 32;case Rr:return 268435456;default:return 32}default:return 32}}var Nw=!1,gs=null,ys=null,bs=null,Xd=new Map,Gd=new Map,xs=[],PK="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":gs=null;break;case"dragenter":case"dragleave":ys=null;break;case"mouseover":case"mouseout":bs=null;break;case"pointerover":case"pointerout":Xd.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gd.delete(l.pointerId)}}function Wd(o,l,d,v,_,O){return o===null||o.nativeEvent!==O?(o={blockedOn:l,domEventName:d,eventSystemFlags:v,nativeEvent:O,targetContainers:[_]},l!==null&&(l=Xo(l),l!==null&&vP(l)),o):(o.eventSystemFlags|=v,l=o.targetContainers,_!==null&&l.indexOf(_)===-1&&l.push(_),o)}function MK(o,l,d,v,_){switch(l){case"focusin":return gs=Wd(gs,o,l,d,v,_),!0;case"dragenter":return ys=Wd(ys,o,l,d,v,_),!0;case"mouseover":return bs=Wd(bs,o,l,d,v,_),!0;case"pointerover":var O=_.pointerId;return Xd.set(O,Wd(Xd.get(O)||null,o,l,d,v,_)),!0;case"gotpointercapture":return O=_.pointerId,Gd.set(O,Wd(Gd.get(O)||null,o,l,d,v,_)),!0}return!1}function xP(o){var l=Yo(o.target);if(l!==null){var d=i(l);if(d!==null){if(l=d.tag,l===13){if(l=s(d),l!==null){o.blockedOn=l,np(o.priority,function(){gP(d)});return}}else if(l===31){if(l=c(d),l!==null){o.blockedOn=l,np(o.priority,function(){gP(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){o.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}o.blockedOn=null}function pv(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var d=Cw(o.nativeEvent);if(d===null){d=o.nativeEvent;var v=new d.constructor(d.type,d);Ab=v,d.target.dispatchEvent(v),Ab=null}else return l=Xo(d),l!==null&&vP(l),o.blockedOn=d,!1;l.shift()}return!0}function wP(o,l,d){pv(o)&&d.delete(l)}function RK(){Nw=!1,gs!==null&&pv(gs)&&(gs=null),ys!==null&&pv(ys)&&(ys=null),bs!==null&&pv(bs)&&(bs=null),Xd.forEach(wP),Gd.forEach(wP)}function vv(o,l){o.blockedOn===l&&(o.blockedOn=null,Nw||(Nw=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,RK)))}var gv=null;function SP(o){gv!==o&&(gv=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){gv===o&&(gv=null);for(var l=0;l<o.length;l+=3){var d=o[l],v=o[l+1],_=o[l+2];if(typeof v!="function"){if(Aw(v||d)===null)continue;break}var O=Xo(d);O!==null&&(o.splice(l,3),l-=3,Cx(O,{pending:!0,data:_,method:d.method,action:v},v,_))}}))}function Pu(o){function l(Q){return vv(Q,o)}gs!==null&&vv(gs,o),ys!==null&&vv(ys,o),bs!==null&&vv(bs,o),Xd.forEach(l),Gd.forEach(l);for(var d=0;d<xs.length;d++){var v=xs[d];v.blockedOn===o&&(v.blockedOn=null)}for(;0<xs.length&&(d=xs[0],d.blockedOn===null);)xP(d),d.blockedOn===null&&xs.shift();if(d=(o.ownerDocument||o).$$reactFormReplay,d!=null)for(v=0;v<d.length;v+=3){var _=d[v],O=d[v+1],M=_[Zn]||null;if(typeof O=="function")M||SP(d);else if(M){var U=null;if(O&&O.hasAttribute("formAction")){if(_=O,M=O[Zn]||null)U=M.formAction;else if(Aw(_)!==null)continue}else U=M.action;typeof U=="function"?d[v+1]=U:(d.splice(v,3),v-=3),SP(d)}}}function EP(){function o(O){O.canIntercept&&O.info==="react-transition"&&O.intercept({handler:function(){return new Promise(function(M){return _=M})},focusReset:"manual",scroll:"manual"})}function l(){_!==null&&(_(),_=null),v||setTimeout(d,20)}function d(){if(!v&&!navigation.transition){var O=navigation.currentEntry;O&&O.url!=null&&navigation.navigate(O.url,{state:O.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,_=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){v=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),_!==null&&(_(),_=null)}}}function Tw(o){this._internalRoot=o}yv.prototype.render=Tw.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,v=Hr();mP(d,v,o,l,null,null)},yv.prototype.unmount=Tw.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),Zp(),l[Bi]=null}};function yv(o){this._internalRoot=o}yv.prototype.unstable_scheduleHydration=function(o){if(o){var l=od();o={blockedOn:null,target:o,priority:l};for(var d=0;d<xs.length&&l!==0&&l<xs[d].priority;d++);xs.splice(d,0,o),d===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 kK={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bv.isDisabled&&bv.supportsFiber)try{Li=bv.inject(kK),Bn=bv}catch{}}return Zd.createRoot=function(o,l){if(!a(o))throw Error(r(299));var d=!1,v="",_=PT,O=MT,M=RT;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onUncaughtError!==void 0&&(_=l.onUncaughtError),l.onCaughtError!==void 0&&(O=l.onCaughtError),l.onRecoverableError!==void 0&&(M=l.onRecoverableError)),l=dP(o,1,!1,null,null,d,v,null,_,O,M,EP),o[Bi]=l.current,fw(o),new Tw(l)},Zd.hydrateRoot=function(o,l,d){if(!a(o))throw Error(r(299));var v=!1,_="",O=PT,M=MT,U=RT,Q=null;return d!=null&&(d.unstable_strictMode===!0&&(v=!0),d.identifierPrefix!==void 0&&(_=d.identifierPrefix),d.onUncaughtError!==void 0&&(O=d.onUncaughtError),d.onCaughtError!==void 0&&(M=d.onCaughtError),d.onRecoverableError!==void 0&&(U=d.onRecoverableError),d.formState!==void 0&&(Q=d.formState)),l=dP(o,1,!0,l,d??null,v,_,Q,O,M,U,EP),l.context=hP(null),d=l.current,v=Hr(),v=Vo(v),_=is(v),_.callback=null,os(d,_,v),d=v,l.current.lanes=d,Ct(l,d),ui(l),o[Bi]=l.current,fw(o),new yv(l)},Zd.version="19.2.4",Zd}var DP;function VK(){if(DP)return Dw.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(),Dw.exports=KK(),Dw.exports}var YK=VK();/**
 * 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 XK(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 GS("",{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:Nh(a)}return WK(t,n,null,e)}function Bt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ka(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function GK(){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 GS(e,t,n=null,r,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Bf(t):t,state:n,key:t&&t.key||r||GK(),unstable_mask:a}}function Nh({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 Bf(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 WK(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 h(){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:GS(x.location,S,E);f=m()+1;let j=zP(C,f),A=x.createHref(C.unstable_mask||C);try{s.pushState(j,"",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 y(S,E){c="REPLACE";let C=LP(S)?S:GS(x.location,S,E);f=m();let j=zP(C,f),A=x.createHref(C.unstable_mask||C);s.replaceState(j,"",A),i&&u&&u({action:c,location:x.location,delta:0})}function w(S){return QK(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,h),u=S,()=>{a.removeEventListener(IP,h),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:y,go(S){return s.go(S)}};return x}function QK(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Bt(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:Nh(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function iz(e,t,n="/"){return ZK(e,t,n,!1)}function ZK(e,t,n,r){let a=typeof t=="string"?Bf(t):t,i=Eo(a.pathname||"/",n);if(i==null)return null;let s=oz(e);JK(s);let c=null;for(let u=0;c==null&&u<s.length;++u){let f=uV(i);c=lV(s[u],f,r)}return c}function oz(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;Bt(m.relativePath.startsWith(r),`Absolute route path "${m.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(r.length)}let h=_i([r,m.relativePath]),p=n.concat(m);s.children&&s.children.length>0&&(Bt(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${h}".`),oz(s.children,t,p,h,u)),!(s.path==null&&!s.index)&&t.push({path:h,score:oV(h,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 sz(s.path))i(s,c,!0,f)}),t}function sz(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=sz(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 JK(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sV(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var eV=/^:[\w-]+$/,tV=3,nV=2,rV=1,aV=10,iV=-2,$P=e=>e==="*";function oV(e,t){let n=e.split("/"),r=n.length;return n.some($P)&&(r+=iV),t&&(r+=nV),n.filter(a=>!$P(a)).reduce((a,i)=>a+(eV.test(i)?tV:i===""?rV:aV),r)}function sV(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 lV(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)||"/",h=wg({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},m),p=u.route;if(!h&&f&&n&&!r[r.length-1].route.index&&(h=wg({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},m)),!h)return null;Object.assign(a,h.params),s.push({params:a,pathname:_i([i,h.pathname]),pathnameBase:mV(_i([i,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(i=_i([i,h.pathnameBase]))}return s}function wg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=cV(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:h},p)=>{if(m==="*"){let w=c[p]||"";s=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const y=c[p];return h&&!y?f[m]=void 0:f[m]=(y||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:s,pattern:e}}function cV(e,t=!1,n=!0){Ka(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 h=m.charAt(f+s.length);return h&&h!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function uV(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ka(!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 Eo(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 fV=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function dV(e,t="/"){let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Bf(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:pV(r),hash:vV(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 $w(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 hV(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function lz(e){let t=hV(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function tO(e,t,n,r=!1){let a;typeof e=="string"?a=Bf(e):(a={...e},Bt(!a.pathname||!a.pathname.includes("?"),$w("?","pathname","search",a)),Bt(!a.pathname||!a.pathname.includes("#"),$w("#","pathname","hash",a)),Bt(!a.search||!a.search.includes("#"),$w("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,c;if(s==null)c=n;else{let h=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),h-=1;a.pathname=p.join("/")}c=h>=0?t[h]:"/"}let u=dV(a,c),f=s&&s!=="/"&&s.endsWith("/"),m=(i||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(f||m)&&(u.pathname+="/"),u}var _i=e=>e.join("/").replace(/\/\/+/g,"/"),mV=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),pV=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vV=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,gV=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 yV(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bV(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var cz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function uz(e,t){let n=e;if(typeof n!="string"||!fV.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(cz)try{let i=new URL(window.location.href),s=n.startsWith("//")?new URL(i.protocol+n):new URL(n),c=Eo(s.pathname,t);s.origin===i.origin&&c!=null?n=c+s.search+s.hash:a=!0}catch{Ka(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var fz=["POST","PUT","PATCH","DELETE"];new Set(fz);var xV=["GET",...fz];new Set(xV);var Uf=b.createContext(null);Uf.displayName="DataRouter";var qy=b.createContext(null);qy.displayName="DataRouterState";var wV=b.createContext(!1),dz=b.createContext({isTransitioning:!1});dz.displayName="ViewTransition";var SV=b.createContext(new Map);SV.displayName="Fetchers";var EV=b.createContext(null);EV.displayName="Await";var _a=b.createContext(null);_a.displayName="Navigation";var pm=b.createContext(null);pm.displayName="Location";var Qa=b.createContext({outlet:null,matches:[],isDataRoute:!1});Qa.displayName="Route";var nO=b.createContext(null);nO.displayName="RouteError";var hz="REACT_ROUTER_ERROR",_V="REDIRECT",OV="ROUTE_ERROR_RESPONSE";function jV(e){if(e.startsWith(`${hz}:${_V}:{`))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 CV(e){if(e.startsWith(`${hz}:${OV}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new gV(t.status,t.statusText,t.data)}catch{}}function AV(e,{relative:t}={}){Bt(vm(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=b.useContext(_a),{hash:a,pathname:i,search:s}=gm(e,{relative:t}),c=i;return n!=="/"&&(c=i==="/"?n:_i([n,i])),r.createHref({pathname:c,search:s,hash:a})}function vm(){return b.useContext(pm)!=null}function Ri(){return Bt(vm(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(pm).location}var mz="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function pz(e){b.useContext(_a).static||b.useLayoutEffect(e)}function Hf(){let{isDataRoute:e}=b.useContext(Qa);return e?FV():NV()}function NV(){Bt(vm(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(Uf),{basename:t,navigator:n}=b.useContext(_a),{matches:r}=b.useContext(Qa),{pathname:a}=Ri(),i=JSON.stringify(lz(r)),s=b.useRef(!1);return pz(()=>{s.current=!0}),b.useCallback((u,f={})=>{if(Ka(s.current,mz),!s.current)return;if(typeof u=="number"){n.go(u);return}let m=tO(u,JSON.parse(i),a,f.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:_i([t,m.pathname])),(f.replace?n.replace:n.push)(m,f.state,f)},[t,n,i,a,e])}var TV=b.createContext(null);function PV(e){let t=b.useContext(Qa).outlet;return b.useMemo(()=>t&&b.createElement(TV.Provider,{value:e},t),[t,e])}function rO(){let{matches:e}=b.useContext(Qa),t=e[e.length-1];return t?t.params:{}}function gm(e,{relative:t}={}){let{matches:n}=b.useContext(Qa),{pathname:r}=Ri(),a=JSON.stringify(lz(n));return b.useMemo(()=>tO(e,JSON.parse(a),r,t==="path"),[e,a,r,t])}function MV(e,t){return vz(e,t)}function vz(e,t,n){var S;Bt(vm(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=b.useContext(_a),{matches:a}=b.useContext(Qa),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||"";yz(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=Ri(),h;if(t){let E=typeof t=="string"?Bf(t):t;Bt(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.`),h=E}else h=m;let p=h.pathname||"/",y=p;if(u!=="/"){let E=u.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(E.length).join("/")}let w=iz(e,{pathname:y});Ka(f||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),Ka(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 "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=LV(w&&w.map(E=>Object.assign({},E,{params:Object.assign({},s,E.params),pathname:_i([u,r.encodeLocation?r.encodeLocation(E.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?u:_i([u,r.encodeLocation?r.encodeLocation(E.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:E.pathnameBase])})),a,n);return t&&x?b.createElement(pm.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...h},navigationType:"POP"}},x):x}function RV(){let e=HV(),t=yV(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=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:i},"ErrorBoundary")," or"," ",b.createElement("code",{style:i},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:a},n):null,s)}var kV=b.createElement(RV,null),gz=class extends b.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=CV(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(Qa.Provider,{value:this.props.routeContext},b.createElement(nO.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(DV,{error:e},t):t}};gz.contextType=wV;var Bw=new WeakMap;function DV({children:e,error:t}){let{basename:n}=b.useContext(_a);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let r=jV(t.digest);if(r){let a=Bw.get(t);if(a)throw a;let i=uz(r.location,n);if(cz&&!Bw.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 Bw.set(t,s),s}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${i.absoluteURL||i.to}`})}}return e}function IV({routeContext:e,match:t,children:n}){let r=b.useContext(Uf);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(Qa.Provider,{value:e},n)}function LV(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(h=>h.route.id&&(i==null?void 0:i[h.route.id])!==void 0);Bt(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 h=a[m];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(c=m),h.route.id){let{loaderData:p,errors:y}=r,w=h.route.loader&&!p.hasOwnProperty(h.route.id)&&(!y||y[h.route.id]===void 0);if(h.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,h)=>{var p,y;u(m,{location:r.location,params:((y=(p=r.matches)==null?void 0:p[0])==null?void 0:y.params)??{},unstable_pattern:bV(r.matches),errorInfo:h})}:void 0;return a.reduceRight((m,h,p)=>{let y,w=!1,x=null,S=null;r&&(y=i&&h.route.id?i[h.route.id]:void 0,x=h.route.errorElement||kV,s&&(c<0&&p===0?(yz("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),w=!0,S=null):c===p&&(w=!0,S=h.route.hydrateFallbackElement||null)));let E=t.concat(a.slice(0,p+1)),C=()=>{let j;return y?j=x:w?j=S:h.route.Component?j=b.createElement(h.route.Component,null):h.route.element?j=h.route.element:j=m,b.createElement(IV,{match:h,routeContext:{outlet:m,matches:E,isDataRoute:r!=null},children:j})};return r&&(h.route.ErrorBoundary||h.route.errorElement||p===0)?b.createElement(gz,{location:r.location,revalidation:r.revalidation,component:x,error:y,children:C(),routeContext:{outlet:null,matches:E,isDataRoute:!0},onError:f}):C()},null)}function aO(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function zV(e){let t=b.useContext(Uf);return Bt(t,aO(e)),t}function $V(e){let t=b.useContext(qy);return Bt(t,aO(e)),t}function BV(e){let t=b.useContext(Qa);return Bt(t,aO(e)),t}function iO(e){let t=BV(e),n=t.matches[t.matches.length-1];return Bt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function UV(){return iO("useRouteId")}function HV(){var r;let e=b.useContext(nO),t=$V("useRouteError"),n=iO("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function FV(){let{router:e}=zV("useNavigate"),t=iO("useNavigate"),n=b.useRef(!1);return pz(()=>{n.current=!0}),b.useCallback(async(a,i={})=>{Ka(n.current,mz),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}var UP={};function yz(e,t,n){!t&&!UP[e]&&(UP[e]=!0,Ka(!1,n))}b.memo(qV);function qV({routes:e,future:t,state:n,isStatic:r,onError:a}){return vz(e,void 0,{state:n,isStatic:r,onError:a})}function KV(e){return PV(e.context)}function pi(e){Bt(!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 VV({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,unstable_useTransitions:s}){Bt(!vm(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:c,navigator:a,static:i,unstable_useTransitions:s,future:{}}),[c,a,i,s]);typeof n=="string"&&(n=Bf(n));let{pathname:f="/",search:m="",hash:h="",state:p=null,key:y="default",unstable_mask:w}=n,x=b.useMemo(()=>{let S=Eo(f,c);return S==null?null:{location:{pathname:S,search:m,hash:h,state:p,key:y,unstable_mask:w},navigationType:r}},[c,f,m,h,p,y,r,w]);return Ka(x!=null,`<Router basename="${c}"> is not able to match the URL "${f}${m}${h}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:b.createElement(_a.Provider,{value:u},b.createElement(pm.Provider,{children:t,value:x}))}function YV({children:e,location:t}){return MV(WS(e),t)}function WS(e,t=[]){let n=[];return b.Children.forEach(e,(r,a)=>{if(!b.isValidElement(r))return;let i=[...t,a];if(r.type===b.Fragment){n.push.apply(n,WS(r.props.children,i));return}Bt(r.type===pi,`[${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>`),Bt(!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=WS(r.props.children,i)),n.push(s)}),n}var ng="get",rg="application/x-www-form-urlencoded";function Ky(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function XV(e){return Ky(e)&&e.tagName.toLowerCase()==="button"}function GV(e){return Ky(e)&&e.tagName.toLowerCase()==="form"}function WV(e){return Ky(e)&&e.tagName.toLowerCase()==="input"}function QV(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ZV(e,t){return e.button===0&&(!t||t==="_self")&&!QV(e)}function QS(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 JV(e,t){let n=QS(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}var wv=null;function eY(){if(wv===null)try{new FormData(document.createElement("form"),0),wv=!1}catch{wv=!0}return wv}var tY=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Uw(e){return e!=null&&!tY.has(e)?(Ka(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${rg}"`),null):e}function nY(e,t){let n,r,a,i,s;if(GV(e)){let c=e.getAttribute("action");r=c?Eo(c,t):null,n=e.getAttribute("method")||ng,a=Uw(e.getAttribute("enctype"))||rg,i=new FormData(e)}else if(XV(e)||WV(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?Eo(u,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||ng,a=Uw(e.getAttribute("formenctype"))||Uw(c.getAttribute("enctype"))||rg,i=new FormData(c,e),!eY()){let{name:f,type:m,value:h}=e;if(m==="image"){let p=f?`${f}.`:"";i.append(`${p}x`,"0"),i.append(`${p}y`,"0")}else f&&i.append(f,h)}}else{if(Ky(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ng,r=null,a=rg,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 oO(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function rY(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&&Eo(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}async function aY(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 iY(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 oY(e,t,n){let r=await Promise.all(e.map(async a=>{let i=t.routes[a.route.id];if(i){let s=await aY(i,n);return s.links?s.links():[]}return[]}));return uY(r.flat(1).filter(iY).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 h;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:((h=n[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function sY(e,t,{includeHydrateFallback:n}={}){return lY(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 lY(e){return[...new Set(e)]}function cY(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function uY(e,t){let n=new Set;return new Set(t),e.reduce((r,a)=>{let i=JSON.stringify(cY(a));return n.has(i)||(n.add(i),r.push({key:i,link:a})),r},[])}function bz(){let e=b.useContext(Uf);return oO(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function fY(){let e=b.useContext(qy);return oO(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var sO=b.createContext(void 0);sO.displayName="FrameworkContext";function xz(){let e=b.useContext(sO);return oO(e,"You must render this element inside a <HydratedRouter> element"),e}function dY(e,t){let n=b.useContext(sO),[r,a]=b.useState(!1),[i,s]=b.useState(!1),{onFocus:c,onBlur:u,onMouseEnter:f,onMouseLeave:m,onTouchStart:h}=t,p=b.useRef(null);b.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]),b.useEffect(()=>{if(r){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[r]);let y=()=>{a(!0)},w=()=>{a(!1),s(!1)};return n?e!=="intent"?[i,p,{}]:[i,p,{onFocus:Jd(c,y),onBlur:Jd(u,w),onMouseEnter:Jd(f,y),onMouseLeave:Jd(m,w),onTouchStart:Jd(h,y)}]:[!1,p,{}]}function Jd(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function hY({page:e,...t}){let{router:n}=bz(),r=b.useMemo(()=>iz(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?b.createElement(pY,{page:e,matches:r,...t}):null}function mY(e){let{manifest:t,routeModules:n}=xz(),[r,a]=b.useState([]);return b.useEffect(()=>{let i=!1;return oY(e,t,n).then(s=>{i||a(s)}),()=>{i=!0}},[e,t,n]),r}function pY({page:e,matches:t,...n}){let r=Ri(),{future:a,manifest:i,routeModules:s}=xz(),{basename:c}=bz(),{loaderData:u,matches:f}=fY(),m=b.useMemo(()=>HP(e,t,f,i,r,"data"),[e,t,f,i,r]),h=b.useMemo(()=>HP(e,t,f,i,r,"assets"),[e,t,f,i,r]),p=b.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let x=new Set,S=!1;if(t.forEach(C=>{var A;let j=i.routes[C.route.id];!j||!j.hasLoader||(!m.some(T=>T.route.id===C.route.id)&&C.route.id in u&&((A=s[C.route.id])!=null&&A.shouldRevalidate)||j.hasClientLoader?S=!0:x.add(C.route.id))}),x.size===0)return[];let E=rY(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]),y=b.useMemo(()=>sY(h,i),[h,i]),w=mY(h);return b.createElement(b.Fragment,null,p.map(x=>b.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),y.map(x=>b.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),w.map(({key:x,link:S})=>b.createElement("link",{key:x,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function vY(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var gY=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gY&&(window.__reactRouterVersion="7.13.1")}catch{}function yY({basename:e,children:t,unstable_useTransitions:n,window:r}){let a=b.useRef();a.current==null&&(a.current=XK({window:r,v5Compat:!0}));let i=a.current,[s,c]=b.useState({action:i.action,location:i.location}),u=b.useCallback(f=>{n===!1?c(f):b.startTransition(()=>c(f))},[n]);return b.useLayoutEffect(()=>i.listen(u),[i,u]),b.createElement(VV,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,unstable_useTransitions:n})}var wz=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Va=b.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:h,viewTransition:p,unstable_defaultShouldRevalidate:y,...w},x){let{basename:S,navigator:E,unstable_useTransitions:C}=b.useContext(_a),j=typeof m=="string"&&wz.test(m),A=uz(m,S);m=A.to;let T=AV(m,{relative:a}),N=Ri(),P=null;if(c){let Y=tO(c,[],N.unstable_mask?N.unstable_mask.pathname:"/",!0);S!=="/"&&(Y.pathname=Y.pathname==="/"?S:_i([S,Y.pathname])),P=E.createHref(Y)}let[k,D,K]=dY(r,w),B=wY(m,{replace:s,unstable_mask:c,state:u,target:f,preventScrollReset:h,relative:a,viewTransition:p,unstable_defaultShouldRevalidate:y,unstable_useTransitions:C});function L(Y){t&&t(Y),Y.defaultPrevented||B(Y)}let W=!(A.isExternal||i),$=b.createElement("a",{...w,...K,href:(W?P:void 0)||A.absoluteURL||T,onClick:W?L:t,ref:vY(x,D),target:f,"data-discover":!j&&n==="render"?"true":void 0});return k&&!j?b.createElement(b.Fragment,null,$,b.createElement(hY,{page:T})):$});Va.displayName="Link";var ZS=b.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 h=gm(s,{relative:f.relative}),p=Ri(),y=b.useContext(qy),{navigator:w,basename:x}=b.useContext(_a),S=y!=null&&CY(h)&&c===!0,E=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,C=p.pathname,j=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;n||(C=C.toLowerCase(),j=j?j.toLowerCase():null,E=E.toLowerCase()),j&&x&&(j=Eo(j,x)||j);const A=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let T=C===E||!a&&C.startsWith(E)&&C.charAt(A)==="/",N=j!=null&&(j===E||!a&&j.startsWith(E)&&j.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 b.createElement(Va,{...f,"aria-current":k,className:D,ref:m,style:K,to:s,viewTransition:c},typeof u=="function"?u(P):u)});ZS.displayName="NavLink";var bY=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:s=ng,action:c,onSubmit:u,relative:f,preventScrollReset:m,viewTransition:h,unstable_defaultShouldRevalidate:p,...y},w)=>{let{unstable_useTransitions:x}=b.useContext(_a),S=OY(),E=jY(c,{relative:f}),C=s.toLowerCase()==="get"?"get":"post",j=typeof c=="string"&&wz.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:h,unstable_defaultShouldRevalidate:p});x&&n!==!1?b.startTransition(()=>k()):k()};return b.createElement("form",{ref:w,method:C,action:E,onSubmit:r?u:A,...y,"data-discover":!j&&e==="render"?"true":void 0})});bY.displayName="Form";function xY(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Sz(e){let t=b.useContext(Uf);return Bt(t,xY(e)),t}function wY(e,{target:t,replace:n,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:u,unstable_useTransitions:f}={}){let m=Hf(),h=Ri(),p=gm(e,{relative:s});return b.useCallback(y=>{if(ZV(y,t)){y.preventDefault();let w=n!==void 0?n:Nh(h)===Nh(p),x=()=>m(e,{replace:w,unstable_mask:r,state:a,preventScrollReset:i,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:u});f?b.startTransition(()=>x()):x()}},[h,m,p,n,r,a,t,e,i,s,c,u,f])}function SY(e){Ka(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=b.useRef(QS(e)),n=b.useRef(!1),r=Ri(),a=b.useMemo(()=>JV(r.search,n.current?null:t.current),[r.search]),i=Hf(),s=b.useCallback((c,u)=>{const f=QS(typeof c=="function"?c(new URLSearchParams(a)):c);n.current=!0,i("?"+f,u)},[i,a]);return[a,s]}var EY=0,_Y=()=>`__${String(++EY)}__`;function OY(){let{router:e}=Sz("useSubmit"),{basename:t}=b.useContext(_a),n=UV(),r=e.fetch,a=e.navigate;return b.useCallback(async(i,s={})=>{let{action:c,method:u,encType:f,formData:m,body:h}=nY(i,t);if(s.navigate===!1){let p=s.fetcherKey||_Y();await r(p,n,s.action||c,{unstable_defaultShouldRevalidate:s.unstable_defaultShouldRevalidate,preventScrollReset:s.preventScrollReset,formData:m,body:h,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:h,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 jY(e,{relative:t}={}){let{basename:n}=b.useContext(_a),r=b.useContext(Qa);Bt(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...gm(e||".",{relative:t})},s=Ri();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(h=>h).forEach(h=>c.append("index",h));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:_i([n,i.pathname])),Nh(i)}function CY(e,{relative:t}={}){let n=b.useContext(dz);Bt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Sz("useViewTransitionState"),a=gm(e,{relative:t});if(!n.isTransitioning)return!1;let i=Eo(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Eo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return wg(a.pathname,s)!=null||wg(a.pathname,i)!=null}var cl=az();const Ez=Wa(cl);var kc=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(){}},AY={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ks,J_,V3,NY=(V3=class{constructor(){Se(this,ks,AY);Se(this,J_,!1)}setTimeoutProvider(e){be(this,ks,e)}setTimeout(e,t){return G(this,ks).setTimeout(e,t)}clearTimeout(e){G(this,ks).clearTimeout(e)}setInterval(e,t){return G(this,ks).setInterval(e,t)}clearInterval(e){G(this,ks).clearInterval(e)}},ks=new WeakMap,J_=new WeakMap,V3),Gl=new NY;function TY(e){setTimeout(e,0)}var hc=typeof window>"u"||"Deno"in globalThis;function nr(){}function PY(e,t){return typeof e=="function"?e(t):e}function JS(e){return typeof e=="number"&&e>=0&&e!==1/0}function _z(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ks(e,t){return typeof e=="function"?e(t):e}function ba(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!==lO(s,t.options))return!1}else if(!Th(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(mc(t.options.mutationKey)!==mc(i))return!1}else if(!Th(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function lO(e,t){return((t==null?void 0:t.queryKeyHashFn)||mc)(e)}function mc(e){return JSON.stringify(e,(t,n)=>eE(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Th(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Th(e[n],t[n])):!1}var MY=Object.prototype.hasOwnProperty;function cO(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=KP(e)&&KP(t);if(!r&&!(eE(e)&&eE(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 h=r?m:s[m],p=e[h],y=t[h];if(p===y){u[h]=p,(r?m<i:MY.call(e,h))&&f++;continue}if(p===null||y===null||typeof p!="object"||typeof y!="object"){u[h]=y;continue}const w=cO(p,y,n+1);u[h]=w,w===p&&f++}return i===c&&f===i?e:u}function Ph(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 eE(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 RY(e){return new Promise(t=>{Gl.setTimeout(t,e)})}function tE(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?cO(e,t):t}function kY(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function DY(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var uO=Symbol();function Oz(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===uO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function fO(e,t){return typeof e=="function"?e(...t):!!e}function IY(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,Ds,af,Y3,LY=(Y3=class extends kc{constructor(){super();Se(this,ec);Se(this,Ds);Se(this,af);be(this,af,t=>{if(!hc&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){G(this,Ds)||this.setEventListener(G(this,af))}onUnsubscribe(){var t;this.hasListeners()||((t=G(this,Ds))==null||t.call(this),be(this,Ds,void 0))}setEventListener(t){var n;be(this,af,t),(n=G(this,Ds))==null||n.call(this),be(this,Ds,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){G(this,ec)!==t&&(be(this,ec,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof G(this,ec)=="boolean"?G(this,ec):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ec=new WeakMap,Ds=new WeakMap,af=new WeakMap,Y3),dO=new LY;function nE(){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 zY=TY;function $Y(){let e=[],t=0,n=c=>{c()},r=c=>{c()},a=zY;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 Yt=$Y(),of,Is,sf,X3,BY=(X3=class extends kc{constructor(){super();Se(this,of,!0);Se(this,Is);Se(this,sf);be(this,sf,t=>{if(!hc&&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(){G(this,Is)||this.setEventListener(G(this,sf))}onUnsubscribe(){var t;this.hasListeners()||((t=G(this,Is))==null||t.call(this),be(this,Is,void 0))}setEventListener(t){var n;be(this,sf,t),(n=G(this,Is))==null||n.call(this),be(this,Is,t(this.setOnline.bind(this)))}setOnline(t){G(this,of)!==t&&(be(this,of,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return G(this,of)}},of=new WeakMap,Is=new WeakMap,sf=new WeakMap,X3),Sg=new BY;function UY(e){return Math.min(1e3*2**e,3e4)}function jz(e){return(e??"online")==="online"?Sg.isOnline():!0}var rE=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Cz(e){let t=!1,n=0,r;const a=nE(),i=()=>a.status!=="pending",s=x=>{var S;if(!i()){const E=new rE(x);p(E),(S=e.onCancel)==null||S.call(e,E)}},c=()=>{t=!0},u=()=>{t=!1},f=()=>dO.isFocused()&&(e.networkMode==="always"||Sg.isOnline())&&e.canRun(),m=()=>jz(e.networkMode)&&e.canRun(),h=x=>{i()||(r==null||r(),a.resolve(x))},p=x=>{i()||(r==null||r(),a.reject(x))},y=()=>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(h).catch(E=>{var N;if(i())return;const C=e.retry??(hc?0:3),j=e.retryDelay??UY,A=typeof j=="function"?j(n,E):j,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),RY(A).then(()=>f()?void 0:y()).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():y().then(w),a)}}var tc,G3,Az=(G3=class{constructor(){Se(this,tc)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),JS(this.gcTime)&&be(this,tc,Gl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hc?1/0:300*1e3))}clearGcTimeout(){G(this,tc)&&(Gl.clearTimeout(G(this,tc)),be(this,tc,void 0))}},tc=new WeakMap,G3),nc,lf,ga,rc,Mn,om,ac,ka,lo,W3,HY=(W3=class extends Az{constructor(t){super();Se(this,ka);Se(this,nc);Se(this,lf);Se(this,ga);Se(this,rc);Se(this,Mn);Se(this,om);Se(this,ac);be(this,ac,!1),be(this,om,t.defaultOptions),this.setOptions(t.options),this.observers=[],be(this,rc,t.client),be(this,ga,G(this,rc).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,be(this,nc,XP(this.options)),this.state=t.state??G(this,nc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=G(this,Mn))==null?void 0:t.promise}setOptions(t){if(this.options={...G(this,om),...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)),be(this,nc,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&G(this,ga).remove(this)}setData(t,n){const r=tE(this.state.data,t,this.options);return ze(this,ka,lo).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ze(this,ka,lo).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=G(this,Mn))==null?void 0:r.promise;return(a=G(this,Mn))==null||a.cancel(t),n?n.then(nr).catch(nr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(G(this,nc))}isActive(){return this.observers.some(t=>ba(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ks(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:!_z(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=G(this,Mn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=G(this,Mn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),G(this,ga).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(G(this,Mn)&&(G(this,ac)?G(this,Mn).cancel({revert:!0}):G(this,Mn).cancelRetry()),this.scheduleGc()),G(this,ga).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ze(this,ka,lo).call(this,{type:"invalidate"})}async fetch(t,n){var u,f,m,h,p,y,w,x,S,E,C,j;if(this.state.fetchStatus!=="idle"&&((u=G(this,Mn))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(G(this,Mn))return G(this,Mn).continueRetry(),G(this,Mn).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:()=>(be(this,ac,!0),r.signal)})},i=()=>{const A=Oz(this.options,n),N=(()=>{const P={client:G(this,rc),queryKey:this.queryKey,meta:this.meta};return a(P),P})();return be(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:G(this,rc),state:this.state,fetchFn:i};return a(A),A})();(f=this.options.behavior)==null||f.onFetch(c,this),be(this,lf,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&ze(this,ka,lo).call(this,{type:"fetch",meta:(h=c.fetchOptions)==null?void 0:h.meta}),be(this,Mn,Cz({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof rE&&A.revert&&this.setState({...G(this,lf),fetchStatus:"idle"}),r.abort()},onFail:(A,T)=>{ze(this,ka,lo).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{ze(this,ka,lo).call(this,{type:"pause"})},onContinue:()=>{ze(this,ka,lo).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await G(this,Mn).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(y=(p=G(this,ga).config).onSuccess)==null||y.call(p,A,this),(x=(w=G(this,ga).config).onSettled)==null||x.call(w,A,this.state.error,this),A}catch(A){if(A instanceof rE){if(A.silent)return G(this,Mn).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw ze(this,ka,lo).call(this,{type:"error",error:A}),(E=(S=G(this,ga).config).onError)==null||E.call(S,A,this),(j=(C=G(this,ga).config).onSettled)==null||j.call(C,this.state.data,A,this),A}finally{this.scheduleGc()}}},nc=new WeakMap,lf=new WeakMap,ga=new WeakMap,rc=new WeakMap,Mn=new WeakMap,om=new WeakMap,ac=new WeakMap,ka=new WeakSet,lo=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,...Nz(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 be(this,lf,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),Yt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),G(this,ga).notify({query:this,type:"updated",action:t})})},W3);function Nz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:jz(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 Or,et,sm,cr,ic,cf,uo,Ls,lm,uf,ff,oc,sc,zs,df,dt,yh,aE,iE,oE,sE,lE,cE,uE,Tz,Q3,hO=(Q3=class extends kc{constructor(t,n){super();Se(this,dt);Se(this,Or);Se(this,et);Se(this,sm);Se(this,cr);Se(this,ic);Se(this,cf);Se(this,uo);Se(this,Ls);Se(this,lm);Se(this,uf);Se(this,ff);Se(this,oc);Se(this,sc);Se(this,zs);Se(this,df,new Set);this.options=n,be(this,Or,t),be(this,Ls,null),be(this,uo,nE()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(G(this,et).addObserver(this),GP(G(this,et),this.options)?ze(this,dt,yh).call(this):this.updateResult(),ze(this,dt,sE).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return fE(G(this,et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return fE(G(this,et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ze(this,dt,lE).call(this),ze(this,dt,cE).call(this),G(this,et).removeObserver(this)}setOptions(t){const n=this.options,r=G(this,et);if(this.options=G(this,Or).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ba(this.options.enabled,G(this,et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ze(this,dt,uE).call(this),G(this,et).setOptions(this.options),n._defaulted&&!Ph(this.options,n)&&G(this,Or).getQueryCache().notify({type:"observerOptionsUpdated",query:G(this,et),observer:this});const a=this.hasListeners();a&&WP(G(this,et),r,this.options,n)&&ze(this,dt,yh).call(this),this.updateResult(),a&&(G(this,et)!==r||ba(this.options.enabled,G(this,et))!==ba(n.enabled,G(this,et))||Ks(this.options.staleTime,G(this,et))!==Ks(n.staleTime,G(this,et)))&&ze(this,dt,aE).call(this);const i=ze(this,dt,iE).call(this);a&&(G(this,et)!==r||ba(this.options.enabled,G(this,et))!==ba(n.enabled,G(this,et))||i!==G(this,zs))&&ze(this,dt,oE).call(this,i)}getOptimisticResult(t){const n=G(this,Or).getQueryCache().build(G(this,Or),t),r=this.createResult(n,t);return qY(this,r)&&(be(this,cr,r),be(this,cf,this.options),be(this,ic,G(this,et).state)),r}getCurrentResult(){return G(this,cr)}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&&G(this,uo).status==="pending"&&G(this,uo).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){G(this,df).add(t)}getCurrentQuery(){return G(this,et)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=G(this,Or).defaultQueryOptions(t),r=G(this,Or).getQueryCache().build(G(this,Or),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ze(this,dt,yh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),G(this,cr)))}createResult(t,n){var D;const r=G(this,et),a=this.options,i=G(this,cr),s=G(this,ic),c=G(this,cf),f=t!==r?t.state:G(this,sm),{state:m}=t;let h={...m},p=!1,y;if(n._optimisticResults){const K=this.hasListeners(),B=!K&&GP(t,n),L=K&&WP(t,r,n,a);(B||L)&&(h={...h,...Nz(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:w,errorUpdatedAt:x,status:S}=h;y=h.data;let E=!1;if(n.placeholderData!==void 0&&y===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=G(this,ff))==null?void 0:D.state.data,G(this,ff)):n.placeholderData,K!==void 0&&(S="success",y=tE(i==null?void 0:i.data,K,n),p=!0)}if(n.select&&y!==void 0&&!E)if(i&&y===(s==null?void 0:s.data)&&n.select===G(this,lm))y=G(this,uf);else try{be(this,lm,n.select),y=n.select(y),y=tE(i==null?void 0:i.data,y,n),be(this,uf,y),be(this,Ls,null)}catch(K){be(this,Ls,K)}G(this,Ls)&&(w=G(this,Ls),y=G(this,uf),x=Date.now(),S="error");const C=h.fetchStatus==="fetching",j=S==="pending",A=S==="error",T=j&&C,N=y!==void 0,k={status:S,fetchStatus:h.fetchStatus,isPending:j,isSuccess:S==="success",isError:A,isInitialLoading:T,isLoading:T,data:y,dataUpdatedAt:h.dataUpdatedAt,error:w,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>f.dataUpdateCount||h.errorUpdateCount>f.errorUpdateCount,isFetching:C,isRefetching:C&&!j,isLoadingError:A&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:A&&N,isStale:mO(t,n),refetch:this.refetch,promise:G(this,uo),isEnabled:ba(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const K=k.data!==void 0,B=k.status==="error"&&!K,L=Y=>{B?Y.reject(k.error):K&&Y.resolve(k.data)},W=()=>{const Y=be(this,uo,k.promise=nE());L(Y)},$=G(this,uo);switch($.status){case"pending":t.queryHash===r.queryHash&&L($);break;case"fulfilled":(B||k.data!==$.value)&&W();break;case"rejected":(!B||k.error!==$.reason)&&W();break}}return k}updateResult(){const t=G(this,cr),n=this.createResult(G(this,et),this.options);if(be(this,ic,G(this,et).state),be(this,cf,this.options),G(this,ic).data!==void 0&&be(this,ff,G(this,et)),Ph(n,t))return;be(this,cr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!G(this,df).size)return!0;const s=new Set(i??G(this,df));return this.options.throwOnError&&s.add("error"),Object.keys(G(this,cr)).some(c=>{const u=c;return G(this,cr)[u]!==t[u]&&s.has(u)})};ze(this,dt,Tz).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ze(this,dt,sE).call(this)}},Or=new WeakMap,et=new WeakMap,sm=new WeakMap,cr=new WeakMap,ic=new WeakMap,cf=new WeakMap,uo=new WeakMap,Ls=new WeakMap,lm=new WeakMap,uf=new WeakMap,ff=new WeakMap,oc=new WeakMap,sc=new WeakMap,zs=new WeakMap,df=new WeakMap,dt=new WeakSet,yh=function(t){ze(this,dt,uE).call(this);let n=G(this,et).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(nr)),n},aE=function(){ze(this,dt,lE).call(this);const t=Ks(this.options.staleTime,G(this,et));if(hc||G(this,cr).isStale||!JS(t))return;const r=_z(G(this,cr).dataUpdatedAt,t)+1;be(this,oc,Gl.setTimeout(()=>{G(this,cr).isStale||this.updateResult()},r))},iE=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(G(this,et)):this.options.refetchInterval)??!1},oE=function(t){ze(this,dt,cE).call(this),be(this,zs,t),!(hc||ba(this.options.enabled,G(this,et))===!1||!JS(G(this,zs))||G(this,zs)===0)&&be(this,sc,Gl.setInterval(()=>{(this.options.refetchIntervalInBackground||dO.isFocused())&&ze(this,dt,yh).call(this)},G(this,zs)))},sE=function(){ze(this,dt,aE).call(this),ze(this,dt,oE).call(this,ze(this,dt,iE).call(this))},lE=function(){G(this,oc)&&(Gl.clearTimeout(G(this,oc)),be(this,oc,void 0))},cE=function(){G(this,sc)&&(Gl.clearInterval(G(this,sc)),be(this,sc,void 0))},uE=function(){const t=G(this,Or).getQueryCache().build(G(this,Or),this.options);if(t===G(this,et))return;const n=G(this,et);be(this,et,t),be(this,sm,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Tz=function(t){Yt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(G(this,cr))}),G(this,Or).getQueryCache().notify({query:G(this,et),type:"observerResultsUpdated"})})},Q3);function FY(e,t){return ba(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function GP(e,t){return FY(e,t)||e.state.data!==void 0&&fE(e,t,t.refetchOnMount)}function fE(e,t,n){if(ba(t.enabled,e)!==!1&&Ks(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&mO(e,t)}return!1}function WP(e,t,n,r){return(e!==t||ba(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&mO(e,n)}function mO(e,t){return ba(t.enabled,e)!==!1&&e.isStaleByTime(Ks(t.staleTime,e))}function qY(e,t){return!Ph(e.getCurrentResult(),t)}function QP(e){return{onFetch:(t,n)=>{var m,h,p,y,w;const r=t.options,a=(p=(h=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:h.fetchMore)==null?void 0:p.direction,i=((y=t.state.data)==null?void 0:y.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=j=>{IY(j,()=>t.signal,()=>x=!0)},E=Oz(t.options,t.fetchOptions),C=async(j,A,T)=>{if(x)return Promise.reject();if(A==null&&j.pages.length)return Promise.resolve(j);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?DY:kY;return{pages:K(j.pages,k,D),pageParams:K(j.pageParams,A,D)}};if(a&&i.length){const j=a==="backward",A=j?KY:ZP,T={pages:i,pageParams:s},N=A(r,T);c=await C(T,N,j)}else{const j=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<j)}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 KY(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 cm,vi,er,lc,gi,Cs,Z3,VY=(Z3=class extends Az{constructor(t){super();Se(this,gi);Se(this,cm);Se(this,vi);Se(this,er);Se(this,lc);be(this,cm,t.client),this.mutationId=t.mutationId,be(this,er,t.mutationCache),be(this,vi,[]),this.state=t.state||Pz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){G(this,vi).includes(t)||(G(this,vi).push(t),this.clearGcTimeout(),G(this,er).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){be(this,vi,G(this,vi).filter(n=>n!==t)),this.scheduleGc(),G(this,er).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){G(this,vi).length||(this.state.status==="pending"?this.scheduleGc():G(this,er).remove(this))}continue(){var t;return((t=G(this,lc))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,c,u,f,m,h,p,y,w,x,S,E,C,j,A,T,N,P;const n=()=>{ze(this,gi,Cs).call(this,{type:"continue"})},r={client:G(this,cm),meta:this.options.meta,mutationKey:this.options.mutationKey};be(this,lc,Cz({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(k,D)=>{ze(this,gi,Cs).call(this,{type:"failed",failureCount:k,error:D})},onPause:()=>{ze(this,gi,Cs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>G(this,er).canRun(this)}));const a=this.state.status==="pending",i=!G(this,lc).canStart();try{if(a)n();else{ze(this,gi,Cs).call(this,{type:"pending",variables:t,isPaused:i}),G(this,er).config.onMutate&&await G(this,er).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&&ze(this,gi,Cs).call(this,{type:"pending",context:D,variables:t,isPaused:i})}const k=await G(this,lc).start();return await((f=(u=G(this,er).config).onSuccess)==null?void 0:f.call(u,k,t,this.state.context,this,r)),await((h=(m=this.options).onSuccess)==null?void 0:h.call(m,k,t,this.state.context,r)),await((y=(p=G(this,er).config).onSettled)==null?void 0:y.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)),ze(this,gi,Cs).call(this,{type:"success",data:k}),k}catch(k){try{await((E=(S=G(this,er).config).onError)==null?void 0:E.call(S,k,t,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((j=(C=this.options).onError)==null?void 0:j.call(C,k,t,this.state.context,r))}catch(D){Promise.reject(D)}try{await((T=(A=G(this,er).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 ze(this,gi,Cs).call(this,{type:"error",error:k}),k}finally{G(this,er).runNext(this)}}},cm=new WeakMap,vi=new WeakMap,er=new WeakMap,lc=new WeakMap,gi=new WeakSet,Cs=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),Yt.batch(()=>{G(this,vi).forEach(r=>{r.onMutationUpdate(t)}),G(this,er).notify({mutation:this,type:"updated",action:t})})},Z3);function Pz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fo,Da,um,J3,YY=(J3=class extends kc{constructor(t={}){super();Se(this,fo);Se(this,Da);Se(this,um);this.config=t,be(this,fo,new Set),be(this,Da,new Map),be(this,um,0)}build(t,n,r){const a=new VY({client:t,mutationCache:this,mutationId:++xv(this,um)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){G(this,fo).add(t);const n=Sv(t);if(typeof n=="string"){const r=G(this,Da).get(n);r?r.push(t):G(this,Da).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(G(this,fo).delete(t)){const n=Sv(t);if(typeof n=="string"){const r=G(this,Da).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&G(this,Da).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sv(t);if(typeof n=="string"){const r=G(this,Da).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=Sv(t);if(typeof n=="string"){const a=(r=G(this,Da).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(){Yt.batch(()=>{G(this,fo).forEach(t=>{this.notify({type:"removed",mutation:t})}),G(this,fo).clear(),G(this,Da).clear()})}getAll(){return Array.from(G(this,fo))}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){Yt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Yt.batch(()=>Promise.all(t.map(n=>n.continue().catch(nr))))}},fo=new WeakMap,Da=new WeakMap,um=new WeakMap,J3);function Sv(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ho,$s,jr,mo,So,ag,dE,ez,XY=(ez=class extends kc{constructor(n,r){super();Se(this,So);Se(this,ho);Se(this,$s);Se(this,jr);Se(this,mo);be(this,ho,n),this.setOptions(r),this.bindMethods(),ze(this,So,ag).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=G(this,ho).defaultMutationOptions(n),Ph(this.options,r)||G(this,ho).getMutationCache().notify({type:"observerOptionsUpdated",mutation:G(this,jr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&mc(r.mutationKey)!==mc(this.options.mutationKey)?this.reset():((a=G(this,jr))==null?void 0:a.state.status)==="pending"&&G(this,jr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=G(this,jr))==null||n.removeObserver(this)}onMutationUpdate(n){ze(this,So,ag).call(this),ze(this,So,dE).call(this,n)}getCurrentResult(){return G(this,$s)}reset(){var n;(n=G(this,jr))==null||n.removeObserver(this),be(this,jr,void 0),ze(this,So,ag).call(this),ze(this,So,dE).call(this)}mutate(n,r){var a;return be(this,mo,r),(a=G(this,jr))==null||a.removeObserver(this),be(this,jr,G(this,ho).getMutationCache().build(G(this,ho),this.options)),G(this,jr).addObserver(this),G(this,jr).execute(n)}},ho=new WeakMap,$s=new WeakMap,jr=new WeakMap,mo=new WeakMap,So=new WeakSet,ag=function(){var r;const n=((r=G(this,jr))==null?void 0:r.state)??Pz();be(this,$s,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},dE=function(n){Yt.batch(()=>{var r,a,i,s,c,u,f,m;if(G(this,mo)&&this.hasListeners()){const h=G(this,$s).variables,p=G(this,$s).context,y={client:G(this,ho),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(a=(r=G(this,mo)).onSuccess)==null||a.call(r,n.data,h,p,y)}catch(w){Promise.reject(w)}try{(s=(i=G(this,mo)).onSettled)==null||s.call(i,n.data,null,h,p,y)}catch(w){Promise.reject(w)}}else if((n==null?void 0:n.type)==="error"){try{(u=(c=G(this,mo)).onError)==null||u.call(c,n.error,h,p,y)}catch(w){Promise.reject(w)}try{(m=(f=G(this,mo)).onSettled)==null||m.call(f,void 0,n.error,h,p,y)}catch(w){Promise.reject(w)}}}this.listeners.forEach(h=>{h(G(this,$s))})})},ez);function JP(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function GY(e,t,n){const r=e.slice(0);return r[t]=n,r}var hf,Fr,mf,pf,ya,Bs,fm,dm,hm,mm,Xn,hE,mE,pE,vE,gE,tz,WY=(tz=class extends kc{constructor(t,n,r){super();Se(this,Xn);Se(this,hf);Se(this,Fr);Se(this,mf);Se(this,pf);Se(this,ya);Se(this,Bs);Se(this,fm);Se(this,dm);Se(this,hm);Se(this,mm,[]);be(this,hf,t),be(this,pf,r),be(this,mf,[]),be(this,ya,[]),be(this,Fr,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&G(this,ya).forEach(t=>{t.subscribe(n=>{ze(this,Xn,vE).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,G(this,ya).forEach(t=>{t.destroy()})}setQueries(t,n){be(this,mf,t),be(this,pf,n),Yt.batch(()=>{const r=G(this,ya),a=ze(this,Xn,pE).call(this,G(this,mf));a.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions));const i=a.map(h=>h.observer),s=i.map(h=>h.getCurrentResult()),c=r.length!==i.length,u=i.some((h,p)=>h!==r[p]),f=c||u,m=f?!0:s.some((h,p)=>{const y=G(this,Fr)[p];return!y||!Ph(h,y)});!f&&!m||(f&&(be(this,mm,a),be(this,ya,i)),be(this,Fr,s),this.hasListeners()&&(f&&(JP(r,i).forEach(h=>{h.destroy()}),JP(i,r).forEach(h=>{h.subscribe(p=>{ze(this,Xn,vE).call(this,h,p)})})),ze(this,Xn,gE).call(this)))})}getCurrentResult(){return G(this,Fr)}getQueries(){return G(this,ya).map(t=>t.getCurrentQuery())}getObservers(){return G(this,ya)}getOptimisticResult(t,n){const r=ze(this,Xn,pE).call(this,t),a=r.map(s=>s.observer.getOptimisticResult(s.defaultedQueryOptions)),i=r.map(s=>s.defaultedQueryOptions.queryHash);return[a,s=>ze(this,Xn,mE).call(this,s??a,n,i),()=>ze(this,Xn,hE).call(this,a,r)]}},hf=new WeakMap,Fr=new WeakMap,mf=new WeakMap,pf=new WeakMap,ya=new WeakMap,Bs=new WeakMap,fm=new WeakMap,dm=new WeakMap,hm=new WeakMap,mm=new WeakMap,Xn=new WeakSet,hE=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)})})})},mE=function(t,n,r){if(n){const a=G(this,hm),i=r!==void 0&&a!==void 0&&(a.length!==r.length||r.some((s,c)=>s!==a[c]));return(!G(this,Bs)||G(this,Fr)!==G(this,dm)||i||n!==G(this,fm))&&(be(this,fm,n),be(this,dm,G(this,Fr)),r!==void 0&&be(this,hm,r),be(this,Bs,cO(G(this,Bs),n(t)))),G(this,Bs)}return t},pE=function(t){const n=new Map;G(this,ya).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=G(this,hf).defaultQueryOptions(a),c=((u=n.get(i.queryHash))==null?void 0:u.shift())??new hO(G(this,hf),i);r.push({defaultedQueryOptions:i,observer:c})}),r},vE=function(t,n){const r=G(this,ya).indexOf(t);r!==-1&&(be(this,Fr,GY(G(this,Fr),r,n)),ze(this,Xn,gE).call(this))},gE=function(){var t;if(this.hasListeners()){const n=G(this,Bs),r=ze(this,Xn,hE).call(this,G(this,Fr),G(this,mm)),a=ze(this,Xn,mE).call(this,r,(t=G(this,pf))==null?void 0:t.combine);n!==a&&Yt.batch(()=>{this.listeners.forEach(i=>{i(G(this,Fr))})})}},tz),yi,nz,QY=(nz=class extends kc{constructor(t={}){super();Se(this,yi);this.config=t,be(this,yi,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??lO(a,n);let s=this.get(i);return s||(s=new HY({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(s)),s}add(t){G(this,yi).has(t.queryHash)||(G(this,yi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=G(this,yi).get(t.queryHash);n&&(t.destroy(),n===t&&G(this,yi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Yt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return G(this,yi).get(t)}getAll(){return[...G(this,yi).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){Yt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Yt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Yt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},yi=new WeakMap,nz),qt,Us,Hs,vf,gf,Fs,yf,bf,rz,ZY=(rz=class{constructor(e={}){Se(this,qt);Se(this,Us);Se(this,Hs);Se(this,vf);Se(this,gf);Se(this,Fs);Se(this,yf);Se(this,bf);be(this,qt,e.queryCache||new QY),be(this,Us,e.mutationCache||new YY),be(this,Hs,e.defaultOptions||{}),be(this,vf,new Map),be(this,gf,new Map),be(this,Fs,0)}mount(){xv(this,Fs)._++,G(this,Fs)===1&&(be(this,yf,dO.subscribe(async e=>{e&&(await this.resumePausedMutations(),G(this,qt).onFocus())})),be(this,bf,Sg.subscribe(async e=>{e&&(await this.resumePausedMutations(),G(this,qt).onOnline())})))}unmount(){var e,t;xv(this,Fs)._--,G(this,Fs)===0&&((e=G(this,yf))==null||e.call(this),be(this,yf,void 0),(t=G(this,bf))==null||t.call(this),be(this,bf,void 0))}isFetching(e){return G(this,qt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return G(this,Us).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=G(this,qt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=G(this,qt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ks(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return G(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=G(this,qt).get(r.queryHash),i=a==null?void 0:a.state.data,s=PY(t,i);if(s!==void 0)return G(this,qt).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Yt.batch(()=>G(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=G(this,qt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=G(this,qt);Yt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=G(this,qt);return Yt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Yt.batch(()=>G(this,qt).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(nr).catch(nr)}invalidateQueries(e,t={}){return Yt.batch(()=>(G(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=Yt.batch(()=>G(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(nr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(nr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=G(this,qt).build(this,t);return n.isStaleByTime(Ks(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(nr).catch(nr)}fetchInfiniteQuery(e){return e.behavior=QP(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(nr).catch(nr)}ensureInfiniteQueryData(e){return e.behavior=QP(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Sg.isOnline()?G(this,Us).resumePausedMutations():Promise.resolve()}getQueryCache(){return G(this,qt)}getMutationCache(){return G(this,Us)}getDefaultOptions(){return G(this,Hs)}setDefaultOptions(e){be(this,Hs,e)}setQueryDefaults(e,t){G(this,vf).set(mc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...G(this,vf).values()],n={};return t.forEach(r=>{Th(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){G(this,gf).set(mc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...G(this,gf).values()],n={};return t.forEach(r=>{Th(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...G(this,Hs).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=lO(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===uO&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...G(this,Hs).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){G(this,qt).clear(),G(this,Us).clear()}},qt=new WeakMap,Us=new WeakMap,Hs=new WeakMap,vf=new WeakMap,gf=new WeakMap,Fs=new WeakMap,yf=new WeakMap,bf=new WeakMap,rz),Mz=b.createContext(void 0),jt=e=>{const t=b.useContext(Mz);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},JY=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(Mz.Provider,{value:e,children:t})),Rz=b.createContext(!1),kz=()=>b.useContext(Rz);Rz.Provider;function eX(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var tX=b.createContext(eX()),Dz=()=>b.useContext(tX),Iz=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?fO(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Lz=e=>{b.useEffect(()=>{e.clearReset()},[e])},zz=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||fO(n,[e.error,r])),$z=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))}},nX=(e,t)=>e.isLoading&&e.isFetching&&!t,yE=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,bE=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function rX({queries:e,...t},n){const r=jt(),a=kz(),i=Dz(),s=b.useMemo(()=>e.map(x=>{const S=r.defaultQueryOptions(x);return S._optimisticResults=a?"isRestoring":"optimistic",S}),[e,r,a]);s.forEach(x=>{$z(x);const S=r.getQueryCache().get(x.queryHash);Iz(x,i,S)}),Lz(i);const[c]=b.useState(()=>new WY(r,s,t)),[u,f,m]=c.getOptimisticResult(s,t.combine),h=!a&&t.subscribed!==!1;b.useSyncExternalStore(b.useCallback(x=>h?c.subscribe(Yt.batchCalls(x)):nr,[c,h]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),b.useEffect(()=>{c.setQueries(s,t)},[s,t,c]);const y=u.some((x,S)=>yE(s[S],x))?u.flatMap((x,S)=>{const E=s[S];if(E&&yE(E,x)){const C=new hO(r,E);return bE(E,C,i)}return[]}):[];if(y.length>0)throw Promise.all(y);const w=u.find((x,S)=>{const E=s[S];return E&&zz({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 aX(e,t,n){var p,y,w,x;const r=kz(),a=Dz(),i=jt(),s=i.defaultQueryOptions(e);(y=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||y.call(p,s);const c=i.getQueryCache().get(s.queryHash);s._optimisticResults=r?"isRestoring":"optimistic",$z(s),Iz(s,a,c),Lz(a);const u=!i.getQueryCache().get(s.queryHash),[f]=b.useState(()=>new t(i,s)),m=f.getOptimisticResult(s),h=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(S=>{const E=h?f.subscribe(Yt.batchCalls(S)):nr;return f.updateResult(),E},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),b.useEffect(()=>{f.setOptions(s)},[s,f]),yE(s,m))throw bE(s,f,a);if(zz({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&&!hc&&nX(m,r)){const S=u?bE(s,f,a):c==null?void 0:c.promise;S==null||S.catch(nr).finally(()=>{f.updateResult()})}return s.notifyOnChangeProps?m:f.trackResult(m)}function Ln(e,t){return aX(e,hO)}function Gt(e,t){const n=jt(),[r]=b.useState(()=>new XY(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const a=b.useSyncExternalStore(b.useCallback(s=>r.subscribe(Yt.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=b.useCallback((s,c)=>{r.mutate(s,c).catch(nr)},[r]);if(a.error&&fO(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}var iX=(e,t,n,r,a,i,s,c)=>{let u=document.documentElement,f=["light","dark"];function m(y){(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[y]?i[y]:y)):u.setAttribute(w,y)}),h(y)}function h(y){c&&f.includes(y)&&(u.style.colorScheme=y)}function p(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)m(r);else try{let y=localStorage.getItem(t)||n,w=s&&y==="system"?p():y;m(w)}catch{}},eM=["light","dark"],Bz="(prefers-color-scheme: dark)",oX=typeof window>"u",pO=b.createContext(void 0),sX={setTheme:e=>{},themes:[]},vO=()=>{var e;return(e=b.useContext(pO))!=null?e:sX},lX=e=>b.useContext(pO)?b.createElement(b.Fragment,null,e.children):b.createElement(uX,{...e}),cX=["light","dark"],uX=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:a="theme",themes:i=cX,defaultTheme:s=n?"system":"light",attribute:c="data-theme",value:u,children:f,nonce:m,scriptProps:h})=>{let[p,y]=b.useState(()=>dX(a,s)),[w,x]=b.useState(()=>p==="system"?Hw():p),S=u?Object.values(u):i,E=b.useCallback(T=>{let N=T;if(!N)return;T==="system"&&n&&(N=Hw());let P=u?u[N]:N,k=t?hX(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,L=eM.includes(N)?N:B;D.style.colorScheme=L}k==null||k()},[m]),C=b.useCallback(T=>{let N=typeof T=="function"?T(p):T;y(N);try{localStorage.setItem(a,N)}catch{}},[p]),j=b.useCallback(T=>{let N=Hw(T);x(N),p==="system"&&n&&!e&&E("system")},[p,e]);b.useEffect(()=>{let T=window.matchMedia(Bz);return T.addListener(j),j(T),()=>T.removeListener(j)},[j]),b.useEffect(()=>{let T=N=>{N.key===a&&(N.newValue?y(N.newValue):C(s))};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[C]),b.useEffect(()=>{E(e??p)},[e,p]);let A=b.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 b.createElement(pO.Provider,{value:A},b.createElement(fX,{forcedTheme:e,storageKey:a,attribute:c,enableSystem:n,enableColorScheme:r,defaultTheme:s,value:u,themes:i,nonce:m,scriptProps:h}),f)},fX=b.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 b.createElement("script",{...f,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${iX.toString()})(${m})`}})}),dX=(e,t)=>{if(oX)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},hX=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)}},Hw=e=>(e||(e=window.matchMedia(Bz)),e.matches?"dark":"light");function tM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _o(...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 Ze(...e){return b.useCallback(_o(...e),e)}function pc(e){const t=mX(e),n=b.forwardRef((r,a)=>{const{children:i,...s}=r,c=b.Children.toArray(i),u=c.find(vX);if(u){const f=u.props.children,m=c.map(h=>h===u?b.Children.count(f)>1?b.Children.only(null):b.isValidElement(f)?f.props.children:null:h);return g.jsx(t,{...s,ref:a,children:b.isValidElement(f)?b.cloneElement(f,void 0,m):null})}return g.jsx(t,{...s,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var gO=pc("Slot");function mX(e){const t=b.forwardRef((n,r)=>{const{children:a,...i}=n;if(b.isValidElement(a)){const s=yX(a),c=gX(i,a.props);return a.type!==b.Fragment&&(c.ref=r?_o(r,s):s),b.cloneElement(a,c)}return b.Children.count(a)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Uz=Symbol("radix.slottable");function pX(e){const t=({children:n})=>g.jsx(g.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Uz,t}function vX(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Uz}function gX(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 yX(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 bX=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Me=bX.reduce((e,t)=>{const n=pc(`Primitive.${t}`),r=b.forwardRef((a,i)=>{const{asChild:s,...c}=a,u=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(u,{...c,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Hz(e,t){e&&cl.flushSync(()=>e.dispatchEvent(t))}var Fz=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"}),xX="VisuallyHidden",qz=b.forwardRef((e,t)=>g.jsx(Me.span,{...e,ref:t,style:{...Fz,...e.style}}));qz.displayName=xX;var wX=qz;function SX(e,t){const n=b.createContext(t),r=i=>{const{children:s,...c}=i,u=b.useMemo(()=>c,Object.values(c));return g.jsx(n.Provider,{value:u,children:s})};r.displayName=e+"Provider";function a(i){const s=b.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 Za(e,t=[]){let n=[];function r(i,s){const c=b.createContext(s),u=n.length;n=[...n,s];const f=h=>{var E;const{scope:p,children:y,...w}=h,x=((E=p==null?void 0:p[e])==null?void 0:E[u])||c,S=b.useMemo(()=>w,Object.values(w));return g.jsx(x.Provider,{value:S,children:y})};f.displayName=i+"Provider";function m(h,p){var x;const y=((x=p==null?void 0:p[e])==null?void 0:x[u])||c,w=b.useContext(y);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(s=>b.createContext(s));return function(c){const u=(c==null?void 0:c[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...c,[e]:u}}),[c,u])}};return a.scopeName=e,[r,EX(a,...t)]}function EX(...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 h=u(i)[`__scope${f}`];return{...c,...h}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function yO(e){const t=e+"CollectionProvider",[n,r]=Za(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=x=>{const{scope:S,children:E}=x,C=ge.useRef(null),j=ge.useRef(new Map).current;return g.jsx(a,{scope:S,itemMap:j,collectionRef:C,children:E})};s.displayName=t;const c=e+"CollectionSlot",u=pc(c),f=ge.forwardRef((x,S)=>{const{scope:E,children:C}=x,j=i(c,E),A=Ze(S,j.collectionRef);return g.jsx(u,{ref:A,children:C})});f.displayName=c;const m=e+"CollectionItemSlot",h="data-radix-collection-item",p=pc(m),y=ge.forwardRef((x,S)=>{const{scope:E,children:C,...j}=x,A=ge.useRef(null),T=Ze(S,A),N=i(m,E);return ge.useEffect(()=>(N.itemMap.set(A,{ref:A,...j}),()=>void N.itemMap.delete(A))),g.jsx(p,{[h]:"",ref:T,children:C})});y.displayName=m;function w(x){const S=i(e+"CollectionConsumer",x);return ge.useCallback(()=>{const C=S.collectionRef.current;if(!C)return[];const j=Array.from(C.querySelectorAll(`[${h}]`));return Array.from(S.itemMap.values()).sort((N,P)=>j.indexOf(N.ref.current)-j.indexOf(P.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:s,Slot:f,ItemSlot:y},w,r]}function we(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 In=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},_X=eO[" useInsertionEffect ".trim().toString()]||In;function Gs({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,s]=OX({defaultProp:t,onChange:n}),c=e!==void 0,u=c?e:a;{const m=b.useRef(e!==void 0);b.useEffect(()=>{const h=m.current;h!==c&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=c},[c,r])}const f=b.useCallback(m=>{var h;if(c){const p=jX(m)?m(e):m;p!==e&&((h=s.current)==null||h.call(s,p))}else i(m)},[c,e,i,s]);return[u,f]}function OX({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),a=b.useRef(n),i=b.useRef(t);return _X(()=>{i.current=t},[t]),b.useEffect(()=>{var s;a.current!==n&&((s=i.current)==null||s.call(i,n),a.current=n)},[n,a]),[n,r,i]}function jX(e){return typeof e=="function"}function CX(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var ir=e=>{const{present:t,children:n}=e,r=AX(t),a=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=Ze(r.ref,NX(a));return typeof n=="function"||r.isPresent?b.cloneElement(a,{ref:i}):null};ir.displayName="Presence";function AX(e){const[t,n]=b.useState(),r=b.useRef(null),a=b.useRef(e),i=b.useRef("none"),s=e?"mounted":"unmounted",[c,u]=CX(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const f=Ev(r.current);i.current=c==="mounted"?f:"none"},[c]),In(()=>{const f=r.current,m=a.current;if(m!==e){const p=i.current,y=Ev(f);e?u("MOUNT"):y==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(m&&p!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),In(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,h=y=>{const x=Ev(r.current).includes(CSS.escape(y.animationName));if(y.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=y=>{y.target===t&&(i.current=Ev(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:b.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function Ev(e){return(e==null?void 0:e.animationName)||"none"}function NX(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 TX=eO[" useId ".trim().toString()]||(()=>{}),PX=0;function Dn(e){const[t,n]=b.useState(TX());return In(()=>{n(r=>r??String(PX++))},[e]),e||(t?`radix-${t}`:"")}var Vy="Collapsible",[MX]=Za(Vy),[RX,bO]=MX(Vy),Kz=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:i,onOpenChange:s,...c}=e,[u,f]=Gs({prop:r,defaultProp:a??!1,onChange:s,caller:Vy});return g.jsx(RX,{scope:n,disabled:i,contentId:Dn(),open:u,onOpenToggle:b.useCallback(()=>f(m=>!m),[f]),children:g.jsx(Me.div,{"data-state":wO(u),"data-disabled":i?"":void 0,...c,ref:t})})});Kz.displayName=Vy;var Vz="CollapsibleTrigger",Yz=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=bO(Vz,n);return g.jsx(Me.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":wO(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:we(e.onClick,a.onOpenToggle)})});Yz.displayName=Vz;var xO="CollapsibleContent",Xz=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=bO(xO,e.__scopeCollapsible);return g.jsx(ir,{present:n||a.open,children:({present:i})=>g.jsx(kX,{...r,ref:t,present:i})})});Xz.displayName=xO;var kX=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...i}=e,s=bO(xO,n),[c,u]=b.useState(r),f=b.useRef(null),m=Ze(t,f),h=b.useRef(0),p=h.current,y=b.useRef(0),w=y.current,x=s.open||c,S=b.useRef(x),E=b.useRef(void 0);return b.useEffect(()=>{const C=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(C)},[]),In(()=>{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 j=C.getBoundingClientRect();h.current=j.height,y.current=j.width,S.current||(C.style.transitionDuration=E.current.transitionDuration,C.style.animationName=E.current.animationName),u(r)}},[s.open,r]),g.jsx(Me.div,{"data-state":wO(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 wO(e){return e?"open":"closed"}var DX=Kz,IX=b.createContext(void 0);function ym(e){const t=b.useContext(IX);return e||t||"ltr"}function Yn(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function LX(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e);b.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 zX="DismissableLayer",xE="dismissableLayer.update",$X="dismissableLayer.pointerDownOutside",BX="dismissableLayer.focusOutside",nM,Gz=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bm=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...u}=e,f=b.useContext(Gz),[m,h]=b.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=b.useState({}),w=Ze(t,P=>h(P)),x=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),E=x.indexOf(S),C=m?x.indexOf(m):-1,j=f.layersWithOutsidePointerEventsDisabled.size>0,A=C>=E,T=FX(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=qX(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 LX(P=>{C===f.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&c&&(P.preventDefault(),c()))},p),b.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]),b.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),rM())},[m,f]),b.useEffect(()=>{const P=()=>y({});return document.addEventListener(xE,P),()=>document.removeEventListener(xE,P)},[]),g.jsx(Me.div,{...u,ref:w,style:{pointerEvents:j?A?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,N.onFocusCapture),onBlurCapture:we(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,T.onPointerDownCapture)})});bm.displayName=zX;var UX="DismissableLayerBranch",HX=b.forwardRef((e,t)=>{const n=b.useContext(Gz),r=b.useRef(null),a=Ze(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),g.jsx(Me.div,{...e,ref:a})});HX.displayName=UX;function FX(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=b.useRef(!1),a=b.useRef(()=>{});return b.useEffect(()=>{const i=c=>{if(c.target&&!r.current){let u=function(){Wz($X,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 qX(e,t=globalThis==null?void 0:globalThis.document){const n=Yn(e),r=b.useRef(!1);return b.useEffect(()=>{const a=i=>{i.target&&!r.current&&Wz(BX,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(xE);document.dispatchEvent(e)}function Wz(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?Hz(a,i):a.dispatchEvent(i)}var Fw="focusScope.autoFocusOnMount",qw="focusScope.autoFocusOnUnmount",aM={bubbles:!1,cancelable:!0},KX="FocusScope",Yy=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[c,u]=b.useState(null),f=Yn(a),m=Yn(i),h=b.useRef(null),p=Ze(t,x=>u(x)),y=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let x=function(j){if(y.paused||!c)return;const A=j.target;c.contains(A)?h.current=A:As(h.current,{select:!0})},S=function(j){if(y.paused||!c)return;const A=j.relatedTarget;A!==null&&(c.contains(A)||As(h.current,{select:!0}))},E=function(j){if(document.activeElement===document.body)for(const T of j)T.removedNodes.length>0&&As(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,y.paused]),b.useEffect(()=>{if(c){oM.add(y);const x=document.activeElement;if(!c.contains(x)){const E=new CustomEvent(Fw,aM);c.addEventListener(Fw,f),c.dispatchEvent(E),E.defaultPrevented||(VX(QX(Qz(c)),{select:!0}),document.activeElement===x&&As(c))}return()=>{c.removeEventListener(Fw,f),setTimeout(()=>{const E=new CustomEvent(qw,aM);c.addEventListener(qw,m),c.dispatchEvent(E),E.defaultPrevented||As(x??document.body,{select:!0}),c.removeEventListener(qw,m),oM.remove(y)},0)}}},[c,f,m,y]);const w=b.useCallback(x=>{if(!n&&!r||y.paused)return;const S=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,E=document.activeElement;if(S&&E){const C=x.currentTarget,[j,A]=YX(C);j&&A?!x.shiftKey&&E===A?(x.preventDefault(),n&&As(j,{select:!0})):x.shiftKey&&E===j&&(x.preventDefault(),n&&As(A,{select:!0})):E===C&&x.preventDefault()}},[n,r,y.paused]);return g.jsx(Me.div,{tabIndex:-1,...s,ref:p,onKeyDown:w})});Yy.displayName=KX;function VX(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(As(r,{select:t}),document.activeElement!==n)return}function YX(e){const t=Qz(e),n=iM(t,e),r=iM(t.reverse(),e);return[n,r]}function Qz(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(!XX(n,{upTo:t}))return n}function XX(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 GX(e){return e instanceof HTMLInputElement&&"select"in e}function As(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&GX(e)&&t&&e.select()}}var oM=WX();function WX(){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 QX(e){return e.filter(t=>t.tagName!=="A")}var ZX="Portal",xm=b.forwardRef((e,t)=>{var c;const{container:n,...r}=e,[a,i]=b.useState(!1);In(()=>i(!0),[]);const s=n||a&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return s?Ez.createPortal(g.jsx(Me.div,{...r,ref:t}),s):null});xm.displayName=ZX;var Kw=0;function SO(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lM()),document.body.insertAdjacentElement("beforeend",e[1]??lM()),Kw++,()=>{Kw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Kw--}},[])}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 xi=function(){return xi=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},xi.apply(this,arguments)};function Zz(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 JX(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 ig="right-scroll-bar-position",og="width-before-scroll-bar",eG="with-scroll-bars-hidden",tG="--removed-body-scroll-bar-size";function Vw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nG(e,t){var n=b.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 rG=typeof window<"u"?b.useLayoutEffect:b.useEffect,cM=new WeakMap;function aG(e,t){var n=nG(null,function(r){return e.forEach(function(a){return Vw(a,r)})});return rG(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)||Vw(c,null)}),i.forEach(function(c){a.has(c)||Vw(c,s)})}cM.set(n,e)},[e]),n}function iG(e){return e}function oG(e,t){t===void 0&&(t=iG);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 sG(e){e===void 0&&(e={});var t=oG(null);return t.options=xi({async:!0,ssr:!1},e),t}var Jz=function(e){var t=e.sideCar,n=Zz(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 b.createElement(r,xi({},n))};Jz.isSideCarExport=!0;function lG(e,t){return e.useMedium(t),Jz}var e4=sG(),Yw=function(){},Xy=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Yw,onWheelCapture:Yw,onTouchMoveCapture:Yw}),a=r[0],i=r[1],s=e.forwardProps,c=e.children,u=e.className,f=e.removeScrollBar,m=e.enabled,h=e.shards,p=e.sideCar,y=e.noRelative,w=e.noIsolation,x=e.inert,S=e.allowPinchZoom,E=e.as,C=E===void 0?"div":E,j=e.gapMode,A=Zz(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=p,N=aG([n,t]),P=xi(xi({},A),a);return b.createElement(b.Fragment,null,m&&b.createElement(T,{sideCar:e4,removeScrollBar:f,shards:h,noRelative:y,noIsolation:w,inert:x,setCallbacks:i,allowPinchZoom:!!S,lockRef:n,gapMode:j}),s?b.cloneElement(b.Children.only(c),xi(xi({},P),{ref:N})):b.createElement(C,xi({},P,{className:u,ref:N}),c))});Xy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xy.classNames={fullWidth:og,zeroRight:ig};var cG=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function uG(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cG();return t&&e.setAttribute("nonce",t),e}function fG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hG=function(){var e=0,t=null;return{add:function(n){e==0&&(t=uG())&&(fG(t,n),dG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mG=function(){var e=hG();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},t4=function(){var e=mG(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},pG={left:0,top:0,right:0,gap:0},Xw=function(e){return parseInt(e||"",10)||0},vG=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[Xw(n),Xw(r),Xw(a)]},gG=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pG;var t=vG(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])}},yG=t4(),Zu="data-scroll-locked",bG=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(eG,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(c,"px ").concat(r,`;
  }
  body[`).concat(Zu,`] {
    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(ig,` {
    right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(og,` {
    margin-right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(ig," .").concat(ig,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(og," .").concat(og,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(Zu,`] {
    `).concat(tG,": ").concat(c,`px;
  }
`)},uM=function(){var e=parseInt(document.body.getAttribute(Zu)||"0",10);return isFinite(e)?e:0},xG=function(){b.useEffect(function(){return document.body.setAttribute(Zu,(uM()+1).toString()),function(){var e=uM()-1;e<=0?document.body.removeAttribute(Zu):document.body.setAttribute(Zu,e.toString())}},[])},wG=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;xG();var i=b.useMemo(function(){return gG(a)},[a]);return b.createElement(yG,{styles:bG(i,!t,a,n?"":"!important")})},wE=!1;if(typeof window<"u")try{var _v=Object.defineProperty({},"passive",{get:function(){return wE=!0,!0}});window.addEventListener("test",_v,_v),window.removeEventListener("test",_v,_v)}catch{wE=!1}var Mu=wE?{passive:!1}:!1,SG=function(e){return e.tagName==="TEXTAREA"},n4=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!SG(e)&&n[t]==="visible")},EG=function(e){return n4(e,"overflowY")},_G=function(e){return n4(e,"overflowX")},fM=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=r4(e,r);if(a){var i=a4(e,r),s=i[1],c=i[2];if(s>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},OG=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},jG=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},r4=function(e,t){return e==="v"?EG(t):_G(t)},a4=function(e,t){return e==="v"?OG(t):jG(t)},CG=function(e,t){return e==="h"&&t==="rtl"?-1:1},AG=function(e,t,n,r,a){var i=CG(e,window.getComputedStyle(t).direction),s=i*r,c=n.target,u=t.contains(c),f=!1,m=s>0,h=0,p=0;do{if(!c)break;var y=a4(e,c),w=y[0],x=y[1],S=y[2],E=x-S-i*w;(w||E)&&r4(e,c)&&(h+=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(h)<1||!m&&Math.abs(p)<1)&&(f=!0),f},Ov=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},NG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},TG=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},PG=0,Ru=[];function MG(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),a=b.useState(PG++)[0],i=b.useState(t4)[0],s=b.useRef(e);b.useEffect(function(){s.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var x=JX([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=b.useCallback(function(x,S){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!s.current.allowPinchZoom;var E=Ov(x),C=n.current,j="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(j)>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&&(j||A)&&(r.current=T),!T)return!0;var L=r.current||T;return AG(L,S,x,L==="h"?j:A)},[]),u=b.useCallback(function(x){var S=x;if(!(!Ru.length||Ru[Ru.length-1]!==i)){var E="deltaY"in S?dM(S):Ov(S),C=t.current.filter(function(T){return T.name===S.type&&(T.target===S.target||S.target===T.shadowParent)&&NG(T.delta,E)})[0];if(C&&C.should){S.cancelable&&S.preventDefault();return}if(!C){var j=(s.current.shards||[]).map(hM).filter(Boolean).filter(function(T){return T.contains(S.target)}),A=j.length>0?c(S,j[0]):!s.current.noIsolation;A&&S.cancelable&&S.preventDefault()}}},[]),f=b.useCallback(function(x,S,E,C){var j={name:x,delta:S,target:E,should:C,shadowParent:RG(E)};t.current.push(j),setTimeout(function(){t.current=t.current.filter(function(A){return A!==j})},1)},[]),m=b.useCallback(function(x){n.current=Ov(x),r.current=void 0},[]),h=b.useCallback(function(x){f(x.type,dM(x),x.target,c(x,e.lockRef.current))},[]),p=b.useCallback(function(x){f(x.type,Ov(x),x.target,c(x,e.lockRef.current))},[]);b.useEffect(function(){return Ru.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",u,Mu),document.addEventListener("touchmove",u,Mu),document.addEventListener("touchstart",m,Mu),function(){Ru=Ru.filter(function(x){return x!==i}),document.removeEventListener("wheel",u,Mu),document.removeEventListener("touchmove",u,Mu),document.removeEventListener("touchstart",m,Mu)}},[]);var y=e.removeScrollBar,w=e.inert;return b.createElement(b.Fragment,null,w?b.createElement(i,{styles:TG(a)}):null,y?b.createElement(wG,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function RG(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const kG=lG(e4,MG);var Gy=b.forwardRef(function(e,t){return b.createElement(Xy,xi({},e,{ref:t,sideCar:kG}))});Gy.classNames=Xy.classNames;var DG=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ku=new WeakMap,jv=new WeakMap,Cv={},Gw=0,i4=function(e){return e&&(e.host||i4(e.parentNode))},IG=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=i4(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})},LG=function(e,t,n,r){var a=IG(t,Array.isArray(e)?e:[e]);Cv[n]||(Cv[n]=new WeakMap);var i=Cv[n],s=[],c=new Set,u=new Set(a),f=function(h){!h||c.has(h)||(c.add(h),f(h.parentNode))};a.forEach(f);var m=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(p){if(c.has(p))m(p);else try{var y=p.getAttribute(r),w=y!==null&&y!=="false",x=(ku.get(p)||0)+1,S=(i.get(p)||0)+1;ku.set(p,x),i.set(p,S),s.push(p),x===1&&w&&jv.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(),Gw++,function(){s.forEach(function(h){var p=ku.get(h)-1,y=i.get(h)-1;ku.set(h,p),i.set(h,y),p||(jv.has(h)||h.removeAttribute(r),jv.delete(h)),y||h.removeAttribute(n)}),Gw--,Gw||(ku=new WeakMap,ku=new WeakMap,jv=new WeakMap,Cv={})}},EO=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=DG(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),LG(r,a,n,"aria-hidden")):function(){return null}},Wy="Dialog",[o4]=Za(Wy),[zG,Ja]=o4(Wy),s4=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=b.useRef(null),u=b.useRef(null),[f,m]=Gs({prop:r,defaultProp:a??!1,onChange:i,caller:Wy});return g.jsx(zG,{scope:t,triggerRef:c,contentRef:u,contentId:Dn(),titleId:Dn(),descriptionId:Dn(),open:f,onOpenChange:m,onOpenToggle:b.useCallback(()=>m(h=>!h),[m]),modal:s,children:n})};s4.displayName=Wy;var l4="DialogTrigger",$G=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ja(l4,n),i=Ze(t,a.triggerRef);return g.jsx(Me.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":jO(a.open),...r,ref:i,onClick:we(e.onClick,a.onOpenToggle)})});$G.displayName=l4;var _O="DialogPortal",[BG,c4]=o4(_O,{forceMount:void 0}),u4=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=Ja(_O,t);return g.jsx(BG,{scope:t,forceMount:n,children:b.Children.map(r,s=>g.jsx(ir,{present:n||i.open,children:g.jsx(xm,{asChild:!0,container:a,children:s})}))})};u4.displayName=_O;var Eg="DialogOverlay",f4=b.forwardRef((e,t)=>{const n=c4(Eg,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Ja(Eg,e.__scopeDialog);return i.modal?g.jsx(ir,{present:r||i.open,children:g.jsx(HG,{...a,ref:t})}):null});f4.displayName=Eg;var UG=pc("DialogOverlay.RemoveScroll"),HG=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ja(Eg,n);return g.jsx(Gy,{as:UG,allowPinchZoom:!0,shards:[a.contentRef],children:g.jsx(Me.div,{"data-state":jO(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),vc="DialogContent",d4=b.forwardRef((e,t)=>{const n=c4(vc,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Ja(vc,e.__scopeDialog);return g.jsx(ir,{present:r||i.open,children:i.modal?g.jsx(FG,{...a,ref:t}):g.jsx(qG,{...a,ref:t})})});d4.displayName=vc;var FG=b.forwardRef((e,t)=>{const n=Ja(vc,e.__scopeDialog),r=b.useRef(null),a=Ze(t,n.contentRef,r);return b.useEffect(()=>{const i=r.current;if(i)return EO(i)},[]),g.jsx(h4,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0;(s.button===2||c)&&i.preventDefault()}),onFocusOutside:we(e.onFocusOutside,i=>i.preventDefault())})}),qG=b.forwardRef((e,t)=>{const n=Ja(vc,e.__scopeDialog),r=b.useRef(!1),a=b.useRef(!1);return g.jsx(h4,{...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()}})}),h4=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,c=Ja(vc,n),u=b.useRef(null),f=Ze(t,u);return SO(),g.jsxs(g.Fragment,{children:[g.jsx(Yy,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:g.jsx(bm,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":jO(c.open),...s,ref:f,onDismiss:()=>c.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(KG,{titleId:c.titleId}),g.jsx(YG,{contentRef:u,descriptionId:c.descriptionId})]})]})}),OO="DialogTitle",m4=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ja(OO,n);return g.jsx(Me.h2,{id:a.titleId,...r,ref:t})});m4.displayName=OO;var p4="DialogDescription",v4=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ja(p4,n);return g.jsx(Me.p,{id:a.descriptionId,...r,ref:t})});v4.displayName=p4;var g4="DialogClose",y4=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ja(g4,n);return g.jsx(Me.button,{type:"button",...r,ref:t,onClick:we(e.onClick,()=>a.onOpenChange(!1))})});y4.displayName=g4;function jO(e){return e?"open":"closed"}var b4="DialogTitleWarning",[zTe,x4]=SX(b4,{contentName:vc,titleName:OO,docsSlug:"dialog"}),KG=({titleId:e})=>{const t=x4(b4),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 b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},VG="DialogDescriptionWarning",YG=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${x4(VG).contentName}}.`;return b.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},CO=s4,AO=u4,NO=f4,TO=d4,w4=m4,S4=v4,PO=y4,Ww={exports:{}},Qw={};/**
 * @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 XG(){if(mM)return Qw;mM=1;var e=$f();function t(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&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(h,p){var y=p(),w=r({inst:{value:y,getSnapshot:p}}),x=w[0].inst,S=w[1];return i(function(){x.value=y,x.getSnapshot=p,u(x)&&S({inst:x})},[h,y,p]),a(function(){return u(x)&&S({inst:x}),h(function(){u(x)&&S({inst:x})})},[h]),s(y),y}function u(h){var p=h.getSnapshot;h=h.value;try{var y=p();return!n(h,y)}catch{return!0}}function f(h,p){return p()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Qw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Qw}var pM;function GG(){return pM||(pM=1,Ww.exports=XG()),Ww.exports}function WG(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function QG(e){const[t,n]=b.useState(void 0);return In(()=>{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 ZG=["top","right","bottom","left"],Ws=Math.min,qr=Math.max,_g=Math.round,Av=Math.floor,Oi=e=>({x:e,y:e}),JG={left:"right",right:"left",bottom:"top",top:"bottom"};function SE(e,t,n){return qr(e,Ws(t,n))}function Oo(e,t){return typeof e=="function"?e(t):e}function jo(e){return e.split("-")[0]}function Ff(e){return e.split("-")[1]}function MO(e){return e==="x"?"y":"x"}function RO(e){return e==="y"?"height":"width"}function wi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function kO(e){return MO(wi(e))}function eW(e,t,n){n===void 0&&(n=!1);const r=Ff(e),a=kO(e),i=RO(a);let s=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Og(s)),[s,Og(s)]}function tW(e){const t=Og(e);return[EE(e),t,EE(t)]}function EE(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const vM=["left","right"],gM=["right","left"],nW=["top","bottom"],rW=["bottom","top"];function aW(e,t,n){switch(e){case"top":case"bottom":return n?t?gM:vM:t?vM:gM;case"left":case"right":return t?nW:rW;default:return[]}}function iW(e,t,n,r){const a=Ff(e);let i=aW(jo(e),n==="start",r);return a&&(i=i.map(s=>s+"-"+a),t&&(i=i.concat(i.map(EE)))),i}function Og(e){const t=jo(e);return JG[t]+e.slice(t.length)}function oW(e){return{top:0,right:0,bottom:0,left:0,...e}}function E4(e){return typeof e!="number"?oW(e):{top:e,right:e,bottom:e,left:e}}function jg(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=wi(t),s=kO(t),c=RO(s),u=jo(t),f=i==="y",m=r.x+r.width/2-a.width/2,h=r.y+r.height/2-a.height/2,p=r[c]/2-a[c]/2;let y;switch(u){case"top":y={x:m,y:r.y-a.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:h};break;case"left":y={x:r.x-a.width,y:h};break;default:y={x:r.x,y:r.y}}switch(Ff(t)){case"start":y[s]-=p*(n&&f?-1:1);break;case"end":y[s]+=p*(n&&f?-1:1);break}return y}async function sW(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:h="floating",altBoundary:p=!1,padding:y=0}=Oo(t,e),w=E4(y),S=c[p?h==="floating"?"reference":"floating":h],E=jg(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=h==="floating"?{x:r,y:a,width:s.floating.width,height:s.floating.height}:s.reference,j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),A=await(i.isElement==null?void 0:i.isElement(j))?await(i.getScale==null?void 0:i.getScale(j))||{x:1,y:1}:{x:1,y:1},T=jg(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:j,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 lW=50,cW=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:sW},u=await(s.isRTL==null?void 0:s.isRTL(t));let f=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:h}=yM(f,r,u),p=r,y=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:j,y:A,data:T,reset:N}=await C({x:m,y:h,initialPlacement:r,placement:p,strategy:a,middlewareData:w,rects:f,platform:c,elements:{reference:e,floating:t}});m=j??m,h=A??h,w[E]={...w[E],...T},N&&y<lW&&(y++,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:h}=yM(f,p,u)),x=-1)}return{x:m,y:h,placement:p,strategy:a,middlewareData:w}},uW=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}=Oo(e,t)||{};if(f==null)return{};const h=E4(m),p={x:n,y:r},y=kO(a),w=RO(y),x=await s.getDimensions(f),S=y==="y",E=S?"top":"left",C=S?"bottom":"right",j=S?"clientHeight":"clientWidth",A=i.reference[w]+i.reference[y]-p[y]-i.floating[w],T=p[y]-i.reference[y],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f));let P=N?N[j]:0;(!P||!await(s.isElement==null?void 0:s.isElement(N)))&&(P=c.floating[j]||i.floating[w]);const k=A/2-T/2,D=P/2-x[w]/2-1,K=Ws(h[E],D),B=Ws(h[C],D),L=K,W=P-x[w]-B,$=P/2-x[w]/2+k,Y=SE(L,$,W),R=!u.arrow&&Ff(a)!=null&&$!==Y&&i.reference[w]/2-($<L?K:B)-x[w]/2<0,H=R?$<L?$-L:$-W:0;return{[y]:p[y]+H,data:{[y]:Y,centerOffset:$-Y-H,...R&&{alignmentOffset:H}},reset:R}}}),fW=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:h=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:x=!0,...S}=Oo(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const E=jo(a),C=wi(c),j=jo(c)===c,A=await(u.isRTL==null?void 0:u.isRTL(f.floating)),T=p||(j||!x?[Og(c)]:tW(c)),N=w!=="none";!p&&N&&T.push(...iW(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]),h){const $=eW(a,s,A);D.push(k[$[0]],k[$[1]])}if(K=[...K,{placement:a,overflows:D}],!D.every($=>$<=0)){var B,L;const $=(((B=i.flip)==null?void 0:B.index)||0)+1,Y=P[$];if(Y&&(!(h==="alignment"?C!==wi(Y):!1)||K.every(q=>wi(q.placement)===C?q.overflows[0]>0:!0)))return{data:{index:$,overflows:K},reset:{placement:Y}};let R=(L=K.filter(H=>H.overflows[0]<=0).sort((H,q)=>H.overflows[1]-q.overflows[1])[0])==null?void 0:L.placement;if(!R)switch(y){case"bestFit":{var W;const H=(W=K.filter(q=>{if(N){const F=wi(q.placement);return F===C||F==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(F=>F>0).reduce((F,V)=>F+V,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 ZG.some(t=>e[t]>=0)}const dW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...i}=Oo(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{}}}}},_4=new Set(["left","top"]);async function hW(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),s=jo(n),c=Ff(n),u=wi(n)==="y",f=_4.has(s)?-1:1,m=i&&u?-1:1,h=Oo(t,e);let{mainAxis:p,crossAxis:y,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof w=="number"&&(y=c==="end"?w*-1:w),u?{x:y*m,y:p*f}:{x:p*f,y:y*m}}const mW=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 hW(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}}}}},pW=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:j}=E;return{x:C,y:j}}},...f}=Oo(e,t),m={x:n,y:r},h=await i.detectOverflow(t,f),p=wi(jo(a)),y=MO(p);let w=m[y],x=m[p];if(s){const E=y==="y"?"top":"left",C=y==="y"?"bottom":"right",j=w+h[E],A=w-h[C];w=SE(j,w,A)}if(c){const E=p==="y"?"top":"left",C=p==="y"?"bottom":"right",j=x+h[E],A=x-h[C];x=SE(j,x,A)}const S=u.fn({...t,[y]:w,[p]:x});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:s,[p]:c}}}}}},vW=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}=Oo(e,t),m={x:n,y:r},h=wi(a),p=MO(h);let y=m[p],w=m[h];const x=Oo(c,t),S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(u){const j=p==="y"?"height":"width",A=i.reference[p]-i.floating[j]+S.mainAxis,T=i.reference[p]+i.reference[j]-S.mainAxis;y<A?y=A:y>T&&(y=T)}if(f){var E,C;const j=p==="y"?"width":"height",A=_4.has(jo(a)),T=i.reference[h]-i.floating[j]+(A&&((E=s.offset)==null?void 0:E[h])||0)+(A?0:S.crossAxis),N=i.reference[h]+i.reference[j]+(A?0:((C=s.offset)==null?void 0:C[h])||0)-(A?S.crossAxis:0);w<T?w=T:w>N&&(w=N)}return{[p]:y,[h]:w}}}},gW=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}=Oo(e,t),m=await s.detectOverflow(t,f),h=jo(a),p=Ff(a),y=wi(a)==="y",{width:w,height:x}=i.floating;let S,E;h==="top"||h==="bottom"?(S=h,E=p===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(E=h,S=p==="end"?"top":"bottom");const C=x-m.top-m.bottom,j=w-m.left-m.right,A=Ws(x-m[S],C),T=Ws(w-m[E],j),N=!t.middlewareData.shift;let P=A,k=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=j),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=C),N&&!p){const K=qr(m.left,0),B=qr(m.right,0),L=qr(m.top,0),W=qr(m.bottom,0);y?k=w-2*(K!==0||B!==0?K+B:qr(m.left,m.right)):P=x-2*(L!==0||W!==0?L+W:qr(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 Qy(){return typeof window<"u"}function qf(e){return O4(e)?(e.nodeName||"").toLowerCase():"#document"}function Gr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ki(e){var t;return(t=(O4(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function O4(e){return Qy()?e instanceof Node||e instanceof Gr(e).Node:!1}function Ya(e){return Qy()?e instanceof Element||e instanceof Gr(e).Element:!1}function Ro(e){return Qy()?e instanceof HTMLElement||e instanceof Gr(e).HTMLElement:!1}function wM(e){return!Qy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Gr(e).ShadowRoot}function wm(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Xa(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function yW(e){return/^(table|td|th)$/.test(qf(e))}function Zy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const bW=/transform|translate|scale|rotate|perspective|filter/,xW=/paint|layout|strict|content/,zl=e=>!!e&&e!=="none";let Zw;function DO(e){const t=Ya(e)?Xa(e):e;return zl(t.transform)||zl(t.translate)||zl(t.scale)||zl(t.rotate)||zl(t.perspective)||!IO()&&(zl(t.backdropFilter)||zl(t.filter))||bW.test(t.willChange||"")||xW.test(t.contain||"")}function wW(e){let t=Qs(e);for(;Ro(t)&&!xf(t);){if(DO(t))return t;if(Zy(t))return null;t=Qs(t)}return null}function IO(){return Zw==null&&(Zw=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Zw}function xf(e){return/^(html|body|#document)$/.test(qf(e))}function Xa(e){return Gr(e).getComputedStyle(e)}function Jy(e){return Ya(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qs(e){if(qf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wM(e)&&e.host||ki(e);return wM(t)?t.host:t}function j4(e){const t=Qs(e);return xf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ro(t)&&wm(t)?t:j4(t)}function Mh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=j4(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),s=Gr(a);if(i){const c=_E(s);return t.concat(s,s.visualViewport||[],wm(a)?a:[],c&&n?Mh(c):[])}else return t.concat(a,Mh(a,[],n))}function _E(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function C4(e){const t=Xa(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Ro(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:r,c=_g(n)!==i||_g(r)!==s;return c&&(n=i,r=s),{width:n,height:r,$:c}}function LO(e){return Ya(e)?e:e.contextElement}function Ju(e){const t=LO(e);if(!Ro(t))return Oi(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=C4(t);let s=(i?_g(n.width):n.width)/r,c=(i?_g(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const SW=Oi(0);function A4(e){const t=Gr(e);return!IO()||!t.visualViewport?SW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function EW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Gr(e)?!1:t}function gc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=LO(e);let s=Oi(1);t&&(r?Ya(r)&&(s=Ju(r)):s=Ju(e));const c=EW(i,n,r)?A4(i):Oi(0);let u=(a.left+c.x)/s.x,f=(a.top+c.y)/s.y,m=a.width/s.x,h=a.height/s.y;if(i){const p=Gr(i),y=r&&Ya(r)?Gr(r):r;let w=p,x=_E(w);for(;x&&r&&y!==w;){const S=Ju(x),E=x.getBoundingClientRect(),C=Xa(x),j=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,h*=S.y,u+=j,f+=A,w=Gr(x),x=_E(w)}}return jg({width:m,height:h,x:u,y:f})}function e0(e,t){const n=Jy(e).scrollLeft;return t?t.left+n:gc(ki(e)).left+n}function N4(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-e0(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function _W(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",s=ki(r),c=t?Zy(t.floating):!1;if(r===s||c&&i)return n;let u={scrollLeft:0,scrollTop:0},f=Oi(1);const m=Oi(0),h=Ro(r);if((h||!h&&!i)&&((qf(r)!=="body"||wm(s))&&(u=Jy(r)),h)){const y=gc(r);f=Ju(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const p=s&&!h&&!i?N4(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 OW(e){return Array.from(e.getClientRects())}function jW(e){const t=ki(e),n=Jy(e),r=e.ownerDocument.body,a=qr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=qr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+e0(e);const c=-n.scrollTop;return Xa(r).direction==="rtl"&&(s+=qr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:s,y:c}}const SM=25;function CW(e,t){const n=Gr(e),r=ki(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=IO();(!m||m&&t==="fixed")&&(c=a.offsetLeft,u=a.offsetTop)}const f=e0(r);if(f<=0){const m=r.ownerDocument,h=m.body,p=getComputedStyle(h),y=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(r.clientWidth-h.clientWidth-y);w<=SM&&(i-=w)}else f<=SM&&(i+=f);return{width:i,height:s,x:c,y:u}}function AW(e,t){const n=gc(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=Ro(e)?Ju(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=CW(e,n);else if(t==="document")r=jW(ki(e));else if(Ya(t))r=AW(t,n);else{const a=A4(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return jg(r)}function T4(e,t){const n=Qs(e);return n===t||!Ya(n)||xf(n)?!1:Xa(n).position==="fixed"||T4(n,t)}function NW(e,t){const n=t.get(e);if(n)return n;let r=Mh(e,[],!1).filter(c=>Ya(c)&&qf(c)!=="body"),a=null;const i=Xa(e).position==="fixed";let s=i?Qs(e):e;for(;Ya(s)&&!xf(s);){const c=Xa(s),u=DO(s);!u&&c.position==="fixed"&&(a=null),(i?!u&&!a:!u&&c.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||wm(s)&&!u&&T4(e,s))?r=r.filter(m=>m!==s):a=c,s=Qs(s)}return t.set(e,r),r}function TW(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const s=[...n==="clippingAncestors"?Zy(t)?[]:NW(t,this._c):[].concat(n),r],c=EM(t,s[0],a);let u=c.top,f=c.right,m=c.bottom,h=c.left;for(let p=1;p<s.length;p++){const y=EM(t,s[p],a);u=qr(y.top,u),f=Ws(y.right,f),m=Ws(y.bottom,m),h=qr(y.left,h)}return{width:f-h,height:m-u,x:h,y:u}}function PW(e){const{width:t,height:n}=C4(e);return{width:t,height:n}}function MW(e,t,n){const r=Ro(t),a=ki(t),i=n==="fixed",s=gc(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const u=Oi(0);function f(){u.x=e0(a)}if(r||!r&&!i)if((qf(t)!=="body"||wm(a))&&(c=Jy(t)),r){const y=gc(t,!0,i,t);u.x=y.x+t.clientLeft,u.y=y.y+t.clientTop}else a&&f();i&&!r&&a&&f();const m=a&&!r&&!i?N4(a,c):Oi(0),h=s.left+c.scrollLeft-u.x-m.x,p=s.top+c.scrollTop-u.y-m.y;return{x:h,y:p,width:s.width,height:s.height}}function Jw(e){return Xa(e).position==="static"}function _M(e,t){if(!Ro(e)||Xa(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ki(e)===n&&(n=n.ownerDocument.body),n}function P4(e,t){const n=Gr(e);if(Zy(e))return n;if(!Ro(e)){let a=Qs(e);for(;a&&!xf(a);){if(Ya(a)&&!Jw(a))return a;a=Qs(a)}return n}let r=_M(e,t);for(;r&&yW(r)&&Jw(r);)r=_M(r,t);return r&&xf(r)&&Jw(r)&&!DO(r)?n:r||wW(e)||n}const RW=async function(e){const t=this.getOffsetParent||P4,n=this.getDimensions,r=await n(e.floating);return{reference:MW(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function kW(e){return Xa(e).direction==="rtl"}const DW={convertOffsetParentRelativeRectToViewportRelativeRect:_W,getDocumentElement:ki,getClippingRect:TW,getOffsetParent:P4,getElementRects:RW,getClientRects:OW,getDimensions:PW,getScale:Ju,isElement:Ya,isRTL:kW};function M4(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function IW(e,t){let n=null,r;const a=ki(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:h,width:p,height:y}=f;if(c||t(),!p||!y)return;const w=Av(h),x=Av(a.clientWidth-(m+p)),S=Av(a.clientHeight-(h+y)),E=Av(m),j={rootMargin:-w+"px "+-x+"px "+-S+"px "+-E+"px",threshold:qr(0,Ws(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&&!M4(f,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(T,{...j,root:a.ownerDocument})}catch{n=new IntersectionObserver(T,j)}n.observe(e)}return s(!0),i}function LW(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=LO(e),m=a||i?[...f?Mh(f):[],...t?Mh(t):[]]:[];m.forEach(E=>{a&&E.addEventListener("scroll",n,{passive:!0}),i&&E.addEventListener("resize",n)});const h=f&&c?IW(f,n):null;let p=-1,y=null;s&&(y=new ResizeObserver(E=>{let[C]=E;C&&C.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var j;(j=y)==null||j.observe(t)})),n()}),f&&!u&&y.observe(f),t&&y.observe(t));let w,x=u?gc(e):null;u&&S();function S(){const E=gc(e);x&&!M4(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)}),h==null||h(),(E=y)==null||E.disconnect(),y=null,u&&cancelAnimationFrame(w)}}const zW=mW,$W=pW,BW=fW,UW=gW,HW=dW,OM=uW,FW=vW,qW=(e,t,n)=>{const r=new Map,a={platform:DW,...n},i={...a.platform,_c:r};return cW(e,t,{...a,platform:i})};var KW=typeof document<"u",VW=function(){},sg=KW?b.useLayoutEffect:VW;function Cg(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(!Cg(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)&&!Cg(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function R4(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jM(e,t){const n=R4(e);return Math.round(t*n)/n}function e1(e){const t=b.useRef(e);return sg(()=>{t.current=e}),t}function YW(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,h]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,y]=b.useState(r);Cg(p,r)||y(r);const[w,x]=b.useState(null),[S,E]=b.useState(null),C=b.useCallback(q=>{q!==N.current&&(N.current=q,x(q))},[]),j=b.useCallback(q=>{q!==P.current&&(P.current=q,E(q))},[]),A=i||w,T=s||S,N=b.useRef(null),P=b.useRef(null),k=b.useRef(m),D=u!=null,K=e1(u),B=e1(a),L=e1(f),W=b.useCallback(()=>{if(!N.current||!P.current)return;const q={placement:t,strategy:n,middleware:p};B.current&&(q.platform=B.current),qW(N.current,P.current,q).then(F=>{const V={...F,isPositioned:L.current!==!1};$.current&&!Cg(k.current,V)&&(k.current=V,cl.flushSync(()=>{h(V)}))})},[p,t,n,B,L]);sg(()=>{f===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,h(q=>({...q,isPositioned:!1})))},[f]);const $=b.useRef(!1);sg(()=>($.current=!0,()=>{$.current=!1}),[]),sg(()=>{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 Y=b.useMemo(()=>({reference:N,floating:P,setReference:C,setFloating:j}),[C,j]),R=b.useMemo(()=>({reference:A,floating:T}),[A,T]),H=b.useMemo(()=>{const q={position:n,left:0,top:0};if(!R.floating)return q;const F=jM(R.floating,m.x),V=jM(R.floating,m.y);return c?{...q,transform:"translate("+F+"px, "+V+"px)",...R4(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:V}},[n,c,R.floating,m.x,m.y]);return b.useMemo(()=>({...m,update:W,refs:Y,elements:R,floatingStyles:H}),[m,W,Y,R,H])}const XW=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?OM({element:r.current,padding:a}).fn(n):{}:r?OM({element:r,padding:a}).fn(n):{}}}},GW=(e,t)=>{const n=zW(e);return{name:n.name,fn:n.fn,options:[e,t]}},WW=(e,t)=>{const n=$W(e);return{name:n.name,fn:n.fn,options:[e,t]}},QW=(e,t)=>({fn:FW(e).fn,options:[e,t]}),ZW=(e,t)=>{const n=BW(e);return{name:n.name,fn:n.fn,options:[e,t]}},JW=(e,t)=>{const n=UW(e);return{name:n.name,fn:n.fn,options:[e,t]}},eQ=(e,t)=>{const n=HW(e);return{name:n.name,fn:n.fn,options:[e,t]}},tQ=(e,t)=>{const n=XW(e);return{name:n.name,fn:n.fn,options:[e,t]}};var nQ="Arrow",k4=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return g.jsx(Me.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});k4.displayName=nQ;var rQ=k4,zO="Popper",[D4,Kf]=Za(zO),[aQ,I4]=D4(zO),L4=e=>{const{__scopePopper:t,children:n}=e,[r,a]=b.useState(null);return g.jsx(aQ,{scope:t,anchor:r,onAnchorChange:a,children:n})};L4.displayName=zO;var z4="PopperAnchor",$4=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=I4(z4,n),s=b.useRef(null),c=Ze(t,s),u=b.useRef(null);return b.useEffect(()=>{const f=u.current;u.current=(r==null?void 0:r.current)||s.current,f!==u.current&&i.onAnchorChange(u.current)}),r?null:g.jsx(Me.div,{...a,ref:c})});$4.displayName=z4;var $O="PopperContent",[iQ,oQ]=D4($O),B4=b.forwardRef((e,t)=>{var ie,re,J,ce,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:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:y="optimized",onPlaced:w,...x}=e,S=I4($O,n),[E,C]=b.useState(null),j=Ze(t,ye=>C(ye)),[A,T]=b.useState(null),N=QG(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],L=B.length>0,W={padding:K,boundary:B.filter(lQ),altBoundary:L},{refs:$,floatingStyles:Y,placement:R,isPositioned:H,middlewareData:q}=YW({strategy:"fixed",placement:D,whileElementsMounted:(...ye)=>LW(...ye,{animationFrame:y==="always"}),elements:{reference:S.anchor},middleware:[GW({mainAxis:a+k,alignmentAxis:s}),u&&WW({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?QW():void 0,...W}),u&&ZW({...W}),JW({...W,apply:({elements:ye,rects:xe,availableWidth:Ie,availableHeight:Pe})=>{const{width:Ve,height:mn}=xe.reference,pt=ye.floating.style;pt.setProperty("--radix-popper-available-width",`${Ie}px`),pt.setProperty("--radix-popper-available-height",`${Pe}px`),pt.setProperty("--radix-popper-anchor-width",`${Ve}px`),pt.setProperty("--radix-popper-anchor-height",`${mn}px`)}}),A&&tQ({element:A,padding:c}),cQ({arrowWidth:P,arrowHeight:k}),p&&eQ({strategy:"referenceHidden",...W})]}),[F,V]=F4(R),I=Yn(w);In(()=>{H&&(I==null||I())},[H,I]);const z=(ie=q.arrow)==null?void 0:ie.x,X=(re=q.arrow)==null?void 0:re.y,Z=((J=q.arrow)==null?void 0:J.centerOffset)!==0,[ee,se]=b.useState();return In(()=>{E&&se(window.getComputedStyle(E).zIndex)},[E]),g.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:H?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(ce=q.transformOrigin)==null?void 0:ce.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:g.jsx(iQ,{scope:n,placedSide:F,onArrowChange:T,arrowX:z,arrowY:X,shouldHideArrow:Z,children:g.jsx(Me.div,{"data-side":F,"data-align":V,...x,ref:j,style:{...x.style,animation:H?void 0:"none"}})})})});B4.displayName=$O;var U4="PopperArrow",sQ={top:"bottom",right:"left",bottom:"top",left:"right"},H4=b.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=oQ(U4,r),s=sQ[i.placedSide];return g.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:g.jsx(rQ,{...a,ref:n,style:{...a.style,display:"block"}})})});H4.displayName=U4;function lQ(e){return e!==null}var cQ=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]=F4(n),h={start:"0%",center:"50%",end:"100%"}[m],p=(((E=a.arrow)==null?void 0:E.x)??0)+c/2,y=(((C=a.arrow)==null?void 0:C.y)??0)+u/2;let w="",x="";return f==="bottom"?(w=s?h:`${p}px`,x=`${-u}px`):f==="top"?(w=s?h:`${p}px`,x=`${r.floating.height+u}px`):f==="right"?(w=`${-u}px`,x=s?h:`${y}px`):f==="left"&&(w=`${r.floating.width+u}px`,x=s?h:`${y}px`),{data:{x:w,y:x}}}});function F4(e){const[t,n="center"]=e.split("-");return[t,n]}var BO=L4,UO=$4,HO=B4,FO=H4,t1="rovingFocusGroup.onEntryFocus",uQ={bubbles:!1,cancelable:!0},Sm="RovingFocusGroup",[OE,q4,fQ]=yO(Sm),[dQ,t0]=Za(Sm,[fQ]),[hQ,mQ]=dQ(Sm),K4=b.forwardRef((e,t)=>g.jsx(OE.Provider,{scope:e.__scopeRovingFocusGroup,children:g.jsx(OE.Slot,{scope:e.__scopeRovingFocusGroup,children:g.jsx(pQ,{...e,ref:t})})}));K4.displayName=Sm;var pQ=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...h}=e,p=b.useRef(null),y=Ze(t,p),w=ym(i),[x,S]=Gs({prop:s,defaultProp:c??null,onChange:u,caller:Sm}),[E,C]=b.useState(!1),j=Yn(f),A=q4(n),T=b.useRef(!1),[N,P]=b.useState(0);return b.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(t1,j),()=>k.removeEventListener(t1,j)},[j]),g.jsx(hQ,{scope:n,orientation:r,dir:w,loop:a,currentTabStopId:x,onItemFocus:b.useCallback(k=>S(k),[S]),onItemShiftTab:b.useCallback(()=>C(!0),[]),onFocusableItemAdd:b.useCallback(()=>P(k=>k+1),[]),onFocusableItemRemove:b.useCallback(()=>P(k=>k-1),[]),children:g.jsx(Me.div,{tabIndex:E||N===0?-1:0,"data-orientation":r,...h,ref:y,style:{outline:"none",...e.style},onMouseDown:we(e.onMouseDown,()=>{T.current=!0}),onFocus:we(e.onFocus,k=>{const D=!T.current;if(k.target===k.currentTarget&&D&&!E){const K=new CustomEvent(t1,uQ);if(k.currentTarget.dispatchEvent(K),!K.defaultPrevented){const B=A().filter(R=>R.focusable),L=B.find(R=>R.active),W=B.find(R=>R.id===x),Y=[L,W,...B].filter(Boolean).map(R=>R.ref.current);X4(Y,m)}}T.current=!1}),onBlur:we(e.onBlur,()=>C(!1))})})}),V4="RovingFocusGroupItem",Y4=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:s,...c}=e,u=Dn(),f=i||u,m=mQ(V4,n),h=m.currentTabStopId===f,p=q4(n),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:x}=m;return b.useEffect(()=>{if(r)return y(),()=>w()},[r,y,w]),g.jsx(OE.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:g.jsx(Me.span,{tabIndex:h?0:-1,"data-orientation":m.orientation,...c,ref:t,onMouseDown:we(e.onMouseDown,S=>{r?m.onItemFocus(f):S.preventDefault()}),onFocus:we(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:we(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){m.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const E=yQ(S,m.orientation,m.dir);if(E!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let j=p().filter(A=>A.focusable).map(A=>A.ref.current);if(E==="last")j.reverse();else if(E==="prev"||E==="next"){E==="prev"&&j.reverse();const A=j.indexOf(S.currentTarget);j=m.loop?bQ(j,A+1):j.slice(A+1)}setTimeout(()=>X4(j))}}),children:typeof s=="function"?s({isCurrentTabStop:h,hasTabStop:x!=null}):s})})});Y4.displayName=V4;var vQ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gQ(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yQ(e,t,n){const r=gQ(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vQ[r]}function X4(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var G4=K4,W4=Y4,jE=["Enter"," "],xQ=["ArrowDown","PageUp","Home"],Q4=["ArrowUp","PageDown","End"],wQ=[...xQ,...Q4],SQ={ltr:[...jE,"ArrowRight"],rtl:[...jE,"ArrowLeft"]},EQ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Em="Menu",[Rh,_Q,OQ]=yO(Em),[Dc,Z4]=Za(Em,[OQ,Kf,t0]),n0=Kf(),J4=t0(),[jQ,Ic]=Dc(Em),[CQ,_m]=Dc(Em),e5=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:s=!0}=e,c=n0(t),[u,f]=b.useState(null),m=b.useRef(!1),h=Yn(i),p=ym(a);return b.useEffect(()=>{const y=()=>{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",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),g.jsx(BO,{...c,children:g.jsx(jQ,{scope:t,open:n,onOpenChange:h,content:u,onContentChange:f,children:g.jsx(CQ,{scope:t,onClose:b.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:m,dir:p,modal:s,children:r})})})};e5.displayName=Em;var AQ="MenuAnchor",qO=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=n0(n);return g.jsx(UO,{...a,...r,ref:t})});qO.displayName=AQ;var KO="MenuPortal",[NQ,t5]=Dc(KO,{forceMount:void 0}),n5=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=Ic(KO,t);return g.jsx(NQ,{scope:t,forceMount:n,children:g.jsx(ir,{present:n||i.open,children:g.jsx(xm,{asChild:!0,container:a,children:r})})})};n5.displayName=KO;var Sa="MenuContent",[TQ,VO]=Dc(Sa),r5=b.forwardRef((e,t)=>{const n=t5(Sa,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Ic(Sa,e.__scopeMenu),s=_m(Sa,e.__scopeMenu);return g.jsx(Rh.Provider,{scope:e.__scopeMenu,children:g.jsx(ir,{present:r||i.open,children:g.jsx(Rh.Slot,{scope:e.__scopeMenu,children:s.modal?g.jsx(PQ,{...a,ref:t}):g.jsx(MQ,{...a,ref:t})})})})}),PQ=b.forwardRef((e,t)=>{const n=Ic(Sa,e.__scopeMenu),r=b.useRef(null),a=Ze(t,r);return b.useEffect(()=>{const i=r.current;if(i)return EO(i)},[]),g.jsx(YO,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:we(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MQ=b.forwardRef((e,t)=>{const n=Ic(Sa,e.__scopeMenu);return g.jsx(YO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),RQ=pc("MenuContent.ScrollLock"),YO=b.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:p,onDismiss:y,disableOutsideScroll:w,...x}=e,S=Ic(Sa,n),E=_m(Sa,n),C=n0(n),j=J4(n),A=_Q(n),[T,N]=b.useState(null),P=b.useRef(null),k=Ze(t,P,S.onContentChange),D=b.useRef(0),K=b.useRef(""),B=b.useRef(0),L=b.useRef(null),W=b.useRef("right"),$=b.useRef(0),Y=w?Gy:b.Fragment,R=w?{as:RQ,allowPinchZoom:!0}:void 0,H=F=>{var ie,re;const V=K.current+F,I=A().filter(J=>!J.disabled),z=document.activeElement,X=(ie=I.find(J=>J.ref.current===z))==null?void 0:ie.textValue,Z=I.map(J=>J.textValue),ee=KQ(Z,V,X),se=(re=I.find(J=>J.textValue===ee))==null?void 0:re.ref.current;(function J(ce){K.current=ce,window.clearTimeout(D.current),ce!==""&&(D.current=window.setTimeout(()=>J(""),1e3))})(V),se&&setTimeout(()=>se.focus())};b.useEffect(()=>()=>window.clearTimeout(D.current),[]),SO();const q=b.useCallback(F=>{var I,z;return W.current===((I=L.current)==null?void 0:I.side)&&YQ(F,(z=L.current)==null?void 0:z.area)},[]);return g.jsx(TQ,{scope:n,searchRef:K,onItemEnter:b.useCallback(F=>{q(F)&&F.preventDefault()},[q]),onItemLeave:b.useCallback(F=>{var V;q(F)||((V=P.current)==null||V.focus(),N(null))},[q]),onTriggerLeave:b.useCallback(F=>{q(F)&&F.preventDefault()},[q]),pointerGraceTimerRef:B,onPointerGraceIntentChange:b.useCallback(F=>{L.current=F},[]),children:g.jsx(Y,{...R,children:g.jsx(Yy,{asChild:!0,trapped:a,onMountAutoFocus:we(i,F=>{var V;F.preventDefault(),(V=P.current)==null||V.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:g.jsx(bm,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:p,onDismiss:y,children:g.jsx(G4,{asChild:!0,...j,dir:E.dir,orientation:"vertical",loop:r,currentTabStopId:T,onCurrentTabStopIdChange:N,onEntryFocus:we(u,F=>{E.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(HO,{role:"menu","aria-orientation":"vertical","data-state":b5(S.open),"data-radix-menu-content":"",dir:E.dir,...C,...x,ref:k,style:{outline:"none",...x.style},onKeyDown:we(x.onKeyDown,F=>{const I=F.target.closest("[data-radix-menu-content]")===F.currentTarget,z=F.ctrlKey||F.altKey||F.metaKey,X=F.key.length===1;I&&(F.key==="Tab"&&F.preventDefault(),!z&&X&&H(F.key));const Z=P.current;if(F.target!==Z||!wQ.includes(F.key))return;F.preventDefault();const se=A().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Q4.includes(F.key)&&se.reverse(),FQ(se)}),onBlur:we(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(D.current),K.current="")}),onPointerMove:we(e.onPointerMove,kh(F=>{const V=F.target,I=$.current!==F.clientX;if(F.currentTarget.contains(V)&&I){const z=F.clientX>$.current?"right":"left";W.current=z,$.current=F.clientX}}))})})})})})})});r5.displayName=Sa;var kQ="MenuGroup",XO=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Me.div,{role:"group",...r,ref:t})});XO.displayName=kQ;var DQ="MenuLabel",a5=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Me.div,{...r,ref:t})});a5.displayName=DQ;var Ag="MenuItem",CM="menu.itemSelect",r0=b.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=b.useRef(null),s=_m(Ag,e.__scopeMenu),c=VO(Ag,e.__scopeMenu),u=Ze(t,i),f=b.useRef(!1),m=()=>{const h=i.current;if(!n&&h){const p=new CustomEvent(CM,{bubbles:!0,cancelable:!0});h.addEventListener(CM,y=>r==null?void 0:r(y),{once:!0}),Hz(h,p),p.defaultPrevented?f.current=!1:s.onClose()}};return g.jsx(i5,{...a,ref:u,disabled:n,onClick:we(e.onClick,m),onPointerDown:h=>{var p;(p=e.onPointerDown)==null||p.call(e,h),f.current=!0},onPointerUp:we(e.onPointerUp,h=>{var p;f.current||(p=h.currentTarget)==null||p.click()}),onKeyDown:we(e.onKeyDown,h=>{const p=c.searchRef.current!=="";n||p&&h.key===" "||jE.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});r0.displayName=Ag;var i5=b.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,s=VO(Ag,n),c=J4(n),u=b.useRef(null),f=Ze(t,u),[m,h]=b.useState(!1),[p,y]=b.useState("");return b.useEffect(()=>{const w=u.current;w&&y((w.textContent??"").trim())},[i.children]),g.jsx(Rh.ItemSlot,{scope:n,disabled:r,textValue:a??p,children:g.jsx(W4,{asChild:!0,...c,focusable:!r,children:g.jsx(Me.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:we(e.onPointerMove,kh(w=>{r?s.onItemLeave(w):(s.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:we(e.onPointerLeave,kh(w=>s.onItemLeave(w))),onFocus:we(e.onFocus,()=>h(!0)),onBlur:we(e.onBlur,()=>h(!1))})})})}),IQ="MenuCheckboxItem",o5=b.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return g.jsx(f5,{scope:e.__scopeMenu,checked:n,children:g.jsx(r0,{role:"menuitemcheckbox","aria-checked":Ng(n)?"mixed":n,...a,ref:t,"data-state":WO(n),onSelect:we(a.onSelect,()=>r==null?void 0:r(Ng(n)?!0:!n),{checkForDefaultPrevented:!1})})})});o5.displayName=IQ;var s5="MenuRadioGroup",[LQ,zQ]=Dc(s5,{value:void 0,onValueChange:()=>{}}),l5=b.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=Yn(r);return g.jsx(LQ,{scope:e.__scopeMenu,value:n,onValueChange:i,children:g.jsx(XO,{...a,ref:t})})});l5.displayName=s5;var c5="MenuRadioItem",u5=b.forwardRef((e,t)=>{const{value:n,...r}=e,a=zQ(c5,e.__scopeMenu),i=n===a.value;return g.jsx(f5,{scope:e.__scopeMenu,checked:i,children:g.jsx(r0,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":WO(i),onSelect:we(r.onSelect,()=>{var s;return(s=a.onValueChange)==null?void 0:s.call(a,n)},{checkForDefaultPrevented:!1})})})});u5.displayName=c5;var GO="MenuItemIndicator",[f5,$Q]=Dc(GO,{checked:!1}),d5=b.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=$Q(GO,n);return g.jsx(ir,{present:r||Ng(i.checked)||i.checked===!0,children:g.jsx(Me.span,{...a,ref:t,"data-state":WO(i.checked)})})});d5.displayName=GO;var BQ="MenuSeparator",h5=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return g.jsx(Me.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});h5.displayName=BQ;var UQ="MenuArrow",m5=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=n0(n);return g.jsx(FO,{...a,...r,ref:t})});m5.displayName=UQ;var HQ="MenuSub",[$Te,p5]=Dc(HQ),bh="MenuSubTrigger",v5=b.forwardRef((e,t)=>{const n=Ic(bh,e.__scopeMenu),r=_m(bh,e.__scopeMenu),a=p5(bh,e.__scopeMenu),i=VO(bh,e.__scopeMenu),s=b.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=i,f={__scopeMenu:e.__scopeMenu},m=b.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return b.useEffect(()=>m,[m]),b.useEffect(()=>{const h=c.current;return()=>{window.clearTimeout(h),u(null)}},[c,u]),g.jsx(qO,{asChild:!0,...f,children:g.jsx(i5,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":b5(n.open),...e,ref:_o(t,a.onTriggerChange),onClick:h=>{var p;(p=e.onClick)==null||p.call(e,h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:we(e.onPointerMove,kh(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:we(e.onPointerLeave,kh(h=>{var y,w;m();const p=(y=n.content)==null?void 0:y.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"],j=p[S?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+E,y:h.clientY},{x:C,y:p.top},{x:j,y:p.top},{x:j,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(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:we(e.onKeyDown,h=>{var y;const p=i.searchRef.current!=="";e.disabled||p&&h.key===" "||SQ[r.dir].includes(h.key)&&(n.onOpenChange(!0),(y=n.content)==null||y.focus(),h.preventDefault())})})})});v5.displayName=bh;var g5="MenuSubContent",y5=b.forwardRef((e,t)=>{const n=t5(Sa,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Ic(Sa,e.__scopeMenu),s=_m(Sa,e.__scopeMenu),c=p5(g5,e.__scopeMenu),u=b.useRef(null),f=Ze(t,u);return g.jsx(Rh.Provider,{scope:e.__scopeMenu,children:g.jsx(ir,{present:r||i.open,children:g.jsx(Rh.Slot,{scope:e.__scopeMenu,children:g.jsx(YO,{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 h;s.isUsingKeyboardRef.current&&((h=u.current)==null||h.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:we(e.onFocusOutside,m=>{m.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:we(e.onEscapeKeyDown,m=>{s.onClose(),m.preventDefault()}),onKeyDown:we(e.onKeyDown,m=>{var y;const h=m.currentTarget.contains(m.target),p=EQ[s.dir].includes(m.key);h&&p&&(i.onOpenChange(!1),(y=c.trigger)==null||y.focus(),m.preventDefault())})})})})})});y5.displayName=g5;function b5(e){return e?"open":"closed"}function Ng(e){return e==="indeterminate"}function WO(e){return Ng(e)?"indeterminate":e?"checked":"unchecked"}function FQ(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function KQ(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=qQ(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 VQ(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,h=u.x,p=u.y;m>r!=p>r&&n<(h-f)*(r-m)/(p-m)+f&&(a=!a)}return a}function YQ(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return VQ(n,t)}function kh(e){return t=>t.pointerType==="mouse"?e(t):void 0}var XQ=e5,GQ=qO,WQ=n5,QQ=r5,ZQ=XO,JQ=a5,eZ=r0,tZ=o5,nZ=l5,rZ=u5,aZ=d5,iZ=h5,oZ=m5,sZ=v5,lZ=y5,a0="DropdownMenu",[cZ]=Za(a0,[Z4]),mr=Z4(),[uZ,x5]=cZ(a0),w5=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:s,modal:c=!0}=e,u=mr(t),f=b.useRef(null),[m,h]=Gs({prop:a,defaultProp:i??!1,onChange:s,caller:a0});return g.jsx(uZ,{scope:t,triggerId:Dn(),triggerRef:f,contentId:Dn(),open:m,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),modal:c,children:g.jsx(XQ,{...u,open:m,onOpenChange:h,dir:r,modal:c,children:n})})};w5.displayName=a0;var S5="DropdownMenuTrigger",E5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=x5(S5,n),s=mr(n);return g.jsx(GQ,{asChild:!0,...s,children:g.jsx(Me.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:_o(t,i.triggerRef),onPointerDown:we(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:we(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});E5.displayName=S5;var fZ="DropdownMenuPortal",_5=e=>{const{__scopeDropdownMenu:t,...n}=e,r=mr(t);return g.jsx(WQ,{...r,...n})};_5.displayName=fZ;var O5="DropdownMenuContent",j5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=x5(O5,n),i=mr(n),s=b.useRef(!1);return g.jsx(QQ,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:we(e.onCloseAutoFocus,c=>{var u;s.current||(u=a.triggerRef.current)==null||u.focus(),s.current=!1,c.preventDefault()}),onInteractOutside:we(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)"}})});j5.displayName=O5;var dZ="DropdownMenuGroup",hZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(ZQ,{...a,...r,ref:t})});hZ.displayName=dZ;var mZ="DropdownMenuLabel",pZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(JQ,{...a,...r,ref:t})});pZ.displayName=mZ;var vZ="DropdownMenuItem",C5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(eZ,{...a,...r,ref:t})});C5.displayName=vZ;var gZ="DropdownMenuCheckboxItem",A5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(tZ,{...a,...r,ref:t})});A5.displayName=gZ;var yZ="DropdownMenuRadioGroup",bZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(nZ,{...a,...r,ref:t})});bZ.displayName=yZ;var xZ="DropdownMenuRadioItem",wZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(rZ,{...a,...r,ref:t})});wZ.displayName=xZ;var SZ="DropdownMenuItemIndicator",N5=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(aZ,{...a,...r,ref:t})});N5.displayName=SZ;var EZ="DropdownMenuSeparator",_Z=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(iZ,{...a,...r,ref:t})});_Z.displayName=EZ;var OZ="DropdownMenuArrow",jZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(oZ,{...a,...r,ref:t})});jZ.displayName=OZ;var CZ="DropdownMenuSubTrigger",AZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(sZ,{...a,...r,ref:t})});AZ.displayName=CZ;var NZ="DropdownMenuSubContent",TZ=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=mr(n);return g.jsx(lZ,{...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)"}})});TZ.displayName=NZ;var PZ=w5,MZ=E5,RZ=_5,kZ=j5,DZ=C5,IZ=A5,LZ=N5,zZ="Label",T5=b.forwardRef((e,t)=>g.jsx(Me.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())}}));T5.displayName=zZ;var $Z=T5;function CE(e,[t,n]){return Math.min(n,Math.max(t,e))}function BZ(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var QO="ScrollArea",[P5]=Za(QO),[UZ,Oa]=P5(QO),M5=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:i=600,...s}=e,[c,u]=b.useState(null),[f,m]=b.useState(null),[h,p]=b.useState(null),[y,w]=b.useState(null),[x,S]=b.useState(null),[E,C]=b.useState(0),[j,A]=b.useState(0),[T,N]=b.useState(!1),[P,k]=b.useState(!1),D=Ze(t,B=>u(B)),K=ym(a);return g.jsx(UZ,{scope:n,type:r,dir:K,scrollHideDelay:i,scrollArea:c,viewport:f,onViewportChange:m,content:h,onContentChange:p,scrollbarX:y,onScrollbarXChange:w,scrollbarXEnabled:T,onScrollbarXEnabledChange:N,scrollbarY:x,onScrollbarYChange:S,scrollbarYEnabled:P,onScrollbarYEnabledChange:k,onCornerWidthChange:C,onCornerHeightChange:A,children:g.jsx(Me.div,{dir:K,...s,ref:D,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":j+"px",...e.style}})})});M5.displayName=QO;var R5="ScrollAreaViewport",k5=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:a,...i}=e,s=Oa(R5,n),c=b.useRef(null),u=Ze(t,c,s.onViewportChange);return g.jsxs(g.Fragment,{children:[g.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}),g.jsx(Me.div,{"data-radix-scroll-area-viewport":"",...i,ref:u,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:g.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});k5.displayName=R5;var Di="ScrollAreaScrollbar",D5=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Oa(Di,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=a,c=e.orientation==="horizontal";return b.useEffect(()=>(c?i(!0):s(!0),()=>{c?i(!1):s(!1)}),[c,i,s]),a.type==="hover"?g.jsx(HZ,{...r,ref:t,forceMount:n}):a.type==="scroll"?g.jsx(FZ,{...r,ref:t,forceMount:n}):a.type==="auto"?g.jsx(I5,{...r,ref:t,forceMount:n}):a.type==="always"?g.jsx(ZO,{...r,ref:t}):null});D5.displayName=Di;var HZ=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Oa(Di,e.__scopeScrollArea),[i,s]=b.useState(!1);return b.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]),g.jsx(ir,{present:n||i,children:g.jsx(I5,{"data-state":i?"visible":"hidden",...r,ref:t})})}),FZ=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=Oa(Di,e.__scopeScrollArea),i=e.orientation==="horizontal",s=o0(()=>u("SCROLL_END"),100),[c,u]=BZ("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 b.useEffect(()=>{if(c==="idle"){const f=window.setTimeout(()=>u("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(f)}},[c,a.scrollHideDelay,u]),b.useEffect(()=>{const f=a.viewport,m=i?"scrollLeft":"scrollTop";if(f){let h=f[m];const p=()=>{const y=f[m];h!==y&&(u("SCROLL"),s()),h=y};return f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[a.viewport,i,u,s]),g.jsx(ir,{present:n||c!=="hidden",children:g.jsx(ZO,{"data-state":c==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:we(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:we(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),I5=b.forwardRef((e,t)=>{const n=Oa(Di,e.__scopeScrollArea),{forceMount:r,...a}=e,[i,s]=b.useState(!1),c=e.orientation==="horizontal",u=o0(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;s(c?f:m)}},10);return wf(n.viewport,u),wf(n.content,u),g.jsx(ir,{present:r||i,children:g.jsx(ZO,{"data-state":i?"visible":"hidden",...a,ref:t})})}),ZO=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=Oa(Di,e.__scopeScrollArea),i=b.useRef(null),s=b.useRef(0),[c,u]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=U5(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 h(p,y){return GZ(p,s.current,c,y)}return n==="horizontal"?g.jsx(qZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const p=a.viewport.scrollLeft,y=AM(p,c,a.dir);i.current.style.transform=`translate3d(${y}px, 0, 0)`}},onWheelScroll:p=>{a.viewport&&(a.viewport.scrollLeft=p)},onDragScroll:p=>{a.viewport&&(a.viewport.scrollLeft=h(p,a.dir))}}):n==="vertical"?g.jsx(KZ,{...m,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const p=a.viewport.scrollTop,y=AM(p,c);i.current.style.transform=`translate3d(0, ${y}px, 0)`}},onWheelScroll:p=>{a.viewport&&(a.viewport.scrollTop=p)},onDragScroll:p=>{a.viewport&&(a.viewport.scrollTop=h(p))}}):null}),qZ=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=Oa(Di,e.__scopeScrollArea),[s,c]=b.useState(),u=b.useRef(null),f=Ze(t,u,i.onScrollbarXChange);return b.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),g.jsx(z5,{"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":i0(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,h)=>{if(i.viewport){const p=i.viewport.scrollLeft+m.deltaX;e.onWheelScroll(p),F5(p,h)&&m.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:Pg(s.paddingLeft),paddingEnd:Pg(s.paddingRight)}})}})}),KZ=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=Oa(Di,e.__scopeScrollArea),[s,c]=b.useState(),u=b.useRef(null),f=Ze(t,u,i.onScrollbarYChange);return b.useEffect(()=>{u.current&&c(getComputedStyle(u.current))},[u]),g.jsx(z5,{"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":i0(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,h)=>{if(i.viewport){const p=i.viewport.scrollTop+m.deltaY;e.onWheelScroll(p),F5(p,h)&&m.preventDefault()}},onResize:()=>{u.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:Pg(s.paddingTop),paddingEnd:Pg(s.paddingBottom)}})}})}),[VZ,L5]=P5(Di),z5=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:u,onDragScroll:f,onWheelScroll:m,onResize:h,...p}=e,y=Oa(Di,n),[w,x]=b.useState(null),S=Ze(t,D=>x(D)),E=b.useRef(null),C=b.useRef(""),j=y.viewport,A=r.content-r.viewport,T=Yn(m),N=Yn(u),P=o0(h,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 b.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})},[j,w,A,T]),b.useEffect(N,[r,N]),wf(w,P),wf(y.content,P),g.jsx(VZ,{scope:n,scrollbar:w,hasThumb:a,onThumbChange:Yn(i),onThumbPointerUp:Yn(s),onThumbPositionChange:N,onThumbPointerDown:Yn(c),children:g.jsx(Me.div,{...p,ref:S,style:{position:"absolute",...p.style},onPointerDown:we(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",y.viewport&&(y.viewport.style.scrollBehavior="auto"),k(D))}),onPointerMove:we(e.onPointerMove,k),onPointerUp:we(e.onPointerUp,D=>{const K=D.target;K.hasPointerCapture(D.pointerId)&&K.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=C.current,y.viewport&&(y.viewport.style.scrollBehavior=""),E.current=null})})})}),Tg="ScrollAreaThumb",$5=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=L5(Tg,e.__scopeScrollArea);return g.jsx(ir,{present:n||a.hasThumb,children:g.jsx(YZ,{ref:t,...r})})}),YZ=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,i=Oa(Tg,n),s=L5(Tg,n),{onThumbPositionChange:c}=s,u=Ze(t,h=>s.onThumbChange(h)),f=b.useRef(void 0),m=o0(()=>{f.current&&(f.current(),f.current=void 0)},100);return b.useEffect(()=>{const h=i.viewport;if(h){const p=()=>{if(m(),!f.current){const y=WZ(h,c);f.current=y,c()}};return c(),h.addEventListener("scroll",p),()=>h.removeEventListener("scroll",p)}},[i.viewport,m,c]),g.jsx(Me.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:we(e.onPointerDownCapture,h=>{const y=h.target.getBoundingClientRect(),w=h.clientX-y.left,x=h.clientY-y.top;s.onThumbPointerDown({x:w,y:x})}),onPointerUp:we(e.onPointerUp,s.onThumbPointerUp)})});$5.displayName=Tg;var JO="ScrollAreaCorner",B5=b.forwardRef((e,t)=>{const n=Oa(JO,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?g.jsx(XZ,{...e,ref:t}):null});B5.displayName=JO;var XZ=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=Oa(JO,n),[i,s]=b.useState(0),[c,u]=b.useState(0),f=!!(i&&c);return wf(a.scrollbarX,()=>{var h;const m=((h=a.scrollbarX)==null?void 0:h.offsetHeight)||0;a.onCornerHeightChange(m),u(m)}),wf(a.scrollbarY,()=>{var h;const m=((h=a.scrollbarY)==null?void 0:h.offsetWidth)||0;a.onCornerWidthChange(m),s(m)}),f?g.jsx(Me.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 Pg(e){return e?parseInt(e,10):0}function U5(e,t){const n=e/t;return isNaN(n)?0:n}function i0(e){const t=U5(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function GZ(e,t,n,r="ltr"){const a=i0(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,h=r==="ltr"?[0,m]:[m*-1,0];return H5([u,f],h)(e)}function AM(e,t,n="ltr"){const r=i0(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=CE(e,u);return H5([0,s],[0,c])(f)}function H5(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 F5(e,t){return e>0&&e<t}var WZ=(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 o0(e,t){const n=Yn(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function wf(e,t){const n=Yn(t);In(()=>{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 QZ=M5,ZZ=k5,JZ=B5,eJ=[" ","Enter","ArrowUp","ArrowDown"],tJ=[" ","Enter"],yc="Select",[s0,l0,nJ]=yO(yc),[Vf]=Za(yc,[nJ,Kf]),c0=Kf(),[rJ,ul]=Vf(yc),[aJ,iJ]=Vf(yc),q5=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:s,defaultValue:c,onValueChange:u,dir:f,name:m,autoComplete:h,disabled:p,required:y,form:w}=e,x=c0(t),[S,E]=b.useState(null),[C,j]=b.useState(null),[A,T]=b.useState(!1),N=ym(f),[P,k]=Gs({prop:r,defaultProp:a??!1,onChange:i,caller:yc}),[D,K]=Gs({prop:s,defaultProp:c,onChange:u,caller:yc}),B=b.useRef(null),L=S?w||!!S.closest("form"):!0,[W,$]=b.useState(new Set),Y=Array.from(W).map(R=>R.props.value).join(";");return g.jsx(BO,{...x,children:g.jsxs(rJ,{required:y,scope:t,trigger:S,onTriggerChange:E,valueNode:C,onValueNodeChange:j,valueNodeHasChildren:A,onValueNodeHasChildrenChange:T,contentId:Dn(),value:D,onValueChange:K,open:P,onOpenChange:k,dir:N,triggerPointerDownPosRef:B,disabled:p,children:[g.jsx(s0.Provider,{scope:t,children:g.jsx(aJ,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(R=>{$(H=>new Set(H).add(R))},[]),onNativeOptionRemove:b.useCallback(R=>{$(H=>{const q=new Set(H);return q.delete(R),q})},[]),children:n})}),L?g.jsxs(d$,{"aria-hidden":!0,required:y,tabIndex:-1,name:m,autoComplete:h,value:D,onChange:R=>K(R.target.value),disabled:p,form:w,children:[D===void 0?g.jsx("option",{value:""}):null,Array.from(W)]},Y):null]})})};q5.displayName=yc;var K5="SelectTrigger",V5=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,i=c0(n),s=ul(K5,n),c=s.disabled||r,u=Ze(t,s.onTriggerChange),f=l0(n),m=b.useRef("touch"),[h,p,y]=m$(x=>{const S=f().filter(j=>!j.disabled),E=S.find(j=>j.value===s.value),C=p$(S,x,E);C!==void 0&&s.onValueChange(C.value)}),w=x=>{c||(s.onOpenChange(!0),y()),x&&(s.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})};return g.jsx(UO,{asChild:!0,...i,children:g.jsx(Me.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":h$(s.value)?"":void 0,...a,ref:u,onClick:we(a.onClick,x=>{x.currentTarget.focus(),m.current!=="mouse"&&w(x)}),onPointerDown:we(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:we(a.onKeyDown,x=>{const S=h.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&p(x.key),!(S&&x.key===" ")&&eJ.includes(x.key)&&(w(),x.preventDefault())})})})});V5.displayName=K5;var Y5="SelectValue",X5=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:s="",...c}=e,u=ul(Y5,n),{onValueNodeHasChildrenChange:f}=u,m=i!==void 0,h=Ze(t,u.onValueNodeChange);return In(()=>{f(m)},[f,m]),g.jsx(Me.span,{...c,ref:h,style:{pointerEvents:"none"},children:h$(u.value)?g.jsx(g.Fragment,{children:s}):i})});X5.displayName=Y5;var oJ="SelectIcon",G5=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return g.jsx(Me.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});G5.displayName=oJ;var sJ="SelectPortal",W5=e=>g.jsx(xm,{asChild:!0,...e});W5.displayName=sJ;var bc="SelectContent",Q5=b.forwardRef((e,t)=>{const n=ul(bc,e.__scopeSelect),[r,a]=b.useState();if(In(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?cl.createPortal(g.jsx(Z5,{scope:e.__scopeSelect,children:g.jsx(s0.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),i):null}return g.jsx(J5,{...e,ref:t})});Q5.displayName=bc;var Ra=10,[Z5,fl]=Vf(bc),lJ="SelectContentImpl",cJ=pc("SelectContent.RemoveScroll"),J5=b.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:h,collisionBoundary:p,collisionPadding:y,sticky:w,hideWhenDetached:x,avoidCollisions:S,...E}=e,C=ul(bc,n),[j,A]=b.useState(null),[T,N]=b.useState(null),P=Ze(t,ie=>A(ie)),[k,D]=b.useState(null),[K,B]=b.useState(null),L=l0(n),[W,$]=b.useState(!1),Y=b.useRef(!1);b.useEffect(()=>{if(j)return EO(j)},[j]),SO();const R=b.useCallback(ie=>{const[re,...J]=L().map(ne=>ne.ref.current),[ce]=J.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===ce&&T&&(T.scrollTop=T.scrollHeight),ne==null||ne.focus(),document.activeElement!==me))return},[L,T]),H=b.useCallback(()=>R([k,j]),[R,k,j]);b.useEffect(()=>{W&&H()},[W,H]);const{onOpenChange:q,triggerPointerDownPosRef:F}=C;b.useEffect(()=>{if(j){let ie={x:0,y:0};const re=ce=>{var me,ne;ie={x:Math.abs(Math.round(ce.pageX)-(((me=F.current)==null?void 0:me.x)??0)),y:Math.abs(Math.round(ce.pageY)-(((ne=F.current)==null?void 0:ne.y)??0))}},J=ce=>{ie.x<=10&&ie.y<=10?ce.preventDefault():j.contains(ce.target)||q(!1),document.removeEventListener("pointermove",re),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",J,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",J,{capture:!0})}}},[j,q,F]),b.useEffect(()=>{const ie=()=>q(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[q]);const[V,I]=m$(ie=>{const re=L().filter(me=>!me.disabled),J=re.find(me=>me.ref.current===document.activeElement),ce=p$(re,ie,J);ce&&setTimeout(()=>ce.ref.current.focus())}),z=b.useCallback((ie,re,J)=>{const ce=!Y.current&&!J;(C.value!==void 0&&C.value===re||ce)&&(D(ie),ce&&(Y.current=!0))},[C.value]),X=b.useCallback(()=>j==null?void 0:j.focus(),[j]),Z=b.useCallback((ie,re,J)=>{const ce=!Y.current&&!J;(C.value!==void 0&&C.value===re||ce)&&B(ie)},[C.value]),ee=r==="popper"?AE:e$,se=ee===AE?{side:c,sideOffset:u,align:f,alignOffset:m,arrowPadding:h,collisionBoundary:p,collisionPadding:y,sticky:w,hideWhenDetached:x,avoidCollisions:S}:{};return g.jsx(Z5,{scope:n,content:j,viewport:T,onViewportChange:N,itemRefCallback:z,selectedItem:k,onItemLeave:X,itemTextRefCallback:Z,focusSelectedItem:H,selectedItemText:K,position:r,isPositioned:W,searchRef:V,children:g.jsx(Gy,{as:cJ,allowPinchZoom:!0,children:g.jsx(Yy,{asChild:!0,trapped:C.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:we(a,ie=>{var re;(re=C.trigger)==null||re.focus({preventScroll:!0}),ie.preventDefault()}),children:g.jsx(bm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:g.jsx(ee,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:ie=>ie.preventDefault(),...E,...se,onPlaced:()=>$(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:we(E.onKeyDown,ie=>{const re=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!re&&ie.key.length===1&&I(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let ce=L().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const me=ie.target,ne=ce.indexOf(me);ce=ce.slice(ne+1)}setTimeout(()=>R(ce)),ie.preventDefault()}})})})})})})});J5.displayName=lJ;var uJ="SelectItemAlignedPosition",e$=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,i=ul(bc,n),s=fl(bc,n),[c,u]=b.useState(null),[f,m]=b.useState(null),h=Ze(t,P=>m(P)),p=l0(n),y=b.useRef(!1),w=b.useRef(!0),{viewport:x,selectedItem:S,selectedItemText:E,focusSelectedItem:C}=s,j=b.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,ye=P.left-ne,xe=P.width+ye,Ie=Math.max(xe,k.width),Pe=window.innerWidth-Ra,Ve=CE(ne,[Ra,Math.max(Ra,Pe-Ie)]);c.style.minWidth=xe+"px",c.style.left=Ve+"px"}else{const me=k.right-K.right,ne=window.innerWidth-D.right-me,ye=window.innerWidth-P.right-ne,xe=P.width+ye,Ie=Math.max(xe,k.width),Pe=window.innerWidth-Ra,Ve=CE(ne,[Ra,Math.max(Ra,Pe-Ie)]);c.style.minWidth=xe+"px",c.style.right=Ve+"px"}const B=p(),L=window.innerHeight-Ra*2,W=x.scrollHeight,$=window.getComputedStyle(f),Y=parseInt($.borderTopWidth,10),R=parseInt($.paddingTop,10),H=parseInt($.borderBottomWidth,10),q=parseInt($.paddingBottom,10),F=Y+R+W+q+H,V=Math.min(S.offsetHeight*5,F),I=window.getComputedStyle(x),z=parseInt(I.paddingTop,10),X=parseInt(I.paddingBottom,10),Z=P.top+P.height/2-Ra,ee=L-Z,se=S.offsetHeight/2,ie=S.offsetTop+se,re=Y+R+ie,J=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,ye=Math.max(ee,se+(me?X:0)+ne+H),xe=re+ye;c.style.height=xe+"px"}else{const me=B.length>0&&S===B[0].ref.current;c.style.top="0px";const ye=Math.max(Z,Y+x.offsetTop+(me?z:0)+se)+J;c.style.height=ye+"px",x.scrollTop=re-Z+x.offsetTop}c.style.margin=`${Ra}px 0`,c.style.minHeight=V+"px",c.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>y.current=!0)}},[p,i.trigger,i.valueNode,c,f,x,S,E,i.dir,r]);In(()=>j(),[j]);const[A,T]=b.useState();In(()=>{f&&T(window.getComputedStyle(f).zIndex)},[f]);const N=b.useCallback(P=>{P&&w.current===!0&&(j(),C==null||C(),w.current=!1)},[j,C]);return g.jsx(dJ,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:y,onScrollButtonChange:N,children:g.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:g.jsx(Me.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});e$.displayName=uJ;var fJ="SelectPopperPosition",AE=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=Ra,...i}=e,s=c0(n);return g.jsx(HO,{...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)"}})});AE.displayName=fJ;var[dJ,ej]=Vf(bc,{}),NE="SelectViewport",t$=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,i=fl(NE,n),s=ej(NE,n),c=Ze(t,i.onViewportChange),u=b.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),g.jsx(s0.Slot,{scope:n,children:g.jsx(Me.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:we(a.onScroll,f=>{const m=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&h){const y=Math.abs(u.current-m.scrollTop);if(y>0){const w=window.innerHeight-Ra*2,x=parseFloat(h.style.minHeight),S=parseFloat(h.style.height),E=Math.max(x,S);if(E<w){const C=E+y,j=Math.min(w,C),A=C-j;h.style.height=j+"px",h.style.bottom==="0px"&&(m.scrollTop=A>0?A:0,h.style.justifyContent="flex-end")}}}u.current=m.scrollTop})})})]})});t$.displayName=NE;var n$="SelectGroup",[hJ,mJ]=Vf(n$),pJ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=Dn();return g.jsx(hJ,{scope:n,id:a,children:g.jsx(Me.div,{role:"group","aria-labelledby":a,...r,ref:t})})});pJ.displayName=n$;var r$="SelectLabel",vJ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=mJ(r$,n);return g.jsx(Me.div,{id:a.id,...r,ref:t})});vJ.displayName=r$;var Mg="SelectItem",[gJ,a$]=Vf(Mg),i$=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...s}=e,c=ul(Mg,n),u=fl(Mg,n),f=c.value===r,[m,h]=b.useState(i??""),[p,y]=b.useState(!1),w=Ze(t,C=>{var j;return(j=u.itemRefCallback)==null?void 0:j.call(u,C,r,a)}),x=Dn(),S=b.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 g.jsx(gJ,{scope:n,value:r,disabled:a,textId:x,isSelected:f,onItemTextChange:b.useCallback(C=>{h(j=>j||((C==null?void 0:C.textContent)??"").trim())},[]),children:g.jsx(s0.ItemSlot,{scope:n,value:r,disabled:a,textValue:m,children:g.jsx(Me.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:we(s.onFocus,()=>y(!0)),onBlur:we(s.onBlur,()=>y(!1)),onClick:we(s.onClick,()=>{S.current!=="mouse"&&E()}),onPointerUp:we(s.onPointerUp,()=>{S.current==="mouse"&&E()}),onPointerDown:we(s.onPointerDown,C=>{S.current=C.pointerType}),onPointerMove:we(s.onPointerMove,C=>{var j;S.current=C.pointerType,a?(j=u.onItemLeave)==null||j.call(u):S.current==="mouse"&&C.currentTarget.focus({preventScroll:!0})}),onPointerLeave:we(s.onPointerLeave,C=>{var j;C.currentTarget===document.activeElement&&((j=u.onItemLeave)==null||j.call(u))}),onKeyDown:we(s.onKeyDown,C=>{var A;((A=u.searchRef)==null?void 0:A.current)!==""&&C.key===" "||(tJ.includes(C.key)&&E(),C.key===" "&&C.preventDefault())})})})})});i$.displayName=Mg;var xh="SelectItemText",o$=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...i}=e,s=ul(xh,n),c=fl(xh,n),u=a$(xh,n),f=iJ(xh,n),[m,h]=b.useState(null),p=Ze(t,E=>h(E),u.onItemTextChange,E=>{var C;return(C=c.itemTextRefCallback)==null?void 0:C.call(c,E,u.value,u.disabled)}),y=m==null?void 0:m.textContent,w=b.useMemo(()=>g.jsx("option",{value:u.value,disabled:u.disabled,children:y},u.value),[u.disabled,u.value,y]),{onNativeOptionAdd:x,onNativeOptionRemove:S}=f;return In(()=>(x(w),()=>S(w)),[x,S,w]),g.jsxs(g.Fragment,{children:[g.jsx(Me.span,{id:u.textId,...i,ref:p}),u.isSelected&&s.valueNode&&!s.valueNodeHasChildren?cl.createPortal(i.children,s.valueNode):null]})});o$.displayName=xh;var s$="SelectItemIndicator",l$=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return a$(s$,n).isSelected?g.jsx(Me.span,{"aria-hidden":!0,...r,ref:t}):null});l$.displayName=s$;var TE="SelectScrollUpButton",c$=b.forwardRef((e,t)=>{const n=fl(TE,e.__scopeSelect),r=ej(TE,e.__scopeSelect),[a,i]=b.useState(!1),s=Ze(t,r.onScrollButtonChange);return In(()=>{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?g.jsx(f$,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop-u.offsetHeight)}}):null});c$.displayName=TE;var PE="SelectScrollDownButton",u$=b.forwardRef((e,t)=>{const n=fl(PE,e.__scopeSelect),r=ej(PE,e.__scopeSelect),[a,i]=b.useState(!1),s=Ze(t,r.onScrollButtonChange);return In(()=>{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?g.jsx(f$,{...e,ref:s,onAutoScroll:()=>{const{viewport:c,selectedItem:u}=n;c&&u&&(c.scrollTop=c.scrollTop+u.offsetHeight)}}):null});u$.displayName=PE;var f$=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,i=fl("SelectScrollButton",n),s=b.useRef(null),c=l0(n),u=b.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return b.useEffect(()=>()=>u(),[u]),In(()=>{var m;const f=c().find(h=>h.ref.current===document.activeElement);(m=f==null?void 0:f.ref.current)==null||m.scrollIntoView({block:"nearest"})},[c]),g.jsx(Me.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:we(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:we(a.onPointerMove,()=>{var f;(f=i.onItemLeave)==null||f.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:we(a.onPointerLeave,()=>{u()})})}),yJ="SelectSeparator",bJ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return g.jsx(Me.div,{"aria-hidden":!0,...r,ref:t})});bJ.displayName=yJ;var ME="SelectArrow",xJ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=c0(n),i=ul(ME,n),s=fl(ME,n);return i.open&&s.position==="popper"?g.jsx(FO,{...a,...r,ref:t}):null});xJ.displayName=ME;var wJ="SelectBubbleInput",d$=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=b.useRef(null),i=Ze(r,a),s=WG(t);return b.useEffect(()=>{const c=a.current;if(!c)return;const u=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(u,"value").set;if(s!==t&&m){const h=new Event("change",{bubbles:!0});m.call(c,t),c.dispatchEvent(h)}},[s,t]),g.jsx(Me.select,{...n,style:{...Fz,...n.style},ref:i,defaultValue:t})});d$.displayName=wJ;function h$(e){return e===""||e===void 0}function m$(e){const t=Yn(e),n=b.useRef(""),r=b.useRef(0),a=b.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=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function p$(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=SJ(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 SJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var EJ=q5,_J=V5,OJ=X5,jJ=G5,CJ=W5,AJ=Q5,NJ=t$,TJ=i$,PJ=o$,MJ=l$,RJ=c$,kJ=u$,DJ="Separator",NM="horizontal",IJ=["horizontal","vertical"],v$=b.forwardRef((e,t)=>{const{decorative:n,orientation:r=NM,...a}=e,i=LJ(r)?r:NM,c=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return g.jsx(Me.div,{"data-orientation":i,...c,...a,ref:t})});v$.displayName=DJ;function LJ(e){return IJ.includes(e)}var zJ=v$,u0="Tabs",[$J]=Za(u0,[t0]),g$=t0(),[BJ,tj]=$J(u0),y$=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:i,orientation:s="horizontal",dir:c,activationMode:u="automatic",...f}=e,m=ym(c),[h,p]=Gs({prop:r,onChange:a,defaultProp:i??"",caller:u0});return g.jsx(BJ,{scope:n,baseId:Dn(),value:h,onValueChange:p,orientation:s,dir:m,activationMode:u,children:g.jsx(Me.div,{dir:m,"data-orientation":s,...f,ref:t})})});y$.displayName=u0;var b$="TabsList",x$=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,i=tj(b$,n),s=g$(n);return g.jsx(G4,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:r,children:g.jsx(Me.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});x$.displayName=b$;var w$="TabsTrigger",S$=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...i}=e,s=tj(w$,n),c=g$(n),u=O$(s.baseId,r),f=j$(s.baseId,r),m=r===s.value;return g.jsx(W4,{asChild:!0,...c,focusable:!a,active:m,children:g.jsx(Me.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:we(e.onMouseDown,h=>{!a&&h.button===0&&h.ctrlKey===!1?s.onValueChange(r):h.preventDefault()}),onKeyDown:we(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&s.onValueChange(r)}),onFocus:we(e.onFocus,()=>{const h=s.activationMode!=="manual";!m&&!a&&h&&s.onValueChange(r)})})})});S$.displayName=w$;var E$="TabsContent",_$=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:i,...s}=e,c=tj(E$,n),u=O$(c.baseId,r),f=j$(c.baseId,r),m=r===c.value,h=b.useRef(m);return b.useEffect(()=>{const p=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(p)},[]),g.jsx(ir,{present:a||m,children:({present:p})=>g.jsx(Me.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:h.current?"0s":void 0},children:p&&i})})});_$.displayName=E$;function O$(e,t){return`${e}-trigger-${t}`}function j$(e,t){return`${e}-content-${t}`}var UJ=y$,HJ=x$,FJ=S$,qJ=_$,[f0]=Za("Tooltip",[Kf]),d0=Kf(),C$="TooltipProvider",KJ=700,RE="tooltip.open",[VJ,nj]=f0(C$),A$=e=>{const{__scopeTooltip:t,delayDuration:n=KJ,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=e,s=b.useRef(!0),c=b.useRef(!1),u=b.useRef(0);return b.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),g.jsx(VJ,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:b.useCallback(f=>{c.current=f},[]),disableHoverableContent:a,children:i})};A$.displayName=C$;var Dh="Tooltip",[YJ,Om]=f0(Dh),N$=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:s,delayDuration:c}=e,u=nj(Dh,e.__scopeTooltip),f=d0(t),[m,h]=b.useState(null),p=Dn(),y=b.useRef(0),w=s??u.disableHoverableContent,x=c??u.delayDuration,S=b.useRef(!1),[E,C]=Gs({prop:r,defaultProp:a??!1,onChange:P=>{P?(u.onOpen(),document.dispatchEvent(new CustomEvent(RE))):u.onClose(),i==null||i(P)},caller:Dh}),j=b.useMemo(()=>E?S.current?"delayed-open":"instant-open":"closed",[E]),A=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,S.current=!1,C(!0)},[C]),T=b.useCallback(()=>{window.clearTimeout(y.current),y.current=0,C(!1)},[C]),N=b.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{S.current=!0,C(!0),y.current=0},x)},[x,C]);return b.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),g.jsx(BO,{...f,children:g.jsx(YJ,{scope:t,contentId:p,open:E,stateAttribute:j,trigger:m,onTriggerChange:h,onTriggerEnter:b.useCallback(()=>{u.isOpenDelayedRef.current?N():A()},[u.isOpenDelayedRef,N,A]),onTriggerLeave:b.useCallback(()=>{w?T():(window.clearTimeout(y.current),y.current=0)},[T,w]),onOpen:A,onClose:T,disableHoverableContent:w,children:n})})};N$.displayName=Dh;var kE="TooltipTrigger",T$=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Om(kE,n),i=nj(kE,n),s=d0(n),c=b.useRef(null),u=Ze(t,c,a.onTriggerChange),f=b.useRef(!1),m=b.useRef(!1),h=b.useCallback(()=>f.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),g.jsx(UO,{asChild:!0,...s,children:g.jsx(Me.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:u,onPointerMove:we(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),m.current=!0)}),onPointerLeave:we(e.onPointerLeave,()=>{a.onTriggerLeave(),m.current=!1}),onPointerDown:we(e.onPointerDown,()=>{a.open&&a.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:we(e.onFocus,()=>{f.current||a.onOpen()}),onBlur:we(e.onBlur,a.onClose),onClick:we(e.onClick,a.onClose)})})});T$.displayName=kE;var rj="TooltipPortal",[XJ,GJ]=f0(rj,{forceMount:void 0}),P$=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,i=Om(rj,t);return g.jsx(XJ,{scope:t,forceMount:n,children:g.jsx(ir,{present:n||i.open,children:g.jsx(xm,{asChild:!0,container:a,children:r})})})};P$.displayName=rj;var Sf="TooltipContent",M$=b.forwardRef((e,t)=>{const n=GJ(Sf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=e,s=Om(Sf,e.__scopeTooltip);return g.jsx(ir,{present:r||s.open,children:s.disableHoverableContent?g.jsx(R$,{side:a,...i,ref:t}):g.jsx(WJ,{side:a,...i,ref:t})})}),WJ=b.forwardRef((e,t)=>{const n=Om(Sf,e.__scopeTooltip),r=nj(Sf,e.__scopeTooltip),a=b.useRef(null),i=Ze(t,a),[s,c]=b.useState(null),{trigger:u,onClose:f}=n,m=a.current,{onPointerInTransitChange:h}=r,p=b.useCallback(()=>{c(null),h(!1)},[h]),y=b.useCallback((w,x)=>{const S=w.currentTarget,E={x:w.clientX,y:w.clientY},C=eee(E,S.getBoundingClientRect()),j=tee(E,C),A=nee(x.getBoundingClientRect()),T=aee([...j,...A]);c(T),h(!0)},[h]);return b.useEffect(()=>()=>p(),[p]),b.useEffect(()=>{if(u&&m){const w=S=>y(S,m),x=S=>y(S,u);return u.addEventListener("pointerleave",w),m.addEventListener("pointerleave",x),()=>{u.removeEventListener("pointerleave",w),m.removeEventListener("pointerleave",x)}}},[u,m,y,p]),b.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)),j=!ree(E,s);C?p():j&&(p(),f())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,m,s,f,p]),g.jsx(R$,{...e,ref:i})}),[QJ,ZJ]=f0(Dh,{isInside:!1}),JJ=pX("TooltipContent"),R$=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:s,...c}=e,u=Om(Sf,n),f=d0(n),{onClose:m}=u;return b.useEffect(()=>(document.addEventListener(RE,m),()=>document.removeEventListener(RE,m)),[m]),b.useEffect(()=>{if(u.trigger){const h=p=>{const y=p.target;y!=null&&y.contains(u.trigger)&&m()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,m]),g.jsx(bm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:m,children:g.jsxs(HO,{"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:[g.jsx(JJ,{children:r}),g.jsx(QJ,{scope:n,isInside:!0,children:g.jsx(wX,{id:u.contentId,role:"tooltip",children:a||r})})]})})});M$.displayName=Sf;var k$="TooltipArrow",D$=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=d0(n);return ZJ(k$,n).isInside?null:g.jsx(FO,{...a,...r,ref:t})});D$.displayName=k$;function eee(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 tee(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 nee(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 ree(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,h=u.x,p=u.y;m>r!=p>r&&n<(h-f)*(r-m)/(p-m)+f&&(a=!a)}return a}function aee(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),iee(t)}function iee(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 oee=A$,see=N$,lee=T$,cee=P$,uee=M$,fee=D$;function I$(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=I$(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ot(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=I$(e))&&(r&&(r+=" "),r+=t);return r}const dee=(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},hee=(e,t)=>({classGroupId:e,validator:t}),L$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Rg="-",TM=[],mee="arbitrary..",pee=e=>{const t=gee(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return vee(s);const c=s.split(Rg),u=c[0]===""&&c.length>1?1:0;return z$(c,u,t)},getConflictingClassGroupIds:(s,c)=>{if(c){const u=r[s],f=n[s];return u?f?dee(f,u):u:f||TM}return n[s]||TM}}},z$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=z$(e,t+1,i);if(f)return f}const s=n.validators;if(s===null)return;const c=t===0?e.join(Rg):e.slice(t).join(Rg),u=s.length;for(let f=0;f<u;f++){const m=s[f];if(m.validator(c))return m.classGroupId}},vee=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?mee+r:void 0})(),gee=e=>{const{theme:t,classGroups:n}=e;return yee(n,t)},yee=(e,t)=>{const n=L$();for(const r in e){const a=e[r];aj(a,n,r,t)}return n},aj=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const s=e[i];bee(s,t,n,r)}},bee=(e,t,n,r)=>{if(typeof e=="string"){xee(e,t,n);return}if(typeof e=="function"){wee(e,t,n,r);return}See(e,t,n,r)},xee=(e,t,n)=>{const r=e===""?t:$$(t,e);r.classGroupId=n},wee=(e,t,n,r)=>{if(Eee(e)){aj(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(hee(n,e))},See=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let s=0;s<i;s++){const[c,u]=a[s];aj(u,$$(t,c),n,r)}},$$=(e,t)=>{let n=e;const r=t.split(Rg),a=r.length;for(let i=0;i<a;i++){const s=r[i];let c=n.nextPart.get(s);c||(c=L$(),n.nextPart.set(s,c)),n=c}return n},Eee=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_ee=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)}}},DE="!",PM=":",Oee=[],MM=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),jee=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 h=i.length===0?a:a.slice(u);let p=h,y=!1;h.endsWith(DE)?(p=h.slice(0,-1),y=!0):h.startsWith(DE)&&(p=h.slice(1),y=!0);const w=f&&f>u?f-u:void 0;return MM(i,y,p,w)};if(t){const a=t+PM,i=r;r=s=>s.startsWith(a)?i(s.slice(a.length)):MM(Oee,!1,s,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},Cee=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}},Aee=e=>({cache:_ee(e.cacheSize),parseClassName:jee(e),sortModifiers:Cee(e),...pee(e)}),Nee=/\s+/,Tee=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,s=[],c=e.trim().split(Nee);let u="";for(let f=c.length-1;f>=0;f-=1){const m=c[f],{isExternal:h,modifiers:p,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:x}=n(m);if(h){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(":"),j=y?C+DE:C,A=j+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(j+P)}u=m+(u.length>0?" "+u:u)}return u},Pee=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=B$(n))&&(a&&(a+=" "),a+=r);return a},B$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=B$(e[r]))&&(n&&(n+=" "),n+=t);return n},Mee=(e,...t)=>{let n,r,a,i;const s=u=>{const f=t.reduce((m,h)=>h(m),e());return n=Aee(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=Tee(u,n);return a(u,m),m};return i=s,(...u)=>i(Pee(...u))},Ree=[],yn=e=>{const t=n=>n[e]||Ree;return t.isThemeGetter=!0,t},U$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,H$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kee=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Dee=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Iee=/\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$/,Lee=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$ee=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ss=e=>kee.test(e),Ke=e=>!!e&&!Number.isNaN(Number(e)),Es=e=>!!e&&Number.isInteger(Number(e)),n1=e=>e.endsWith("%")&&Ke(e.slice(0,-1)),oo=e=>Dee.test(e),F$=()=>!0,Bee=e=>Iee.test(e)&&!Lee.test(e),ij=()=>!1,Uee=e=>zee.test(e),Hee=e=>$ee.test(e),Fee=e=>!Ce(e)&&!Ne(e),qee=e=>dl(e,V$,ij),Ce=e=>U$.test(e),$l=e=>dl(e,Y$,Bee),RM=e=>dl(e,Zee,Ke),Kee=e=>dl(e,G$,F$),Vee=e=>dl(e,X$,ij),kM=e=>dl(e,q$,ij),Yee=e=>dl(e,K$,Hee),Nv=e=>dl(e,W$,Uee),Ne=e=>H$.test(e),eh=e=>Lc(e,Y$),Xee=e=>Lc(e,X$),DM=e=>Lc(e,q$),Gee=e=>Lc(e,V$),Wee=e=>Lc(e,K$),Tv=e=>Lc(e,W$,!0),Qee=e=>Lc(e,G$,!0),dl=(e,t,n)=>{const r=U$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Lc=(e,t,n=!1)=>{const r=H$.exec(e);return r?r[1]?t(r[1]):n:!1},q$=e=>e==="position"||e==="percentage",K$=e=>e==="image"||e==="url",V$=e=>e==="length"||e==="size"||e==="bg-size",Y$=e=>e==="length",Zee=e=>e==="number",X$=e=>e==="family-name",G$=e=>e==="number"||e==="weight",W$=e=>e==="shadow",Jee=()=>{const e=yn("color"),t=yn("font"),n=yn("text"),r=yn("font-weight"),a=yn("tracking"),i=yn("leading"),s=yn("breakpoint"),c=yn("container"),u=yn("spacing"),f=yn("radius"),m=yn("shadow"),h=yn("inset-shadow"),p=yn("text-shadow"),y=yn("drop-shadow"),w=yn("blur"),x=yn("perspective"),S=yn("aspect"),E=yn("ease"),C=yn("animate"),j=()=>["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(),Ne,Ce],N=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],k=()=>[Ne,Ce,u],D=()=>[Ss,"full","auto",...k()],K=()=>[Es,"none","subgrid",Ne,Ce],B=()=>["auto",{span:["full",Es,Ne,Ce]},Es,Ne,Ce],L=()=>[Es,"auto",Ne,Ce],W=()=>["auto","min","max","fr",Ne,Ce],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...k()],H=()=>[Ss,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],q=()=>[Ss,"screen","full","dvw","lvw","svw","min","max","fit",...k()],F=()=>[Ss,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],V=()=>[e,Ne,Ce],I=()=>[...A(),DM,kM,{position:[Ne,Ce]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],X=()=>["auto","cover","contain",Gee,qee,{size:[Ne,Ce]}],Z=()=>[n1,eh,$l],ee=()=>["","none","full",f,Ne,Ce],se=()=>["",Ke,eh,$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"],J=()=>[Ke,n1,DM,kM],ce=()=>["","none",w,Ne,Ce],me=()=>["none",Ke,Ne,Ce],ne=()=>["none",Ke,Ne,Ce],ye=()=>[Ke,Ne,Ce],xe=()=>[Ss,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[oo],breakpoint:[oo],color:[F$],container:[oo],"drop-shadow":[oo],ease:["in","out","in-out"],font:[Fee],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[oo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[oo],shadow:[oo],spacing:["px",Ke],text:[oo],"text-shadow":[oo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ss,Ce,Ne,S]}],container:["container"],columns:[{columns:[Ke,Ce,Ne,c]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"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:[Es,"auto",Ne,Ce]}],basis:[{basis:[Ss,"full","auto",c,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ke,Ss,"auto","initial","none",Ce]}],grow:[{grow:["",Ke,Ne,Ce]}],shrink:[{shrink:["",Ke,Ne,Ce]}],order:[{order:[Es,"first","last","none",Ne,Ce]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"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:[...$(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],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,eh,$l]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Qee,Kee]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",n1,Ce]}],"font-family":[{font:[Xee,Vee,t]}],"font-features":[{"font-features":[Ce]}],"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,Ne,Ce]}],"line-clamp":[{"line-clamp":[Ke,"none",Ne,RM]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",Ne,Ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ne,Ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:V()}],"text-color":[{text:V()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ke,"from-font","auto",Ne,$l]}],"text-decoration-color":[{decoration:V()}],"underline-offset":[{"underline-offset":[Ke,"auto",Ne,Ce]}],"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",Ne,Ce]}],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",Ne,Ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:X()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Es,Ne,Ce],radial:["",Ne,Ce],conic:[Es,Ne,Ce]},Wee,Yee]}],"bg-color":[{bg:V()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:V()}],"gradient-via":[{via:V()}],"gradient-to":[{to:V()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"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:V()}],"border-color-x":[{"border-x":V()}],"border-color-y":[{"border-y":V()}],"border-color-s":[{"border-s":V()}],"border-color-e":[{"border-e":V()}],"border-color-bs":[{"border-bs":V()}],"border-color-be":[{"border-be":V()}],"border-color-t":[{"border-t":V()}],"border-color-r":[{"border-r":V()}],"border-color-b":[{"border-b":V()}],"border-color-l":[{"border-l":V()}],"divide-color":[{divide:V()}],"outline-style":[{outline:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ke,Ne,Ce]}],"outline-w":[{outline:["",Ke,eh,$l]}],"outline-color":[{outline:V()}],shadow:[{shadow:["","none",m,Tv,Nv]}],"shadow-color":[{shadow:V()}],"inset-shadow":[{"inset-shadow":["none",h,Tv,Nv]}],"inset-shadow-color":[{"inset-shadow":V()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:V()}],"ring-offset-w":[{"ring-offset":[Ke,$l]}],"ring-offset-color":[{"ring-offset":V()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":V()}],"text-shadow":[{"text-shadow":["none",p,Tv,Nv]}],"text-shadow-color":[{"text-shadow":V()}],opacity:[{opacity:[Ke,Ne,Ce]}],"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":[Ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":V()}],"mask-image-linear-to-color":[{"mask-linear-to":V()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":V()}],"mask-image-t-to-color":[{"mask-t-to":V()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":V()}],"mask-image-r-to-color":[{"mask-r-to":V()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":V()}],"mask-image-b-to-color":[{"mask-b-to":V()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":V()}],"mask-image-l-to-color":[{"mask-l-to":V()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":V()}],"mask-image-x-to-color":[{"mask-x-to":V()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":V()}],"mask-image-y-to-color":[{"mask-y-to":V()}],"mask-image-radial":[{"mask-radial":[Ne,Ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":V()}],"mask-image-radial-to-color":[{"mask-radial-to":V()}],"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":[Ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":V()}],"mask-image-conic-to-color":[{"mask-conic-to":V()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:X()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ne,Ce]}],filter:[{filter:["","none",Ne,Ce]}],blur:[{blur:ce()}],brightness:[{brightness:[Ke,Ne,Ce]}],contrast:[{contrast:[Ke,Ne,Ce]}],"drop-shadow":[{"drop-shadow":["","none",y,Tv,Nv]}],"drop-shadow-color":[{"drop-shadow":V()}],grayscale:[{grayscale:["",Ke,Ne,Ce]}],"hue-rotate":[{"hue-rotate":[Ke,Ne,Ce]}],invert:[{invert:["",Ke,Ne,Ce]}],saturate:[{saturate:[Ke,Ne,Ce]}],sepia:[{sepia:["",Ke,Ne,Ce]}],"backdrop-filter":[{"backdrop-filter":["","none",Ne,Ce]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Ke,Ne,Ce]}],"backdrop-contrast":[{"backdrop-contrast":[Ke,Ne,Ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ke,Ne,Ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ke,Ne,Ce]}],"backdrop-invert":[{"backdrop-invert":["",Ke,Ne,Ce]}],"backdrop-opacity":[{"backdrop-opacity":[Ke,Ne,Ce]}],"backdrop-saturate":[{"backdrop-saturate":[Ke,Ne,Ce]}],"backdrop-sepia":[{"backdrop-sepia":["",Ke,Ne,Ce]}],"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",Ne,Ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ke,"initial",Ne,Ce]}],ease:[{ease:["linear","initial",E,Ne,Ce]}],delay:[{delay:[Ke,Ne,Ce]}],animate:[{animate:["none",C,Ne,Ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Ne,Ce]}],"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:ye()}],"skew-x":[{"skew-x":ye()}],"skew-y":[{"skew-y":ye()}],transform:[{transform:[Ne,Ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:T()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:V()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:V()}],"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",Ne,Ce]}],"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",Ne,Ce]}],fill:[{fill:["none",...V()]}],"stroke-w":[{stroke:[Ke,eh,$l,RM]}],stroke:[{stroke:["none",...V()]}],"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"]}},ete=Mee(Jee);function Ae(...e){return ete(ot(e))}function Q$({delayDuration:e=0,...t}){return g.jsx(oee,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function tte({...e}){return g.jsx(see,{"data-slot":"tooltip",...e})}function nte({...e}){return g.jsx(lee,{"data-slot":"tooltip-trigger",...e})}function rte({className:e,sideOffset:t=0,children:n,...r}){return g.jsx(cee,{children:g.jsxs(uee,{"data-slot":"tooltip-content",sideOffset:t,className:Ae("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,g.jsx(fee,{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 Z$=(...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 ate=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 ite=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=ite(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 ote={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 ste=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 lte=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:s,...c},u)=>b.createElement("svg",{ref:u,...ote,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Z$("lucide",a),...!i&&!ste(c)&&{"aria-hidden":"true"},...c},[...s.map(([f,m])=>b.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=b.forwardRef(({className:r,...a},i)=>b.createElement(lte,{ref:i,iconNode:t,className:Z$(`lucide-${ate(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 cte=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],ute=Ue("arrow-down",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 fte=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],J$=Ue("arrow-left",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 dte=[["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"}]],eB=Ue("bot",dte);/**
 * @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 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"}]],tB=Ue("brain",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 mte=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],oj=Ue("check",mte);/**
 * @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:"m6 9 6 6 6-6",key:"qrunsl"}]],Ih=Ue("chevron-down",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:"m15 18-6-6 6-6",key:"1wnfg3"}]],gte=Ue("chevron-left",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 yte=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],h0=Ue("chevron-right",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:"m18 15-6-6-6 6",key:"153udz"}]],xte=Ue("chevron-up",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 wte=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ste=Ue("chevrons-up-down",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 Ete=[["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"}]],Zs=Ue("circle-alert",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 _te=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],nB=Ue("circle-check",_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 Ote=[["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"}]],jte=Ue("circle-x",Ote);/**
 * @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"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Ate=Ue("clock",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 Nte=[["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"}]],m0=Ue("download",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 Tte=[["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"}]],Pte=Ue("eye-off",Tte);/**
 * @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 Mte=[["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"}]],Rte=Ue("eye",Mte);/**
 * @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:"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"}]],kg=Ue("folder-kanban",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 Dte=[["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"}]],Ite=Ue("folder-up",Dte);/**
 * @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=[["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"}]],zte=Ue("folder",Lte);/**
 * @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:"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"}]],Bte=Ue("house",$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=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Hte=Ue("info",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:"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"}]],qte=Ue("key-round",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=[["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"}]],rB=Ue("layout-dashboard",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 Vte=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Yte=Ue("loader-circle",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 Xte=[["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"}]],Gte=Ue("monitor",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 Wte=[["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"}]],aB=Ue("moon",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 Qte=[["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"}]],iB=Ue("octagon-x",Qte);/**
 * @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:"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"}]],Jte=Ue("paperclip",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",{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"}]],tne=Ue("pause",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:"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"}]],rne=Ue("pencil",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 ane=[["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"}]],sj=Ue("play",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 ine=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],IE=Ue("plus",ine);/**
 * @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:"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"}]],oB=Ue("save",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 sne=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],sB=Ue("search",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 lne=[["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"}]],cne=Ue("settings",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=[["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"}]],lB=Ue("sun",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:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],dne=Ue("terminal",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 hne=[["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"}]],lj=Ue("trash-2",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:"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"}]],pne=Ue("triangle-alert",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:"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"}]],gne=Ue("upload",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=[["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"}]],cB=Ue("users",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:"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"}]],uB=Ue("wrench",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 xne=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cj=Ue("x",xne);function wne(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 Sne=e=>{switch(e){case"success":return One;case"info":return Cne;case"warning":return jne;case"error":return Ane;default:return null}},Ene=Array(12).fill(0),_ne=({visible:e,className:t})=>ge.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ge.createElement("div",{className:"sonner-spinner"},Ene.map((n,r)=>ge.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),One=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.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"})),jne=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ge.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"})),Cne=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.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"})),Ane=ge.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ge.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"})),Nne=ge.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"},ge.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ge.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Tne=()=>{const[e,t]=ge.useState(document.hidden);return ge.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let LE=1;class Pne{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:LE++,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],ge.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(Rne(f)&&!f.ok){i=!1;const h=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 h=="object"&&!ge.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...w})}else if(f instanceof Error){i=!1;const h=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,w=typeof h=="object"&&!ge.isValidElement(h)?h:{message:h};this.create({id:r,type:"error",description:p,...w})}else if(n.success!==void 0){i=!1;const h=typeof n.success=="function"?await n.success(f):n.success,p=typeof n.description=="function"?await n.description(f):n.description,w=typeof h=="object"&&!ge.isValidElement(h)?h:{message:h};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,h=typeof n.description=="function"?await n.description(f):n.description,y=typeof m=="object"&&!ge.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:h,...y})}}).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)||LE++;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 Cr=new Pne,Mne=(e,t)=>{const n=(t==null?void 0:t.id)||LE++;return Cr.addToast({title:e,...t,id:n}),n},Rne=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",kne=Mne,Dne=()=>Cr.toasts,Ine=()=>Cr.getActiveToasts(),Tt=Object.assign(kne,{success:Cr.success,info:Cr.info,warning:Cr.warning,error:Cr.error,custom:Cr.custom,message:Cr.message,promise:Cr.promise,dismiss:Cr.dismiss,loading:Cr.loading},{getHistory:Dne,getToasts:Ine});wne("[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 Pv(e){return e.label!==void 0}const Lne=3,zne="24px",$ne="16px",LM=4e3,Bne=356,Une=14,Hne=45,Fne=200;function fi(...e){return e.filter(Boolean).join(" ")}function qne(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Kne=e=>{var t,n,r,a,i,s,c,u,f;const{invert:m,toast:h,unstyled:p,interacting:y,setHeights:w,visibleToasts:x,heights:S,index:E,toasts:C,expanded:j,removeToast:A,defaultRichColors:T,closeButton:N,style:P,cancelButtonStyle:k,actionButtonStyle:D,className:K="",descriptionClassName:B="",duration:L,position:W,gap:$,expandByDefault:Y,classNames:R,icons:H,closeButtonAriaLabel:q="Close toast"}=e,[F,V]=ge.useState(null),[I,z]=ge.useState(null),[X,Z]=ge.useState(!1),[ee,se]=ge.useState(!1),[ie,re]=ge.useState(!1),[J,ce]=ge.useState(!1),[me,ne]=ge.useState(!1),[ye,xe]=ge.useState(0),[Ie,Pe]=ge.useState(0),Ve=ge.useRef(h.duration||L||LM),mn=ge.useRef(null),pt=ge.useRef(null),Mr=E===0,Ca=E+1<=x,Qt=h.type,pr=h.dismissible!==!1,pn=h.className||"",Fo=h.descriptionClassName||"",vr=ge.useMemo(()=>S.findIndex($e=>$e.toastId===h.id)||0,[S,h.id]),ni=ge.useMemo(()=>{var $e;return($e=h.closeButton)!=null?$e:N},[h.closeButton,N]),ri=ge.useMemo(()=>h.duration||L||LM,[h.duration,L]),gl=ge.useRef(0),Rr=ge.useRef(0),Wc=ge.useRef(0),ai=ge.useRef(null),[Li,Bn]=W.split("-"),kr=ge.useMemo(()=>S.reduce(($e,_t,tn)=>tn>=vr?$e:$e+_t.height,0),[S,vr]),Nn=Tne(),id=h.invert||m,yl=Qt==="loading";Rr.current=ge.useMemo(()=>vr*$+kr,[vr,kr]),ge.useEffect(()=>{Ve.current=ri},[ri]),ge.useEffect(()=>{Z(!0)},[]),ge.useEffect(()=>{const $e=pt.current;if($e){const _t=$e.getBoundingClientRect().height;return Pe(_t),w(tn=>[{toastId:h.id,height:_t,position:h.position},...tn]),()=>w(tn=>tn.filter(Tn=>Tn.toastId!==h.id))}},[w,h.id]),ge.useLayoutEffect(()=>{if(!X)return;const $e=pt.current,_t=$e.style.height;$e.style.height="auto";const tn=$e.getBoundingClientRect().height;$e.style.height=_t,Pe(tn),w(Tn=>Tn.find(Ct=>Ct.toastId===h.id)?Tn.map(Ct=>Ct.toastId===h.id?{...Ct,height:tn}:Ct):[{toastId:h.id,height:tn,position:h.position},...Tn])},[X,h.title,h.description,w,h.id,h.jsx,h.action,h.cancel]);const ta=ge.useCallback(()=>{se(!0),xe(Rr.current),w($e=>$e.filter(_t=>_t.toastId!==h.id)),setTimeout(()=>{A(h)},Fne)},[h,A,w,Rr]);ge.useEffect(()=>{if(h.promise&&Qt==="loading"||h.duration===1/0||h.type==="loading")return;let $e;return j||y||Nn?(()=>{if(Wc.current<gl.current){const Tn=new Date().getTime()-gl.current;Ve.current=Ve.current-Tn}Wc.current=new Date().getTime()})():(()=>{Ve.current!==1/0&&(gl.current=new Date().getTime(),$e=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),ta()},Ve.current))})(),()=>clearTimeout($e)},[j,y,h,Qt,Nn,ta]),ge.useEffect(()=>{h.delete&&(ta(),h.onDismiss==null||h.onDismiss.call(h,h))},[ta,h.delete]);function qo(){var $e;if(H!=null&&H.loading){var _t;return ge.createElement("div",{className:fi(R==null?void 0:R.loader,h==null||(_t=h.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":Qt==="loading"},H.loading)}return ge.createElement(_ne,{className:fi(R==null?void 0:R.loader,h==null||($e=h.classNames)==null?void 0:$e.loader),visible:Qt==="loading"})}const Ko=h.icon||(H==null?void 0:H[Qt])||Sne(Qt);var zi,na;return ge.createElement("li",{tabIndex:0,ref:pt,className:fi(K,pn,R==null?void 0:R.toast,h==null||(t=h.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[Qt],h==null||(n=h.classNames)==null?void 0:n[Qt]),"data-sonner-toast":"","data-rich-colors":(zi=h.richColors)!=null?zi:T,"data-styled":!(h.jsx||h.unstyled||p),"data-mounted":X,"data-promise":!!h.promise,"data-swiped":me,"data-removed":ee,"data-visible":Ca,"data-y-position":Li,"data-x-position":Bn,"data-index":E,"data-front":Mr,"data-swiping":ie,"data-dismissible":pr,"data-type":Qt,"data-invert":id,"data-swipe-out":J,"data-swipe-direction":I,"data-expanded":!!(j||Y&&X),"data-testid":h.testId,style:{"--index":E,"--toasts-before":E,"--z-index":C.length-E,"--offset":`${ee?ye:Rr.current}px`,"--initial-height":Y?"auto":`${Ie}px`,...P,...h.style},onDragEnd:()=>{re(!1),V(null),ai.current=null},onPointerDown:$e=>{$e.button!==2&&(yl||!pr||(mn.current=new Date,xe(Rr.current),$e.target.setPointerCapture($e.pointerId),$e.target.tagName!=="BUTTON"&&(re(!0),ai.current={x:$e.clientX,y:$e.clientY})))},onPointerUp:()=>{var $e,_t,tn;if(J||!pr)return;ai.current=null;const Tn=Number((($e=pt.current)==null?void 0:$e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ii=Number(((_t=pt.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ct=new Date().getTime()-((tn=mn.current)==null?void 0:tn.getTime()),Gn=F==="x"?Tn:ii,$i=Math.abs(Gn)/Ct;if(Math.abs(Gn)>=Hne||$i>.11){xe(Rr.current),h.onDismiss==null||h.onDismiss.call(h,h),z(F==="x"?Tn>0?"right":"left":ii>0?"down":"up"),ta(),ce(!0);return}else{var Wn,Qn;(Wn=pt.current)==null||Wn.style.setProperty("--swipe-amount-x","0px"),(Qn=pt.current)==null||Qn.style.setProperty("--swipe-amount-y","0px")}ne(!1),re(!1),V(null)},onPointerMove:$e=>{var _t,tn,Tn;if(!ai.current||!pr||((_t=window.getSelection())==null?void 0:_t.toString().length)>0)return;const Ct=$e.clientY-ai.current.y,Gn=$e.clientX-ai.current.x;var $i;const Wn=($i=e.swipeDirections)!=null?$i:qne(W);!F&&(Math.abs(Gn)>1||Math.abs(Ct)>1)&&V(Math.abs(Gn)>Math.abs(Ct)?"x":"y");let Qn={x:0,y:0};const Vo=Dr=>1/(1.5+Math.abs(Dr)/20);if(F==="y"){if(Wn.includes("top")||Wn.includes("bottom"))if(Wn.includes("top")&&Ct<0||Wn.includes("bottom")&&Ct>0)Qn.y=Ct;else{const Dr=Ct*Vo(Ct);Qn.y=Math.abs(Dr)<Math.abs(Ct)?Dr:Ct}}else if(F==="x"&&(Wn.includes("left")||Wn.includes("right")))if(Wn.includes("left")&&Gn<0||Wn.includes("right")&&Gn>0)Qn.x=Gn;else{const Dr=Gn*Vo(Gn);Qn.x=Math.abs(Dr)<Math.abs(Gn)?Dr:Gn}(Math.abs(Qn.x)>0||Math.abs(Qn.y)>0)&&ne(!0),(tn=pt.current)==null||tn.style.setProperty("--swipe-amount-x",`${Qn.x}px`),(Tn=pt.current)==null||Tn.style.setProperty("--swipe-amount-y",`${Qn.y}px`)}},ni&&!h.jsx&&Qt!=="loading"?ge.createElement("button",{"aria-label":q,"data-disabled":yl,"data-close-button":!0,onClick:yl||!pr?()=>{}:()=>{ta(),h.onDismiss==null||h.onDismiss.call(h,h)},className:fi(R==null?void 0:R.closeButton,h==null||(r=h.classNames)==null?void 0:r.closeButton)},(na=H==null?void 0:H.close)!=null?na:Nne):null,(Qt||h.icon||h.promise)&&h.icon!==null&&((H==null?void 0:H[Qt])!==null||h.icon)?ge.createElement("div",{"data-icon":"",className:fi(R==null?void 0:R.icon,h==null||(a=h.classNames)==null?void 0:a.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||qo():null,h.type!=="loading"?Ko:null):null,ge.createElement("div",{"data-content":"",className:fi(R==null?void 0:R.content,h==null||(i=h.classNames)==null?void 0:i.content)},ge.createElement("div",{"data-title":"",className:fi(R==null?void 0:R.title,h==null||(s=h.classNames)==null?void 0:s.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?ge.createElement("div",{"data-description":"",className:fi(B,Fo,R==null?void 0:R.description,h==null||(c=h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),ge.isValidElement(h.cancel)?h.cancel:h.cancel&&Pv(h.cancel)?ge.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||k,onClick:$e=>{Pv(h.cancel)&&pr&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,$e),ta())},className:fi(R==null?void 0:R.cancelButton,h==null||(u=h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,ge.isValidElement(h.action)?h.action:h.action&&Pv(h.action)?ge.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||D,onClick:$e=>{Pv(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,$e),!$e.defaultPrevented&&ta())},className:fi(R==null?void 0:R.actionButton,h==null||(f=h.classNames)==null?void 0:f.actionButton)},h.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 Vne(e,t){const n={};return[e,t].forEach((r,a)=>{const i=a===1,s=i?"--mobile-offset":"--offset",c=i?$ne:zne;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 Yne=ge.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:h,theme:p="light",richColors:y,duration:w,style:x,visibleToasts:S=Lne,toastOptions:E,dir:C=zM(),gap:j=Une,icons:A,containerAriaLabel:T="Notifications"}=t,[N,P]=ge.useState([]),k=ge.useMemo(()=>r?N.filter(X=>X.toasterId===r):N.filter(X=>!X.toasterId),[N,r]),D=ge.useMemo(()=>Array.from(new Set([i].concat(k.filter(X=>X.position).map(X=>X.position)))),[k,i]),[K,B]=ge.useState([]),[L,W]=ge.useState(!1),[$,Y]=ge.useState(!1),[R,H]=ge.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),q=ge.useRef(null),F=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),V=ge.useRef(null),I=ge.useRef(!1),z=ge.useCallback(X=>{P(Z=>{var ee;return(ee=Z.find(se=>se.id===X.id))!=null&&ee.delete||Cr.dismiss(X.id),Z.filter(({id:se})=>se!==X.id)})},[]);return ge.useEffect(()=>Cr.subscribe(X=>{if(X.dismiss){requestAnimationFrame(()=>{P(Z=>Z.map(ee=>ee.id===X.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{Ez.flushSync(()=>{P(Z=>{const ee=Z.findIndex(se=>se.id===X.id);return ee!==-1?[...Z.slice(0,ee),{...Z[ee],...X},...Z.slice(ee+1)]:[X,...Z]})})})}),[N]),ge.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 X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:Z})=>{H(Z?"dark":"light")})}catch{X.addListener(({matches:ee})=>{try{H(ee?"dark":"light")}catch(se){console.error(se)}})}},[p]),ge.useEffect(()=>{N.length<=1&&W(!1)},[N]),ge.useEffect(()=>{const X=Z=>{var ee;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||(ee=q.current)!=null&&ee.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[s]),ge.useEffect(()=>{if(q.current)return()=>{V.current&&(V.current.focus({preventScroll:!0}),V.current=null,I.current=!1)}},[q.current]),ge.createElement("section",{ref:n,"aria-label":`${T} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},D.map((X,Z)=>{var ee;const[se,ie]=X.split("-");return k.length?ge.createElement("ol",{key:X,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":`${((ee=K[0])==null?void 0:ee.height)||0}px`,"--width":`${Bne}px`,"--gap":`${j}px`,...x,...Vne(m,h)},onBlur:re=>{I.current&&!re.currentTarget.contains(re.relatedTarget)&&(I.current=!1,V.current&&(V.current.focus({preventScroll:!0}),V.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||I.current||(I.current=!0,V.current=re.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{$||W(!1)},onDragEnd:()=>W(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},k.filter(re=>!re.position&&Z===0||re.position===X).map((re,J)=>{var ce,me;return ge.createElement(Kne,{key:re.id,icons:A,index:J,toast:re,defaultRichColors:y,duration:(ce=E==null?void 0:E.duration)!=null?ce: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:$,position:X,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:z,toasts:k.filter(ne=>ne.position==re.position),heights:K.filter(ne=>ne.position==re.position),setHeights:B,expandByDefault:c,gap:j,expanded:L,swipeDirections:t.swipeDirections})})):null}))}),Xne=({...e})=>{const{theme:t="system"}=vO();return g.jsx(Yne,{theme:t,className:"toaster group",icons:{success:g.jsx(nB,{className:"size-4"}),info:g.jsx(Hte,{className:"size-4"}),warning:g.jsx(pne,{className:"size-4"}),error:g.jsx(iB,{className:"size-4"}),loading:g.jsx(Yte,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Gne=new ZY({defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,refetchOnWindowFocus:!0,retry:1}}}),fB="/api";class dB extends Error{constructor(t,n,r){super(`${t} ${n}`),this.status=t,this.statusText=n,this.body=r,this.name="ApiError"}}async function th(e,t){const n=`${fB}${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 dB(i.status,i.statusText,s)}return i.json()}async function Wne(e,t){const n=`${fB}${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 dB(i.status,i.statusText,s)}return i.json()}const He={get:e=>th(e),post:(e,t)=>th(e,{method:"POST",body:t!=null?JSON.stringify(t):void 0}),put:(e,t)=>th(e,{method:"PUT",body:JSON.stringify(t)}),patch:(e,t)=>th(e,{method:"PATCH",body:JSON.stringify(t)}),delete:e=>th(e,{method:"DELETE"}),upload:(e,t)=>{const n=new FormData;return t.forEach(r=>n.append("files",r)),Wne(e,n)}},Ge={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 Yf(){return Ln({queryKey:Ge.projects.all,queryFn:()=>He.get("/projects")})}function hB(e,t){return Ln({queryKey:Ge.projects.detail(e),queryFn:()=>He.get(`/projects/${e}`),enabled:t==null?void 0:t.enabled})}function mB(e){return Ln({queryKey:Ge.projects.files(e),queryFn:()=>He.get(`/projects/${e}/files`)})}function pB(e,t){return Ln({queryKey:Ge.projects.config(e),queryFn:()=>He.get(`/projects/${e}/config`),enabled:t==null?void 0:t.enabled})}const Qne=500;function Zne({onCommandPalette:e,onShortcutsHelp:t}){const n=Hf(),r=b.useRef(null),a=b.useRef(void 0);b.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},Qne);return}}}}return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i),clearTimeout(a.current)}},[n,e,t])}function vB(e){const t=e?"?"+new URLSearchParams(e).toString():"";return Ln({queryKey:Ge.sessions.all(e),queryFn:()=>He.get(`/sessions${t}`)})}function uj(){return vB({status:"running",per_page:"50"})}function Jne(){return vB({per_page:"10"})}function ere(e,t=1,n=20){return Ln({queryKey:[...Ge.projects.sessions(e),t,n],queryFn:()=>He.get(`/projects/${e}/sessions?page=${t}&per_page=${n}`)})}function tre(e,t,n){return Ln({queryKey:Ge.sessions.detail(e,t),queryFn:()=>He.get(`/projects/${e}/sessions/${t}`),...n})}var $M=1,nre=.9,rre=.8,are=.17,r1=.1,a1=.999,ire=.9999,ore=.99,sre=/[\\\/_+.#"@\[\(\{&]/,lre=/[\\\/_+.#"@\[\(\{&]/g,cre=/[\s-]/,gB=/[\s-]/g;function zE(e,t,n,r,a,i,s){if(i===t.length)return a===e.length?$M:ore;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,h,p,y,w;f>=0;)h=zE(e,t,n,r,f+1,i+1,s),h>m&&(f===a?h*=$M:sre.test(e.charAt(f-1))?(h*=rre,y=e.slice(a,f-1).match(lre),y&&a>0&&(h*=Math.pow(a1,y.length))):cre.test(e.charAt(f-1))?(h*=nre,w=e.slice(a,f-1).match(gB),w&&a>0&&(h*=Math.pow(a1,w.length))):(h*=are,a>0&&(h*=Math.pow(a1,f-a))),e.charAt(f)!==t.charAt(i)&&(h*=ire)),(h<r1&&n.charAt(f-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(f-1)!==r.charAt(i))&&(p=zE(e,t,n,r,f+1,i+2,s),p*r1>h&&(h=p*r1)),h>m&&(m=h),f=n.indexOf(u,f+1);return s[c]=m,m}function BM(e){return e.toLowerCase().replace(gB," ")}function ure(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,zE(e,t,BM(e),BM(t),0,0,{})}var nh='[cmdk-group=""]',i1='[cmdk-group-items=""]',fre='[cmdk-group-heading=""]',yB='[cmdk-item=""]',UM=`${yB}:not([aria-disabled="true"])`,$E="cmdk-item-select",Fu="data-value",dre=(e,t,n)=>ure(e,t,n),bB=b.createContext(void 0),jm=()=>b.useContext(bB),xB=b.createContext(void 0),fj=()=>b.useContext(xB),wB=b.createContext(void 0),SB=b.forwardRef((e,t)=>{let n=qu(()=>{var z,X;return{search:"",value:(X=(z=e.value)!=null?z:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=qu(()=>new Set),a=qu(()=>new Map),i=qu(()=>new Map),s=qu(()=>new Set),c=EB(e),{label:u,children:f,value:m,onValueChange:h,filter:p,shouldFilter:y,loop:w,disablePointerSelection:x=!1,vimBindings:S=!0,...E}=e,C=Dn(),j=Dn(),A=Dn(),T=b.useRef(null),N=Ere();xc(()=>{if(m!==void 0){let z=m.trim();n.current.value=z,P.emit()}},[m]),xc(()=>{N(6,W)},[]);let P=b.useMemo(()=>({subscribe:z=>(s.current.add(z),()=>s.current.delete(z)),snapshot:()=>n.current,setState:(z,X,Z)=>{var ee,se,ie,re;if(!Object.is(n.current[z],X)){if(n.current[z]=X,z==="search")L(),K(),N(1,B);else if(z==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(A);J?J.focus():(ee=document.getElementById(C))==null||ee.focus()}if(N(7,()=>{var J;n.current.selectedItemId=(J=$())==null?void 0:J.id,P.emit()}),Z||N(5,W),((se=c.current)==null?void 0:se.value)!==void 0){let J=X??"";(re=(ie=c.current).onValueChange)==null||re.call(ie,J);return}}P.emit()}},emit:()=>{s.current.forEach(z=>z())}}),[]),k=b.useMemo(()=>({value:(z,X,Z)=>{var ee;X!==((ee=i.current.get(z))==null?void 0:ee.value)&&(i.current.set(z,{value:X,keywords:Z}),n.current.filtered.items.set(z,D(X,Z)),N(2,()=>{K(),P.emit()}))},item:(z,X)=>(r.current.add(z),X&&(a.current.has(X)?a.current.get(X).add(z):a.current.set(X,new Set([z]))),N(3,()=>{L(),K(),n.current.value||B(),P.emit()}),()=>{i.current.delete(z),r.current.delete(z),n.current.filtered.items.delete(z);let Z=$();N(4,()=>{L(),(Z==null?void 0:Z.getAttribute("id"))===z&&B(),P.emit()})}),group:z=>(a.current.has(z)||a.current.set(z,new Set),()=>{i.current.delete(z),a.current.delete(z)}),filter:()=>c.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:C,inputId:A,labelId:j,listInnerRef:T}),[]);function D(z,X){var Z,ee;let se=(ee=(Z=c.current)==null?void 0:Z.filter)!=null?ee:dre;return z?se(z,n.current.search,X):0}function K(){if(!n.current.search||c.current.shouldFilter===!1)return;let z=n.current.filtered.items,X=[];n.current.filtered.groups.forEach(ee=>{let se=a.current.get(ee),ie=0;se.forEach(re=>{let J=z.get(re);ie=Math.max(J,ie)}),X.push([ee,ie])});let Z=T.current;Y().sort((ee,se)=>{var ie,re;let J=ee.getAttribute("id"),ce=se.getAttribute("id");return((ie=z.get(ce))!=null?ie:0)-((re=z.get(J))!=null?re:0)}).forEach(ee=>{let se=ee.closest(i1);se?se.appendChild(ee.parentElement===se?ee:ee.closest(`${i1} > *`)):Z.appendChild(ee.parentElement===Z?ee:ee.closest(`${i1} > *`))}),X.sort((ee,se)=>se[1]-ee[1]).forEach(ee=>{var se;let ie=(se=T.current)==null?void 0:se.querySelector(`${nh}[${Fu}="${encodeURIComponent(ee[0])}"]`);ie==null||ie.parentElement.appendChild(ie)})}function B(){let z=Y().find(Z=>Z.getAttribute("aria-disabled")!=="true"),X=z==null?void 0:z.getAttribute(Fu);P.setState("value",X||void 0)}function L(){var z,X,Z,ee;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=(X=(z=i.current.get(ie))==null?void 0:z.value)!=null?X:"",J=(ee=(Z=i.current.get(ie))==null?void 0:Z.keywords)!=null?ee:[],ce=D(re,J);n.current.filtered.items.set(ie,ce),ce>0&&se++}for(let[ie,re]of a.current)for(let J of re)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(ie);break}n.current.filtered.count=se}function W(){var z,X,Z;let ee=$();ee&&(((z=ee.parentElement)==null?void 0:z.firstChild)===ee&&((Z=(X=ee.closest(nh))==null?void 0:X.querySelector(fre))==null||Z.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function $(){var z;return(z=T.current)==null?void 0:z.querySelector(`${yB}[aria-selected="true"]`)}function Y(){var z;return Array.from(((z=T.current)==null?void 0:z.querySelectorAll(UM))||[])}function R(z){let X=Y()[z];X&&P.setState("value",X.getAttribute(Fu))}function H(z){var X;let Z=$(),ee=Y(),se=ee.findIndex(re=>re===Z),ie=ee[se+z];(X=c.current)!=null&&X.loop&&(ie=se+z<0?ee[ee.length-1]:se+z===ee.length?ee[0]:ee[se+z]),ie&&P.setState("value",ie.getAttribute(Fu))}function q(z){let X=$(),Z=X==null?void 0:X.closest(nh),ee;for(;Z&&!ee;)Z=z>0?wre(Z,nh):Sre(Z,nh),ee=Z==null?void 0:Z.querySelector(UM);ee?P.setState("value",ee.getAttribute(Fu)):H(z)}let F=()=>R(Y().length-1),V=z=>{z.preventDefault(),z.metaKey?F():z.altKey?q(1):H(1)},I=z=>{z.preventDefault(),z.metaKey?R(0):z.altKey?q(-1):H(-1)};return b.createElement(Me.div,{ref:t,tabIndex:-1,...E,"cmdk-root":"",onKeyDown:z=>{var X;(X=E.onKeyDown)==null||X.call(E,z);let Z=z.nativeEvent.isComposing||z.keyCode===229;if(!(z.defaultPrevented||Z))switch(z.key){case"n":case"j":{S&&z.ctrlKey&&V(z);break}case"ArrowDown":{V(z);break}case"p":case"k":{S&&z.ctrlKey&&I(z);break}case"ArrowUp":{I(z);break}case"Home":{z.preventDefault(),R(0);break}case"End":{z.preventDefault(),F();break}case"Enter":{z.preventDefault();let ee=$();if(ee){let se=new Event($E);ee.dispatchEvent(se)}}}}},b.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:Ore},u),p0(e,z=>b.createElement(xB.Provider,{value:P},b.createElement(bB.Provider,{value:k},z))))}),hre=b.forwardRef((e,t)=>{var n,r;let a=Dn(),i=b.useRef(null),s=b.useContext(wB),c=jm(),u=EB(e),f=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;xc(()=>{if(!f)return c.item(a,s==null?void 0:s.id)},[f]);let m=_B(a,i,[e.value,e.children,i],e.keywords),h=fj(),p=Js(N=>N.value&&N.value===m.current),y=Js(N=>f||c.filter()===!1?!0:N.search?N.filtered.items.get(a)>0:!0);b.useEffect(()=>{let N=i.current;if(!(!N||e.disabled))return N.addEventListener($E,w),()=>N.removeEventListener($E,w)},[y,e.onSelect,e.disabled]);function w(){var N,P;x(),(P=(N=u.current).onSelect)==null||P.call(N,m.current)}function x(){h.setState("value",m.current,!0)}if(!y)return null;let{disabled:S,value:E,onSelect:C,forceMount:j,keywords:A,...T}=e;return b.createElement(Me.div,{ref:_o(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)}),mre=b.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:a,...i}=e,s=Dn(),c=b.useRef(null),u=b.useRef(null),f=Dn(),m=jm(),h=Js(y=>a||m.filter()===!1?!0:y.search?y.filtered.groups.has(s):!0);xc(()=>m.group(s),[]),_B(s,c,[e.value,e.heading,u]);let p=b.useMemo(()=>({id:s,forceMount:a}),[a]);return b.createElement(Me.div,{ref:_o(c,t),...i,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&b.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),p0(e,y=>b.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},b.createElement(wB.Provider,{value:p},y))))}),pre=b.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,a=b.useRef(null),i=Js(s=>!s.search);return!n&&!i?null:b.createElement(Me.div,{ref:_o(a,t),...r,"cmdk-separator":"",role:"separator"})}),vre=b.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,a=e.value!=null,i=fj(),s=Js(f=>f.search),c=Js(f=>f.selectedItemId),u=jm();return b.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),b.createElement(Me.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)}})}),gre=b.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,i=b.useRef(null),s=b.useRef(null),c=Js(f=>f.selectedItemId),u=jm();return b.useEffect(()=>{if(s.current&&i.current){let f=s.current,m=i.current,h,p=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let y=f.offsetHeight;m.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return p.observe(f),()=>{cancelAnimationFrame(h),p.unobserve(f)}}},[]),b.createElement(Me.div,{ref:_o(i,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:u.listId},p0(e,f=>b.createElement("div",{ref:_o(s,u.listInnerRef),"cmdk-list-sizer":""},f)))}),yre=b.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:i,container:s,...c}=e;return b.createElement(CO,{open:n,onOpenChange:r},b.createElement(AO,{container:s},b.createElement(NO,{"cmdk-overlay":"",className:a}),b.createElement(TO,{"aria-label":e.label,"cmdk-dialog":"",className:i},b.createElement(SB,{ref:t,...c}))))}),bre=b.forwardRef((e,t)=>Js(n=>n.filtered.count===0)?b.createElement(Me.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),xre=b.forwardRef((e,t)=>{let{progress:n,children:r,label:a="Loading...",...i}=e;return b.createElement(Me.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},p0(e,s=>b.createElement("div",{"aria-hidden":!0},s)))}),Xf=Object.assign(SB,{List:gre,Item:hre,Input:vre,Group:mre,Separator:pre,Dialog:yre,Empty:bre,Loading:xre});function wre(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Sre(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function EB(e){let t=b.useRef(e);return xc(()=>{t.current=e}),t}var xc=typeof window>"u"?b.useEffect:b.useLayoutEffect;function qu(e){let t=b.useRef();return t.current===void 0&&(t.current=e()),t}function Js(e){let t=fj(),n=()=>e(t.snapshot());return b.useSyncExternalStore(t.subscribe,n,n)}function _B(e,t,n,r=[]){let a=b.useRef(),i=jm();return xc(()=>{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(Fu,c),a.current=c}),a}var Ere=()=>{let[e,t]=b.useState(),n=qu(()=>new Map);return xc(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,a)=>{n.current.set(r,a),t({})}};function _re(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function p0({asChild:e,children:t},n){return e&&b.isValidElement(t)?b.cloneElement(_re(t),{ref:t.ref},n(t.props.children)):n(t)}var Ore={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=ot,v0=(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],h=i==null?void 0:i[f];if(m===null)return null;const p=HM(m)||HM(h);return a[f][p]}),c=n&&Object.entries(n).reduce((f,m)=>{let[h,p]=m;return p===void 0||(f[h]=p),f},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:h,className:p,...y}=m;return Object.entries(y).every(w=>{let[x,S]=w;return Array.isArray(S)?S.includes({...i,...c}[x]):{...i,...c}[x]===S})?[...f,h,p]:f},[]);return FM(e,s,u,n==null?void 0:n.class,n==null?void 0:n.className)},jre=v0("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 De({className:e,variant:t="default",size:n="default",asChild:r=!1,...a}){const i=r?gO:"button";return g.jsx(i,{"data-slot":"button","data-variant":t,"data-size":n,className:Ae(jre({variant:t,size:n,className:e})),...a})}function zc({...e}){return g.jsx(CO,{"data-slot":"dialog",...e})}function Cre({...e}){return g.jsx(AO,{"data-slot":"dialog-portal",...e})}function Are({className:e,...t}){return g.jsx(NO,{"data-slot":"dialog-overlay",className:Ae("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 $c({className:e,children:t,showCloseButton:n=!0,...r}){return g.jsxs(Cre,{"data-slot":"dialog-portal",children:[g.jsx(Are,{}),g.jsxs(TO,{"data-slot":"dialog-content",className:Ae("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&&g.jsxs(PO,{"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:[g.jsx(cj,{}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Bc({className:e,...t}){return g.jsx("div",{"data-slot":"dialog-header",className:Ae("flex flex-col gap-2 text-center sm:text-left",e),...t})}function OB({className:e,showCloseButton:t=!1,children:n,...r}){return g.jsxs("div",{"data-slot":"dialog-footer",className:Ae("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&g.jsx(PO,{asChild:!0,children:g.jsx(De,{variant:"outline",children:"Close"})})]})}function Uc({className:e,...t}){return g.jsx(w4,{"data-slot":"dialog-title",className:Ae("text-lg leading-none font-semibold",e),...t})}function jB({className:e,...t}){return g.jsx(S4,{"data-slot":"dialog-description",className:Ae("text-sm text-muted-foreground",e),...t})}function Nre({className:e,...t}){return g.jsx(Xf,{"data-slot":"command",className:Ae("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})}function Tre({title:e="Command Palette",description:t="Search for a command to run...",children:n,className:r,showCloseButton:a=!0,...i}){return g.jsxs(zc,{...i,children:[g.jsxs(Bc,{className:"sr-only",children:[g.jsx(Uc,{children:e}),g.jsx(jB,{children:t})]}),g.jsx($c,{className:Ae("overflow-hidden p-0",r),showCloseButton:a,children:g.jsx(Nre,{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 Pre({className:e,...t}){return g.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[g.jsx(sB,{className:"size-4 shrink-0 opacity-50"}),g.jsx(Xf.Input,{"data-slot":"command-input",className:Ae("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 Mre({className:e,...t}){return g.jsx(Xf.List,{"data-slot":"command-list",className:Ae("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function Rre({...e}){return g.jsx(Xf.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function rh({className:e,...t}){return g.jsx(Xf.Group,{"data-slot":"command-group",className:Ae("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 Ma({className:e,...t}){return g.jsx(Xf.Item,{"data-slot":"command-item",className:Ae("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 g.jsx("span",{"data-slot":"command-shortcut",className:Ae("ml-auto text-xs tracking-widest text-muted-foreground",e),...t})}function kre({open:e,onOpenChange:t}){var f;const n=Hf(),{setTheme:r}=vO(),a=Yf(),i=uj(),s=a.data??[],c=((f=i.data)==null?void 0:f.items)??[],u=m=>{t(!1),n(m)};return g.jsxs(Tre,{open:e,onOpenChange:t,showCloseButton:!1,children:[g.jsx(Pre,{placeholder:"Type a command or search..."}),g.jsxs(Mre,{children:[g.jsx(Rre,{children:"No results found."}),g.jsxs(rh,{heading:"Navigation",children:[g.jsxs(Ma,{onSelect:()=>u("/"),children:[g.jsx(rB,{}),"Dashboard",g.jsx(qM,{children:"G D"})]}),g.jsxs(Ma,{onSelect:()=>u("/projects"),children:[g.jsx(kg,{}),"Projects",g.jsx(qM,{children:"G P"})]})]}),s.length>0&&g.jsx(rh,{heading:"Projects",children:s.map(m=>g.jsxs(Ma,{onSelect:()=>u(`/projects/${m.id}`),children:[g.jsx(kg,{}),m.display_name]},m.id))}),c.length>0&&g.jsx(rh,{heading:"Running Sessions",children:c.map(m=>g.jsxs(Ma,{onSelect:()=>u(`/projects/${m.project_id}/sessions/${m.run_id}`),children:[g.jsx(sj,{}),m.role," (",m.run_id.slice(0,8),")"]},m.run_id))}),g.jsxs(rh,{heading:"Resources",children:[g.jsxs(Ma,{onSelect:()=>u("/resources/roles"),children:[g.jsx(cB,{}),"Roles"]}),g.jsxs(Ma,{onSelect:()=>u("/resources/skills"),children:[g.jsx(uB,{}),"Skills"]}),g.jsxs(Ma,{onSelect:()=>u("/resources/agents"),children:[g.jsx(eB,{}),"Agents"]}),g.jsxs(Ma,{onSelect:()=>u("/resources/memories"),children:[g.jsx(tB,{}),"Memory"]})]}),g.jsxs(rh,{heading:"Theme",children:[g.jsxs(Ma,{onSelect:()=>{r("light"),t(!1)},children:[g.jsx(lB,{}),"Light"]}),g.jsxs(Ma,{onSelect:()=>{r("dark"),t(!1)},children:[g.jsx(aB,{}),"Dark"]}),g.jsxs(Ma,{onSelect:()=>{r("system"),t(!1)},children:[g.jsx(Gte,{}),"System"]})]})]})]})}const Dre=[{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 Ire({open:e,onOpenChange:t}){return g.jsx(zc,{open:e,onOpenChange:t,children:g.jsxs($c,{className:"max-w-sm",children:[g.jsx(Bc,{children:g.jsx(Uc,{children:"Keyboard Shortcuts"})}),g.jsx("div",{className:"space-y-2",children:Dre.map(n=>g.jsxs("div",{className:"flex items-center justify-between text-sm",children:[g.jsx("span",{className:"text-muted-foreground",children:n.description}),g.jsx("div",{className:"flex gap-1",children:n.keys.map(r=>g.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 Lre({...e}){return g.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}function zre({className:e,...t}){return g.jsx("ol",{"data-slot":"breadcrumb-list",className:Ae("flex flex-wrap items-center gap-1.5 text-sm break-words text-muted-foreground sm:gap-2.5",e),...t})}function $re({className:e,...t}){return g.jsx("li",{"data-slot":"breadcrumb-item",className:Ae("inline-flex items-center gap-1.5",e),...t})}function Bre({asChild:e,className:t,...n}){const r=e?gO:"a";return g.jsx(r,{"data-slot":"breadcrumb-link",className:Ae("transition-colors hover:text-foreground",t),...n})}function Ure({className:e,...t}){return g.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:Ae("font-normal text-foreground",e),...t})}function Hre({children:e,className:t,...n}){return g.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:Ae("[&>svg]:size-3.5",t),...n,children:e??g.jsx(h0,{})})}function Dg({...e}){return g.jsx(PZ,{"data-slot":"dropdown-menu",...e})}function Ig({...e}){return g.jsx(MZ,{"data-slot":"dropdown-menu-trigger",...e})}function Lg({className:e,sideOffset:t=4,...n}){return g.jsx(RZ,{children:g.jsx(kZ,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Ae("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 wh({className:e,inset:t,variant:n="default",...r}){return g.jsx(DZ,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Ae("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 Fre({className:e,children:t,checked:n,...r}){return g.jsxs(IZ,{"data-slot":"dropdown-menu-checkbox-item",className:Ae("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:[g.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:g.jsx(LZ,{children:g.jsx(oj,{className:"size-4"})})}),t]})}function Ps({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return g.jsx(zJ,{"data-slot":"separator",decorative:n,orientation:t,className:Ae("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 qre=[{to:"/",label:"Dashboard",icon:rB,end:!0},{to:"/projects",label:"Projects",icon:kg},{to:"/schedules",label:"Schedules",icon:Ate},{to:"/settings",label:"Settings",icon:cne}],Kre=[{to:"/resources/roles",label:"Roles",icon:cB},{to:"/resources/skills",label:"Skills",icon:uB},{to:"/resources/agents",label:"Agents",icon:eB},{to:"/resources/memories",label:"Memory",icon:tB}];function Vre(){const t=Ri().pathname.split("/").filter(Boolean),n=t[0]==="projects"&&t[1]?Number(t[1]):0,{data:r}=hB(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 Yre(){const e=Vre(),t=Hf(),n=Yf(),{setTheme:r}=vO(),[a,i]=b.useState(!1),[s,c]=b.useState(!1);return Zne({onCommandPalette:()=>i(!0),onShortcutsHelp:()=>c(!0)}),g.jsxs("div",{className:"flex min-h-screen",children:[g.jsxs("aside",{className:"flex w-56 flex-col border-r border-border bg-card",children:[g.jsx("div",{className:"flex h-14 items-center border-b border-border px-4",children:g.jsx(Va,{to:"/",className:"text-lg font-bold tracking-tight hover:text-foreground/80",children:"StrawPot"})}),g.jsxs("nav",{className:"flex flex-col gap-1 p-3",children:[qre.map(({to:u,label:f,icon:m,end:h})=>g.jsxs(ZS,{to:u,end:h,className:({isActive:p})=>Ae("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:[g.jsx(m,{className:"h-4 w-4"}),f]},u)),g.jsx("div",{className:"mt-4 mb-1 px-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground/70",children:"Resources"}),Kre.map(({to:u,label:f,icon:m})=>g.jsxs(ZS,{to:u,className:({isActive:h})=>Ae("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",h?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground"),children:[g.jsx(m,{className:"h-4 w-4"}),f]},u))]})]}),g.jsxs("div",{className:"flex flex-1 flex-col",children:[g.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-border px-6",children:[g.jsx(Lre,{children:g.jsx(zre,{children:e.map((u,f)=>{const m=f===e.length-1;return g.jsxs($re,{children:[f>0&&g.jsx(Hre,{}),u.projectSwitcher?g.jsxs(Dg,{children:[g.jsxs(Ig,{className:"flex items-center gap-1 text-sm font-medium text-foreground hover:text-foreground/80 transition-colors",children:[u.label,g.jsx(Ste,{className:"h-3 w-3 text-muted-foreground"})]}),g.jsx(Lg,{align:"start",children:(n.data??[]).map(h=>g.jsxs(wh,{onClick:()=>t(`/projects/${h.id}`),children:[u.href===`/projects/${h.id}`?g.jsx(oj,{className:"mr-2 h-3.5 w-3.5"}):g.jsx("span",{className:"mr-2 inline-block w-3.5"}),h.display_name]},h.id))})]}):m?g.jsx(Ure,{children:u.label}):g.jsx(Bre,{href:u.href,children:u.label})]},u.label)})})}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.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:g.jsx("kbd",{className:"font-mono",children:"⌘K"})}),g.jsxs(Dg,{children:[g.jsx(Ig,{asChild:!0,children:g.jsxs(De,{variant:"ghost",size:"icon",className:"h-8 w-8",children:[g.jsx(lB,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),g.jsx(aB,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),g.jsx("span",{className:"sr-only",children:"Toggle theme"})]})}),g.jsxs(Lg,{align:"end",children:[g.jsx(wh,{onClick:()=>r("light"),children:"Light"}),g.jsx(wh,{onClick:()=>r("dark"),children:"Dark"}),g.jsx(wh,{onClick:()=>r("system"),children:"System"})]})]})]})]}),g.jsx(Ps,{}),g.jsx("main",{className:"flex-1 overflow-auto p-6",children:g.jsx(KV,{})})]}),g.jsx(kre,{open:a,onOpenChange:i}),g.jsx(Ire,{open:s,onOpenChange:c})]})}const Xre=v0("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 _n({className:e,variant:t="default",asChild:n=!1,...r}){const a=n?gO:"span";return g.jsx(a,{"data-slot":"badge","data-variant":t,className:Ae(Xre({variant:t}),e),...r})}function Hc({className:e,...t}){return g.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:g.jsx("table",{"data-slot":"table",className:Ae("w-full caption-bottom text-sm",e),...t})})}function Fc({className:e,...t}){return g.jsx("thead",{"data-slot":"table-header",className:Ae("[&_tr]:border-b",e),...t})}function qc({className:e,...t}){return g.jsx("tbody",{"data-slot":"table-body",className:Ae("[&_tr:last-child]:border-0",e),...t})}function Tr({className:e,...t}){return g.jsx("tr",{"data-slot":"table-row",className:Ae("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t})}function nt({className:e,...t}){return g.jsx("th",{"data-slot":"table-head",className:Ae("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 rt({className:e,...t}){return g.jsx("td",{"data-slot":"table-cell",className:Ae("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function BE({sessions:e,projectNames:t}){return g.jsxs(Hc,{children:[g.jsx(Fc,{children:g.jsxs(Tr,{children:[g.jsx(nt,{children:"Run ID"}),t&&g.jsx(nt,{children:"Project"}),g.jsx(nt,{children:"Role"}),g.jsx(nt,{children:"Status"}),g.jsx(nt,{children:"Started"}),g.jsx(nt,{children:"Duration"}),g.jsx(nt,{children:"Task"})]})}),g.jsx(qc,{children:e.map(n=>g.jsxs(Tr,{children:[g.jsx(rt,{children:g.jsx(Va,{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&&g.jsx(rt,{children:g.jsx(Va,{to:`/projects/${n.project_id}`,className:"text-sm text-primary underline-offset-4 hover:underline",children:t.get(n.project_id)??`#${n.project_id}`})}),g.jsx(rt,{className:"text-sm",children:n.role}),g.jsx(rt,{children:g.jsx(Gre,{status:n.status})}),g.jsx(rt,{className:"text-sm text-muted-foreground",children:zg(n.started_at)}),g.jsx(rt,{className:"text-sm text-muted-foreground",children:g0(n.duration_ms)}),g.jsx(rt,{className:"max-w-[300px] truncate text-sm",children:n.task??"—"})]},n.run_id))})]})}function Gre({status:e}){const t=CB(e);return g.jsxs(_n,{variant:"outline",className:Ae("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"&&g.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),e]})}const KM=CB;function CB(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 zg(e){try{return new Date(e).toLocaleString()}catch{return e}}function g0(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 Sn({className:e,...t}){return g.jsx("div",{"data-slot":"card",className:Ae("flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm",e),...t})}function Ku({className:e,...t}){return g.jsx("div",{"data-slot":"card-header",className:Ae("@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 Vu({className:e,...t}){return g.jsx("div",{"data-slot":"card-title",className:Ae("leading-none font-semibold",e),...t})}function En({className:e,...t}){return g.jsx("div",{"data-slot":"card-content",className:Ae("px-6",e),...t})}const o1=1e4;function AB(e,t,n){const[r,a]=b.useState([]),[i,s]=b.useState(!1),[c,u]=b.useState(!1),f=b.useRef(null),m=b.useRef(void 0),h=b.useRef(1e3),p=b.useRef("");return b.useEffect(()=>{if(!t)return;const y=`${e}:${t}`;p.current!==y&&(a([]),u(!1),p.current=y);function w(){const x=new EventSource(`/api/sessions/${e}/logs/${t}`);f.current=x,x.onopen=()=>{s(!0),h.current=1e3},x.addEventListener("snapshot",S=>{try{const E=JSON.parse(S.data);Array.isArray(E.lines)&&a(E.lines.slice(-o1))}catch{}}),x.addEventListener("append",S=>{try{const E=JSON.parse(S.data);Array.isArray(E.lines)&&E.lines.length>0&&a(C=>{const j=[...C,...E.lines];return j.length>o1?j.slice(-o1):j})}catch{}}),x.addEventListener("done",()=>{u(!0),x.close(),f.current=null}),x.onerror=()=>{x.close(),f.current=null,s(!1),m.current=setTimeout(()=>{h.current=Math.min(h.current*2,15e3),w()},h.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 Wre=5e3;function Qre({runId:e,projectId:t,agentId:n,role:r,runtime:a,startedAt:i}){const{lines:s,done:c}=AB(e,n,!0),u=s.slice(-4),[f,m]=b.useState("");b.useEffect(()=>{const x=new Date(i).getTime(),S=()=>{const C=Date.now()-x,j=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 ${j}s`)};S();const E=setInterval(S,1e3);return()=>clearInterval(E)},[i]);const h=b.useRef(s.length),p=b.useRef(Date.now()),[y,w]=b.useState(!1);return b.useEffect(()=>{s.length!==h.current&&(h.current=s.length,p.current=Date.now(),w(!1))},[s.length]),b.useEffect(()=>{const x=setInterval(()=>{Date.now()-p.current>Wre&&w(!0)},1e3);return()=>clearInterval(x)},[]),g.jsx(Sn,{className:"overflow-hidden",children:g.jsxs(En,{className:"space-y-2 pt-4",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${c?"bg-muted-foreground":y?"bg-green-300":"animate-pulse bg-green-500"}`}),g.jsx("span",{className:"font-medium text-sm",children:r})]}),g.jsx(_n,{variant:"outline",className:"text-xs",children:a.replace("strawpot-","")})]}),g.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[g.jsxs("span",{children:["Session: ",e.slice(0,12)]}),g.jsx("span",{children:"·"}),g.jsx("span",{children:f})]}),g.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)=>g.jsxs("div",{className:"truncate",children:[g.jsx("span",{className:"text-[#666]",children:"> "}),x]},S)):g.jsx("div",{className:"text-[#555]",children:"Waiting for output..."})}),g.jsx("div",{className:"flex justify-end",children:g.jsxs(Va,{to:`/projects/${t}/sessions/${e}?tab=logs`,className:"inline-flex items-center gap-0.5 text-xs text-primary hover:underline",children:["View Session",g.jsx(h0,{className:"h-3 w-3"})]})})]})})}const s1=8;function Zre(){var s;const t=((s=uj().data)==null?void 0:s.items)??[],n=rX({queries:t.slice(0,s1).map(c=>({queryKey:Ge.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,s1),i=r.length-s1;return g.jsxs("section",{className:"space-y-3",children:[g.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Active Agents (",r.length,")"]}),g.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-3",children:a.map(c=>g.jsx(Qre,{runId:c.runId,projectId:c.projectId,agentId:c.agentId,role:c.role,runtime:c.runtime,startedAt:c.startedAt},`${c.runId}:${c.agentId}`))}),i>0&&g.jsxs("p",{className:"text-xs text-muted-foreground",children:["+",i," more agent",i!==1?"s":""," running"]})]})}function Xt({className:e,...t}){return g.jsx("div",{"data-slot":"skeleton",className:Ae("animate-pulse rounded-md bg-accent",e),...t})}function Jre(){return g.jsxs("div",{className:"space-y-8",children:[g.jsx(Xt,{className:"h-8 w-40"}),g.jsxs("div",{className:"space-y-3",children:[g.jsx(Xt,{className:"h-4 w-24"}),g.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-3",children:[1,2,3].map(e=>g.jsx(Xt,{className:"h-28 rounded-lg"},e))})]}),g.jsxs("div",{className:"space-y-3",children:[g.jsx(Xt,{className:"h-4 w-32"}),g.jsx(Xt,{className:"h-48 rounded-lg"})]})]})}function eae(){var m,h;const e=Yf(),t=uj(),n=Jne(),r=e.isLoading||t.isLoading||n.isLoading,a=e.error||t.error||n.error;if(r)return g.jsx(Jre,{});if(a)return g.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[g.jsx(Zs,{className:"h-4 w-4"}),g.jsxs("span",{children:["Error: ",a.message]})]});const i=e.data??[],s=((m=t.data)==null?void 0:m.items)??[],c=((h=n.data)==null?void 0:h.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 g.jsxs("div",{className:"space-y-8",children:[g.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Dashboard"}),g.jsx(Zre,{}),g.jsxs("section",{className:"space-y-3",children:[g.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Projects (",i.length,")"]}),i.length===0?g.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No projects registered."}):g.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-3",children:i.map(p=>g.jsx(Va,{to:`/projects/${p.id}`,className:"group",children:g.jsxs(Sn,{className:"transition-colors group-hover:border-foreground/20",children:[g.jsx(Ku,{className:"pb-2",children:g.jsxs(Vu,{className:"flex items-center gap-2 text-base",children:[g.jsx(kg,{className:"h-4 w-4 text-muted-foreground"}),p.display_name]})}),g.jsxs(En,{children:[g.jsx("p",{className:"break-all text-sm text-muted-foreground",children:p.working_dir}),g.jsxs("div",{className:"mt-2 flex gap-1.5",children:[!p.dir_exists&&g.jsx(_n,{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&&g.jsxs(_n,{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:[g.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&&g.jsxs("section",{className:"space-y-3",children:[g.jsxs("h2",{className:"text-sm font-medium text-muted-foreground",children:["Running Sessions (",s.length,")"]}),g.jsx(Sn,{children:g.jsx(En,{className:"p-0",children:g.jsx(BE,{sessions:s,projectNames:u})})})]}),g.jsxs("section",{className:"space-y-3",children:[g.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Recent Sessions"}),c.length===0?g.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No sessions yet."}):g.jsx(Sn,{children:g.jsx(En,{className:"p-0",children:g.jsx(BE,{sessions:c,projectNames:u})})})]})]})}function tae(){const e=jt();return Gt({mutationFn:t=>He.post("/projects",t),onSuccess:()=>{e.invalidateQueries({queryKey:Ge.projects.all})}})}function nae(){const e=jt();return Gt({mutationFn:t=>He.delete(`/projects/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ge.projects.all})}})}function rae(){const e=jt();return Gt({mutationFn:({projectId:t,files:n})=>He.upload(`/projects/${t}/files`,n),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ge.projects.files(n.projectId)})}})}function aae(){const e=jt();return Gt({mutationFn:({projectId:t,filePath:n})=>He.delete(`/projects/${t}/files/${n}`),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ge.projects.files(n.projectId)})}})}function ln({className:e,type:t,...n}){return g.jsx("input",{type:t,"data-slot":"input",className:Ae("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 y0({className:e,children:t,...n}){return g.jsxs(QZ,{"data-slot":"scroll-area",className:Ae("relative",e),...n,children:[g.jsx(ZZ,{"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}),g.jsx(iae,{}),g.jsx(JZ,{})]})}function iae({className:e,orientation:t="vertical",...n}){return g.jsx(D5,{"data-slot":"scroll-area-scrollbar",orientation:t,className:Ae("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:g.jsx($5,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function oae({initialPath:e,onSelect:t,onCancel:n}){const[r,a]=b.useState(null),[i,s]=b.useState(!0),[c,u]=b.useState(null),[f,m]=b.useState(null),h=y=>{s(!0),u(null);const w=y?`?path=${encodeURIComponent(y)}`:"";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 y=await He.post("/fs/mkdir",{path:r.path,name:f.trim()});m(null),h(y.path)}catch(y){u(y instanceof Error?y.message:"Failed to create folder")}};return b.useEffect(()=>{h(e||void 0)},[]),g.jsx(zc,{open:!0,onOpenChange:y=>!y&&n(),children:g.jsxs($c,{className:"sm:max-w-[480px]",children:[g.jsx(Bc,{children:g.jsx(Uc,{children:"Select Directory"})}),r&&g.jsx("div",{className:"break-all rounded-md bg-muted px-3 py-1.5 font-mono text-xs",children:r.path}),c&&g.jsx("p",{className:"text-sm text-destructive",children:c}),i&&!r?g.jsx("p",{className:"py-4 text-sm text-muted-foreground",children:"Loading..."}):g.jsx(y0,{className:"h-[300px]",children:g.jsxs("div",{className:"space-y-0.5",children:[(r==null?void 0:r.parent)&&g.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:()=>h(r.parent),children:[g.jsx(Ite,{className:"h-4 w-4"}),".."]}),r==null?void 0:r.entries.map(y=>g.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:()=>h(y.path),children:[g.jsx(zte,{className:"h-4 w-4"}),y.name]},y.path)),(r==null?void 0:r.entries.length)===0&&g.jsx("p",{className:"px-3 py-4 text-sm italic text-muted-foreground",children:"No subdirectories"})]})}),g.jsx(OB,{children:f!==null?g.jsxs("div",{className:"flex w-full gap-2",children:[g.jsx(ln,{value:f,onChange:y=>m(y.target.value),onKeyDown:y=>{y.key==="Enter"&&p(),y.key==="Escape"&&m(null)},placeholder:"Folder name",autoFocus:!0,className:"flex-1"}),g.jsx(De,{size:"sm",onClick:p,children:"Create"}),g.jsx(De,{size:"sm",variant:"outline",onClick:()=>m(null),children:"Cancel"})]}):g.jsxs(g.Fragment,{children:[g.jsx(De,{variant:"outline",onClick:()=>m(""),disabled:!r,children:"New Folder"}),g.jsx("div",{className:"flex-1"}),g.jsx(De,{onClick:()=>r&&t(r.path),disabled:!r,children:"Select"}),g.jsx(De,{variant:"outline",onClick:n,children:"Cancel"})]})})]})})}function en({className:e,...t}){return g.jsx($Z,{"data-slot":"label",className:Ae("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 sae(){const{data:e,isLoading:t,error:n}=Yf(),[r,a]=b.useState(!1);if(t)return g.jsxs("div",{className:"space-y-6",children:[g.jsx(Xt,{className:"h-8 w-32"}),g.jsx(Xt,{className:"h-64 rounded-lg"})]});if(n)return g.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[g.jsx(Zs,{className:"h-4 w-4"}),g.jsxs("span",{children:["Error: ",n.message]})]});const i=e??[];return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Projects"}),g.jsxs(De,{onClick:()=>a(!0),children:[g.jsx(IE,{className:"mr-2 h-4 w-4"}),"New Project"]})]}),r&&g.jsx(lae,{onDone:()=>a(!1),onCancel:()=>a(!1)}),i.length===0?g.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No projects registered yet."}):g.jsx(Sn,{children:g.jsx(En,{className:"p-0",children:g.jsxs(Hc,{children:[g.jsx(Fc,{children:g.jsxs(Tr,{children:[g.jsx(nt,{children:"Name"}),g.jsx(nt,{children:"Directory"}),g.jsx(nt,{children:"Created"}),g.jsx(nt,{children:"Status"}),g.jsx(nt,{className:"w-[80px]"})]})}),g.jsx(qc,{children:i.map(s=>g.jsxs(Tr,{children:[g.jsx(rt,{children:g.jsx(Va,{to:`/projects/${s.id}`,className:"text-sm font-medium text-primary underline-offset-4 hover:underline",children:s.display_name})}),g.jsx(rt,{className:"max-w-[300px] truncate text-sm text-muted-foreground",children:s.working_dir}),g.jsx(rt,{className:"text-sm text-muted-foreground",children:uae(s.created_at)}),g.jsx(rt,{children:s.dir_exists?g.jsx(_n,{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"}):g.jsx(_n,{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"})}),g.jsx(rt,{children:g.jsx(cae,{projectId:s.id})})]},s.id))})]})})})]})}function lae({onDone:e,onCancel:t}){const[n,r]=b.useState(""),[a,i]=b.useState(""),[s,c]=b.useState(!1),u=tae(),f=async m=>{m.preventDefault();try{await u.mutateAsync({display_name:n.trim(),working_dir:a.trim()}),e()}catch{}};return g.jsx(Sn,{children:g.jsx(En,{className:"pt-6",children:g.jsxs("form",{onSubmit:f,className:"space-y-4",children:[g.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(en,{htmlFor:"display-name",children:"Display Name"}),g.jsx(ln,{id:"display-name",value:n,onChange:m=>r(m.target.value),required:!0,autoFocus:!0})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(en,{htmlFor:"working-dir",children:"Working Directory"}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ln,{id:"working-dir",value:a,onChange:m=>i(m.target.value),placeholder:"/path/to/project",required:!0}),g.jsx(De,{type:"button",variant:"outline",size:"sm",onClick:()=>c(!s),children:"Browse"})]})]})]}),s&&g.jsx(oae,{initialPath:a||void 0,onSelect:m=>{i(m),c(!1)},onCancel:()=>c(!1)}),u.error&&g.jsx("p",{className:"text-sm text-destructive",children:u.error.message}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(De,{type:"submit",disabled:u.isPending,children:u.isPending?"Creating...":"Create"}),g.jsx(De,{type:"button",variant:"outline",onClick:t,children:"Cancel"})]})]})})})}function cae({projectId:e}){const[t,n]=b.useState(!1),r=nae(),a=async()=>{try{await r.mutateAsync(e)}catch{}};return t?g.jsxs("div",{className:"flex gap-1",children:[g.jsx(De,{size:"sm",variant:"destructive",onClick:a,disabled:r.isPending,children:"Confirm"}),g.jsx(De,{size:"sm",variant:"outline",onClick:()=>n(!1),children:"No"})]}):g.jsx(De,{size:"sm",variant:"ghost",className:"text-muted-foreground hover:text-destructive",onClick:()=>n(!0),children:g.jsx(lj,{className:"h-4 w-4"})})}function uae(e){try{return new Date(e).toLocaleDateString()}catch{return e}}function NB(e){return Ln({queryKey:Ge.projects.resources(e),queryFn:()=>He.get(`/projects/${e}/resources`)})}function fae(e,t,n,r){return Ln({queryKey:Ge.projects.resourceDetail(e,t,n),queryFn:()=>He.get(`/projects/${e}/resources/${t}/${n}`),enabled:(r==null?void 0:r.enabled)??!!n})}function dae(e,t,n,r){return Ln({queryKey:Ge.projects.resourceConfig(e,t,n),queryFn:()=>He.get(`/projects/${e}/resources/${t}/${n}/config`),enabled:(r==null?void 0:r.enabled)??!!n})}function hae(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 mae({page:e,totalPages:t,onPageChange:n}){if(t<=1)return null;const r=hae(e,t);return g.jsxs("div",{className:"flex items-center justify-center gap-1 pt-2",children:[g.jsx(De,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:e<=1,onClick:()=>n(e-1),children:g.jsx(gte,{className:"h-4 w-4"})}),r.map((a,i)=>a==="..."?g.jsx("span",{className:"px-1 text-sm text-muted-foreground",children:"..."},`ellipsis-${i}`):g.jsx(De,{variant:a===e?"default":"outline",size:"icon",className:"h-8 w-8 text-xs",onClick:()=>n(a),children:a},a)),g.jsx(De,{variant:"outline",size:"icon",className:"h-8 w-8",disabled:e>=t,onClick:()=>n(e+1),children:g.jsx(h0,{className:"h-4 w-4"})})]})}function TB(){return Ln({queryKey:Ge.roles.all,queryFn:()=>He.get("/roles")})}function pae(e){return Ln({queryKey:Ge.registry.validate(e??""),queryFn:()=>He.get(`/registry/agents/${e}/validate`),enabled:!!e})}function Lh(e,t){return Ln({queryKey:Ge.registry.list(e),queryFn:()=>He.get(`/registry/${e}`),enabled:t==null?void 0:t.enabled})}function vae(e,t,n){return Ln({queryKey:Ge.registry.detail(e,t),queryFn:()=>He.get(`/registry/${e}/${t}`),enabled:(n==null?void 0:n.enabled)??!!t})}function gae(){const e=jt();return Gt({mutationFn:t=>He.post("/sessions",t),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ge.projects.sessions(n.project_id)}),e.invalidateQueries({queryKey:["sessions"]})}})}function yae(){const e=jt();return Gt({mutationFn:t=>He.post(`/sessions/${t}/stop`),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]})}})}function el({...e}){return g.jsx(EJ,{"data-slot":"select",...e})}function tl({...e}){return g.jsx(OJ,{"data-slot":"select-value",...e})}function nl({className:e,size:t="default",children:n,...r}){return g.jsxs(_J,{"data-slot":"select-trigger","data-size":t,className:Ae("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,g.jsx(jJ,{asChild:!0,children:g.jsx(Ih,{className:"size-4 opacity-50"})})]})}function rl({className:e,children:t,position:n="item-aligned",align:r="center",...a}){return g.jsx(CJ,{children:g.jsxs(AJ,{"data-slot":"select-content",className:Ae("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:[g.jsx(bae,{}),g.jsx(NJ,{className:Ae("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),g.jsx(xae,{})]})})}function Kr({className:e,children:t,...n}){return g.jsxs(TJ,{"data-slot":"select-item",className:Ae("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:[g.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:g.jsx(MJ,{children:g.jsx(oj,{className:"size-4"})})}),g.jsx(PJ,{children:t})]})}function bae({className:e,...t}){return g.jsx(RJ,{"data-slot":"select-scroll-up-button",className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(xte,{className:"size-4"})})}function xae({className:e,...t}){return g.jsx(kJ,{"data-slot":"select-scroll-down-button",className:Ae("flex cursor-default items-center justify-center py-1",e),...t,children:g.jsx(Ih,{className:"size-4"})})}function $g({className:e,...t}){return g.jsx("textarea",{"data-slot":"textarea",className:Ae("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 dj({...e}){return g.jsx(DX,{"data-slot":"collapsible",...e})}function hj({...e}){return g.jsx(Yz,{"data-slot":"collapsible-trigger",...e})}function mj({...e}){return g.jsx(Xz,{"data-slot":"collapsible-content",...e})}function wae({projectId:e,open:t,onOpenChange:n}){var V;const r=Hf(),a=pB(e),i=TB(),{data:s}=Lh("agents"),c=mB(e),u=gae(),f=(V=a.data)==null?void 0:V.merged,[m,h]=b.useState(""),[p,y]=b.useState(""),[w,x]=b.useState(""),[S,E]=b.useState(""),[C,j]=b.useState(""),[A,T]=b.useState(""),[N,P]=b.useState([]),[k,D]=b.useState(""),K=()=>{h(""),y(""),x(""),E(""),j(""),T(""),P([])},B=I=>{P(z=>z.includes(I)?z.filter(X=>X!==I):[...z,I])},L=async I=>{I.preventDefault();try{const z={project_id:e,task:m.trim()};p.trim()&&(z.role=p.trim());const X={};w.trim()&&(X.runtime=w.trim()),S.trim()&&(X.isolation=S.trim()),C.trim()&&(X.merge_strategy=C.trim()),Object.keys(X).length>0&&(z.overrides=X),N.length>0&&(z.context_files=N),A.trim()&&(z.system_prompt=A.trim());const Z=await u.mutateAsync(z);K(),n(!1),r(`/projects/${e}/sessions/${Z.run_id}`)}catch{}},W=(f==null?void 0:f.orchestrator_role)??"orchestrator",$=(i.data??[]).filter(I=>I!==W),Y=[W,...$],R=(s??[]).map(I=>I.name),H=p.trim()&&!Y.includes(p.trim())?"Role not found in installed roles":"",q=w.trim()&&R.length>0&&!R.includes(w.trim())?"Runtime not found in installed agents":"",F=!!H||!!q;return g.jsx(zc,{open:t,onOpenChange:n,children:g.jsxs($c,{className:"max-w-2xl",children:[g.jsx(Bc,{children:g.jsx(Uc,{children:"Launch Session"})}),g.jsxs("form",{onSubmit:L,className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsxs(en,{htmlFor:"task",children:["Task ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx($g,{id:"task",value:m,onChange:I=>h(I.target.value),placeholder:"Describe what the agent should do...",required:!0,autoFocus:!0,rows:3})]}),(c.data??[]).length>0&&g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs(Dg,{children:[g.jsx(Ig,{asChild:!0,children:g.jsxs(De,{type:"button",variant:"outline",size:"sm",children:[g.jsx(Jte,{className:"mr-1 h-3.5 w-3.5"}),"@ Attach Files"]})}),g.jsxs(Lg,{align:"start",className:"w-64",onCloseAutoFocus:I=>I.preventDefault(),children:[g.jsx("div",{className:"px-2 py-1.5",children:g.jsx(ln,{placeholder:"Filter files...",value:k,onChange:I=>D(I.target.value),className:"h-7 text-xs",onKeyDown:I=>I.stopPropagation()})}),g.jsx("div",{className:"max-h-48 overflow-y-auto",children:(c.data??[]).filter(I=>I.path.toLowerCase().includes(k.toLowerCase())).map(I=>g.jsx(Fre,{checked:N.includes(I.path),onCheckedChange:()=>B(I.path),onSelect:z=>z.preventDefault(),children:g.jsx("span",{className:"font-mono text-xs",children:I.path})},I.path))})]})]}),N.length>0&&g.jsxs("span",{className:"text-xs text-muted-foreground",children:[N.length," file(s) attached"]})]}),N.length>0&&g.jsx("div",{className:"flex flex-wrap gap-1",children:N.map(I=>g.jsxs(_n,{variant:"secondary",className:"gap-1 font-mono text-xs",children:["@",I,g.jsx("button",{type:"button",onClick:()=>B(I),className:"ml-0.5 rounded-sm hover:bg-muted",children:g.jsx(cj,{className:"h-3 w-3"})})]},I))})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(en,{htmlFor:"role",children:"Role"}),g.jsx(ln,{id:"role",list:"datalist-role",value:p,onChange:I=>y(I.target.value),placeholder:W}),g.jsxs("datalist",{id:"datalist-role",children:[g.jsx("option",{value:W}),$.map(I=>g.jsx("option",{value:I},I))]}),H&&g.jsx("p",{className:"text-xs text-destructive",children:H})]}),g.jsxs(dj,{children:[g.jsx(hj,{asChild:!0,children:g.jsxs(De,{type:"button",variant:"ghost",size:"sm",children:[g.jsx(Ih,{className:"mr-1 h-4 w-4"}),"Advanced Options"]})}),g.jsxs(mj,{className:"mt-3 space-y-4",children:[g.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx(en,{htmlFor:"runtime",children:"Runtime"}),g.jsx(ln,{id:"runtime",list:"datalist-runtime",value:w,onChange:I=>x(I.target.value),placeholder:(f==null?void 0:f.runtime)??"strawpot-claude-code"}),s&&g.jsx("datalist",{id:"datalist-runtime",children:s.map(I=>g.jsx("option",{value:I.name},I.name))}),q&&g.jsx("p",{className:"text-xs text-destructive",children:q})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(en,{htmlFor:"isolation",children:"Isolation"}),g.jsxs(el,{value:S,onValueChange:E,children:[g.jsx(nl,{id:"isolation",children:g.jsx(tl,{placeholder:(f==null?void 0:f.isolation)??"none"})}),g.jsxs(rl,{children:[g.jsx(Kr,{value:"none",children:"none"}),g.jsx(Kr,{value:"worktree",children:"worktree"})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(en,{htmlFor:"merge-strategy",children:"Merge Strategy"}),g.jsxs(el,{value:C,onValueChange:j,children:[g.jsx(nl,{id:"merge-strategy",children:g.jsx(tl,{placeholder:(f==null?void 0:f.merge_strategy)??"auto"})}),g.jsxs(rl,{children:[g.jsx(Kr,{value:"auto",children:"auto"}),g.jsx(Kr,{value:"local",children:"local"}),g.jsx(Kr,{value:"pr",children:"pr"})]})]})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(en,{htmlFor:"system-prompt",children:"System Prompt"}),g.jsx($g,{id:"system-prompt",value:A,onChange:I=>T(I.target.value),placeholder:"Additional instructions for the agent...",rows:3})]})]})]}),u.error&&g.jsx("p",{className:"text-sm text-destructive",children:u.error.message}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(De,{type:"submit",disabled:u.isPending||F,children:u.isPending?"Launching...":"Launch"}),g.jsx(De,{type:"button",variant:"outline",onClick:()=>n(!1),children:"Cancel"})]})]})]})})}function Sae(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Eae({projectId:e}){const t=mB(e),n=rae(),r=aae(),a=b.useRef(null),[i,s]=b.useState(!1),c=b.useCallback(x=>{const S=Array.from(x);S.length!==0&&n.mutate({projectId:e,files:S},{onSuccess:()=>Tt.success(`Uploaded ${S.length} file(s)`),onError:()=>Tt.error("Upload failed")})},[e,n]),u=b.useCallback(x=>{x.preventDefault(),s(!1),c(x.dataTransfer.files)},[c]),f=b.useCallback(x=>{x.preventDefault(),s(!0)},[]),m=b.useCallback(x=>{x.preventDefault(),s(!1)},[]),h=b.useCallback(()=>{var x;(x=a.current)==null||x.click()},[]),p=b.useCallback(x=>{x.target.files&&(c(x.target.files),x.target.value="")},[c]),y=b.useCallback(x=>{r.mutate({projectId:e,filePath:x},{onSuccess:()=>Tt.success("File deleted"),onError:()=>Tt.error("Failed to delete file")})},[e,r]),w=t.data??[];return g.jsxs("div",{className:"space-y-4",children:[g.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:[g.jsx(gne,{className:"h-8 w-8 text-muted-foreground"}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Drag & drop files here, or"," ",g.jsx("button",{type:"button",onClick:h,className:"font-medium text-primary underline-offset-4 hover:underline",children:"browse"})]}),n.isPending&&g.jsx("p",{className:"text-xs text-muted-foreground",children:"Uploading..."}),g.jsx("input",{ref:a,type:"file",multiple:!0,className:"hidden",onChange:p})]}),w.length===0?g.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No files uploaded yet."}):g.jsx(Sn,{children:g.jsx(En,{className:"p-0",children:g.jsxs(Hc,{children:[g.jsx(Fc,{children:g.jsxs(Tr,{children:[g.jsx(nt,{children:"Name"}),g.jsx(nt,{className:"w-24",children:"Size"}),g.jsx(nt,{className:"w-44",children:"Modified"}),g.jsx(nt,{className:"w-12"})]})}),g.jsx(qc,{children:w.map(x=>g.jsxs(Tr,{children:[g.jsx(rt,{className:"font-mono text-xs",children:x.path}),g.jsx(rt,{className:"text-xs text-muted-foreground",children:Sae(x.size)}),g.jsx(rt,{className:"text-xs text-muted-foreground",children:new Date(x.modified_at).toLocaleString()}),g.jsx(rt,{children:g.jsx(De,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>y(x.path),disabled:r.isPending,children:g.jsx(lj,{className:"h-3.5 w-3.5 text-muted-foreground"})})})]},x.path))})]})})})]})}function _ae(){const e=jt();return Gt({mutationFn:t=>He.post("/registry/install",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function Oae(){const e=jt();return Gt({mutationFn:({type:t,name:n})=>He.delete(`/registry/${t}/${n}`),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function jae(){const e=jt();return Gt({mutationFn:t=>He.post("/registry/update",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function Cae(){const e=jt();return Gt({mutationFn:t=>He.post("/registry/reinstall",t),onSuccess:()=>{e.invalidateQueries({queryKey:["registry"]})}})}function Aae(){const e=jt();return Gt({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:Ge.registry.config(n.type,n.name)})}})}function Nae(e){const t=jt();return Gt({mutationFn:n=>He.post(`/projects/${e}/resources/install`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ge.projects.resources(e)})}})}function Tae(e){const t=jt();return Gt({mutationFn:({type:n,name:r})=>He.delete(`/projects/${e}/resources/${n}/${r}`),onSuccess:()=>{t.invalidateQueries({queryKey:Ge.projects.resources(e)})}})}function Pae(e){const t=jt();return Gt({mutationFn:n=>He.post(`/projects/${e}/resources/update`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ge.projects.resources(e)})}})}function Mae(e){const t=jt();return Gt({mutationFn:n=>He.post(`/projects/${e}/resources/reinstall`,n),onSuccess:()=>{t.invalidateQueries({queryKey:Ge.projects.resources(e)})}})}function Rae(e){const t=jt();return Gt({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:Ge.projects.resourceConfig(e,r.type,r.name)})}})}function kae({...e}){return g.jsx(CO,{"data-slot":"sheet",...e})}function Dae({...e}){return g.jsx(AO,{"data-slot":"sheet-portal",...e})}function Iae({className:e,...t}){return g.jsx(NO,{"data-slot":"sheet-overlay",className:Ae("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 Lae({className:e,children:t,side:n="right",showCloseButton:r=!0,...a}){return g.jsxs(Dae,{children:[g.jsx(Iae,{}),g.jsxs(TO,{"data-slot":"sheet-content",className:Ae("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&&g.jsxs(PO,{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:[g.jsx(cj,{className:"size-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function zae({className:e,...t}){return g.jsx("div",{"data-slot":"sheet-header",className:Ae("flex flex-col gap-1.5 p-4",e),...t})}function $ae({className:e,...t}){return g.jsx(w4,{"data-slot":"sheet-title",className:Ae("font-semibold text-foreground",e),...t})}function Bae({className:e,...t}){return g.jsx(S4,{"data-slot":"sheet-description",className:Ae("text-sm text-muted-foreground",e),...t})}const Uae=v0("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 lg({className:e,variant:t,...n}){return g.jsx("div",{"data-slot":"alert",role:"alert",className:Ae(Uae({variant:t}),e),...n})}function cg({className:e,...t}){return g.jsx("div",{"data-slot":"alert-title",className:Ae("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function ug({className:e,...t}){return g.jsx("div",{"data-slot":"alert-description",className:Ae("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",e),...t})}function Hae({agentName:e}){const{data:t}=pae(e);return!t||!(!t.tools_ok||t.setup_command||!t.env_ok)?null:g.jsxs("div",{className:"mb-4 space-y-3",children:[!t.tools_ok&&g.jsxs(lg,{variant:"destructive",children:[g.jsx(Zs,{className:"h-4 w-4"}),g.jsx(cg,{children:"Missing Prerequisites"}),g.jsx(ug,{children:t.missing_tools.map(r=>g.jsxs("div",{className:"mt-1",children:[g.jsx("strong",{children:r.name})," not found on PATH.",r.install_hint&&g.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&&g.jsxs(lg,{children:[g.jsx(dne,{className:"h-4 w-4"}),g.jsx(cg,{children:"Setup"}),g.jsxs(ug,{children:[g.jsx("p",{children:t.setup_description||"Run initial authentication in your terminal:"}),g.jsx("code",{className:"mt-1 block rounded bg-muted px-2 py-1 text-xs",children:t.setup_command}),g.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&&g.jsxs(lg,{children:[g.jsx(qte,{className:"h-4 w-4"}),g.jsx(cg,{children:"API Key Required"}),g.jsx(ug,{children:g.jsxs("p",{children:["Set"," ",t.missing_env.map((r,a)=>g.jsxs("span",{children:[a>0&&", ",g.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-xs",children:r})]},r))," ","in the config below to authenticate."]})})]})]})}function Fae(e,t,n){return Ln({queryKey:Ge.registry.config(e,t),queryFn:()=>He.get(`/registry/${e}/${t}/config`),enabled:(n==null?void 0:n.enabled)??!!t})}function qae({resourceType:e,resourceName:t,enabled:n,projectId:r}){const a=Fae(e,t,{enabled:n&&!r}),i=dae(r??0,e,t,{enabled:n&&!!r}),{data:s,isLoading:c}=r?i:a,u=Aae(),f=Rae(r??0),m=r?f:u,{data:h}=Lh("agents",{enabled:n&&e==="roles"}),[p,y]=b.useState({}),[w,x]=b.useState({}),[S,E]=b.useState(new Set);if(b.useEffect(()=>{s&&(y({...s.env_values}),x({...s.params_values}))},[s]),c||!s)return null;const C=Object.keys(s.env_schema),j=Object.keys(s.params_schema);if(C.length===0&&j.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=(h??[]).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:j.length>0?w:void 0},{onSuccess:()=>Tt.success("Configuration saved"),onError:()=>Tt.error("Failed to save configuration")})};return g.jsxs("div",{className:"flex flex-col gap-4",children:[C.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(Ps,{}),g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx("h4",{className:"text-sm font-semibold",children:"Environment Variables"}),C.map(D=>{const K=s.env_schema[D],B=S.has(D);return g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(en,{className:"text-xs font-mono",children:D}),K.required&&g.jsx(_n,{variant:"outline",className:"h-4 px-1 text-[10px] text-red-500 border-red-200",children:"required"})]}),K.description&&g.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),g.jsxs("div",{className:"flex gap-1",children:[g.jsx(ln,{type:B?"text":"password",value:p[D]??"",onChange:L=>y(W=>({...W,[D]:L.target.value})),placeholder:D,className:"h-8 text-xs font-mono"}),g.jsx(De,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 shrink-0 p-0",onClick:()=>A(D),children:B?g.jsx(Pte,{className:"h-3.5 w-3.5"}):g.jsx(Rte,{className:"h-3.5 w-3.5"})})]})]},D)})]})]}),j.length>0&&g.jsxs(g.Fragment,{children:[g.jsx(Ps,{}),g.jsxs("div",{className:"flex flex-col gap-3",children:[g.jsx("h4",{className:"text-sm font-semibold",children:"Parameters"}),j.map(D=>{const K=s.params_schema[D],B=w[D],L=K.default;if(K.type==="boolean")return g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(en,{className:"text-xs font-mono",children:D}),K.description&&g.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),g.jsxs(el,{value:B!=null?String(B):L!=null?String(L):"",onValueChange:H=>x(q=>({...q,[D]:H==="true"})),children:[g.jsx(nl,{className:"h-8 text-xs",children:g.jsx(tl,{})}),g.jsxs(rl,{children:[g.jsx(Kr,{value:"true",children:"true"}),g.jsx(Kr,{value:"false",children:"false"})]})]})]},D);const W=K.type==="int"||K.type==="float"?"number":"text",$=K.type==="float"?"any":void 0,Y=D==="default_agent"&&h?h.map(H=>H.name):void 0,R=Y?`datalist-${D}`:void 0;return g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsx(en,{className:"text-xs font-mono",children:D}),K.description&&g.jsx("p",{className:"text-xs text-muted-foreground",children:K.description}),g.jsx(ln,{type:W,step:$,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:L!=null?String(L):void 0,className:"h-8 text-xs font-mono"}),Y&&g.jsx("datalist",{id:R,children:Y.map(H=>g.jsx("option",{value:H},H))}),D==="default_agent"&&P&&g.jsx("p",{className:"text-xs text-destructive",children:P})]},D)})]})]}),g.jsxs(De,{size:"sm",onClick:k,disabled:m.isPending||!!P,className:"self-start",children:[g.jsx(oB,{className:"mr-2 h-3.5 w-3.5"}),m.isPending?"Saving...":"Save Configuration"]})]})}function PB({resource:e,resourceType:t,open:n,onOpenChange:r,projectId:a}){var T;const i=Oae(),s=jae(),c=Cae(),u=Tae(a??0),f=Pae(a??0),m=Mae(a??0),h=a?u:i,p=a?f:s,y=a?m:c,[w,x]=b.useState(!1),S=p.isPending||y.isPending||h.isPending;if(!e)return null;const E=()=>{if(!w){x(!0);return}h.mutate({type:t,name:e.name},{onSuccess:N=>{N.exit_code===0?(Tt.success(`Uninstalled ${e.name}`),r(!1)):Tt.error(`Uninstall failed: ${N.stderr||N.stdout}`),x(!1)},onError:()=>{Tt.error("Uninstall request failed"),x(!1)}})},C=()=>{p.mutate({type:t,name:e.name},{onSuccess:N=>{N.exit_code===0?Tt.success(`Updated ${e.name}`):Tt.error(`Update failed: ${N.stderr||N.stdout}`)},onError:()=>Tt.error("Update request failed")})},j=()=>{y.mutate({type:t,name:e.name},{onSuccess:N=>{N.exit_code===0?Tt.success(`Reinstalled ${e.name}`):Tt.error(`Reinstall failed: ${N.stderr||N.stdout}`)},onError:()=>Tt.error("Reinstall request failed")})},A=(T=e.frontmatter)==null?void 0:T.metadata;return g.jsx(kae,{open:n,onOpenChange:N=>{r(N),x(!1)},children:g.jsxs(Lae,{side:"right",className:"flex h-full flex-col sm:max-w-lg",children:[g.jsxs(zae,{className:"shrink-0",children:[g.jsxs($ae,{className:"flex items-center gap-2",children:[e.name,e.version&&g.jsxs(_n,{variant:"outline",className:"text-xs font-normal",children:["v",e.version]})]}),g.jsx(Bae,{children:e.description||"No description"})]}),g.jsxs("div",{className:"shrink-0 flex flex-col gap-4 px-4",children:[g.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground",children:[g.jsxs("span",{children:["Source: ",g.jsx("strong",{children:e.source})]}),g.jsxs("span",{children:["Path: ",g.jsx("code",{className:"rounded bg-muted px-1",children:e.path})]})]}),A&&Object.keys(A).length>0&&g.jsxs("details",{className:"text-sm",children:[g.jsx("summary",{className:"cursor-pointer font-medium text-muted-foreground",children:"Metadata"}),g.jsx("pre",{className:"mt-2 max-h-40 overflow-auto rounded-md bg-muted p-3 text-xs",children:JSON.stringify(A,null,2)})]})]}),g.jsxs(y0,{className:"min-h-0 flex-1 px-4",children:[t==="agents"&&g.jsx(Hae,{agentName:e.name}),g.jsx(qae,{resourceType:t,resourceName:e.name,enabled:n,projectId:a}),g.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none whitespace-pre-wrap mt-4",children:e.body||"No content."})]}),g.jsxs("div",{className:"shrink-0 border-t border-border p-4 flex gap-2",children:[g.jsx(De,{size:"sm",onClick:C,disabled:S,children:p.isPending?"Updating...":"Update"}),g.jsx(De,{variant:"outline",size:"sm",onClick:j,disabled:S,children:y.isPending?"Reinstalling...":"Reinstall"}),g.jsx("div",{className:"flex-1"}),g.jsx(De,{variant:w?"destructive":"outline",size:"sm",onClick:E,disabled:S,children:h.isPending?"Uninstalling...":w?"Confirm Uninstall":"Uninstall"}),w&&!h.isPending&&g.jsx(De,{variant:"ghost",size:"sm",onClick:()=>x(!1),children:"Cancel"})]})]})})}const Kae=[{value:"roles",label:"Role"},{value:"skills",label:"Skill"},{value:"agents",label:"Agent"},{value:"memories",label:"Memory"}];function pj({open:e,onOpenChange:t,defaultType:n,projectId:r}){const[a,i]=b.useState(n??"roles"),[s,c]=b.useState(""),[u,f]=b.useState(null),[m,h]=b.useState(null);b.useEffect(()=>{e&&n&&i(n)},[e,n]);const p=_ae(),y=Nae(r??0),w=r?y:p,x=(u==null?void 0:u.status)==="success",S=()=>{s.trim()&&(f(null),h(null),w.mutate({type:a,name:s.trim()},{onSuccess:C=>{C.exit_code===0?(Tt.success(`Installed ${s.trim()}`),f({status:"success",message:`Successfully installed ${s.trim()}`}),h(C.stdout||null)):(f({status:"error",message:"Installation failed"}),h(C.stderr||C.stdout||"Unknown error."))},onError:()=>{f({status:"error",message:"Install request failed"}),Tt.error("Install request failed")}}))},E=C=>{C||(f(null),h(null),c("")),t(C)};return g.jsx(zc,{open:e,onOpenChange:E,children:g.jsxs($c,{className:"sm:max-w-md",children:[g.jsxs(Bc,{children:[g.jsx(Uc,{children:r?"Install Resource to Project":"Install Resource"}),g.jsx(jB,{children:"Install a resource from StrawHub by name."})]}),g.jsxs("div",{className:"flex flex-col gap-4",children:[u&&g.jsxs(lg,{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"?g.jsx(nB,{className:"h-4 w-4 text-green-600 dark:text-green-400"}):g.jsx(jte,{className:"h-4 w-4"}),g.jsx(cg,{children:u.status==="success"?"Installed":"Error"}),g.jsx(ug,{children:u.message})]}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx(en,{htmlFor:"install-type",children:"Type"}),g.jsxs(el,{value:a,onValueChange:i,disabled:x,children:[g.jsx(nl,{id:"install-type",children:g.jsx(tl,{})}),g.jsx(rl,{children:Kae.map(C=>g.jsx(Kr,{value:C.value,children:C.label},C.value))})]})]}),g.jsxs("div",{className:"flex flex-col gap-2",children:[g.jsx(en,{htmlFor:"install-name",children:"Package Name"}),g.jsx(ln,{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&&g.jsxs("details",{className:"text-sm",children:[g.jsx("summary",{className:"cursor-pointer text-xs font-medium text-muted-foreground",children:"Output"}),g.jsx("pre",{className:"mt-2 max-h-40 overflow-auto rounded-md bg-muted p-3 text-xs",children:m})]})]}),g.jsx(OB,{children:(u==null?void 0:u.status)==="success"?g.jsx(De,{onClick:()=>E(!1),children:"Done"}):g.jsx(De,{onClick:S,disabled:!s.trim()||w.isPending,children:w.isPending?"Installing...":"Install"})})]})})}const Vae={roles:"Role",skills:"Skill",agents:"Agent",memories:"Memory"};function Yae({projectId:e,installOpen:t,onInstallOpenChange:n}){const{data:r,isLoading:a}=NB(e),[i,s]=b.useState(null),[c,u]=b.useState(""),[f,m]=b.useState(!1),[h,p]=b.useState(!1),y=t??h,w=n??p,{data:x}=fae(e,c,i??"",{enabled:f&&!!i&&!!c});return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("p",{className:"text-sm text-muted-foreground",children:"Resources installed to this project"}),g.jsxs(De,{onClick:()=>w(!0),size:"sm",children:[g.jsx(m0,{className:"mr-2 h-4 w-4"}),"Install"]})]}),a?g.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((S,E)=>g.jsx(Xt,{className:"h-12 w-full"},E))}):!r||r.length===0?g.jsx("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-muted-foreground",children:"No project resources installed yet."}):g.jsx(Sn,{children:g.jsx(En,{className:"p-0",children:g.jsxs(Hc,{children:[g.jsx(Fc,{children:g.jsxs(Tr,{children:[g.jsx(nt,{children:"Name"}),g.jsx(nt,{children:"Type"}),g.jsx(nt,{children:"Version"}),g.jsx(nt,{children:"Description"})]})}),g.jsx(qc,{children:r.map(S=>g.jsxs(Tr,{className:"cursor-pointer",onClick:()=>{s(S.name),u(S.type),m(!0)},children:[g.jsx(rt,{className:"font-medium",children:S.name}),g.jsx(rt,{children:g.jsx(_n,{variant:"outline",className:"text-xs",children:Vae[S.type]??S.type})}),g.jsx(rt,{className:"text-sm text-muted-foreground",children:S.version??"—"}),g.jsx(rt,{className:"max-w-[300px] truncate text-sm",children:S.description||"—"})]},`${S.type}-${S.name}`))})]})})}),g.jsx(PB,{resource:x??null,resourceType:c,open:f,onOpenChange:m,projectId:e}),g.jsx(pj,{open:y,onOpenChange:w,projectId:e})]})}function Xae(e,t="30d"){return Ln({queryKey:Ge.projects.stats(e,t),queryFn:()=>He.get(`/projects/${e}/stats?period=${t}`)})}var Gae=["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 vj(e){if(typeof e!="string")return!1;var t=Gae;return t.includes(e)}var Wae=["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"],Qae=new Set(Wae);function MB(e){return typeof e!="string"?!1:Qae.has(e)}function RB(e){return typeof e=="string"&&e.startsWith("data-")}function Qr(e){if(typeof e!="object"||e===null)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(MB(n)||RB(n))&&(t[n]=e[n]);return t}function wc(e){if(e==null)return null;if(b.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Qr(t)}return typeof e=="object"&&!Array.isArray(e)?Qr(e):null}function dr(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(MB(n)||RB(n)||vj(n))&&(t[n]=e[n]);return t}function Zae(e){return e==null?null:b.isValidElement(e)?dr(e.props):typeof e=="object"&&!Array.isArray(e)?dr(e):null}var Jae=["children","width","height","viewBox","className","style","title","desc"];function UE(){return UE=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},UE.apply(null,arguments)}function eie(e,t){if(e==null)return{};var n,r,a=tie(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 tie(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 gj=b.forwardRef((e,t)=>{var{children:n,width:r,height:a,viewBox:i,className:s,style:c,title:u,desc:f}=e,m=eie(e,Jae),h=i||{width:r,height:a,x:0,y:0},p=ot("recharts-surface",s);return b.createElement("svg",UE({},dr(m),{className:p,width:r,height:a,style:c,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height),ref:t}),b.createElement("title",null,u),b.createElement("desc",null,f),n)}),nie=["children","className"];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 rie(e,t){if(e==null)return{};var n,r,a=aie(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 aie(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 On=b.forwardRef((e,t)=>{var{children:n,className:r}=e,a=rie(e,nie),i=ot("recharts-layer",r);return b.createElement("g",HE({className:i},dr(a),{ref:t}),n)}),kB=b.createContext(null),iie=()=>b.useContext(kB);function Ot(e){return function(){return e}}const DB=Math.cos,Bg=Math.sin,ei=Math.sqrt,Ug=Math.PI,b0=2*Ug,FE=Math.PI,qE=2*FE,Kl=1e-6,oie=qE-Kl;function IB(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function sie(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return IB;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 lie{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?IB:sie(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,h=c-n,p=m*m+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>Kl)if(!(Math.abs(h*u-f*m)>Kl)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let y=r-s,w=a-c,x=u*u+f*f,S=y*y+w*w,E=Math.sqrt(x),C=Math.sqrt(p),j=i*Math.tan((FE-Math.acos((x+p-S)/(2*E*C)))/2),A=j/C,T=j/E;Math.abs(A-1)>Kl&&this._append`L${t+A*m},${n+A*h}`,this._append`A${i},${i},0,0,${+(h*y>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,h=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%qE+qE),p>oie?this._append`A${r},${r},0,1,${h},${t-c},${n-u}A${r},${r},0,1,${h},${this._x1=f},${this._y1=m}`:p>Kl&&this._append`A${r},${r},0,${+(p>=FE)},${h},${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 yj(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 lie(t)}function bj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function LB(e){this._context=e}LB.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 x0(e){return new LB(e)}function zB(e){return e[0]}function $B(e){return e[1]}function BB(e,t){var n=Ot(!0),r=null,a=x0,i=null,s=yj(c);e=typeof e=="function"?e:e===void 0?zB:Ot(e),t=typeof t=="function"?t:t===void 0?$B:Ot(t);function c(u){var f,m=(u=bj(u)).length,h,p=!1,y;for(r==null&&(i=a(y=s())),f=0;f<=m;++f)!(f<m&&n(h=u[f],f,u))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(h,f,u),+t(h,f,u));if(y)return i=null,y+""||null}return c.x=function(u){return arguments.length?(e=typeof u=="function"?u:Ot(+u),c):e},c.y=function(u){return arguments.length?(t=typeof u=="function"?u:Ot(+u),c):t},c.defined=function(u){return arguments.length?(n=typeof u=="function"?u:Ot(!!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 Mv(e,t,n){var r=null,a=Ot(!0),i=null,s=x0,c=null,u=yj(f);e=typeof e=="function"?e:e===void 0?zB:Ot(+e),t=typeof t=="function"?t:Ot(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?$B:Ot(+n);function f(h){var p,y,w,x=(h=bj(h)).length,S,E=!1,C,j=new Array(x),A=new Array(x);for(i==null&&(c=s(C=u())),p=0;p<=x;++p){if(!(p<x&&a(S=h[p],p,h))===E)if(E=!E)y=p,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),w=p-1;w>=y;--w)c.point(j[w],A[w]);c.lineEnd(),c.areaEnd()}E&&(j[p]=+e(S,p,h),A[p]=+t(S,p,h),c.point(r?+r(S,p,h):j[p],n?+n(S,p,h):A[p]))}if(C)return c=null,C+""||null}function m(){return BB().defined(a).curve(s).context(i)}return f.x=function(h){return arguments.length?(e=typeof h=="function"?h:Ot(+h),r=null,f):e},f.x0=function(h){return arguments.length?(e=typeof h=="function"?h:Ot(+h),f):e},f.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:Ot(+h),f):r},f.y=function(h){return arguments.length?(t=typeof h=="function"?h:Ot(+h),n=null,f):t},f.y0=function(h){return arguments.length?(t=typeof h=="function"?h:Ot(+h),f):t},f.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:Ot(+h),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(h){return arguments.length?(a=typeof h=="function"?h:Ot(!!h),f):a},f.curve=function(h){return arguments.length?(s=h,i!=null&&(c=s(i)),f):s},f.context=function(h){return arguments.length?(h==null?i=c=null:c=s(i=h),f):i},f}class UB{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 cie(e){return new UB(e,!0)}function uie(e){return new UB(e,!1)}const xj={draw(e,t){const n=ei(t/Ug);e.moveTo(n,0),e.arc(0,0,n,0,b0)}},fie={draw(e,t){const n=ei(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()}},HB=ei(1/3),die=HB*2,hie={draw(e,t){const n=ei(t/die),r=n*HB;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},mie={draw(e,t){const n=ei(t),r=-n/2;e.rect(r,r,n,n)}},pie=.8908130915292852,FB=Bg(Ug/10)/Bg(7*Ug/10),vie=Bg(b0/10)*FB,gie=-DB(b0/10)*FB,yie={draw(e,t){const n=ei(t*pie),r=vie*n,a=gie*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const s=b0*i/5,c=DB(s),u=Bg(s);e.lineTo(u*n,-c*n),e.lineTo(c*r-u*a,u*r+c*a)}e.closePath()}},l1=ei(3),bie={draw(e,t){const n=-ei(t/(l1*3));e.moveTo(0,n*2),e.lineTo(-l1*n,-n),e.lineTo(l1*n,-n),e.closePath()}},fa=-.5,da=ei(3)/2,KE=1/ei(12),xie=(KE/2+1)*3,wie={draw(e,t){const n=ei(t/xie),r=n/2,a=n*KE,i=r,s=n*KE+n,c=-i,u=s;e.moveTo(r,a),e.lineTo(i,s),e.lineTo(c,u),e.lineTo(fa*r-da*a,da*r+fa*a),e.lineTo(fa*i-da*s,da*i+fa*s),e.lineTo(fa*c-da*u,da*c+fa*u),e.lineTo(fa*r+da*a,fa*a-da*r),e.lineTo(fa*i+da*s,fa*s-da*i),e.lineTo(fa*c+da*u,fa*u-da*c),e.closePath()}};function Sie(e,t){let n=null,r=yj(a);e=typeof e=="function"?e:Ot(e||xj),t=typeof t=="function"?t:Ot(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:Ot(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ot(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function Hg(){}function Fg(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 qB(e){this._context=e}qB.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:Fg(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:Fg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Eie(e){return new qB(e)}function KB(e){this._context=e}KB.prototype={areaStart:Hg,areaEnd:Hg,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:Fg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function _ie(e){return new KB(e)}function VB(e){this._context=e}VB.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:Fg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Oie(e){return new VB(e)}function YB(e){this._context=e}YB.prototype={areaStart:Hg,areaEnd:Hg,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 jie(e){return new YB(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 c1(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 qg(e){this._context=e}qg.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:c1(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,c1(this,XM(this,n=YM(this,e,t)),n);break;default:c1(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 XB(e){this._context=new GB(e)}(XB.prototype=Object.create(qg.prototype)).point=function(e,t){qg.prototype.point.call(this,t,e)};function GB(e){this._context=e}GB.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 Cie(e){return new qg(e)}function Aie(e){return new XB(e)}function WB(e){this._context=e}WB.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 Nie(e){return new WB(e)}function w0(e,t){this._context=e,this._t=t}w0.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 Tie(e){return new w0(e,.5)}function Pie(e){return new w0(e,0)}function Mie(e){return new w0(e,1)}function Sc(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 VE(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Rie(e,t){return e[t]}function kie(e){const t=[];return t.key=e,t}function Die(){var e=Ot([]),t=VE,n=Sc,r=Rie;function a(i){var s=Array.from(e.apply(this,arguments),kie),c,u=s.length,f=-1,m;for(const h of i)for(c=0,++f;c<u;++c)(s[c][f]=[0,+r(h,s[c].key,f,i)]).data=h;for(c=0,m=bj(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:Ot(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:Ot(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?VE:typeof i=="function"?i:Ot(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??Sc,a):n},a}function Iie(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}Sc(e,t)}}function Lie(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}Sc(e,t)}}function zie(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]],h=m[r][1]||0,p=m[r-1][1]||0,y=(h-p)/2,w=0;w<c;++w){var x=e[t[w]],S=x[r][1]||0,E=x[r-1][1]||0;y+=S-E}u+=h,f+=y*h}a[r-1][1]+=a[r-1][0]=n,u&&(n-=f/u)}a[r-1][1]+=a[r-1][0]=n,Sc(e,t)}}var u1={},f1={},WM;function $ie(){return WM||(WM=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(f1)),f1}var d1={},QM;function QB(){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})(d1)),d1}var h1={},ZM;function wj(){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})(h1)),h1}var m1={},p1={},JM;function Bie(){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})(p1)),p1}var eR;function Sj(){return eR||(eR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Bie(),n=wj();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 h=a[c];f?h==="\\"&&c+1<s?(c++,u+=a[c]):h===f?f="":u+=h:m?h==='"'||h==="'"?f=h:h==="]"?(m=!1,i.push(u),u=""):u+=h:h==="["?(m=!0,u&&(i.push(u),u="")):h==="."?u&&(i.push(u),u=""):u+=h,c++}return u&&i.push(u),i}e.toPath=r})(m1)),m1}var tR;function Ej(){return tR||(tR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$ie(),n=QB(),r=wj(),a=Sj();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 h=0;h<u.length;h++){if(m==null||t.isUnsafeProperty(u[h]))return f;m=m[u[h]]}return m===void 0?f:m}e.get=i})(u1)),u1}var v1,nR;function Uie(){return nR||(nR=1,v1=Ej().get),v1}var Hie=Uie();const Ec=Wa(Hie);var Fie=4;function qs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Fie,n=10**t,r=Math.round(e*n)/n;return Object.is(r,-0)?0:r}function Vt(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+qs(c)+i:a+i},"")}var kn=e=>e===0?0:e>0?1:-1,Ai=e=>typeof e=="number"&&e!=+e,_c=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Ee=e=>(typeof e=="number"||e instanceof Number)&&!Ai(e),Ni=e=>Ee(e)||typeof e=="string",qie=0,zh=e=>{var t=++qie;return"".concat(e||"").concat(t)},ar=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(!Ee(t)&&typeof t!="string")return r;var i;if(_c(t)){if(n==null)return r;var s=t.indexOf("%");i=n*parseFloat(t.slice(0,s))/100}else i=+t;return Ai(i)&&(i=r),a&&n!=null&&i>n&&(i=n),i},ZB=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 kt(e,t,n){return Ee(e)&&Ee(t)?qs(e+n*(t-e)):t}function JB(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Ec(r,t))===n)}var Lt=e=>e===null||typeof e>"u",Cm=e=>Lt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Ar(e){return e!=null}function hl(){}var Kie=["type","size","sizeType"];function YE(){return YE=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},YE.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){Vie(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 Vie(e,t,n){return(t=Yie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yie(e){var t=Xie(e,"string");return typeof t=="symbol"?t:t+""}function Xie(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 Gie(e,t){if(e==null)return{};var n,r,a=Wie(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 Wie(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 e8={symbolCircle:xj,symbolCross:fie,symbolDiamond:hie,symbolSquare:mie,symbolStar:yie,symbolTriangle:bie,symbolWye:wie},Qie=Math.PI/180,Zie=e=>{var t="symbol".concat(Cm(e));return e8[t]||xj},Jie=(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*Qie;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}},eoe=(e,t)=>{e8["symbol".concat(Cm(e))]=t},_j=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,a=Gie(e,Kie),i=aR(aR({},a),{},{type:t,size:n,sizeType:r}),s="circle";typeof t=="string"&&(s=t);var c=()=>{var p=Zie(s),y=Sie().type(p).size(Jie(n,r,s)),w=y();if(w!==null)return w},{className:u,cx:f,cy:m}=i,h=dr(i);return Ee(f)&&Ee(m)&&Ee(n)?b.createElement("path",YE({},h,{className:ot("recharts-symbols",u),transform:"translate(".concat(f,", ").concat(m,")"),d:c()})):null};_j.registerSymbol=eoe;var t8=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Oj=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(b.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var r={};return Object.keys(n).forEach(a=>{vj(a)&&typeof n[a]=="function"&&(r[a]=(i=>n[a](n,i)))}),r},toe=(e,t,n)=>r=>(e(t,n,r),null),Am=(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];vj(a)&&typeof i=="function"&&(r||(r={}),r[a]=toe(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 noe(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){roe(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 roe(e,t,n){return(t=aoe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aoe(e){var t=ioe(e,"string");return typeof t=="symbol"?t:t+""}function ioe(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 dn(e,t){var n=noe({},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 Kg(){return Kg=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},Kg.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 n8(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){ooe(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 ooe(e,t,n){return(t=soe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function soe(e){var t=loe(e,"string");return typeof t=="symbol"?t:t+""}function loe(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 va=32,coe={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function uoe(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function foe(e){var{data:t,iconType:n,inactiveColor:r}=e,a=va/2,i=va/6,s=va/3,c=t.inactive?r:t.color,u=n??t.type;if(u==="none")return null;if(u==="plainline")return b.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:uoe(t.payload),x1:0,y1:a,x2:va,y2:a,className:"recharts-legend-icon"});if(u==="line")return b.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(va,"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 b.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(va/8,"h").concat(va,"v").concat(va*3/4,"h").concat(-va,"z"),className:"recharts-legend-icon"});if(b.isValidElement(t.legendIcon)){var f=n8({},t);return delete f.legendIcon,b.cloneElement(t.legendIcon,f)}return b.createElement(_j,{fill:c,cx:a,cy:a,size:va,sizeType:"diameter",type:u})}function doe(e){var{payload:t,iconSize:n,layout:r,formatter:a,inactiveColor:i,iconType:s,labelStyle:c}=e,u={x:0,y:0,width:va,height:va},f={display:r==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((h,p)=>{var y=h.formatter||a,w=ot({"recharts-legend-item":!0,["legend-item-".concat(p)]:!0,inactive:h.inactive});if(h.type==="none")return null;var x=typeof c=="object"?n8({},c):{};x.color=h.inactive?i:x.color||h.color;var S=y?y(h.value,h,p):h.value;return b.createElement("li",Kg({className:w,style:f,key:"legend-item-".concat(p)},Am(e,h,p)),b.createElement(gj,{width:n,height:n,viewBox:u,style:m,"aria-label":"".concat(S," legend icon")},b.createElement(foe,{data:h,iconType:s,inactiveColor:i})),b.createElement("span",{className:"recharts-legend-item-text",style:x},S))})}var hoe=e=>{var t=dn(e,coe),{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 b.createElement("ul",{className:"recharts-default-legend",style:i},b.createElement(doe,Kg({},t,{payload:n})))},g1={},y1={},sR;function moe(){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})(y1)),y1}var b1={},lR;function poe(){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})(b1)),b1}var x1={},cR;function r8(){return cR||(cR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(x1)),x1}var w1={},S1={},E1={},uR;function voe(){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})(E1)),E1}var fR;function a8(){return fR||(fR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=voe();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(S1)),S1}var _1={},dR;function goe(){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})(_1)),_1}var hR;function yoe(){return hR||(hR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=a8(),n=goe();function r(a){return n.isObjectLike(a)&&t.isArrayLike(a)}e.isArrayLikeObject=r})(w1)),w1}var O1={},j1={},mR;function boe(){return mR||(mR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ej();function n(r){return function(a){return t.get(a,r)}}e.property=n})(j1)),j1}var C1={},A1={},N1={},T1={},pR;function i8(){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})(T1)),T1}var P1={},vR;function o8(){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})(P1)),P1}var M1={},gR;function s8(){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})(M1)),M1}var yR;function xoe(){return yR||(yR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=i8(),n=o8(),r=s8();function a(m,h,p){return typeof p!="function"?a(m,h,()=>{}):i(m,h,function y(w,x,S,E,C,j){const A=p(w,x,S,E,C,j);return A!==void 0?!!A:i(w,x,y,j)},new Map)}function i(m,h,p,y){if(h===m)return!0;switch(typeof h){case"object":return s(m,h,p,y);case"function":return Object.keys(h).length>0?i(m,{...h},p,y):r.isEqualsSameValueZero(m,h);default:return t.isObject(m)?typeof h=="string"?h==="":!0:r.isEqualsSameValueZero(m,h)}}function s(m,h,p,y){if(h==null)return!0;if(Array.isArray(h))return u(m,h,p,y);if(h instanceof Map)return c(m,h,p,y);if(h instanceof Set)return f(m,h,p,y);const w=Object.keys(h);if(m==null||n.isPrimitive(m))return w.length===0;if(w.length===0)return!0;if(y!=null&&y.has(h))return y.get(h)===m;y==null||y.set(h,m);try{for(let x=0;x<w.length;x++){const S=w[x];if(!n.isPrimitive(m)&&!(S in m)||h[S]===void 0&&m[S]!==void 0||h[S]===null&&m[S]!==null||!p(m[S],h[S],S,m,h,y))return!1}return!0}finally{y==null||y.delete(h)}}function c(m,h,p,y){if(h.size===0)return!0;if(!(m instanceof Map))return!1;for(const[w,x]of h.entries()){const S=m.get(w);if(p(S,x,w,m,h,y)===!1)return!1}return!0}function u(m,h,p,y){if(h.length===0)return!0;if(!Array.isArray(m))return!1;const w=new Set;for(let x=0;x<h.length;x++){const S=h[x];let E=!1;for(let C=0;C<m.length;C++){if(w.has(C))continue;const j=m[C];let A=!1;if(p(j,S,x,m,h,y)&&(A=!0),A){w.add(C),E=!0;break}}if(!E)return!1}return!0}function f(m,h,p,y){return h.size===0?!0:m instanceof Set?u([...m],[...h],p,y):!1}e.isMatchWith=a,e.isSetMatch=f})(N1)),N1}var bR;function l8(){return bR||(bR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xoe();function n(r,a){return t.isMatchWith(r,a,()=>{})}e.isMatch=n})(A1)),A1}var R1={},k1={},D1={},xR;function woe(){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})(D1)),D1}var I1={},wR;function jj(){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})(I1)),I1}var L1={},SR;function c8(){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]",h="[object Function]",p="[object ArrayBuffer]",y="[object Object]",w="[object Error]",x="[object DataView]",S="[object Uint8Array]",E="[object Uint8ClampedArray]",C="[object Uint16Array]",j="[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=h,e.int16ArrayTag=N,e.int32ArrayTag=P,e.int8ArrayTag=T,e.mapTag=u,e.numberTag=r,e.objectTag=y,e.regexpTag=t,e.setTag=f,e.stringTag=n,e.symbolTag=s,e.uint16ArrayTag=C,e.uint32ArrayTag=j,e.uint8ArrayTag=S,e.uint8ClampedArrayTag=E})(L1)),L1}var z1={},ER;function Soe(){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})(z1)),z1}var _R;function u8(){return _R||(_R=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=woe(),n=jj(),r=c8(),a=o8(),i=Soe();function s(m,h){return c(m,void 0,m,new Map,h)}function c(m,h,p,y=new Map,w=void 0){const x=w==null?void 0:w(m,h,p,y);if(x!==void 0)return x;if(a.isPrimitive(m))return m;if(y.has(m))return y.get(m);if(Array.isArray(m)){const S=new Array(m.length);y.set(m,S);for(let E=0;E<m.length;E++)S[E]=c(m[E],E,p,y,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;y.set(m,S);for(const[E,C]of m)S.set(E,c(C,E,p,y,w));return S}if(m instanceof Set){const S=new Set;y.set(m,S);for(const E of m)S.add(c(E,void 0,p,y,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);y.set(m,S);for(let E=0;E<m.length;E++)S[E]=c(m[E],E,p,y,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 y.set(m,S),u(S,m,p,y,w),S}if(typeof File<"u"&&m instanceof File){const S=new File([m],m.name,{type:m.type});return y.set(m,S),u(S,m,p,y,w),S}if(typeof Blob<"u"&&m instanceof Blob){const S=new Blob([m],{type:m.type});return y.set(m,S),u(S,m,p,y,w),S}if(m instanceof Error){const S=structuredClone(m);return y.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,y,w),S}if(m instanceof Boolean){const S=new Boolean(m.valueOf());return y.set(m,S),u(S,m,p,y,w),S}if(m instanceof Number){const S=new Number(m.valueOf());return y.set(m,S),u(S,m,p,y,w),S}if(m instanceof String){const S=new String(m.valueOf());return y.set(m,S),u(S,m,p,y,w),S}if(typeof m=="object"&&f(m)){const S=Object.create(Object.getPrototypeOf(m));return y.set(m,S),u(S,m,p,y,w),S}return m}function u(m,h,p=m,y,w){const x=[...Object.keys(h),...t.getSymbols(h)];for(let S=0;S<x.length;S++){const E=x[S],C=Object.getOwnPropertyDescriptor(m,E);(C==null||C.writable)&&(m[E]=c(h[E],E,p,y,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})(k1)),k1}var OR;function Eoe(){return OR||(OR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u8();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(R1)),R1}var jR;function _oe(){return jR||(jR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=l8(),n=Eoe();function r(a){return a=n.cloneDeep(a),i=>t.isMatch(i,a)}e.matches=r})(C1)),C1}var $1={},B1={},U1={},CR;function Ooe(){return CR||(CR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=u8(),n=jj(),r=c8();function a(i,s){return t.cloneDeepWith(i,(c,u,f,m)=>{const h=s==null?void 0:s(c,u,f,m);if(h!==void 0)return h;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})(U1)),U1}var AR;function joe(){return AR||(AR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ooe();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(B1)),B1}var H1={},F1={},NR;function f8(){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})(F1)),F1}var q1={},TR;function Coe(){return TR||(TR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jj();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(q1)),q1}var PR;function Aoe(){return PR||(PR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QB(),n=f8(),r=Coe(),a=Sj();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 h=u[m];if((f==null||!Object.hasOwn(f,h))&&!((Array.isArray(f)||r.isArguments(f))&&n.isIndex(h)&&h<f.length))return!1;f=f[h]}return!0}e.has=i})(H1)),H1}var MR;function Noe(){return MR||(MR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=l8(),n=wj(),r=joe(),a=Ej(),i=Aoe();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})($1)),$1}var RR;function Toe(){return RR||(RR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=r8(),n=boe(),r=_oe(),a=Noe();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 Poe(){return kR||(kR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=moe(),n=poe(),r=r8(),a=yoe(),i=Toe();function s(c,u=r.identity){return a.isArrayLikeObject(c)?t.uniqBy(Array.from(c),n.ary(i.iteratee(u),1)):[]}e.uniqBy=s})(g1)),g1}var K1,DR;function Moe(){return DR||(DR=1,K1=Poe().uniqBy),K1}var Roe=Moe();const IR=Wa(Roe);function d8(e,t,n){return t===!0?IR(e,n):typeof t=="function"?IR(e,t):e}var V1={exports:{}},Y1={};/**
 * @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 koe(){if(LR)return Y1;LR=1;var e=$f(),t=GG();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 Y1.useSyncExternalStoreWithSelector=function(f,m,h,p,y){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,j=N,N=p(N),y!==void 0&&x.hasValue){var P=x.value;if(y(P,N))return A=P}return A=N}if(P=A,r(j,N))return P;var k=p(N);return y!==void 0&&y(P,k)?(j=N,P):(j=N,A=k)}var C=!1,j,A,T=h===void 0?null:h;return[function(){return E(m())},T===null?void 0:function(){return E(T())}]},[m,h,p,y]);var S=a(f,w[0],w[1]);return s(function(){x.hasValue=!0,x.value=S},[S]),u(S),S},Y1}var zR;function Doe(){return zR||(zR=1,V1.exports=koe()),V1.exports}var h8=Doe();const Ioe=Wa(h8);var Cj=b.createContext(null),Loe=e=>e,wt=()=>{var e=b.useContext(Cj);return e?e.store.dispatch:Loe},fg=()=>{},zoe=()=>fg,$oe=(e,t)=>e===t;function je(e){var t=b.useContext(Cj),n=b.useMemo(()=>t?r=>{if(r!=null)return e(r)}:fg,[t,e]);return h8.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:zoe,t?t.store.getState:fg,t?t.store.getState:fg,n,$oe)}function Boe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Uoe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Hoe(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 Foe(e){const t=Array.isArray(e[0])?e[0]:e;return Hoe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function qoe(e,t){const n=[],{length:r}=e;for(let a=0;a<r;a++)n.push(e[a].apply(null,t));return n}var Koe=class{constructor(e){this.value=e}deref(){return this.value}},Voe=typeof WeakRef<"u"?WeakRef:Koe,Yoe=0,BR=1;function Rv(){return{s:Yoe,v:void 0,o:null,p:null}}function m8(e,t={}){let n=Rv();const{resultEqualityCheck:r}=t;let a,i=0;function s(){var h;let c=n;const{length:u}=arguments;for(let p=0,y=u;p<y;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=Rv(),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=Rv(),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=((h=a==null?void 0:a.deref)==null?void 0:h.call(a))??a;p!=null&&r(p,m)&&(m=p,i!==0&&i--),a=typeof m=="object"&&m!==null||typeof m=="function"?new Voe(m):m}return f.s=BR,f.v=m,m}return s.clearCache=()=>{n=Rv(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function Xoe(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()),Boe(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const m={...n,...u},{memoize:h,memoizeOptions:p=[],argsMemoize:y=m8,argsMemoizeOptions:w=[]}=m,x=$R(p),S=$R(w),E=Foe(a),C=h(function(){return i++,f.apply(null,arguments)},...x),j=y(function(){s++;const T=qoe(E,arguments);return c=C.apply(null,T),c},...S);return Object.assign(j,{resultFunc:f,memoizedResultFunc:C,dependencies:E,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var oe=Xoe(m8),Goe=Object.assign((e,t=oe)=>{Uoe(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:()=>Goe}),X1={},G1={},W1={},UR;function Woe(){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})(W1)),W1}var Q1={},Z1={},HR;function p8(){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})(Z1)),Z1}var FR;function Qoe(){return FR||(FR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=p8(),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})(Q1)),Q1}var qR;function Zoe(){return qR||(qR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Woe(),n=Qoe(),r=Sj();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(y=>String(y));const f=(y,w)=>{let x=y;for(let S=0;S<w.length&&x!=null;++S)x=x[w[S]];return x},m=(y,w)=>w==null||y==null?w:typeof y=="object"&&"key"in y?Object.hasOwn(w,y.key)?w[y.key]:f(w,y.path):typeof y=="function"?y(w):Array.isArray(y)?f(w,y):typeof w=="object"?w[y]:w,h=s.map(y=>(Array.isArray(y)&&y.length===1&&(y=y[0]),y==null||typeof y=="function"||Array.isArray(y)||n.isKey(y)?y:{key:y,path:r.toPath(y)}));return i.map(y=>({original:y,criteria:h.map(w=>m(w,y))})).slice().sort((y,w)=>{for(let x=0;x<h.length;x++){const S=t.compareValues(y.criteria[x],w.criteria[x],c[x]);if(S!==0)return S}return 0}).map(y=>y.original)}e.orderBy=a})(G1)),G1}var J1={},KR;function Joe(){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})(J1)),J1}var eS={},VR;function v8(){return VR||(VR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=f8(),n=a8(),r=i8(),a=s8();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})(eS)),eS}var YR;function ese(){return YR||(YR=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Zoe(),n=Joe(),r=v8();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})(X1)),X1}var tS,XR;function tse(){return XR||(XR=1,tS=ese().sortBy),tS}var nse=tse();const S0=Wa(nse);var g8=e=>e.legend.settings,rse=e=>e.legend.size,ase=e=>e.legend.payload,ise=oe([ase,g8],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?S0(r,n):r});function ose(){return je(ise)}var kv=1;function y8(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,n]=b.useState({height:0,left:0,top:0,width:0}),r=b.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)>kv||Math.abs(s.left-t.left)>kv||Math.abs(s.top-t.top)>kv||Math.abs(s.width-t.width)>kv)&&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 Kn(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 sse=typeof Symbol=="function"&&Symbol.observable||"@@observable",GR=sse,nS=()=>Math.random().toString(36).substring(7).split("").join("."),lse={INIT:`@@redux/INIT${nS()}`,REPLACE:`@@redux/REPLACE${nS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${nS()}`},Vg=lse;function Aj(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 b8(e,t,n){if(typeof e!="function")throw new Error(Kn(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Kn(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Kn(1));return n(b8)(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(Kn(3));return a}function h(S){if(typeof S!="function")throw new Error(Kn(4));if(u)throw new Error(Kn(5));let E=!0;f();const C=c++;return s.set(C,S),function(){if(E){if(u)throw new Error(Kn(6));E=!1,f(),s.delete(C),i=null}}}function p(S){if(!Aj(S))throw new Error(Kn(7));if(typeof S.type>"u")throw new Error(Kn(8));if(typeof S.type!="string")throw new Error(Kn(17));if(u)throw new Error(Kn(9));try{u=!0,a=r(a,S)}finally{u=!1}return(i=s).forEach(C=>{C()}),S}function y(S){if(typeof S!="function")throw new Error(Kn(10));r=S,p({type:Vg.REPLACE})}function w(){const S=h;return{subscribe(E){if(typeof E!="object"||E===null)throw new Error(Kn(11));function C(){const A=E;A.next&&A.next(m())}return C(),{unsubscribe:S(C)}},[GR](){return this}}}return p({type:Vg.INIT}),{dispatch:p,subscribe:h,getState:m,replaceReducer:y,[GR]:w}}function cse(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Vg.INIT})>"u")throw new Error(Kn(12));if(typeof n(void 0,{type:Vg.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Kn(13))})}function x8(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{cse(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 h=r[m],p=n[h],y=s[h],w=p(y,c);if(typeof w>"u")throw c&&c.type,new Error(Kn(14));f[h]=w,u=u||w!==y}return u=u||r.length!==Object.keys(s).length,u?f:s}}function Yg(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function use(...e){return t=>(n,r)=>{const a=t(n,r);let i=()=>{throw new Error(Kn(15))};const s={getState:a.getState,dispatch:(u,...f)=>i(u,...f)},c=e.map(u=>u(s));return i=Yg(...c)(a.dispatch),{...a,dispatch:i}}}function w8(e){return Aj(e)&&"type"in e&&typeof e.type=="string"}var S8=Symbol.for("immer-nothing"),WR=Symbol.for("immer-draftable"),hr=Symbol.for("immer-state");function za(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Xr=Object,Ef=Xr.getPrototypeOf,Xg="constructor",E0="prototype",XE="configurable",Gg="enumerable",dg="writable",$h="value",Co=e=>!!e&&!!e[hr];function Ga(e){var t;return e?E8(e)||O0(e)||!!e[WR]||!!((t=e[Xg])!=null&&t[WR])||j0(e)||C0(e):!1}var fse=Xr[E0][Xg].toString(),QR=new WeakMap;function E8(e){if(!e||!Nj(e))return!1;const t=Ef(e);if(t===null||t===Xr[E0])return!0;const n=Xr.hasOwnProperty.call(t,Xg)&&t[Xg];if(n===Object)return!0;if(!Yu(n))return!1;let r=QR.get(n);return r===void 0&&(r=Function.toString.call(n),QR.set(n,r)),r===fse}function _0(e,t,n=!0){Nm(e)===0?(n?Reflect.ownKeys(e):Xr.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((r,a)=>t(a,r,e))}function Nm(e){const t=e[hr];return t?t.type_:O0(e)?1:j0(e)?2:C0(e)?3:0}var ZR=(e,t,n=Nm(e))=>n===2?e.has(t):Xr[E0].hasOwnProperty.call(e,t),GE=(e,t,n=Nm(e))=>n===2?e.get(t):e[t],Wg=(e,t,n,r=Nm(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function dse(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var O0=Array.isArray,j0=e=>e instanceof Map,C0=e=>e instanceof Set,Nj=e=>typeof e=="object",Yu=e=>typeof e=="function",rS=e=>typeof e=="boolean";function hse(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var co=e=>e.copy_||e.base_,Tj=e=>e.modified_?e.copy_:e.base_;function WE(e,t){if(j0(e))return new Map(e);if(C0(e))return new Set(e);if(O0(e))return Array[E0].slice.call(e);const n=E8(e);if(t===!0||t==="class_only"&&!n){const r=Xr.getOwnPropertyDescriptors(e);delete r[hr];let a=Reflect.ownKeys(r);for(let i=0;i<a.length;i++){const s=a[i],c=r[s];c[dg]===!1&&(c[dg]=!0,c[XE]=!0),(c.get||c.set)&&(r[s]={[XE]:!0,[dg]:!0,[Gg]:c[Gg],[$h]:e[s]})}return Xr.create(Ef(e),r)}else{const r=Ef(e);if(r!==null&&n)return{...e};const a=Xr.create(r);return Xr.assign(a,e)}}function Pj(e,t=!1){return A0(e)||Co(e)||!Ga(e)||(Nm(e)>1&&Xr.defineProperties(e,{set:Dv,add:Dv,clear:Dv,delete:Dv}),Xr.freeze(e),t&&_0(e,(n,r)=>{Pj(r,!0)},!1)),e}function mse(){za(2)}var Dv={[$h]:mse};function A0(e){return e===null||!Nj(e)?!0:Xr.isFrozen(e)}var Qg="MapSet",QE="Patches",JR="ArrayMethods",_8={};function Oc(e){const t=_8[e];return t||za(0,e),t}var ek=e=>!!_8[e],Bh,O8=()=>Bh,pse=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ek(Qg)?Oc(Qg):void 0,arrayMethodsPlugin_:ek(JR)?Oc(JR):void 0});function tk(e,t){t&&(e.patchPlugin_=Oc(QE),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ZE(e){JE(e),e.drafts_.forEach(vse),e.drafts_=null}function JE(e){e===Bh&&(Bh=e.parent_)}var nk=e=>Bh=pse(Bh,e);function vse(e){const t=e[hr];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[hr].modified_&&(ZE(t),za(4)),Ga(e)&&(e=ak(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[hr].base_,e,t)}else e=ak(t,n);return gse(t,e,!0),ZE(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==S8?e:void 0}function ak(e,t){if(A0(t))return t;const n=t[hr];if(!n)return Zg(t,e.handledSet_,e);if(!N0(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);A8(n,e)}return n.copy_}function gse(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Pj(t,n)}function j8(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var N0=(e,t)=>e.scope_===t,yse=[];function C8(e,t,n,r){const a=co(e),i=e.type_;if(r!==void 0&&GE(a,r,i)===t){Wg(a,r,n,i);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;_0(a,(u,f)=>{if(Co(f)){const m=c.get(f)||[];m.push(u),c.set(f,m)}})}const s=e.draftLocations_.get(t)??yse;for(const c of s)Wg(a,c,n,i)}function bse(e,t,n){e.callbacks_.push(function(a){var c;const i=t;if(!i||!N0(i,a))return;(c=a.mapSetPlugin_)==null||c.fixSetContents(i);const s=Tj(i);C8(e,i.draft_??i,s,n),A8(i,a)})}function A8(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)}j8(e)}}function xse(e,t,n){const{scope_:r}=e;if(Co(n)){const a=n[hr];N0(a,r)&&a.callbacks_.push(function(){hg(e);const s=Tj(a);C8(e,n,s,t)})}else Ga(n)&&e.callbacks_.push(function(){const i=co(e);e.type_===3?i.has(n)&&Zg(n,r.handledSet_,r):GE(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Zg(GE(e.copy_,t,e.type_),r.handledSet_,r)})}function Zg(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||Co(e)||t.has(e)||!Ga(e)||A0(e)||(t.add(e),_0(e,(r,a)=>{if(Co(a)){const i=a[hr];if(N0(i,n)){const s=Tj(i);Wg(e,r,s,e.type_),j8(i)}}else Ga(a)&&Zg(a,t,n)})),e}function wse(e,t){const n=O0(e),r={type_:n?1:0,scope_:t?t.scope_:O8(),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=Jg;n&&(a=[r],i=Uh);const{revoke:s,proxy:c}=Proxy.revocable(a,i);return r.draft_=c,r.revoke_=s,[c,r]}var Jg={get(e,t){if(t===hr)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=co(e);if(!ZR(a,t,e.type_))return Sse(e,a,t);const i=a[t];if(e.finalized_||!Ga(i)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&hse(t))return i;if(i===aS(e.base_,t)){hg(e);const s=e.type_===1?+t:t,c=t_(e.scope_,i,e,s);return e.copy_[s]=c}return i},has(e,t){return t in co(e)},ownKeys(e){return Reflect.ownKeys(co(e))},set(e,t,n){const r=N8(co(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=aS(co(e),t),i=a==null?void 0:a[hr];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(dse(n,a)&&(n!==void 0||ZR(e.base_,t,e.type_)))return!0;hg(e),e_(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),xse(e,t,n)),!0},deleteProperty(e,t){return hg(e),aS(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),e_(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=co(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[dg]:!0,[XE]:e.type_!==1||t!=="length",[Gg]:r[Gg],[$h]:n[t]}},defineProperty(){za(11)},getPrototypeOf(e){return Ef(e.base_)},setPrototypeOf(){za(12)}},Uh={};for(let e in Jg){let t=Jg[e];Uh[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}Uh.deleteProperty=function(e,t){return Uh.set.call(this,e,t,void 0)};Uh.set=function(e,t,n){return Jg.set.call(this,e[0],t,n,e[0])};function aS(e,t){const n=e[hr];return(n?co(n):e)[t]}function Sse(e,t,n){var a;const r=N8(t,n);return r?$h in r?r[$h]:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function N8(e,t){if(!(t in e))return;let n=Ef(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Ef(n)}}function e_(e){e.modified_||(e.modified_=!0,e.parent_&&e_(e.parent_))}function hg(e){e.copy_||(e.assigned_=new Map,e.copy_=WE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ese=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,a)=>{if(Yu(n)&&!Yu(r)){const s=r;r=n;const c=this;return function(f=s,...m){return c.produce(f,h=>r.call(this,h,...m))}}Yu(r)||za(6),a!==void 0&&!Yu(a)&&za(7);let i;if(Ga(n)){const s=nk(this),c=t_(s,n,void 0);let u=!0;try{i=r(c),u=!1}finally{u?ZE(s):JE(s)}return tk(s,a),rk(i,s)}else if(!n||!Nj(n)){if(i=r(n),i===void 0&&(i=n),i===S8&&(i=void 0),this.autoFreeze_&&Pj(i,!0),a){const s=[],c=[];Oc(QE).generateReplacementPatches_(n,i,{patches_:s,inversePatches_:c}),a(s,c)}return i}else za(1,n)},this.produceWithPatches=(n,r)=>{if(Yu(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]},rS(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),rS(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),rS(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Ga(t)||za(8),Co(t)&&(t=xa(t));const n=nk(this),r=t_(n,t,void 0);return r[hr].isManual_=!0,JE(n),r}finishDraft(t,n){const r=t&&t[hr];(!r||!r.isManual_)&&za(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(QE).applyPatches_;return Co(t)?a(t,n):this.produce(t,i=>a(i,n))}};function t_(e,t,n,r){const[a,i]=j0(t)?Oc(Qg).proxyMap_(t,n):C0(t)?Oc(Qg).proxySet_(t,n):wse(t,n);return((n==null?void 0:n.scope_)??O8()).drafts_.push(a),i.callbacks_=(n==null?void 0:n.callbacks_)??[],i.key_=r,n&&r!==void 0?bse(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 xa(e){return Co(e)||za(10,e),T8(e)}function T8(e){if(!Ga(e)||A0(e))return e;const t=e[hr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=WE(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=WE(e,!0);return _0(n,(a,i)=>{Wg(n,a,T8(i))},r),t&&(t.finalized_=!1),n}var _se=new Ese,P8=_se.produce;function M8(e){return({dispatch:n,getState:r})=>a=>i=>typeof i=="function"?i(n,r,e):a(i)}var Ose=M8(),jse=M8,Cse=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Yg:Yg.apply(null,arguments)};function Zr(e,t){function n(...r){if(t){let a=t(...r);if(!a)throw new Error(Wr(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=>w8(r)&&r.type===e,n}var R8=class Sh extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Sh.prototype)}static get[Symbol.species](){return Sh}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Sh(...t[0].concat(this)):new Sh(...t.concat(this))}};function ik(e){return Ga(e)?P8(e,()=>{}):e}function Iv(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Ase(e){return typeof e=="boolean"}var Nse=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=t??{};let s=new R8;return n&&(Ase(n)?s.push(Ose):s.push(jse(n.extraArgument))),s},k8="RTK_autoBatch",Pt=()=>e=>({payload:e,meta:{[k8]:!0}}),ok=e=>t=>{setTimeout(t,e)},D8=(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 h=()=>a&&m(),p=r.subscribe(h);return c.add(m),()=>{p(),c.delete(m)}},dispatch(m){var h;try{return a=!((h=m==null?void 0:m.meta)!=null&&h[k8]),i=!a,i&&(s||(s=!0,u(f))),r.dispatch(m)}finally{a=!0}}})},Tse=e=>function(n){const{autoBatch:r=!0}=n??{};let a=new R8(e);return r&&a.push(D8(typeof r=="object"?r:void 0)),a};function Pse(e){const t=Nse(),{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(Aj(n))c=x8(n);else throw new Error(Wr(1));let u;typeof r=="function"?u=r(t):u=t();let f=Yg;a&&(f=Cse({trace:!1,...typeof a=="object"&&a}));const m=use(...u),h=Tse(m);let p=typeof s=="function"?s(h):h();const y=f(...p);return b8(c,i,y)}function I8(e){const t={},n=[];let r;const a={addCase(i,s){const c=typeof i=="string"?i:i.type;if(!c)throw new Error(Wr(28));if(c in t)throw new Error(Wr(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 Mse(e){return typeof e=="function"}function Rse(e,t){let[n,r,a]=I8(t),i;if(Mse(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,h)=>{if(h)if(Co(m)){const y=h(m,u);return y===void 0?m:y}else{if(Ga(m))return P8(m,p=>h(p,u));{const p=h(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 kse="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Dse=(e=21)=>{let t="",n=e;for(;n--;)t+=kse[Math.random()*64|0];return t},Ise=Symbol.for("rtk-slice-createasyncthunk");function Lse(e,t){return`${e}/${t}`}function zse({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Ise];return function(a){const{name:i,reducerPath:s=i}=a;if(!i)throw new Error(Wr(11));const c=(typeof a.reducers=="function"?a.reducers(Bse()):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(Wr(12));if(N in f.sliceCaseReducersByType)throw new Error(Wr(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:Lse(i,A),createNotation:typeof a.reducers=="function"};Hse(T)?qse(N,T,m,t):Use(N,T,m)});function h(){const[A={},T=[],N=void 0]=typeof a.extraReducers=="function"?I8(a.extraReducers):[a.extraReducers],P={...A,...f.sliceCaseReducersByType};return Rse(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,y=new Map,w=new WeakMap;let x;function S(A,T){return x||(x=h()),x(A,T)}function E(){return x||(x=h()),x.getInitialState()}function C(A,T=!1){function N(k){let D=k[A];return typeof D>"u"&&T&&(D=Iv(w,N,E)),D}function P(k=p){const D=Iv(y,T,()=>new WeakMap);return Iv(D,k,()=>{const K={};for(const[B,L]of Object.entries(a.selectors??{}))K[B]=$se(L,k,()=>Iv(w,k,E),T);return K})}return{reducerPath:A,getSelectors:P,get selectors(){return P(N)},selectSlice:N}}const j={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),{...j,...C(P,!0)}}};return j}}function $se(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 or=zse();function Bse(){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 Use({type:e,reducerName:t,createNotation:n},r,a){let i,s;if("reducer"in r){if(n&&!Fse(r))throw new Error(Wr(17));i=r.reducer,s=r.prepare}else i=r;a.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?Zr(e,s):Zr(e))}function Hse(e){return e._reducerDefinitionType==="asyncThunk"}function Fse(e){return e._reducerDefinitionType==="reducerWithPrepare"}function qse({type:e,reducerName:t},n,r,a){if(!a)throw new Error(Wr(18));const{payloadCreator:i,fulfilled:s,pending:c,rejected:u,settled:f,options:m}=n,h=a(e,i,m);r.exposeAction(t,h),s&&r.addCase(h.fulfilled,s),c&&r.addCase(h.pending,c),u&&r.addCase(h.rejected,u),f&&r.addMatcher(h.settled,f),r.exposeCaseReducer(t,{fulfilled:s||Lv,pending:c||Lv,rejected:u||Lv,settled:f||Lv})}function Lv(){}var Kse="task",L8="listener",z8="completed",Mj="cancelled",Vse=`task-${Mj}`,Yse=`task-${z8}`,n_=`${L8}-${Mj}`,Xse=`${L8}-${z8}`,T0=class{constructor(e){Pw(this,"name","TaskAbortError");Pw(this,"message");this.code=e,this.message=`${Kse} ${Mj} (reason: ${e})`}},Rj=(e,t)=>{if(typeof e!="function")throw new TypeError(Wr(32))},ey=()=>{},$8=(e,t=ey)=>(e.catch(t),e),B8=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),cc=e=>{if(e.aborted)throw new T0(e.reason)};function U8(e,t){let n=ey;return new Promise((r,a)=>{const i=()=>a(new T0(e.reason));if(e.aborted){i();return}n=B8(e,i),t.finally(()=>n()).then(r,a)}).finally(()=>{n=ey})}var Gse=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof T0?"cancelled":"rejected",error:n}}finally{t==null||t()}},ty=e=>t=>$8(U8(e,t).then(n=>(cc(e),n))),H8=e=>{const t=ty(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:ef}=Object,sk={},P0="listenerMiddleware",Wse=(e,t)=>{const n=r=>B8(e,()=>r.abort(e.reason));return(r,a)=>{Rj(r);const i=new AbortController;n(i);const s=Gse(async()=>{cc(e),cc(i.signal);const c=await r({pause:ty(i.signal),delay:H8(i.signal),signal:i.signal});return cc(i.signal),c},()=>i.abort(Yse));return a!=null&&a.autoJoin&&t.push(s.catch(ey)),{result:ty(e)(s),cancel(){i.abort(Vse)}}}},Qse=(e,t)=>{const n=async(r,a)=>{cc(t);let i=()=>{};const c=[new Promise((u,f)=>{let m=e({predicate:r,effect:(h,p)=>{p.unsubscribe(),u([h,p.getState(),p.getOriginalState()])}});i=()=>{m(),f()}})];a!=null&&c.push(new Promise(u=>setTimeout(u,a,null)));try{const u=await U8(t,Promise.race(c));return cc(t),u}finally{i()}};return(r,a)=>$8(n(r,a))},F8=e=>{let{type:t,actionCreator:n,matcher:r,predicate:a,effect:i}=e;if(t)a=Zr(t).match;else if(n)t=n.type,a=n.match;else if(r)a=r;else if(!a)throw new Error(Wr(21));return Rj(i),{predicate:a,type:t,effect:i}},q8=ef(e=>{const{type:t,predicate:n,effect:r}=F8(e);return{id:Dse(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Wr(22))}}},{withTypes:()=>q8}),lk=(e,t)=>{const{type:n,effect:r,predicate:a}=F8(t);return Array.from(e.values()).find(i=>(typeof n=="string"?i.type===n:i.predicate===a)&&i.effect===r)},r_=e=>{e.pending.forEach(t=>{t.abort(n_)})},Zse=(e,t)=>()=>{for(const n of t.keys())r_(n);e.clear()},ck=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},K8=ef(Zr(`${P0}/add`),{withTypes:()=>K8}),Jse=Zr(`${P0}/removeAll`),V8=ef(Zr(`${P0}/remove`),{withTypes:()=>V8}),ele=(...e)=>{console.error(`${P0}/error`,...e)},Tm=(e={})=>{const t=new Map,n=new Map,r=y=>{const w=n.get(y)??0;n.set(y,w+1)},a=y=>{const w=n.get(y)??1;w===1?n.delete(y):n.set(y,w-1)},{extra:i,onError:s=ele}=e;Rj(s);const c=y=>(y.unsubscribe=()=>t.delete(y.id),t.set(y.id,y),w=>{y.unsubscribe(),w!=null&&w.cancelActive&&r_(y)}),u=y=>{const w=lk(t,y)??q8(y);return c(w)};ef(u,{withTypes:()=>u});const f=y=>{const w=lk(t,y);return w&&(w.unsubscribe(),y.cancelActive&&r_(w)),!!w};ef(f,{withTypes:()=>f});const m=async(y,w,x,S)=>{const E=new AbortController,C=Qse(u,E.signal),j=[];try{y.pending.add(E),r(y),await Promise.resolve(y.effect(w,ef({},x,{getOriginalState:S,condition:(A,T)=>C(A,T).then(Boolean),take:C,delay:H8(E.signal),pause:ty(E.signal),extra:i,signal:E.signal,fork:Wse(E.signal,j),unsubscribe:y.unsubscribe,subscribe:()=>{t.set(y.id,y)},cancelActiveListeners:()=>{y.pending.forEach((A,T,N)=>{A!==E&&(A.abort(n_),N.delete(A))})},cancel:()=>{E.abort(n_),y.pending.delete(E)},throwIfCancelled:()=>{cc(E.signal)}})))}catch(A){A instanceof T0||ck(s,A,{raisedBy:"effect"})}finally{await Promise.all(j),E.abort(Xse),a(y),y.pending.delete(E)}},h=Zse(t,n);return{middleware:y=>w=>x=>{if(!w8(x))return w(x);if(K8.match(x))return u(x.payload);if(Jse.match(x)){h();return}if(V8.match(x))return f(x.payload);let S=y.getState();const E=()=>{if(S===sk)throw new Error(Wr(23));return S};let C;try{if(C=w(x),t.size>0){const j=y.getState(),A=Array.from(t.values());for(const T of A){let N=!1;try{N=T.predicate(x,j,S)}catch(P){N=!1,ck(s,P,{raisedBy:"predicate"})}N&&m(T,x,y,E)}}}finally{S=sk}return C},startListening:u,stopListening:f,clearListeners:h}};function Wr(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 tle={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},Y8=or({name:"chartLayout",initialState:tle,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:nle,setLayout:rle,setChartSize:ale,setScale:ile}=Y8.actions,ole=Y8.reducer;function X8(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function at(e){return Number.isFinite(e)}function Ti(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 Xu(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){sle(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 sle(e,t,n){return(t=lle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lle(e){var t=cle(e,"string");return typeof t=="symbol"?t:t+""}function cle(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 xt(e,t,n){return Lt(e)||Lt(t)?n:Ni(t)?Ec(e,t,n):typeof t=="function"?t(e):n}var ule=(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"&&Ee(e[i]))return Xu(Xu({},e),{},{[i]:e[i]+(r||0)});if((c==="horizontal"||c==="vertical"&&i==="center")&&s!=="middle"&&Ee(e[s]))return Xu(Xu({},e),{},{[s]:e[s]+(a||0)})}return e},ko=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",G8=(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},W8=(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:h,niceTicks:p,axisType:y}=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=y==="angleAxis"&&i&&i.length>=2?kn(i[0]-i[1])*2*x:x,h||p){var S=(h||p||[]).map((E,C)=>{var j=r?r.indexOf(E):E,A=s.map(j);return at(A)?{coordinate:A+x,value:E,offset:x,index:C}:null}).filter(Ar);return S}return u&&f?f.map((E,C)=>{var j=s.map(E);return at(j)?{coordinate:j+x,value:E,index:C,offset:x}:null}).filter(Ar):s.ticks&&m!=null?s.ticks(m).map((E,C)=>{var j=s.map(E);return at(j)?{coordinate:j+x,value:E,index:C,offset:x}:null}).filter(Ar):s.domain().map((E,C)=>{var j=s.map(E);return at(j)?{coordinate:j+x,value:r?r[E]:E,index:C,offset:x}:null}).filter(Ar)},fle=(e,t)=>{if(!t||t.length!==2||!Ee(t[0])||!Ee(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(!Ee(e[0])||e[0]<n)&&(a[0]=n),(!Ee(e[1])||e[1]>r)&&(a[1]=r),a[0]>r&&(a[0]=r),a[1]<n&&(a[1]=n),a},dle=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],h=f[0],p=Ai(m)?h:m;p>=0?(f[0]=i,i+=p,f[1]=i):(f[0]=s,s+=p,f[1]=s)}}}},hle=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=Ai(u[1])?u[0]:u[1];f>=0?(u[0]=i,i+=f,u[1]=i):(u[0]=0,u[1]=0)}}}},mle={sign:dle,expand:Iie,none:Sc,silhouette:Lie,wiggle:zie,positive:hle},ple=(e,t,n)=>{var r,a=(r=mle[n])!==null&&r!==void 0?r:Sc,i=Die().keys(t).value((c,u)=>Number(xt(c,u,0))).order(VE).offset(a),s=i(e);return s.forEach((c,u)=>{c.forEach((f,m)=>{var h=xt(e[m],t[u],0);Array.isArray(h)&&h.length===2&&Ee(h[0])&&Ee(h[1])&&(f[0]=h[0],f[1]=h[1])})}),s};function vle(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&&!Lt(a[t.dataKey])){var c=JB(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=xt(a,Lt(s)?t.dataKey:s),f=t.scale.map(u);return Ee(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=xt(i,t.dataKey,t.scale.domain()[s]);if(Lt(c))return null;var u=t.scale.map(c);return Ee(u)?u-a/2+r:null},gle=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]},yle=e=>{var t=e.flat(2).filter(Ee);return[Math.min(...t),Math.max(...t)]},ble=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],xle=(e,t,n)=>{if(e!=null)return ble(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=X8(f,t,n),h=yle(m);return!at(h[0])||!at(h[1])?u:[Math.min(u[0],h[0]),Math.max(u[1],h[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})$/,_f=(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=S0(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 Xu(Xu({},t),{},{dataKey:n,payload:r,value:a,name:i})}function Gf(e,t){if(e)return String(e);if(typeof t=="string")return t}var wle=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Sle=(e,t)=>t==="centric"?e.angle:e.radius,Do=e=>e.layout.width,Io=e=>e.layout.height,Ele=e=>e.layout.scale,Q8=e=>e.layout.margin,M0=oe(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),R0=oe(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Z8="data-recharts-item-index",J8="data-recharts-item-id",Pm=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 zv(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){_le(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 _le(e,t,n){return(t=Ole(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ole(e){var t=jle(e,"string");return typeof t=="symbol"?t:t+""}function jle(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 Cle=e=>e.brush.height;function Ale(e){var t=R0(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Pm;return n+a}return n},0)}function Nle(e){var t=R0(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var a=typeof r.width=="number"?r.width:Pm;return n+a}return n},0)}function Tle(e){var t=M0(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function Ple(e){var t=M0(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var jn=oe([Do,Io,Q8,Cle,Ale,Nle,Tle,Ple,g8,rse],(e,t,n,r,a,i,s,c,u,f)=>{var m={left:(n.left||0)+a,right:(n.right||0)+i},h={top:(n.top||0)+s,bottom:(n.bottom||0)+c},p=zv(zv({},h),m),y=p.bottom;p.bottom+=r,p=ule(p,u,f);var w=e-p.left-p.right,x=t-p.top-p.bottom;return zv(zv({brushBottom:y},p),{},{width:Math.max(w,0),height:Math.max(x,0)})}),Mle=oe(jn,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),kj=oe(Do,Io,(e,t)=>({x:0,y:0,width:e,height:t})),Rle=b.createContext(null),sr=()=>b.useContext(Rle)!=null,k0=e=>e.brush,D0=oe([k0,jn,Q8],(e,t,n)=>({height:e.height,x:Ee(e.x)?e.x:t.left,y:Ee(e.y)?e.y:t.top+t.height+t.brushBottom-((n==null?void 0:n.bottom)||0),width:Ee(e.width)?e.width:t.width})),iS={},oS={},sS={},gk;function kle(){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)},h=()=>{f&&m(),x()};let p=null;const y=()=>{p!=null&&clearTimeout(p),p=setTimeout(()=>{p=null,h()},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 j=p==null;y(),u&&j&&m()};return E.schedule=y,E.cancel=x,E.flush=S,a==null||a.addEventListener("abort",x,{once:!0}),E}e.debounce=t})(sS)),sS}var yk;function Dle(){return yk||(yk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kle();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,h=null;const p=t.debounce(function(...x){m=r.apply(this,x),h=null},a,{edges:f}),y=function(...x){return u!=null&&(h===null&&(h=Date.now()),Date.now()-h>=u)?(m=r.apply(this,x),h=Date.now(),p.cancel(),p.schedule(),m):(p.apply(this,x),m)},w=()=>(p.flush(),m);return y.cancel=p.cancel,y.flush=w,y}e.debounce=n})(oS)),oS}var bk;function Ile(){return bk||(bk=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dle();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})(iS)),iS}var lS,xk;function Lle(){return xk||(xk=1,lS=Ile().throttle),lS}var zle=Lle();const $le=Wa(zle);var ny=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++]))}},Si={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},e6=(e,t,n)=>{var{width:r=Si.width,height:a=Si.height,aspect:i,maxHeight:s}=n,c=_c(r)?e:Number(r),u=_c(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}},Ble={width:0,height:0,overflow:"visible"},Ule={width:0,overflowX:"visible"},Hle={height:0,overflowY:"visible"},Fle={},qle=e=>{var{width:t,height:n}=e,r=_c(t),a=_c(n);return r&&a?Ble:r?Ule:a?Hle:Fle};function Kle(e){var{width:t,height:n,aspect:r}=e,a=t,i=n;return a===void 0&&i===void 0?(a=Si.width,i=Si.height):a===void 0?a=r&&r>0?void 0:Si.width:i===void 0&&(i=r&&r>0?void 0:Si.height),{width:a,height:i}}function a_(){return a_=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},a_.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){Vle(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 Vle(e,t,n){return(t=Yle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yle(e){var t=Xle(e,"string");return typeof t=="symbol"?t:t+""}function Xle(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 t6=b.createContext(Si.initialDimension);function Gle(e){return Ti(e.width)&&Ti(e.height)}function n6(e){var{children:t,width:n,height:r}=e,a=b.useMemo(()=>({width:n,height:r}),[n,r]);return Gle(a)?b.createElement(t6.Provider,{value:a},t):null}var Dj=()=>b.useContext(t6),Wle=b.forwardRef((e,t)=>{var{aspect:n,initialDimension:r=Si.initialDimension,width:a,height:i,minWidth:s=Si.minWidth,minHeight:c,maxHeight:u,children:f,debounce:m=Si.debounce,id:h,className:p,onResize:y,style:w={}}=e,x=b.useRef(null),S=b.useRef();S.current=y,b.useImperativeHandle(t,()=>x.current);var[E,C]=b.useState({containerWidth:r.width,containerHeight:r.height}),j=b.useCallback((k,D)=>{C(K=>{var B=Math.round(k),L=Math.round(D);return K.containerWidth===B&&K.containerHeight===L?K:{containerWidth:B,containerHeight:L}})},[]);b.useEffect(()=>{if(x.current==null||typeof ResizeObserver>"u")return hl;var k=L=>{var W,$=L[0];if($!=null){var{width:Y,height:R}=$.contentRect;j(Y,R),(W=S.current)===null||W===void 0||W.call(S,Y,R)}};m>0&&(k=$le(k,m,{trailing:!0,leading:!1}));var D=new ResizeObserver(k),{width:K,height:B}=x.current.getBoundingClientRect();return j(K,B),D.observe(x.current),()=>{D.disconnect()}},[j,m]);var{containerWidth:A,containerHeight:T}=E;ny(!n||n>0,"The aspect(%s) must be greater than zero.",n);var{calculatedWidth:N,calculatedHeight:P}=e6(A,T,{width:a,height:i,aspect:n,maxHeight:u});return ny(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),b.createElement("div",{id:h?"".concat(h):void 0,className:ot("recharts-responsive-container",p),style:Sk(Sk({},w),{},{width:a,height:i,minWidth:s,minHeight:c,maxHeight:u}),ref:x},b.createElement("div",{style:qle({width:a,height:i})},b.createElement(n6,{width:N,height:P},f)))}),Ij=b.forwardRef((e,t)=>{var n=Dj();if(Ti(n.width)&&Ti(n.height))return e.children;var{width:r,height:a}=Kle({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:i,calculatedHeight:s}=e6(void 0,void 0,{width:r,height:a,aspect:e.aspect,maxHeight:e.maxHeight});return Ee(i)&&Ee(s)?b.createElement(n6,{width:i,height:s},e.children):b.createElement(Wle,a_({},e,{width:r,height:a,ref:t}))});function Lj(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 I0=()=>{var e,t=sr(),n=je(Mle),r=je(D0),a=(e=je(k0))===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}},Qle={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},r6=()=>{var e;return(e=je(jn))!==null&&e!==void 0?e:Qle},zj=()=>je(Do),$j=()=>je(Io),Zle=()=>je(e=>e.layout.margin),ut=e=>e.layout.layoutType,Kc=()=>je(ut),a6=()=>{var e=Kc();if(e==="horizontal"||e==="vertical")return e},i6=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Jle=()=>{var e=Kc();return e!==void 0},Mm=e=>{var t=wt(),n=sr(),{width:r,height:a}=e,i=Dj(),s=r,c=a;return i&&(s=i.width>0?i.width:r,c=i.height>0?i.height:a),b.useEffect(()=>{!n&&Ti(s)&&Ti(c)&&t(ale({width:s,height:c}))},[t,n,s,c]),null},o6=Symbol.for("immer-nothing"),Ek=Symbol.for("immer-draftable"),Jr=Symbol.for("immer-state");function $a(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hh=Object.getPrototypeOf;function Of(e){return!!e&&!!e[Jr]}function jc(e){var t;return e?s6(e)||Array.isArray(e)||!!e[Ek]||!!((t=e.constructor)!=null&&t[Ek])||Rm(e)||z0(e):!1}var ece=Object.prototype.constructor.toString(),_k=new WeakMap;function s6(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===ece}function ry(e,t,n=!0){L0(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 L0(e){const t=e[Jr];return t?t.type_:Array.isArray(e)?1:Rm(e)?2:z0(e)?3:0}function i_(e,t){return L0(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function l6(e,t,n){const r=L0(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function tce(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Rm(e){return e instanceof Map}function z0(e){return e instanceof Set}function Vl(e){return e.copy_||e.base_}function o_(e,t){if(Rm(e))return new Map(e);if(z0(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=s6(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Jr];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(Hh(e),r)}else{const r=Hh(e);if(r!==null&&n)return{...e};const a=Object.create(r);return Object.assign(a,e)}}function Bj(e,t=!1){return $0(e)||Of(e)||!jc(e)||(L0(e)>1&&Object.defineProperties(e,{set:$v,add:$v,clear:$v,delete:$v}),Object.freeze(e),t&&Object.values(e).forEach(n=>Bj(n,!0))),e}function nce(){$a(2)}var $v={value:nce};function $0(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var rce={};function Cc(e){const t=rce[e];return t||$a(0,e),t}var Fh;function c6(){return Fh}function ace(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Ok(e,t){t&&(Cc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function s_(e){l_(e),e.drafts_.forEach(ice),e.drafts_=null}function l_(e){e===Fh&&(Fh=e.parent_)}function jk(e){return Fh=ace(Fh,e)}function ice(e){const t=e[Jr];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[Jr].modified_&&(s_(t),$a(4)),jc(e)&&(e=ay(t,e),t.parent_||iy(t,e)),t.patches_&&Cc("Patches").generateReplacementPatches_(n[Jr].base_,e,t.patches_,t.inversePatches_)):e=ay(t,n,[]),s_(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==o6?e:void 0}function ay(e,t,n){if($0(t))return t;const r=e.immer_.shouldUseStrictIteration(),a=t[Jr];if(!a)return ry(t,(i,s)=>Ak(e,a,t,i,s,n),r),t;if(a.scope_!==e)return t;if(!a.modified_)return iy(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),ry(s,(u,f)=>Ak(e,a,i,u,f,n,c),r),iy(e,i,!1),n&&e.patches_&&Cc("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=$0(a);if(!(c&&!s)){if(Of(a)){const u=i&&t&&t.type_!==3&&!i_(t.assigned_,r)?i.concat(r):void 0,f=ay(e,a,u);if(l6(n,r,f),Of(f))e.canAutoFreeze_=!1;else return}else s&&n.add(a);if(jc(a)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===a&&c)return;ay(e,a),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Rm(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&iy(e,a)}}}function iy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bj(t,n)}function oce(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:c6(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,i=Uj;n&&(a=[r],i=qh);const{revoke:s,proxy:c}=Proxy.revocable(a,i);return r.draft_=c,r.revoke_=s,c}var Uj={get(e,t){if(t===Jr)return e;const n=Vl(e);if(!i_(n,t))return sce(e,n,t);const r=n[t];return e.finalized_||!jc(r)?r:r===cS(e.base_,t)?(uS(e),e.copy_[t]=u_(r,e)):r},has(e,t){return t in Vl(e)},ownKeys(e){return Reflect.ownKeys(Vl(e))},set(e,t,n){const r=u6(Vl(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const a=cS(Vl(e),t),i=a==null?void 0:a[Jr];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(tce(n,a)&&(n!==void 0||i_(e.base_,t)))return!0;uS(e),c_(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 cS(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,uS(e),c_(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(){$a(11)},getPrototypeOf(e){return Hh(e.base_)},setPrototypeOf(){$a(12)}},qh={};ry(Uj,(e,t)=>{qh[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qh.deleteProperty=function(e,t){return qh.set.call(this,e,t,void 0)};qh.set=function(e,t,n){return Uj.set.call(this,e[0],t,n,e[0])};function cS(e,t){const n=e[Jr];return(n?Vl(n):e)[t]}function sce(e,t,n){var a;const r=u6(t,n);return r?"value"in r?r.value:(a=r.get)==null?void 0:a.call(e.draft_):void 0}function u6(e,t){if(!(t in e))return;let n=Hh(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Hh(n)}}function c_(e){e.modified_||(e.modified_=!0,e.parent_&&c_(e.parent_))}function uS(e){e.copy_||(e.copy_=o_(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var lce=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"&&$a(6),r!==void 0&&typeof r!="function"&&$a(7);let a;if(jc(t)){const i=jk(this),s=u_(t,void 0);let c=!0;try{a=n(s),c=!1}finally{c?s_(i):l_(i)}return Ok(i,r),Ck(a,i)}else if(!t||typeof t!="object"){if(a=n(t),a===void 0&&(a=t),a===o6&&(a=void 0),this.autoFreeze_&&Bj(a,!0),r){const i=[],s=[];Cc("Patches").generateReplacementPatches_(t,a,i,s),r(i,s)}return a}else $a(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){jc(e)||$a(8),Of(e)&&(e=cce(e));const t=jk(this),n=u_(e,void 0);return n[Jr].isManual_=!0,l_(t),n}finishDraft(e,t){const n=e&&e[Jr];(!n||!n.isManual_)&&$a(9);const{scope_:r}=n;return Ok(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=Cc("Patches").applyPatches_;return Of(e)?r(e,t):this.produce(e,a=>r(a,t))}};function u_(e,t){const n=Rm(e)?Cc("MapSet").proxyMap_(e,t):z0(e)?Cc("MapSet").proxySet_(e,t):oce(e,t);return(t?t.scope_:c6()).drafts_.push(n),n}function cce(e){return Of(e)||$a(10,e),f6(e)}function f6(e){if(!jc(e)||$0(e))return e;const t=e[Jr];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=o_(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=o_(e,!0);return ry(n,(a,i)=>{l6(n,a,f6(i))},r),t&&(t.finalized_=!1),n}var uce=new lce;uce.produce;var fce={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},d6=or({name:"legend",initialState:fce,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:Pt()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,a=xa(e).payload.indexOf(n);a>-1&&(e.payload[a]=r)},prepare:Pt()},removeLegendPayload:{reducer(e,t){var n=xa(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:Pt()}}}),{setLegendSize:Nk,setLegendSettings:dce,addLegendPayload:h6,replaceLegendPayload:m6,removeLegendPayload:p6}=d6.actions,hce=d6.reducer,fS={exports:{}},dS={};/**
 * @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 mce(){if(Tk)return dS;Tk=1;var e=$f();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 dS.useSyncExternalStoreWithSelector=function(u,f,m,h,p){var y=a(null);if(y.current===null){var w={hasValue:!1,value:null};y.current=w}else w=y.current;y=s(function(){function S(T){if(!E){if(E=!0,C=T,T=h(T),p!==void 0&&w.hasValue){var N=w.value;if(p(N,T))return j=N}return j=T}if(N=j,n(C,T))return N;var P=h(T);return p!==void 0&&p(N,P)?(C=T,N):(C=T,j=P)}var E=!1,C,j,A=m===void 0?null:m;return[function(){return S(f())},A===null?void 0:function(){return S(A())}]},[f,m,h,p]);var x=r(u,y[0],y[1]);return i(function(){w.hasValue=!0,w.value=x},[x]),c(x),x},dS}var Pk;function pce(){return Pk||(Pk=1,fS.exports=mce()),fS.exports}pce();function vce(e){e()}function gce(){let e=null,t=null;return{clear(){e=null,t=null},notify(){vce(()=>{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 yce(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(),h())}}function c(){r.notify()}function u(){w.onStateChange&&w.onStateChange()}function f(){return i}function m(){a++,n||(n=e.subscribe(u),r=gce())}function h(){a--,n&&a===0&&(n(),n=void 0,r.clear(),r=Mk)}function p(){i||(i=!0,m())}function y(){i&&(i=!1,h())}const w={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:u,isSubscribed:f,trySubscribe:p,tryUnsubscribe:y,getListeners:()=>r};return w}var bce=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xce=bce(),wce=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Sce=wce(),Ece=()=>xce||Sce?b.useLayoutEffect:b.useEffect,_ce=Ece();function Rk(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Oce(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 hS=Symbol.for("react-redux-context"),mS=typeof globalThis<"u"?globalThis:{};function jce(){if(!b.createContext)return{};const e=mS[hS]??(mS[hS]=new Map);let t=e.get(b.createContext);return t||(t=b.createContext(null),e.set(b.createContext,t)),t}var Cce=jce();function Ace(e){const{children:t,context:n,serverState:r,store:a}=e,i=b.useMemo(()=>{const u=yce(a);return{store:a,subscription:u,getServerState:r?()=>r:void 0}},[a,r]),s=b.useMemo(()=>a.getState(),[a]);_ce(()=>{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||Cce;return b.createElement(c.Provider,{value:i},t)}var Nce=Ace,Tce=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function Pce(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Wf(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(Tce.has(r)){if(e[r]==null&&t[r]==null)continue;if(!Oce(e[r],t[r]))return!1}else if(!Pce(e[r],t[r]))return!1;return!0}var Mce=["contextPayload"];function f_(){return f_=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},f_.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 jf(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){Rce(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 Rce(e,t,n){return(t=kce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kce(e){var t=Dce(e,"string");return typeof t=="symbol"?t:t+""}function Dce(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 Ice(e,t){if(e==null)return{};var n,r,a=Lce(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 Lce(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 zce(e){return e.value}function $ce(e){var{contextPayload:t}=e,n=Ice(e,Mce),r=d8(t,e.payloadUniqBy,zce),a=jf(jf({},n),{},{payload:r});return b.isValidElement(e.content)?b.cloneElement(e.content,a):typeof e.content=="function"?b.createElement(e.content,a):b.createElement(hoe,a)}function Bce(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}),jf(jf({},f),m)}function Uce(e){var t=wt();return b.useEffect(()=>{t(dce(e))},[t,e]),null}function Hce(e){var t=wt();return b.useEffect(()=>(t(Nk(e)),()=>{t(Nk({width:0,height:0}))}),[t,e]),null}function Fce(e,t,n,r){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:n||r}:null}var qce={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function Kce(e){var t=dn(e,qce),n=ose(),r=iie(),a=Zle(),{width:i,height:s,wrapperStyle:c,portal:u}=t,[f,m]=y8([n]),h=zj(),p=$j();if(h==null||p==null)return null;var y=h-((a==null?void 0:a.left)||0)-((a==null?void 0:a.right)||0),w=Fce(t.layout,s,i,y),x=u?c:jf(jf({position:"absolute",width:(w==null?void 0:w.width)||i||"auto",height:(w==null?void 0:w.height)||s||"auto"},Bce(c,t,a,h,p,f)),c),S=u??r;if(S==null||n==null)return null;var E=b.createElement("div",{className:"recharts-legend-wrapper",style:x,ref:m},b.createElement(Uce,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!u&&b.createElement(Hce,{width:f.width,height:f.height}),b.createElement($ce,f_({},t,w,{margin:a,chartWidth:h,chartHeight:p,contextPayload:n})));return cl.createPortal(E,S)}var v6=b.memo(Kce,Wf);v6.displayName="Legend";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 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 ah(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){Vce(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 Vce(e,t,n){return(t=Yce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yce(e){var t=Xce(e,"string");return typeof t=="symbol"?t:t+""}function Xce(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 Gce(e){return Array.isArray(e)&&Ni(e[0])&&Ni(e[1])?e.join(" ~ "):e}var Du={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 Wce(e,t){return t==null?e:S0(e,t)}var Qce=e=>{var{separator:t=Du.separator,contentStyle:n,itemStyle:r,labelStyle:a=Du.labelStyle,payload:i,formatter:s,itemSorter:c,wrapperClassName:u,labelClassName:f,label:m,labelFormatter:h,accessibilityLayer:p=Du.accessibilityLayer}=e,y=()=>{if(i&&i.length){var T={padding:0,margin:0},N=Wce(i,c),P=N.map((k,D)=>{if(k.type==="none")return null;var K=k.formatter||s||Gce,{value:B,name:L}=k,W=B,$=L;if(K){var Y=K(B,L,k,D,i);if(Array.isArray(Y))[W,$]=Y;else if(Y!=null)W=Y;else return null}var R=ah(ah({},Du.itemStyle),{},{color:k.color||Du.itemStyle.color},r);return b.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:R},Ni($)?b.createElement("span",{className:"recharts-tooltip-item-name"},$):null,Ni($)?b.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,b.createElement("span",{className:"recharts-tooltip-item-value"},W),b.createElement("span",{className:"recharts-tooltip-item-unit"},k.unit||""))});return b.createElement("ul",{className:"recharts-tooltip-item-list",style:T},P)}return null},w=ah(ah({},Du.contentStyle),n),x=ah({margin:0},a),S=!Lt(m),E=S?m:"",C=ot("recharts-default-tooltip",u),j=ot("recharts-tooltip-label",f);S&&h&&i!==void 0&&i!==null&&(E=h(m,i));var A=p?{role:"status","aria-live":"assertive"}:{};return b.createElement("div",d_({className:C,style:w},A),b.createElement("p",{className:j,style:x},b.isValidElement(E)?E:"".concat(E)),y())},ih="recharts-tooltip-wrapper",Zce={visibility:"hidden"};function Jce(e){var{coordinate:t,translateX:n,translateY:r}=e;return ot(ih,{["".concat(ih,"-right")]:Ee(n)&&t&&Ee(t.x)&&n>=t.x,["".concat(ih,"-left")]:Ee(n)&&t&&Ee(t.x)&&n<t.x,["".concat(ih,"-bottom")]:Ee(r)&&t&&Ee(t.y)&&r>=t.y,["".concat(ih,"-top")]:Ee(r)&&t&&Ee(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&&Ee(i[r]))return i[r];var m=n[r]-c-(a>0?a:0),h=n[r]+a;if(t[r])return s[r]?m:h;var p=u[r];if(p==null)return 0;if(s[r]){var y=m,w=p;return y<w?Math.max(h,p):Math.max(m,p)}if(f==null)return 0;var x=h+c,S=p+f;return x>S?Math.max(m,p):Math.max(h,p)}function eue(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 tue(e){var{allowEscapeViewBox:t,coordinate:n,offsetTop:r,offsetLeft:a,position:i,reverseDirection:s,tooltipBox:c,useTranslate3d:u,viewBox:f}=e,m,h,p;return c.height>0&&c.width>0&&n?(h=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=eue({translateX:h,translateY:p,useTranslate3d:u})):m=Zce,{cssProperties:m,cssClasses:Jce({translateX:h,translateY:p,coordinate:n})}}var nue=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),km={isSsr:nue()};function g6(){var[e,t]=b.useState(()=>km.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return b.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 Iu(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){rue(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 rue(e,t,n){return(t=aue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aue(e){var t=iue(e,"string");return typeof t=="symbol"?t:t+""}function iue(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 oue(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function sue(e){var t,n,r,a,i,s,c=g6(),[u,f]=b.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));b.useEffect(()=>{var w=x=>{if(x.key==="Escape"){var S,E,C,j;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=(j=e.coordinate)===null||j===void 0?void 0:j.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(Iu(Iu({},u),{},{dismissed:!1}));var{cssClasses:m,cssProperties:h}=tue({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?{}:Iu(Iu({transition:oue({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},h),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),y=Iu(Iu({},p),{},{visibility:!u.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return b.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:m,style:y,ref:e.innerRef},e.children)}var lue=b.memo(sue),y6=()=>{var e;return(e=je(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};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 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){cue(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 cue(e,t,n){return(t=uue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uue(e){var t=fue(e,"string");return typeof t=="symbol"?t:t+""}function fue(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:_ie,curveBasisOpen:Oie,curveBasis:Eie,curveBumpX:cie,curveBumpY:uie,curveLinearClosed:jie,curveLinear:x0,curveMonotoneX:Cie,curveMonotoneY:Aie,curveNatural:Nie,curveStep:Tie,curveStepAfter:Mie,curveStepBefore:Pie},oy=e=>at(e.x)&&at(e.y),Uk=e=>e.base!=null&&oy(e.base)&&oy(e),oh=e=>e.x,sh=e=>e.y,due=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(Cm(e));if((n==="curveMonotone"||n==="curveBump")&&t){var r=Bk["".concat(n).concat(t==="vertical"?"Y":"X")];if(r)return r}return Bk[n]||x0},Hk={connectNulls:!1,type:"linear"},hue=e=>{var{type:t=Hk.type,points:n=[],baseLine:r,layout:a,connectNulls:i=Hk.connectNulls}=e,s=due(t,a),c=i?n.filter(oy):n;if(Array.isArray(r)){var u,f=n.map((w,x)=>$k($k({},w),{},{base:r[x]}));a==="vertical"?u=Mv().y(sh).x1(oh).x0(w=>w.base.x):u=Mv().x(oh).y1(sh).y0(w=>w.base.y);var m=u.defined(Uk).curve(s),h=i?f.filter(Uk):f;return m(h)}var p;a==="vertical"&&Ee(r)?p=Mv().y(sh).x1(oh).x0(r):Ee(r)?p=Mv().x(oh).y1(sh).y0(r):p=BB().x(oh).y(sh);var y=p.defined(oy).curve(s);return y(c)},Hj=e=>{var{className:t,points:n,path:r,pathRef:a}=e,i=Kc();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?hue(s):r;return b.createElement("path",h_({},Qr(e),Oj(e),{className:ot("recharts-curve",t),d:c===null?void 0:c,ref:a}))},mue=["x","y","top","left","width","height","className"];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 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 pue(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){vue(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 vue(e,t,n){return(t=gue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gue(e){var t=yue(e,"string");return typeof t=="symbol"?t:t+""}function yue(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 bue(e,t){if(e==null)return{};var n,r,a=xue(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 xue(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 wue=(e,t,n,r,a,i)=>"M".concat(e,",").concat(a,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),Sue=e=>{var{x:t=0,y:n=0,top:r=0,left:a=0,width:i=0,height:s=0,className:c}=e,u=bue(e,mue),f=pue({x:t,y:n,top:r,left:a,width:i,height:s},u);return!Ee(t)||!Ee(n)||!Ee(i)||!Ee(s)||!Ee(r)||!Ee(a)?null:b.createElement("path",m_({},dr(f),{className:ot("recharts-cross",c),d:wue(t,n,i,s,r,a)}))};function Eue(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){_ue(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 _ue(e,t,n){return(t=Oue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oue(e){var t=jue(e,"string");return typeof t=="symbol"?t:t+""}function jue(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 Cue=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),b6=(e,t,n)=>e.map(r=>"".concat(Cue(r)," ").concat(t,"ms ").concat(n)).join(","),Aue=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(a=>r.includes(a))),Kh=(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 wn(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){Nue(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 Nue(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=Pue(e,"string");return typeof t=="symbol"?t:t+""}function Pue(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 sy=(e,t,n)=>e+(t-e)*n,p_=e=>{var{from:t,to:n}=e;return t!==n},x6=(e,t,n)=>{var r=Kh((a,i)=>{if(p_(i)){var[s,c]=e(i.from,i.to,i.velocity);return wn(wn({},i),{},{from:s,velocity:c})}return i},t);return n<1?Kh((a,i)=>p_(i)&&r[a]!=null?wn(wn({},i),{},{velocity:sy(i.velocity,r[a].velocity,n),from:sy(i.from,r[a].from,n)}):i,t):x6(e,r,n-1)};function Mue(e,t,n,r,a,i){var s,c=r.reduce((p,y)=>wn(wn({},p),{},{[y]:{from:e[y],velocity:0,to:t[y]}}),{}),u=()=>Kh((p,y)=>y.from,c),f=()=>!Object.values(c).filter(p_).length,m=null,h=p=>{s||(s=p);var y=p-s,w=y/n.dt;c=x6(n,c,w),a(wn(wn(wn({},e),t),u())),s=p,f()||(m=i.setTimeout(h))};return()=>(m=i.setTimeout(h),()=>{var p;(p=m)===null||p===void 0||p()})}function Rue(e,t,n,r,a,i,s){var c=null,u=a.reduce((h,p)=>{var y=e[p],w=t[p];return y==null||w==null?h:wn(wn({},h),{},{[p]:[y,w]})},{}),f,m=h=>{f||(f=h);var p=(h-f)/r,y=Kh((x,S)=>sy(...S,n(p)),u);if(i(wn(wn(wn({},e),t),y)),p<1)c=s.setTimeout(m);else{var w=Kh((x,S)=>sy(...S,n(1)),u);i(wn(wn(wn({},e),t),w))}};return()=>(c=s.setTimeout(m),()=>{var h;(h=c)===null||h===void 0||h()})}const kue=(e,t,n,r,a,i)=>{var s=Aue(e,t);return n==null?()=>(a(wn(wn({},e),t)),()=>{}):n.isStepper===!0?Mue(e,t,n,s,a,i):Rue(e,t,n,r,s,a,i)};var ly=1e-4,w6=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],S6=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),Yk=(e,t)=>n=>{var r=w6(e,t);return S6(r,n)},Due=(e,t)=>n=>{var r=w6(e,t),a=[...r.map((i,s)=>i*s).slice(1),0];return S6(a,n)},Iue=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]]},Lue=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=Iue(n[0]);if(a)return a}}return n.length===4?n:[0,0,1,1]},zue=(e,t,n,r)=>{var a=Yk(e,n),i=Yk(t,r),s=Due(e,n),c=f=>f>1?1:f<0?0:f,u=f=>{for(var m=f>1?1:f,h=m,p=0;p<8;++p){var y=a(h)-m,w=s(h);if(Math.abs(y-m)<ly||w<ly)return i(h);h=c(h-y/w)}return i(h)};return u.isStepper=!1,u},Xk=function(){return zue(...Lue(...arguments))},$ue=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,h=u+(f-m)*a/1e3,p=u*a/1e3+s;return Math.abs(p-c)<ly&&Math.abs(h)<ly?[c,0]:[p,h]};return i.isStepper=!0,i.dt=a,i},Bue=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 $ue();default:if(e.split("(")[0]==="cubic-bezier")return Xk(e)}return typeof e=="function"?e:null};function Uue(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 Hue{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 Fue(){return Uue(new Hue)}var que=b.createContext(Fue);function Kue(e,t){var n=b.useContext(que);return b.useMemo(()=>t??n(e),[e,t,n])}var Vue={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},Gk={t:0},pS={t:1};function Dm(e){var t=dn(e,Vue),{isActive:n,canBegin:r,duration:a,easing:i,begin:s,onAnimationEnd:c,onAnimationStart:u,children:f}=t,m=g6(),h=n==="auto"?!km.isSsr&&!m:n,p=Kue(t.animationId,t.animationManager),[y,w]=b.useState(h?Gk:pS),x=b.useRef(null);return b.useEffect(()=>{h||w(pS)},[h]),b.useEffect(()=>{if(!h||!r)return hl;var S=kue(Gk,pS,Bue(i),a,w,p.getTimeoutController()),E=()=>{x.current=S()};return p.start([u,s,E,a,c]),()=>{p.stop(),x.current&&x.current(),c()}},[h,r,a,i,s,u,c,p]),f(y.t)}function Im(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=b.useRef(zh(t)),r=b.useRef(e);return r.current!==e&&(n.current=zh(t),r.current=e),n.current}var Yue=["radius"],Xue=["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){Gue(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 Gue(e,t,n){return(t=Wue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wue(e){var t=Que(e,"string");return typeof t=="symbol"?t:t+""}function Que(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 cy(){return cy=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},cy.apply(null,arguments)}function lD(e,t){if(e==null)return{};var n,r,a=Zue(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 Zue(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 di(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=qs(n),s=qs(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,h;if(c>0&&Array.isArray(a)){for(var p=[0,0,0,0],y=0,w=4;y<w;y++){var x,S=(x=a[y])!==null&&x!==void 0?x:0;p[y]=S>c?c:S}h=Vt(Wk||(Wk=di(["M",",",""])),e,t+u*p[0]),p[0]>0&&(h+=Vt(Qk||(Qk=di(["A ",",",",0,0,",",",",",""])),p[0],p[0],m,e+f*p[0],t)),h+=Vt(Zk||(Zk=di(["L ",",",""])),e+n-f*p[1],t),p[1]>0&&(h+=Vt(Jk||(Jk=di(["A ",",",",0,0,",`,
        `,",",""])),p[1],p[1],m,e+n,t+u*p[1])),h+=Vt(eD||(eD=di(["L ",",",""])),e+n,t+r-u*p[2]),p[2]>0&&(h+=Vt(tD||(tD=di(["A ",",",",0,0,",`,
        `,",",""])),p[2],p[2],m,e+n-f*p[2],t+r)),h+=Vt(nD||(nD=di(["L ",",",""])),e+f*p[3],t+r),p[3]>0&&(h+=Vt(rD||(rD=di(["A ",",",",0,0,",`,
        `,",",""])),p[3],p[3],m,e,t+r-u*p[3])),h+="Z"}else if(c>0&&a===+a&&a>0){var E=Math.min(c,a);h=Vt(aD||(aD=di(["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 h=Vt(iD||(iD=di(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return h},uD={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},E6=e=>{var t=dn(e,uD),n=b.useRef(null),[r,a]=b.useState(-1);b.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:h,animationDuration:p,animationBegin:y,isAnimationActive:w,isUpdateAnimationActive:x}=t,S=b.useRef(c),E=b.useRef(u),C=b.useRef(i),j=b.useRef(s),A=b.useMemo(()=>({x:i,y:s,width:c,height:u,radius:f}),[i,s,c,u,f]),T=Im(A,"rectangle-");if(i!==+i||s!==+s||c!==+c||u!==+u||c===0||u===0)return null;var N=ot("recharts-rectangle",m);if(!x){var P=dr(t),{radius:k}=P,D=lD(P,Yue);return b.createElement("path",cy({},D,{x:qs(i),y:qs(s),width:qs(c),height:qs(u),radius:typeof f=="number"?f:void 0,className:N,d:cD(i,s,c,u,f)}))}var K=S.current,B=E.current,L=C.current,W=j.current,$="0px ".concat(r===-1?1:r,"px"),Y="".concat(r,"px ").concat(r,"px"),R=b6(["strokeDasharray"],p,typeof h=="string"?h:uD.animationEasing);return b.createElement(Dm,{animationId:T,key:T,canBegin:r>0,duration:p,easing:h,isActive:x,begin:y},H=>{var q=kt(K,c,H),F=kt(B,u,H),V=kt(L,i,H),I=kt(W,s,H);n.current&&(S.current=q,E.current=F,C.current=V,j.current=I);var z;w?H>0?z={transition:R,strokeDasharray:Y}:z={strokeDasharray:$}:z={strokeDasharray:Y};var X=dr(t),{radius:Z}=X,ee=lD(X,Xue);return b.createElement("path",cy({},ee,{radius:typeof f=="number"?f:void 0,className:N,d:cD(V,I,q,F,f),ref:n,style:sD(sD({},z),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){Jue(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 Jue(e,t,n){return(t=efe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function efe(e){var t=tfe(e,"string");return typeof t=="symbol"?t:t+""}function tfe(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 uy=Math.PI/180,nfe=e=>e*180/Math.PI,cn=(e,t,n,r)=>({x:e+Math.cos(-uy*r)*n,y:t+Math.sin(-uy*r)*n}),_6=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},rfe=(e,t)=>{var{x:n,y:r}=e,{x:a,y:i}=t;return Math.sqrt((n-a)**2+(r-i)**2)},afe=(e,t)=>{var{x:n,y:r}=e,{cx:a,cy:i}=t,s=rfe({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:nfe(u),angleInRadian:u}},ife=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}},ofe=(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},sfe=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:a,angle:i}=afe({x:n,y:r},t),{innerRadius:s,outerRadius:c}=t;if(a<s||a>c||a===0)return null;var{startAngle:u,endAngle:f}=ife(t),m=i,h;if(u<=f){for(;m>f;)m-=360;for(;m<u;)m+=360;h=m>=u&&m<=f}else{for(;m>u;)m-=360;for(;m<f;)m+=360;h=m>=f&&m<=u}return h?dD(dD({},t),{},{radius:a,angle:ofe(m,t)}):null};function O6(e){var{cx:t,cy:n,radius:r,startAngle:a,endAngle:i}=e,s=cn(t,n,r,a),c=cn(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 v_(){return v_=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},v_.apply(null,arguments)}function Wl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var lfe=(e,t)=>{var n=kn(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Bv=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)/uy,h=u?a:a+i*m,p=cn(t,n,f,h),y=cn(t,n,r,h),w=u?a-i*m:a,x=cn(t,n,f*Math.cos(m*uy),w);return{center:p,circleTangency:y,lineTangency:x,theta:m}},j6=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:i,endAngle:s}=e,c=lfe(i,s),u=i+c,f=cn(t,n,a,i),m=cn(t,n,a,u),h=Vt(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=cn(t,n,r,i),y=cn(t,n,r,u);h+=Vt(mD||(mD=Wl(["L ",",",`
            A `,",",`,0,
            `,",",`,
            `,","," Z"])),y.x,y.y,r,r,+(Math.abs(c)>180),+(i<=u),p.x,p.y)}else h+=Vt(pD||(pD=Wl(["L ",","," Z"])),t,n);return h},cfe=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:a,cornerRadius:i,forceCornerRadius:s,cornerIsExternal:c,startAngle:u,endAngle:f}=e,m=kn(f-u),{circleTangency:h,lineTangency:p,theta:y}=Bv({cx:t,cy:n,radius:a,angle:u,sign:m,cornerRadius:i,cornerIsExternal:c}),{circleTangency:w,lineTangency:x,theta:S}=Bv({cx:t,cy:n,radius:a,angle:f,sign:-m,cornerRadius:i,cornerIsExternal:c}),E=c?Math.abs(u-f):Math.abs(u-f)-y-S;if(E<0)return s?Vt(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):j6({cx:t,cy:n,innerRadius:r,outerRadius:a,startAngle:u,endAngle:f});var C=Vt(gD||(gD=Wl(["M ",",",`
    A`,",",",0,0,",",",",",`
    A`,",",",0,",",",",",",",`
    A`,",",",0,0,",",",",",`
  `])),p.x,p.y,i,i,+(m<0),h.x,h.y,a,a,+(E>180),+(m<0),w.x,w.y,i,i,+(m<0),x.x,x.y);if(r>0){var{circleTangency:j,lineTangency:A,theta:T}=Bv({cx:t,cy:n,radius:r,angle:u,sign:m,isExternal:!0,cornerRadius:i,cornerIsExternal:c}),{circleTangency:N,lineTangency:P,theta:k}=Bv({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+=Vt(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),j.x,j.y,i,i,+(m<0),A.x,A.y)}else C+=Vt(bD||(bD=Wl(["L",",","Z"])),t,n);return C},ufe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},C6=e=>{var t=dn(e,ufe),{cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:s,forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:m,className:h}=t;if(i<a||f===m)return null;var p=ot("recharts-sector",h),y=i-a,w=ar(s,y,0,!0),x;return w>0&&Math.abs(f-m)<360?x=cfe({cx:n,cy:r,innerRadius:a,outerRadius:i,cornerRadius:Math.min(w,y/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:m}):x=j6({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:f,endAngle:m}),b.createElement("path",v_({},dr(t),{className:p,d:x}))};function ffe(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(t8(t)){if(e==="centric"){var{cx:r,cy:a,innerRadius:i,outerRadius:s,angle:c}=t,u=cn(r,a,i,c),f=cn(r,a,s,c);return[{x:u.x,y:u.y},{x:f.x,y:f.y}]}return O6(t)}}var vS={},gS={},yS={},xD;function dfe(){return xD||(xD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=p8();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(yS)),yS}var wD;function hfe(){return wD||(wD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dfe();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})(gS)),gS}var SD;function mfe(){return SD||(SD=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=v8(),n=hfe();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})(vS)),vS}var bS,ED;function pfe(){return ED||(ED=1,bS=mfe().range),bS}var vfe=pfe();const A6=Wa(vfe);var Lo=e=>e.chartData,B0=oe([Lo],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Fj=(e,t,n,r)=>r?B0(e):Lo(e),gfe=(e,t,n)=>n?B0(e):Lo(e);function ji(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(at(t)&&at(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 N6(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,a,i;if(at(n))a=n;else if(typeof n=="function")return;if(at(r))i=r;else if(typeof r=="function")return;var s=[a,i];if(ji(s))return s}}function yfe(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(ji(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(Ee(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(Ee(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 h=+m[1];c=t[1]+h}}else c=t==null?void 0:t[1];var p=[s,c];if(ji(p))return t==null?p:_D(p,t,n)}}}var Qf=1e9,bfe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Kj,It=!0,Ea="[DecimalError] ",uc=Ea+"Invalid argument: ",qj=Ea+"Exponent out of range: ",Zf=Math.floor,Yl=Math.pow,xfe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Vr,Rn=1e7,Mt=7,T6=9007199254740991,fy=Zf(T6/Mt),_e={};_e.absoluteValue=_e.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};_e.comparedTo=_e.cmp=function(e){var t,n,r,a,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};_e.decimalPlaces=_e.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Mt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};_e.dividedBy=_e.div=function(e){return bo(this,new this.constructor(e))};_e.dividedToIntegerBy=_e.idiv=function(e){var t=this,n=t.constructor;return Et(bo(t,new n(e),0,1),n.precision)};_e.equals=_e.eq=function(e){return!this.cmp(e)};_e.exponent=function(){return fn(this)};_e.greaterThan=_e.gt=function(e){return this.cmp(e)>0};_e.greaterThanOrEqualTo=_e.gte=function(e){return this.cmp(e)>=0};_e.isInteger=_e.isint=function(){return this.e>this.d.length-2};_e.isNegative=_e.isneg=function(){return this.s<0};_e.isPositive=_e.ispos=function(){return this.s>0};_e.isZero=function(){return this.s===0};_e.lessThan=_e.lt=function(e){return this.cmp(e)<0};_e.lessThanOrEqualTo=_e.lte=function(e){return this.cmp(e)<1};_e.logarithm=_e.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Vr))throw Error(Ea+"NaN");if(n.s<1)throw Error(Ea+(n.s?"NaN":"-Infinity"));return n.eq(Vr)?new r(0):(It=!1,t=bo(Vh(n,i),Vh(e,i),i),It=!0,Et(t,a))};_e.minus=_e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?R6(t,e):P6(t,(e.s=-e.s,e))};_e.modulo=_e.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(Ea+"NaN");return n.s?(It=!1,t=bo(n,e,0,1).times(e),It=!0,n.minus(t)):Et(new r(n),a)};_e.naturalExponential=_e.exp=function(){return M6(this)};_e.naturalLogarithm=_e.ln=function(){return Vh(this)};_e.negated=_e.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};_e.plus=_e.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?P6(t,e):R6(t,(e.s=-e.s,e))};_e.precision=_e.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(uc+e);if(t=fn(a)+1,r=a.d.length-1,n=r*Mt+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};_e.squareRoot=_e.sqrt=function(){var e,t,n,r,a,i,s,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(Ea+"NaN")}for(e=fn(c),It=!1,a=Math.sqrt(+c),a==0||a==1/0?(t=Ei(c.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=Zf((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(bo(c,i,s+2)).times(.5),Ei(i.d).slice(0,s)===(t=Ei(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(Et(i,n+1,0),i.times(i).eq(c)){r=i;break}}else if(t!="9999")break;s+=4}return It=!0,Et(r,n)};_e.times=_e.mul=function(e){var t,n,r,a,i,s,c,u,f,m=this,h=m.constructor,p=m.d,y=(e=new h(e)).d;if(!m.s||!e.s)return new h(0);for(e.s*=m.s,n=m.e+e.e,u=p.length,f=y.length,u<f&&(i=p,p=y,y=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]+y[r]*p[a-r-1]+t,i[a--]=c%Rn|0,t=c/Rn|0;i[a]=(i[a]+t)%Rn|0}for(;!i[--s];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,It?Et(e,h.precision):e};_e.toDecimalPlaces=_e.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Pi(e,0,Qf),t===void 0?t=r.rounding:Pi(t,0,8),Et(n,e+fn(n)+1,t))};_e.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Ac(r,!0):(Pi(e,0,Qf),t===void 0?t=a.rounding:Pi(t,0,8),r=Et(new a(r),e+1,t),n=Ac(r,!0,e+1)),n};_e.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?Ac(a):(Pi(e,0,Qf),t===void 0?t=i.rounding:Pi(t,0,8),r=Et(new i(a),e+fn(a)+1,t),n=Ac(r.abs(),!1,e+fn(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};_e.toInteger=_e.toint=function(){var e=this,t=e.constructor;return Et(new t(e),fn(e)+1,t.rounding)};_e.toNumber=function(){return+this};_e.toPower=_e.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(Vr);if(c=new u(c),!c.s){if(e.s<1)throw Error(Ea+"Infinity");return c}if(c.eq(Vr))return c;if(r=u.precision,e.eq(Vr))return Et(c,r);if(t=e.e,n=e.d.length-1,s=t>=n,i=c.s,s){if((n=m<0?-m:m)<=T6){for(a=new u(Vr),t=Math.ceil(r/Mt+4),It=!1;n%2&&(a=a.times(c),jD(a.d,t)),n=Zf(n/2),n!==0;)c=c.times(c),jD(c.d,t);return It=!0,e.s<0?new u(Vr).div(a):Et(a,r)}}else if(i<0)throw Error(Ea+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,It=!1,a=e.times(Vh(c,r+f)),It=!0,a=M6(a),a.s=i,a};_e.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=fn(a),r=Ac(a,n<=i.toExpNeg||n>=i.toExpPos)):(Pi(e,1,Qf),t===void 0?t=i.rounding:Pi(t,0,8),a=Et(new i(a),e,t),n=fn(a),r=Ac(a,e<=n||n<=i.toExpNeg,e)),r};_e.toSignificantDigits=_e.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Pi(e,1,Qf),t===void 0?t=r.rounding:Pi(t,0,8)),Et(new r(n),e,t)};_e.toString=_e.valueOf=_e.val=_e.toJSON=_e[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=fn(e),n=e.constructor;return Ac(e,t<=n.toExpNeg||t>=n.toExpPos)};function P6(e,t){var n,r,a,i,s,c,u,f,m=e.constructor,h=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),It?Et(t,h):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(h/Mt),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)/Rn|0,u[i]%=Rn;for(n&&(u.unshift(n),++a),c=u.length;u[--c]==0;)u.pop();return t.d=u,t.e=a,It?Et(t,h):t}function Pi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(uc+e)}function Ei(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=Mt-r.length,n&&(i+=Ns(n)),i+=r;s=e[t],r=s+"",n=Mt-r.length,n&&(i+=Ns(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var bo=(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%Rn|0,s=i/Rn|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*Rn+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,s){var c,u,f,m,h,p,y,w,x,S,E,C,j,A,T,N,P,k,D=r.constructor,K=r.s==a.s?1:-1,B=r.d,L=a.d;if(!r.s)return new D(r);if(!a.s)throw Error(Ea+"Division by zero");for(u=r.e-a.e,P=L.length,T=B.length,y=new D(K),w=y.d=[],f=0;L[f]==(B[f]||0);)++f;if(L[f]>(B[f]||0)&&--u,i==null?C=i=D.precision:s?C=i+(fn(r)-fn(a))+1:C=i,C<0)return new D(0);if(C=C/Mt+2|0,f=0,P==1)for(m=0,L=L[0],C++;(f<T||m)&&C--;f++)j=m*Rn+(B[f]||0),w[f]=j/L|0,m=j%L|0;else{for(m=Rn/(L[0]+1)|0,m>1&&(L=e(L,m),B=e(B,m),P=L.length,T=B.length),A=P,x=B.slice(0,P),S=x.length;S<P;)x[S++]=0;k=L.slice(),k.unshift(0),N=L[0],L[1]>=Rn/2&&++N;do m=0,c=t(L,x,P,S),c<0?(E=x[0],P!=S&&(E=E*Rn+(x[1]||0)),m=E/N|0,m>1?(m>=Rn&&(m=Rn-1),h=e(L,m),p=h.length,S=x.length,c=t(h,x,p,S),c==1&&(m--,n(h,P<p?k:L,p))):(m==0&&(c=m=1),h=L.slice()),p=h.length,p<S&&h.unshift(0),n(x,h,S),c==-1&&(S=x.length,c=t(L,x,P,S),c<1&&(m++,n(x,P<S?k:L,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(),y.e=u,Et(y,s?i+fn(y)+1:i)}})();function M6(e,t){var n,r,a,i,s,c,u=0,f=0,m=e.constructor,h=m.precision;if(fn(e)>16)throw Error(qj+fn(e));if(!e.s)return new m(Vr);for(It=!1,c=h,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(Vr),m.precision=c;;){if(a=Et(a.times(e),c),n=n.times(++u),s=i.plus(bo(a,n,c)),Ei(s.d).slice(0,c)===Ei(i.d).slice(0,c)){for(;f--;)i=Et(i.times(i),c);return m.precision=h,t==null?(It=!0,Et(i,h)):i}i=s}}function fn(e){for(var t=e.e*Mt,n=e.d[0];n>=10;n/=10)t++;return t}function xS(e,t,n){if(t>e.LN10.sd())throw It=!0,n&&(e.precision=n),Error(Ea+"LN10 precision limit exceeded");return Et(new e(e.LN10),t)}function Ns(e){for(var t="";e--;)t+="0";return t}function Vh(e,t){var n,r,a,i,s,c,u,f,m,h=1,p=10,y=e,w=y.d,x=y.constructor,S=x.precision;if(y.s<1)throw Error(Ea+(y.s?"NaN":"-Infinity"));if(y.eq(Vr))return new x(0);if(t==null?(It=!1,f=S):f=t,y.eq(10))return t==null&&(It=!0),xS(x,f);if(f+=p,x.precision=f,n=Ei(w),r=n.charAt(0),i=fn(y),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)y=y.times(e),n=Ei(y.d),r=n.charAt(0),h++;i=fn(y),r>1?(y=new x("0."+n),i++):y=new x(r+"."+n.slice(1))}else return u=xS(x,f+2,S).times(i+""),y=Vh(new x(r+"."+n.slice(1)),f-p).plus(u),x.precision=S,t==null?(It=!0,Et(y,S)):y;for(c=s=y=bo(y.minus(Vr),y.plus(Vr),f),m=Et(y.times(y),f),a=3;;){if(s=Et(s.times(m),f),u=c.plus(bo(s,new x(a),f)),Ei(u.d).slice(0,f)===Ei(c.d).slice(0,f))return c=c.times(2),i!==0&&(c=c.plus(xS(x,f+2,S).times(i+""))),c=bo(c,new x(h),f),x.precision=S,t==null?(It=!0,Et(c,S)):c;c=u,a+=2}}function OD(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=Zf(n/Mt),e.d=[],r=(n+1)%Mt,n<0&&(r+=Mt),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=Mt;r<a;)e.d.push(+t.slice(r,r+=Mt));t=t.slice(r),r=Mt-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),It&&(e.e>fy||e.e<-fy))throw Error(qj+n)}else e.s=0,e.e=0,e.d=[0];return e}function Et(e,t,n){var r,a,i,s,c,u,f,m,h=e.d;for(s=1,i=h[0];i>=10;i/=10)s++;if(r=t-s,r<0)r+=Mt,a=t,f=h[m=0];else{if(m=Math.ceil((r+1)/Mt),i=h.length,m>=i)return e;for(f=i=h[m],s=1;i>=10;i/=10)s++;r%=Mt,a=r-Mt+s}if(n!==void 0&&(i=Yl(10,s-a-1),c=f/i%10|0,u=t<0||h[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:h[m-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return u?(i=fn(e),h.length=1,t=t-i-1,h[0]=Yl(10,(Mt-t%Mt)%Mt),e.e=Zf(-t/Mt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=m,i=1,m--):(h.length=m+1,i=Yl(10,Mt-r),h[m]=a>0?(f/Yl(10,s-a)%Yl(10,a)|0)*i:0),u)for(;;)if(m==0){(h[0]+=i)==Rn&&(h[0]=1,++e.e);break}else{if(h[m]+=i,h[m]!=Rn)break;h[m--]=0,i=1}for(r=h.length;h[--r]===0;)h.pop();if(It&&(e.e>fy||e.e<-fy))throw Error(qj+fn(e));return e}function R6(e,t){var n,r,a,i,s,c,u,f,m,h,p=e.constructor,y=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),It?Et(t,y):t;if(u=e.d,h=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=h.length):(n=h,r=f,c=u.length),a=Math.max(Math.ceil(y/Mt),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=h.length,m=a<c,m&&(c=a),a=0;a<c;a++)if(u[a]!=h[a]){m=u[a]<h[a];break}s=0}for(m&&(n=u,u=h,h=n,t.s=-t.s),c=u.length,a=h.length-c;a>0;--a)u[c++]=0;for(a=h.length;a>s;){if(u[--a]<h[a]){for(i=a;i&&u[--i]===0;)u[i]=Rn-1;--u[i],u[a]+=Rn}u[a]-=h[a]}for(;u[--c]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=r,It?Et(t,y):t):new p(0)}function Ac(e,t,n){var r,a=fn(e),i=Ei(e.d),s=i.length;return t?(n&&(r=n-s)>0?i=i.charAt(0)+"."+i.slice(1)+Ns(r):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Ns(-a-1)+i,n&&(r=n-s)>0&&(i+=Ns(r))):a>=s?(i+=Ns(a+1-s),n&&(r=n-a-1)>0&&(i=i+"."+Ns(r))):((r=a+1)<s&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-s)>0&&(a+1===s&&(i+="."),i+=Ns(r))),e.s<0?"-"+i:i}function jD(e,t){if(e.length>t)return e.length=t,!0}function k6(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(uc+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 OD(s,i.toString())}else if(typeof i!="string")throw Error(uc+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,xfe.test(i))OD(s,i);else throw Error(uc+i)}if(a.prototype=_e,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=k6,a.config=a.set=wfe,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 wfe(e){if(!e||typeof e!="object")throw Error(Ea+"Object expected");var t,n,r,a=["precision",1,Qf,"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(Zf(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(uc+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(uc+n+": "+r);return this}var Kj=k6(bfe);Vr=new Kj(1);const tt=Kj;function D6(e){var t;return e===0?t=1:t=Math.floor(new tt(e).abs().log(10).toNumber())+1,t}function I6(e,t,n){for(var r=new tt(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var L6=e=>{var[t,n]=e,[r,a]=[t,n];return t>n&&([r,a]=[n,t]),[r,a]},Vj=(e,t,n)=>{if(e.lte(0))return new tt(0);var r=D6(e.toNumber()),a=new tt(10).pow(r),i=e.div(a),s=r!==1?.05:.1,c=new tt(Math.ceil(i.div(s).toNumber())).add(n).mul(s),u=c.mul(a);return t?new tt(u.toNumber()):new tt(Math.ceil(u.toNumber()))},z6=(e,t,n)=>{var r;if(e.lte(0))return new tt(0);var a=[1,2,2.5,5],i=e.toNumber(),s=Math.floor(new tt(i).abs().log(10).toNumber()),c=new tt(10).pow(s),u=e.div(c).toNumber(),f=a.findIndex(y=>y>=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 tt(10).pow(m))}var h=(r=a[f])!==null&&r!==void 0?r:1,p=new tt(h).mul(c);return t?p:new tt(Math.ceil(p.toNumber()))},Sfe=(e,t,n)=>{var r=new tt(1),a=new tt(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new tt(10).pow(D6(e)-1),a=new tt(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new tt(Math.floor(e)))}else e===0?a=new tt(Math.floor((t-1)/2)):n||(a=new tt(Math.floor(e)));for(var s=Math.floor((t-1)/2),c=[],u=0;u<t;u++)c.push(a.add(new tt(u-s).mul(r)).toNumber());return c},$6=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]:Vj;if(!Number.isFinite((n-t)/(r-1)))return{step:new tt(0),tickMin:new tt(0),tickMax:new tt(0)};var c=s(new tt(n).sub(t).div(r-1),a,i),u;t<=0&&n>=0?u=new tt(0):(u=new tt(t).add(n).div(2),u=u.sub(new tt(u).mod(c)));var f=Math.ceil(u.sub(t).div(c).toNumber()),m=Math.ceil(new tt(n).sub(u).div(c).toNumber()),h=f+m+1;return h>r?$6(t,n,r,a,i+1,s):(h<r&&(m=n>0?m+(r-h):m,f=n>0?f:f+(r-h)),{step:c,tickMin:u.sub(new tt(f).mul(c)),tickMax:u.add(new tt(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]=L6([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 Sfe(u,a,i);var h=s==="snap125"?z6:Vj,{step:p,tickMin:y,tickMax:w}=$6(u,f,c,i,0,h),x=I6(y,w.add(new tt(.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]=L6([r,a]);if(c===-1/0||u===1/0)return[r,a];if(c===u)return[c];var f=s==="snap125"?z6:Vj,m=Math.max(n,2),h=f(new tt(u).sub(c).div(m-1),i,0),p=[...I6(new tt(c),new tt(u),h),u];return i===!1&&(p=p.map(y=>Math.round(y))),r>a?p.reverse():p},B6=e=>e.rootProps.maxBarSize,Efe=e=>e.rootProps.barGap,U6=e=>e.rootProps.barCategoryGap,_fe=e=>e.rootProps.barSize,Lm=e=>e.rootProps.stackOffset,H6=e=>e.rootProps.reverseStackOrder,Yj=e=>e.options.chartName,Xj=e=>e.rootProps.syncId,F6=e=>e.rootProps.syncMethod,Gj=e=>e.options.eventEmitter,un={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"},hi={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},U0=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function H0(e,t,n){if(n!=="auto")return n;if(e!=null)return ko(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 dy(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){Ofe(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 Ofe(e,t,n){return(t=jfe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jfe(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 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:hi.allowDataOverflow,allowDecimals:hi.allowDecimals,allowDuplicatedCategory:hi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:hi.radiusAxisId,includeHidden:hi.includeHidden,name:void 0,reversed:hi.reversed,scale:hi.scale,tick:hi.tick,tickCount:hi.tickCount,ticks:void 0,type:hi.type,unit:void 0,niceTicks:"auto"},Afe=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Wj=oe([Afe,i6],(e,t)=>{var n;if(e!=null)return e;var r=(n=H0(t,"angleAxis",TD.type))!==null&&n!==void 0?n:"category";return dy(dy({},TD),{},{type:r})}),Nfe=(e,t)=>e.polarAxis.radiusAxis[t],Qj=oe([Nfe,i6],(e,t)=>{var n;if(e!=null)return e;var r=(n=H0(t,"radiusAxis",PD.type))!==null&&n!==void 0?n:"category";return dy(dy({},PD),{},{type:r})}),F0=e=>e.polarOptions,Zj=oe([Do,Io,jn],_6),q6=oe([F0,Zj],(e,t)=>{if(e!=null)return ar(e.innerRadius,t,0)}),K6=oe([F0,Zj],(e,t)=>{if(e!=null)return ar(e.outerRadius,t,t*.8)}),Tfe=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},V6=oe([F0],Tfe);oe([Wj,V6],U0);var Y6=oe([Zj,q6,K6],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});oe([Qj,Y6],U0);var X6=oe([ut,F0,q6,K6,Do,Io],(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:ar(s,a,a/2),cy:ar(c,i,i/2),innerRadius:n,outerRadius:r,startAngle:u,endAngle:f,clockWise:!1}}}),Ut=(e,t)=>t,zm=(e,t,n)=>n;function Jj(e){return e==null?void 0:e.id}function G6(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=Jj(c);f.forEach((h,p)=>{var y=i==null||a?p:String(xt(h,i,null)),w=xt(h,c.dataKey,0),x;s.has(y)?x=s.get(y):x={},Object.assign(x,{[m]:w}),s.set(y,x)})}}),Array.from(s.values())}function q0(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var K0=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function V0(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function Pfe(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 zn=e=>{var t=ut(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Jf=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 W6=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!ji(t)){for(var n,r,a=0;a<t.length;a++){var i=t[a];at(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 Vs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Mfe(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=Vs,n=(c,u)=>Vs(e(c),u),r=(c,u)=>e(c)-u):(t=e===Vs||e===Mfe?e:Rfe,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 h=f+m>>>1;n(c[h],u)<0?f=h+1:m=h}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 h=f+m>>>1;n(c[h],u)<=0?f=h+1:m=h}while(f<m)}return f}function s(c,u,f=0,m=c.length){const h=a(c,u,f,m-1);return h>f&&r(c[h-1],u)>-r(c[h],u)?h-1:h}return{left:a,center:s,right:i}}function Rfe(){return 0}function Q6(e){return e===null?NaN:+e}function*kfe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Dfe=tC(Vs),$m=Dfe.right;tC(Q6).center;class MD extends Map{constructor(t,n=zfe){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(Ife(this,t),n)}delete(t){return super.delete(Lfe(this,t))}}function RD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function Ife({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Lfe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function zfe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function $fe(e=Vs){if(e===Vs)return Z6;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 Z6(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Bfe=Math.sqrt(50),Ufe=Math.sqrt(10),Hfe=Math.sqrt(2);function hy(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>=Bfe?10:i>=Ufe?5:i>=Hfe?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?hy(e,t,n*2):[c,u,f]}function g_(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?hy(t,e,n):hy(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 y_(e,t,n){return t=+t,e=+e,n=+n,hy(e,t,n)[2]}function b_(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?y_(t,e,n):y_(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 J6(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?Z6:$fe(a);r>n;){if(r-n>600){const u=r-n+1,f=t-n+1,m=Math.log(u),h=.5*Math.exp(2*m/3),p=.5*Math.sqrt(m*h*(u-h)/u)*(f-u/2<0?-1:1),y=Math.max(n,Math.floor(t-f*h/u+p)),w=Math.min(r,Math.floor(t+(u-f)*h/u+p));J6(e,t,y,w,a)}const i=e[t];let s=n,c=r;for(lh(e,n,t),a(e[r],i)>0&&lh(e,n,r);s<c;){for(lh(e,s,c),++s,--c;a(e[s],i)<0;)++s;for(;a(e[c],i)>0;)--c}a(e[n],i)===0?lh(e,n,c):(++c,lh(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function lh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Ffe(e,t,n){if(e=Float64Array.from(kfe(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(J6(e,i).subarray(0,i+1)),c=DD(e.subarray(i+1));return s+(c-s)*(a-i)}}function qfe(e,t,n=Q6){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 Kfe(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 ja(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function zo(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 x_=Symbol("implicit");function nC(){var e=new MD,t=[],n=[],r=x_;function a(i){let s=e.get(i);if(s===void 0){if(r!==x_)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)},ja.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 h(){var p=t().length,y=a<r,w=y?a:r,x=y?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=Kfe(p).map(function(E){return w+i*E});return n(y?S.reverse():S)}return e.domain=function(p){return arguments.length?(t(p),h()):t()},e.range=function(p){return arguments.length?([r,a]=p,r=+r,a=+a,h()):[r,a]},e.rangeRound=function(p){return[r,a]=p,r=+r,a=+a,c=!0,h()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(p){return arguments.length?(c=!!p,h()):c},e.padding=function(p){return arguments.length?(u=Math.min(1,f=+p),h()):u},e.paddingInner=function(p){return arguments.length?(u=Math.min(1,p),h()):u},e.paddingOuter=function(p){return arguments.length?(f=+p,h()):f},e.align=function(p){return arguments.length?(m=Math.max(0,Math.min(1,p)),h()):m},e.copy=function(){return rC(t(),[r,a]).round(c).paddingInner(u).paddingOuter(f).align(m)},ja.apply(h(),arguments)}function eU(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return eU(t())},e}function Vfe(){return eU(rC.apply(null,arguments).paddingInner(1))}function aC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function tU(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Bm(){}var Yh=.7,my=1/Yh,tf="\\s*([+-]?\\d+)\\s*",Xh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ci="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yfe=/^#([0-9a-f]{3,8})$/,Xfe=new RegExp(`^rgb\\(${tf},${tf},${tf}\\)$`),Gfe=new RegExp(`^rgb\\(${Ci},${Ci},${Ci}\\)$`),Wfe=new RegExp(`^rgba\\(${tf},${tf},${tf},${Xh}\\)$`),Qfe=new RegExp(`^rgba\\(${Ci},${Ci},${Ci},${Xh}\\)$`),Zfe=new RegExp(`^hsl\\(${Xh},${Ci},${Ci}\\)$`),Jfe=new RegExp(`^hsla\\(${Xh},${Ci},${Ci},${Xh}\\)$`),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(Bm,Nc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:LD,formatHex:LD,formatHex8:ede,formatHsl:tde,formatRgb:zD,toString:zD});function LD(){return this.rgb().formatHex()}function ede(){return this.rgb().formatHex8()}function tde(){return nU(this).formatHsl()}function zD(){return this.rgb().formatRgb()}function Nc(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Yfe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$D(t):n===3?new Nr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Uv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Uv(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=Xfe.exec(e))?new Nr(t[1],t[2],t[3],1):(t=Gfe.exec(e))?new Nr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Wfe.exec(e))?Uv(t[1],t[2],t[3],t[4]):(t=Qfe.exec(e))?Uv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Zfe.exec(e))?HD(t[1],t[2]/100,t[3]/100,1):(t=Jfe.exec(e))?HD(t[1],t[2]/100,t[3]/100,t[4]):ID.hasOwnProperty(e)?$D(ID[e]):e==="transparent"?new Nr(NaN,NaN,NaN,0):null}function $D(e){return new Nr(e>>16&255,e>>8&255,e&255,1)}function Uv(e,t,n,r){return r<=0&&(e=t=n=NaN),new Nr(e,t,n,r)}function nde(e){return e instanceof Bm||(e=Nc(e)),e?(e=e.rgb(),new Nr(e.r,e.g,e.b,e.opacity)):new Nr}function w_(e,t,n,r){return arguments.length===1?nde(e):new Nr(e,t,n,r??1)}function Nr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}aC(Nr,w_,tU(Bm,{brighter(e){return e=e==null?my:Math.pow(my,e),new Nr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yh:Math.pow(Yh,e),new Nr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Nr(fc(this.r),fc(this.g),fc(this.b),py(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:rde,formatRgb:UD,toString:UD}));function BD(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}`}function rde(){return`#${Ql(this.r)}${Ql(this.g)}${Ql(this.b)}${Ql((isNaN(this.opacity)?1:this.opacity)*255)}`}function UD(){const e=py(this.opacity);return`${e===1?"rgb(":"rgba("}${fc(this.r)}, ${fc(this.g)}, ${fc(this.b)}${e===1?")":`, ${e})`}`}function py(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ql(e){return e=fc(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 Ba(e,t,n,r)}function nU(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof Bm||(e=Nc(e)),!e)return new Ba;if(e instanceof Ba)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 Ba(s,c,u,e.opacity)}function ade(e,t,n,r){return arguments.length===1?nU(e):new Ba(e,t,n,r??1)}function Ba(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}aC(Ba,ade,tU(Bm,{brighter(e){return e=e==null?my:Math.pow(my,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yh:Math.pow(Yh,e),new Ba(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 Nr(wS(e>=240?e-240:e+120,a,r),wS(e,a,r),wS(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Ba(FD(this.h),Hv(this.s),Hv(this.l),py(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=py(this.opacity);return`${e===1?"hsl(":"hsla("}${FD(this.h)}, ${Hv(this.s)*100}%, ${Hv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FD(e){return e=(e||0)%360,e<0?e+360:e}function Hv(e){return Math.max(0,Math.min(1,e||0))}function wS(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 ide(e,t){return function(n){return e+n*t}}function ode(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 sde(e){return(e=+e)==1?rU:function(t,n){return n-t?ode(t,n,e):iC(isNaN(t)?n:t)}}function rU(e,t){var n=t-e;return n?ide(e,n):iC(isNaN(e)?t:e)}const vy=(function e(t){var n=sde(t);function r(a,i){var s=n((a=w_(a)).r,(i=w_(i)).r),c=n(a.g,i.g),u=n(a.b,i.b),f=rU(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 lde(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 cde(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ude(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]=xo(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 fde(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function La(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function dde(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]=xo(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var S_=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,SS=new RegExp(S_.source,"g");function hde(e){return function(){return e}}function mde(e){return function(t){return e(t)+""}}function aU(e,t){var n=S_.lastIndex=SS.lastIndex=0,r,a,i,s=-1,c=[],u=[];for(e=e+"",t=t+"";(r=S_.exec(e))&&(a=SS.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:La(r,a)})),n=SS.lastIndex;return n<t.length&&(i=t.slice(n),c[s]?c[s]+=i:c[++s]=i),c.length<2?u[0]?mde(u[0].x):hde(t):(t=u.length,function(f){for(var m=0,h;m<t;++m)c[(h=u[m]).i]=h.x(f);return c.join("")})}function xo(e,t){var n=typeof t,r;return t==null||n==="boolean"?iC(t):(n==="number"?La:n==="string"?(r=Nc(t))?(t=r,vy):aU:t instanceof Nc?vy:t instanceof Date?fde:cde(t)?lde:Array.isArray(t)?ude:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?dde:La)(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,E_={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function iU(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 Fv;function pde(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?E_:iU(t.a,t.b,t.c,t.d,t.e,t.f)}function vde(e){return e==null||(Fv||(Fv=document.createElementNS("http://www.w3.org/2000/svg","g")),Fv.setAttribute("transform",e),!(e=Fv.transform.baseVal.consolidate()))?E_:(e=e.matrix,iU(e.a,e.b,e.c,e.d,e.e,e.f))}function oU(e,t,n,r){function a(f){return f.length?f.pop()+" ":""}function i(f,m,h,p,y,w){if(f!==h||m!==p){var x=y.push("translate(",null,t,null,n);w.push({i:x-4,x:La(f,h)},{i:x-2,x:La(m,p)})}else(h||p)&&y.push("translate("+h+t+p+n)}function s(f,m,h,p){f!==m?(f-m>180?m+=360:m-f>180&&(f+=360),p.push({i:h.push(a(h)+"rotate(",null,r)-2,x:La(f,m)})):m&&h.push(a(h)+"rotate("+m+r)}function c(f,m,h,p){f!==m?p.push({i:h.push(a(h)+"skewX(",null,r)-2,x:La(f,m)}):m&&h.push(a(h)+"skewX("+m+r)}function u(f,m,h,p,y,w){if(f!==h||m!==p){var x=y.push(a(y)+"scale(",null,",",null,")");w.push({i:x-4,x:La(f,h)},{i:x-2,x:La(m,p)})}else(h!==1||p!==1)&&y.push(a(y)+"scale("+h+","+p+")")}return function(f,m){var h=[],p=[];return f=e(f),m=e(m),i(f.translateX,f.translateY,m.translateX,m.translateY,h,p),s(f.rotate,m.rotate,h,p),c(f.skewX,m.skewX,h,p),u(f.scaleX,f.scaleY,m.scaleX,m.scaleY,h,p),f=m=null,function(y){for(var w=-1,x=p.length,S;++w<x;)h[(S=p[w]).i]=S.x(y);return h.join("")}}}var gde=oU(pde,"px, ","px)","deg)"),yde=oU(vde,", ",")",")"),bde=1e-12;function KD(e){return((e=Math.exp(e))+1/e)/2}function xde(e){return((e=Math.exp(e))-1/e)/2}function wde(e){return((e=Math.exp(2*e))-1)/(e+1)}const mg=(function e(t,n,r){function a(i,s){var c=i[0],u=i[1],f=i[2],m=s[0],h=s[1],p=s[2],y=m-c,w=h-u,x=y*y+w*w,S,E;if(x<bde)E=Math.log(p/f)/t,S=function(P){return[c+P*y,u+P*w,f*Math.exp(t*P*E)]};else{var C=Math.sqrt(x),j=(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(j*j+1)-j),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*wde(t*k+T)-xde(T));return[c+K*y,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 Sde(e,t){t===void 0&&(t=e,e=xo);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 Ede(e){return function(){return e}}function gy(e){return+e}var VD=[0,1];function fr(e){return e}function __(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Ede(isNaN(t)?NaN:.5)}function _de(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Ode(e,t,n){var r=e[0],a=e[1],i=t[0],s=t[1];return a<r?(r=__(a,r),i=n(s,i)):(r=__(r,a),i=n(i,s)),function(c){return i(r(c))}}function jde(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]=__(e[s],e[s+1]),i[s]=n(t[s],t[s+1]);return function(c){var u=$m(e,c,1,r)-1;return i[u](a[u](c))}}function Um(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Y0(){var e=VD,t=VD,n=xo,r,a,i,s=fr,c,u,f;function m(){var p=Math.min(e.length,t.length);return s!==fr&&(s=_de(e[0],e[p-1])),c=p>2?jde:Ode,u=f=null,h}function h(p){return p==null||isNaN(p=+p)?i:(u||(u=c(e.map(r),t,n)))(r(s(p)))}return h.invert=function(p){return s(a((f||(f=c(t,e.map(r),La)))(p)))},h.domain=function(p){return arguments.length?(e=Array.from(p,gy),m()):e.slice()},h.range=function(p){return arguments.length?(t=Array.from(p),m()):t.slice()},h.rangeRound=function(p){return t=Array.from(p),n=oC,m()},h.clamp=function(p){return arguments.length?(s=p?!0:fr,m()):s!==fr},h.interpolate=function(p){return arguments.length?(n=p,m()):n},h.unknown=function(p){return arguments.length?(i=p,h):i},function(p,y){return r=p,a=y,m()}}function sC(){return Y0()(fr,fr)}function Cde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function yy(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 Cf(e){return e=yy(Math.abs(e)),e?e[1]:NaN}function Ade(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 Nde(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Tde=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gh(e){if(!(t=Tde.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]})}Gh.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 Pde(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 by;function Mde(e,t){var n=yy(e,t);if(!n)return by=void 0,e.toPrecision(t);var r=n[0],a=n[1],i=a-(by=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")+yy(e,Math.max(0,t+i-1))[0]}function YD(e,t){var n=yy(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:Cde,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:Mde,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 Rde(e){var t=e.grouping===void 0||e.thousands===void 0?GD:Ade(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:Nde(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(h,p){h=Gh(h);var y=h.fill,w=h.align,x=h.sign,S=h.symbol,E=h.zero,C=h.width,j=h.comma,A=h.precision,T=h.trim,N=h.type;N==="n"?(j=!0,N="g"):XD[N]||(A===void 0&&(A=12),T=!0,N="g"),(E||y==="0"&&w==="=")&&(E=!0,y="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(L){var W=P,$=k,Y,R,H;if(N==="c")$=D(L)+$,L="";else{L=+L;var q=L<0||1/L<0;if(L=isNaN(L)?u:D(Math.abs(L),A),T&&(L=Pde(L)),q&&+L==0&&x!=="+"&&(q=!1),W=(q?x==="("?x:c:x==="-"||x==="("?"":x)+W,$=(N==="s"&&!isNaN(L)&&by!==void 0?QD[8+by/3]:"")+$+(q&&x==="("?")":""),K){for(Y=-1,R=L.length;++Y<R;)if(H=L.charCodeAt(Y),48>H||H>57){$=(H===46?a+L.slice(Y+1):L.slice(Y))+$,L=L.slice(0,Y);break}}}j&&!E&&(L=t(L,1/0));var F=W.length+L.length+$.length,V=F<C?new Array(C-F+1).join(y):"";switch(j&&E&&(L=t(V+L,V.length?C-$.length:1/0),V=""),w){case"<":L=W+L+$+V;break;case"=":L=W+V+L+$;break;case"^":L=V.slice(0,F=V.length>>1)+W+L+$+V.slice(F);break;default:L=V+W+L+$;break}return i(L)}return B.toString=function(){return h+""},B}function m(h,p){var y=Math.max(-8,Math.min(8,Math.floor(Cf(p)/3)))*3,w=Math.pow(10,-y),x=f((h=Gh(h),h.type="f",h),{suffix:QD[8+y/3]});return function(S){return x(w*S)}}return{format:f,formatPrefix:m}}var qv,cC,sU;kde({thousands:",",grouping:[3],currency:["$",""]});function kde(e){return qv=Rde(e),cC=qv.format,sU=qv.formatPrefix,qv}function Dde(e){return Math.max(0,-Cf(Math.abs(e)))}function Ide(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Cf(t)/3)))*3-Cf(Math.abs(e)))}function Lde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Cf(t)-Cf(e))+1}function lU(e,t,n,r){var a=b_(e,t,n),i;switch(r=Gh(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=Ide(a,s))&&(r.precision=i),sU(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Lde(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Dde(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 g_(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return lU(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=y_(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 cU(){var e=sC();return e.copy=function(){return Um(e,cU())},ja.apply(e,arguments),ml(e)}function uU(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,gy),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return uU(e).unknown(t)},e=arguments.length?Array.from(e,gy):[0,1],ml(n)}function fU(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 zde(e){return-Math.log(-e)}function $de(e){return-Math.exp(-e)}function Bde(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Ude(e){return e===10?Bde:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Hde(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=Hde(r),i=Ude(r),n()[0]<0?(a=eI(a),i=eI(i),e(zde,$de)):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 h=m<f;h&&([f,m]=[m,f]);let p=a(f),y=a(m),w,x;const S=c==null?10:+c;let E=[];if(!(r%1)&&y-p<S){if(p=Math.floor(p),y=Math.ceil(y),f>0){for(;p<=y;++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<=y;++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=g_(f,m,S))}else E=g_(p,y,Math.min(y-p,S)).map(i);return h?E.reverse():E},t.tickFormat=(c,u)=>{if(c==null&&(c=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Gh(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 h=m/i(Math.round(a(m)));return h*r<r-.5&&(h*=r),h<=f?u(m):""}},t.nice=()=>n(fU(n(),{floor:c=>i(Math.floor(a(c))),ceil:c=>i(Math.ceil(a(c)))})),t}function dU(){const e=uC(Y0()).domain([1,10]);return e.copy=()=>Um(e,dU()).base(e.base()),ja.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 hU(){var e=fC(Y0());return e.copy=function(){return Um(e,hU()).constant(e.constant())},ja.apply(e,arguments)}function rI(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Fde(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function qde(e){return e<0?-e*e:e*e}function dC(e){var t=e(fr,fr),n=1;function r(){return n===1?e(fr,fr):n===.5?e(Fde,qde):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(Y0());return e.copy=function(){return Um(e,hC()).exponent(e.exponent())},ja.apply(e,arguments),e}function Kde(){return hC.apply(null,arguments).exponent(.5)}function aI(e){return Math.sign(e)*e*e}function Vde(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function mU(){var e=sC(),t=[0,1],n=!1,r;function a(i){var s=Vde(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,gy)).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 mU(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},ja.apply(a,arguments),ml(a)}function pU(){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]=qfe(e,s/c);return i}function i(s){return s==null||isNaN(s=+s)?r:t[$m(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(Vs),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 pU().domain(e).range(t).unknown(r)},ja.apply(i,arguments)}function vU(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function s(u){return u!=null&&u<=u?a[$m(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 vU().domain([e,t]).range(a).unknown(i)},ja.apply(ml(s),arguments)}function gU(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[$m(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 gU().domain(e).range(t).unknown(n)},ja.apply(a,arguments)}const ES=new Date,_S=new Date;function Cn(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=>Cn(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)=>(ES.setTime(+i),_S.setTime(+s),e(ES),e(_S),Math.floor(n(ES,_S))),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 xy=Cn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);xy.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Cn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):xy);xy.range;const vo=1e3,wa=vo*60,go=wa*60,Ao=go*24,mC=Ao*7,iI=Ao*30,OS=Ao*365,Zl=Cn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*vo)},(e,t)=>(t-e)/vo,e=>e.getUTCSeconds());Zl.range;const pC=Cn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*vo)},(e,t)=>{e.setTime(+e+t*wa)},(e,t)=>(t-e)/wa,e=>e.getMinutes());pC.range;const vC=Cn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*wa)},(e,t)=>(t-e)/wa,e=>e.getUTCMinutes());vC.range;const gC=Cn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*vo-e.getMinutes()*wa)},(e,t)=>{e.setTime(+e+t*go)},(e,t)=>(t-e)/go,e=>e.getHours());gC.range;const yC=Cn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*go)},(e,t)=>(t-e)/go,e=>e.getUTCHours());yC.range;const Hm=Cn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*wa)/Ao,e=>e.getDate()-1);Hm.range;const X0=Cn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ao,e=>e.getUTCDate()-1);X0.range;const yU=Cn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ao,e=>Math.floor(e/Ao));yU.range;function Vc(e){return Cn(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())*wa)/mC)}const G0=Vc(0),wy=Vc(1),Yde=Vc(2),Xde=Vc(3),Af=Vc(4),Gde=Vc(5),Wde=Vc(6);G0.range;wy.range;Yde.range;Xde.range;Af.range;Gde.range;Wde.range;function Yc(e){return Cn(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 W0=Yc(0),Sy=Yc(1),Qde=Yc(2),Zde=Yc(3),Nf=Yc(4),Jde=Yc(5),ehe=Yc(6);W0.range;Sy.range;Qde.range;Zde.range;Nf.range;Jde.range;ehe.range;const bC=Cn(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=Cn(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 No=Cn(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());No.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Cn(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)});No.range;const To=Cn(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());To.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Cn(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)});To.range;function bU(e,t,n,r,a,i){const s=[[Zl,1,vo],[Zl,5,5*vo],[Zl,15,15*vo],[Zl,30,30*vo],[i,1,wa],[i,5,5*wa],[i,15,15*wa],[i,30,30*wa],[a,1,go],[a,3,3*go],[a,6,6*go],[a,12,12*go],[r,1,Ao],[r,2,2*Ao],[n,1,mC],[t,1,iI],[t,3,3*iI],[e,1,OS]];function c(f,m,h){const p=m<f;p&&([f,m]=[m,f]);const y=h&&typeof h.range=="function"?h:u(f,m,h),w=y?y.range(f,+m+1):[];return p?w.reverse():w}function u(f,m,h){const p=Math.abs(m-f)/h,y=tC(([,,S])=>S).right(s,p);if(y===s.length)return e.every(b_(f/OS,m/OS,h));if(y===0)return xy.every(Math.max(b_(f,m,h),1));const[w,x]=s[p/s[y-1][2]<s[y][2]/p?y-1:y];return w.every(x)}return[c,u]}const[the,nhe]=bU(To,xC,W0,yU,yC,vC),[rhe,ahe]=bU(No,bC,G0,Hm,gC,pC);function jS(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 CS(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 ch(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function ihe(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=uh(a),m=fh(a),h=uh(i),p=fh(i),y=uh(s),w=fh(s),x=uh(c),S=fh(c),E=uh(u),C=fh(u),j={a:H,A:q,b:F,B:V,c:null,d:fI,e:fI,f:Ahe,g:zhe,G:Bhe,H:Ohe,I:jhe,j:Che,L:xU,m:Nhe,M:The,p:I,q:z,Q:mI,s:pI,S:Phe,u:Mhe,U:Rhe,V:khe,w:Dhe,W:Ihe,x:null,X:null,y:Lhe,Y:$he,Z:Uhe,"%":hI},A={a:X,A:Z,b:ee,B:se,c:null,d:dI,e:dI,f:Khe,g:tme,G:rme,H:Hhe,I:Fhe,j:qhe,L:SU,m:Vhe,M:Yhe,p:ie,q:re,Q:mI,s:pI,S:Xhe,u:Ghe,U:Whe,V:Qhe,w:Zhe,W:Jhe,x:null,X:null,y:eme,Y:nme,Z:ame,"%":hI},T={a:K,A:B,b:L,B:W,c:$,d:cI,e:cI,f:whe,g:lI,G:sI,H:uI,I:uI,j:ghe,L:xhe,m:vhe,M:yhe,p:D,q:phe,Q:Ehe,s:_he,S:bhe,u:uhe,U:fhe,V:dhe,w:che,W:hhe,x:Y,X:R,y:lI,Y:sI,Z:mhe,"%":She};j.x=N(n,j),j.X=N(r,j),j.c=N(t,j),A.x=N(n,A),A.X=N(r,A),A.c=N(t,A);function N(J,ce){return function(me){var ne=[],ye=-1,xe=0,Ie=J.length,Pe,Ve,mn;for(me instanceof Date||(me=new Date(+me));++ye<Ie;)J.charCodeAt(ye)===37&&(ne.push(J.slice(xe,ye)),(Ve=oI[Pe=J.charAt(++ye)])!=null?Pe=J.charAt(++ye):Ve=Pe==="e"?" ":"0",(mn=ce[Pe])&&(Pe=mn(me,Ve)),ne.push(Pe),xe=ye+1);return ne.push(J.slice(xe,ye)),ne.join("")}}function P(J,ce){return function(me){var ne=ch(1900,void 0,1),ye=k(ne,J,me+="",0),xe,Ie;if(ye!=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(ce&&!("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?(xe=CS(ch(ne.y,0,1)),Ie=xe.getUTCDay(),xe=Ie>4||Ie===0?Sy.ceil(xe):Sy(xe),xe=X0.offset(xe,(ne.V-1)*7),ne.y=xe.getUTCFullYear(),ne.m=xe.getUTCMonth(),ne.d=xe.getUTCDate()+(ne.w+6)%7):(xe=jS(ch(ne.y,0,1)),Ie=xe.getDay(),xe=Ie>4||Ie===0?wy.ceil(xe):wy(xe),xe=Hm.offset(xe,(ne.V-1)*7),ne.y=xe.getFullYear(),ne.m=xe.getMonth(),ne.d=xe.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?CS(ch(ne.y,0,1)).getUTCDay():jS(ch(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,CS(ne)):jS(ne)}}function k(J,ce,me,ne){for(var ye=0,xe=ce.length,Ie=me.length,Pe,Ve;ye<xe;){if(ne>=Ie)return-1;if(Pe=ce.charCodeAt(ye++),Pe===37){if(Pe=ce.charAt(ye++),Ve=T[Pe in oI?ce.charAt(ye++):Pe],!Ve||(ne=Ve(J,me,ne))<0)return-1}else if(Pe!=me.charCodeAt(ne++))return-1}return ne}function D(J,ce,me){var ne=f.exec(ce.slice(me));return ne?(J.p=m.get(ne[0].toLowerCase()),me+ne[0].length):-1}function K(J,ce,me){var ne=y.exec(ce.slice(me));return ne?(J.w=w.get(ne[0].toLowerCase()),me+ne[0].length):-1}function B(J,ce,me){var ne=h.exec(ce.slice(me));return ne?(J.w=p.get(ne[0].toLowerCase()),me+ne[0].length):-1}function L(J,ce,me){var ne=E.exec(ce.slice(me));return ne?(J.m=C.get(ne[0].toLowerCase()),me+ne[0].length):-1}function W(J,ce,me){var ne=x.exec(ce.slice(me));return ne?(J.m=S.get(ne[0].toLowerCase()),me+ne[0].length):-1}function $(J,ce,me){return k(J,t,ce,me)}function Y(J,ce,me){return k(J,n,ce,me)}function R(J,ce,me){return k(J,r,ce,me)}function H(J){return s[J.getDay()]}function q(J){return i[J.getDay()]}function F(J){return u[J.getMonth()]}function V(J){return c[J.getMonth()]}function I(J){return a[+(J.getHours()>=12)]}function z(J){return 1+~~(J.getMonth()/3)}function X(J){return s[J.getUTCDay()]}function Z(J){return i[J.getUTCDay()]}function ee(J){return u[J.getUTCMonth()]}function se(J){return c[J.getUTCMonth()]}function ie(J){return a[+(J.getUTCHours()>=12)]}function re(J){return 1+~~(J.getUTCMonth()/3)}return{format:function(J){var ce=N(J+="",j);return ce.toString=function(){return J},ce},parse:function(J){var ce=P(J+="",!1);return ce.toString=function(){return J},ce},utcFormat:function(J){var ce=N(J+="",A);return ce.toString=function(){return J},ce},utcParse:function(J){var ce=P(J+="",!0);return ce.toString=function(){return J},ce}}}var oI={"-":"",_:" ",0:"0"},$n=/^\s*\d+/,ohe=/^%/,she=/[\\^$*+?|[\]().{}]/g;function ct(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 lhe(e){return e.replace(she,"\\$&")}function uh(e){return new RegExp("^(?:"+e.map(lhe).join("|")+")","i")}function fh(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function che(e,t,n){var r=$n.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function uhe(e,t,n){var r=$n.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function fhe(e,t,n){var r=$n.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function dhe(e,t,n){var r=$n.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function hhe(e,t,n){var r=$n.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function sI(e,t,n){var r=$n.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function lI(e,t,n){var r=$n.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mhe(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 phe(e,t,n){var r=$n.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function vhe(e,t,n){var r=$n.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=$n.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ghe(e,t,n){var r=$n.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=$n.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function yhe(e,t,n){var r=$n.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function bhe(e,t,n){var r=$n.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function xhe(e,t,n){var r=$n.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function whe(e,t,n){var r=$n.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function She(e,t,n){var r=ohe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ehe(e,t,n){var r=$n.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function _he(e,t,n){var r=$n.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function fI(e,t){return ct(e.getDate(),t,2)}function Ohe(e,t){return ct(e.getHours(),t,2)}function jhe(e,t){return ct(e.getHours()%12||12,t,2)}function Che(e,t){return ct(1+Hm.count(No(e),e),t,3)}function xU(e,t){return ct(e.getMilliseconds(),t,3)}function Ahe(e,t){return xU(e,t)+"000"}function Nhe(e,t){return ct(e.getMonth()+1,t,2)}function The(e,t){return ct(e.getMinutes(),t,2)}function Phe(e,t){return ct(e.getSeconds(),t,2)}function Mhe(e){var t=e.getDay();return t===0?7:t}function Rhe(e,t){return ct(G0.count(No(e)-1,e),t,2)}function wU(e){var t=e.getDay();return t>=4||t===0?Af(e):Af.ceil(e)}function khe(e,t){return e=wU(e),ct(Af.count(No(e),e)+(No(e).getDay()===4),t,2)}function Dhe(e){return e.getDay()}function Ihe(e,t){return ct(wy.count(No(e)-1,e),t,2)}function Lhe(e,t){return ct(e.getFullYear()%100,t,2)}function zhe(e,t){return e=wU(e),ct(e.getFullYear()%100,t,2)}function $he(e,t){return ct(e.getFullYear()%1e4,t,4)}function Bhe(e,t){var n=e.getDay();return e=n>=4||n===0?Af(e):Af.ceil(e),ct(e.getFullYear()%1e4,t,4)}function Uhe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ct(t/60|0,"0",2)+ct(t%60,"0",2)}function dI(e,t){return ct(e.getUTCDate(),t,2)}function Hhe(e,t){return ct(e.getUTCHours(),t,2)}function Fhe(e,t){return ct(e.getUTCHours()%12||12,t,2)}function qhe(e,t){return ct(1+X0.count(To(e),e),t,3)}function SU(e,t){return ct(e.getUTCMilliseconds(),t,3)}function Khe(e,t){return SU(e,t)+"000"}function Vhe(e,t){return ct(e.getUTCMonth()+1,t,2)}function Yhe(e,t){return ct(e.getUTCMinutes(),t,2)}function Xhe(e,t){return ct(e.getUTCSeconds(),t,2)}function Ghe(e){var t=e.getUTCDay();return t===0?7:t}function Whe(e,t){return ct(W0.count(To(e)-1,e),t,2)}function EU(e){var t=e.getUTCDay();return t>=4||t===0?Nf(e):Nf.ceil(e)}function Qhe(e,t){return e=EU(e),ct(Nf.count(To(e),e)+(To(e).getUTCDay()===4),t,2)}function Zhe(e){return e.getUTCDay()}function Jhe(e,t){return ct(Sy.count(To(e)-1,e),t,2)}function eme(e,t){return ct(e.getUTCFullYear()%100,t,2)}function tme(e,t){return e=EU(e),ct(e.getUTCFullYear()%100,t,2)}function nme(e,t){return ct(e.getUTCFullYear()%1e4,t,4)}function rme(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Nf(e):Nf.ceil(e),ct(e.getUTCFullYear()%1e4,t,4)}function ame(){return"+0000"}function hI(){return"%"}function mI(e){return+e}function pI(e){return Math.floor(+e/1e3)}var Lu,_U,OU;ime({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 ime(e){return Lu=ihe(e),_U=Lu.format,Lu.parse,OU=Lu.utcFormat,Lu.utcParse,Lu}function ome(e){return new Date(e)}function sme(e){return e instanceof Date?+e:+new Date(+e)}function wC(e,t,n,r,a,i,s,c,u,f){var m=sC(),h=m.invert,p=m.domain,y=f(".%L"),w=f(":%S"),x=f("%I:%M"),S=f("%I %p"),E=f("%a %d"),C=f("%b %d"),j=f("%B"),A=f("%Y");function T(N){return(u(N)<N?y:c(N)<N?w:s(N)<N?x:i(N)<N?S:r(N)<N?a(N)<N?E:C:n(N)<N?j:A)(N)}return m.invert=function(N){return new Date(h(N))},m.domain=function(N){return arguments.length?p(Array.from(N,sme)):p().map(ome)},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(fU(P,N)):m},m.copy=function(){return Um(m,wC(e,t,n,r,a,i,s,c,u,f))},m}function lme(){return ja.apply(wC(rhe,ahe,No,bC,G0,Hm,gC,pC,Zl,_U).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function cme(){return ja.apply(wC(the,nhe,To,xC,W0,X0,yC,vC,Zl,OU).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Q0(){var e=0,t=1,n,r,a,i,s=fr,c=!1,u;function f(h){return h==null||isNaN(h=+h)?u:s(a===0?.5:(h=(i(h)-n)*a,c?Math.max(0,Math.min(1,h)):h))}f.domain=function(h){return arguments.length?([e,t]=h,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),f):[e,t]},f.clamp=function(h){return arguments.length?(c=!!h,f):c},f.interpolator=function(h){return arguments.length?(s=h,f):s};function m(h){return function(p){var y,w;return arguments.length?([y,w]=p,s=h(y,w),f):[s(0),s(1)]}}return f.range=m(xo),f.rangeRound=m(oC),f.unknown=function(h){return arguments.length?(u=h,f):u},function(h){return i=h,n=h(e),r=h(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 jU(){var e=ml(Q0()(fr));return e.copy=function(){return pl(e,jU())},zo.apply(e,arguments)}function CU(){var e=uC(Q0()).domain([1,10]);return e.copy=function(){return pl(e,CU()).base(e.base())},zo.apply(e,arguments)}function AU(){var e=fC(Q0());return e.copy=function(){return pl(e,AU()).constant(e.constant())},zo.apply(e,arguments)}function SC(){var e=dC(Q0());return e.copy=function(){return pl(e,SC()).exponent(e.exponent())},zo.apply(e,arguments)}function ume(){return SC.apply(null,arguments).exponent(.5)}function NU(){var e=[],t=fr;function n(r){if(r!=null&&!isNaN(r=+r))return t(($m(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(Vs),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)=>Ffe(e,i/r))},n.copy=function(){return NU(t).domain(e)},zo.apply(n,arguments)}function Z0(){var e=0,t=.5,n=1,r=1,a,i,s,c,u,f=fr,m,h=!1,p;function y(x){return isNaN(x=+x)?p:(x=.5+((x=+m(x))-i)*(r*x<r*i?c:u),f(h?Math.max(0,Math.min(1,x)):x))}y.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,y):[e,t,n]},y.clamp=function(x){return arguments.length?(h=!!x,y):h},y.interpolator=function(x){return arguments.length?(f=x,y):f};function w(x){return function(S){var E,C,j;return arguments.length?([E,C,j]=S,f=Sde(x,[E,C,j]),y):[f(0),f(.5),f(1)]}}return y.range=w(xo),y.rangeRound=w(oC),y.unknown=function(x){return arguments.length?(p=x,y):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,y}}function TU(){var e=ml(Z0()(fr));return e.copy=function(){return pl(e,TU())},zo.apply(e,arguments)}function PU(){var e=uC(Z0()).domain([.1,1,10]);return e.copy=function(){return pl(e,PU()).base(e.base())},zo.apply(e,arguments)}function MU(){var e=fC(Z0());return e.copy=function(){return pl(e,MU()).constant(e.constant())},zo.apply(e,arguments)}function EC(){var e=dC(Z0());return e.copy=function(){return pl(e,EC()).exponent(e.exponent())},zo.apply(e,arguments)}function fme(){return EC.apply(null,arguments).exponent(.5)}const Eh=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:rC,scaleDiverging:TU,scaleDivergingLog:PU,scaleDivergingPow:EC,scaleDivergingSqrt:fme,scaleDivergingSymlog:MU,scaleIdentity:uU,scaleImplicit:x_,scaleLinear:cU,scaleLog:dU,scaleOrdinal:nC,scalePoint:Vfe,scalePow:hC,scaleQuantile:pU,scaleQuantize:vU,scaleRadial:mU,scaleSequential:jU,scaleSequentialLog:CU,scaleSequentialPow:SC,scaleSequentialQuantile:NU,scaleSequentialSqrt:ume,scaleSequentialSymlog:AU,scaleSqrt:Kde,scaleSymlog:hU,scaleThreshold:gU,scaleTime:lme,scaleUtc:cme,tickFormat:lU},Symbol.toStringTag,{value:"Module"}));function dme(e){if(e in Eh)return Eh[e]();var t="scale".concat(Cm(e));if(t in Eh)return Eh[t]()}function vI(e,t,n){if(typeof e=="function")return e.copy().domain(t).range(n);if(e!=null){var r=dme(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 hme(e){return"scale".concat(Cm(e))}function mme(e){return hme(e)in Eh}var RU=(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 mme(r)?r:"point"}};function pme(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 kU(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=pme(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 vme(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):kU(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 Ey(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){gme(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 gme(e,t,n){return(t=yme(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yme(e){var t=bme(e,"string");return typeof t=="symbol"?t:t+""}function bme(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"],bn={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"},DU=(e,t)=>e.cartesianAxis.xAxis[t],$o=(e,t)=>{var n=DU(e,t);return n??bn},xn={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:Pm},IU=(e,t)=>e.cartesianAxis.yAxis[t],Bo=(e,t)=>{var n=IU(e,t);return n??xn},xme={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:""},OC=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??xme},Wt=(e,t,n)=>{switch(t){case"xAxis":return $o(e,n);case"yAxis":return Bo(e,n);case"zAxis":return OC(e,n);case"angleAxis":return Wj(e,n);case"radiusAxis":return Qj(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},wme=(e,t,n)=>{switch(t){case"xAxis":return $o(e,n);case"yAxis":return Bo(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},ed=(e,t,n)=>{switch(t){case"xAxis":return $o(e,n);case"yAxis":return Bo(e,n);case"angleAxis":return Wj(e,n);case"radiusAxis":return Qj(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},LU=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function jC(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 J0=e=>e.graphicalItems.cartesianItems,Sme=oe([Ut,zm],jC),CC=(e,t,n)=>e.filter(n).filter(r=>(t==null?void 0:t.includeHidden)===!0?!0:!r.hide),Fm=oe([J0,Wt,Sme],CC,{memoizeOptions:{resultEqualityCheck:V0}}),zU=oe([Fm],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(q0)),$U=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),Eme=oe([Fm],$U),AC=e=>e.map(t=>t.data).filter(Boolean).flat(1),_me=oe([Fm],AC,{memoizeOptions:{resultEqualityCheck:V0}}),NC=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:a}=t;return e.length>0?e:n.slice(r,a+1)},TC=oe([_me,Fj],NC),PC=(e,t,n)=>(t==null?void 0:t.dataKey)!=null?e.map(r=>({value:xt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(a=>({value:xt(a,r)}))):e.map(r=>({value:r})),qm=oe([TC,Wt,Fm],PC);function nf(e){if(Ni(e)||e instanceof Date){var t=Number(e);if(at(t))return t}}function yI(e){if(Array.isArray(e)){var t=[nf(e[0]),nf(e[1])];return ji(t)?t:void 0}var n=nf(e);if(n!=null)return[n,n]}function Po(e){return e.map(nf).filter(Ar)}function Ome(e,t){var n=nf(e),r=nf(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var jme=oe([qm],e=>e==null?void 0:e.map(t=>t.value).sort(Ome));function BU(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Cme(e,t,n){return!n||typeof t!="number"||Ai(t)?[]:n.length?Po(n.flatMap(r=>{var a=xt(e,r.dataKey),i,s;if(Array.isArray(a)?[i,s]=a:i=s=a,!(!at(i)||!at(s)))return[t-i,t+s]})):[]}var An=e=>{var t=zn(e),n=Jf(e);return ed(e,t,n)},Km=oe([An],e=>e==null?void 0:e.dataKey),Ame=oe([zU,Fj,An],G6),UU=(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(Jj);return[c,{stackedData:ple(e,m,n),graphicalItems:f}]}))},j_=oe([Ame,zU,Lm,H6],UU),HU=(e,t,n,r)=>{var{dataStartIndex:a,dataEndIndex:i}=t;if(r==null&&n!=="zAxis"){var s=xle(e,a,i);if(!(s!=null&&s[0]===0&&s[1]===0))return s}},Nme=oe([Wt],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=Po(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([Wt],MC),kC=oe([RC,Nme],N6),Tme=oe([j_,Lo,Ut,kC],HU,{memoizeOptions:{resultEqualityCheck:K0}}),eb=e=>e.errorBars,Pme=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>BU(n,r)),_y=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,h=(f=r[u.id])===null||f===void 0?void 0:f.filter(E=>BU(a,E)),p=xt(c,(m=t.dataKey)!==null&&m!==void 0?m:u.dataKey),y=Cme(c,p,h);if(y.length>=2){var w=Math.min(...y),x=Math.max(...y);(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(xt(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]))}),at(i)&&at(s))return[i,s]},Mme=oe([TC,Wt,Eme,eb,Ut],DC,{memoizeOptions:{resultEqualityCheck:K0}});function Rme(e){var{value:t}=e;if(Ni(t)||t instanceof Date)return t}var kme=(e,t,n)=>{var r=e.map(Rme).filter(a=>a!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&ZB(r))?A6(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},FU=e=>e.referenceElements.dots,td=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),Dme=oe([FU,Ut,zm],td),qU=e=>e.referenceElements.areas,Ime=oe([qU,Ut,zm],td),KU=e=>e.referenceElements.lines,Lme=oe([KU,Ut,zm],td),VU=(e,t)=>{if(e!=null){var n=Po(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},zme=oe(Dme,Ut,VU),YU=(e,t)=>{if(e!=null){var n=Po(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)]}},$me=oe([Ime,Ut],YU);function Bme(e){var t;if(e.x!=null)return Po([e.x]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.x);return n==null||n.length===0?[]:Po(n)}function Ume(e){var t;if(e.y!=null)return Po([e.y]);var n=(t=e.segment)===null||t===void 0?void 0:t.map(r=>r.y);return n==null||n.length===0?[]:Po(n)}var XU=(e,t)=>{if(e!=null){var n=e.flatMap(r=>t==="xAxis"?Bme(r):Ume(r));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},Hme=oe([Lme,Ut],XU),Fme=oe(zme,Hme,$me,(e,t,n)=>_y(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?_y(r,i,a):_y(i,a);return yfe(t,f,e.allowDataOverflow)},qme=oe([Wt,RC,kC,Tme,Mme,Fme,ut,Ut],IC,{memoizeOptions:{resultEqualityCheck:K0}}),Kme=[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=ko(t,i);if(f&&c==null){var m;return A6(0,(m=n==null?void 0:n.length)!==null&&m!==void 0?m:0)}return u==="category"?kme(r,e,f):a==="expand"?Kme:s}},zC=oe([Wt,ut,TC,qm,Lm,Ut,qme],LC),vl=oe([Wt,LU,Yj],RU),$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&&ji(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&&ji(e))return CD(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&ji(e))return AD(e,t.tickCount,t.allowDecimals,"adaptive")}}},BC=oe([zC,ed,vl],$C),UC=(e,t,n,r)=>{if(r!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&ji(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},Vme=oe([Wt,zC,BC,Ut],UC),Yme=oe(qm,Wt,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(Po(e.map(h=>h.value))).sort((h,p)=>h-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}}),GU=oe(Yme,ut,U6,jn,(e,t,n,r,a)=>a,(e,t,n,r,a)=>{if(!at(e))return 0;var i=t==="vertical"?r.height:r.width;if(a==="gap")return e*i/2;if(a==="no-gap"){var s=ar(n,e*i),c=e*i/2;return c-s-(c-s)/i*s}return 0}),Xme=(e,t,n)=>{var r=$o(e,t);return r==null||typeof r.padding!="string"?0:GU(e,"xAxis",t,n,r.padding)},Gme=(e,t,n)=>{var r=Bo(e,t);return r==null||typeof r.padding!="string"?0:GU(e,"yAxis",t,n,r.padding)},Wme=oe($o,Xme,(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}}),Qme=oe(Bo,Gme,(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}}),Zme=oe([jn,Wme,D0,k0,(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]}),Jme=oe([jn,ut,Qme,D0,k0,(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]}),Vm=(e,t,n,r)=>{var a;switch(t){case"xAxis":return Zme(e,n,r);case"yAxis":return Jme(e,n,r);case"zAxis":return(a=OC(e,n))===null||a===void 0?void 0:a.range;case"angleAxis":return V6(e);case"radiusAxis":return Y6(e,n);default:return}},WU=oe([Wt,Vm],U0),epe=oe([vl,Vme],W6),HC=oe([Wt,vl,epe,WU],_C),QU=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:a,scale:i}=n,s=ko(e,r);if(s&&(a==="number"||i!=="auto"))return t.map(c=>c.value)}},FC=oe([ut,qm,ed,Ut],QU),tb=oe([HC],eC);oe([HC],vme);oe([HC,jme],kU);oe([Fm,eb,Ut],Pme);function ZU(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var nb=(e,t)=>t,rb=(e,t,n)=>n,tpe=oe(M0,nb,rb,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(ZU)),npe=oe(R0,nb,rb,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(ZU)),JU=(e,t)=>({width:e.width,height:t.height}),rpe=(e,t)=>{var n=typeof t.width=="number"?t.width:Pm;return{width:n,height:e.height}},eH=oe(jn,$o,JU),ape=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},ipe=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},ope=oe(Io,jn,tpe,nb,rb,(e,t,n,r,a)=>{var i={},s;return n.forEach(c=>{var u=JU(t,c);s==null&&(s=ape(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}),spe=oe(Do,jn,npe,nb,rb,(e,t,n,r,a)=>{var i={},s;return n.forEach(c=>{var u=rpe(t,c);s==null&&(s=ipe(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}),lpe=(e,t)=>{var n=$o(e,t);if(n!=null)return ope(e,n.orientation,n.mirror)},cpe=oe([jn,$o,lpe,(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}}}),upe=(e,t)=>{var n=Bo(e,t);if(n!=null)return spe(e,n.orientation,n.mirror)},fpe=oe([jn,Bo,upe,(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}}}),tH=oe(jn,Bo,(e,t)=>{var n=typeof t.width=="number"?t.width:Pm;return{width:n,height:e.height}}),bI=(e,t,n)=>{switch(t){case"xAxis":return eH(e,n).width;case"yAxis":return tH(e,n).height;default:return}},nH=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:a,type:i,dataKey:s}=n,c=ko(e,r),u=t.map(f=>f.value);if(s&&c&&i==="category"&&a&&ZB(u))return u}},qC=oe([ut,qm,Wt,Ut],nH),xI=oe([ut,wme,vl,tb,qC,FC,Vm,BC,Ut],(e,t,n,r,a,i,s,c,u)=>{if(t!=null){var f=ko(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}}}),dpe=(e,t,n,r,a,i,s,c,u)=>{if(!(t==null||r==null)){var f=ko(e,u),{type:m,ticks:h,tickCount:p}=t,y=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,w=m==="category"&&r.bandwidth?r.bandwidth()/y:0;w=u==="angleAxis"&&i!=null&&i.length>=2?kn(i[0]-i[1])*2*w:w;var x=h||a;return x?x.map((S,E)=>{var C=s?s.indexOf(S):S,j=r.map(C);return at(j)?{index:E,coordinate:j+w,value:S,offset:w}:null}).filter(Ar):f&&c?c.map((S,E)=>{var C=r.map(S);return at(C)?{coordinate:C+w,value:S,index:E,offset:w}:null}).filter(Ar):r.ticks?r.ticks(p).map((S,E)=>{var C=r.map(S);return at(C)?{coordinate:C+w,value:S,index:E,offset:w}:null}).filter(Ar):r.domain().map((S,E)=>{var C=r.map(S);return at(C)?{coordinate:C+w,value:s?s[S]:S,index:E,offset:w}:null}).filter(Ar)}},rH=oe([ut,ed,vl,tb,BC,Vm,qC,FC,Ut],dpe),hpe=(e,t,n,r,a,i,s)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var c=ko(e,s),{tickCount:u}=t,f=0;return f=s==="angleAxis"&&(r==null?void 0:r.length)>=2?kn(r[0]-r[1])*2*f:f,c&&i?i.map((m,h)=>{var p=n.map(m);return at(p)?{coordinate:p+f,value:m,index:h,offset:f}:null}).filter(Ar):n.ticks?n.ticks(u).map((m,h)=>{var p=n.map(m);return at(p)?{coordinate:p+f,value:m,index:h,offset:f}:null}).filter(Ar):n.domain().map((m,h)=>{var p=n.map(m);return at(p)?{coordinate:p+f,value:a?a[m]:m,index:h,offset:f}:null}).filter(Ar)}},al=oe([ut,ed,tb,Vm,qC,FC,Ut],hpe),il=oe(Wt,tb,(e,t)=>{if(!(e==null||t==null))return Ey(Ey({},e),{},{scale:t})}),mpe=oe([Wt,vl,zC,WU],_C),ppe=oe([mpe],eC);oe((e,t,n)=>OC(e,n),ppe,(e,t)=>{if(!(e==null||t==null))return Ey(Ey({},e),{},{scale:t})});var vpe=oe([ut,M0,R0],(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}}),gpe=(e,t,n)=>{var r;return(r=e.renderedTicks[t])===null||r===void 0?void 0:r[n]};oe([gpe],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 aH=e=>e.options.defaultTooltipEventType,iH=e=>e.options.validateTooltipEventTypes;function oH(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=aH(e),r=iH(e);return oH(t,n,r)}function ype(e){return je(t=>KC(t,e))}var sH=(e,t)=>{var n,r=Number(t);if(!(Ai(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},bpe=e=>e.tooltip.settings,Ms={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},xpe={itemInteraction:{click:Ms,hover:Ms},axisInteraction:{click:Ms,hover:Ms},keyboardInteraction:Ms,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}},lH=or({name:"tooltip",initialState:xpe,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:Pt()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,a=xa(e).tooltipItemPayloads.indexOf(n);a>-1&&(e.tooltipItemPayloads[a]=r)},prepare:Pt()},removeTooltipEntrySettings:{reducer(e,t){var n=xa(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:Pt()},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:wpe,replaceTooltipEntrySettings:Spe,removeTooltipEntrySettings:Epe,setTooltipSettingsState:_pe,setActiveMouseOverItemIndex:cH,mouseLeaveItem:Ope,mouseLeaveChart:uH,setActiveClickItemIndex:jpe,setMouseOverAxisIndex:fH,setMouseClickAxisIndex:Cpe,setSyncInteraction:C_,setKeyboardInteraction:Oy}=lH.actions,Ape=lH.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 Kv(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){Npe(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 Npe(e,t,n){return(t=Tpe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tpe(e){var t=Ppe(e,"string");return typeof t=="symbol"?t:t+""}function Ppe(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 Mpe(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function Rpe(e){return e.index!=null}var dH=(e,t,n,r)=>{if(t==null)return Ms;var a=Mpe(e,t,n);if(a==null)return Ms;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(Rpe(a)){if(i)return Kv(Kv({},a),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return Kv(Kv({},Ms),{},{coordinate:a.coordinate})};function kpe(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 Dpe(e,t){var n=kpe(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 Ipe(e,t,n){if(n==null||t==null)return!0;var r=xt(e,t);return r==null||!ji(n)?!0:Dpe(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(!at(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||Ipe(f,n,r)?String(u):null},hH=(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}}}},mH=(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})},pH=e=>e.options.tooltipPayloadSearcher,nd=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){Lpe(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 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){if(typeof e=="string"||typeof e=="number")return e}function Upe(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function Hpe(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 Fpe(e){if(!(e==null||typeof e!="object")){var t="name"in e?Bpe(e.name):void 0,n="unit"in e?Upe(e.unit):void 0,r="dataKey"in e?Hpe(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 qpe(e,t){return e??t}var vH=(e,t,n,r,a,i,s)=>{if(!(t==null||i==null)){var{chartData:c,computedData:u,dataStartIndex:f,dataEndIndex:m}=n,h=[];return e.reduce((p,y)=>{var w,{dataDefinedOnItem:x,settings:S}=y,E=qpe(x,c),C=Array.isArray(E)?X8(E,f,m):E,j=(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=JB(C,r,a):T=i(C,t,u,A),Array.isArray(T))T.forEach(P=>{var k,D,K=Fpe(P),B=K==null?void 0:K.name,L=K==null?void 0:K.dataKey,W=K==null?void 0:K.payload,$=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:$,dataKey:L,payload:W,value:xt(W,L),name:B==null?void 0:String(B)}))});else{var N;p.push(pk({tooltipEntrySettings:S,dataKey:j,payload:T,value:xt(T,j),name:(N=xt(T,A))!==null&&N!==void 0?N:S==null?void 0:S.name}))}return p},h)}},YC=oe([An,LU,Yj],RU),Kpe=oe([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),Vpe=oe([zn,Jf],jC),rd=oe([Kpe,An,Vpe],CC,{memoizeOptions:{resultEqualityCheck:V0}}),Ype=oe([rd],e=>e.filter(q0)),Xpe=oe([rd],AC,{memoizeOptions:{resultEqualityCheck:V0}}),ad=oe([Xpe,Lo],NC),Gpe=oe([Ype,Lo,An],G6),XC=oe([ad,An,rd],PC),gH=oe([An],MC),Wpe=oe([An],e=>e.allowDataOverflow),yH=oe([gH,Wpe],N6),Qpe=oe([rd],e=>e.filter(q0)),Zpe=oe([Gpe,Qpe,Lm,H6],UU),Jpe=oe([Zpe,Lo,zn,yH],HU),eve=oe([rd],$U),tve=oe([ad,An,eve,eb,zn],DC,{memoizeOptions:{resultEqualityCheck:K0}}),nve=oe([FU,zn,Jf],td),rve=oe([nve,zn],VU),ave=oe([qU,zn,Jf],td),ive=oe([ave,zn],YU),ove=oe([KU,zn,Jf],td),sve=oe([ove,zn],XU),lve=oe([rve,sve,ive],_y),cve=oe([An,gH,yH,Jpe,tve,lve,ut,zn],IC),Ym=oe([An,ut,ad,XC,Lm,zn,cve],LC),uve=oe([Ym,An,YC],$C),fve=oe([An,Ym,uve,zn],UC),bH=e=>{var t=zn(e),n=Jf(e),r=!1;return Vm(e,t,n,r)},xH=oe([An,bH],U0),dve=oe([An,YC,fve,xH],_C),wH=oe([dve],eC),hve=oe([ut,XC,An,zn],nH),mve=oe([ut,XC,An,zn],QU),pve=(e,t,n,r,a,i,s,c)=>{if(t){var{type:u}=t,f=ko(e,c);if(r){var m=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,h=u==="category"&&r.bandwidth?r.bandwidth()/m:0;return h=c==="angleAxis"&&a!=null&&(a==null?void 0:a.length)>=2?kn(a[0]-a[1])*2*h:h,f&&s?s.map((p,y)=>{var w=r.map(p);return at(w)?{coordinate:w+h,value:p,index:y,offset:h}:null}).filter(Ar):r.domain().map((p,y)=>{var w=r.map(p);return at(w)?{coordinate:w+h,value:i?i[p]:p,index:y,offset:h}:null}).filter(Ar)}}},Uo=oe([ut,An,YC,wH,bH,hve,mve,zn],pve),GC=oe([aH,iH,bpe],(e,t,n)=>oH(n.shared,e,t)),SH=e=>e.tooltip.settings.trigger,WC=e=>e.tooltip.settings.defaultIndex,Xm=oe([nd,GC,SH,WC],dH),ol=oe([Xm,ad,Km,Ym],VC),EH=oe([Uo,ol],sH),QC=oe([Xm],e=>{if(e)return e.dataKey}),_H=oe([Xm],e=>{if(e)return e.graphicalItemId}),OH=oe([nd,GC,SH,WC],mH),vve=oe([Do,Io,ut,jn,Uo,WC,OH],hH),gve=oe([Xm,vve],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),yve=oe([Xm],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),bve=oe([OH,ol,Lo,Km,EH,pH,GC],vH),xve=oe([bve],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function OI(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 jI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OI(Object(n),!0).forEach(function(r){wve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wve(e,t,n){return(t=Sve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sve(e){var t=Eve(e,"string");return typeof t=="symbol"?t:t+""}function Eve(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 _ve=()=>je(An),Ove=()=>{var e=_ve(),t=je(Uo),n=je(wH);return _f(!e||!n?void 0:jI(jI({},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 zu(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){jve(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 jve(e,t,n){return(t=Cve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cve(e){var t=Ave(e,"string");return typeof t=="symbol"?t:t+""}function Ave(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 Nve=(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}},Tve=(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 zu(zu(zu({},r),cn(r.cx,r.cy,s,i)),{},{angle:i,radius:s})}var c=a.coordinate,{angle:u}=r;return zu(zu(zu({},r),cn(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 Pve(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 jH=(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,h,p,y=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?(h=n[0])===null||h===void 0?void 0:h.coordinate:(p=n[c+1])===null||p===void 0?void 0:p.coordinate,S=void 0;if(!(y==null||w==null||x==null))if(kn(w-y)!==kn(x-w)){var E=[];if(kn(x-w)===kn(a[1]-a[0])){S=x;var C=w+a[1]-a[0];E[0]=Math.min(C,(C+y)/2),E[1]=Math.max(C,(C+y)/2)}else{S=y;var j=x+a[1]-a[0];E[0]=Math.min(w,(j+w)/2),E[1]=Math.max(w,(j+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(y,x),P=Math.max(y,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],L=t[D-1];if(D===0&&B!=null&&e<=(K.coordinate+B.coordinate)/2||D===s-1&&L!=null&&e>(K.coordinate+L.coordinate)/2||D>0&&D<s-1&&L!=null&&B!=null&&e>(K.coordinate+L.coordinate)/2&&e<=(K.coordinate+B.coordinate)/2)return K.index}}return-1},Mve=()=>je(Yj),ZC=(e,t)=>t,CH=(e,t,n)=>n,JC=(e,t,n,r)=>r,Rve=oe(Uo,e=>S0(e,t=>t.coordinate)),eA=oe([nd,ZC,CH,JC],dH),tA=oe([eA,ad,Km,Ym],VC),kve=(e,t,n)=>{if(t!=null){var r=nd(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},AH=oe([nd,ZC,CH,JC],mH),jy=oe([Do,Io,ut,jn,Uo,JC,AH],hH),Dve=oe([eA,jy],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),NH=oe([Uo,tA],sH),Ive=oe([AH,tA,Lo,Km,NH,pH,ZC],vH),Lve=oe([eA,tA],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),zve=(e,t,n,r,a,i,s)=>{if(!(!e||!n||!r||!a)&&Pve(e,s)){var c=wle(e,t),u=jH(c,i,a,n,r),f=Nve(t,a,u,e);return{activeIndex:String(u),activeCoordinate:f}}},$ve=(e,t,n,r,a,i,s)=>{if(!(!e||!r||!a||!i||!n)){var c=sfe(e,n);if(c){var u=Sle(c,t),f=jH(u,s,i,r,a),m=Tve(t,i,f,c);return{activeIndex:String(f),activeCoordinate:m}}}},Bve=(e,t,n,r,a,i,s,c)=>{if(!(!e||!t||!r||!a||!i))return t==="horizontal"||t==="vertical"?zve(e,t,r,a,i,s,c):$ve(e,t,n,r,a,i,s)},Uve=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}}),Hve=oe(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(r=>parseInt(r,10)).concat(Object.values(un)),n=Array.from(new Set(t));return n.sort((r,a)=>r-a)},{memoizeOptions:{resultEqualityCheck:Pfe}});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){Fve(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 Fve(e,t,n){return(t=qve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qve(e){var t=Kve(e,"string");return typeof t=="symbol"?t:t+""}function Kve(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 Vve={},Yve={zIndexMap:Object.values(un).reduce((e,t)=>NI(NI({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),Vve)},Xve=new Set(Object.values(un));function Gve(e){return Xve.has(e)}var TH=or({name:"zIndex",initialState:Yve,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:Pt()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!Gve(n)&&delete e.zIndexMap[n])},prepare:Pt()},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:Pt()},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:Pt()}}}),{registerZIndexPortal:Wve,unregisterZIndexPortal:Qve,registerZIndexPortalElement:Zve,unregisterZIndexPortalElement:Jve}=TH.actions,ege=TH.reducer;function Pr(e){var{zIndex:t,children:n}=e,r=Jle(),a=r&&t!==void 0&&t!==0,i=sr(),s=wt();b.useLayoutEffect(()=>a?(s(Wve({zIndex:t})),()=>{s(Qve({zIndex:t}))}):hl,[s,t,a]);var c=je(u=>Uve(u,t,i));return a?c?cl.createPortal(n,c):null:n}function A_(){return A_=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},A_.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 Vv(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){tge(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 tge(e,t,n){return(t=nge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nge(e){var t=rge(e,"string");return typeof t=="symbol"?t:t+""}function rge(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 age(e){var{cursor:t,cursorComp:n,cursorProps:r}=e;return b.isValidElement(t)?b.cloneElement(t,r):b.createElement(n,r)}function ige(e){var t,{coordinate:n,payload:r,index:a,offset:i,tooltipAxisBandSize:s,layout:c,cursor:u,tooltipEventType:f,chartName:m}=e,h=n,p=r,y=a;if(!u||!h||m!=="ScatterChart"&&f!=="axis")return null;var w,x,S;if(m==="ScatterChart")w=h,x=Sue,S=un.cursorLine;else if(m==="BarChart")w=Eue(c,h,i,s),x=E6,S=un.cursorRectangle;else if(c==="radial"&&t8(h)){var{cx:E,cy:C,radius:j,startAngle:A,endAngle:T}=O6(h);w={cx:E,cy:C,startAngle:A,endAngle:T,innerRadius:j,outerRadius:j},x=C6,S=un.cursorLine}else w={points:ffe(c,h,i)},x=Hj,S=un.cursorLine;var N=typeof u=="object"&&"className"in u?u.className:void 0,P=Vv(Vv(Vv(Vv({stroke:"#ccc",pointerEvents:"none"},i),w),wc(u)),{},{payload:p,payloadIndex:y,className:ot("recharts-tooltip-cursor",N)});return b.createElement(Pr,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:S},b.createElement(age,{cursor:u,cursorComp:x,cursorProps:P}))}function oge(e){var t=Ove(),n=r6(),r=Kc(),a=Mve();return t==null||n==null||r==null||a==null?null:b.createElement(ige,A_({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:a}))}var PH=b.createContext(null),sge=()=>b.useContext(PH),AS={exports:{}},PI;function lge(){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,h,p){if(typeof m!="function")throw new TypeError("The listener must be a function");var y=new a(m,h||u,p),w=n?n+f:f;return u._events[w]?u._events[w].fn?u._events[w]=[u._events[w],y]:u._events[w].push(y):(u._events[w]=y,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,h;if(this._eventsCount===0)return f;for(h in m=this._events)t.call(m,h)&&f.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(m)):f},c.prototype.listeners=function(f){var m=n?n+f:f,h=this._events[m];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,y=h.length,w=new Array(y);p<y;p++)w[p]=h[p].fn;return w},c.prototype.listenerCount=function(f){var m=n?n+f:f,h=this._events[m];return h?h.fn?1:h.length:0},c.prototype.emit=function(f,m,h,p,y,w){var x=n?n+f:f;if(!this._events[x])return!1;var S=this._events[x],E=arguments.length,C,j;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,h),!0;case 4:return S.fn.call(S.context,m,h,p),!0;case 5:return S.fn.call(S.context,m,h,p,y),!0;case 6:return S.fn.call(S.context,m,h,p,y,w),!0}for(j=1,C=new Array(E-1);j<E;j++)C[j-1]=arguments[j];S.fn.apply(S.context,C)}else{var A=S.length,T;for(j=0;j<A;j++)switch(S[j].once&&this.removeListener(f,S[j].fn,void 0,!0),E){case 1:S[j].fn.call(S[j].context);break;case 2:S[j].fn.call(S[j].context,m);break;case 3:S[j].fn.call(S[j].context,m,h);break;case 4:S[j].fn.call(S[j].context,m,h,p);break;default:if(!C)for(T=1,C=new Array(E-1);T<E;T++)C[T-1]=arguments[T];S[j].fn.apply(S[j].context,C)}}return!0},c.prototype.on=function(f,m,h){return i(this,f,m,h,!1)},c.prototype.once=function(f,m,h){return i(this,f,m,h,!0)},c.prototype.removeListener=function(f,m,h,p){var y=n?n+f:f;if(!this._events[y])return this;if(!m)return s(this,y),this;var w=this._events[y];if(w.fn)w.fn===m&&(!p||w.once)&&(!h||w.context===h)&&s(this,y);else{for(var x=0,S=[],E=w.length;x<E;x++)(w[x].fn!==m||p&&!w[x].once||h&&w[x].context!==h)&&S.push(w[x]);S.length?this._events[y]=S.length===1?S[0]:S:s(this,y)}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})(AS)),AS.exports}var cge=lge();const uge=Wa(cge);var Wh=new uge,N_="recharts.syncEvent.tooltip",MI="recharts.syncEvent.brush",nA=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Ai(n))return e[n]}},fge={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},MH=or({name:"options",initialState:fge,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),dge=MH.reducer,{createEventEmitter:hge}=MH.actions;function mge(e){return e.tooltip.syncInteraction}var pge={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},RH=or({name:"chartData",initialState:pge,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:vge,setComputedData:UTe}=RH.actions,gge=RH.reducer,yge=["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 $u(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){bge(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 bge(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=wge(e,"string");return typeof t=="symbol"?t:t+""}function wge(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 Sge(e,t){if(e==null)return{};var n,r,a=Ege(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 Ege(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 _ge(){var e=je(Xj),t=je(Gj),n=wt(),r=je(F6),a=je(Uo),i=Kc(),s=I0(),c=je(u=>u.rootProps.className);b.useEffect(()=>{if(e==null)return hl;var u=(f,m,h)=>{if(t!==h&&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 y=m.payload.coordinate,{x:w,y:x}=y,S=Sge(y,yge),{x:E,y:C,width:j,height:A}=m.payload.sourceViewBox,T=$u($u({},S),{},{x:s.x+(j?(w-E)/j:0)*s.width,y:s.y+(A?(x-C)/A:0)*s.height});n($u($u({},m),{},{payload:$u($u({},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(C_({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,L=Math.min(K,s.x+s.width),W=Math.min(B,s.y+s.height),$={x:i==="horizontal"?N.coordinate:L,y:i==="horizontal"?W:N.coordinate},Y=C_({active:m.payload.active,coordinate:$,dataKey:m.payload.dataKey,index:String(N.index),label:m.payload.label,sourceViewBox:m.payload.sourceViewBox,graphicalItemId:m.payload.graphicalItemId});n(Y)}}};return Wh.on(N_,u),()=>{Wh.off(N_,u)}},[c,n,t,e,r,a,i,s])}function Oge(){var e=je(Xj),t=je(Gj),n=wt();b.useEffect(()=>{if(e==null)return hl;var r=(a,i,s)=>{t!==s&&e===a&&n(vge(i))};return Wh.on(MI,r),()=>{Wh.off(MI,r)}},[n,t,e])}function jge(){var e=wt();b.useEffect(()=>{e(hge())},[e]),_ge(),Oge()}function Cge(e,t,n,r,a,i){var s=je(w=>kve(w,e,t)),c=je(_H),u=je(Gj),f=je(Xj),m=je(F6),h=je(mge),p=h==null?void 0:h.active,y=I0();b.useEffect(()=>{if(!p&&f!=null&&u!=null){var w=C_({active:i,coordinate:n,dataKey:s,index:a,label:typeof r=="number"?String(r):r,sourceViewBox:y,graphicalItemId:c});Wh.emit(N_,f,w,u)}},[p,n,s,c,a,r,u,f,m,i,y])}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){Age(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 Age(e,t,n){return(t=Nge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nge(e){var t=Tge(e,"string");return typeof t=="symbol"?t:t+""}function Tge(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 Pge(e){return e.dataKey}function Mge(e,t){return b.isValidElement(e)?b.cloneElement(e,t):typeof e=="function"?b.createElement(e,t):b.createElement(Qce,t)}var LI=[],Rge={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 kH(e){var t,n,r=dn(e,Rge),{active:a,allowEscapeViewBox:i,animationDuration:s,animationEasing:c,content:u,filterNull:f,isAnimationActive:m,offset:h,payloadUniqBy:p,position:y,reverseDirection:w,useTranslate3d:x,wrapperStyle:S,cursor:E,shared:C,trigger:j,defaultIndex:A,portal:T,axisId:N}=r,P=wt(),k=typeof A=="number"?String(A):A;b.useEffect(()=>{P(_pe({shared:C,trigger:j,axisId:N,active:a,defaultIndex:k}))},[P,C,j,N,a,k]);var D=I0(),K=y6(),B=ype(C),{activeIndex:L,isActive:W}=(t=je(re=>Lve(re,B,j,k)))!==null&&t!==void 0?t:{},$=je(re=>Ive(re,B,j,k)),Y=je(re=>NH(re,B,j,k)),R=je(re=>Dve(re,B,j,k)),H=$,q=sge(),F=(n=a??W)!==null&&n!==void 0?n:!1,[V,I]=y8([H,F]),z=B==="axis"?Y:void 0;Cge(B,j,R,z,L,F);var X=T??q;if(X==null||D==null||B==null)return null;var Z=H??LI;F||(Z=LI),f&&Z.length&&(Z=d8(Z.filter(re=>re.value!=null&&(re.hide!==!0||r.includeHidden)),p,Pge));var ee=Z.length>0,se=II(II({},r),{},{payload:Z,label:z,active:F,activeIndex:L,coordinate:R,accessibilityLayer:K}),ie=b.createElement(lue,{allowEscapeViewBox:i,animationDuration:s,animationEasing:c,isAnimationActive:m,active:F,coordinate:R,hasPayload:ee,offset:h,position:y,reverseDirection:w,useTranslate3d:x,viewBox:D,wrapperStyle:S,lastBoundingBox:V,innerRef:I,hasPortalFromProps:!!T},Mge(u,se));return b.createElement(b.Fragment,null,cl.createPortal(ie,X),F&&b.createElement(oge,{cursor:E,tooltipEventType:B,coordinate:R,payload:Z,index:L}))}var Gm=e=>null;Gm.displayName="Cell";function kge(e,t,n){return(t=Dge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dge(e){var t=Ige(e,"string");return typeof t=="symbol"?t:t+""}function Ige(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 Lge{constructor(t){kge(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 zge(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){$ge(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 $ge(e,t,n){return(t=Bge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bge(e){var t=Uge(e,"string");return typeof t=="symbol"?t:t+""}function Uge(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 Hge={cacheSize:2e3,enableCache:!0},DH=zge({},Hge),$I=new Lge(DH.cacheSize),Fge={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},BI="recharts_measurement_span";function qge(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,Fge,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},Ch=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||km.isSsr)return{width:0,height:0};if(!DH.enableCache)return UI(t,n);var r=qge(t,n),a=$I.get(r);if(a)return a;var i=UI(t,n);return $I.set(r,i),i},IH;function Kge(e,t,n){return(t=Vge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vge(e){var t=Yge(e,"string");return typeof t=="symbol"?t:t+""}function Yge(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%]*)/,Xge=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,Gge=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Wge={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Qge=["cm","mm","pt","pc","in","Q","px"];function Zge(e){return Qge.includes(e)}var Gu="NaN";function Jge(e,t){return e*Wge[t]}class Vn{static parse(t){var n,[,r,a]=(n=Gge.exec(t))!==null&&n!==void 0?n:[];return r==null?Vn.NaN:new Vn(parseFloat(r),a??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Ai(t)&&(this.unit=""),n!==""&&!Xge.test(n)&&(this.num=NaN,this.unit=""),Zge(n)&&(this.num=Jge(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Vn(NaN,""):new Vn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Vn(NaN,""):new Vn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Vn(NaN,""):new Vn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Vn(NaN,""):new Vn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Ai(this.num)}}IH=Vn;Kge(Vn,"NaN",new IH(NaN,""));function LH(e){if(e==null||e.includes(Gu))return Gu;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,a,i]=(n=HI.exec(t))!==null&&n!==void 0?n:[],s=Vn.parse(r??""),c=Vn.parse(i??""),u=a==="*"?s.multiply(c):s.divide(c);if(u.isNaN())return Gu;t=t.replace(HI,u.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,[,m,h,p]=(f=FI.exec(t))!==null&&f!==void 0?f:[],y=Vn.parse(m??""),w=Vn.parse(p??""),x=h==="+"?y.add(w):y.subtract(w);if(x.isNaN())return Gu;t=t.replace(FI,x.toString())}return t}var qI=/\(([^()]*)\)/;function eye(e){for(var t=e,n;(n=qI.exec(t))!=null;){var[,r]=n;t=t.replace(qI,LH(r))}return t}function tye(e){var t=e.replace(/\s+/g,"");return t=eye(t),t=LH(t),t}function nye(e){try{return tye(e)}catch{return Gu}}function NS(e){var t=nye(e.slice(5,-1));return t===Gu?"":t}var rye=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],aye=["dx","dy","angle","className","breakAll"];function T_(){return T_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T_.apply(null,arguments)}function KI(e,t){if(e==null)return{};var n,r,a=iye(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 iye(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 zH=/[ \f\n\r\t\v\u2028\u2029]+/,$H=e=>{var{children:t,breakAll:n,style:r}=e;try{var a=[];Lt(t)||(n?a=t.toString().split(""):a=t.toString().split(zH));var i=a.map(c=>({word:c,width:Ch(c,r).width})),s=n?0:Ch(" ",r).width;return{wordsWithComputedWidth:i,spaceWidth:s}}catch{return null}};function BH(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function oye(e){return Lt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var UH=(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},[]),HH=e=>e.reduce((t,n)=>t.width>n.width?t:n),sye="…",VI=(e,t,n,r,a,i,s,c)=>{var u=e.slice(0,t),f=$H({breakAll:n,style:r,children:u+sye});if(!f)return[!1,[]];var m=UH(f.wordsWithComputedWidth,i,s,c),h=m.length>a||HH(m).width>Number(i);return[h,m]},lye=(e,t,n,r,a)=>{var{maxLines:i,children:s,style:c,breakAll:u}=e,f=Ee(i),m=String(s),h=UH(t,r,n,a);if(!f||a)return h;var p=h.length>i||HH(h).width>Number(r);if(!p)return h;for(var y=0,w=m.length-1,x=0,S;y<=w&&x<=m.length-1;){var E=Math.floor((y+w)/2),C=E-1,[j,A]=VI(m,C,u,c,i,r,n,a),[T]=VI(m,E,u,c,i,r,n,a);if(!j&&!T&&(y=E+1),j&&T&&(w=E-1),!j&&T){S=A;break}x++}return S||h},YI=e=>{var t=Lt(e)?[]:e.toString().split(zH);return[{words:t,width:void 0}]},cye=e=>{var{width:t,scaleToFit:n,children:r,style:a,breakAll:i,maxLines:s}=e;if((t||n)&&!km.isSsr){var c,u,f=$H({breakAll:i,children:r,style:a});if(f){var{wordsWithComputedWidth:m,spaceWidth:h}=f;c=m,u=h}else return YI(r);return lye({breakAll:i,children:r,maxLines:s,style:a},c,u,t,!!n)}return YI(r)},FH="#808080",uye={angle:0,breakAll:!1,capHeight:"0.71em",fill:FH,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},ab=b.forwardRef((e,t)=>{var n=dn(e,uye),{x:r,y:a,lineHeight:i,capHeight:s,fill:c,scaleToFit:u,textAnchor:f,verticalAnchor:m}=n,h=KI(n,rye),p=b.useMemo(()=>cye({breakAll:h.breakAll,children:h.children,maxLines:h.maxLines,scaleToFit:u,style:h.style,width:h.width}),[h.breakAll,h.children,h.maxLines,u,h.style,h.width]),{dx:y,dy:w,angle:x,className:S,breakAll:E}=h,C=KI(h,aye);if(!Ni(r)||!Ni(a)||p.length===0)return null;var j=Number(r)+(Ee(y)?y:0),A=Number(a)+(Ee(w)?w:0);if(!at(j)||!at(A))return null;var T;switch(m){case"start":T=NS("calc(".concat(s,")"));break;case"middle":T=NS("calc(".concat((p.length-1)/2," * -").concat(i," + (").concat(s," / 2))"));break;default:T=NS("calc(".concat(p.length-1," * -").concat(i,")"));break}var N=[],P=p[0];if(u&&P!=null){var k=P.width,{width:D}=h;N.push("scale(".concat(Ee(D)&&Ee(k)?D/k:1,")"))}return x&&N.push("rotate(".concat(x,", ").concat(j,", ").concat(A,")")),N.length&&(C.transform=N.join(" ")),b.createElement("text",T_({},dr(C),{ref:t,x:j,y:A,className:ot("recharts-text",S),textAnchor:f,fill:c.includes("url")?FH:c}),p.map((K,B)=>{var L=K.words.join(E?"":" ");return b.createElement("tspan",{x:j,dy:B===0?T:i,key:"".concat(L,"-").concat(B)},L)}))});ab.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 mi(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){fye(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 fye(e,t,n){return(t=dye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dye(e){var t=hye(e,"string");return typeof t=="symbol"?t:t+""}function hye(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 mye=e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:a}=e,{x:i,y:s,height:c,upperWidth:u,lowerWidth:f}=Lj(t),m=i,h=i+(u-f)/2,p=(m+h)/2,y=(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",j=u>=0?1:-1,A=j*r,T=j>0?"end":"start",N=j>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:h+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+y+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 L=P?{width:y,height:c}:{};return n==="insideLeft"?mi({x:p+A,y:s+c/2,horizontalAnchor:N,verticalAnchor:"middle"},L):n==="insideRight"?mi({x:p+y-A,y:s+c/2,horizontalAnchor:T,verticalAnchor:"middle"},L):n==="insideTop"?mi({x:m+u/2,y:s+S,horizontalAnchor:"middle",verticalAnchor:C},L):n==="insideBottom"?mi({x:h+f/2,y:s+c-S,horizontalAnchor:"middle",verticalAnchor:E},L):n==="insideTopLeft"?mi({x:m+A,y:s+S,horizontalAnchor:N,verticalAnchor:C},L):n==="insideTopRight"?mi({x:m+u-A,y:s+S,horizontalAnchor:T,verticalAnchor:C},L):n==="insideBottomLeft"?mi({x:h+A,y:s+c-S,horizontalAnchor:N,verticalAnchor:E},L):n==="insideBottomRight"?mi({x:h+f-A,y:s+c-S,horizontalAnchor:T,verticalAnchor:E},L):n&&typeof n=="object"&&(Ee(n.x)||_c(n.x))&&(Ee(n.y)||_c(n.y))?mi({x:i+ar(n.x,y),y:s+ar(n.y,c),horizontalAnchor:"end",verticalAnchor:"end"},L):mi({x:w,y:s+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},L)},pye=["labelRef"],vye=["content"];function GI(e,t){if(e==null)return{};var n,r,a=gye(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 gye(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 _h(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){yye(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 yye(e,t,n){return(t=bye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bye(e){var t=xye(e,"string");return typeof t=="symbol"?t:t+""}function xye(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 po(){return po=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},po.apply(null,arguments)}var qH=b.createContext(null),wye=e=>{var{x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s,children:c}=e,u=b.useMemo(()=>({x:t,y:n,upperWidth:r,lowerWidth:a,width:i,height:s}),[t,n,r,a,i,s]);return b.createElement(qH.Provider,{value:u},c)},KH=()=>{var e=b.useContext(qH),t=I0();return e||(t?Lj(t):void 0)},Sye=b.createContext(null),Eye=()=>{var e=b.useContext(Sye),t=je(X6);return e||t},_ye=e=>{var{value:t,formatter:n}=e,r=Lt(e.children)?t:e.children;return typeof n=="function"?n(r):r},rA=e=>e!=null&&typeof e=="function",Oye=(e,t)=>{var n=kn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},jye=(e,t,n,r,a)=>{var{offset:i,className:s}=e,{cx:c,cy:u,innerRadius:f,outerRadius:m,startAngle:h,endAngle:p,clockWise:y}=a,w=(f+m)/2,x=Oye(h,p),S=x>=0?1:-1,E,C;switch(t){case"insideStart":E=h+S*i,C=y;break;case"insideEnd":E=p-S*i,C=!y;break;case"end":E=p+S*i,C=y;break;default:throw new Error("Unsupported position ".concat(t))}C=x<=0?C:!C;var j=cn(c,u,w,E),A=cn(c,u,w,E+(C?1:-1)*359),T="M".concat(j.x,",").concat(j.y,`
    A`).concat(w,",").concat(w,",0,1,").concat(C?0:1,`,
    `).concat(A.x,",").concat(A.y),N=Lt(e.id)?zh("recharts-radial-line-"):e.id;return b.createElement("text",po({},r,{dominantBaseline:"central",className:ot("recharts-radial-bar-label",s)}),b.createElement("defs",null,b.createElement("path",{id:N,d:T})),b.createElement("textPath",{xlinkHref:"#".concat(N)},n))},Cye=(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:h}=cn(r,a,s+t,f);return{x:m,y:h,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:y,y:w}=cn(r,a,p,f);return{x:y,y:w,textAnchor:"middle",verticalAnchor:"middle"}},pg=e=>e!=null&&"cx"in e&&Ee(e.cx),Aye={angle:0,offset:5,zIndex:un.label,position:"middle",textBreakAll:!1};function Nye(e){if(!pg(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 Ts(e){var t=dn(e,Aye),{viewBox:n,parentViewBox:r,position:a,value:i,children:s,content:c,className:u="",textBreakAll:f,labelRef:m}=t,h=Eye(),p=KH(),y=a==="center"?p:h??p,w,x,S;n==null?w=y:pg(n)?w=n:w=Lj(n);var E=Nye(w);if(!w||Lt(i)&&Lt(s)&&!b.isValidElement(c)&&typeof c!="function")return null;var C=_h(_h({},t),{},{viewBox:w});if(b.isValidElement(c)){var{labelRef:j}=C,A=GI(C,pye);return b.cloneElement(c,A)}if(typeof c=="function"){var{content:T}=C,N=GI(C,vye);if(x=b.createElement(c,N),b.isValidElement(x))return x}else x=_ye(t);var P=dr(t);if(pg(w)){if(a==="insideStart"||a==="insideEnd"||a==="end")return jye(t,a,x,P,w);S=Cye(w,t.offset,t.position)}else{if(!E)return null;var k=mye({viewBox:E,position:a,offset:t.offset,parentViewBox:pg(r)?void 0:r});S=_h(_h({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 b.createElement(Pr,{zIndex:t.zIndex},b.createElement(ab,po({ref:m,className:ot("recharts-label",u)},P,S,{textAnchor:BH(P.textAnchor)?P.textAnchor:S.textAnchor,breakAll:f}),x))}Ts.displayName="Label";var Tye=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?b.createElement(Ts,po({key:"label-implicit"},r)):Ni(e)?b.createElement(Ts,po({key:"label-implicit",value:e},r)):b.isValidElement(e)?e.type===Ts?b.cloneElement(e,_h({key:"label-implicit"},r)):b.createElement(Ts,po({key:"label-implicit",content:e},r)):rA(e)?b.createElement(Ts,po({key:"label-implicit",content:e},r)):e&&typeof e=="object"?b.createElement(Ts,po({},e,{key:"label-implicit"},r)):null};function Pye(e){var{label:t,labelRef:n}=e,r=KH();return Tye(t,r,n)||null}var Mye=["valueAccessor"],Rye=["dataKey","clockWise","id","textBreakAll","zIndex"];function Cy(){return Cy=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},Cy.apply(null,arguments)}function QI(e,t){if(e==null)return{};var n,r,a=kye(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 kye(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 Dye=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(oye(t))return t},VH=b.createContext(void 0),YH=VH.Provider,XH=b.createContext(void 0),Iye=XH.Provider;function Lye(){return b.useContext(VH)}function zye(){return b.useContext(XH)}function vg(e){var{valueAccessor:t=Dye}=e,n=QI(e,Mye),{dataKey:r,clockWise:a,id:i,textBreakAll:s,zIndex:c}=n,u=QI(n,Rye),f=Lye(),m=zye(),h=f||m;return!h||!h.length?null:b.createElement(Pr,{zIndex:c??un.label},b.createElement(On,{className:"recharts-label-list"},h.map((p,y)=>{var w,x=Lt(r)?t(p,y):xt(p.payload,r),S=Lt(i)?{}:{id:"".concat(i,"-").concat(y)};return b.createElement(Ts,Cy({key:"label-".concat(y)},dr(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:y,zIndex:0}))})))}vg.displayName="LabelList";function aA(e){var{label:t}=e;return t?t===!0?b.createElement(vg,{key:"labelList-implicit"}):b.isValidElement(t)||rA(t)?b.createElement(vg,{key:"labelList-implicit",content:t}):typeof t=="object"?b.createElement(vg,Cy({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}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)}var GH=e=>{var{cx:t,cy:n,r,className:a}=e,i=ot("recharts-dot",a);return Ee(t)&&Ee(n)&&Ee(r)?b.createElement("circle",P_({},Qr(e),Oj(e),{className:i,cx:t,cy:n,r})):null},WH=e=>e.graphicalItems.polarItems,$ye=oe([Ut,zm],jC),ib=oe([WH,Wt,$ye],CC),Bye=oe([ib],AC),ob=oe([Bye,B0],NC),Uye=oe([ob,Wt,ib],PC);oe([ob,Wt,ib],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(a=>{var i,s=xt(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:xt(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]})));var ZI=()=>{},Hye=oe([ob,Wt,ib,eb,Ut],DC),Fye=oe([Wt,RC,kC,ZI,Hye,ZI,ut,Ut],IC),QH=oe([Wt,ut,ob,Uye,Lm,Ut,Fye],LC),qye=oe([QH,ed,vl],$C),Kye=oe([Wt,QH,qye,Ut],UC);oe([vl,Kye],W6);var Vye={radiusAxis:{},angleAxis:{}},ZH=or({name:"polarAxis",initialState:Vye,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:HTe,removeRadiusAxis:FTe,addAngleAxis:qTe,removeAngleAxis:KTe}=ZH.actions,Yye=ZH.reducer;function JH(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){Xye(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 Xye(e,t,n){return(t=Gye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gye(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 Qye=(e,t)=>t,iA=oe([WH,Qye],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),Zye=[],oA=(e,t,n)=>(n==null?void 0:n.length)===0?Zye:n,eF=oe([B0,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}}),Jye=oe([eF,iA,oA],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,a)=>{var i,s=xt(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:Gf(s,t.dataKey),color:c,payload:r,type:t.legendType}})}),e0e=oe([eF,iA,oA,jn],(e,t,n,r)=>{if(!(t==null||e==null))return abe({offset:r,pieSettings:t,displayedData:e,cells:n})}),TS={exports:{}},bt={};/**
 * @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 t0e(){if(tL)return bt;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"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),y=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 h:case m:return x;case i:return x;default:return S}}case t:return S}}}return bt.ContextConsumer=i,bt.ContextProvider=s,bt.Element=e,bt.ForwardRef=c,bt.Fragment=n,bt.Lazy=h,bt.Memo=m,bt.Portal=t,bt.Profiler=a,bt.StrictMode=r,bt.Suspense=u,bt.SuspenseList=f,bt.isContextConsumer=function(x){return w(x)===i},bt.isContextProvider=function(x){return w(x)===s},bt.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},bt.isForwardRef=function(x){return w(x)===c},bt.isFragment=function(x){return w(x)===n},bt.isLazy=function(x){return w(x)===h},bt.isMemo=function(x){return w(x)===m},bt.isPortal=function(x){return w(x)===t},bt.isProfiler=function(x){return w(x)===a},bt.isStrictMode=function(x){return w(x)===r},bt.isSuspense=function(x){return w(x)===u},bt.isSuspenseList=function(x){return w(x)===f},bt.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===h||x.$$typeof===m||x.$$typeof===s||x.$$typeof===i||x.$$typeof===c||x.$$typeof===y||x.getModuleId!==void 0)},bt.typeOf=w,bt}var nL;function n0e(){return nL||(nL=1,TS.exports=t0e()),TS.exports}var r0e=n0e(),rL=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",aL=null,PS=null,tF=e=>{if(e===aL&&Array.isArray(PS))return PS;var t=[];return b.Children.forEach(e,n=>{Lt(n)||(r0e.isFragment(n)?t=t.concat(tF(n.props.children)):t.push(n))}),PS=t,aL=e,t};function sA(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(a=>rL(a)):r=[rL(t)],tF(e).forEach(a=>{var i=Ec(a,"type.displayName")||Ec(a,"type.name");i&&r.indexOf(i)!==-1&&n.push(a)}),n}var nF=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,MS={},iL;function a0e(){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})(MS)),MS}var RS,oL;function i0e(){return oL||(oL=1,RS=a0e().isPlainObject),RS}var o0e=i0e();const s0e=Wa(o0e);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){l0e(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 l0e(e,t,n){return(t=c0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c0e(e){var t=u0e(e,"string");return typeof t=="symbol"?t:t+""}function u0e(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 Ay(){return Ay=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},Ay.apply(null,arguments)}function dh(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=Vt(sL||(sL=dh(["M ",",",""])),e,t),s+=Vt(lL||(lL=dh(["L ",",",""])),e+n,t),s+=Vt(cL||(cL=dh(["L ",",",""])),e+n-i/2,t+a),s+=Vt(uL||(uL=dh(["L ",",",""])),e+n-i/2-r,t+a),s+=Vt(fL||(fL=dh(["L ",","," Z"])),e,t),s},f0e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},d0e=e=>{var t=dn(e,f0e),{x:n,y:r,upperWidth:a,lowerWidth:i,height:s,className:c}=t,{animationEasing:u,animationDuration:f,animationBegin:m,isUpdateAnimationActive:h}=t,p=b.useRef(null),[y,w]=b.useState(-1),x=b.useRef(a),S=b.useRef(i),E=b.useRef(s),C=b.useRef(n),j=b.useRef(r),A=Im(e,"trapezoid-");if(b.useEffect(()=>{if(p.current&&p.current.getTotalLength)try{var $=p.current.getTotalLength();$&&w($)}catch{}},[]),n!==+n||r!==+r||a!==+a||i!==+i||s!==+s||a===0&&i===0||s===0)return null;var T=ot("recharts-trapezoid",c);if(!h)return b.createElement("g",null,b.createElement("path",Ay({},dr(t),{className:T,d:mL(n,r,a,i,s)})));var N=x.current,P=S.current,k=E.current,D=C.current,K=j.current,B="0px ".concat(y===-1?1:y,"px"),L="".concat(y,"px ").concat(y,"px"),W=b6(["strokeDasharray"],f,u);return b.createElement(Dm,{animationId:A,key:A,canBegin:y>0,duration:f,easing:u,isActive:h,begin:m},$=>{var Y=kt(N,a,$),R=kt(P,i,$),H=kt(k,s,$),q=kt(D,n,$),F=kt(K,r,$);p.current&&(x.current=Y,S.current=R,E.current=H,C.current=q,j.current=F);var V=$>0?{transition:W,strokeDasharray:L}:{strokeDasharray:B};return b.createElement("path",Ay({},dr(t),{className:T,d:mL(q,F,Y,R,H),ref:p,style:hL(hL({},V),t.style)}))})},h0e=["option","shapeType","activeClassName","inActiveClassName"];function m0e(e,t){if(e==null)return{};var n,r,a=p0e(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 p0e(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 Ny(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){v0e(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 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 b0e(e,t){return Ny(Ny({},t),e)}function x0e(e,t){return e==="symbols"}function vL(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return b.createElement(E6,n);case"trapezoid":return b.createElement(d0e,n);case"sector":return b.createElement(C6,n);case"symbols":if(x0e(t))return b.createElement(_j,n);break;case"curve":return b.createElement(Hj,n);default:return null}}function w0e(e){return b.isValidElement(e)?e.props:e}function lA(e){var{option:t,shapeType:n,activeClassName:r="recharts-active-shape",inActiveClassName:a="recharts-shape"}=e,i=m0e(e,h0e),s;if(b.isValidElement(t))s=b.cloneElement(t,Ny(Ny({},i),w0e(t)));else if(typeof t=="function")s=t(i,i.index);else if(s0e(t)&&typeof t!="boolean"){var c=b0e(t,i);s=b.createElement(vL,{shapeType:n,elementProps:c})}else{var u=i;s=b.createElement(vL,{shapeType:n,elementProps:u})}return i.isActive?b.createElement(On,{className:r},s):b.createElement(On,{className:a},s)}var cA=(e,t,n)=>{var r=wt();return(a,i)=>s=>{e==null||e(a,i,s),r(cH({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}},uA=e=>{var t=wt();return(n,r)=>a=>{e==null||e(n,r,a),t(Ope())}},fA=(e,t,n)=>{var r=wt();return(a,i)=>s=>{e==null||e(a,i,s),r(jpe({activeIndex:String(i),activeDataKey:t,activeCoordinate:a.tooltipPosition,activeGraphicalItemId:n}))}};function dA(e){var{tooltipEntrySettings:t}=e,n=wt(),r=sr(),a=b.useRef(null);return b.useLayoutEffect(()=>{r||(a.current===null?n(wpe(t)):a.current!==t&&n(Spe({prev:a.current,next:t})),a.current=t)},[t,n,r]),b.useLayoutEffect(()=>()=>{a.current&&(n(Epe(a.current)),a.current=null)},[n]),null}function rF(e){var{legendPayload:t}=e,n=wt(),r=sr(),a=b.useRef(null);return b.useLayoutEffect(()=>{r||(a.current===null?n(h6(t)):a.current!==t&&n(m6({prev:a.current,next:t})),a.current=t)},[n,r,t]),b.useLayoutEffect(()=>()=>{a.current&&(n(p6(a.current)),a.current=null)},[n]),null}function S0e(e){var{legendPayload:t}=e,n=wt(),r=je(ut),a=b.useRef(null);return b.useLayoutEffect(()=>{r!=="centric"&&r!=="radial"||(a.current===null?n(h6(t)):a.current!==t&&n(m6({prev:a.current,next:t})),a.current=t)},[n,r,t]),b.useLayoutEffect(()=>()=>{a.current&&(n(p6(a.current)),a.current=null)},[n]),null}var kS,E0e=()=>{var[e]=b.useState(()=>zh("uid-"));return e},_0e=(kS=eO.useId)!==null&&kS!==void 0?kS:E0e;function O0e(e,t){var n=_0e();return t||(e?"".concat(e,"-").concat(n):n)}var j0e=b.createContext(void 0),hA=e=>{var{id:t,type:n,children:r}=e,a=O0e("recharts-".concat(n),t);return b.createElement(j0e.Provider,{value:a},r(a))},C0e={cartesianItems:[],polarItems:[]},aF=or({name:"graphicalItems",initialState:C0e,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:Pt()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=xa(e).cartesianItems.indexOf(n);a>-1&&(e.cartesianItems[a]=r)},prepare:Pt()},removeCartesianGraphicalItem:{reducer(e,t){var n=xa(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:Pt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:Pt()},removePolarGraphicalItem:{reducer(e,t){var n=xa(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:Pt()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,a=xa(e).polarItems.indexOf(n);a>-1&&(e.polarItems[a]=r)},prepare:Pt()}}}),{addCartesianGraphicalItem:A0e,replaceCartesianGraphicalItem:N0e,removeCartesianGraphicalItem:T0e,addPolarGraphicalItem:P0e,removePolarGraphicalItem:M0e,replacePolarGraphicalItem:R0e}=aF.actions,k0e=aF.reducer,D0e=e=>{var t=wt(),n=b.useRef(null);return b.useLayoutEffect(()=>{n.current===null?t(A0e(e)):n.current!==e&&t(N0e({prev:n.current,next:e})),n.current=e},[t,e]),b.useLayoutEffect(()=>()=>{n.current&&(t(T0e(n.current)),n.current=null)},[t]),null},iF=b.memo(D0e),I0e=e=>{var t=wt(),n=b.useRef(null);return b.useLayoutEffect(()=>{n.current===null?t(P0e(e)):n.current!==e&&t(R0e({prev:n.current,next:e})),n.current=e},[t,e]),b.useLayoutEffect(()=>()=>{n.current&&(t(M0e(n.current)),n.current=null)},[t]),null},L0e=b.memo(I0e),z0e=["key"],$0e=["onMouseEnter","onClick","onMouseLeave"],B0e=["id"],U0e=["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 sb(e,t){if(e==null)return{};var n,r,a=H0e(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 H0e(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 Dt(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){F0e(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 F0e(e,t,n){return(t=q0e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q0e(e){var t=K0e(e,"string");return typeof t=="symbol"?t:t+""}function K0e(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 V0e(e){var t=b.useMemo(()=>sA(e.children,Gm),[e.children]),n=je(r=>Jye(r,e.id,t));return n==null?null:b.createElement(S0e,{legendPayload:n})}function Y0e(e){if(!(e==null||typeof e=="boolean"||typeof e=="function")){if(b.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 X0e=b.memo(e=>{var{dataKey:t,nameKey:n,sectors:r,stroke:a,strokeWidth:i,fill:s,name:c,hide:u,tooltipType:f,id:m,activeShape:h}=e,p=Y0e(h),y=r.map(x=>{var S=x.tooltipPayload;return p==null||S==null?S:S.map(E=>Dt(Dt({},E),{},{color:p,fill:p}))}),w={dataDefinedOnItem:y,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:Gf(c,t),hide:u,type:f,color:s,unit:"",graphicalItemId:m}};return b.createElement(dA,{tooltipEntrySettings:w})}),G0e=(e,t)=>e>t?"start":e<t?"end":"middle",W0e=(e,t,n)=>ar(typeof t=="function"?t(e):t,n,n*.8),Q0e=(e,t,n)=>{var{top:r,left:a,width:i,height:s}=t,c=_6(i,s),u=a+ar(e.cx,i,i/2),f=r+ar(e.cy,s,s/2),m=ar(e.innerRadius,c,0),h=W0e(n,e.outerRadius,c),p=e.maxRadius||Math.sqrt(i*i+s*s)/2;return{cx:u,cy:f,innerRadius:m,outerRadius:h,maxRadius:p}},Z0e=(e,t)=>{var n=kn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},J0e=(e,t)=>{if(b.isValidElement(e))return b.cloneElement(e,t);if(typeof e=="function")return e(t);var n=ot("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:r}=t,a=sb(t,z0e);return b.createElement(Hj,sl({},a,{type:"linear",className:n}))},ebe=(e,t,n)=>{if(b.isValidElement(e))return b.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),b.isValidElement(r)))return r;var a=ot("recharts-pie-label-text",JH(e));return b.createElement(ab,sl({},t,{alignmentBaseline:"middle",className:a}),r)};function tbe(e){var{sectors:t,props:n,showLabels:r}=e,{label:a,labelLine:i,dataKey:s}=n;if(!r||!a||!t)return null;var c=Qr(n),u=wc(a),f=wc(i),m=typeof a=="object"&&"offsetRadius"in a&&typeof a.offsetRadius=="number"&&a.offsetRadius||20,h=t.map((p,y)=>{var w=(p.startAngle+p.endAngle)/2,x=cn(p.cx,p.cy,p.outerRadius+m,w),S=Dt(Dt(Dt(Dt({},c),p),{},{stroke:"none"},u),{},{index:y,textAnchor:G0e(x.x,p.cx)},x),E=Dt(Dt(Dt(Dt({},c),p),{},{fill:"none",stroke:p.fill},f),{},{index:y,points:[cn(p.cx,p.cy,p.outerRadius,w),x],key:"line"});return b.createElement(Pr,{zIndex:un.label,key:"label-".concat(p.startAngle,"-").concat(p.endAngle,"-").concat(p.midAngle,"-").concat(y)},b.createElement(On,null,i&&J0e(i,E),ebe(a,S,xt(p,s))))});return b.createElement(On,{className:"recharts-pie-labels"},h)}function nbe(e){var{sectors:t,props:n,showLabels:r}=e,{label:a}=n;return typeof a=="object"&&a!=null&&"position"in a?b.createElement(aA,{label:a}):b.createElement(tbe,{sectors:t,props:n,showLabels:r})}function rbe(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:a,shape:i,id:s}=e,c=je(ol),u=je(QC),f=je(_H),{onMouseEnter:m,onClick:h,onMouseLeave:p}=a,y=sb(a,$0e),w=cA(m,a.dataKey,s),x=uA(p),S=fA(h,a.dataKey,s);return t==null||t.length===0?null:b.createElement(b.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 j=f==null||f===s,A=String(C)===c&&(u==null||a.dataKey===u)&&j,T=c?r:null,N=n&&A?n:T,P=Dt(Dt({},E),{},{stroke:E.stroke,tabIndex:-1,[Z8]:C,[J8]:s});return b.createElement(On,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"},Am(y,E,C),{onMouseEnter:w(E,C),onMouseLeave:x(E,C),onClick:S(E,C)}),b.createElement(lA,sl({option:i??N,index:C,shapeType:"sector",isActive:A},P)))}))}function abe(e){var t,{pieSettings:n,displayedData:r,cells:a,offset:i}=e,{cornerRadius:s,startAngle:c,endAngle:u,dataKey:f,nameKey:m,tooltipType:h}=n,p=Math.abs(n.minAngle),y=Z0e(c,u),w=Math.abs(y),x=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,S=r.filter(N=>xt(N,f,0)!==0).length,E=(w>=360?S:S-1)*x,C=w-S*p-E,j=r.reduce((N,P)=>{var k=xt(P,f,0);return N+(Ee(k)?k:0)},0),A;if(j>0){var T;A=r.map((N,P)=>{var k=xt(N,f,0),D=xt(N,m,P),K=Q0e(n,i,N),B=(Ee(k)?k:0)/j,L,W=Dt(Dt({},N),a&&a[P]&&a[P].props),$=W!=null&&"fill"in W&&typeof W.fill=="string"?W.fill:n.fill;P?L=T.endAngle+kn(y)*x*(k!==0?1:0):L=c;var Y=L+kn(y)*((k!==0?p:0)+B*C),R=(L+Y)/2,H=(K.innerRadius+K.outerRadius)/2,q=[{name:D,value:k,payload:W,dataKey:f,type:h,color:$,fill:$,graphicalItemId:n.id}],F=cn(K.cx,K.cy,H,R);return T=Dt(Dt(Dt(Dt({},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:L,endAngle:Y,payload:W,paddingAngle:kn(y)*x}),T})}return A}function ibe(e){var{showLabels:t,sectors:n,children:r}=e,a=b.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 b.createElement(Iye,{value:t?a:void 0},r)}function obe(e){var{props:t,previousSectorsRef:n,id:r}=e,{sectors:a,isAnimationActive:i,animationBegin:s,animationDuration:c,animationEasing:u,activeShape:f,inactiveShape:m,onAnimationStart:h,onAnimationEnd:p}=t,y=Im(t,"recharts-pie-"),w=n.current,[x,S]=b.useState(!1),E=b.useCallback(()=>{typeof p=="function"&&p(),S(!1)},[p]),C=b.useCallback(()=>{typeof h=="function"&&h(),S(!0)},[h]);return b.createElement(ibe,{showLabels:!x,sectors:a},b.createElement(Dm,{animationId:y,begin:s,duration:c,isActive:i,easing:u,onAnimationStart:C,onAnimationEnd:E,key:y},j=>{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?Ec(k,"paddingAngle",0):0;if(K){var L=kt(K.endAngle-K.startAngle,k.endAngle-k.startAngle,j),W=Dt(Dt({},k),{},{startAngle:P+B,endAngle:P+L+B});T.push(W),P=W.endAngle}else{var{endAngle:$,startAngle:Y}=k,R=kt(0,$-Y,j),H=Dt(Dt({},k),{},{startAngle:P+B,endAngle:P+R+B});T.push(H),P=H.endAngle}}),n.current=T,b.createElement(On,null,b.createElement(rbe,{sectors:T,activeShape:f,inactiveShape:m,allOtherPieProps:t,shape:t.shape,id:r}))}),b.createElement(nbe,{showLabels:!x,sectors:a,props:t}),t.children)}var sbe={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:un.area};function lbe(e){var{id:t}=e,n=sb(e,B0e),{hide:r,className:a,rootTabIndex:i}=e,s=b.useMemo(()=>sA(e.children,Gm),[e.children]),c=je(m=>e0e(m,t,s)),u=b.useRef(null),f=ot("recharts-pie",a);return r||c==null?(u.current=null,b.createElement(On,{tabIndex:i,className:f})):b.createElement(Pr,{zIndex:e.zIndex},b.createElement(X0e,{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}),b.createElement(On,{tabIndex:i,className:f},b.createElement(obe,{props:Dt(Dt({},n),{},{sectors:c}),previousSectorsRef:u,id:t})))}function cbe(e){var t=dn(e,sbe),{id:n}=t,r=sb(t,U0e),a=Qr(r);return b.createElement(hA,{id:n,type:"pie"},i=>b.createElement(b.Fragment,null,b.createElement(L0e,{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}),b.createElement(V0e,sl({},r,{id:i})),b.createElement(lbe,sl({},r,{id:i}))))}var oF=cbe;oF.displayName="Pie";var ube=["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 DS(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){fbe(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 fbe(e,t,n){return(t=dbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dbe(e){var t=hbe(e,"string");return typeof t=="symbol"?t:t+""}function hbe(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 mbe(e,t){if(e==null)return{};var n,r,a=pbe(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 pbe(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 vbe(e){var{option:t,dotProps:n,className:r}=e;if(b.isValidElement(t))return b.cloneElement(t,n);if(typeof t=="function")return t(n);var a=ot(r,typeof t!="boolean"?t.className:""),i=n??{},{points:s}=i,c=mbe(i,ube);return b.createElement(GH,Ty({},c,{className:a}))}function gbe(e,t){return e==null?!1:t?!0:e.length===1}function ybe(e){var{points:t,dot:n,className:r,dotClassName:a,dataKey:i,baseProps:s,needClip:c,clipPathId:u,zIndex:f=un.scatter}=e;if(!gbe(t,n))return null;var m=nF(n),h=Zae(n),p=t.map((w,x)=>{var S,E,C=DS(DS(DS({r:3},s),h),{},{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 b.createElement(vbe,{key:"dot-".concat(x),option:n,dotProps:C,className:a})}),y={};return c&&u!=null&&(y.clipPath="url(#clipPath-".concat(m?"":"dots-").concat(u,")")),b.createElement(Pr,{zIndex:f},b.createElement(On,Ty({className:r},y),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){bbe(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 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)}var sF=0,Sbe={xAxis:{},yAxis:{},zAxis:{}},lF=or({name:"cartesianAxis",initialState:Sbe,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:Pt()},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:Pt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:Pt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:Pt()},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:Pt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:Pt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:Pt()},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:Pt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:Pt()},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:Ebe,replaceXAxis:_be,removeXAxis:Obe,addYAxis:jbe,replaceYAxis:Cbe,removeYAxis:Abe,addZAxis:VTe,replaceZAxis:YTe,removeZAxis:XTe,updateYAxisWidth:Nbe}=lF.actions,Tbe=lF.reducer,Pbe=oe([jn],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),Mbe=oe([Pbe,Do,Io],(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=()=>je(Mbe),Rbe=()=>je(xve);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 IS(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){kbe(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 kbe(e,t,n){return(t=Dbe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dbe(e){var t=Ibe(e,"string");return typeof t=="symbol"?t:t+""}function Ibe(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 Lbe=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=IS(IS(IS({},c),wc(a)),Oj(a)),f;return b.isValidElement(a)?f=b.cloneElement(a,u):typeof a=="function"?f=a(u):f=b.createElement(GH,u),b.createElement(On,{className:"recharts-active-dot",clipPath:s},f)};function zbe(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:a,clipPath:i,zIndex:s=un.activeDot}=e,c=je(ol),u=Rbe();if(t==null||u==null)return null;var f=t.find(m=>u.includes(m.payload));return Lt(f)?null:b.createElement(Pr,{zIndex:s},b.createElement(Lbe,{point:f,childIndex:Number(c),mainColor:n,dataKey:a,activeDot:r,clipPath:i}))}var SL=(e,t,n)=>{var r=n??e;if(!Lt(r))return ar(r,t,0)},$be=(e,t,n)=>{var r={},a=e.filter(q0),i=e.filter(f=>f.stackId==null),s=a.reduce((f,m)=>{var h=f[m.stackId];return h==null&&(h=[]),h.push(m),f[m.stackId]=h,f},r),c=Object.entries(s).map(f=>{var m,[h,p]=f,y=p.map(x=>x.dataKey),w=SL(t,n,(m=p[0])===null||m===void 0?void 0:m.barSize);return{stackId:h,dataKeys:y,barSize:w}}),u=i.map(f=>{var m=[f.dataKey].filter(p=>p!=null),h=SL(t,n,f.barSize);return{stackId:void 0,dataKeys:m,barSize:h}});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 Yv(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){Bbe(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 Bbe(e,t,n){return(t=Ube(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ube(e){var t=Hbe(e,"string");return typeof t=="symbol"?t:t+""}function Hbe(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 Fbe(e,t,n,r,a){var i,s=r.length;if(!(s<1)){var c=ar(e,n,0,!0),u,f=[];if(at((i=r[0])===null||i===void 0?void 0:i.barSize)){var m=!1,h=n/s,p=r.reduce((C,j)=>C+(j.barSize||0),0);p+=(s-1)*c,p>=n&&(p-=(s-1)*c,c=0),p>=n&&h>0&&(m=!0,h*=.9,p=s*h);var y=(n-p)/2>>0,w={offset:y-c,size:0};u=r.reduce((C,j)=>{var A,T={stackId:j.stackId,dataKeys:j.dataKeys,position:{offset:w.offset+w.size+c,size:m?h:(A=j.barSize)!==null&&A!==void 0?A:0}},N=[...C,T];return w=T.position,N},f)}else{var x=ar(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=at(a)?Math.min(S,a):S;u=r.reduce((C,j,A)=>[...C,{stackId:j.stackId,dataKeys:j.dataKeys,position:{offset:x+(S+c)*A+(S-E)/2,size:E}}],f)}return u}}var qbe=(e,t,n,r,a,i,s)=>{var c=Lt(s)?t:s,u=Fbe(n,r,a!==i?a:i,e,c);return a!==i&&u!=null&&(u=u.map(f=>Yv(Yv({},f),{},{position:Yv(Yv({},f.position),{},{offset:f.position.offset-a/2})}))),u},Kbe=(e,t)=>{var n=Jj(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)}}}},Vbe=(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 Ybe(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&at(e.zIndex)?e.zIndex:t}var cF=e=>{var{chartData:t}=e,n=wt(),r=sr();return b.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}},uF=or({name:"brush",initialState:_L,reducers:{setBrushSettings(e,t){return t.payload==null?_L:t.payload}}}),{setBrushSettings:GTe}=uF.actions,Xbe=uF.reducer;function Gbe(e){return(e%180+180)%180}var Wbe=function(t){var{width:n,height:r}=t,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=Gbe(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)},Qbe={dots:[],areas:[],lines:[]},fF=or({name:"referenceElements",initialState:Qbe,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=xa(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=xa(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=xa(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:WTe,removeDot:QTe,addArea:ZTe,removeArea:JTe,addLine:e2e,removeLine:t2e}=fF.actions,Zbe=fF.reducer,Jbe=b.createContext(void 0),exe=e=>{var{children:t}=e,[n]=b.useState("".concat(zh("recharts"),"-clip")),r=mA();if(r==null)return null;var{x:a,y:i,width:s,height:c}=r;return b.createElement(Jbe.Provider,{value:n},b.createElement("defs",null,b.createElement("clipPath",{id:n},b.createElement("rect",{x:a,y:i,height:c,width:s}))),t)};function dF(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 txe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Wbe(r,n)}function nxe(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 Qh(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 rxe(e,t){return dF(e,t+1)}function axe(e,t,n,r,a){for(var i=(r||[]).slice(),{start:s,end:c}=t,u=0,f=1,m=s,h=function(){var w=r==null?void 0:r[u];if(w===void 0)return{v:dF(r,f)};var x=u,S,E=()=>(S===void 0&&(S=n(w,x)),S),C=w.coordinate,j=u===0||Qh(e,C,E,m,c);j||(u=0,m=s,f+=1),j&&(m=C+e*(E()/2+a),u+=f)},p;f<=i.length;)if(p=h(),p)return p.v;return[]}function ixe(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,h=c,p=!0,y=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||Qh(e,k,P,h,u);if(!D)return p=!1,1;D&&(h=k+e*(P()/2+a))},w,x=m;x<s&&(w=y(),!(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 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 tr(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){oxe(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 oxe(e,t,n){return(t=sxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sxe(e){var t=lxe(e,"string");return typeof t=="symbol"?t:t+""}function lxe(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 cxe(e,t,n,r,a){for(var i=(r||[]).slice(),s=i.length,{start:c}=t,{end:u}=t,f=function(p){var y=i[p];if(y==null)return 1;var w=y,x,S=()=>(x===void 0&&(x=n(y,p)),x);if(p===s-1){var E=e*(w.coordinate+e*S()/2-u);i[p]=w=tr(tr({},w),{},{tickCoord:E>0?w.coordinate-E*e:w.coordinate})}else i[p]=w=tr(tr({},w),{},{tickCoord:w.coordinate});if(w.tickCoord!=null){var C=Qh(e,w.tickCoord,S,c,u);C&&(u=w.tickCoord-e*(S()/2+a),i[p]=tr(tr({},w),{},{isShow:!0}))}},m=s-1;m>=0;m--)f(m);return i}function uxe(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 h=n(m,c-1),p=e*(m.coordinate+e*h/2-f);if(s[c-1]=m=tr(tr({},m),{},{tickCoord:p>0?m.coordinate-p*e:m.coordinate}),m.tickCoord!=null){var y=Qh(e,m.tickCoord,()=>h,u,f);y&&(f=m.tickCoord-e*(h/2+a),s[c-1]=tr(tr({},m),{},{isShow:!0}))}}}for(var w=i?c-1:c,x=function(C){var j=s[C];if(j==null)return 1;var A=j,T,N=()=>(T===void 0&&(T=n(j,C)),T);if(C===0){var P=e*(A.coordinate-e*N()/2-u);s[C]=A=tr(tr({},A),{},{tickCoord:P<0?A.coordinate-P*e:A.coordinate})}else s[C]=A=tr(tr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var k=Qh(e,A.tickCoord,N,u,f);k&&(u=A.tickCoord+e*(N()/2+a),s[C]=tr(tr({},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:h}=e;if(!a||!a.length||!r)return[];if(Ee(u)||km.isSsr){var p;return(p=rxe(a,Ee(u)?u:0))!==null&&p!==void 0?p:[]}var y=[],w=c==="top"||c==="bottom"?"width":"height",x=m&&w==="width"?Ch(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"?txe(Ch(P,{fontSize:t,letterSpacing:n}),x,h):Ch(P,{fontSize:t,letterSpacing:n})[w]},E=a[0],C=a[1],j=a.length>=2&&E!=null&&C!=null?kn(C.coordinate-E.coordinate):1,A=nxe(i,j,w);return u==="equidistantPreserveStart"?axe(j,A,S,a,s):u==="equidistantPreserveEnd"?ixe(j,A,S,a,s):(u==="preserveStart"||u==="preserveStartEnd"?y=uxe(j,A,S,a,s,u==="preserveStartEnd"):y=cxe(j,A,S,a,s),y.filter(T=>T.isShow))}var fxe=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 h=m.getBoundingClientRect();h.width>s&&(s=h.width)}});var c=n?n.getBoundingClientRect().width:0,u=a+i,f=s+u+c+(n?r:0);return Math.round(f)}return 0},dxe={xAxis:{},yAxis:{}},hF=or({name:"renderedTicks",initialState:dxe,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:hxe,removeRenderedTicks:mxe}=hF.actions,pxe=hF.reducer,vxe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function gxe(e,t){if(e==null)return{};var n,r,a=yxe(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 yxe(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 Tc(){return Tc=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},Tc.apply(null,arguments)}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 Kt(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){bxe(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 bxe(e,t,n){return(t=xxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xxe(e){var t=wxe(e,"string");return typeof t=="symbol"?t:t+""}function wxe(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 wo={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:un.axis};function Sxe(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=Kt(Kt(Kt({},u),Qr(c)),{},{fill:"none"});if(i==="top"||i==="bottom"){var m=+(i==="top"&&!s||i==="bottom"&&s);f=Kt(Kt({},f),{},{x1:t,y1:n+m*a,x2:t+r,y2:n+m*a})}else{var h=+(i==="left"&&!s||i==="right"&&s);f=Kt(Kt({},f),{},{x1:t+h*r,y1:n,x2:t+h*r,y2:n+a})}return b.createElement("line",Tc({},f,{className:ot("recharts-cartesian-axis-line",Ec(c,"className"))}))}function Exe(e,t,n,r,a,i,s,c,u){var f,m,h,p,y,w,x=c?-1:1,S=e.tickSize||s,E=Ee(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":f=m=e.coordinate,p=n+ +!c*a,h=p-x*S,w=h-x*u,y=E;break;case"left":h=p=e.coordinate,m=t+ +!c*r,f=m-x*S,y=f-x*u,w=E;break;case"right":h=p=e.coordinate,m=t+ +c*r,f=m+x*S,y=f+x*u,w=E;break;default:f=m=e.coordinate,p=n+ +c*a,h=p+x*S,w=h+x*u,y=E;break}return{line:{x1:f,y1:h,x2:m,y2:p},tick:{x:y,y:w}}}function _xe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function Oxe(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function jxe(e){var{option:t,tickProps:n,value:r}=e,a,i=ot(n.className,"recharts-cartesian-axis-tick-value");if(b.isValidElement(t))a=b.cloneElement(t,Kt(Kt({},n),{},{className:i}));else if(typeof t=="function")a=t(Kt(Kt({},n),{},{className:i}));else{var s="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(s=ot(s,JH(t))),a=b.createElement(ab,Tc({},n,{className:s}),r)}return a}function Cxe(e){var{ticks:t,axisType:n,axisId:r}=e,a=wt();return b.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(hxe({ticks:i,axisId:r,axisType:n})),()=>{a(mxe({axisId:r,axisType:n}))}},[a,t,r,n]),null}var Axe=b.forwardRef((e,t)=>{var{ticks:n=[],tick:r,tickLine:a,stroke:i,tickFormatter:s,unit:c,padding:u,tickTextProps:f,orientation:m,mirror:h,x:p,y,width:w,height:x,tickSize:S,tickMargin:E,fontSize:C,letterSpacing:j,getTicksConfig:A,events:T,axisType:N,axisId:P}=e,k=pA(Kt(Kt({},A),{},{ticks:n}),C,j),D=Qr(A),K=wc(r),B=BH(D.textAnchor)?D.textAnchor:_xe(m,h),L=Oxe(m,h),W={};typeof a=="object"&&(W=a);var $=Kt(Kt({},D),{},{fill:"none"},W),Y=k.map(q=>Kt({entry:q},Exe(q,p,y,w,x,m,S,h,E))),R=Y.map(q=>{var{entry:F,line:V}=q;return b.createElement(On,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(F.value,"-").concat(F.coordinate,"-").concat(F.tickCoord)},a&&b.createElement("line",Tc({},$,V,{className:ot("recharts-cartesian-axis-tick-line",Ec(a,"className"))})))}),H=Y.map((q,F)=>{var V,I,{entry:z,tick:X}=q,Z=Kt(Kt(Kt(Kt({verticalAnchor:L},D),{},{textAnchor:B,stroke:"none",fill:i},X),{},{index:F,payload:z,visibleTicksCount:k.length,tickFormatter:s,padding:u},f),{},{angle:(V=(I=f==null?void 0:f.angle)!==null&&I!==void 0?I:D.angle)!==null&&V!==void 0?V:0}),ee=Kt(Kt({},Z),K);return b.createElement(On,Tc({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(z.value,"-").concat(z.coordinate,"-").concat(z.tickCoord)},Am(T,z,F)),r&&b.createElement(jxe,{option:r,tickProps:ee,value:"".concat(typeof s=="function"?s(z.value,F):z.value).concat(c||"")}))});return b.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(N,"-ticks")},b.createElement(Cxe,{ticks:k,axisId:P,axisType:N}),H.length>0&&b.createElement(Pr,{zIndex:un.label},b.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(N,"-tick-labels"),ref:t},H)),R.length>0&&b.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(N,"-tick-lines")},R))}),Nxe=b.forwardRef((e,t)=>{var{axisLine:n,width:r,height:a,className:i,hide:s,ticks:c,axisType:u,axisId:f}=e,m=gxe(e,vxe),[h,p]=b.useState(""),[y,w]=b.useState(""),x=b.useRef(null);b.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var E;return fxe({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=b.useCallback(E=>{if(E){var C=E.getElementsByClassName("recharts-cartesian-axis-tick-value");x.current=C;var j=C[0];if(j){var A=window.getComputedStyle(j),T=A.fontSize,N=A.letterSpacing;(T!==h||N!==y)&&(p(T),w(N))}}},[h,y]);return s||r!=null&&r<=0||a!=null&&a<=0?null:b.createElement(Pr,{zIndex:e.zIndex},b.createElement(On,{className:ot("recharts-cartesian-axis",i)},b.createElement(Sxe,{x:e.x,y:e.y,width:r,height:a,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Qr(e)}),b.createElement(Axe,{ref:S,axisType:u,events:m,fontSize:h,getTicksConfig:e,height:e.height,letterSpacing:y,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}),b.createElement(wye,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},b.createElement(Pye,{label:e.label,labelRef:e.labelRef}),e.children)))}),vA=b.forwardRef((e,t)=>{var n=dn(e,wo);return b.createElement(Nxe,Tc({},n,{ref:t}))});vA.displayName="CartesianAxis";var Txe=["x1","y1","x2","y2","key"],Pxe=["offset"],Mxe=["xAxisId","yAxisId"],Rxe=["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 rr(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){kxe(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 kxe(e,t,n){return(t=Dxe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dxe(e){var t=Ixe(e,"string");return typeof t=="symbol"?t:t+""}function Ixe(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 Py(e,t){if(e==null)return{};var n,r,a=Lxe(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 Lxe(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 zxe=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 b.createElement("rect",{x:r,y:a,ry:c,width:i,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function mF(e){var{option:t,lineItemProps:n}=e,r;if(b.isValidElement(t))r=b.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=Py(n,Txe),h=(a=Qr(m))!==null&&a!==void 0?a:{},{offset:p}=h,y=Py(h,Pxe);r=b.createElement("line",Jl({},y,{x1:i,y1:s,x2:c,y2:u,fill:"none",key:f}))}return r}function $xe(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=Py(e,Mxe),u=a.map((f,m)=>{var h=rr(rr({},c),{},{x1:t,y1:f,x2:t+n,y2:f,key:"line-".concat(m),index:m});return b.createElement(mF,{key:"line-".concat(m),option:r,lineItemProps:h})});return b.createElement("g",{className:"recharts-cartesian-grid-horizontal"},u)}function Bxe(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=Py(e,Rxe),u=a.map((f,m)=>{var h=rr(rr({},c),{},{x1:f,y1:t,x2:f,y2:t+n,key:"line-".concat(m),index:m});return b.createElement(mF,{option:r,lineItemProps:h,key:"line-".concat(m)})});return b.createElement("g",{className:"recharts-cartesian-grid-vertical"},u)}function Uxe(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(h=>Math.round(h+a-a)).sort((h,p)=>h-p);a!==f[0]&&f.unshift(0);var m=f.map((h,p)=>{var y=f[p+1],w=y==null,x=w?a+s-h:y-h;if(x<=0)return null;var S=p%t.length;return b.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:x,width:i,stroke:"none",fill:t[S],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return b.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Hxe(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(h=>Math.round(h+a-a)).sort((h,p)=>h-p);a!==f[0]&&f.unshift(0);var m=f.map((h,p)=>{var y=f[p+1],w=y==null,x=w?a+s-h:y-h;if(x<=0)return null;var S=p%n.length;return b.createElement("rect",{key:"react-".concat(p),x:h,y:i,width:x,height:c,stroke:"none",fill:n[S],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return b.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var Fxe=(e,t)=>{var{xAxis:n,width:r,height:a,offset:i}=e;return G8(pA(rr(rr(rr({},wo),n),{},{ticks:W8(n),viewBox:{x:0,y:0,width:r,height:a}})),i.left,i.left+i.width,t)},qxe=(e,t)=>{var{yAxis:n,width:r,height:a,offset:i}=e;return G8(pA(rr(rr(rr({},wo),n),{},{ticks:W8(n),viewBox:{x:0,y:0,width:r,height:a}})),i.top,i.top+i.height,t)},Kxe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:un.grid};function gA(e){var t=zj(),n=$j(),r=r6(),a=rr(rr({},dn(e,Kxe)),{},{x:Ee(e.x)?e.x:r.left,y:Ee(e.y)?e.y:r.top,width:Ee(e.width)?e.width:r.width,height:Ee(e.height)?e.height:r.height}),{xAxisId:i,yAxisId:s,x:c,y:u,width:f,height:m,syncWithTicks:h,horizontalValues:p,verticalValues:y}=a,w=sr(),x=je(D=>xI(D,"xAxis",i,w)),S=je(D=>xI(D,"yAxis",s,w));if(!Ti(f)||!Ti(m)||!Ee(c)||!Ee(u))return null;var E=a.verticalCoordinatesGenerator||Fxe,C=a.horizontalCoordinatesGenerator||qxe,{horizontalPoints:j,verticalPoints:A}=a;if((!j||!j.length)&&typeof C=="function"){var T=p&&p.length,N=C({yAxis:S?rr(rr({},S),{},{ticks:T?p:S.ticks}):void 0,width:t??f,height:n??m,offset:r},T?!0:h);ny(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(j=N)}if((!A||!A.length)&&typeof E=="function"){var P=y&&y.length,k=E({xAxis:x?rr(rr({},x),{},{ticks:P?y:x.ticks}):void 0,width:t??f,height:n??m,offset:r},P?!0:h);ny(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(A=k)}return b.createElement(Pr,{zIndex:a.zIndex},b.createElement("g",{className:"recharts-cartesian-grid"},b.createElement(zxe,{fill:a.fill,fillOpacity:a.fillOpacity,x:a.x,y:a.y,width:a.width,height:a.height,ry:a.ry}),b.createElement(Uxe,Jl({},a,{horizontalPoints:j})),b.createElement(Hxe,Jl({},a,{verticalPoints:A})),b.createElement($xe,Jl({},a,{offset:r,horizontalPoints:j,xAxis:x,yAxis:S})),b.createElement(Bxe,Jl({},a,{offset:r,verticalPoints:A,xAxis:x,yAxis:S}))))}gA.displayName="CartesianGrid";var Vxe={},pF=or({name:"errorBars",initialState:Vxe,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:n2e,replaceErrorBar:r2e,removeErrorBar:a2e}=pF.actions,Yxe=pF.reducer,Xxe=["children"];function Gxe(e,t){if(e==null)return{};var n,r,a=Wxe(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 Wxe(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 Qxe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},Zxe=b.createContext(Qxe);function vF(e){var{children:t}=e,n=Gxe(e,Xxe);return b.createElement(Zxe.Provider,{value:n},t)}function yA(e,t){var n,r,a=je(f=>$o(f,e)),i=je(f=>Bo(f,t)),s=(n=a==null?void 0:a.allowDataOverflow)!==null&&n!==void 0?n:bn.allowDataOverflow,c=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:xn.allowDataOverflow,u=s||c;return{needClip:u,needClipX:s,needClipY:c}}function gF(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:h}=a;return b.createElement("clipPath",{id:"clipPath-".concat(r)},b.createElement("rect",{x:i?u:u-m/2,y:s?f:f-h/2,width:i?m:m*2,height:s?h:h*2}))}var yF=(e,t,n,r)=>il(e,"xAxis",t,r),bF=(e,t,n,r)=>al(e,"xAxis",t,r),xF=(e,t,n,r)=>il(e,"yAxis",n,r),wF=(e,t,n,r)=>al(e,"yAxis",n,r),Jxe=oe([ut,yF,xF,bF,wF],(e,t,n,r,a)=>ko(e,"xAxis")?_f(t,r,!1):_f(n,a,!1)),ewe=(e,t,n,r,a)=>a;function twe(e){return e.type==="line"}var nwe=oe([J0,ewe],(e,t)=>e.filter(twe).find(n=>n.id===t)),rwe=oe([ut,yF,xF,bF,wF,nwe,Jxe,Fj],(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:h,data:p}=i,y;if(p!=null&&p.length>0?y=p:y=u==null?void 0:u.slice(f,m+1),y!=null)return _we({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:a,dataKey:h,bandSize:s,displayedData:y})}});function awe(e){var t=wc(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 iwe=["id"],owe=["type","layout","connectNulls","needClip","shape"],swe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Zh(){return Zh=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},Zh.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 bi(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){lwe(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 lwe(e,t,n){return(t=cwe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cwe(e){var t=uwe(e,"string");return typeof t=="symbol"?t:t+""}function uwe(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=fwe(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 fwe(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 dwe=e=>{var{dataKey:t,name:n,stroke:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:Gf(n,t),payload:e}]},hwe=b.memo(e=>{var{dataKey:t,data:n,stroke:r,strokeWidth:a,fill:i,name:s,hide:c,unit:u,tooltipType:f,id:m}=e,h={dataDefinedOnItem:n,getPosition:hl,settings:{stroke:r,strokeWidth:a,fill:i,dataKey:t,nameKey:void 0,name:Gf(s,t),hide:c,type:f,color:r,unit:u,graphicalItemId:m}};return b.createElement(dA,{tooltipEntrySettings:h})}),SF=(e,t)=>"".concat(t,"px ").concat(e,"px");function mwe(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],a=0;a<t;++a)r.push(...n);return r}var pwe=(e,t,n)=>{var r=n.reduce((p,y)=>p+y,0);if(!r)return SF(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 h=s.length%2===0?[0,t]:[t];return[...mwe(n,a),...s,...h].map(p=>"".concat(p,"px")).join(", ")};function vwe(e){var{clipPathId:t,points:n,props:r}=e,{dot:a,dataKey:i,needClip:s}=r,{id:c}=r,u=bA(r,iwe),f=Qr(u);return b.createElement(ybe,{points:n,dot:a,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:i,baseProps:f,needClip:s,clipPathId:t})}function gwe(e){var{showLabels:t,children:n,points:r}=e,a=b.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 bi(bi({},u),{},{value:i.value,payload:i.payload,viewBox:u,parentViewBox:void 0,fill:void 0})}),[r]);return b.createElement(YH,{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,h=bA(i,owe),p=bi(bi({},dr(h)),{},{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 b.createElement(b.Fragment,null,(r==null?void 0:r.length)>1&&b.createElement(lA,Zh({shapeType:"curve",option:m},p,{pathRef:n})),b.createElement(vwe,{points:r,clipPathId:t,props:i}))}function ywe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function bwe(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:a,longestAnimatedLengthRef:i}=e,{points:s,strokeDasharray:c,isAnimationActive:u,animationBegin:f,animationDuration:m,animationEasing:h,animateNewValues:p,width:y,height:w,onAnimationEnd:x,onAnimationStart:S}=n,E=a.current,C=Im(s,"recharts-line-"),j=b.useRef(C),[A,T]=b.useState(!1),N=!A,P=b.useCallback(()=>{typeof x=="function"&&x(),T(!1)},[x]),k=b.useCallback(()=>{typeof S=="function"&&S(),T(!0)},[S]),D=ywe(r.current),K=b.useRef(0);j.current!==C&&(K.current=i.current,j.current=C);var B=K.current;return b.createElement(gwe,{points:s,showLabels:N},n.children,b.createElement(Dm,{animationId:C,begin:f,duration:m,isActive:u,easing:h,onAnimationEnd:P,onAnimationStart:k,key:C},L=>{var W=kt(B,D+B,L),$=Math.min(W,D),Y;if(u)if(c){var R="".concat(c).split(/[,\s]+/gim).map(F=>parseFloat(F));Y=pwe($,D,R)}else Y=SF(D,$);else Y=c==null?void 0:String(c);if(L>0&&D>0&&(a.current=s,i.current=Math.max(i.current,$)),E){var H=E.length/s.length,q=L===1?s:s.map((F,V)=>{var I=Math.floor(V*H);if(E[I]){var z=E[I];return bi(bi({},F),{},{x:kt(z.x,F.x,L),y:kt(z.y,F.y,L)})}return p?bi(bi({},F),{},{x:kt(y*2,F.x,L),y:kt(w/2,F.y,L)}):bi(bi({},F),{},{x:F.x,y:F.y})});return a.current=q,b.createElement(NL,{props:n,points:q,clipPathId:t,pathRef:r,strokeDasharray:Y})}return b.createElement(NL,{props:n,points:s,clipPathId:t,pathRef:r,strokeDasharray:Y})}),b.createElement(aA,{label:n.label}))}function xwe(e){var{clipPathId:t,props:n}=e,r=b.useRef(null),a=b.useRef(0),i=b.useRef(null);return b.createElement(bwe,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:a,pathRef:i})}var wwe=(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:xt(e.payload,t)}};class Swe extends b.Component{render(){var{hide:t,dot:n,points:r,className:a,xAxisId:i,yAxisId:s,top:c,left:u,width:f,height:m,id:h,needClip:p,zIndex:y}=this.props;if(t)return null;var w=ot("recharts-line",a),x=h,{r:S,strokeWidth:E}=awe(n),C=nF(n),j=S*2+E,A=p?"url(#clipPath-".concat(C?"":"dots-").concat(x,")"):void 0;return b.createElement(Pr,{zIndex:y},b.createElement(On,{className:w},p&&b.createElement("defs",null,b.createElement(gF,{clipPathId:x,xAxisId:i,yAxisId:s}),!C&&b.createElement("clipPath",{id:"clipPath-dots-".concat(x)},b.createElement("rect",{x:u-j/2,y:c-j/2,width:f+j,height:m+j}))),b.createElement(vF,{xAxisId:i,yAxisId:s,data:r,dataPointFormatter:wwe,errorBarOffset:0},b.createElement(xwe,{props:this.props,clipPathId:x}))),b.createElement(zbe,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}var EF={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:un.line,type:"linear"};function Ewe(e){var t=dn(e,EF),{activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,connectNulls:c,dot:u,hide:f,isAnimationActive:m,label:h,legendType:p,xAxisId:y,yAxisId:w,id:x}=t,S=bA(t,swe),{needClip:E}=yA(y,w),C=mA(),j=Kc(),A=sr(),T=je(K=>rwe(K,y,w,A,x));if(j!=="horizontal"&&j!=="vertical"||T==null||C==null)return null;var{height:N,width:P,x:k,y:D}=C;return b.createElement(Swe,Zh({},S,{id:x,connectNulls:c,dot:u,activeDot:n,animateNewValues:r,animationBegin:a,animationDuration:i,animationEasing:s,isAnimationActive:m,hide:f,label:h,legendType:p,xAxisId:y,yAxisId:w,points:T,layout:j,height:N,width:P,left:k,top:D,needClip:E}))}function _we(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 h=xt(f,s);if(t==="horizontal"){var p=fk({axis:n,ticks:a,bandSize:c,entry:f,index:m}),y=Lt(h)?null:r.scale.map(h);return{x:p,y:y??null,value:h,payload:f}}var w=Lt(h)?null:n.scale.map(h),x=fk({axis:r,ticks:i,bandSize:c,entry:f,index:m});return w==null||x==null?null:{x:w,y:x,value:h,payload:f}}).filter(Boolean)}function Owe(e){var t=dn(e,EF),n=sr();return b.createElement(hA,{id:t.id,type:"line"},r=>b.createElement(b.Fragment,null,b.createElement(rF,{legendPayload:dwe(t)}),b.createElement(hwe,{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}),b.createElement(iF,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),b.createElement(Ewe,Zh({},t,{id:r}))))}var _F=b.memo(Owe,Wf);_F.displayName="Line";function Xc(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:sF}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.yAxisId)!==null&&n!==void 0?n:sF}var jwe="Invariant failed";function Cwe(e,t){throw new Error(jwe)}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 xA(e){return b.createElement(lA,M_({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var Awe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,a)=>{if(Ee(t))return t;var i=Ee(r)||Lt(r);return i?t(r,a):(i||Cwe(),n)}},Nwe=(e,t,n)=>n,Twe=(e,t)=>t,Wm=oe([J0,Twe],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),Pwe=oe([Wm],e=>e==null?void 0:e.maxBarSize),Mwe=(e,t,n,r)=>r,Rwe=oe([ut,J0,Xc,Gc,Nwe],(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")),kwe=(e,t,n)=>{var r=ut(e),a=Xc(e,t),i=Gc(e,t);if(!(a==null||i==null))return r==="horizontal"?j_(e,"yAxis",i,n):j_(e,"xAxis",a,n)},Dwe=(e,t)=>{var n=ut(e),r=Xc(e,t),a=Gc(e,t);if(!(r==null||a==null))return n==="horizontal"?bI(e,"xAxis",r):bI(e,"yAxis",a)},Iwe=oe([Rwe,_fe,Dwe],$be),Lwe=(e,t,n)=>{var r,a,i=Wm(e,t);if(i==null)return 0;var s=Xc(e,t),c=Gc(e,t);if(s==null||c==null)return 0;var u=ut(e),f=B6(e),{maxBarSize:m}=i,h=Lt(m)?f:m,p,y;return u==="horizontal"?(p=il(e,"xAxis",s,n),y=al(e,"xAxis",s,n)):(p=il(e,"yAxis",c,n),y=al(e,"yAxis",c,n)),(r=(a=_f(p,y,!0))!==null&&a!==void 0?a:h)!==null&&r!==void 0?r:0},OF=(e,t,n)=>{var r=ut(e),a=Xc(e,t),i=Gc(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)),_f(s,c)}},zwe=oe([Iwe,B6,Efe,U6,Lwe,OF,Pwe],qbe),$we=(e,t,n)=>{var r=Xc(e,t);if(r!=null)return il(e,"xAxis",r,n)},Bwe=(e,t,n)=>{var r=Gc(e,t);if(r!=null)return il(e,"yAxis",r,n)},Uwe=(e,t,n)=>{var r=Xc(e,t);if(r!=null)return al(e,"xAxis",r,n)},Hwe=(e,t,n)=>{var r=Gc(e,t);if(r!=null)return al(e,"yAxis",r,n)},Fwe=oe([zwe,Wm],Vbe),qwe=oe([kwe,Wm],Kbe),Kwe=oe([jn,kj,$we,Bwe,Uwe,Hwe,Fwe,ut,gfe,OF,qwe,Wm,Mwe],(e,t,n,r,a,i,s,c,u,f,m,h,p)=>{var{chartData:y,dataStartIndex:w,dataEndIndex:x}=u;if(!(h==null||s==null||t==null||c!=="horizontal"&&c!=="vertical"||n==null||r==null||a==null||i==null||f==null)){var{data:S}=h,E;if(S!=null&&S.length>0?E=S:E=y==null?void 0:y.slice(w,x+1),E!=null)return b1e({layout:c,barSettings:h,pos:s,parentViewBox:t,bandSize:f,xAxis:n,yAxis:r,xAxisTicks:a,yAxisTicks:i,stackedData:m,displayedData:E,offset:e,cells:p,dataStartIndex:w})}}),Vwe=["index"];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 Ywe(e,t){if(e==null)return{};var n,r,a=Xwe(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 Xwe(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 jF=b.createContext(void 0),Gwe=e=>{var t=b.useContext(jF);if(t!=null)return t.stackId;if(e!=null)return vle(e)},Wwe=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),Qwe=e=>{var t=b.useContext(jF);if(t!=null){var{stackId:n}=t;return"url(#".concat(Wwe(n,e),")")}},CF=e=>{var{index:t}=e,n=Ywe(e,Vwe),r=Qwe(t);return b.createElement(On,R_({className:"recharts-bar-stack-layer",clipPath:r},n))},Zwe=["onMouseEnter","onMouseLeave","onClick"],Jwe=["value","background","tooltipPosition"],e1e=["id"],t1e=["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 ur(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){n1e(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 n1e(e,t,n){return(t=r1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r1e(e){var t=a1e(e,"string");return typeof t=="symbol"?t:t+""}function a1e(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(e,t){if(e==null)return{};var n,r,a=i1e(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 i1e(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 o1e=e=>{var{dataKey:t,name:n,fill:r,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:r,value:Gf(n,t),payload:e}]},s1e=b.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:Gf(i,t),hide:s,type:u,color:a,unit:c,graphicalItemId:f}};return b.createElement(dA,{tooltipEntrySettings:m})});function l1e(e){var t=je(ol),{data:n,dataKey:r,background:a,allOtherBarProps:i}=e,{onMouseEnter:s,onMouseLeave:c,onClick:u}=i,f=My(i,Zwe),m=cA(s,r,i.id),h=uA(c),p=fA(u,r,i.id);if(!a||n==null)return null;var y=wc(a);return b.createElement(Pr,{zIndex:Ybe(a,un.barBackground)},n.map((w,x)=>{var{value:S,background:E,tooltipPosition:C}=w,j=My(w,Jwe);if(!E)return null;var A=m(w,x),T=h(w,x),N=p(w,x),P=ur(ur(ur(ur(ur({option:a,isActive:String(x)===t},j),{},{fill:"#eee"},E),y),Am(f,w,x)),{},{onMouseEnter:A,onMouseLeave:T,onClick:N,dataKey:r,index:x,className:"recharts-bar-background-rectangle"});return b.createElement(xA,ll({key:"background-bar-".concat(x)},P))}))}function c1e(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 ur(ur({},s),{},{value:i.value,payload:i.payload,parentViewBox:i.parentViewBox,viewBox:s,fill:i.fill})});return b.createElement(YH,{value:t?a:void 0},n)}function u1e(e){var{shape:t,activeBar:n,baseProps:r,entry:a,index:i,dataKey:s}=e,c=je(ol),u=je(QC),f=n&&String(a.originalDataIndex)===c&&(u==null||s===u),[m,h]=b.useState(!1),[p,y]=b.useState(!1);b.useEffect(()=>{var j;return f?(h(!0),j=requestAnimationFrame(()=>{y(!0)})):y(!1),()=>{cancelAnimationFrame(j)}},[f]);var w=b.useCallback(()=>{f||h(!1)},[f]),x=f&&p,S=f||m,E;f?n===!0?E=t:E=n:E=t;var C=b.createElement(xA,ll({},r,{name:String(r.name)},a,{isActive:x,option:E,index:i,dataKey:s,onTransitionEnd:w}));return S?b.createElement(Pr,{zIndex:un.activeBar},b.createElement(CF,{index:a.originalDataIndex},C)):C}function f1e(e){var{shape:t,baseProps:n,entry:r,index:a,dataKey:i}=e;return b.createElement(xA,ll({},n,{name:String(n.name)},r,{isActive:!1,option:t,index:a,dataKey:i}))}function d1e(e){var t,{data:n,props:r}=e,a=(t=Qr(r))!==null&&t!==void 0?t:{},{id:i}=a,s=My(a,e1e),{shape:c,dataKey:u,activeBar:f}=r,{onMouseEnter:m,onClick:h,onMouseLeave:p}=r,y=My(r,t1e),w=cA(m,u,i),x=uA(p),S=fA(h,u,i);return n?b.createElement(b.Fragment,null,n.map((E,C)=>b.createElement(CF,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"},Am(y,E,C),{onMouseEnter:w(E,C),onMouseLeave:x(E,C),onClick:S(E,C)}),f?b.createElement(u1e,{shape:c,activeBar:f,baseProps:s,entry:E,index:C,dataKey:u}):b.createElement(f1e,{shape:c,baseProps:s,entry:E,index:C,dataKey:u})))):null}function h1e(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:a,isAnimationActive:i,animationBegin:s,animationDuration:c,animationEasing:u,onAnimationEnd:f,onAnimationStart:m}=t,h=n.current,p=Im(t,"recharts-bar-"),[y,w]=b.useState(!1),x=!y,S=b.useCallback(()=>{typeof f=="function"&&f(),w(!1)},[f]),E=b.useCallback(()=>{typeof m=="function"&&m(),w(!0)},[m]);return b.createElement(c1e,{showLabels:x,rects:r},b.createElement(Dm,{animationId:p,begin:s,duration:c,isActive:i,easing:u,onAnimationEnd:S,onAnimationStart:E,key:p},C=>{var j=C===1?r:r==null?void 0:r.map((A,T)=>{var N=h&&h[T];if(N)return ur(ur({},A),{},{x:kt(N.x,A.x,C),y:kt(N.y,A.y,C),width:kt(N.width,A.width,C),height:kt(N.height,A.height,C)});if(a==="horizontal"){var P=kt(0,A.height,C),k=kt(A.stackedBarStart,A.y,C);return ur(ur({},A),{},{y:k,height:P})}var D=kt(0,A.width,C),K=kt(A.stackedBarStart,A.x,C);return ur(ur({},A),{},{width:D,x:K})});return C>0&&(n.current=j??null),j==null?null:b.createElement(On,null,b.createElement(d1e,{props:t,data:j}))}),b.createElement(aA,{label:t.label}),t.children)}function m1e(e){var t=b.useRef(null);return b.createElement(h1e,{previousRectanglesRef:t,props:e})}var AF=0,p1e=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:xt(e,t)}};class v1e extends b.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=ot("recharts-bar",a),h=f;return b.createElement(On,{className:m,id:f},c&&b.createElement("defs",null,b.createElement(gF,{clipPathId:h,xAxisId:i,yAxisId:s})),b.createElement(On,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(h,")"):void 0},b.createElement(l1e,{data:n,dataKey:r,background:u,allOtherBarProps:this.props}),b.createElement(m1e,this.props)))}}var g1e={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:AF,xAxisId:0,yAxisId:0,zIndex:un.bar};function y1e(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:c,animationDuration:u,animationEasing:f,isAnimationActive:m}=e,{needClip:h}=yA(t,n),p=Kc(),y=sr(),w=sA(e.children,Gm),x=je(C=>Kwe(C,e.id,y,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,b.createElement(vF,{xAxisId:t,yAxisId:n,data:x,dataPointFormatter:p1e,errorBarOffset:S},b.createElement(v1e,ll({},e,{layout:p,needClip:h,data:x,xAxisId:t,yAxisId:n,hide:r,legendType:a,minPointSize:i,activeBar:s,animationBegin:c,animationDuration:u,animationEasing:f,isAnimationActive:m})))}function b1e(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:a},pos:i,bandSize:s,xAxis:c,yAxis:u,xAxisTicks:f,yAxisTicks:m,stackedData:h,displayedData:p,offset:y,cells:w,parentViewBox:x,dataStartIndex:S}=e,E=t==="horizontal"?u:c,C=h?E.scale.domain():null,j=gle({numericAxis:E}),A=E.scale.map(j);return p.map((T,N)=>{var P,k,D,K,B,L;if(h){var W=h[N+S];if(W==null)return null;P=fle(W,C)}else P=xt(T,n),Array.isArray(P)||(P=[j,P]);var $=Awe(r,AF)(P[1],N);if(t==="horizontal"){var Y,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=(Y=H??R)!==null&&Y!==void 0?Y:void 0,K=i.size;var q=R-H;if(B=Ai(q)?0:q,L={x:k,y:y.top,width:K,height:y.height},Math.abs($)>0&&Math.abs(B)<Math.abs($)){var F=kn(B||$)*(Math.abs($)-Math.abs(B));D-=F,B+=F}}else{var V=c.scale.map(P[0]),I=c.scale.map(P[1]);if(V==null||I==null)return null;if(k=V,D=dk({axis:u,ticks:m,bandSize:s,offset:i.offset,entry:T,index:N}),K=I-V,B=i.size,L={x:y.left,y:D,width:y.width,height:B},Math.abs($)>0&&Math.abs(K)<Math.abs($)){var z=kn(K||$)*(Math.abs($)-Math.abs(K));K+=z}}if(k==null||D==null||K==null||B==null||!a&&(K===0||B===0))return null;var X=ur(ur({},T),{},{stackedBarStart:A,x:k,y:D,width:K,height:B,value:h?P:P[1],payload:T,background:L,tooltipPosition:{x:k+K/2,y:D+B/2},parentViewBox:x,originalDataIndex:N},w&&w[N]&&w[N].props);return X}).filter(Boolean)}function x1e(e){var t=dn(e,g1e),n=Gwe(t.stackId),r=sr();return b.createElement(hA,{id:t.id,type:"bar"},a=>b.createElement(b.Fragment,null,b.createElement(rF,{legendPayload:o1e(t)}),b.createElement(s1e,{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}),b.createElement(iF,{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}),b.createElement(Pr,{zIndex:t.zIndex},b.createElement(y1e,ll({},t,{id:a})))))}var k_=b.memo(x1e,Wf);k_.displayName="Bar";var w1e=["domain","range"],S1e=["domain","range"];function PL(e,t){if(e==null)return{};var n,r,a=E1e(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 E1e(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 NF(e,t){if(e===t)return!0;var{domain:n,range:r}=e,a=PL(e,w1e),{domain:i,range:s}=t,c=PL(t,S1e);return!ML(n,i)||!ML(r,s)?!1:Wf(a,c)}var _1e=["type"],O1e=["dangerouslySetInnerHTML","ticks","scale"],j1e=["id","scale"];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 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){C1e(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 C1e(e,t,n){return(t=A1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A1e(e){var t=N1e(e,"string");return typeof t=="symbol"?t:t+""}function N1e(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 I_(e,t){if(e==null)return{};var n,r,a=T1e(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 T1e(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 P1e(e){var t=wt(),n=b.useRef(null),r=a6(),{type:a}=e,i=I_(e,_1e),s=H0(r,"xAxis",a),c=b.useMemo(()=>{if(s!=null)return kL(kL({},i),{},{type:s})},[i,s]);return b.useLayoutEffect(()=>{c!=null&&(n.current===null?t(Ebe(c)):n.current!==c&&t(_be({prev:n.current,next:c})),n.current=c)},[c,t]),b.useLayoutEffect(()=>()=>{n.current&&(t(Obe(n.current)),n.current=null)},[t]),null}var M1e=e=>{var{xAxisId:t,className:n}=e,r=je(kj),a=sr(),i="xAxis",s=je(E=>rH(E,i,t,a)),c=je(E=>eH(E,t)),u=je(E=>cpe(E,t)),f=je(E=>DU(E,t));if(c==null||u==null||f==null)return null;var{dangerouslySetInnerHTML:m,ticks:h,scale:p}=e,y=I_(e,O1e),{id:w,scale:x}=f,S=I_(f,j1e);return b.createElement(vA,D_({},y,S,{x:u.x,y:u.y,width:c.width,height:c.height,className:ot("recharts-".concat(i," ").concat(i),n),viewBox:r,ticks:s,axisType:i,axisId:t}))},R1e={allowDataOverflow:bn.allowDataOverflow,allowDecimals:bn.allowDecimals,allowDuplicatedCategory:bn.allowDuplicatedCategory,angle:bn.angle,axisLine:wo.axisLine,height:bn.height,hide:!1,includeHidden:bn.includeHidden,interval:bn.interval,label:!1,minTickGap:bn.minTickGap,mirror:bn.mirror,orientation:bn.orientation,padding:bn.padding,reversed:bn.reversed,scale:bn.scale,tick:bn.tick,tickCount:bn.tickCount,tickLine:wo.tickLine,tickSize:wo.tickSize,type:bn.type,niceTicks:bn.niceTicks,xAxisId:0},k1e=e=>{var t=dn(e,R1e);return b.createElement(b.Fragment,null,b.createElement(P1e,{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}),b.createElement(M1e,t))},wA=b.memo(k1e,NF);wA.displayName="XAxis";var D1e=["type"],I1e=["dangerouslySetInnerHTML","ticks","scale"],L1e=["id","scale"];function L_(){return L_=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},L_.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){z1e(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 z1e(e,t,n){return(t=$1e(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $1e(e){var t=B1e(e,"string");return typeof t=="symbol"?t:t+""}function B1e(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 z_(e,t){if(e==null)return{};var n,r,a=U1e(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 U1e(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 H1e(e){var t=wt(),n=b.useRef(null),r=a6(),{type:a}=e,i=z_(e,D1e),s=H0(r,"yAxis",a),c=b.useMemo(()=>{if(s!=null)return IL(IL({},i),{},{type:s})},[s,i]);return b.useLayoutEffect(()=>{c!=null&&(n.current===null?t(jbe(c)):n.current!==c&&t(Cbe({prev:n.current,next:c})),n.current=c)},[c,t]),b.useLayoutEffect(()=>()=>{n.current&&(t(Abe(n.current)),n.current=null)},[t]),null}function F1e(e){var{yAxisId:t,className:n,width:r,label:a}=e,i=b.useRef(null),s=b.useRef(null),c=je(kj),u=sr(),f=wt(),m="yAxis",h=je(N=>tH(N,t)),p=je(N=>fpe(N,t)),y=je(N=>rH(N,m,t,u)),w=je(N=>IU(N,t));if(b.useLayoutEffect(()=>{if(!(r!=="auto"||!h||rA(a)||b.isValidElement(a)||w==null)){var N=i.current;if(N){var P=N.getCalculatedWidth();Math.round(h.width)!==Math.round(P)&&f(Nbe({id:t,width:P}))}}},[y,h,f,a,t,r,w]),h==null||p==null||w==null)return null;var{dangerouslySetInnerHTML:x,ticks:S,scale:E}=e,C=z_(e,I1e),{id:j,scale:A}=w,T=z_(w,L1e);return b.createElement(vA,L_({},C,T,{ref:i,labelRef:s,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:h.width,height:h.height,className:ot("recharts-".concat(m," ").concat(m),n),viewBox:c,ticks:y,axisType:m,axisId:t}))}var q1e={allowDataOverflow:xn.allowDataOverflow,allowDecimals:xn.allowDecimals,allowDuplicatedCategory:xn.allowDuplicatedCategory,angle:xn.angle,axisLine:wo.axisLine,hide:!1,includeHidden:xn.includeHidden,interval:xn.interval,label:!1,minTickGap:xn.minTickGap,mirror:xn.mirror,orientation:xn.orientation,padding:xn.padding,reversed:xn.reversed,scale:xn.scale,tick:xn.tick,tickCount:xn.tickCount,tickLine:wo.tickLine,tickSize:wo.tickSize,type:xn.type,niceTicks:xn.niceTicks,width:xn.width,yAxisId:0},K1e=e=>{var t=dn(e,q1e);return b.createElement(b.Fragment,null,b.createElement(H1e,{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}),b.createElement(F1e,t))},SA=b.memo(K1e,NF);SA.displayName="YAxis";var V1e=(e,t)=>t,EA=oe([V1e,ut,X6,zn,xH,Uo,Rve,jn],Bve);function Y1e(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function _A(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(Y1e(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 TF=Zr("mouseClick"),PF=Tm();PF.startListening({actionCreator:TF,effect:(e,t)=>{var n=e.payload,r=EA(t.getState(),_A(n));(r==null?void 0:r.activeIndex)!=null&&t.dispatch(Cpe({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var $_=Zr("mouseMove"),MF=Tm(),Bu=null,Ul=null,LS=null;MF.startListening({actionCreator:$_,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"));Bu!==null&&(cancelAnimationFrame(Bu),Bu=null),Ul!==null&&(typeof a!="number"||!s)&&(clearTimeout(Ul),Ul=null),LS=_A(n);var c=()=>{var u=t.getState(),f=KC(u,u.tooltip.settings.shared);if(!LS){Bu=null,Ul=null;return}if(f==="axis"){var m=EA(u,LS);(m==null?void 0:m.activeIndex)!=null?t.dispatch(fH({activeIndex:m.activeIndex,activeDataKey:void 0,activeCoordinate:m.activeCoordinate})):t.dispatch(uH())}Bu=null,Ul=null};if(!s){c();return}a==="raf"?Bu=requestAnimationFrame(c):typeof a=="number"&&Ul===null&&(Ul=setTimeout(c,a))}});function X1e(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},RF=or({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}}}),G1e=RF.reducer,{updateOptions:W1e}=RF.actions,Q1e=null,Z1e={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)},kF=or({name:"polarOptions",initialState:Q1e,reducers:Z1e}),{updatePolarOptions:J1e}=kF.actions,eSe=kF.reducer,DF=Zr("keyDown"),IF=Zr("focus"),LF=Zr("blur"),lb=Tm(),Uu=null,Hl=null,Xv=null;lb.startListening({actionCreator:DF,effect:(e,t)=>{Xv=e.payload,Uu!==null&&(cancelAnimationFrame(Uu),Uu=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=Xv;if(m!=="ArrowRight"&&m!=="ArrowLeft"&&m!=="Enter")return;var h=VC(f,ad(c),Km(c),Ym(c)),p=h==null?-1:Number(h);if(!Number.isFinite(p)||p<0)return;var y=Uo(c);if(m==="Enter"){var w=jy(c,"axis","hover",String(f.index));t.dispatch(Oy({active:!f.active,activeIndex:f.index,activeCoordinate:w}));return}var x=vpe(c),S=x==="left-to-right"?1:-1,E=m==="ArrowRight"?1:-1,C=p+E*S;if(y==null||C>=y.length||C<0)return;var j=jy(c,"axis","hover",String(C));t.dispatch(Oy({active:!0,activeIndex:C.toString(),activeCoordinate:j}))}finally{Uu=null,Hl=null}};if(!i){s();return}r==="raf"?Uu=requestAnimationFrame(s):typeof r=="number"&&Hl===null&&(s(),Xv=null,Hl=setTimeout(()=>{Xv?s():(Hl=null,Uu=null)},r))}});lb.startListening({actionCreator:IF,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=jy(n,"axis","hover",String(i));t.dispatch(Oy({active:!0,activeIndex:i,activeCoordinate:s}))}}}});lb.startListening({actionCreator:LF,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:a}=n.tooltip;a.active&&t.dispatch(Oy({active:!1,activeIndex:a.index,activeCoordinate:a.coordinate}))}}});function zF(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 pa=Zr("externalEvent"),$F=Tm(),Gv=new Map,hh=new Map,zS=new Map;$F.startListening({actionCreator:pa,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(n!=null){var a=r.type,i=zF(r);zS.set(a,{handler:n,reactEvent:i});var s=Gv.get(a);s!==void 0&&(cancelAnimationFrame(s),Gv.delete(a));var c=t.getState(),{throttleDelay:u,throttledEvents:f}=c.eventSettings,m=f,h=m==="all"||(m==null?void 0:m.includes(a)),p=hh.get(a);p!==void 0&&(typeof u!="number"||!h)&&(clearTimeout(p),hh.delete(a));var y=()=>{var S=zS.get(a);try{if(!S)return;var{handler:E,reactEvent:C}=S,j=t.getState(),A={activeCoordinate:gve(j),activeDataKey:QC(j),activeIndex:ol(j),activeLabel:EH(j),activeTooltipIndex:ol(j),isTooltipActive:yve(j)};E&&E(A,C)}finally{Gv.delete(a),hh.delete(a),zS.delete(a)}};if(!h){y();return}if(u==="raf"){var w=requestAnimationFrame(y);Gv.set(a,w)}else if(typeof u=="number"){if(!hh.has(a)){y();var x=setTimeout(y,u);hh.set(a,x)}}else y()}}});var tSe=oe([nd],e=>e.tooltipItemPayloads),nSe=oe([tSe,(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)}}}),BF=Zr("touchMove"),UF=Tm(),Fl=null,_s=null,zL=null,mh=null;UF.startListening({actionCreator:BF,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){mh=zF(n);var r=t.getState(),{throttleDelay:a,throttledEvents:i}=r.eventSettings,s=i==="all"||i.includes("touchmove");Fl!==null&&(cancelAnimationFrame(Fl),Fl=null),_s!==null&&(typeof a!="number"||!s)&&(clearTimeout(_s),_s=null),zL=Array.from(n.touches).map(u=>_A({clientX:u.clientX,clientY:u.clientY,currentTarget:n.currentTarget}));var c=()=>{if(mh!=null){var u=t.getState(),f=KC(u,u.tooltip.settings.shared);if(f==="axis"){var m,h=(m=zL)===null||m===void 0?void 0:m[0];if(h==null){Fl=null,_s=null;return}var p=EA(u,h);(p==null?void 0:p.activeIndex)!=null&&t.dispatch(fH({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate}))}else if(f==="item"){var y,w=mh.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(Z8),E=(y=x.getAttribute(J8))!==null&&y!==void 0?y:void 0,C=rd(u).find(T=>T.id===E);if(S==null||C==null||E==null)return;var{dataKey:j}=C,A=nSe(u,S,E);t.dispatch(cH({activeDataKey:j,activeIndex:S,activeCoordinate:A,activeGraphicalItemId:E}))}Fl=null,_s=null}};if(!s){c();return}a==="raf"?Fl=requestAnimationFrame(c):typeof a=="number"&&_s===null&&(c(),mh=null,_s=setTimeout(()=>{mh?c():(_s=null,Fl=null)},a))}}});var OA={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},HF=or({name:"eventSettings",initialState:OA,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:rSe}=HF.actions,aSe=HF.reducer,iSe=x8({brush:Xbe,cartesianAxis:Tbe,chartData:gge,errorBars:Yxe,eventSettings:aSe,graphicalItems:k0e,layout:ole,legend:hce,options:dge,polarAxis:Yye,polarOptions:eSe,referenceElements:Zbe,renderedTicks:pxe,rootProps:G1e,tooltip:Ape,zIndex:ege}),oSe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Pse({reducer:iSe,preloadedState:t,middleware:r=>{var a;return r({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((a="es6")!==null&&a!==void 0?a:"")}).concat([PF.middleware,MF.middleware,lb.middleware,$F.middleware,UF.middleware])},enhancers:r=>{var a=r;return typeof r=="function"&&(a=r()),a.concat(D8({type:"raf"}))},devTools:{serialize:{replacer:X1e},name:"recharts-".concat(n)}})};function FF(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,a=sr(),i=b.useRef(null);if(a)return n;i.current==null&&(i.current=oSe(t,r));var s=Cj;return b.createElement(Nce,{context:s,store:i.current},n)}function sSe(e){var{layout:t,margin:n}=e,r=wt(),a=sr();return b.useEffect(()=>{a||(r(rle(t)),r(nle(n)))},[r,a,t,n]),null}var qF=b.memo(sSe,Wf);function KF(e){var t=wt();return b.useEffect(()=>{t(W1e(e))},[t,e]),null}var lSe=e=>{var t=wt();return b.useEffect(()=>{t(rSe(e))},[t,e]),null},VF=b.memo(lSe,Wf);function $L(e){var{zIndex:t,isPanorama:n}=e,r=b.useRef(null),a=wt();return b.useLayoutEffect(()=>(r.current&&a(Zve({zIndex:t,element:r.current,isPanorama:n})),()=>{a(Jve({zIndex:t,isPanorama:n}))}),[a,t,n]),b.createElement("g",{tabIndex:-1,ref:r,className:"recharts-zIndex-layer_".concat(t)})}function BL(e){var{children:t,isPanorama:n}=e,r=je(Hve);if(!r||r.length===0)return t;var a=r.filter(s=>s<0),i=r.filter(s=>s>0);return b.createElement(b.Fragment,null,a.map(s=>b.createElement($L,{key:s,zIndex:s,isPanorama:n})),t,i.map(s=>b.createElement($L,{key:s,zIndex:s,isPanorama:n})))}var cSe=["children"];function uSe(e,t){if(e==null)return{};var n,r,a=fSe(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 fSe(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 Ry(){return Ry=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},Ry.apply(null,arguments)}var dSe={width:"100%",height:"100%",display:"block"},hSe=b.forwardRef((e,t)=>{var n=zj(),r=$j(),a=y6();if(!Ti(n)||!Ti(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),b.createElement(gj,Ry({},s,{title:c,desc:u,role:m,tabIndex:f,width:n,height:r,style:dSe,ref:t}),i)}),mSe=e=>{var{children:t}=e,n=je(D0);if(!n)return null;var{width:r,height:a,y:i,x:s}=n;return b.createElement(gj,{width:r,height:a,x:s,y:i},t)},UL=b.forwardRef((e,t)=>{var{children:n}=e,r=uSe(e,cSe),a=sr();return a?b.createElement(mSe,null,b.createElement(BL,{isPanorama:!0},n)):b.createElement(hSe,Ry({ref:t},r),b.createElement(BL,{isPanorama:!1},n))});function pSe(){var e=wt(),[t,n]=b.useState(null),r=je(Ele);return b.useEffect(()=>{if(t!=null){var a=t.getBoundingClientRect(),i=a.width/t.offsetWidth;at(i)&&i!==r&&e(ile(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 vSe(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){gSe(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 gSe(e,t,n){return(t=ySe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ySe(e){var t=bSe(e,"string");return typeof t=="symbol"?t:t+""}function bSe(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 Ys(){return Ys=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ys.apply(null,arguments)}var xSe=()=>(jge(),null);function ky(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var wSe=b.forwardRef((e,t)=>{var n,r,a=b.useRef(null),[i,s]=b.useState({containerWidth:ky((n=e.style)===null||n===void 0?void 0:n.width),containerHeight:ky((r=e.style)===null||r===void 0?void 0:r.height)}),c=b.useCallback((f,m)=>{s(h=>{var p=Math.round(f),y=Math.round(m);return h.containerWidth===p&&h.containerHeight===y?h:{containerWidth:p,containerHeight:y}})},[]),u=b.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null&&typeof ResizeObserver<"u"){var{width:m,height:h}=f.getBoundingClientRect();c(m,h);var p=w=>{var x=w[0];if(x!=null){var{width:S,height:E}=x.contentRect;c(S,E)}},y=new ResizeObserver(p);y.observe(f),a.current=y}},[t,c]);return b.useEffect(()=>()=>{var f=a.current;f!=null&&f.disconnect()},[c]),b.createElement(b.Fragment,null,b.createElement(Mm,{width:i.containerWidth,height:i.containerHeight}),b.createElement("div",Ys({ref:u},e)))}),SSe=b.forwardRef((e,t)=>{var{width:n,height:r}=e,[a,i]=b.useState({containerWidth:ky(n),containerHeight:ky(r)}),s=b.useCallback((u,f)=>{i(m=>{var h=Math.round(u),p=Math.round(f);return m.containerWidth===h&&m.containerHeight===p?m:{containerWidth:h,containerHeight:p}})},[]),c=b.useCallback(u=>{if(typeof t=="function"&&t(u),u!=null){var{width:f,height:m}=u.getBoundingClientRect();s(f,m)}},[t,s]);return b.createElement(b.Fragment,null,b.createElement(Mm,{width:a.containerWidth,height:a.containerHeight}),b.createElement("div",Ys({ref:c},e)))}),ESe=b.forwardRef((e,t)=>{var{width:n,height:r}=e;return b.createElement(b.Fragment,null,b.createElement(Mm,{width:n,height:r}),b.createElement("div",Ys({ref:t},e)))}),_Se=b.forwardRef((e,t)=>{var{width:n,height:r}=e;return typeof n=="string"||typeof r=="string"?b.createElement(SSe,Ys({},e,{ref:t})):typeof n=="number"&&typeof r=="number"?b.createElement(ESe,Ys({},e,{width:n,height:r,ref:t})):b.createElement(b.Fragment,null,b.createElement(Mm,{width:n,height:r}),b.createElement("div",Ys({ref:t},e)))});function OSe(e){return e?wSe:_Se}var jSe=b.forwardRef((e,t)=>{var{children:n,className:r,height:a,onClick:i,onContextMenu:s,onDoubleClick:c,onMouseDown:u,onMouseEnter:f,onMouseLeave:m,onMouseMove:h,onMouseUp:p,onTouchEnd:y,onTouchMove:w,onTouchStart:x,style:S,width:E,responsive:C,dispatchTouchEvents:j=!0}=e,A=b.useRef(null),T=wt(),[N,P]=b.useState(null),[k,D]=b.useState(null),K=pSe(),B=Dj(),L=(B==null?void 0:B.width)>0?B.width:E,W=(B==null?void 0:B.height)>0?B.height:a,$=b.useCallback(ce=>{K(ce),typeof t=="function"&&t(ce),P(ce),D(ce),ce!=null&&(A.current=ce)},[K,t,P,D]),Y=b.useCallback(ce=>{T(TF(ce)),T(pa({handler:i,reactEvent:ce}))},[T,i]),R=b.useCallback(ce=>{T($_(ce)),T(pa({handler:f,reactEvent:ce}))},[T,f]),H=b.useCallback(ce=>{T(uH()),T(pa({handler:m,reactEvent:ce}))},[T,m]),q=b.useCallback(ce=>{T($_(ce)),T(pa({handler:h,reactEvent:ce}))},[T,h]),F=b.useCallback(()=>{T(IF())},[T]),V=b.useCallback(()=>{T(LF())},[T]),I=b.useCallback(ce=>{T(DF(ce.key))},[T]),z=b.useCallback(ce=>{T(pa({handler:s,reactEvent:ce}))},[T,s]),X=b.useCallback(ce=>{T(pa({handler:c,reactEvent:ce}))},[T,c]),Z=b.useCallback(ce=>{T(pa({handler:u,reactEvent:ce}))},[T,u]),ee=b.useCallback(ce=>{T(pa({handler:p,reactEvent:ce}))},[T,p]),se=b.useCallback(ce=>{T(pa({handler:x,reactEvent:ce}))},[T,x]),ie=b.useCallback(ce=>{j&&T(BF(ce)),T(pa({handler:w,reactEvent:ce}))},[T,j,w]),re=b.useCallback(ce=>{T(pa({handler:y,reactEvent:ce}))},[T,y]),J=OSe(C);return b.createElement(PH.Provider,{value:N},b.createElement(kB.Provider,{value:k},b.createElement(J,{width:L??(S==null?void 0:S.width),height:W??(S==null?void 0:S.height),className:ot("recharts-wrapper",r),style:vSe({position:"relative",cursor:"default",width:L,height:W},S),onClick:Y,onContextMenu:z,onDoubleClick:X,onFocus:F,onBlur:V,onKeyDown:I,onMouseDown:Z,onMouseEnter:R,onMouseLeave:H,onMouseMove:q,onMouseUp:ee,onTouchEnd:re,onTouchMove:ie,onTouchStart:se,ref:$},b.createElement(xSe,null),n)))}),CSe=["width","height","responsive","children","className","style","compact","title","desc"];function ASe(e,t){if(e==null)return{};var n,r,a=NSe(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 NSe(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 YF=b.forwardRef((e,t)=>{var{width:n,height:r,responsive:a,children:i,className:s,style:c,compact:u,title:f,desc:m}=e,h=ASe(e,CSe),p=Qr(h);return u?b.createElement(b.Fragment,null,b.createElement(Mm,{width:n,height:r}),b.createElement(UL,{otherAttributes:p,title:f,desc:m},i)):b.createElement(jSe,{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},b.createElement(UL,{otherAttributes:p,title:f,desc:m,ref:t},b.createElement(exe,null,i)))});function B_(){return B_=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},B_.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 TSe(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){PSe(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 PSe(e,t,n){return(t=MSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MSe(e){var t=RSe(e,"string");return typeof t=="symbol"?t:t+""}function RSe(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 kSe={top:5,right:5,bottom:5,left:5},DSe=TSe({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:kSe,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},OA),XF=b.forwardRef(function(t,n){var r,a=dn(t.categoricalChartProps,DSe),{chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:u,categoricalChartProps:f}=t,m={chartName:i,defaultTooltipEventType:s,validateTooltipEventTypes:c,tooltipPayloadSearcher:u,eventEmitter:void 0};return b.createElement(FF,{preloadedState:{options:m},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:i},b.createElement(cF,{chartData:f.data}),b.createElement(qF,{layout:a.layout,margin:a.margin}),b.createElement(VF,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),b.createElement(KF,{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}),b.createElement(YF,B_({},a,{ref:n})))}),ISe=["axis"],LSe=b.forwardRef((e,t)=>b.createElement(XF,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ISe,tooltipPayloadSearcher:nA,categoricalChartProps:e,ref:t})),zSe=["axis","item"],$Se=b.forwardRef((e,t)=>b.createElement(XF,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:zSe,tooltipPayloadSearcher:nA,categoricalChartProps:e,ref:t}));function BSe(e){var t=wt();return b.useEffect(()=>{t(J1e(e))},[t,e]),null}var USe=["layout"];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 HSe(e,t){if(e==null)return{};var n,r,a=FSe(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 FSe(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 qSe(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){KSe(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 KSe(e,t,n){return(t=VSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VSe(e){var t=YSe(e,"string");return typeof t=="symbol"?t:t+""}function YSe(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 XSe={top:5,right:5,bottom:5,left:5},GF=qSe({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:XSe,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},OA),GSe=b.forwardRef(function(t,n){var r,a=dn(t.categoricalChartProps,GF),{layout:i}=a,s=HSe(a,USe),{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:m}=t,h={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:m,eventEmitter:void 0};return b.createElement(FF,{preloadedState:{options:h},reduxStoreName:(r=a.id)!==null&&r!==void 0?r:c},b.createElement(cF,{chartData:a.data}),b.createElement(qF,{layout:i,margin:a.margin}),b.createElement(VF,{throttleDelay:a.throttleDelay,throttledEvents:a.throttledEvents}),b.createElement(KF,{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}),b.createElement(BSe,{cx:a.cx,cy:a.cy,startAngle:a.startAngle,endAngle:a.endAngle,innerRadius:a.innerRadius,outerRadius:a.outerRadius}),b.createElement(YF,U_({},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){WSe(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 WSe(e,t,n){return(t=QSe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QSe(e){var t=ZSe(e,"string");return typeof t=="symbol"?t:t+""}function ZSe(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 JSe=["item"],eEe=VL(VL({},GF),{},{layout:"centric",startAngle:0,endAngle:360}),tEe=b.forwardRef((e,t)=>{var n=dn(e,eEe);return b.createElement(GSe,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:JSe,tooltipPayloadSearcher:nA,categoricalChartProps:n,ref:t})});function nEe({completed:e,failed:t}){const n=e+t;if(n===0)return g.jsx("div",{className:"flex h-full items-center justify-center",children:g.jsxs("div",{className:"relative h-32 w-32",children:[g.jsx("svg",{viewBox:"0 0 100 100",className:"h-full w-full",children:g.jsx("circle",{cx:"50",cy:"50",r:"40",fill:"none",stroke:"hsl(var(--muted))",strokeWidth:"12"})}),g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.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 g.jsxs("div",{className:"relative flex h-full items-center justify-center",children:[g.jsx(Ij,{width:140,height:140,children:g.jsx(tEe,{children:g.jsx(oF,{data:a,cx:"50%",cy:"50%",innerRadius:40,outerRadius:56,dataKey:"value",strokeWidth:0,children:a.map((s,c)=>g.jsx(Gm,{fill:i[c]},c))})})}),g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.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 rEe({data:e}){return e.some(n=>n.total>0)?g.jsx(Ij,{width:"100%",height:280,children:g.jsxs($Se,{data:e,margin:{top:8,right:8,left:-16,bottom:0},children:[g.jsx(gA,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),g.jsx(wA,{dataKey:"date",tickFormatter:YL,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),g.jsx(SA,{allowDecimals:!1,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),g.jsx(kH,{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))}),g.jsx(v6,{wrapperStyle:{fontSize:12,paddingTop:8}}),g.jsx(k_,{dataKey:"completed",name:"Completed",stackId:"a",fill:"#2e7d32",radius:[0,0,0,0]}),g.jsx(k_,{dataKey:"failed",name:"Failed",stackId:"a",fill:"#c62828",radius:[2,2,0,0]})]})}):g.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 aEe(e){return e<6e4?`${Math.round(e/1e3)}s`:`${(e/6e4).toFixed(1)}m`}function iEe({data:e}){if(e.filter(r=>r.avg_duration_ms!==null).length===0)return g.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 g.jsx(Ij,{width:"100%",height:280,children:g.jsxs(LSe,{data:n,margin:{top:8,right:8,left:-16,bottom:0},children:[g.jsx(gA,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}),g.jsx(wA,{dataKey:"date",tickFormatter:XL,tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),g.jsx(SA,{tick:{fontSize:12,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,tickFormatter:r=>`${r.toFixed(0)}m`}),g.jsx(kH,{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=>[aEe(Number(r)*6e4),"Avg Duration"]}),g.jsx(_F,{type:"monotone",dataKey:"avg_minutes",name:"Avg Duration",stroke:"#1565c0",strokeWidth:2,dot:{r:3,fill:"#1565c0"},connectNulls:!0})]})})}const oEe=["7d","30d","90d"];function sEe(e){return e===null?"—":e<6e4?`${Math.round(e/1e3)}s`:`${(e/6e4).toFixed(1)}m`}function lEe({projectId:e}){const[t,n]=b.useState("30d"),{data:r,isLoading:a}=Xae(e,t);return a?g.jsxs("div",{className:"space-y-4",children:[g.jsx(Xt,{className:"h-8 w-48"}),g.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[g.jsx(Xt,{className:"h-32"}),g.jsx(Xt,{className:"h-32"}),g.jsx(Xt,{className:"h-32"})]}),g.jsx(Xt,{className:"h-72"})]}):r?g.jsxs("div",{className:"space-y-6",children:[g.jsx("div",{className:"flex gap-1",children:oEe.map(i=>g.jsx(De,{size:"sm",variant:t===i?"default":"outline",onClick:()=>n(i),children:i},i))}),g.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[g.jsxs(Sn,{children:[g.jsx(Ku,{className:"pb-2",children:g.jsx(Vu,{className:"text-sm font-medium text-muted-foreground",children:"Total Runs"})}),g.jsxs(En,{children:[g.jsx("div",{className:"text-3xl font-bold",children:r.total_runs}),g.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[r.completed," completed · ",r.failed," failed"]})]})]}),g.jsxs(Sn,{children:[g.jsx(Ku,{className:"pb-2",children:g.jsx(Vu,{className:"text-sm font-medium text-muted-foreground",children:"Success Rate"})}),g.jsx(En,{className:"h-36",children:g.jsx(nEe,{completed:r.completed,failed:r.failed})})]}),g.jsxs(Sn,{children:[g.jsx(Ku,{className:"pb-2",children:g.jsx(Vu,{className:"text-sm font-medium text-muted-foreground",children:"Avg Duration"})}),g.jsxs(En,{children:[g.jsx("div",{className:"text-3xl font-bold",children:sEe(r.avg_duration_ms)}),g.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"per session"})]})]})]}),g.jsxs(Sn,{children:[g.jsx(Ku,{children:g.jsx(Vu,{className:"text-base",children:"Run Frequency"})}),g.jsx(En,{children:g.jsx(rEe,{data:r.daily})})]}),g.jsxs(Sn,{children:[g.jsx(Ku,{children:g.jsx(Vu,{className:"text-base",children:"Duration Trends"})}),g.jsx(En,{children:g.jsx(iEe,{data:r.daily})})]})]}):null}function jA({className:e,orientation:t="horizontal",...n}){return g.jsx(UJ,{"data-slot":"tabs","data-orientation":t,orientation:t,className:Ae("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const cEe=v0("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 g.jsx(HJ,{"data-slot":"tabs-list","data-variant":t,className:Ae(cEe({variant:t}),e),...n})}function Ua({className:e,...t}){return g.jsx(FJ,{"data-slot":"tabs-trigger",className:Ae("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 Ha({className:e,...t}){return g.jsx(qJ,{"data-slot":"tabs-content",className:Ae("flex-1 outline-none",e),...t})}function uEe(){return g.jsxs("div",{className:"space-y-6",children:[g.jsx(Xt,{className:"h-8 w-48"}),g.jsx(Xt,{className:"h-24 rounded-lg"}),g.jsx(Xt,{className:"h-64 rounded-lg"})]})}const GL={roles:"Role",skills:"Skill",agents:"Agent",memories:"Memory"};function fEe(){const{projectId:e}=rO(),t=Number(e),n=hB(t),[r,a]=b.useState(1),i=ere(t,r),s=NB(t),[c,u]=b.useState(!1),[f,m]=b.useState(!1),[h,p]=b.useState("sessions"),y=n.isLoading||i.isLoading,w=n.error||i.error;if(y)return g.jsx(uEe,{});if(w)return g.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[g.jsx(Zs,{className:"h-4 w-4"}),g.jsxs("span",{children:["Error: ",w.message]})]});if(!n.data)return g.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[g.jsx(Zs,{className:"h-4 w-4"}),g.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,j=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 g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:x.display_name}),g.jsxs("div",{className:"flex gap-2",children:[g.jsxs(De,{onClick:()=>u(!0),disabled:!x.dir_exists,children:[g.jsx(sj,{className:"mr-2 h-4 w-4"}),"Launch Session"]}),g.jsxs(De,{variant:"outline",onClick:()=>{p("resources"),m(!0)},children:[g.jsx(m0,{className:"mr-2 h-4 w-4"}),"Install Resource"]}),g.jsx(De,{variant:"outline",asChild:!0,children:g.jsxs(Va,{to:"/projects",children:[g.jsx(J$,{className:"mr-2 h-4 w-4"}),"Back"]})})]})]}),g.jsx(Sn,{children:g.jsx(En,{className:"pt-6",children:g.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Directory"}),g.jsxs("dd",{className:"flex items-center gap-2 break-all",children:[x.working_dir,x.dir_exists?g.jsx(_n,{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"}):g.jsx(_n,{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"})]}),g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Created"}),g.jsx("dd",{children:new Date(x.created_at).toLocaleString()}),g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Resources"}),g.jsx("dd",{children:A.length===0?g.jsx("span",{className:"text-sm text-muted-foreground",children:"None installed"}):g.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(T).map(([N,P])=>g.jsxs(_n,{variant:"secondary",className:"cursor-pointer text-xs",onClick:()=>p("resources"),children:[P," ",P===1?GL[N]??N:`${GL[N]??N}s`]},N))})})]})})}),g.jsx(wae,{projectId:t,open:c,onOpenChange:u}),g.jsx(pj,{open:f,onOpenChange:m,projectId:t}),g.jsxs(jA,{value:h,onValueChange:p,children:[g.jsxs(CA,{children:[g.jsxs(Ua,{value:"sessions",children:["Sessions (",C,")"]}),g.jsx(Ua,{value:"activity",children:"Activity"}),g.jsxs(Ua,{value:"resources",children:["Resources (",A.length,")"]}),g.jsx(Ua,{value:"files",children:"Files"})]}),g.jsx(Ha,{value:"sessions",className:"mt-4 space-y-3",children:C===0?g.jsx("p",{className:"text-sm italic text-muted-foreground",children:"No sessions yet."}):g.jsxs(g.Fragment,{children:[g.jsx(Sn,{children:g.jsx(En,{className:"p-0",children:g.jsx(BE,{sessions:E})})}),g.jsx(mae,{page:r,totalPages:j,onPageChange:a})]})}),g.jsx(Ha,{value:"activity",className:"mt-4",children:g.jsx(lEe,{projectId:t})}),g.jsx(Ha,{value:"resources",className:"mt-4",children:g.jsx(Yae,{projectId:t,installOpen:f,onInstallOpenChange:m})}),g.jsx(Ha,{value:"files",className:"mt-4",children:g.jsx(Eae,{projectId:t})})]})]})}function hn(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=hn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var dEe={value:()=>{}};function cb(){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 gg(n)}function gg(e){this._=e}function hEe(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}})}gg.prototype=cb.prototype={constructor:gg,on:function(e,t){var n=this._,r=hEe(e+"",n),a,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((a=(e=r[i]).type)&&(a=mEe(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 gg(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 mEe(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]=dEe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var H_="http://www.w3.org/1999/xhtml";const QL={svg:"http://www.w3.org/2000/svg",xhtml:H_,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ub(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 pEe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===H_&&t.documentElement.namespaceURI===H_?t.createElement(e):t.createElementNS(n,e)}}function vEe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function WF(e){var t=ub(e);return(t.local?vEe:pEe)(t)}function gEe(){}function AA(e){return e==null?gEe:function(){return this.querySelector(e)}}function yEe(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 ea(r,this._parents)}function bEe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function xEe(){return[]}function QF(e){return e==null?xEe:function(){return this.querySelectorAll(e)}}function wEe(e){return function(){return bEe(e.apply(this,arguments))}}function SEe(e){typeof e=="function"?e=wEe(e):e=QF(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 ea(r,a)}function ZF(e){return function(){return this.matches(e)}}function JF(e){return function(t){return t.matches(e)}}var EEe=Array.prototype.find;function _Ee(e){return function(){return EEe.call(this.children,e)}}function OEe(){return this.firstElementChild}function jEe(e){return this.select(e==null?OEe:_Ee(typeof e=="function"?e:JF(e)))}var CEe=Array.prototype.filter;function AEe(){return Array.from(this.children)}function NEe(e){return function(){return CEe.call(this.children,e)}}function TEe(e){return this.selectAll(e==null?AEe:NEe(typeof e=="function"?e:JF(e)))}function PEe(e){typeof e!="function"&&(e=ZF(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 ea(r,this._parents)}function eq(e){return new Array(e.length)}function MEe(){return new ea(this._enter||this._groups.map(eq),this._parents)}function Dy(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Dy.prototype={constructor:Dy,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 REe(e){return function(){return e}}function kEe(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 Dy(e,i[s]);for(;s<u;++s)(c=t[s])&&(a[s]=c)}function DEe(e,t,n,r,a,i,s){var c,u,f=new Map,m=t.length,h=i.length,p=new Array(m),y;for(c=0;c<m;++c)(u=t[c])&&(p[c]=y=s.call(u,u.__data__,c,t)+"",f.has(y)?a[c]=u:f.set(y,u));for(c=0;c<h;++c)y=s.call(e,i[c],c,i)+"",(u=f.get(y))?(r[c]=u,u.__data__=i[c],f.delete(y)):n[c]=new Dy(e,i[c]);for(c=0;c<m;++c)(u=t[c])&&f.get(p[c])===u&&(a[c]=u)}function IEe(e){return e.__data__}function LEe(e,t){if(!arguments.length)return Array.from(this,IEe);var n=t?DEe:kEe,r=this._parents,a=this._groups;typeof e!="function"&&(e=REe(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],h=a[f],p=h.length,y=zEe(e.call(m,m&&m.__data__,f,r)),w=y.length,x=c[f]=new Array(w),S=s[f]=new Array(w),E=u[f]=new Array(p);n(m,h,x,S,E,y,t);for(var C=0,j=0,A,T;C<w;++C)if(A=x[C]){for(C>=j&&(j=C+1);!(T=S[j])&&++j<w;);A._next=T||null}}return s=new ea(s,r),s._enter=c,s._exit=u,s}function zEe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function $Ee(){return new ea(this._exit||this._groups.map(eq),this._parents)}function BEe(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 UEe(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],h=f.length,p=c[u]=new Array(h),y,w=0;w<h;++w)(y=f[w]||m[w])&&(p[w]=y);for(;u<a;++u)c[u]=n[u];return new ea(c,this._parents)}function HEe(){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 FEe(e){e||(e=qEe);function t(h,p){return h&&p?e(h.__data__,p.__data__):!h-!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 ea(a,this._parents).order()}function qEe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function KEe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function VEe(){return Array.from(this)}function YEe(){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 XEe(){let e=0;for(const t of this)++e;return e}function GEe(){return!this.node()}function WEe(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 QEe(e){return function(){this.removeAttribute(e)}}function ZEe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function JEe(e,t){return function(){this.setAttribute(e,t)}}function e_e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function t_e(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function n_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 r_e(e,t){var n=ub(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?ZEe:QEe:typeof t=="function"?n.local?n_e:t_e:n.local?e_e:JEe)(n,t))}function tq(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function a_e(e){return function(){this.style.removeProperty(e)}}function i_e(e,t,n){return function(){this.style.setProperty(e,t,n)}}function o_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 s_e(e,t,n){return arguments.length>1?this.each((t==null?a_e:typeof t=="function"?o_e:i_e)(e,t,n??"")):Tf(this.node(),e)}function Tf(e,t){return e.style.getPropertyValue(t)||tq(e).getComputedStyle(e,null).getPropertyValue(t)}function l_e(e){return function(){delete this[e]}}function c_e(e,t){return function(){this[e]=t}}function u_e(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function f_e(e,t){return arguments.length>1?this.each((t==null?l_e:typeof t=="function"?u_e:c_e)(e,t)):this.node()[e]}function nq(e){return e.trim().split(/^|\s+/)}function NA(e){return e.classList||new rq(e)}function rq(e){this._node=e,this._names=nq(e.getAttribute("class")||"")}rq.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 aq(e,t){for(var n=NA(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function iq(e,t){for(var n=NA(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function d_e(e){return function(){aq(this,e)}}function h_e(e){return function(){iq(this,e)}}function m_e(e,t){return function(){(t.apply(this,arguments)?aq:iq)(this,e)}}function p_e(e,t){var n=nq(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"?m_e:t?d_e:h_e)(n,t))}function v_e(){this.textContent=""}function g_e(e){return function(){this.textContent=e}}function y_e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function b_e(e){return arguments.length?this.each(e==null?v_e:(typeof e=="function"?y_e:g_e)(e)):this.node().textContent}function x_e(){this.innerHTML=""}function w_e(e){return function(){this.innerHTML=e}}function S_e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function E_e(e){return arguments.length?this.each(e==null?x_e:(typeof e=="function"?S_e:w_e)(e)):this.node().innerHTML}function __e(){this.nextSibling&&this.parentNode.appendChild(this)}function O_e(){return this.each(__e)}function j_e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function C_e(){return this.each(j_e)}function A_e(e){var t=typeof e=="function"?e:WF(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function N_e(){return null}function T_e(e,t){var n=typeof e=="function"?e:WF(e),r=t==null?N_e:typeof t=="function"?t:AA(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function P_e(){var e=this.parentNode;e&&e.removeChild(this)}function M_e(){return this.each(P_e)}function R_e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function k_e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function D_e(e){return this.select(e?k_e:R_e)}function I_e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function L_e(e){return function(t){e.call(this,t,this.__data__)}}function z_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 $_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 B_e(e,t,n){return function(){var r=this.__on,a,i=L_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 U_e(e,t,n){var r=z_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?B_e:$_e,a=0;a<i;++a)this.each(c(r[a],t,n));return this}function oq(e,t,n){var r=tq(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 H_e(e,t){return function(){return oq(this,e,t)}}function F_e(e,t){return function(){return oq(this,e,t.apply(this,arguments))}}function q_e(e,t){return this.each((typeof t=="function"?F_e:H_e)(e,t))}function*K_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 sq=[null];function ea(e,t){this._groups=e,this._parents=t}function Qm(){return new ea([[document.documentElement]],sq)}function V_e(){return this}ea.prototype=Qm.prototype={constructor:ea,select:yEe,selectAll:SEe,selectChild:jEe,selectChildren:TEe,filter:PEe,data:LEe,enter:MEe,exit:$Ee,join:BEe,merge:UEe,selection:V_e,order:HEe,sort:FEe,call:KEe,nodes:VEe,node:YEe,size:XEe,empty:GEe,each:WEe,attr:r_e,style:s_e,property:f_e,classed:p_e,text:b_e,html:E_e,raise:O_e,lower:C_e,append:A_e,insert:T_e,remove:M_e,clone:D_e,datum:I_e,on:U_e,dispatch:q_e,[Symbol.iterator]:K_e};function Yr(e){return typeof e=="string"?new ea([[document.querySelector(e)]],[document.documentElement]):new ea([[e]],sq)}function Y_e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ia(e,t){if(e=Y_e(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 X_e={passive:!1},Jh={capture:!0,passive:!1};function $S(e){e.stopImmediatePropagation()}function rf(e){e.preventDefault(),e.stopImmediatePropagation()}function lq(e){var t=e.document.documentElement,n=Yr(e).on("dragstart.drag",rf,Jh);"onselectstart"in t?n.on("selectstart.drag",rf,Jh):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function cq(e,t){var n=e.document.documentElement,r=Yr(e).on("dragstart.drag",null);t&&(r.on("click.drag",rf,Jh),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 Wv=e=>()=>e;function F_(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}})}F_.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function G_e(e){return!e.ctrlKey&&!e.button}function W_e(){return this.parentNode}function Q_e(e,t){return t??{x:e.x,y:e.y}}function Z_e(){return navigator.maxTouchPoints||"ontouchstart"in this}function uq(){var e=G_e,t=W_e,n=Q_e,r=Z_e,a={},i=cb("start","drag","end"),s=0,c,u,f,m,h=0;function p(A){A.on("mousedown.drag",y).filter(r).on("touchstart.drag",S).on("touchmove.drag",E,X_e).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(A,T){if(!(m||!e.call(this,A,T))){var N=j(this,t.call(this,A,T),A,T,"mouse");N&&(Yr(A.view).on("mousemove.drag",w,Jh).on("mouseup.drag",x,Jh),lq(A.view),$S(A),f=!1,c=A.clientX,u=A.clientY,N("start",A))}}function w(A){if(rf(A),!f){var T=A.clientX-c,N=A.clientY-u;f=T*T+N*N>h}a.mouse("drag",A)}function x(A){Yr(A.view).on("mousemove.drag mouseup.drag",null),cq(A.view,f),rf(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=j(this,P,A,T,N[D].identifier,N[D]))&&($S(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])&&(rf(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])&&($S(A),k("end",A,T[P]))}function j(A,T,N,P,k,D){var K=i.copy(),B=Ia(D||N,T),L,W,$;if(($=n.call(A,new F_("beforestart",{sourceEvent:N,target:p,identifier:k,active:s,x:B[0],y:B[1],dx:0,dy:0,dispatch:K}),P))!=null)return L=$.x-B[0]||0,W=$.y-B[1]||0,function Y(R,H,q){var F=B,V;switch(R){case"start":a[k]=Y,V=s++;break;case"end":delete a[k],--s;case"drag":B=Ia(q||H,T),V=s;break}K.call(R,A,new F_(R,{sourceEvent:H,subject:$,target:p,identifier:k,active:V,x:B[0]+L,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:Wv(!!A),p):e},p.container=function(A){return arguments.length?(t=typeof A=="function"?A:Wv(A),p):t},p.subject=function(A){return arguments.length?(n=typeof A=="function"?A:Wv(A),p):n},p.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Wv(!!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?(h=(A=+A)*A,p):Math.sqrt(h)},p}var Pf=0,Oh=0,ph=0,fq=1e3,Iy,jh,Ly=0,Pc=0,fb=0,em=typeof performance=="object"&&performance.now?performance:Date,dq=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function TA(){return Pc||(dq(J_e),Pc=em.now()+fb)}function J_e(){Pc=0}function zy(){this._call=this._time=this._next=null}zy.prototype=hq.prototype={constructor:zy,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&&jh!==this&&(jh?jh._next=this:Iy=this,jh=this),this._call=e,this._time=n,q_()},stop:function(){this._call&&(this._call=null,this._time=1/0,q_())}};function hq(e,t,n){var r=new zy;return r.restart(e,t,n),r}function eOe(){TA(),++Pf;for(var e=Iy,t;e;)(t=Pc-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pf}function ZL(){Pc=(Ly=em.now())+fb,Pf=Oh=0;try{eOe()}finally{Pf=0,nOe(),Pc=0}}function tOe(){var e=em.now(),t=e-Ly;t>fq&&(fb-=t,Ly=e)}function nOe(){for(var e,t=Iy,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:Iy=n);jh=e,q_(r)}function q_(e){if(!Pf){Oh&&(Oh=clearTimeout(Oh));var t=e-Pc;t>24?(e<1/0&&(Oh=setTimeout(ZL,e-em.now()-fb)),ph&&(ph=clearInterval(ph))):(ph||(Ly=em.now(),ph=setInterval(tOe,fq)),Pf=1,dq(ZL))}}function JL(e,t,n){var r=new zy;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var rOe=cb("start","end","cancel","interrupt"),aOe=[],mq=0,e3=1,K_=2,yg=3,t3=4,V_=5,bg=6;function db(e,t,n,r,a,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;iOe(e,n,{name:t,index:r,group:a,on:rOe,tween:aOe,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:mq})}function PA(e,t){var n=ti(e,t);if(n.state>mq)throw new Error("too late; already scheduled");return n}function Ii(e,t){var n=ti(e,t);if(n.state>yg)throw new Error("too late; already running");return n}function ti(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function iOe(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=hq(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,h,p,y;if(n.state!==e3)return u();for(m in r)if(y=r[m],y.name===n.name){if(y.state===yg)return JL(s);y.state===t3?(y.state=bg,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete r[m]):+m<t&&(y.state=bg,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete r[m])}if(JL(function(){n.state===yg&&(n.state=t3,n.timer.restart(c,n.delay,n.time),c(f))}),n.state=K_,n.on.call("start",e,e.__data__,n.index,n.group),n.state===K_){for(n.state=yg,a=new Array(p=n.tween.length),m=0,h=-1;m<p;++m)(y=n.tween[m].value.call(e,e.__data__,n.index,n.group))&&(a[++h]=y);a.length=h+1}}function c(f){for(var m=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(u),n.state=V_,1),h=-1,p=a.length;++h<p;)a[h].call(e,m);n.state===V_&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=bg,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function xg(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>K_&&r.state<V_,r.state=bg,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function oOe(e){return this.each(function(){xg(this,e)})}function sOe(e,t){var n,r;return function(){var a=Ii(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 lOe(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var i=Ii(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 cOe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=ti(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?sOe:lOe)(n,e,t))}function MA(e,t,n){var r=e._id;return e.each(function(){var a=Ii(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return ti(a,r).value[t]}}function pq(e,t){var n;return(typeof t=="number"?La:t instanceof Nc?vy:(n=Nc(t))?(t=n,vy):aU)(e,t)}function uOe(e){return function(){this.removeAttribute(e)}}function fOe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dOe(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 hOe(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 mOe(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 pOe(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 vOe(e,t){var n=ub(e),r=n==="transform"?yde:pq;return this.attrTween(e,typeof t=="function"?(n.local?pOe:mOe)(n,r,MA(this,"attr."+e,t)):t==null?(n.local?fOe:uOe)(n):(n.local?hOe:dOe)(n,r,t))}function gOe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function yOe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function bOe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&yOe(e,i)),n}return a._value=t,a}function xOe(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&gOe(e,i)),n}return a._value=t,a}function wOe(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=ub(e);return this.tween(n,(r.local?bOe:xOe)(r,t))}function SOe(e,t){return function(){PA(this,e).delay=+t.apply(this,arguments)}}function EOe(e,t){return t=+t,function(){PA(this,e).delay=t}}function _Oe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?SOe:EOe)(t,e)):ti(this.node(),t).delay}function OOe(e,t){return function(){Ii(this,e).duration=+t.apply(this,arguments)}}function jOe(e,t){return t=+t,function(){Ii(this,e).duration=t}}function COe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?OOe:jOe)(t,e)):ti(this.node(),t).duration}function AOe(e,t){if(typeof t!="function")throw new Error;return function(){Ii(this,e).ease=t}}function NOe(e){var t=this._id;return arguments.length?this.each(AOe(t,e)):ti(this.node(),t).ease}function TOe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ii(this,e).ease=n}}function POe(e){if(typeof e!="function")throw new Error;return this.each(TOe(this._id,e))}function MOe(e){typeof e!="function"&&(e=ZF(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 Mo(r,this._parents,this._name,this._id)}function ROe(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,h=s[c]=new Array(m),p,y=0;y<m;++y)(p=u[y]||f[y])&&(h[y]=p);for(;c<r;++c)s[c]=t[c];return new Mo(s,this._parents,this._name,this._id)}function kOe(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 DOe(e,t,n){var r,a,i=kOe(t)?PA:Ii;return function(){var s=i(this,e),c=s.on;c!==r&&(a=(r=c).copy()).on(t,n),s.on=a}}function IOe(e,t){var n=this._id;return arguments.length<2?ti(this.node(),n).on.on(e):this.each(DOe(n,e,t))}function LOe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function zOe(){return this.on("end.remove",LOe(this._id))}function $Oe(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,h,p=0;p<u;++p)(m=c[p])&&(h=e.call(m,m.__data__,p,c))&&("__data__"in m&&(h.__data__=m.__data__),f[p]=h,db(f[p],t,n,p,f,ti(m,n)));return new Mo(i,this._parents,t,n)}function BOe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=QF(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,h=0;h<f;++h)if(m=u[h]){for(var p=e.call(m,m.__data__,h,u),y,w=ti(m,n),x=0,S=p.length;x<S;++x)(y=p[x])&&db(y,t,n,x,p,w);i.push(p),s.push(m)}return new Mo(i,s,t,n)}var UOe=Qm.prototype.constructor;function HOe(){return new UOe(this._groups,this._parents)}function FOe(e,t){var n,r,a;return function(){var i=Tf(this,e),s=(this.style.removeProperty(e),Tf(this,e));return i===s?null:i===n&&s===r?a:a=t(n=i,r=s)}}function vq(e){return function(){this.style.removeProperty(e)}}function qOe(e,t,n){var r,a=n+"",i;return function(){var s=Tf(this,e);return s===a?null:s===r?i:i=t(r=s,n)}}function KOe(e,t,n){var r,a,i;return function(){var s=Tf(this,e),c=n(this),u=c+"";return c==null&&(u=c=(this.style.removeProperty(e),Tf(this,e))),s===u?null:s===r&&u===a?i:(a=u,i=t(r=s,c))}}function VOe(e,t){var n,r,a,i="style."+t,s="end."+i,c;return function(){var u=Ii(this,e),f=u.on,m=u.value[i]==null?c||(c=vq(t)):void 0;(f!==n||a!==m)&&(r=(n=f).copy()).on(s,a=m),u.on=r}}function YOe(e,t,n){var r=(e+="")=="transform"?gde:pq;return t==null?this.styleTween(e,FOe(e,r)).on("end.style."+e,vq(e)):typeof t=="function"?this.styleTween(e,KOe(e,r,MA(this,"style."+e,t))).each(VOe(this._id,e)):this.styleTween(e,qOe(e,r,t),n).on("end.style."+e,null)}function XOe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function GOe(e,t,n){var r,a;function i(){var s=t.apply(this,arguments);return s!==a&&(r=(a=s)&&XOe(e,s,n)),r}return i._value=t,i}function WOe(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,GOe(e,t,n??""))}function QOe(e){return function(){this.textContent=e}}function ZOe(e){return function(){var t=e(this);this.textContent=t??""}}function JOe(e){return this.tween("text",typeof e=="function"?ZOe(MA(this,"text",e)):QOe(e==null?"":e+""))}function eje(e){return function(t){this.textContent=e.call(this,t)}}function tje(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&eje(a)),t}return r._value=e,r}function nje(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,tje(e))}function rje(){for(var e=this._name,t=this._id,n=gq(),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=ti(u,t);db(u,e,n,f,s,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new Mo(r,this._parents,e,n)}function aje(){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=Ii(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 ije=0;function Mo(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function gq(){return++ije}var so=Qm.prototype;Mo.prototype={constructor:Mo,select:$Oe,selectAll:BOe,selectChild:so.selectChild,selectChildren:so.selectChildren,filter:MOe,merge:ROe,selection:HOe,transition:rje,call:so.call,nodes:so.nodes,node:so.node,size:so.size,empty:so.empty,each:so.each,on:IOe,attr:vOe,attrTween:wOe,style:YOe,styleTween:WOe,text:JOe,textTween:nje,remove:zOe,tween:cOe,delay:_Oe,duration:COe,ease:NOe,easeVarying:POe,end:aje,[Symbol.iterator]:so[Symbol.iterator]};function oje(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var sje={time:null,delay:0,duration:250,ease:oje};function lje(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 cje(e){var t,n;e instanceof Mo?(t=e._id,e=e._name):(t=gq(),(n=sje).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])&&db(u,e,t,f,s,n||lje(u,t));return new Mo(r,this._parents,e,t)}Qm.prototype.interrupt=oOe;Qm.prototype.transition=cje;const Qv=e=>()=>e;function uje(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 yo(e,t,n){this.k=e,this.x=t,this.y=n}yo.prototype={constructor:yo,scale:function(e){return e===1?this:new yo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new yo(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 hb=new yo(1,0,0);yq.prototype=yo.prototype;function yq(e){for(;!e.__zoom;)if(!(e=e.parentNode))return hb;return e.__zoom}function BS(e){e.stopImmediatePropagation()}function vh(e){e.preventDefault(),e.stopImmediatePropagation()}function fje(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function dje(){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||hb}function hje(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function mje(){return navigator.maxTouchPoints||"ontouchstart"in this}function pje(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 bq(){var e=fje,t=dje,n=pje,r=hje,a=mje,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,u=mg,f=cb("start","zoom","end"),m,h,p,y=500,w=150,x=0,S=10;function E($){$.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",L).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function($,Y,R,H){var q=$.selection?$.selection():$;q.property("__zoom",n3),$!==q?T($,Y,R,H):q.interrupt().each(function(){N(this,arguments).event(H).start().zoom(null,typeof Y=="function"?Y.apply(this,arguments):Y).end()})},E.scaleBy=function($,Y,R,H){E.scaleTo($,function(){var q=this.__zoom.k,F=typeof Y=="function"?Y.apply(this,arguments):Y;return q*F},R,H)},E.scaleTo=function($,Y,R,H){E.transform($,function(){var q=t.apply(this,arguments),F=this.__zoom,V=R==null?A(q):typeof R=="function"?R.apply(this,arguments):R,I=F.invert(V),z=typeof Y=="function"?Y.apply(this,arguments):Y;return n(j(C(F,z),V,I),q,s)},R,H)},E.translateBy=function($,Y,R,H){E.transform($,function(){return n(this.__zoom.translate(typeof Y=="function"?Y.apply(this,arguments):Y,typeof R=="function"?R.apply(this,arguments):R),t.apply(this,arguments),s)},null,H)},E.translateTo=function($,Y,R,H,q){E.transform($,function(){var F=t.apply(this,arguments),V=this.__zoom,I=H==null?A(F):typeof H=="function"?H.apply(this,arguments):H;return n(hb.translate(I[0],I[1]).scale(V.k).translate(typeof Y=="function"?-Y.apply(this,arguments):-Y,typeof R=="function"?-R.apply(this,arguments):-R),F,s)},H,q)};function C($,Y){return Y=Math.max(i[0],Math.min(i[1],Y)),Y===$.k?$:new yo(Y,$.x,$.y)}function j($,Y,R){var H=Y[0]-R[0]*$.k,q=Y[1]-R[1]*$.k;return H===$.x&&q===$.y?$:new yo($.k,H,q)}function A($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function T($,Y,R,H){$.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,V=N(q,F).event(H),I=t.apply(q,F),z=R==null?A(I):typeof R=="function"?R.apply(q,F):R,X=Math.max(I[1][0]-I[0][0],I[1][1]-I[0][1]),Z=q.__zoom,ee=typeof Y=="function"?Y.apply(q,F):Y,se=u(Z.invert(z).concat(X/Z.k),ee.invert(z).concat(X/ee.k));return function(ie){if(ie===1)ie=ee;else{var re=se(ie),J=X/re[2];ie=new yo(J,z[0]-re[0]*J,z[1]-re[1]*J)}V.zoom(null,ie)}})}function N($,Y,R){return!R&&$.__zooming||new P($,Y)}function P($,Y){this.that=$,this.args=Y,this.active=0,this.sourceEvent=null,this.extent=t.apply($,Y),this.taps=0}P.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,Y){return this.mouse&&$!=="mouse"&&(this.mouse[1]=Y.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=Y.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=Y.invert(this.touch1[0])),this.that.__zoom=Y,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var Y=Yr(this.that).datum();f.call($,this.that,new uje($,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:f}),Y)}};function k($,...Y){if(!e.apply(this,arguments))return;var R=N(this,Y).event($),H=this.__zoom,q=Math.max(i[0],Math.min(i[1],H.k*Math.pow(2,r.apply(this,arguments)))),F=Ia($);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)],xg(this),R.start()}vh($),R.wheel=setTimeout(V,w),R.zoom("mouse",n(j(C(H,q),R.mouse[0],R.mouse[1]),R.extent,s));function V(){R.wheel=null,R.end()}}function D($,...Y){if(p||!e.apply(this,arguments))return;var R=$.currentTarget,H=N(this,Y,!0).event($),q=Yr($.view).on("mousemove.zoom",z,!0).on("mouseup.zoom",X,!0),F=Ia($,R),V=$.clientX,I=$.clientY;lq($.view),BS($),H.mouse=[F,this.__zoom.invert(F)],xg(this),H.start();function z(Z){if(vh(Z),!H.moved){var ee=Z.clientX-V,se=Z.clientY-I;H.moved=ee*ee+se*se>x}H.event(Z).zoom("mouse",n(j(H.that.__zoom,H.mouse[0]=Ia(Z,R),H.mouse[1]),H.extent,s))}function X(Z){q.on("mousemove.zoom mouseup.zoom",null),cq(Z.view,H.moved),vh(Z),H.event(Z).end()}}function K($,...Y){if(e.apply(this,arguments)){var R=this.__zoom,H=Ia($.changedTouches?$.changedTouches[0]:$,this),q=R.invert(H),F=R.k*($.shiftKey?.5:2),V=n(j(C(R,F),H,q),t.apply(this,Y),s);vh($),c>0?Yr(this).transition().duration(c).call(T,V,H,$):Yr(this).call(E.transform,V,H,$)}}function B($,...Y){if(e.apply(this,arguments)){var R=$.touches,H=R.length,q=N(this,Y,$.changedTouches.length===H).event($),F,V,I,z;for(BS($),V=0;V<H;++V)I=R[V],z=Ia(I,this),z=[z,this.__zoom.invert(z),I.identifier],q.touch0?!q.touch1&&q.touch0[2]!==z[2]&&(q.touch1=z,q.taps=0):(q.touch0=z,F=!0,q.taps=1+!!m);m&&(m=clearTimeout(m)),F&&(q.taps<2&&(h=z[0],m=setTimeout(function(){m=null},y)),xg(this),q.start())}}function L($,...Y){if(this.__zooming){var R=N(this,Y).event($),H=$.changedTouches,q=H.length,F,V,I,z;for(vh($),F=0;F<q;++F)V=H[F],I=Ia(V,this),R.touch0&&R.touch0[2]===V.identifier?R.touch0[0]=I:R.touch1&&R.touch1[2]===V.identifier&&(R.touch1[0]=I);if(V=R.that.__zoom,R.touch1){var X=R.touch0[0],Z=R.touch0[1],ee=R.touch1[0],se=R.touch1[1],ie=(ie=ee[0]-X[0])*ie+(ie=ee[1]-X[1])*ie,re=(re=se[0]-Z[0])*re+(re=se[1]-Z[1])*re;V=C(V,Math.sqrt(ie/re)),I=[(X[0]+ee[0])/2,(X[1]+ee[1])/2],z=[(Z[0]+se[0])/2,(Z[1]+se[1])/2]}else if(R.touch0)I=R.touch0[0],z=R.touch0[1];else return;R.zoom("touch",n(j(V,I,z),R.extent,s))}}function W($,...Y){if(this.__zooming){var R=N(this,Y).event($),H=$.changedTouches,q=H.length,F,V;for(BS($),p&&clearTimeout(p),p=setTimeout(function(){p=null},y),F=0;F<q;++F)V=H[F],R.touch0&&R.touch0[2]===V.identifier?delete R.touch0:R.touch1&&R.touch1[2]===V.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&&(V=Ia(V,this),Math.hypot(h[0]-V[0],h[1]-V[1])<S)){var I=Yr(this).on("dblclick.zoom");I&&I.apply(this,arguments)}}}return E.wheelDelta=function($){return arguments.length?(r=typeof $=="function"?$:Qv(+$),E):r},E.filter=function($){return arguments.length?(e=typeof $=="function"?$:Qv(!!$),E):e},E.touchable=function($){return arguments.length?(a=typeof $=="function"?$:Qv(!!$),E):a},E.extent=function($){return arguments.length?(t=typeof $=="function"?$:Qv([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),E):t},E.scaleExtent=function($){return arguments.length?(i[0]=+$[0],i[1]=+$[1],E):[i[0],i[1]]},E.translateExtent=function($){return arguments.length?(s[0][0]=+$[0][0],s[1][0]=+$[1][0],s[0][1]=+$[0][1],s[1][1]=+$[1][1],E):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},E.constrain=function($){return arguments.length?(n=$,E):n},E.duration=function($){return arguments.length?(c=+$,E):c},E.interpolate=function($){return arguments.length?(u=$,E):u},E.on=function(){var $=f.on.apply(f,arguments);return $===f?E:$},E.clickDistance=function($){return arguments.length?(x=($=+$)*$,E):Math.sqrt(x)},E.tapDistance=function($){return arguments.length?(S=+$,E):S},E}const Mi={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."},tm=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],xq=["Enter"," ","Escape"],wq={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Mf;(function(e){e.Strict="strict",e.Loose="loose"})(Mf||(Mf={}));var dc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(dc||(dc={}));var nm;(function(e){e.Partial="partial",e.Full="full"})(nm||(nm={}));const Sq={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Rs;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Rs||(Rs={}));var Rf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Rf||(Rf={}));var Re;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Re||(Re={}));const r3={[Re.Left]:Re.Right,[Re.Right]:Re.Left,[Re.Top]:Re.Bottom,[Re.Bottom]:Re.Top};function Eq(e){return e===null?null:e?"valid":"invalid"}const _q=e=>"id"in e&&"source"in e&&"target"in e,vje=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),Zm=(e,t=[0,0])=>{const{width:n,height:r}=Ho(e),a=e.origin??t,i=n*a[0],s=r*a[1];return{x:e.position.x-i,y:e.position.y-s}},gje=(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?$y(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return mb(r,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return pb(n)},Jm=(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=mb(n,$y(a)),r=!0)}),r?pb(n):{x:0,y:0,width:0,height:0}},kA=(e,t,[n,r,a]=[0,0,1],i=!1,s=!1)=>{const c={...tp(t,[n,r,a]),width:t.width/a,height:t.height/a},u=[];for(const f of e.values()){const{measured:m,selectable:h=!0,hidden:p=!1}=f;if(s&&!h||p)continue;const y=m.width??f.width??f.initialWidth??null,w=m.height??f.height??f.initialHeight??null,x=rm(c,Df(f)),S=(y??0)*(w??0),E=i&&x>0;(!f.internals.handleBounds||E||x>=S||f.dragging)&&u.push(f)}return u},yje=(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 bje(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 xje({nodes:e,width:t,height:n,panZoom:r,minZoom:a,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const c=bje(e,s),u=Jm(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 Oq({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 h=s.extent||a;if(s.extent==="parent"&&!s.expandParent)if(!c)i==null||i("005",Mi.error005());else{const y=c.measured.width,w=c.measured.height;y&&w&&(h=[[u,f],[u+y,f+w]])}else c&&If(s.extent)&&(h=[[s.extent[0][0]+u,s.extent[0][1]+f],[s.extent[1][0]+u,s.extent[1][1]+f]]);const p=If(h)?Mc(t,h,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",Mi.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 wje({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 y=i.has(p.id),w=!y&&p.parentId&&s.find(x=>x.id===p.parentId);(y||w)&&s.push(p)}const c=new Set(t.map(p=>p.id)),u=r.filter(p=>p.deletable!==!1),m=yje(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 h=await a({nodes:s,edges:m});return typeof h=="boolean"?h?{edges:m,nodes:s}:{edges:[],nodes:[]}:h}const kf=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Mc=(e={x:0,y:0},t,n)=>({x:kf(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:kf(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function jq(e,t,n){const{width:r,height:a}=Ho(n),{x:i,y:s}=n.internals.positionAbsolute;return Mc(e,[[i,s],[i+r,s+a]],t)}const a3=(e,t,n)=>e<t?kf(Math.abs(e-t),1,t)/t:e>n?-kf(Math.abs(e-n),1,t)/t:0,Cq=(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]},mb=(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)}),Y_=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),pb=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Df=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=RA(e)?e.internals.positionAbsolute:Zm(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}},$y=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=RA(e)?e.internals.positionAbsolute:Zm(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)}},Aq=(e,t)=>pb(mb(Y_(e),Y_(t))),rm=(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=>Fa(e.width)&&Fa(e.height)&&Fa(e.x)&&Fa(e.y),Fa=e=>!isNaN(e)&&isFinite(e),Sje=(e,t)=>{},ep=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),tp=({x:e,y:t},[n,r,a],i=!1,s=[1,1])=>{const c={x:(e-n)/a,y:(t-r)/a};return i?ep(c,s):c},By=({x:e,y:t},[n,r,a])=>({x:e*a+n,y:t*a+r});function Hu(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 Eje(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Hu(e,n),a=Hu(e,t);return{top:r,right:a,bottom:r,left:a,x:a*2,y:r*2}}if(typeof e=="object"){const r=Hu(e.top??e.y??0,n),a=Hu(e.bottom??e.y??0,n),i=Hu(e.left??e.x??0,t),s=Hu(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 _je(e,t,n,r,a,i){const{x:s,y:c}=By(e,[t,n,r]),{x:u,y:f}=By({x:e.x+e.width,y:e.y+e.height},[t,n,r]),m=a-u,h=i-f;return{left:Math.floor(s),top:Math.floor(c),right:Math.floor(m),bottom:Math.floor(h)}}const DA=(e,t,n,r,a,i)=>{const s=Eje(i,t,n),c=(t-s.x)/e.width,u=(n-s.y)/e.height,f=Math.min(c,u),m=kf(f,r,a),h=e.x+e.width/2,p=e.y+e.height/2,y=t/2-h*m,w=n/2-p*m,x=_je(e,y,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:y-S.left+S.right,y:w-S.top+S.bottom,zoom:m}},am=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function If(e){return e!=null&&e!=="parent"}function Ho(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 Nq(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 Tq(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 Oje(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function jje(e){return{...wq,...e||{}}}function Ah(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:a}){const{x:i,y:s}=qa(e),c=tp({x:i-((a==null?void 0:a.left)??0),y:s-((a==null?void 0:a.top)??0)},r),{x:u,y:f}=n?ep(c,t):c;return{xSnapped:u,ySnapped:f,...c}}const IA=e=>({width:e.offsetWidth,height:e.offsetHeight}),Pq=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Cje=["INPUT","SELECT","TEXTAREA"];function Mq(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:Cje.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Rq=e=>"clientX"in e,qa=(e,t)=>{var i,s;const n=Rq(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 kq({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),h=Math.abs(f-t);return[u,f,m,h]}function Zv(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 Re.Left:return[t-Zv(t-r,i),n];case Re.Right:return[t+Zv(r-t,i),n];case Re.Top:return[t,n-Zv(n-a,i)];case Re.Bottom:return[t,n+Zv(a-n,i)]}}function Dq({sourceX:e,sourceY:t,sourcePosition:n=Re.Bottom,targetX:r,targetY:a,targetPosition:i=Re.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}),[h,p,y,w]=kq({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}`,h,p,y,w]}function Iq({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 Aje({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 Nje({sourceNode:e,targetNode:t,width:n,height:r,transform:a}){const i=mb($y(e),$y(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 rm(s,pb(i))>0}const Tje=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,Pje=(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)),Mje=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||Tje;let a;return _q(e)?a={...e}:a={...e,id:r(e)},Pje(a,t)?t:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,t.concat(a))};function Lq({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[a,i,s,c]=Iq({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,a,i,s,c]}const c3={[Re.Left]:{x:-1,y:0},[Re.Right]:{x:1,y:0},[Re.Top]:{x:0,y:-1},[Re.Bottom]:{x:0,y:1}},Rje=({source:e,sourcePosition:t=Re.Bottom,target:n})=>t===Re.Left||t===Re.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 kje({source:e,sourcePosition:t=Re.Bottom,target:n,targetPosition:r=Re.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},h=Rje({source:f,sourcePosition:t,target:m}),p=h.x!==0?"x":"y",y=h[p];let w=[],x,S;const E={x:0,y:0},C={x:0,y:0},[,,j,A]=Iq({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]===y?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===y?P:N:w=c.y===y?N:P,t===r){const L=Math.abs(e[p]-n[p]);if(L<=i){const W=Math.min(i-1,i-L);c[p]===y?E[p]=(f[p]>e[p]?-1:1)*W:C[p]=(m[p]>n[p]?-1:1)*W}}if(t!==r){const L=p==="x"?"y":"x",W=c[p]===u[L],$=f[L]>m[L],Y=f[L]<m[L];(c[p]===1&&(!W&&$||W&&Y)||c[p]!==1&&(!W&&Y||W&&$))&&(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,j,A]}function Dje(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 X_({sourceX:e,sourceY:t,sourcePosition:n=Re.Bottom,targetX:r,targetY:a,targetPosition:i=Re.Top,borderRadius:s=5,centerX:c,centerY:u,offset:f=20,stepPosition:m=.5}){const[h,p,y,w,x]=kje({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:i,center:{x:c,y:u},offset:f,stepPosition:m});return[h.reduce((E,C,j)=>{let A="";return j>0&&j<h.length-1?A=Dje(h[j-1],C,h[j+1],s):A=`${j===0?"M":"L"}${C.x} ${C.y}`,E+=A,E},""),p,y,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 Ije(e){var h;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===Mf.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(h=e.onError)==null||h.call(e,"008",Mi.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(i==null?void 0:i.position)||Re.Bottom,u=(s==null?void 0:s.position)||Re.Top,f=Rc(t,i,c),m=Rc(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 Rc(e,t,n=Re.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??Ho(e);if(r)return{x:a+s/2,y:i+c/2};switch((t==null?void 0:t.position)??n){case Re.Top:return{x:a+s/2,y:i};case Re.Right:return{x:a+s,y:i+c/2};case Re.Bottom:return{x:a+s/2,y:i+c};case Re.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 G_(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Lje(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=G_(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 zq=1e3,zje=10,LA={nodeOrigin:[0,0],nodeExtent:tm,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},$je={...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 Bje(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=Zm(a,r.nodeOrigin),s=If(a.extent)?a.extent:r.nodeExtent,c=Mc(i,s,Ho(a));a.internals.positionAbsolute=c}}function Uje(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 W_(e,t,n,r={}){var f,m;const a=zA($je,r),i={i:0},s=new Map(t),c=a!=null&&a.elevateNodesOnSelect&&!$A(a.zIndexMode)?zq:0;let u=e.length>0;t.clear(),n.clear();for(const h of e){let p=s.get(h.id);if(a.checkEquality&&h===(p==null?void 0:p.internals.userNode))t.set(h.id,p);else{const y=Zm(h,a.nodeOrigin),w=If(h.extent)?h.extent:a.nodeExtent,x=Mc(y,w,Ho(h));p={...a.defaults,...h,measured:{width:(f=h.measured)==null?void 0:f.width,height:(m=h.measured)==null?void 0:m.height},internals:{positionAbsolute:x,handleBounds:Uje(h,p),z:$q(h,c,a.zIndexMode),userNode:h}},t.set(h.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(u=!1),h.parentId&&BA(p,t,n,r,i)}return u}function Hje(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}Hje(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*zje),a&&m.internals.rootParentIndex!==void 0&&(a.i=m.internals.rootParentIndex);const h=i&&!$A(u)?zq:0,{x:p,y,z:w}=Fje(e,m,s,c,h,u),{positionAbsolute:x}=e.internals,S=p!==x.x||y!==x.y;(S||w!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:p,y}:x,z:w}})}function $q(e,t,n){const r=Fa(e.zIndex)?e.zIndex:0;return $A(n)?r:r+(e.selected?t:0)}function Fje(e,t,n,r,a,i){const{x:s,y:c}=t.internals.positionAbsolute,u=Ho(e),f=Zm(e,n),m=If(e.extent)?Mc(f,e.extent,u):f;let h=Mc({x:s+m.x,y:c+m.y},r,u);e.extent==="parent"&&(h=jq(h,u,t));const p=$q(e,a,i),y=t.internals.z??0;return{x:h.x,y:h.y,z:y>=p?y+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)??Df(u),m=Aq(f,c.rect);i.set(c.parentId,{expandedRect:m,parent:u})}return i.size>0&&i.forEach(({expandedRect:c,parent:u},f)=>{var j;const m=u.internals.positionAbsolute,h=Ho(u),p=u.origin??r,y=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(h.width,Math.round(c.width)),S=Math.max(h.height,Math.round(c.height)),E=(x-h.width)*p[0],C=(S-h.height)*p[1];(y>0||w>0||E||C)&&(a.push({id:f,type:"position",position:{x:u.position.x-y+E,y:u.position.y-w+C}}),(j=n.get(f))==null||j.forEach(A=>{e.some(T=>T.id===A.id)||a.push({id:A.id,type:"position",position:{x:A.position.x+y,y:A.position.y+w}})})),(h.width<c.width||h.height<c.height||y||w)&&a.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:x+(y?p[0]*y-E:0),height:S+(w?p[1]*w-C:0)}})}),a}function qje(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:h}=new window.DOMMatrixReadOnly(m.transform),p=[];for(const y of e.values()){const w=t.get(y.id);if(!w)continue;if(w.hidden){t.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),u=!0;continue}const x=IA(y.nodeElement),S=w.measured.width!==x.width||w.measured.height!==x.height;if(!!(x.width&&x.height&&(S||!w.internals.handleBounds||y.force))){const C=y.nodeElement.getBoundingClientRect(),j=If(w.extent)?w.extent:i;let{positionAbsolute:A}=w.internals;w.parentId&&w.extent==="parent"?A=jq(A,x,t.get(w.parentId)):j&&(A=Mc(A,j,x));const T={...w,measured:x,internals:{...w.internals,positionAbsolute:A,handleBounds:{source:s3("source",y.nodeElement,C,h,w.id),target:s3("target",y.nodeElement,C,h,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:Df(T,a)}))}}if(p.length>0){const y=UA(p,t,n,a);f.push(...y)}return{changes:f,updatedInternals:u}}async function Kje({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 Bq(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 Uq(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Uq(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 Vje(e,t,n,r){const a=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!Uq(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 US({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,c,u;const a=[];for(const[f,m]of t){const h=(s=n.get(f))==null?void 0:s.internals.userNode;h&&a.push({...h,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 Yje({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=ep(i,t);return{x:s.x-i.x,y:s.y-i.y}}function Xje({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,h=!1,p=null,y=!1,w=!1,x=null;function S({noDragClassName:C,handleSelector:j,domNode:A,isSelectable:T,nodeId:N,nodeClickDistance:P=0}){p=Yr(A);function k({x:L,y:W}){const{nodeLookup:$,nodeExtent:Y,snapGrid:R,snapToGrid:H,nodeOrigin:q,onNodeDrag:F,onSelectionDrag:V,onError:I,updateNodePositions:z}=t();i={x:L,y:W};let X=!1;const Z=c.size>1,ee=Z&&Y?Y_(Jm(c)):null,se=Z&&H?Yje({dragItems:c,snapGrid:R,x:L,y:W}):null;for(const[ie,re]of c){if(!$.has(ie))continue;let J={x:L-re.distance.x,y:W-re.distance.y};H&&(J=se?{x:Math.round(J.x+se.x),y:Math.round(J.y+se.y)}:ep(J,R));let ce=null;if(Z&&Y&&!re.extent&&ee){const{positionAbsolute:ye}=re.internals,xe=ye.x-ee.x+Y[0][0],Ie=ye.x+re.measured.width-ee.x2+Y[1][0],Pe=ye.y-ee.y+Y[0][1],Ve=ye.y+re.measured.height-ee.y2+Y[1][1];ce=[[xe,Pe],[Ie,Ve]]}const{position:me,positionAbsolute:ne}=Oq({nodeId:ie,nextPosition:J,nodeLookup:$,nodeExtent:ce||Y,nodeOrigin:q,onError:I});X=X||re.position.x!==me.x||re.position.y!==me.y,re.position=me,re.internals.positionAbsolute=ne}if(w=w||X,!!X&&(z(c,!0),x&&(r||F||!N&&V))){const[ie,re]=US({nodeId:N,dragItems:c,nodeLookup:$});r==null||r(x,c,ie,re),F==null||F(x,ie,re),N||V==null||V(x,re)}}async function D(){if(!m)return;const{transform:L,panBy:W,autoPanSpeed:$,autoPanOnNodeDrag:Y}=t();if(!Y){u=!1,cancelAnimationFrame(s);return}const[R,H]=Cq(f,m,$);(R!==0||H!==0)&&(i.x=(i.x??0)-R/L[2],i.y=(i.y??0)-H/L[2],await W({x:R,y:H})&&k(i)),s=requestAnimationFrame(D)}function K(L){var Z;const{nodeLookup:W,multiSelectionActive:$,nodesDraggable:Y,transform:R,snapGrid:H,snapToGrid:q,selectNodesOnDrag:F,onNodeDragStart:V,onSelectionDragStart:I,unselectNodesAndEdges:z}=t();h=!0,(!F||!T)&&!$&&N&&((Z=W.get(N))!=null&&Z.selected||z()),T&&F&&N&&(e==null||e(N));const X=Ah(L.sourceEvent,{transform:R,snapGrid:H,snapToGrid:q,containerBounds:m});if(i=X,c=Vje(W,Y,X,N),c.size>0&&(n||V||!N&&I)){const[ee,se]=US({nodeId:N,dragItems:c,nodeLookup:W});n==null||n(L.sourceEvent,c,ee,se),V==null||V(L.sourceEvent,ee,se),N||I==null||I(L.sourceEvent,se)}}const B=uq().clickDistance(P).on("start",L=>{const{domNode:W,nodeDragThreshold:$,transform:Y,snapGrid:R,snapToGrid:H}=t();m=(W==null?void 0:W.getBoundingClientRect())||null,y=!1,w=!1,x=L.sourceEvent,$===0&&K(L),i=Ah(L.sourceEvent,{transform:Y,snapGrid:R,snapToGrid:H,containerBounds:m}),f=qa(L.sourceEvent,m)}).on("drag",L=>{const{autoPanOnNodeDrag:W,transform:$,snapGrid:Y,snapToGrid:R,nodeDragThreshold:H,nodeLookup:q}=t(),F=Ah(L.sourceEvent,{transform:$,snapGrid:Y,snapToGrid:R,containerBounds:m});if(x=L.sourceEvent,(L.sourceEvent.type==="touchmove"&&L.sourceEvent.touches.length>1||N&&!q.has(N))&&(y=!0),!y){if(!u&&W&&h&&(u=!0,D()),!h){const V=qa(L.sourceEvent,m),I=V.x-f.x,z=V.y-f.y;Math.sqrt(I*I+z*z)>H&&K(L)}(i.x!==F.xSnapped||i.y!==F.ySnapped)&&c&&h&&(f=qa(L.sourceEvent,m),k(F))}}).on("end",L=>{if(!(!h||y)&&(u=!1,h=!1,cancelAnimationFrame(s),c.size>0)){const{nodeLookup:W,updateNodePositions:$,onNodeDragStop:Y,onSelectionDragStop:R}=t();if(w&&($(c,!1),w=!1),a||Y||!N&&R){const[H,q]=US({nodeId:N,dragItems:c,nodeLookup:W,dragging:!1});a==null||a(L.sourceEvent,c,H,q),Y==null||Y(L.sourceEvent,H,q),N||R==null||R(L.sourceEvent,q)}}}).filter(L=>{const W=L.target;return!L.button&&(!C||!p3(W,`.${C}`,A))&&(!j||p3(W,j,A))});p.call(B)}function E(){p==null||p.on(".drag",null)}return{update:S,destroy:E}}function Gje(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())rm(a,Df(i))>0&&r.push(i);return r}const Wje=250;function Qje(e,t,n,r){var c,u;let a=[],i=1/0;const s=Gje(e,n,t+Wje);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 h of m){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:p,y}=Rc(f,h,h.position,!0),w=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(y-e.y,2));w>t||(w<i?(a=[{...h,x:p,y}],i=w):w===i&&a.push({...h,x:p,y}))}}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 Hq(e,t,n,r,a,i=!1){var f,m,h;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)??[],...((h=s.internals.handleBounds)==null?void 0:h.target)??[]],u=(n?c==null?void 0:c.find(p=>p.id===n):c==null?void 0:c[0])??null;return u&&i?{...u,...Rc(s,u,u.position,!0)}:u}function Fq(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Zje(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const qq=()=>!0;function Jje(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:a,edgeUpdaterType:i,isTarget:s,domNode:c,nodeLookup:u,lib:f,autoPanOnConnect:m,flowId:h,panBy:p,cancelConnection:y,onConnectStart:w,onConnect:x,onConnectEnd:S,isValidConnection:E=qq,onReconnectEnd:C,updateConnection:j,getTransform:A,getFromHandle:T,autoPanSpeed:N,dragThreshold:P=1,handleDomNode:k}){const D=Pq(e.target);let K=0,B;const{x:L,y:W}=qa(e),$=Fq(i,k),Y=c==null?void 0:c.getBoundingClientRect();let R=!1;if(!Y||!$)return;const H=Hq(a,$,r,u,t);if(!H)return;let q=qa(e,Y),F=!1,V=null,I=!1,z=null;function X(){if(!m||!Y)return;const[me,ne]=Cq(q,Y,N);p({x:me,y:ne}),K=requestAnimationFrame(X)}const Z={...H,nodeId:a,type:$,position:H.position},ee=u.get(a);let ie={inProgress:!0,isValid:null,from:Rc(ee,Z,Re.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:ee,to:q,toHandle:null,toPosition:r3[Z.position],toNode:null,pointer:q};function re(){R=!0,j(ie),w==null||w(e,{nodeId:a,handleId:r,handleType:$})}P===0&&re();function J(me){if(!R){const{x:Ve,y:mn}=qa(me),pt=Ve-L,Mr=mn-W;if(!(pt*pt+Mr*Mr>P*P))return;re()}if(!T()||!Z){ce(me);return}const ne=A();q=qa(me,Y),B=Qje(tp(q,ne,!1,[1,1]),n,u,Z),F||(X(),F=!0);const ye=Kq(me,{handle:B,connectionMode:t,fromNodeId:a,fromHandleId:r,fromType:s?"target":"source",isValidConnection:E,doc:D,lib:f,flowId:h,nodeLookup:u});z=ye.handleDomNode,V=ye.connection,I=Zje(!!B,ye.isValid);const xe=u.get(a),Ie=xe?Rc(xe,Z,Re.Left,!0):ie.from,Pe={...ie,from:Ie,isValid:I,to:ye.toHandle&&I?By({x:ye.toHandle.x,y:ye.toHandle.y},ne):q,toHandle:ye.toHandle,toPosition:I&&ye.toHandle?ye.toHandle.position:r3[Z.position],toNode:ye.toHandle?u.get(ye.toHandle.nodeId):null,pointer:q};j(Pe),ie=Pe}function ce(me){if(!("touches"in me&&me.touches.length>0)){if(R){(B||z)&&V&&I&&(x==null||x(V));const{inProgress:ne,...ye}=ie,xe={...ye,toPosition:ie.toHandle?ie.toPosition:null};S==null||S(me,xe),i&&(C==null||C(me,xe))}y(),cancelAnimationFrame(K),F=!1,I=!1,V=null,z=null,D.removeEventListener("mousemove",J),D.removeEventListener("mouseup",ce),D.removeEventListener("touchmove",J),D.removeEventListener("touchend",ce)}}D.addEventListener("mousemove",J),D.addEventListener("mouseup",ce),D.addEventListener("touchmove",J),D.addEventListener("touchend",ce)}function Kq(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:a,fromType:i,doc:s,lib:c,flowId:u,isValidConnection:f=qq,nodeLookup:m}){const h=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:y,y:w}=qa(e),x=s.elementFromPoint(y,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=Fq(void 0,S),j=S.getAttribute("data-nodeid"),A=S.getAttribute("data-handleid"),T=S.classList.contains("connectable"),N=S.classList.contains("connectableend");if(!j||!C)return E;const P={source:h?j:r,sourceHandle:h?A:a,target:h?r:j,targetHandle:h?a:A};E.connection=P;const D=T&&N&&(n===Mf.Strict?h&&C==="source"||!h&&C==="target":j!==r||A!==a);E.isValid=D&&f(P),E.toHandle=Hq(j,C,A,m,n,!0)}return E}const Q_={onPointerDown:Jje,isValid:Kq};function eCe({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const a=Yr(e);function i({translateExtent:c,width:u,height:f,zoomStep:m=1,pannable:h=!0,zoomable:p=!0,inversePan:y=!1}){const w=j=>{if(j.sourceEvent.type!=="wheel"||!t)return;const A=n(),T=j.sourceEvent.ctrlKey&&am()?10:1,N=-j.sourceEvent.deltaY*(j.sourceEvent.deltaMode===1?.05:j.sourceEvent.deltaMode?1:.002)*m,P=A[2]*Math.pow(2,N*T);t.scaleTo(P)};let x=[0,0];const S=j=>{(j.sourceEvent.type==="mousedown"||j.sourceEvent.type==="touchstart")&&(x=[j.sourceEvent.clientX??j.sourceEvent.touches[0].clientX,j.sourceEvent.clientY??j.sourceEvent.touches[0].clientY])},E=j=>{const A=n();if(j.sourceEvent.type!=="mousemove"&&j.sourceEvent.type!=="touchmove"||!t)return;const T=[j.sourceEvent.clientX??j.sourceEvent.touches[0].clientX,j.sourceEvent.clientY??j.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]))*(y?-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=bq().on("start",S).on("zoom",h?E:null).on("zoom.wheel",p?w:null);a.call(C,{})}function s(){a.on("zoom",null)}return{update:i,destroy:s,pointer:Ia}}const vb=e=>({x:e.x,y:e.y,zoom:e.k}),HS=({x:e,y:t,zoom:n})=>hb.translate(e,t).scale(n),Wu=(e,t)=>e.target.closest(`.${t}`),Vq=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),tCe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,FS=(e,t=0,n=tCe,r=()=>{})=>{const a=typeof t=="number"&&t>0;return a||r(),a?e.transition().duration(t).ease(n).on("end",r):e},Yq=e=>{const t=e.ctrlKey&&am()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function nCe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:a,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:c,onPanZoom:u,onPanZoomEnd:f}){return m=>{if(Wu(m,t))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(m.ctrlKey&&s){const S=Ia(m),E=Yq(m),C=h*Math.pow(2,E);r.scaleTo(n,C,S,m);return}const p=m.deltaMode===1?20:1;let y=a===dc.Vertical?0:m.deltaX*p,w=a===dc.Horizontal?0:m.deltaY*p;!am()&&m.shiftKey&&a!==dc.Vertical&&(y=m.deltaY*p,w=0),r.translateBy(n,-(y/h)*i,-(w/h)*i,{internal:!0});const x=vb(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 rCe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,a){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,c=Wu(r,e);if(r.ctrlKey&&i&&c&&r.preventDefault(),s||c)return null;r.preventDefault(),n.call(this,r,a)}}function aCe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,c;if((i=r.sourceEvent)!=null&&i.internal)return;const a=vb(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 iCe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:a}){return i=>{var s,c;e.usedRightMouseButton=!!(n&&Vq(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,vb(i.transform)))}}function oCe({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&&Vq(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),a)){const u=vb(s.transform);e.prevViewport=u,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a==null||a(s.sourceEvent,u)},n?150:0)}}}function sCe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:a,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:c,noPanClassName:u,lib:f,connectionInProgress:m}){return h=>{var S;const p=e||t,y=n&&h.ctrlKey,w=h.type==="wheel";if(h.button===1&&h.type==="mousedown"&&(Wu(h,`${f}-flow__node`)||Wu(h,`${f}-flow__edge`)))return!0;if(!r&&!p&&!a&&!i&&!n||s||m&&!w||Wu(h,c)&&w||Wu(h,u)&&(!w||a&&w&&!e)||!n&&h.ctrlKey&&w)return!1;if(!n&&h.type==="touchstart"&&((S=h.touches)==null?void 0:S.length)>1)return h.preventDefault(),!1;if(!p&&!a&&!y&&w||!r&&(h.type==="mousedown"||h.type==="touchstart")||Array.isArray(r)&&!r.includes(h.button)&&h.type==="mousedown")return!1;const x=Array.isArray(r)&&r.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||w)&&x}}function lCe({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(),h=bq().scaleExtent([t,n]).translateExtent(r),p=Yr(e).call(h);C({x:a.x,y:a.y,zoom:kf(a.zoom,t,n)},[[0,0],[m.width,m.height]],r);const y=p.on("wheel.zoom"),w=p.on("dblclick.zoom");h.wheelDelta(Yq);function x(B,L){return p?new Promise(W=>{h==null||h.interpolate((L==null?void 0:L.interpolate)==="linear"?xo:mg).transform(FS(p,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function S({noWheelClassName:B,noPanClassName:L,onPaneContextMenu:W,userSelectionActive:$,panOnScroll:Y,panOnDrag:R,panOnScrollMode:H,panOnScrollSpeed:q,preventScrolling:F,zoomOnPinch:V,zoomOnScroll:I,zoomOnDoubleClick:z,zoomActivationKeyPressed:X,lib:Z,onTransformChange:ee,connectionInProgress:se,paneClickDistance:ie,selectionOnDrag:re}){$&&!f.isZoomingOrPanning&&E();const J=Y&&!X&&!$;h.clickDistance(re?1/0:!Fa(ie)||ie<0?0:ie);const ce=J?nCe({zoomPanValues:f,noWheelClassName:B,d3Selection:p,d3Zoom:h,panOnScrollMode:H,panOnScrollSpeed:q,zoomOnPinch:V,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:c}):rCe({noWheelClassName:B,preventScrolling:F,d3ZoomHandler:y});if(p.on("wheel.zoom",ce,{passive:!1}),!$){const ne=aCe({zoomPanValues:f,onDraggingChange:u,onPanZoomStart:s});h.on("start",ne);const ye=iCe({zoomPanValues:f,panOnDrag:R,onPaneContextMenu:!!W,onPanZoom:i,onTransformChange:ee});h.on("zoom",ye);const xe=oCe({zoomPanValues:f,panOnDrag:R,panOnScroll:Y,onPaneContextMenu:W,onPanZoomEnd:c,onDraggingChange:u});h.on("end",xe)}const me=sCe({zoomActivationKeyPressed:X,panOnDrag:R,zoomOnScroll:I,panOnScroll:Y,zoomOnDoubleClick:z,zoomOnPinch:V,userSelectionActive:$,noPanClassName:L,noWheelClassName:B,lib:Z,connectionInProgress:se});h.filter(me),z?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function E(){h.on("zoom",null)}async function C(B,L,W){const $=HS(B),Y=h==null?void 0:h.constrain()($,L,W);return Y&&await x(Y),new Promise(R=>R(Y))}async function j(B,L){const W=HS(B);return await x(W,L),new Promise($=>$(W))}function A(B){if(p){const L=HS(B),W=p.property("__zoom");(W.k!==B.zoom||W.x!==B.x||W.y!==B.y)&&(h==null||h.transform(p,L,null,{sync:!0}))}}function T(){const B=p?yq(p.node()):{x:0,y:0,k:1};return{x:B.x,y:B.y,zoom:B.k}}function N(B,L){return p?new Promise(W=>{h==null||h.interpolate((L==null?void 0:L.interpolate)==="linear"?xo:mg).scaleTo(FS(p,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function P(B,L){return p?new Promise(W=>{h==null||h.interpolate((L==null?void 0:L.interpolate)==="linear"?xo:mg).scaleBy(FS(p,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function k(B){h==null||h.scaleExtent(B)}function D(B){h==null||h.translateExtent(B)}function K(B){const L=!Fa(B)||B<0?0:B;h==null||h.clickDistance(L)}return{update:S,destroy:E,setViewport:j,setViewportConstrained:C,getViewport:T,scaleTo:N,scaleBy:P,setScaleExtent:k,setTranslateExtent:D,syncViewport:A,setClickDistance:K}}var Lf;(function(e){e.Line="line",e.Handle="handle"})(Lf||(Lf={}));function cCe({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 Os(e,t){return Math.max(0,t-e)}function js(e,t){return Math.max(0,e-t)}function Jv(e,t,n){return Math.max(0,t-e,e-n)}function g3(e,t){return e?!t:t}function uCe(e,t,n,r,a,i,s,c){let{affectsX:u,affectsY:f}=t;const{isHorizontal:m,isVertical:h}=t,p=m&&h,{xSnapped:y,ySnapped:w}=n,{minWidth:x,maxWidth:S,minHeight:E,maxHeight:C}=r,{x:j,y:A,width:T,height:N,aspectRatio:P}=e;let k=Math.floor(m?y-e.pointerX:0),D=Math.floor(h?w-e.pointerY:0);const K=T+(u?-k:k),B=N+(f?-D:D),L=-i[0]*T,W=-i[1]*N;let $=Jv(K,x,S),Y=Jv(B,E,C);if(s){let q=0,F=0;u&&k<0?q=Os(j+k+L,s[0][0]):!u&&k>0&&(q=js(j+K+L,s[1][0])),f&&D<0?F=Os(A+D+W,s[0][1]):!f&&D>0&&(F=js(A+B+W,s[1][1])),$=Math.max($,q),Y=Math.max(Y,F)}if(c){let q=0,F=0;u&&k>0?q=js(j+k,c[0][0]):!u&&k<0&&(q=Os(j+K,c[1][0])),f&&D>0?F=js(A+D,c[0][1]):!f&&D<0&&(F=Os(A+B,c[1][1])),$=Math.max($,q),Y=Math.max(Y,F)}if(a){if(m){const q=Jv(K/P,E,C)*P;if($=Math.max($,q),s){let F=0;!u&&!f||u&&!f&&p?F=js(A+W+K/P,s[1][1])*P:F=Os(A+W+(u?k:-k)/P,s[0][1])*P,$=Math.max($,F)}if(c){let F=0;!u&&!f||u&&!f&&p?F=Os(A+K/P,c[1][1])*P:F=js(A+(u?k:-k)/P,c[0][1])*P,$=Math.max($,F)}}if(h){const q=Jv(B*P,x,S)/P;if(Y=Math.max(Y,q),s){let F=0;!u&&!f||f&&!u&&p?F=js(j+B*P+L,s[1][0])/P:F=Os(j+(f?D:-D)*P+L,s[0][0])/P,Y=Math.max(Y,F)}if(c){let F=0;!u&&!f||f&&!u&&p?F=Os(j+B*P,c[1][0])/P:F=js(j+(f?D:-D)*P,c[0][0])/P,Y=Math.max(Y,F)}}}D=D+(D<0?Y:-Y),k=k+(k<0?$:-$),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?j+k:j,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 Xq={width:0,height:0,x:0,y:0},fCe={...Xq,pointerX:0,pointerY:0,aspectRatio:1};function dCe(e){return[[0,0],[e.measured.width,e.measured.height]]}function hCe(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 mCe({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:a}){const i=Yr(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:h,resizeDirection:p,onResizeStart:y,onResize:w,onResizeEnd:x,shouldResize:S}){let E={...Xq},C={...fCe};s={boundaries:m,resizeDirection:p,keepAspectRatio:h,controlDirection:v3(f)};let j,A=null,T=[],N,P,k,D=!1;const K=uq().on("start",B=>{const{nodeLookup:L,transform:W,snapGrid:$,snapToGrid:Y,nodeOrigin:R,paneDomNode:H}=n();if(j=L.get(t),!j)return;A=(H==null?void 0:H.getBoundingClientRect())??null;const{xSnapped:q,ySnapped:F}=Ah(B.sourceEvent,{transform:W,snapGrid:$,snapToGrid:Y,containerBounds:A});E={width:j.measured.width??0,height:j.measured.height??0,x:j.position.x??0,y:j.position.y??0},C={...E,pointerX:q,pointerY:F,aspectRatio:E.width/E.height},N=void 0,j.parentId&&(j.extent==="parent"||j.expandParent)&&(N=L.get(j.parentId),P=N&&j.extent==="parent"?dCe(N):void 0),T=[],k=void 0;for(const[V,I]of L)if(I.parentId===t&&(T.push({id:V,position:{...I.position},extent:I.extent}),I.extent==="parent"||I.expandParent)){const z=hCe(I,j,I.origin??R);k?k=[[Math.min(z[0][0],k[0][0]),Math.min(z[0][1],k[0][1])],[Math.max(z[1][0],k[1][0]),Math.max(z[1][1],k[1][1])]]:k=z}y==null||y(B,{...E})}).on("drag",B=>{const{transform:L,snapGrid:W,snapToGrid:$,nodeOrigin:Y}=n(),R=Ah(B.sourceEvent,{transform:L,snapGrid:W,snapToGrid:$,containerBounds:A}),H=[];if(!j)return;const{x:q,y:F,width:V,height:I}=E,z={},X=j.origin??Y,{width:Z,height:ee,x:se,y:ie}=uCe(C,s.controlDirection,R,s.boundaries,s.keepAspectRatio,X,P,k),re=Z!==V,J=ee!==I,ce=se!==q&&re,me=ie!==F&&J;if(!ce&&!me&&!re&&!J)return;if((ce||me||X[0]===1||X[1]===1)&&(z.x=ce?se:E.x,z.y=me?ie:E.y,E.x=z.x,E.y=z.y,T.length>0)){const Ie=se-q,Pe=ie-F;for(const Ve of T)Ve.position={x:Ve.position.x-Ie+X[0]*(Z-V),y:Ve.position.y-Pe+X[1]*(ee-I)},H.push(Ve)}if((re||J)&&(z.width=re&&(!s.resizeDirection||s.resizeDirection==="horizontal")?Z:E.width,z.height=J&&(!s.resizeDirection||s.resizeDirection==="vertical")?ee:E.height,E.width=z.width,E.height=z.height),N&&j.expandParent){const Ie=X[0]*(z.width??0);z.x&&z.x<Ie&&(E.x=Ie,C.x=C.x-(z.x-Ie));const Pe=X[1]*(z.height??0);z.y&&z.y<Pe&&(E.y=Pe,C.y=C.y-(z.y-Pe))}const ne=cCe({width:E.width,prevWidth:V,height:E.height,prevHeight:I,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),ye={...E,direction:ne};(S==null?void 0:S(B,ye))!==!1&&(D=!0,w==null||w(B,ye),r(z,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 pCe={},y3=e=>{let t;const n=new Set,r=(m,h)=>{const p=typeof m=="function"?m(t):m;if(!Object.is(p,t)){const y=t;t=h??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(w=>w(t,y))}},a=()=>t,u={setState:r,getState:a,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m)),destroy:()=>{(pCe?"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},vCe=e=>e?y3(e):y3,{useDebugValue:gCe}=ge,{useSyncExternalStoreWithSelector:yCe}=Ioe,bCe=e=>e;function Gq(e,t=bCe,n){const r=yCe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return gCe(r),r}const b3=(e,t)=>{const n=vCe(e),r=(a,i=t)=>Gq(n,a,i);return Object.assign(r,n),r},xCe=(e,t)=>e?b3(e,t):b3;function zt(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 gb=b.createContext(null),wCe=gb.Provider,Wq=Mi.error001();function it(e,t){const n=b.useContext(gb);if(n===null)throw new Error(Wq);return Gq(n,e,t)}function $t(){const e=b.useContext(gb);if(e===null)throw new Error(Wq);return b.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const x3={display:"none"},SCe={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Qq="react-flow__node-desc",Zq="react-flow__edge-desc",ECe="react-flow__aria-live",_Ce=e=>e.ariaLiveMessage,OCe=e=>e.ariaLabelConfig;function jCe({rfId:e}){const t=it(_Ce);return g.jsx("div",{id:`${ECe}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:SCe,children:t})}function CCe({rfId:e,disableKeyboardA11y:t}){const n=it(OCe);return g.jsxs(g.Fragment,{children:[g.jsx("div",{id:`${Qq}-${e}`,style:x3,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),g.jsx("div",{id:`${Zq}-${e}`,style:x3,children:n["edge.a11yDescription.default"]}),!t&&g.jsx(jCe,{rfId:e})]})}const yb=b.forwardRef(({position:e="top-left",children:t,className:n,style:r,...a},i)=>{const s=`${e}`.split("-");return g.jsx("div",{className:hn(["react-flow__panel",n,...s]),style:r,ref:i,...a,children:t})});yb.displayName="Panel";function ACe({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:g.jsx(yb,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:g.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const NCe=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}},eg=e=>e.id;function TCe(e,t){return zt(e.selectedNodes.map(eg),t.selectedNodes.map(eg))&&zt(e.selectedEdges.map(eg),t.selectedEdges.map(eg))}function PCe({onSelectionChange:e}){const t=$t(),{selectedNodes:n,selectedEdges:r}=it(NCe,TCe);return b.useEffect(()=>{const a={nodes:n,edges:r};e==null||e(a),t.getState().onSelectionChangeHandlers.forEach(i=>i(a))},[n,r,e]),null}const MCe=e=>!!e.onSelectionChangeHandlers;function RCe({onSelectionChange:e}){const t=it(MCe);return e||t?g.jsx(PCe,{onSelectionChange:e}):null}const Jq=[0,0],kCe={x:0,y:0,zoom:1},DCe=["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=[...DCe,"rfId"],ICe=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:tm,nodeOrigin:Jq,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function LCe(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:a,setTranslateExtent:i,setNodeExtent:s,reset:c,setDefaultNodesAndEdges:u}=it(ICe,zt),f=$t();b.useEffect(()=>(u(e.defaultNodes,e.defaultEdges),()=>{m.current=S3,c()}),[]);const m=b.useRef(S3);return b.useEffect(()=>{for(const h of w3){const p=e[h],y=m.current[h];p!==y&&(typeof e[h]>"u"||(h==="nodes"?t(p):h==="edges"?n(p):h==="minZoom"?r(p):h==="maxZoom"?a(p):h==="translateExtent"?i(p):h==="nodeExtent"?s(p):h==="ariaLabelConfig"?f.setState({ariaLabelConfig:jje(p)}):h==="fitView"?f.setState({fitViewQueued:p}):h==="fitViewOptions"?f.setState({fitViewOptions:p}):f.setState({[h]:p})))}m.current=e},w3.map(h=>e[h])),null}function E3(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function zCe(e){var r;const[t,n]=b.useState(e==="system"?null:e);return b.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 im(e=null,t={target:_3,actInsideInputWithModifier:!0}){const[n,r]=b.useState(!1),a=b.useRef(!1),i=b.useRef(new Set([])),[s,c]=b.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",`
`).replace(`

`,`
+`).split(`
`)),m=f.reduce((h,p)=>h.concat(...p),[]);return[f,m]}return[[],[]]},[e]);return b.useEffect(()=>{const u=(t==null?void 0:t.target)??_3,f=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const m=y=>{var S,E;if(a.current=y.ctrlKey||y.metaKey||y.shiftKey||y.altKey,(!a.current||a.current&&!f)&&Mq(y))return!1;const x=j3(y.code,c);if(i.current.add(y[x]),O3(s,i.current,!1)){const C=((E=(S=y.composedPath)==null?void 0:S.call(y))==null?void 0:E[0])||y.target,j=(C==null?void 0:C.nodeName)==="BUTTON"||(C==null?void 0:C.nodeName)==="A";t.preventDefault!==!1&&(a.current||!j)&&y.preventDefault(),r(!0)}},h=y=>{const w=j3(y.code,c);O3(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(y[w]),y.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",h),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{u==null||u.removeEventListener("keydown",m),u==null||u.removeEventListener("keyup",h),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),n}function O3(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(a=>t.has(a)))}function j3(e,t){return t.includes(e)?"code":"key"}const $Ce=()=>{const e=$t();return b.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,h=n.snapToGrid??i;return tp(f,r,h,m)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:a,y:i}=r.getBoundingClientRect(),s=By(t,n);return{x:s.x+a,y:s.y+i}}}),[])};function e9(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)BCe(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 BCe(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 UCe(e,t){return e9(e,t)}function HCe(e,t){return e9(e,t)}function Xl(e,t){return{id:e,type:"select",selected:t}}function Qu(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=>vje(e),FCe=e=>_q(e);function t9(e){return b.forwardRef(e)}const qCe=typeof window<"u"?b.useLayoutEffect:b.useEffect;function T3(e){const[t,n]=b.useState(BigInt(0)),[r]=b.useState(()=>KCe(()=>n(a=>a+BigInt(1))));return qCe(()=>{const a=r.get();a.length&&(e(a),r.reset())},[t]),r}function KCe(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const n9=b.createContext(null);function VCe({children:e}){const t=$t(),n=b.useCallback(c=>{const{nodes:u=[],setNodes:f,hasDefaultNodes:m,onNodesChange:h,nodeLookup:p,fitViewQueued:y,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?h==null||h(S):y&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:C,setNodes:j}=t.getState();E&&j(C)})},[]),r=T3(n),a=b.useCallback(c=>{const{edges:u=[],setEdges:f,hasDefaultEdges:m,onEdgesChange:h,edgeLookup:p}=t.getState();let y=u;for(const w of c)y=typeof w=="function"?w(y):w;m?f(y):h&&h(C3({items:y,lookup:p}))},[]),i=T3(a),s=b.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return g.jsx(n9.Provider,{value:s,children:e})}function YCe(){const e=b.useContext(n9);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const XCe=e=>!!e.panZoom;function bb(){const e=$Ce(),t=$t(),n=YCe(),r=it(XCe),a=b.useMemo(()=>{const i=h=>t.getState().nodeLookup.get(h),s=h=>{n.nodeQueue.push(h)},c=h=>{n.edgeQueue.push(h)},u=h=>{var E,C;const{nodeLookup:p,nodeOrigin:y}=t.getState(),w=N3(h)?h:p.get(h.id),x=w.parentId?Tq(w.position,w.measured,w.parentId,p,y):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 Df(S)},f=(h,p,y={replace:!1})=>{s(w=>w.map(x=>{if(x.id===h){const S=typeof p=="function"?p(x):p;return y.replace&&N3(S)?S:{...x,...S}}return x}))},m=(h,p,y={replace:!1})=>{c(w=>w.map(x=>{if(x.id===h){const S=typeof p=="function"?p(x):p;return y.replace&&FCe(S)?S:{...x,...S}}return x}))};return{getNodes:()=>t.getState().nodes.map(h=>({...h})),getNode:h=>{var p;return(p=i(h))==null?void 0:p.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:h=[]}=t.getState();return h.map(p=>({...p}))},getEdge:h=>t.getState().edgeLookup.get(h),setNodes:s,setEdges:c,addNodes:h=>{const p=Array.isArray(h)?h:[h];n.nodeQueue.push(y=>[...y,...p])},addEdges:h=>{const p=Array.isArray(h)?h:[h];n.edgeQueue.push(y=>[...y,...p])},toObject:()=>{const{nodes:h=[],edges:p=[],transform:y}=t.getState(),[w,x,S]=y;return{nodes:h.map(E=>({...E})),edges:p.map(E=>({...E})),viewport:{x:w,y:x,zoom:S}}},deleteElements:async({nodes:h=[],edges:p=[]})=>{const{nodes:y,edges:w,onNodesDelete:x,onEdgesDelete:S,triggerNodeChanges:E,triggerEdgeChanges:C,onDelete:j,onBeforeDelete:A}=t.getState(),{nodes:T,edges:N}=await wje({nodesToRemove:h,edgesToRemove:p,nodes:y,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)&&(j==null||j({nodes:T,edges:N})),{deletedNodes:T,deletedEdges:N}},getIntersectingNodes:(h,p=!0,y)=>{const w=i3(h),x=w?h:u(h),S=y!==void 0;return x?(y||t.getState().nodes).filter(E=>{const C=t.getState().nodeLookup.get(E.id);if(C&&!w&&(E.id===h.id||!C.internals.positionAbsolute))return!1;const j=Df(S?E:C),A=rm(j,x);return p&&A>0||A>=j.width*j.height||A>=x.width*x.height}):[]},isNodeIntersecting:(h,p,y=!0)=>{const x=i3(h)?h:u(h);if(!x)return!1;const S=rm(x,p);return y&&S>0||S>=p.width*p.height||S>=x.width*x.height},updateNode:f,updateNodeData:(h,p,y={replace:!1})=>{f(h,w=>{const x=typeof p=="function"?p(w):p;return y.replace?{...w,data:x}:{...w,data:{...w.data,...x}}},y)},updateEdge:m,updateEdgeData:(h,p,y={replace:!1})=>{m(h,w=>{const x=typeof p=="function"?p(w):p;return y.replace?{...w,data:x}:{...w,data:{...w.data,...x}}},y)},getNodesBounds:h=>{const{nodeLookup:p,nodeOrigin:y}=t.getState();return gje(h,{nodeLookup:p,nodeOrigin:y})},getHandleConnections:({type:h,id:p,nodeId:y})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${y}-${h}${p?`-${p}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:h,handleId:p,nodeId:y})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${y}${h?p?`-${h}-${p}`:`-${h}`:""}`))==null?void 0:w.values())??[])},fitView:async h=>{const p=t.getState().fitViewResolver??Oje();return t.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:p}),n.nodeQueue.push(y=>[...y]),p.promise}}},[]);return b.useMemo(()=>({...a,...e,viewportInitialized:r}),[r])}const P3=e=>e.selected,GCe=typeof window<"u"?window:void 0;function WCe({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=$t(),{deleteElements:r}=bb(),a=im(e,{actInsideInputWithModifier:!1}),i=im(t,{target:GCe});b.useEffect(()=>{if(a){const{edges:s,nodes:c}=n.getState();r({nodes:c.filter(P3),edges:s.filter(P3)}),n.setState({nodesSelectionActive:!1})}},[a]),b.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function QCe(e){const t=$t();b.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",Mi.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 xb={position:"absolute",width:"100%",height:"100%",top:0,left:0},ZCe=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function JCe({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:a=.5,panOnScrollMode:i=dc.Free,zoomOnDoubleClick:s=!0,panOnDrag:c=!0,defaultViewport:u,translateExtent:f,minZoom:m,maxZoom:h,zoomActivationKeyCode:p,preventScrolling:y=!0,children:w,noWheelClassName:x,noPanClassName:S,onViewportChange:E,isControlledViewport:C,paneClickDistance:j,selectionOnDrag:A}){const T=$t(),N=b.useRef(null),{userSelectionActive:P,lib:k,connectionInProgress:D}=it(ZCe,zt),K=im(p),B=b.useRef();QCe(N);const L=b.useCallback(W=>{E==null||E({x:W[0],y:W[1],zoom:W[2]}),C||T.setState({transform:W})},[E,C]);return b.useEffect(()=>{if(N.current){B.current=lCe({domNode:N.current,minZoom:m,maxZoom:h,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:$,zoom:Y}=B.current.getViewport();return T.setState({panZoom:B.current,transform:[W,$,Y],domNode:N.current.closest(".react-flow")}),()=>{var R;(R=B.current)==null||R.destroy()}}},[]),b.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:y,noPanClassName:S,userSelectionActive:P,noWheelClassName:x,lib:k,onTransformChange:L,connectionInProgress:D,selectionOnDrag:A,paneClickDistance:j})},[e,t,n,r,a,i,s,c,K,y,S,P,x,k,L,D,A,j]),g.jsx("div",{className:"react-flow__renderer",ref:N,style:xb,children:w})}const eAe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function tAe(){const{userSelectionActive:e,userSelectionRect:t}=it(eAe,zt);return e&&t?g.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const qS=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},nAe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function rAe({isSelecting:e,selectionKeyPressed:t,selectionMode:n=nm.Full,panOnDrag:r,paneClickDistance:a,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:f,onPaneScroll:m,onPaneMouseEnter:h,onPaneMouseMove:p,onPaneMouseLeave:y,children:w}){const x=$t(),{userSelectionActive:S,elementsSelectable:E,dragging:C,connectionInProgress:j}=it(nAe,zt),A=E&&(e||S),T=b.useRef(null),N=b.useRef(),P=b.useRef(new Set),k=b.useRef(new Set),D=b.useRef(!1),K=q=>{if(D.current||j){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)},L=m?q=>m(q):void 0,W=q=>{D.current&&(q.stopPropagation(),D.current=!1)},$=q=>{var ee,se;const{domNode:F}=x.getState();if(N.current=F==null?void 0:F.getBoundingClientRect(),!N.current)return;const V=q.target===T.current;if(!V&&!!q.target.closest(".nokey")||!e||!(i&&V||t)||q.button!==0||!q.isPrimary)return;(se=(ee=q.target)==null?void 0:ee.setPointerCapture)==null||se.call(ee,q.pointerId),D.current=!1;const{x:X,y:Z}=qa(q.nativeEvent,N.current);x.setState({userSelectionRect:{width:0,height:0,startX:X,startY:Z,x:X,y:Z}}),V||(q.stopPropagation(),q.preventDefault())},Y=q=>{const{userSelectionRect:F,transform:V,nodeLookup:I,edgeLookup:z,connectionLookup:X,triggerNodeChanges:Z,triggerEdgeChanges:ee,defaultEdgeOptions:se,resetSelectedElements:ie}=x.getState();if(!N.current||!F)return;const{x:re,y:J}=qa(q.nativeEvent,N.current),{startX:ce,startY:me}=F;if(!D.current){const Pe=t?0:a;if(Math.hypot(re-ce,J-me)<=Pe)return;ie(),s==null||s(q)}D.current=!0;const ne={startX:ce,startY:me,x:re<ce?re:ce,y:J<me?J:me,width:Math.abs(re-ce),height:Math.abs(J-me)},ye=P.current,xe=k.current;P.current=new Set(kA(I,ne,V,n===nm.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=X.get(Pe);if(Ve)for(const{edgeId:mn}of Ve.values()){const pt=z.get(mn);pt&&(pt.selectable??Ie)&&k.current.add(mn)}}if(!o3(ye,P.current)){const Pe=Qu(I,P.current,!0);Z(Pe)}if(!o3(xe,k.current)){const Pe=Qu(z,k.current);ee(Pe)}x.setState({userSelectionRect:ne,userSelectionActive:!0,nodesSelectionActive:!1})},R=q=>{var F,V;q.button===0&&((V=(F=q.target)==null?void 0:F.releasePointerCapture)==null||V.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 g.jsxs("div",{className:hn(["react-flow__pane",{draggable:H,dragging:C,selection:e}]),onClick:A?void 0:qS(K,T),onContextMenu:qS(B,T),onWheel:qS(L,T),onPointerEnter:A?void 0:h,onPointerMove:A?Y:p,onPointerUp:A?R:void 0,onPointerDownCapture:A?$:void 0,onClickCapture:A?W:void 0,onPointerLeave:y,ref:T,style:xb,children:[w,g.jsx(tAe,{})]})}function Z_({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",Mi.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 r9({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:a,isSelectable:i,nodeClickDistance:s}){const c=$t(),[u,f]=b.useState(!1),m=b.useRef();return b.useEffect(()=>{m.current=Xje({getStoreItems:()=>c.getState(),onNodeMouseDown:h=>{Z_({id:h,store:c,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),b.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 h;(h=m.current)==null||h.destroy()}},[n,r,t,i,e,a,s]),u}const aAe=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function a9(){const e=$t();return b.useCallback(n=>{const{nodeExtent:r,snapToGrid:a,snapGrid:i,nodesDraggable:s,onError:c,updateNodePositions:u,nodeLookup:f,nodeOrigin:m}=e.getState(),h=new Map,p=aAe(s),y=a?i[0]:5,w=a?i[1]:5,x=n.direction.x*y*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=ep(C,i));const{position:j,positionAbsolute:A}=Oq({nodeId:E.id,nextPosition:C,nodeLookup:f,nodeExtent:r,nodeOrigin:m,onError:c});E.position=j,E.internals.positionAbsolute=A,h.set(E.id,E)}u(h)},[])}const HA=b.createContext(null),iAe=HA.Provider;HA.Consumer;const i9=()=>b.useContext(HA),oAe=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),sAe=(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===Mf.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 lAe({type:e="source",position:t=Re.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:a=!0,isConnectableEnd:i=!0,id:s,onConnect:c,children:u,className:f,onMouseDown:m,onTouchStart:h,...p},y){var Y,R;const w=s||null,x=e==="target",S=$t(),E=i9(),{connectOnClick:C,noPanClassName:j,rfId:A}=it(oAe,zt),{connectingFrom:T,connectingTo:N,clickConnecting:P,isPossibleEndHandle:k,connectionInProcess:D,clickConnectionInProcess:K,valid:B}=it(sAe(E,w,e),zt);E||(R=(Y=S.getState()).onError)==null||R.call(Y,"010",Mi.error010());const L=H=>{const{defaultEdgeOptions:q,onConnect:F,hasDefaultEdges:V}=S.getState(),I={...q,...H};if(V){const{edges:z,setEdges:X}=S.getState();X(Mje(I,z))}F==null||F(I),c==null||c(I)},W=H=>{if(!E)return;const q=Rq(H.nativeEvent);if(a&&(q&&H.button===0||!q)){const F=S.getState();Q_.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:(...V)=>{var I,z;return(z=(I=S.getState()).onConnectEnd)==null?void 0:z.call(I,...V)},updateConnection:F.updateConnection,onConnect:L,isValidConnection:n||((...V)=>{var I,z;return((z=(I=S.getState()).isValidConnection)==null?void 0:z.call(I,...V))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:F.autoPanSpeed,dragThreshold:F.connectionDragThreshold})}q?m==null||m(H):h==null||h(H)},$=H=>{const{onClickConnectStart:q,onClickConnectEnd:F,connectionClickStartHandle:V,connectionMode:I,isValidConnection:z,lib:X,rfId:Z,nodeLookup:ee,connection:se}=S.getState();if(!E||!V&&!a)return;if(!V){q==null||q(H.nativeEvent,{nodeId:E,handleId:w,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:E,type:e,id:w}});return}const ie=Pq(H.target),re=n||z,{connection:J,isValid:ce}=Q_.isValid(H.nativeEvent,{handle:{nodeId:E,id:w,type:e},connectionMode:I,fromNodeId:V.nodeId,fromHandleId:V.id||null,fromType:V.type,isValidConnection:re,flowId:Z,doc:ie,lib:X,nodeLookup:ee});ce&&J&&L(J);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 g.jsx("div",{"data-handleid":w,"data-nodeid":E,"data-handlepos":t,"data-id":`${A}-${E}-${w}-${e}`,className:hn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",j,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?$:void 0,ref:y,...p,children:u})}const zf=b.memo(t9(lAe));function cAe({data:e,isConnectable:t,sourcePosition:n=Re.Bottom}){return g.jsxs(g.Fragment,{children:[e==null?void 0:e.label,g.jsx(zf,{type:"source",position:n,isConnectable:t})]})}function uAe({data:e,isConnectable:t,targetPosition:n=Re.Top,sourcePosition:r=Re.Bottom}){return g.jsxs(g.Fragment,{children:[g.jsx(zf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,g.jsx(zf,{type:"source",position:r,isConnectable:t})]})}function fAe(){return null}function dAe({data:e,isConnectable:t,targetPosition:n=Re.Top}){return g.jsxs(g.Fragment,{children:[g.jsx(zf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Uy={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},M3={input:cAe,default:uAe,output:dAe,group:fAe};function hAe(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 mAe=e=>{const{width:t,height:n,x:r,y:a}=Jm(e.nodeLookup,{filter:i=>!!i.selected});return{width:Fa(t)?t:null,height:Fa(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 pAe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=$t(),{width:a,height:i,transformString:s,userSelectionActive:c}=it(mAe,zt),u=a9(),f=b.useRef(null);b.useEffect(()=>{var y;n||(y=f.current)==null||y.focus({preventScroll:!0})},[n]);const m=!c&&a!==null&&i!==null;if(r9({nodeRef:f,disabled:!m}),!m)return null;const h=e?y=>{const w=r.getState().nodes.filter(x=>x.selected);e(y,w)}:void 0,p=y=>{Object.prototype.hasOwnProperty.call(Uy,y.key)&&(y.preventDefault(),u({direction:Uy[y.key],factor:y.shiftKey?4:1}))};return g.jsx("div",{className:hn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:g.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:a,height:i}})})}const R3=typeof window<"u"?window:void 0,vAe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function o9({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:c,deleteKeyCode:u,selectionKeyCode:f,selectionOnDrag:m,selectionMode:h,onSelectionStart:p,onSelectionEnd:y,multiSelectionKeyCode:w,panActivationKeyCode:x,zoomActivationKeyCode:S,elementsSelectable:E,zoomOnScroll:C,zoomOnPinch:j,panOnScroll:A,panOnScrollSpeed:T,panOnScrollMode:N,zoomOnDoubleClick:P,panOnDrag:k,defaultViewport:D,translateExtent:K,minZoom:B,maxZoom:L,preventScrolling:W,onSelectionContextMenu:$,noWheelClassName:Y,noPanClassName:R,disableKeyboardA11y:H,onViewportChange:q,isControlledViewport:F}){const{nodesSelectionActive:V,userSelectionActive:I}=it(vAe,zt),z=im(f,{target:R3}),X=im(x,{target:R3}),Z=X||k,ee=X||A,se=m&&Z!==!0,ie=z||I||se;return WCe({deleteKeyCode:u,multiSelectionKeyCode:w}),g.jsx(JCe,{onPaneContextMenu:i,elementsSelectable:E,zoomOnScroll:C,zoomOnPinch:j,panOnScroll:ee,panOnScrollSpeed:T,panOnScrollMode:N,zoomOnDoubleClick:P,panOnDrag:!z&&Z,defaultViewport:D,translateExtent:K,minZoom:B,maxZoom:L,zoomActivationKeyCode:S,preventScrolling:W,noWheelClassName:Y,noPanClassName:R,onViewportChange:q,isControlledViewport:F,paneClickDistance:c,selectionOnDrag:se,children:g.jsxs(rAe,{onSelectionStart:p,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:Z,isSelecting:!!ie,selectionMode:h,selectionKeyPressed:z,paneClickDistance:c,selectionOnDrag:se,children:[e,V&&g.jsx(pAe,{onSelectionContextMenu:$,noPanClassName:R,disableKeyboardA11y:H})]})})}o9.displayName="FlowRenderer";const gAe=b.memo(o9),yAe=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 bAe(e){return it(b.useCallback(yAe(e),[e]),zt)}const xAe=e=>e.updateNodeInternals;function wAe(){const e=it(xAe),[t]=b.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 b.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function SAe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const a=$t(),i=b.useRef(null),s=b.useRef(null),c=b.useRef(e.sourcePosition),u=b.useRef(e.targetPosition),f=b.useRef(t),m=n&&!!e.internals.handleBounds;return b.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]),b.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),b.useEffect(()=>{if(i.current){const h=f.current!==t,p=c.current!==e.sourcePosition,y=u.current!==e.targetPosition;(h||p||y)&&(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 EAe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:a,onContextMenu:i,onDoubleClick:s,nodesDraggable:c,elementsSelectable:u,nodesConnectable:f,nodesFocusable:m,resizeObserver:h,noDragClassName:p,noPanClassName:y,disableKeyboardA11y:w,rfId:x,nodeTypes:S,nodeClickDistance:E,onError:C}){const{node:j,internals:A,isParent:T}=it(re=>{const J=re.nodeLookup.get(e),ce=re.parentLookup.has(e);return{node:J,internals:J.internals,isParent:ce}},zt);let N=j.type||"default",P=(S==null?void 0:S[N])||M3[N];P===void 0&&(C==null||C("003",Mi.error003(N)),N="default",P=(S==null?void 0:S.default)||M3.default);const k=!!(j.draggable||c&&typeof j.draggable>"u"),D=!!(j.selectable||u&&typeof j.selectable>"u"),K=!!(j.connectable||f&&typeof j.connectable>"u"),B=!!(j.focusable||m&&typeof j.focusable>"u"),L=$t(),W=Nq(j),$=SAe({node:j,nodeType:N,hasDimensions:W,resizeObserver:h}),Y=r9({nodeRef:$,disabled:j.hidden||!k,noDragClassName:p,handleSelector:j.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:E}),R=a9();if(j.hidden)return null;const H=Ho(j),q=hAe(j),F=D||k||t||n||r||a,V=n?re=>n(re,{...A.userNode}):void 0,I=r?re=>r(re,{...A.userNode}):void 0,z=a?re=>a(re,{...A.userNode}):void 0,X=i?re=>i(re,{...A.userNode}):void 0,Z=s?re=>s(re,{...A.userNode}):void 0,ee=re=>{const{selectNodesOnDrag:J,nodeDragThreshold:ce}=L.getState();D&&(!J||!k||ce>0)&&Z_({id:e,store:L,nodeRef:$}),t&&t(re,{...A.userNode})},se=re=>{if(!(Mq(re.nativeEvent)||w)){if(xq.includes(re.key)&&D){const J=re.key==="Escape";Z_({id:e,store:L,unselect:J,nodeRef:$})}else if(k&&j.selected&&Object.prototype.hasOwnProperty.call(Uy,re.key)){re.preventDefault();const{ariaLabelConfig:J}=L.getState();L.setState({ariaLiveMessage:J["node.a11yDescription.ariaLiveMessage"]({direction:re.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),R({direction:Uy[re.key],factor:re.shiftKey?4:1})}}},ie=()=>{var xe;if(w||!((xe=$.current)!=null&&xe.matches(":focus-visible")))return;const{transform:re,width:J,height:ce,autoPanOnNodeFocus:me,setCenter:ne}=L.getState();if(!me)return;kA(new Map([[e,j]]),{x:0,y:0,width:J,height:ce},re,!0).length>0||ne(j.position.x+H.width/2,j.position.y+H.height/2,{zoom:re[2]})};return g.jsx("div",{className:hn(["react-flow__node",`react-flow__node-${N}`,{[y]:k},j.className,{selected:j.selected,selectable:D,parent:T,draggable:k,dragging:Y}]),ref:$,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:F?"all":"none",visibility:W?"visible":"hidden",...j.style,...q},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:I,onMouseLeave:z,onContextMenu:X,onClick:ee,onDoubleClick:Z,onKeyDown:B?se:void 0,tabIndex:B?0:void 0,onFocus:B?ie:void 0,role:j.ariaRole??(B?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${Qq}-${x}`,"aria-label":j.ariaLabel,...j.domAttributes,children:g.jsx(iAe,{value:e,children:g.jsx(P,{id:e,data:j.data,type:N,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:j.selected??!1,selectable:D,draggable:k,deletable:j.deletable??!0,isConnectable:K,sourcePosition:j.sourcePosition,targetPosition:j.targetPosition,dragging:Y,dragHandle:j.dragHandle,zIndex:A.z,parentId:j.parentId,...H})})})}var _Ae=b.memo(EAe);const OAe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function s9(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,onError:i}=it(OAe,zt),s=bAe(e.onlyRenderVisibleElements),c=wAe();return g.jsx("div",{className:"react-flow__nodes",style:xb,children:s.map(u=>g.jsx(_Ae,{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))})}s9.displayName="NodeRenderer";const jAe=b.memo(s9);function CAe(e){return it(b.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&&Nje({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(a.id)}return r},[e]),zt)}const AAe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return g.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},NAe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return g.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},k3={[Rf.Arrow]:AAe,[Rf.ArrowClosed]:NAe};function TAe(e){const t=$t();return b.useMemo(()=>{var a,i;return Object.prototype.hasOwnProperty.call(k3,e)?k3[e]:((i=(a=t.getState()).onError)==null||i.call(a,"009",Mi.error009(e)),null)},[e])}const PAe=({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=TAe(t);return u?g.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:g.jsx(u,{color:n,strokeWidth:s})}):null},l9=({defaultColor:e,rfId:t})=>{const n=it(i=>i.edges),r=it(i=>i.defaultEdgeOptions),a=b.useMemo(()=>Lje(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?g.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:g.jsx("defs",{children:a.map(i=>g.jsx(PAe,{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};l9.displayName="MarkerDefinitions";var MAe=b.memo(l9);function c9({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[h,p]=b.useState({x:1,y:0,width:0,height:0}),y=hn(["react-flow__edge-textwrapper",f]),w=b.useRef(null);return b.useEffect(()=>{if(w.current){const x=w.current.getBBox();p({x:x.x,y:x.y,width:x.width,height:x.height})}},[n]),n?g.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:y,visibility:h.width?"visible":"hidden",...m,children:[a&&g.jsx("rect",{width:h.width+2*s[0],x:-s[0],y:-s[1],height:h.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:c,ry:c}),g.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:w,style:r,children:n}),u]}):null}c9.displayName="EdgeText";const RAe=b.memo(c9);function wb({path:e,labelX:t,labelY:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:s,labelBgPadding:c,labelBgBorderRadius:u,interactionWidth:f=20,...m}){return g.jsxs(g.Fragment,{children:[g.jsx("path",{...m,d:e,fill:"none",className:hn(["react-flow__edge-path",m.className])}),f?g.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}):null,r&&Fa(t)&&Fa(n)?g.jsx(RAe,{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===Re.Left||e===Re.Right?[.5*(t+r),n]:[t,.5*(n+a)]}function u9({sourceX:e,sourceY:t,sourcePosition:n=Re.Bottom,targetX:r,targetY:a,targetPosition:i=Re.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,h,p,y]=kq({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,h,p,y]}function f9(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s,targetPosition:c,label:u,labelStyle:f,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:y,style:w,markerEnd:x,markerStart:S,interactionWidth:E})=>{const[C,j,A]=u9({sourceX:n,sourceY:r,sourcePosition:s,targetX:a,targetY:i,targetPosition:c}),T=e.isInternal?void 0:t;return g.jsx(wb,{id:T,path:C,labelX:j,labelY:A,label:u,labelStyle:f,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:y,style:w,markerEnd:x,markerStart:S,interactionWidth:E})})}const kAe=f9({isInternal:!1}),d9=f9({isInternal:!0});kAe.displayName="SimpleBezierEdge";d9.displayName="SimpleBezierEdgeInternal";function h9(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:c,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:h,style:p,sourcePosition:y=Re.Bottom,targetPosition:w=Re.Top,markerEnd:x,markerStart:S,pathOptions:E,interactionWidth:C})=>{const[j,A,T]=X_({sourceX:n,sourceY:r,sourcePosition:y,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 g.jsx(wb,{id:N,path:j,labelX:A,labelY:T,label:s,labelStyle:c,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:h,style:p,markerEnd:x,markerStart:S,interactionWidth:C})})}const m9=h9({isInternal:!1}),p9=h9({isInternal:!0});m9.displayName="SmoothStepEdge";p9.displayName="SmoothStepEdgeInternal";function v9(e){return b.memo(({id:t,...n})=>{var a;const r=e.isInternal?void 0:t;return g.jsx(m9,{...n,id:r,pathOptions:b.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(a=n.pathOptions)==null?void 0:a.offset])})})}const DAe=v9({isInternal:!1}),g9=v9({isInternal:!0});DAe.displayName="StepEdge";g9.displayName="StepEdgeInternal";function y9(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:s,labelStyle:c,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:h,style:p,markerEnd:y,markerStart:w,interactionWidth:x})=>{const[S,E,C]=Lq({sourceX:n,sourceY:r,targetX:a,targetY:i}),j=e.isInternal?void 0:t;return g.jsx(wb,{id:j,path:S,labelX:E,labelY:C,label:s,labelStyle:c,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:h,style:p,markerEnd:y,markerStart:w,interactionWidth:x})})}const IAe=y9({isInternal:!1}),b9=y9({isInternal:!0});IAe.displayName="StraightEdge";b9.displayName="StraightEdgeInternal";function x9(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:s=Re.Bottom,targetPosition:c=Re.Top,label:u,labelStyle:f,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:y,style:w,markerEnd:x,markerStart:S,pathOptions:E,interactionWidth:C})=>{const[j,A,T]=Dq({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 g.jsx(wb,{id:N,path:j,labelX:A,labelY:T,label:u,labelStyle:f,labelShowBg:m,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:y,style:w,markerEnd:x,markerStart:S,interactionWidth:C})})}const LAe=x9({isInternal:!1}),w9=x9({isInternal:!0});LAe.displayName="BezierEdge";w9.displayName="BezierEdgeInternal";const I3={default:w9,straight:b9,step:g9,smoothstep:p9,simplebezier:d9},L3={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},zAe=(e,t,n)=>n===Re.Left?e-t:n===Re.Right?e+t:e,$Ae=(e,t,n)=>n===Re.Top?e-t:n===Re.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 g.jsx("circle",{onMouseDown:a,onMouseEnter:i,onMouseOut:s,className:hn([z3,`${z3}-${c}`]),cx:zAe(t,r,e),cy:$Ae(n,r,e),r,stroke:"transparent",fill:"transparent"})}function BAe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:a,targetX:i,targetY:s,sourcePosition:c,targetPosition:u,onReconnect:f,onReconnectStart:m,onReconnectEnd:h,setReconnecting:p,setUpdateHover:y}){const w=$t(),x=(A,T)=>{if(A.button!==0)return;const{autoPanOnConnect:N,domNode:P,connectionMode:k,connectionRadius:D,lib:K,onConnectStart:B,cancelConnection:L,nodeLookup:W,rfId:$,panBy:Y,updateConnection:R}=w.getState(),H=T.type==="target",q=(I,z)=>{p(!1),h==null||h(I,n,T.type,z)},F=I=>f==null?void 0:f(n,I),V=(I,z)=>{p(!0),m==null||m(A,n,T.type),B==null||B(I,z)};Q_.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:$,cancelConnection:L,panBy:Y,isValidConnection:(...I)=>{var z,X;return((X=(z=w.getState()).isValidConnection)==null?void 0:X.call(z,...I))??!0},onConnect:F,onConnectStart:V,onConnectEnd:(...I)=>{var z,X;return(X=(z=w.getState()).onConnectEnd)==null?void 0:X.call(z,...I)},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=()=>y(!0),j=()=>y(!1);return g.jsxs(g.Fragment,{children:[(e===!0||e==="source")&&g.jsx($3,{position:c,centerX:r,centerY:a,radius:t,onMouseDown:S,onMouseEnter:C,onMouseOut:j,type:"source"}),(e===!0||e==="target")&&g.jsx($3,{position:u,centerX:i,centerY:s,radius:t,onMouseDown:E,onMouseEnter:C,onMouseOut:j,type:"target"})]})}function UAe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:a,onDoubleClick:i,onContextMenu:s,onMouseEnter:c,onMouseMove:u,onMouseLeave:f,reconnectRadius:m,onReconnect:h,onReconnectStart:p,onReconnectEnd:y,rfId:w,edgeTypes:x,noPanClassName:S,onError:E,disableKeyboardA11y:C}){let j=it(ne=>ne.edgeLookup.get(e));const A=it(ne=>ne.defaultEdgeOptions);j=A?{...A,...j}:j;let T=j.type||"default",N=(x==null?void 0:x[T])||I3[T];N===void 0&&(E==null||E("011",Mi.error011(T)),T="default",N=(x==null?void 0:x.default)||I3.default);const P=!!(j.focusable||t&&typeof j.focusable>"u"),k=typeof h<"u"&&(j.reconnectable||n&&typeof j.reconnectable>"u"),D=!!(j.selectable||r&&typeof j.selectable>"u"),K=b.useRef(null),[B,L]=b.useState(!1),[W,$]=b.useState(!1),Y=$t(),{zIndex:R,sourceX:H,sourceY:q,targetX:F,targetY:V,sourcePosition:I,targetPosition:z}=it(b.useCallback(ne=>{const ye=ne.nodeLookup.get(j.source),xe=ne.nodeLookup.get(j.target);if(!ye||!xe)return{zIndex:j.zIndex,...L3};const Ie=Ije({id:e,sourceNode:ye,targetNode:xe,sourceHandle:j.sourceHandle||null,targetHandle:j.targetHandle||null,connectionMode:ne.connectionMode,onError:E});return{zIndex:Aje({selected:j.selected,zIndex:j.zIndex,sourceNode:ye,targetNode:xe,elevateOnSelect:ne.elevateEdgesOnSelect,zIndexMode:ne.zIndexMode}),...Ie||L3}},[j.source,j.target,j.sourceHandle,j.targetHandle,j.selected,j.zIndex]),zt),X=b.useMemo(()=>j.markerStart?`url('#${G_(j.markerStart,w)}')`:void 0,[j.markerStart,w]),Z=b.useMemo(()=>j.markerEnd?`url('#${G_(j.markerEnd,w)}')`:void 0,[j.markerEnd,w]);if(j.hidden||H===null||q===null||F===null||V===null)return null;const ee=ne=>{var Pe;const{addSelectedEdges:ye,unselectNodesAndEdges:xe,multiSelectionActive:Ie}=Y.getState();D&&(Y.setState({nodesSelectionActive:!1}),j.selected&&Ie?(xe({nodes:[],edges:[j]}),(Pe=K.current)==null||Pe.blur()):ye([e])),a&&a(ne,j)},se=i?ne=>{i(ne,{...j})}:void 0,ie=s?ne=>{s(ne,{...j})}:void 0,re=c?ne=>{c(ne,{...j})}:void 0,J=u?ne=>{u(ne,{...j})}:void 0,ce=f?ne=>{f(ne,{...j})}:void 0,me=ne=>{var ye;if(!C&&xq.includes(ne.key)&&D){const{unselectNodesAndEdges:xe,addSelectedEdges:Ie}=Y.getState();ne.key==="Escape"?((ye=K.current)==null||ye.blur(),xe({edges:[j]})):Ie([e])}};return g.jsx("svg",{style:{zIndex:R},children:g.jsxs("g",{className:hn(["react-flow__edge",`react-flow__edge-${T}`,j.className,S,{selected:j.selected,animated:j.animated,inactive:!D&&!a,updating:B,selectable:D}]),onClick:ee,onDoubleClick:se,onContextMenu:ie,onMouseEnter:re,onMouseMove:J,onMouseLeave:ce,onKeyDown:P?me:void 0,tabIndex:P?0:void 0,role:j.ariaRole??(P?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":j.ariaLabel===null?void 0:j.ariaLabel||`Edge from ${j.source} to ${j.target}`,"aria-describedby":P?`${Zq}-${w}`:void 0,ref:K,...j.domAttributes,children:[!W&&g.jsx(N,{id:e,source:j.source,target:j.target,type:j.type,selected:j.selected,animated:j.animated,selectable:D,deletable:j.deletable??!0,label:j.label,labelStyle:j.labelStyle,labelShowBg:j.labelShowBg,labelBgStyle:j.labelBgStyle,labelBgPadding:j.labelBgPadding,labelBgBorderRadius:j.labelBgBorderRadius,sourceX:H,sourceY:q,targetX:F,targetY:V,sourcePosition:I,targetPosition:z,data:j.data,style:j.style,sourceHandleId:j.sourceHandle,targetHandleId:j.targetHandle,markerStart:X,markerEnd:Z,pathOptions:"pathOptions"in j?j.pathOptions:void 0,interactionWidth:j.interactionWidth}),k&&g.jsx(BAe,{edge:j,isReconnectable:k,reconnectRadius:m,onReconnect:h,onReconnectStart:p,onReconnectEnd:y,sourceX:H,sourceY:q,targetX:F,targetY:V,sourcePosition:I,targetPosition:z,setUpdateHover:L,setReconnecting:$})]})})}var HAe=b.memo(UAe);const FAe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function S9({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:a,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:c,onEdgeMouseMove:u,onEdgeMouseLeave:f,onEdgeClick:m,reconnectRadius:h,onEdgeDoubleClick:p,onReconnectStart:y,onReconnectEnd:w,disableKeyboardA11y:x}){const{edgesFocusable:S,edgesReconnectable:E,elementsSelectable:C,onError:j}=it(FAe,zt),A=CAe(t);return g.jsxs("div",{className:"react-flow__edges",children:[g.jsx(MAe,{defaultColor:e,rfId:n}),A.map(T=>g.jsx(HAe,{id:T,edgesFocusable:S,edgesReconnectable:E,elementsSelectable:C,noPanClassName:a,onReconnect:i,onContextMenu:s,onMouseEnter:c,onMouseMove:u,onMouseLeave:f,onClick:m,reconnectRadius:h,onDoubleClick:p,onReconnectStart:y,onReconnectEnd:w,rfId:n,onError:j,edgeTypes:r,disableKeyboardA11y:x},T))]})}S9.displayName="EdgeRenderer";const qAe=b.memo(S9),KAe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function VAe({children:e}){const t=it(KAe);return g.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function YAe(e){const t=bb(),n=b.useRef(!1);b.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const XAe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function GAe(e){const t=it(XAe),n=$t();return b.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function WAe(e){return e.connection.inProgress?{...e.connection,to:tp(e.connection.to,e.transform)}:{...e.connection}}function QAe(e){return WAe}function ZAe(e){const t=QAe();return it(t,zt)}const JAe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function eNe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:a,width:i,height:s,isValid:c,inProgress:u}=it(JAe,zt);return!(i&&a&&u)?null:g.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:g.jsx("g",{className:hn(["react-flow__connection",Eq(c)]),children:g.jsx(E9,{style:t,type:n,CustomComponent:r,isValid:c})})})}const E9=({style:e,type:t=Rs.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:a,from:i,fromNode:s,fromHandle:c,fromPosition:u,to:f,toNode:m,toHandle:h,toPosition:p,pointer:y}=ZAe();if(!a)return;if(n)return g.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:Eq(r),toNode:m,toHandle:h,pointer:y});let w="";const x={sourceX:i.x,sourceY:i.y,sourcePosition:u,targetX:f.x,targetY:f.y,targetPosition:p};switch(t){case Rs.Bezier:[w]=Dq(x);break;case Rs.SimpleBezier:[w]=u9(x);break;case Rs.Step:[w]=X_({...x,borderRadius:0});break;case Rs.SmoothStep:[w]=X_(x);break;default:[w]=Lq(x)}return g.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};E9.displayName="ConnectionLine";const tNe={};function B3(e=tNe){b.useRef(e),$t(),b.useEffect(()=>{},[e])}function nNe(){$t(),b.useRef(!1),b.useEffect(()=>{},[])}function _9({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:a,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:f,onNodeContextMenu:m,onSelectionContextMenu:h,onSelectionStart:p,onSelectionEnd:y,connectionLineType:w,connectionLineStyle:x,connectionLineComponent:S,connectionLineContainerStyle:E,selectionKeyCode:C,selectionOnDrag:j,selectionMode:A,multiSelectionKeyCode:T,panActivationKeyCode:N,zoomActivationKeyCode:P,deleteKeyCode:k,onlyRenderVisibleElements:D,elementsSelectable:K,defaultViewport:B,translateExtent:L,minZoom:W,maxZoom:$,preventScrolling:Y,defaultMarkerColor:R,zoomOnScroll:H,zoomOnPinch:q,panOnScroll:F,panOnScrollSpeed:V,panOnScrollMode:I,zoomOnDoubleClick:z,panOnDrag:X,onPaneClick:Z,onPaneMouseEnter:ee,onPaneMouseMove:se,onPaneMouseLeave:ie,onPaneScroll:re,onPaneContextMenu:J,paneClickDistance:ce,nodeClickDistance:me,onEdgeContextMenu:ne,onEdgeMouseEnter:ye,onEdgeMouseMove:xe,onEdgeMouseLeave:Ie,reconnectRadius:Pe,onReconnect:Ve,onReconnectStart:mn,onReconnectEnd:pt,noDragClassName:Mr,noWheelClassName:Ca,noPanClassName:Qt,disableKeyboardA11y:pr,nodeExtent:pn,rfId:Fo,viewport:vr,onViewportChange:ni}){return B3(e),B3(t),nNe(),YAe(n),GAe(vr),g.jsx(gAe,{onPaneClick:Z,onPaneMouseEnter:ee,onPaneMouseMove:se,onPaneMouseLeave:ie,onPaneContextMenu:J,onPaneScroll:re,paneClickDistance:ce,deleteKeyCode:k,selectionKeyCode:C,selectionOnDrag:j,selectionMode:A,onSelectionStart:p,onSelectionEnd:y,multiSelectionKeyCode:T,panActivationKeyCode:N,zoomActivationKeyCode:P,elementsSelectable:K,zoomOnScroll:H,zoomOnPinch:q,zoomOnDoubleClick:z,panOnScroll:F,panOnScrollSpeed:V,panOnScrollMode:I,panOnDrag:X,defaultViewport:B,translateExtent:L,minZoom:W,maxZoom:$,onSelectionContextMenu:h,preventScrolling:Y,noDragClassName:Mr,noWheelClassName:Ca,noPanClassName:Qt,disableKeyboardA11y:pr,onViewportChange:ni,isControlledViewport:!!vr,children:g.jsxs(VAe,{children:[g.jsx(qAe,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:s,onReconnect:Ve,onReconnectStart:mn,onReconnectEnd:pt,onlyRenderVisibleElements:D,onEdgeContextMenu:ne,onEdgeMouseEnter:ye,onEdgeMouseMove:xe,onEdgeMouseLeave:Ie,reconnectRadius:Pe,defaultMarkerColor:R,noPanClassName:Qt,disableKeyboardA11y:pr,rfId:Fo}),g.jsx(eNe,{style:x,type:w,component:S,containerStyle:E}),g.jsx("div",{className:"react-flow__edgelabel-renderer"}),g.jsx(jAe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:c,onNodeMouseMove:u,onNodeMouseLeave:f,onNodeContextMenu:m,nodeClickDistance:me,onlyRenderVisibleElements:D,noPanClassName:Qt,noDragClassName:Mr,disableKeyboardA11y:pr,nodeExtent:pn,rfId:Fo}),g.jsx("div",{className:"react-flow__viewport-portal"})]})})}_9.displayName="GraphView";const rNe=b.memo(_9),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:h,zIndexMode:p="basic"}={})=>{const y=new Map,w=new Map,x=new Map,S=new Map,E=r??t??[],C=n??e??[],j=m??[0,0],A=h??tm;Bq(x,S,E);const T=W_(C,y,w,{nodeOrigin:j,nodeExtent:A,zIndexMode:p});let N=[0,0,1];if(s&&a&&i){const P=Jm(y,{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:y,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:tm,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Mf.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:j,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:{...Sq},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Sje,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:wq,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},aNe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:u,maxZoom:f,nodeOrigin:m,nodeExtent:h,zIndexMode:p})=>xCe((y,w)=>{async function x(){const{nodeLookup:S,panZoom:E,fitViewOptions:C,fitViewResolver:j,width:A,height:T,minZoom:N,maxZoom:P}=w();E&&(await xje({nodes:S,width:A,height:T,panZoom:E,minZoom:N,maxZoom:P},C),j==null||j.resolve(!0),y({fitViewResolver:null}))}return{...U3({nodes:e,edges:t,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:u,maxZoom:f,nodeOrigin:m,nodeExtent:h,defaultNodes:n,defaultEdges:r,zIndexMode:p}),setNodes:S=>{const{nodeLookup:E,parentLookup:C,nodeOrigin:j,elevateNodesOnSelect:A,fitViewQueued:T,zIndexMode:N}=w(),P=W_(S,E,C,{nodeOrigin:j,nodeExtent:h,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:N});T&&P?(x(),y({nodes:S,nodesInitialized:P,fitViewQueued:!1,fitViewOptions:void 0})):y({nodes:S,nodesInitialized:P})},setEdges:S=>{const{connectionLookup:E,edgeLookup:C}=w();Bq(E,C,S),y({edges:S})},setDefaultNodesAndEdges:(S,E)=>{if(S){const{setNodes:C}=w();C(S),y({hasDefaultNodes:!0})}if(E){const{setEdges:C}=w();C(E),y({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:E,nodeLookup:C,parentLookup:j,domNode:A,nodeOrigin:T,nodeExtent:N,debug:P,fitViewQueued:k,zIndexMode:D}=w(),{changes:K,updatedInternals:B}=qje(S,C,j,A,T,N,D);B&&(Bje(C,j,{nodeOrigin:T,nodeExtent:N,zIndexMode:D}),k?(x(),y({fitViewQueued:!1,fitViewOptions:void 0})):y({}),(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 j=[];const{nodeLookup:A,triggerNodeChanges:T,connection:N,updateConnection:P,onNodesChangeMiddlewareMap:k}=w();for(const[D,K]of S){const B=A.get(D),L=!!(B!=null&&B.expandParent&&(B!=null&&B.parentId)&&(K!=null&&K.position)),W={id:D,type:"position",position:L?{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 $=Rc(B,N.fromHandle,Re.Left,!0);P({...N,from:$})}L&&B.parentId&&C.push({id:D,parentId:B.parentId,rect:{...K.internals.positionAbsolute,width:K.measured.width??0,height:K.measured.height??0}}),j.push(W)}if(C.length>0){const{parentLookup:D,nodeOrigin:K}=w(),B=UA(C,A,D,K);j.push(...B)}for(const D of k.values())j=D(j);T(j)},triggerNodeChanges:S=>{const{onNodesChange:E,setNodes:C,nodes:j,hasDefaultNodes:A,debug:T}=w();if(S!=null&&S.length){if(A){const N=UCe(S,j);C(N)}T&&console.log("React Flow: trigger node changes",S),E==null||E(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:E,setEdges:C,edges:j,hasDefaultEdges:A,debug:T}=w();if(S!=null&&S.length){if(A){const N=HCe(S,j);C(N)}T&&console.log("React Flow: trigger edge changes",S),E==null||E(S)}},addSelectedNodes:S=>{const{multiSelectionActive:E,edgeLookup:C,nodeLookup:j,triggerNodeChanges:A,triggerEdgeChanges:T}=w();if(E){const N=S.map(P=>Xl(P,!0));A(N);return}A(Qu(j,new Set([...S]),!0)),T(Qu(C))},addSelectedEdges:S=>{const{multiSelectionActive:E,edgeLookup:C,nodeLookup:j,triggerNodeChanges:A,triggerEdgeChanges:T}=w();if(E){const N=S.map(P=>Xl(P,!0));T(N);return}T(Qu(C,new Set([...S]))),A(Qu(j,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:E}={})=>{const{edges:C,nodes:j,nodeLookup:A,triggerNodeChanges:T,triggerEdgeChanges:N}=w(),P=S||j,k=E||C,D=[];for(const B of P){if(!B.selected)continue;const L=A.get(B.id);L&&(L.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]),y({minZoom:S})},setMaxZoom:S=>{const{panZoom:E,minZoom:C}=w();E==null||E.setScaleExtent([C,S]),y({maxZoom:S})},setTranslateExtent:S=>{var E;(E=w().panZoom)==null||E.setTranslateExtent(S),y({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:E,triggerNodeChanges:C,triggerEdgeChanges:j,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),j(N)},setNodeExtent:S=>{const{nodes:E,nodeLookup:C,parentLookup:j,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]||(W_(E,C,j,{nodeOrigin:A,nodeExtent:S,elevateNodesOnSelect:T,checkEquality:!1,zIndexMode:P}),y({nodeExtent:S}))},panBy:S=>{const{transform:E,width:C,height:j,panZoom:A,translateExtent:T}=w();return Kje({delta:S,panZoom:A,transform:E,translateExtent:T,width:C,height:j})},setCenter:async(S,E,C)=>{const{width:j,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:j/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:()=>{y({connection:{...Sq}})},updateConnection:S=>{y({connection:S})},reset:()=>y({...U3()})}},Object.is);function O9({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:a,initialHeight:i,initialMinZoom:s,initialMaxZoom:c,initialFitViewOptions:u,fitView:f,nodeOrigin:m,nodeExtent:h,zIndexMode:p,children:y}){const[w]=b.useState(()=>aNe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:f,minZoom:s,maxZoom:c,fitViewOptions:u,nodeOrigin:m,nodeExtent:h,zIndexMode:p}));return g.jsx(wCe,{value:w,children:g.jsx(VCe,{children:y})})}function iNe({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:a,width:i,height:s,fitView:c,fitViewOptions:u,minZoom:f,maxZoom:m,nodeOrigin:h,nodeExtent:p,zIndexMode:y}){return b.useContext(gb)?g.jsx(g.Fragment,{children:e}):g.jsx(O9,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:a,initialWidth:i,initialHeight:s,fitView:c,initialFitViewOptions:u,initialMinZoom:f,initialMaxZoom:m,nodeOrigin:h,nodeExtent:p,zIndexMode:y,children:e})}const oNe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function sNe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:a,nodeTypes:i,edgeTypes:s,onNodeClick:c,onEdgeClick:u,onInit:f,onMove:m,onMoveStart:h,onMoveEnd:p,onConnect:y,onConnectStart:w,onConnectEnd:x,onClickConnectStart:S,onClickConnectEnd:E,onNodeMouseEnter:C,onNodeMouseMove:j,onNodeMouseLeave:A,onNodeContextMenu:T,onNodeDoubleClick:N,onNodeDragStart:P,onNodeDrag:k,onNodeDragStop:D,onNodesDelete:K,onEdgesDelete:B,onDelete:L,onSelectionChange:W,onSelectionDragStart:$,onSelectionDrag:Y,onSelectionDragStop:R,onSelectionContextMenu:H,onSelectionStart:q,onSelectionEnd:F,onBeforeDelete:V,connectionMode:I,connectionLineType:z=Rs.Bezier,connectionLineStyle:X,connectionLineComponent:Z,connectionLineContainerStyle:ee,deleteKeyCode:se="Backspace",selectionKeyCode:ie="Shift",selectionOnDrag:re=!1,selectionMode:J=nm.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:me=am()?"Meta":"Control",zoomActivationKeyCode:ne=am()?"Meta":"Control",snapToGrid:ye,snapGrid:xe,onlyRenderVisibleElements:Ie=!1,selectNodesOnDrag:Pe,nodesDraggable:Ve,autoPanOnNodeFocus:mn,nodesConnectable:pt,nodesFocusable:Mr,nodeOrigin:Ca=Jq,edgesFocusable:Qt,edgesReconnectable:pr,elementsSelectable:pn=!0,defaultViewport:Fo=kCe,minZoom:vr=.5,maxZoom:ni=2,translateExtent:ri=tm,preventScrolling:gl=!0,nodeExtent:Rr,defaultMarkerColor:Wc="#b1b1b7",zoomOnScroll:ai=!0,zoomOnPinch:Li=!0,panOnScroll:Bn=!1,panOnScrollSpeed:kr=.5,panOnScrollMode:Nn=dc.Free,zoomOnDoubleClick:id=!0,panOnDrag:yl=!0,onPaneClick:ta,onPaneMouseEnter:qo,onPaneMouseMove:Ko,onPaneMouseLeave:zi,onPaneScroll:na,onPaneContextMenu:$e,paneClickDistance:_t=1,nodeClickDistance:tn=0,children:Tn,onReconnect:ii,onReconnectStart:Ct,onReconnectEnd:Gn,onEdgeContextMenu:$i,onEdgeDoubleClick:Wn,onEdgeMouseEnter:Qn,onEdgeMouseMove:Vo,onEdgeMouseLeave:Dr,reconnectRadius:od=10,onNodesChange:np,onEdgesChange:oi,noDragClassName:vn="nodrag",noWheelClassName:Zn="nowheel",noPanClassName:Bi="nopan",fitView:Qc,fitViewOptions:rp,connectOnClick:Sb,attributionPosition:ap,proOptions:bl,defaultEdgeOptions:sd,elevateNodesOnSelect:Yo=!0,elevateEdgesOnSelect:Xo=!1,disableKeyboardA11y:Go=!1,autoPanOnConnect:Wo,autoPanOnNodeDrag:nn,autoPanSpeed:ip,connectionRadius:op,isValidConnection:Ui,onError:Qo,style:Eb,id:ld,nodeDragThreshold:sp,connectionDragThreshold:_b,viewport:Zc,onViewportChange:Jc,width:Aa,height:gr,colorMode:lp="light",debug:Ob,onScroll:Zo,ariaLabelConfig:cp,zIndexMode:xl="basic",...jb},yr){const wl=ld||"1",up=zCe(lp),cd=b.useCallback(Hi=>{Hi.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Zo==null||Zo(Hi)},[Zo]);return g.jsx("div",{"data-testid":"rf__wrapper",...jb,onScroll:cd,style:{...Eb,...oNe},ref:yr,className:hn(["react-flow",a,up]),id:ld,role:"application",children:g.jsxs(iNe,{nodes:e,edges:t,width:Aa,height:gr,fitView:Qc,fitViewOptions:rp,minZoom:vr,maxZoom:ni,nodeOrigin:Ca,nodeExtent:Rr,zIndexMode:xl,children:[g.jsx(rNe,{onInit:f,onNodeClick:c,onEdgeClick:u,onNodeMouseEnter:C,onNodeMouseMove:j,onNodeMouseLeave:A,onNodeContextMenu:T,onNodeDoubleClick:N,nodeTypes:i,edgeTypes:s,connectionLineType:z,connectionLineStyle:X,connectionLineComponent:Z,connectionLineContainerStyle:ee,selectionKeyCode:ie,selectionOnDrag:re,selectionMode:J,deleteKeyCode:se,multiSelectionKeyCode:me,panActivationKeyCode:ce,zoomActivationKeyCode:ne,onlyRenderVisibleElements:Ie,defaultViewport:Fo,translateExtent:ri,minZoom:vr,maxZoom:ni,preventScrolling:gl,zoomOnScroll:ai,zoomOnPinch:Li,zoomOnDoubleClick:id,panOnScroll:Bn,panOnScrollSpeed:kr,panOnScrollMode:Nn,panOnDrag:yl,onPaneClick:ta,onPaneMouseEnter:qo,onPaneMouseMove:Ko,onPaneMouseLeave:zi,onPaneScroll:na,onPaneContextMenu:$e,paneClickDistance:_t,nodeClickDistance:tn,onSelectionContextMenu:H,onSelectionStart:q,onSelectionEnd:F,onReconnect:ii,onReconnectStart:Ct,onReconnectEnd:Gn,onEdgeContextMenu:$i,onEdgeDoubleClick:Wn,onEdgeMouseEnter:Qn,onEdgeMouseMove:Vo,onEdgeMouseLeave:Dr,reconnectRadius:od,defaultMarkerColor:Wc,noDragClassName:vn,noWheelClassName:Zn,noPanClassName:Bi,rfId:wl,disableKeyboardA11y:Go,nodeExtent:Rr,viewport:Zc,onViewportChange:Jc}),g.jsx(LCe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:y,onConnectStart:w,onConnectEnd:x,onClickConnectStart:S,onClickConnectEnd:E,nodesDraggable:Ve,autoPanOnNodeFocus:mn,nodesConnectable:pt,nodesFocusable:Mr,edgesFocusable:Qt,edgesReconnectable:pr,elementsSelectable:pn,elevateNodesOnSelect:Yo,elevateEdgesOnSelect:Xo,minZoom:vr,maxZoom:ni,nodeExtent:Rr,onNodesChange:np,onEdgesChange:oi,snapToGrid:ye,snapGrid:xe,connectionMode:I,translateExtent:ri,connectOnClick:Sb,defaultEdgeOptions:sd,fitView:Qc,fitViewOptions:rp,onNodesDelete:K,onEdgesDelete:B,onDelete:L,onNodeDragStart:P,onNodeDrag:k,onNodeDragStop:D,onSelectionDrag:Y,onSelectionDragStart:$,onSelectionDragStop:R,onMove:m,onMoveStart:h,onMoveEnd:p,noPanClassName:Bi,nodeOrigin:Ca,rfId:wl,autoPanOnConnect:Wo,autoPanOnNodeDrag:nn,autoPanSpeed:ip,onError:Qo,connectionRadius:op,isValidConnection:Ui,selectNodesOnDrag:Pe,nodeDragThreshold:sp,connectionDragThreshold:_b,onBeforeDelete:V,debug:Ob,ariaLabelConfig:cp,zIndexMode:xl}),g.jsx(RCe,{onSelectionChange:W}),Tn,g.jsx(ACe,{proOptions:bl,position:ap}),g.jsx(CCe,{rfId:wl,disableKeyboardA11y:Go})]})})}var lNe=t9(sNe);function cNe({dimensions:e,lineWidth:t,variant:n,className:r}){return g.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:hn(["react-flow__background-pattern",n,r])})}function uNe({radius:e,className:t}){return g.jsx("circle",{cx:e,cy:e,r:e,className:hn(["react-flow__background-pattern","dots",t])})}var Xs;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Xs||(Xs={}));const fNe={[Xs.Dots]:1,[Xs.Lines]:1,[Xs.Cross]:6},dNe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function j9({id:e,variant:t=Xs.Dots,gap:n=20,size:r,lineWidth:a=1,offset:i=0,color:s,bgColor:c,style:u,className:f,patternClassName:m}){const h=b.useRef(null),{transform:p,patternId:y}=it(dNe,zt),w=r||fNe[t],x=t===Xs.Dots,S=t===Xs.Cross,E=Array.isArray(n)?n:[n,n],C=[E[0]*p[2]||1,E[1]*p[2]||1],j=w*p[2],A=Array.isArray(i)?i:[i,i],T=S?[j,j]:C,N=[A[0]*p[2]||1+T[0]/2,A[1]*p[2]||1+T[1]/2],P=`${y}${e||""}`;return g.jsxs("svg",{className:hn(["react-flow__background",f]),style:{...u,...xb,"--xy-background-color-props":c,"--xy-background-pattern-color-props":s},ref:h,"data-testid":"rf__background",children:[g.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?g.jsx(uNe,{radius:j/2,className:m}):g.jsx(cNe,{dimensions:T,lineWidth:a,variant:t,className:m})}),g.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}j9.displayName="Background";b.memo(j9);function hNe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:g.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function mNe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:g.jsx("path",{d:"M0 0h32v4.2H0z"})})}function pNe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:g.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function vNe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function gNe(){return g.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:g.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function tg({children:e,className:t,...n}){return g.jsx("button",{type:"button",className:hn(["react-flow__controls-button",t]),...n,children:e})}const yNe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function C9({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:h="bottom-left",orientation:p="vertical","aria-label":y}){const w=$t(),{isInteractive:x,minZoomReached:S,maxZoomReached:E,ariaLabelConfig:C}=it(yNe,zt),{zoomIn:j,zoomOut:A,fitView:T}=bb(),N=()=>{j(),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 g.jsxs(yb,{className:hn(["react-flow__controls",K,f]),position:h,style:e,"data-testid":"rf__controls","aria-label":y??C["controls.ariaLabel"],children:[t&&g.jsxs(g.Fragment,{children:[g.jsx(tg,{onClick:N,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:E,children:g.jsx(hNe,{})}),g.jsx(tg,{onClick:P,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:S,children:g.jsx(mNe,{})})]}),n&&g.jsx(tg,{className:"react-flow__controls-fitview",onClick:k,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:g.jsx(pNe,{})}),r&&g.jsx(tg,{className:"react-flow__controls-interactive",onClick:D,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:x?g.jsx(gNe,{}):g.jsx(vNe,{})}),m]})}C9.displayName="Controls";b.memo(C9);function bNe({id:e,x:t,y:n,width:r,height:a,style:i,color:s,strokeColor:c,strokeWidth:u,className:f,borderRadius:m,shapeRendering:h,selected:p,onClick:y}){const{background:w,backgroundColor:x}=i||{},S=s||w||x;return g.jsx("rect",{className:hn(["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:h,onClick:y?E=>y(E,e):void 0})}const xNe=b.memo(bNe),wNe=e=>e.nodes.map(t=>t.id),KS=e=>e instanceof Function?e:()=>e;function SNe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:a,nodeComponent:i=xNe,onClick:s}){const c=it(wNe,zt),u=KS(t),f=KS(e),m=KS(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return g.jsx(g.Fragment,{children:c.map(p=>g.jsx(_Ne,{id:p,nodeColorFunc:u,nodeStrokeColorFunc:f,nodeClassNameFunc:m,nodeBorderRadius:r,nodeStrokeWidth:a,NodeComponent:i,onClick:s,shapeRendering:h},p))})}function ENe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:a,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:c,onClick:u}){const{node:f,x:m,y:h,width:p,height:y}=it(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:j,height:A}=Ho(S);return{node:S,x:E,y:C,width:j,height:A}},zt);return!f||f.hidden||!Nq(f)?null:g.jsx(c,{x:m,y:h,width:p,height:y,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 _Ne=b.memo(ENe);var ONe=b.memo(SNe);const jNe=200,CNe=150,ANe=e=>!e.hidden,NNe=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?Aq(Jm(e.nodeLookup,{filter:ANe}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},TNe="react-flow__minimap-desc";function A9({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:a="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:c,bgColor:u,maskColor:f,maskStrokeColor:m,maskStrokeWidth:h,position:p="bottom-right",onClick:y,onNodeClick:w,pannable:x=!1,zoomable:S=!1,ariaLabel:E,inversePan:C,zoomStep:j=1,offsetScale:A=5}){const T=$t(),N=b.useRef(null),{boundingRect:P,viewBB:k,rfId:D,panZoom:K,translateExtent:B,flowWidth:L,flowHeight:W,ariaLabelConfig:$}=it(NNe,zt),Y=(e==null?void 0:e.width)??jNe,R=(e==null?void 0:e.height)??CNe,H=P.width/Y,q=P.height/R,F=Math.max(H,q),V=F*Y,I=F*R,z=A*F,X=P.x-(V-P.width)/2-z,Z=P.y-(I-P.height)/2-z,ee=V+z*2,se=I+z*2,ie=`${TNe}-${D}`,re=b.useRef(0),J=b.useRef();re.current=F,b.useEffect(()=>{if(N.current&&K)return J.current=eCe({domNode:N.current,panZoom:K,getTransform:()=>T.getState().transform,getViewScale:()=>re.current}),()=>{var ye;(ye=J.current)==null||ye.destroy()}},[K]),b.useEffect(()=>{var ye;(ye=J.current)==null||ye.update({translateExtent:B,width:L,height:W,inversePan:C,pannable:x,zoomStep:j,zoomable:S})},[x,S,C,j,B,L,W]);const ce=y?ye=>{var Pe;const[xe,Ie]=((Pe=J.current)==null?void 0:Pe.pointer(ye))||[0,0];y(ye,{x:xe,y:Ie})}:void 0,me=w?b.useCallback((ye,xe)=>{const Ie=T.getState().nodeLookup.get(xe).internals.userNode;w(ye,Ie)},[]):void 0,ne=E??$["minimap.ariaLabel"];return g.jsx(yb,{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 h=="number"?h*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:hn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:g.jsxs("svg",{width:Y,height:R,viewBox:`${X} ${Z} ${ee} ${se}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ie,ref:N,onClick:ce,children:[ne&&g.jsx("title",{id:ie,children:ne}),g.jsx(ONe,{onClick:me,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:a,nodeStrokeWidth:s,nodeComponent:c}),g.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-z},${Z-z}h${ee+z*2}v${se+z*2}h${-ee-z*2}z
        M${k.x},${k.y}h${k.width}v${k.height}h${-k.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}A9.displayName="MiniMap";b.memo(A9);const PNe=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,MNe={[Lf.Line]:"right",[Lf.Handle]:"bottom-right"};function RNe({nodeId:e,position:t,variant:n=Lf.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:h=!1,resizeDirection:p,autoScale:y=!0,shouldResize:w,onResizeStart:x,onResize:S,onResizeEnd:E}){const C=i9(),j=typeof e=="string"?e:C,A=$t(),T=b.useRef(null),N=n===Lf.Handle,P=it(b.useCallback(PNe(N&&y),[N,y]),zt),k=b.useRef(null),D=t??MNe[n];b.useEffect(()=>{if(!(!T.current||!j))return k.current||(k.current=mCe({domNode:T.current,nodeId:j,getStoreItems:()=>{const{nodeLookup:B,transform:L,snapGrid:W,snapToGrid:$,nodeOrigin:Y,domNode:R}=A.getState();return{nodeLookup:B,transform:L,snapGrid:W,snapToGrid:$,nodeOrigin:Y,paneDomNode:R}},onChange:(B,L)=>{const{triggerNodeChanges:W,nodeLookup:$,parentLookup:Y,nodeOrigin:R}=A.getState(),H=[],q={x:B.x,y:B.y},F=$.get(j);if(F&&F.expandParent&&F.parentId){const V=F.origin??R,I=B.width??F.measured.width??0,z=B.height??F.measured.height??0,X={id:F.id,parentId:F.parentId,rect:{width:I,height:z,...Tq({x:B.x??F.position.x,y:B.y??F.position.y},{width:I,height:z},F.parentId,$,V)}},Z=UA([X],$,Y,R);H.push(...Z),q.x=B.x?Math.max(V[0]*I,B.x):void 0,q.y=B.y?Math.max(V[1]*z,B.y):void 0}if(q.x!==void 0&&q.y!==void 0){const V={id:j,type:"position",position:{...q}};H.push(V)}if(B.width!==void 0&&B.height!==void 0){const I={id:j,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:B.width,height:B.height}};H.push(I)}for(const V of L){const I={...V,type:"position"};H.push(I)}W(H)},onEnd:({width:B,height:L})=>{const W={id:j,type:"dimensions",resizing:!1,dimensions:{width:B,height:L}};A.getState().triggerNodeChanges([W])}})),k.current.update({controlPosition:D,boundaries:{minWidth:c,minHeight:u,maxWidth:f,maxHeight:m},keepAspectRatio:h,resizeDirection:p,onResizeStart:x,onResize:S,onResizeEnd:E,shouldResize:w}),()=>{var B;(B=k.current)==null||B.destroy()}},[D,c,u,f,m,h,x,S,E,w]);const K=D.split("-");return g.jsx("div",{className:hn(["react-flow__resize-control","nodrag",...K,n,r]),ref:T,style:{...a,scale:P,...s&&{[N?"backgroundColor":"borderColor"]:s}},children:i})}b.memo(RNe);function kNe(e){const[t,n]=b.useState(null),[r,a]=b.useState(!1),i=b.useRef(null);return b.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 N9=180,DNe=70,Hy=24,INe=60;function LNe({data:e}){const t=e.pending?"agent-flow-node pending":`agent-flow-node ${KM(e.status)}`;return g.jsxs("div",{className:t,children:[g.jsx(zf,{type:"target",position:Re.Top}),g.jsx("div",{className:"agent-flow-role",children:e.pending?`[pending: ${e.role}]`:e.role}),!e.pending&&g.jsxs("div",{className:"agent-flow-meta",children:[g.jsx("span",{className:`status-dot ${KM(e.status)}`}),g.jsx("span",{children:e.status}),e.duration_ms!=null&&g.jsx("span",{children:g0(e.duration_ms)}),e.exit_code!=null&&g.jsxs("span",{children:["exit ",e.exit_code]})]}),g.jsx(zf,{type:"source",position:Re.Bottom})]})}const zNe={agent:LNe};function $Ne(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 Fy(e){return e.children.length===0?N9:e.children.reduce((t,n)=>t+Fy(n)+Hy,-Hy)}function T9(e,t,n,r){if(r.set(e.id,{x:t-N9/2,y:n}),e.children.length===0)return;const a=Fy(e);let i=t-a/2;for(const s of e.children){const c=Fy(s),u=i+c/2;T9(s,u,n+DNe+INe,r),i+=c+Hy}}function BNe({runId:e}){return g.jsx(O9,{children:g.jsx(UNe,{runId:e})})}function UNe({runId:e}){const{tree:t,connected:n}=kNe(e),{fitView:r}=bb(),a=b.useCallback(()=>{r({duration:300})},[r]),{flowNodes:i,flowEdges:s}=b.useMemo(()=>{if(!t)return{flowNodes:[],flowEdges:[]};const c=$Ne(t.nodes,t.pending_delegations),u=new Map;let f=0;for(const w of c){const x=Fy(w),S=f+x/2;T9(w,S,0,u),f+=x+Hy*2}const m=new Map(t.nodes.map(w=>[w.agent_id,w])),h=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=h.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 y=[];for(const w of t.nodes)w.parent&&y.push({id:`e-${w.parent}-${w.agent_id}`,source:w.parent,target:w.agent_id,type:"smoothstep",markerEnd:{type:Rf.ArrowClosed,width:16,height:16}});for(const w of t.pending_delegations)w.requested_by&&y.push({id:`e-${w.requested_by}-pending-${w.span_id}`,source:w.requested_by,target:`pending-${w.span_id}`,type:"smoothstep",markerEnd:{type:Rf.ArrowClosed,width:16,height:16},style:{strokeDasharray:"5 3"}});return{flowNodes:p,flowEdges:y}},[t]);return t?g.jsxs("div",{children:[g.jsxs("div",{className:"react-flow-wrapper",children:[g.jsx(lNe,{nodes:i,edges:s,nodeTypes:zNe,fitView:!0,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!1,proOptions:{hideAttribution:!0}}),g.jsx("button",{className:"tree-reset-btn",onClick:a,children:"Reset View"})]}),t.denied_delegations.length>0&&g.jsxs("div",{className:"denied-list",children:[g.jsx("strong",{children:"Denied delegations:"}),t.denied_delegations.map(c=>g.jsxs("span",{className:"denied-item",children:[c.role," (",c.reason,")"]},c.span_id))]})]}):g.jsx("div",{className:"agent-tree",children:g.jsx("p",{className:"agent-meta",children:n?"Loading tree...":"Connecting..."})})}const ql=18,H3=10;function HNe({runId:e,agents:t,active:n}){var Y;const r=Object.keys(t),a=r.find(R=>t[R].parent===null)??r[0]??"",[i,s]=b.useState(a),{lines:c,connected:u,done:f}=AB(e,i,!0),[m,h]=b.useState(""),p=m.toLowerCase(),y=m?c.reduce((R,H,q)=>(H.toLowerCase().includes(p)&&R.push(q),R),[]):[],w=b.useRef(null),[x,S]=b.useState(0),[E,C]=b.useState(0),[j,A]=b.useState(!0),T=b.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,L=b.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)},[]);b.useEffect(()=>{const R=w.current;R&&C(R.clientHeight)},[]),b.useEffect(()=>{if(j&&c.length>T.current){const R=w.current;R&&(R.scrollTop=R.scrollHeight)}T.current=c.length},[c.length,j]);const W=()=>{const R=w.current;R&&(R.scrollTop=R.scrollHeight,A(!0))},$=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),V=document.createElement("a");V.href=F,V.download=`${i}.log`,V.click(),URL.revokeObjectURL(F)}catch{}};return g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[r.length>1&&g.jsxs(el,{value:i,onValueChange:s,children:[g.jsx(nl,{className:"w-[220px]",children:g.jsx(tl,{})}),g.jsx(rl,{children:r.map(R=>g.jsxs(Kr,{value:R,children:[t[R].role," (",R.slice(0,8),")"]},R))})]}),r.length===1&&g.jsxs("span",{className:"text-sm text-muted-foreground",children:[(Y=t[i])==null?void 0:Y.role," (",i.slice(0,8),")"]}),g.jsxs("div",{className:"relative ml-auto",children:[g.jsx(sB,{className:"absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),g.jsx(ln,{className:"h-8 w-[200px] pl-7 text-xs",placeholder:"Search logs...",value:m,onChange:R=>h(R.target.value)})]}),m&&g.jsxs("span",{className:"text-xs text-muted-foreground",children:[y.length," match",y.length!==1?"es":""]}),g.jsxs(De,{variant:"outline",size:"sm",onClick:$,children:[g.jsx(m0,{className:"mr-1 h-3.5 w-3.5"}),"Download"]}),g.jsx(FNe,{connected:u,done:f,active:n})]}),g.jsxs("div",{className:"relative",children:[g.jsx("div",{ref:w,className:"h-[500px] overflow-auto rounded-md bg-[#1e1e1e] font-mono text-xs text-[#d4d4d4]",onScroll:L,children:c.length===0?g.jsx("div",{className:"flex h-full items-center justify-center text-[#666]",children:n&&!f?"Waiting for log output...":"No log output."}):g.jsx("div",{style:{height:N,position:"relative"},children:g.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 g.jsxs("div",{className:F?"bg-yellow-900/30":void 0,style:{height:ql,lineHeight:`${ql}px`,display:"flex",whiteSpace:"pre"},children:[g.jsx("span",{className:"select-none text-right text-[#555]",style:{width:`${(B+2)*.6}em`,paddingRight:"1em",flexShrink:0},children:q+1}),g.jsx("span",{children:F?g.jsx(qNe,{line:R,search:p}):R})]},q)})})})}),!j&&c.length>0&&g.jsxs(De,{size:"sm",variant:"secondary",className:"absolute bottom-3 right-4 shadow-md",onClick:W,children:[g.jsx(ute,{className:"mr-1 h-3.5 w-3.5"}),"Jump to bottom"]})]})]})}function FNe({connected:e,done:t,active:n}){return t||!n?g.jsx("span",{className:"text-xs text-muted-foreground",children:"Session ended"}):g.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[g.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 qNe({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(g.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)),g.jsx(g.Fragment,{children:n})}function KNe(e,t){const[n,r]=b.useState([]),[a,i]=b.useState(!1),s=b.useRef(null),c=b.useRef(""),u=b.useRef(void 0),f=b.useRef(1e3);return b.useEffect(()=>{if(!t)return;c.current!==e&&(r([]),c.current=e);function m(){const h=new EventSource(`/api/sessions/${e}/events`);s.current=h,h.onopen=()=>{i(!0),f.current=1e3},h.addEventListener("snapshot",p=>{try{const y=JSON.parse(p.data);y.events&&Array.isArray(y.events)&&r(y.events)}catch{}}),h.addEventListener("delta",p=>{try{const y=JSON.parse(p.data);y.events&&Array.isArray(y.events)&&r(w=>[...w,...y.events])}catch{}}),h.onmessage=p=>{try{const y=JSON.parse(p.data);y.events&&Array.isArray(y.events)&&r(y.events)}catch{}},h.onerror=()=>{h.close(),s.current=null,i(!1),u.current=setTimeout(()=>{f.current=Math.min(f.current*2,15e3),m()},f.current)}}return m(),()=>{var h;(h=s.current)==null||h.close(),s.current=null,u.current&&clearTimeout(u.current)}},[e,t]),{events:n,connected:a}}function VNe(){return g.jsxs("div",{className:"space-y-6",children:[g.jsx(Xt,{className:"h-8 w-64"}),g.jsx(Xt,{className:"h-32 rounded-lg"}),g.jsx(Xt,{className:"h-64 rounded-lg"})]})}function YNe(){const{projectId:e,runId:t}=rO(),[n]=SY(),r=Number(e),a=y=>y==="starting"||y==="running",i=tre(r,t??"",{refetchInterval:void 0}),s=i.data,c=a(s==null?void 0:s.status);b.useEffect(()=>{if(!c)return;const y=setInterval(()=>i.refetch(),2e3);return()=>clearInterval(y)},[c,i]);const{events:u}=KNe(t??"",c),f=(s==null?void 0:s.events)??[],m=u.length>0?u:f;if(i.isLoading)return g.jsx(VNe,{});if(i.error)return g.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[g.jsx(Zs,{className:"h-4 w-4"}),g.jsxs("span",{children:["Error: ",i.error.message]})]});if(!s)return g.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[g.jsx(Zs,{className:"h-4 w-4"}),g.jsx("span",{children:"Session not found"})]});const h=ZNe(m),p=n.get("tab")??(c?"agent-tree":"overview");return g.jsxs("div",{className:"space-y-6",children:[g.jsx(XNe,{session:s,projectId:r,runId:t??"",onStopped:()=>i.refetch()}),g.jsx(QNe,{session:s}),g.jsxs(jA,{defaultValue:p,children:[g.jsxs(CA,{children:[g.jsx(Ua,{value:"overview",children:"Overview"}),g.jsx(Ua,{value:"agent-tree",children:"Agent Tree"}),g.jsx(Ua,{value:"logs",children:"Logs"}),g.jsxs(Ua,{value:"trace",children:["Trace",m.length>0&&` (${m.length})`]}),g.jsxs(Ua,{value:"artifacts",children:["Artifacts",h.length>0&&` (${h.length})`]})]}),g.jsxs(Ha,{value:"overview",className:"space-y-4",children:[s.task&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Task"}),g.jsx(Sn,{children:g.jsx(En,{className:"pt-4",children:g.jsx("pre",{className:"whitespace-pre-wrap break-words text-sm",children:s.task})})})]}),s.summary&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("h2",{className:"text-sm font-medium text-muted-foreground",children:"Summary"}),g.jsx(Sn,{children:g.jsx(En,{className:"pt-4",children:g.jsx("pre",{className:"whitespace-pre-wrap break-words text-sm",children:s.summary})})})]}),!s.task&&!s.summary&&g.jsx("p",{className:"text-sm text-muted-foreground",children:"No overview information available yet."})]}),g.jsx(Ha,{value:"agent-tree",children:g.jsx(BNe,{runId:s.run_id})}),g.jsx(Ha,{value:"logs",children:Object.keys(s.agents).length>0?g.jsx(HNe,{runId:s.run_id,agents:s.agents,active:c}):g.jsx("p",{className:"text-sm text-muted-foreground",children:"No agents registered yet."})}),g.jsx(Ha,{value:"trace",children:m.length>0?g.jsx(rTe,{events:m,runId:s.run_id}):g.jsx("p",{className:"text-sm text-muted-foreground",children:"No trace events recorded yet."})}),g.jsx(Ha,{value:"artifacts",children:h.length>0?g.jsx(JNe,{artifacts:h,runId:s.run_id}):g.jsx("p",{className:"text-sm text-muted-foreground",children:"No artifacts recorded yet."})})]})]})}function XNe({session:e,projectId:t,runId:n,onStopped:r}){const[a,i]=b.useState(!1),s=yae(),c=e.status==="starting"||e.status==="running";return g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("h1",{className:"text-2xl font-bold tracking-tight",children:["Session ",e.run_id.slice(0,16)]}),g.jsxs("div",{className:"flex gap-2",children:[c&&(a?g.jsxs("div",{className:"flex gap-1",children:[g.jsx(De,{size:"sm",variant:"destructive",onClick:async()=>{await s.mutateAsync(n),i(!1),r()},disabled:s.isPending,children:"Confirm"}),g.jsx(De,{size:"sm",variant:"outline",onClick:()=>i(!1),children:"Cancel"})]}):g.jsxs(De,{variant:"destructive",onClick:()=>i(!0),children:[g.jsx(iB,{className:"mr-2 h-4 w-4"}),"Stop Session"]})),g.jsx(De,{variant:"outline",asChild:!0,children:g.jsxs(Va,{to:`/projects/${t}`,children:[g.jsx(J$,{className:"mr-2 h-4 w-4"}),"Back"]})})]})]})}function GNe({status:e}){const t=WNe(e);return g.jsxs(_n,{variant:"outline",className:Ae("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"&&g.jsx("span",{className:"mr-1.5 inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-green-500"}),e]})}function WNe(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 QNe({session:e}){return g.jsx(Sn,{children:g.jsx(En,{className:"pt-6",children:g.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-sm",children:[g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Status"}),g.jsx("dd",{children:g.jsx(GNe,{status:e.status})}),g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Role"}),g.jsx("dd",{children:e.role}),g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Runtime"}),g.jsx("dd",{children:e.runtime}),g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Isolation"}),g.jsx("dd",{children:e.isolation}),g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Started"}),g.jsx("dd",{children:zg(e.started_at)}),e.ended_at&&g.jsxs(g.Fragment,{children:[g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Ended"}),g.jsx("dd",{children:zg(e.ended_at)})]}),g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Duration"}),g.jsx("dd",{children:g0(e.duration_ms)}),e.exit_code!==null&&g.jsxs(g.Fragment,{children:[g.jsx("dt",{className:"font-medium text-muted-foreground",children:"Exit Code"}),g.jsx("dd",{children:e.exit_code})]})]})})})}function ZNe(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 JNe({artifacts:e,runId:t}){return g.jsx("div",{className:"space-y-1",children:e.map(n=>g.jsxs(dj,{children:[g.jsxs(hj,{className:"flex w-full items-center gap-2 rounded-md bg-muted/50 px-3 py-2 text-sm hover:bg-muted",children:[g.jsx(h0,{className:"h-3 w-3 transition-transform [[data-state=open]>&]:rotate-90"}),g.jsx("span",{className:"font-medium text-primary",children:n.label})]}),g.jsx(mj,{children:g.jsx(eTe,{runId:t,hash:n.hash})})]},`${n.event}-${n.hash}`))})}function eTe({runId:e,hash:t}){const[n,r]=b.useState(null),[a,i]=b.useState(null);return b.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?g.jsxs("p",{className:"px-3 py-2 text-sm text-destructive",children:["Error: ",a]}):n===null?g.jsx("p",{className:"px-3 py-2 text-sm text-muted-foreground",children:"Loading..."}):g.jsx(y0,{className:"max-h-[300px]",children:g.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 tTe({event:e}){const t=nTe(e);return g.jsx(_n,{variant:"outline",className:Ae("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 nTe(e){return e.endsWith("_start")||e==="agent_spawn"?"running":e.endsWith("_end")?"success":e.includes("denied")||e.includes("error")?"error":"default"}function rTe({events:e,runId:t}){const[n,r]=b.useState(null);return g.jsxs(g.Fragment,{children:[g.jsx(Sn,{children:g.jsx(En,{className:"p-0",children:g.jsxs(Hc,{children:[g.jsx(Fc,{children:g.jsxs(Tr,{children:[g.jsx(nt,{children:"Time"}),g.jsx(nt,{children:"Event"}),g.jsx(nt,{children:"Span"}),g.jsx(nt,{children:"Details"})]})}),g.jsx(qc,{children:e.map((a,i)=>g.jsxs(Tr,{children:[g.jsx(rt,{className:"text-sm text-muted-foreground",children:zg(a.ts)}),g.jsx(rt,{children:g.jsx(tTe,{event:a.event})}),g.jsx(rt,{className:"font-mono text-xs text-muted-foreground",children:a.span_id.slice(0,8)}),g.jsx(rt,{className:"max-w-[400px] text-sm",children:iTe(a,(s,c)=>r({hash:s,label:c}))})]},i))})]})})}),g.jsx(zc,{open:!!n,onOpenChange:()=>r(null),children:g.jsxs($c,{className:"max-w-3xl overflow-hidden",children:[g.jsx(Bc,{children:g.jsx(Uc,{children:n==null?void 0:n.label})}),n&&g.jsx(aTe,{runId:t,hash:n.hash})]})})]})}function aTe({runId:e,hash:t}){const[n,r]=b.useState(null),[a,i]=b.useState(null);return b.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?g.jsxs("p",{className:"text-sm text-destructive",children:["Error: ",a]}):n===null?g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):g.jsx(y0,{className:"max-h-[60vh]",children:g.jsx("pre",{className:"whitespace-pre-wrap break-words rounded-md bg-muted/30 p-4 font-mono text-xs leading-relaxed",children:n})})}function iTe(e,t){const n=e.data,r=[];for(const[s,c]of Object.entries(n))if(s.endsWith("_ref")&&c){const u=s.replace(/_ref$/,"");r.push(g.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(c),u),children:u},s))}const a=[];for(const[s,c]of Object.entries(n)){if(s.endsWith("_ref")||c==null||c==="")continue;const u=s==="duration_ms"?g0(c):Array.isArray(c)?c.join(", "):String(c);a.push(g.jsxs("span",{children:[g.jsxs("span",{className:"text-muted-foreground",children:[s,"="]}),g.jsx("span",{children:u})]},s))}const i=n.summary?g.jsx("span",{className:"italic text-foreground/80",children:String(n.summary)},"summary"):null;return g.jsxs(g.Fragment,{children:[r.length>0&&g.jsx("div",{className:"mb-1 flex flex-wrap gap-1",children:r}),i,a.length>0&&g.jsx("div",{className:"flex flex-wrap gap-x-2 gap-y-0.5 text-xs text-muted-foreground",children:a})]})}const oTe={roles:"Roles",skills:"Skills",agents:"Agents",memories:"Memory Providers"};function sTe(){const{resourceType:e="roles"}=rO(),{data:t,isLoading:n}=Lh(e),[r,a]=b.useState(null),[i,s]=b.useState(!1),[c,u]=b.useState(!1),{data:f}=vae(e,r??"",{enabled:i&&!!r}),m=oTe[e]??e;return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:m}),g.jsxs("p",{className:"text-sm text-muted-foreground",children:["Installed ",m.toLowerCase()," from StrawHub"]})]}),g.jsxs(De,{onClick:()=>u(!0),size:"sm",children:[g.jsx(m0,{className:"mr-2 h-4 w-4"}),"Install"]})]}),n?g.jsx("div",{className:"space-y-2",children:Array.from({length:3}).map((h,p)=>g.jsx(Xt,{className:"h-12 w-full"},p))}):!t||t.length===0?g.jsxs("div",{className:"rounded-lg border border-dashed border-border p-8 text-center text-muted-foreground",children:["No ",m.toLowerCase()," installed yet."]}):g.jsxs(Hc,{children:[g.jsx(Fc,{children:g.jsxs(Tr,{children:[g.jsx(nt,{children:"Name"}),g.jsx(nt,{children:"Version"}),g.jsx(nt,{children:"Description"}),g.jsx(nt,{children:"Source"})]})}),g.jsx(qc,{children:t.map(h=>g.jsxs(Tr,{className:"cursor-pointer",onClick:()=>{a(h.name),s(!0)},children:[g.jsx(rt,{className:"font-medium",children:h.name}),g.jsx(rt,{className:"text-sm text-muted-foreground",children:h.version??"—"}),g.jsx(rt,{className:"max-w-[300px] truncate text-sm",children:h.description||"—"}),g.jsx(rt,{children:g.jsx(_n,{variant:"outline",className:"text-xs",children:h.source})})]},h.name))})]}),g.jsx(PB,{resource:f??null,resourceType:e,open:i,onOpenChange:s}),g.jsx(pj,{open:c,onOpenChange:u,defaultType:e})]})}function lTe(){return Ln({queryKey:Ge.schedules.all,queryFn:()=>He.get("/schedules")})}function cTe(){const e=jt();return Gt({mutationFn:t=>He.post("/schedules",t),onSuccess:()=>{e.invalidateQueries({queryKey:Ge.schedules.all})}})}function uTe(){const e=jt();return Gt({mutationFn:({id:t,...n})=>He.put(`/schedules/${t}`,n),onSuccess:()=>{e.invalidateQueries({queryKey:Ge.schedules.all})}})}function fTe(){const e=jt();return Gt({mutationFn:t=>He.delete(`/schedules/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ge.schedules.all})}})}function dTe(){const e=jt();return Gt({mutationFn:({id:t,enable:n})=>He.post(`/schedules/${t}/${n?"enable":"disable"}`),onSuccess:()=>{e.invalidateQueries({queryKey:Ge.schedules.all})}})}var VS={exports:{}},F3;function hTe(){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 h(p,y,w){y===void 0&&(y=!0),w===void 0&&(w=!1),this.expression=p,this.dayOfWeekStartIndexZero=y,this.monthStartIndexZero=w}return h.prototype.parse=function(){var p,y,w=(p=this.expression)!==null&&p!==void 0?p:"";if(w==="@reboot")return y=["@reboot","","","","","",""],y;if(w.startsWith("@")){var x=this.parseSpecial(this.expression);y=this.extractParts(x)}else y=this.extractParts(this.expression);return this.normalize(y),this.validate(y),y},h.prototype.parseSpecial=function(p){var y={"@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=y[p];if(!w)throw new Error("Unknown special expression.");return w},h.prototype.extractParts=function(p){if(!this.expression)throw new Error("cron expression is empty");for(var y=p.trim().split(/[ ]+/),w=0;w<y.length;w++)if(y[w].includes(",")){var x=y[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}),y[w]=x.map(function(E){return E!==null?E.toString():""}).join(",")}if(y.length<5)throw new Error("Expression has only ".concat(y.length," part").concat(y.length==1?"":"s",". At least 5 parts are required."));if(y.length==5)y.unshift(""),y.push("");else if(y.length==6){var S=/\d{4}$/.test(y[5])||y[4]=="?"||y[2]=="?";S?y.unshift(""):y.push("")}else if(y.length>7)throw new Error("Expression has ".concat(y.length," parts; too many!"));return y},h.prototype.normalize=function(p){var y=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 y.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 y.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 j=null;switch(C){case 4:j="12";break;case 5:j="6";break;case 6:j="9999";break;default:j=null;break}if(j!==null){var A=p[C].split("/");p[C]="".concat(A[0],"-").concat(j,"/").concat(A[1])}}},h.prototype.validate=function(p){var y="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(p[0],y),this.validateOnlyExpectedCharactersFound(p[1],y),this.validateOnlyExpectedCharactersFound(p[2],y),this.validateOnlyExpectedCharactersFound(p[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(p[4],y),this.validateOnlyExpectedCharactersFound(p[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(p[6],y),this.validateAnyRanges(p)},h.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)},h.prototype.validateOnlyExpectedCharactersFound=function(p,y){var w=p.match(new RegExp("[^".concat(y,"]+"),"gi"));if(w&&w.length)throw new Error("Expression contains invalid values: '".concat(w.toString(),"'"))},h})();c.CronParser=m},333(s,c,u){Object.defineProperty(c,"__esModule",{value:!0}),c.ExpressionDescriptor=void 0;var f=u(823),m=u(949),h=(function(){function p(y,w){if(this.expression=y,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(y,w){var x=w===void 0?{}:w,S=x.throwExceptionOnParseError,E=S===void 0?!0:S,C=x.verbose,j=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,L=B===void 0?!1:B,W={throwExceptionOnParseError:E,verbose:j,dayOfWeekStartIndexZero:T,monthStartIndexZero:P,use24HourTimeFormat:k,locale:K,logicalAndDayFields:L};W.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var $=new p(y,W);return $.getFullDescription()},p.initialize=function(y,w){w===void 0&&(w="en"),p.specialCharacters=["/","-",",","*"],p.defaultLocale=w,y.load(p.locales)},p.prototype.getFullDescription=function(){var y,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=(y=this.i18n).atReboot)===null||w===void 0?void 0:w.call(y))||"Run once, at startup";var E=this.getTimeOfDayDescription(),C=this.getDayOfMonthDescription(),j=this.getMonthDescription(),A=this.getDayOfWeekDescription(),T=this.getYearDescription();x+=E+C+A+j+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 y=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(y,p.specialCharacters))S+=this.i18n.atSpace()+this.formatTime(x,w,y);else if(!y&&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(!y&&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 j=0;j<C.length;j++)S+=" ",S+=this.formatTime(C[j],w,""),j<C.length-2&&(S+=","),j==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 y=this,w=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(x){return x},function(x){return f.StringUtilities.format(y.i18n.everyX0Seconds(x),x)},function(x){return y.i18n.secondsX0ThroughX1PastTheMinute()},function(x){return x=="0"?"":parseInt(x)<20?y.i18n.atX0SecondsPastTheMinute(x):y.i18n.atX0SecondsPastTheMinuteGt20()||y.i18n.atX0SecondsPastTheMinute(x)});return w},p.prototype.getMinutesDescription=function(){var y=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(y.i18n.everyX0Minutes(E),E)},function(E){return y.i18n.minutesX0ThroughX1PastTheHour()},function(E){var C,j;try{return E=="0"&&x.indexOf("/")==-1&&w==""?y.i18n.everyHour():E=="0"?((j=(C=y.i18n).onTheHour)===null||j===void 0?void 0:j.call(C))||y.i18n.atX0MinutesPastTheHour(E):parseInt(E)<20?y.i18n.atX0MinutesPastTheHour(E):y.i18n.atX0MinutesPastTheHourGt20()||y.i18n.atX0MinutesPastTheHour(E)}catch{return y.i18n.atX0MinutesPastTheHour(E)}});return S},p.prototype.getHoursDescription=function(){var y=this,w=this.expressionParts[2],x=0,S=[];w.split("/")[0].split(",").forEach(function(j){var A=j.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(j){var A=S.find(function(N){return N.value===j&&N.index===E}),T=A&&y.expressionParts[1]!=="0";return E++,T?y.formatTime(j,"59",""):y.formatTime(j,"0","")},function(j){return f.StringUtilities.format(y.i18n.everyX0Hours(j),j)},function(j){return y.i18n.betweenX0AndX1()},function(j){return y.i18n.atX0()});return C},p.prototype.getDayOfWeekDescription=function(){var y=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 j=parseInt(C),A=y.i18n.daysOfTheWeekInCase?y.i18n.daysOfTheWeekInCase(E)[j]:w[j];if(S.indexOf("#")>-1){var T=null,N=S.substring(S.indexOf("#")+1),P=S.substring(0,S.indexOf("#"));switch(N){case"1":T=y.i18n.first(P);break;case"2":T=y.i18n.second(P);break;case"3":T=y.i18n.third(P);break;case"4":T=y.i18n.fourth(P);break;case"5":T=y.i18n.fifth(P);break}A=T+" "+A}return A},function(S){return parseInt(S)==1?"":f.StringUtilities.format(y.i18n.commaEveryX0DaysOfTheWeek(S),S)},function(S){var E=S.substring(0,S.indexOf("-")),C=y.expressionParts[3]!="*";return C?y.i18n.commaAndX0ThroughX1(E):y.i18n.commaX0ThroughX1(E)},function(S){var E=null;if(S.indexOf("#")>-1){var C=S.substring(S.indexOf("#")+1),j=S.substring(0,S.indexOf("#"));E=y.i18n.commaOnThe(C,j).trim()+y.i18n.spaceX0OfTheMonth()}else if(S.indexOf("L")>-1)E=y.i18n.commaOnTheLastX0OfTheMonth(S.replace("L",""));else{var A=y.expressionParts[3]!="*";A?y.options.logicalAndDayFields?E=y.i18n.commaOnlyOnX0(S):E=y.i18n.commaAndOnX0():E=y.i18n.commaOnlyOnX0(S)}return E}),x},p.prototype.getMonthDescription=function(){var y=this,w=this.i18n.monthsOfTheYear(),x=this.getSegmentDescription(this.expressionParts[4],"",function(S,E){return E&&y.i18n.monthsOfTheYearInCase?y.i18n.monthsOfTheYearInCase(E)[parseInt(S)-1]:w[parseInt(S)-1]},function(S){return parseInt(S)==1?"":f.StringUtilities.format(y.i18n.commaEveryX0Months(S),S)},function(S){return y.i18n.commaMonthX0ThroughMonthX1()||y.i18n.commaX0ThroughX1()},function(S){return y.i18n.commaOnlyInMonthX0?y.i18n.commaOnlyInMonthX0():y.i18n.commaOnlyInX0()});return x},p.prototype.getDayOfMonthDescription=function(){var y=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 j=x.match(/L-(\d{1,2})/);if(j){var A=j[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"?y.i18n.lastDay():y.i18n.dayX0?f.StringUtilities.format(y.i18n.dayX0(),T):T},function(T){return T=="1"?y.i18n.commaEveryDay():y.i18n.commaEveryX0Days(T)},function(T){return y.i18n.commaBetweenDayX0AndX1OfTheMonth(T)},function(T){return y.i18n.commaOnDayX0OfTheMonth(T)})}break}}return w},p.prototype.getYearDescription=function(){var y=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(y.i18n.commaEveryX0Years(x),x)},function(x){return y.i18n.commaYearX0ThroughYearX1()||y.i18n.commaX0ThroughX1()},function(x){return y.i18n.commaOnlyInYearX0?y.i18n.commaOnlyInYearX0():y.i18n.commaOnlyInX0()});return w},p.prototype.getSegmentDescription=function(y,w,x,S,E,C){var j=null,A=y.indexOf("/")>-1,T=y.indexOf("-")>-1,N=y.indexOf(",")>-1;if(!y)j="";else if(y==="*")j=w;else if(!A&&!T&&!N)j=f.StringUtilities.format(C(y),x(y));else if(N){for(var P=y.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 L=this.getSegmentDescription(P[D],w,x,S,E,C);L&&L.startsWith(", ")&&(L=L.substring(2)),k+=L}A?j=k:j=f.StringUtilities.format(C(y),k)}else if(A){var P=y.split("/");if(j=f.StringUtilities.format(S(P[1]),P[1]),P[0].indexOf("-")>-1){var W=this.generateRangeSegmentDescription(P[0],E,x);W.indexOf(", ")!=0&&(j+=", "),j+=W}else if(P[0].indexOf("*")==-1){var $=f.StringUtilities.format(C(P[0]),x(P[0]));$=$.replace(", ",""),j+=f.StringUtilities.format(this.i18n.commaStartingX0(),$)}}else T&&(j=this.generateRangeSegmentDescription(y,E,x));return j},p.prototype.generateRangeSegmentDescription=function(y,w,x){var S="",E=y.split("-"),C=x(E[0],1),j=x(E[1],2),A=w(y);return S+=f.StringUtilities.format(A,C,j),S},p.prototype.formatTime=function(y,w,x){var S=0,E=0,C=parseInt(y)+S,j=parseInt(w)+E;j>=60?(j-=60,C+=1):j<0&&(j+=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"+j.toString()).substring(j.toString().length)).concat(N).concat(T?"":A)},p.prototype.transformVerbosity=function(y,w){if(!w&&(y=y.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),y=y.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),y=y.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),y=y.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],j=E[1];y=y.replace(new RegExp(C,"g"),j)}return y},p.prototype.getPeriod=function(y){return y>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},p.locales={},p})();c.ExpressionDescriptor=h},747(s,c,u){Object.defineProperty(c,"__esModule",{value:!0}),c.enLocaleLoader=void 0;var f=u(486),m=(function(){function h(){}return h.prototype.load=function(p){p.en=new f.en},h})();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,h){if(!m)throw new Error(h)}var f=(function(){function m(){}return m.secondRange=function(h){for(var p=h.split(","),y=0;y<p.length;y++)if(!isNaN(parseInt(p[y],10))){var w=parseInt(p[y],10);u(w>=0&&w<=59,"seconds part must be >= 0 and <= 59")}},m.minuteRange=function(h){for(var p=h.split(","),y=0;y<p.length;y++)if(!isNaN(parseInt(p[y],10))){var w=parseInt(p[y],10);u(w>=0&&w<=59,"minutes part must be >= 0 and <= 59")}},m.hourRange=function(h){for(var p=h.split(","),y=0;y<p.length;y++)if(!isNaN(parseInt(p[y],10))){var w=parseInt(p[y],10);u(w>=0&&w<=23,"hours part must be >= 0 and <= 23")}},m.dayOfMonthRange=function(h){for(var p=h.split(","),y=0;y<p.length;y++)if(!isNaN(parseInt(p[y],10))){var w=parseInt(p[y],10);u(w>=1&&w<=31,"DOM part must be >= 1 and <= 31")}},m.monthRange=function(h,p){for(var y=h.split(","),w=0;w<y.length;w++)if(!isNaN(parseInt(y[w],10))){var x=parseInt(y[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(h,p){for(var y=h.split(","),w=0;w<y.length;w++)if(!isNaN(parseInt(y[w],10))){var x=parseInt(y[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 h=[],p=1;p<arguments.length;p++)h[p-1]=arguments[p];return m.replace(/%s/g,function(y){return h.shift()})},f.containsAny=function(m,h){return h.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})())})(VS)),VS.exports}var mTe=hTe();const pTe=Wa(mTe),vTe=[{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 gTe({open:e,onOpenChange:t,editing:n}){const{data:r}=Yf(),{data:a}=TB(),i=cTe(),s=uTe(),[c,u]=b.useState(""),[f,m]=b.useState(""),[h,p]=b.useState(""),[y,w]=b.useState(""),[x,S]=b.useState(""),[E,C]=b.useState(""),[j,A]=b.useState(!0),[T,N]=b.useState(!1);b.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(L){L.preventDefault();try{const W={name:c.trim(),task:h.trim(),cron_expr:y.trim(),role:x.trim()||void 0,system_prompt:E.trim()||void 0,skip_if_running:j};n?await s.mutateAsync({id:n.id,...W}):await i.mutateAsync({...W,project_id:Number(f)}),P(),t(!1)}catch{}}const D=b.useMemo(()=>{if(!y.trim())return null;try{return pTe.toString(y.trim())}catch{return null}},[y]),K=i.isPending||s.isPending,B=i.error||s.error;return g.jsx(zc,{open:e,onOpenChange:t,children:g.jsxs($c,{className:"max-w-lg",children:[g.jsx(Bc,{children:g.jsx(Uc,{children:n?"Edit Schedule":"Create Schedule"})}),g.jsxs("form",{onSubmit:k,className:"space-y-4",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsxs(en,{htmlFor:"sched-name",children:["Name ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx(ln,{id:"sched-name",value:c,onChange:L=>u(L.target.value),placeholder:"e.g. github-issue-checker",required:!0,autoFocus:!0})]}),!n&&g.jsxs("div",{className:"space-y-2",children:[g.jsxs(en,{htmlFor:"sched-project",children:["Project ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsxs(el,{value:f,onValueChange:m,required:!0,children:[g.jsx(nl,{id:"sched-project",children:g.jsx(tl,{placeholder:"Select a project"})}),g.jsx(rl,{children:(r??[]).map(L=>g.jsx(Kr,{value:String(L.id),children:L.display_name},L.id))})]})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs(en,{htmlFor:"sched-task",children:["Task ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsx($g,{id:"sched-task",value:h,onChange:L=>p(L.target.value),placeholder:"What should the agent do each time this runs?",required:!0,rows:3})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs(en,{htmlFor:"sched-cron",children:["Cron Expression ",g.jsx("span",{className:"text-destructive",children:"*"})]}),g.jsxs(Dg,{children:[g.jsx(Ig,{asChild:!0,children:g.jsxs(De,{variant:"ghost",size:"sm",className:"h-6 text-xs",children:["Presets",g.jsx(Ih,{className:"ml-1 h-3 w-3"})]})}),g.jsx(Lg,{align:"end",children:vTe.map(L=>g.jsxs(wh,{onClick:()=>w(L.value),children:[g.jsx("span",{className:"mr-3 font-mono text-xs text-muted-foreground",children:L.value}),L.label]},L.value))})]})]}),g.jsx(ln,{id:"sched-cron",value:y,onChange:L=>w(L.target.value),placeholder:"*/5 * * * *",required:!0,className:"font-mono"}),D&&g.jsx("p",{className:"text-xs text-muted-foreground",children:D})]}),g.jsxs("div",{className:"space-y-2",children:[g.jsx(en,{htmlFor:"sched-role",children:"Role"}),g.jsx(ln,{id:"sched-role",value:x,onChange:L=>S(L.target.value),placeholder:(a==null?void 0:a[0])??"orchestrator",list:"sched-role-list"}),g.jsx("datalist",{id:"sched-role-list",children:(a??[]).map(L=>g.jsx("option",{value:L},L))})]}),g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:j,onChange:L=>A(L.target.checked),className:"rounded border-input"}),g.jsx("span",{className:"text-sm",children:"Skip if already running"}),g.jsx("span",{className:"text-xs text-muted-foreground",children:"— don't start a new session while a previous one is still active"})]}),g.jsxs(dj,{open:T,onOpenChange:N,children:[g.jsx(hj,{asChild:!0,children:g.jsxs(De,{type:"button",variant:"ghost",size:"sm",className:"flex items-center gap-1 px-0 text-xs text-muted-foreground",children:[g.jsx(Ih,{className:`h-3 w-3 transition-transform ${T?"rotate-180":""}`}),"Advanced Options"]})}),g.jsx(mj,{className:"space-y-4 pt-2",children:g.jsxs("div",{className:"space-y-2",children:[g.jsx(en,{htmlFor:"sched-prompt",children:"System Prompt"}),g.jsx($g,{id:"sched-prompt",value:E,onChange:L=>C(L.target.value),placeholder:"Additional instructions for the agent...",rows:3})]})})]}),B&&g.jsx("p",{className:"text-sm text-destructive",children:B.message}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(De,{type:"button",variant:"outline",onClick:()=>t(!1),children:"Cancel"}),g.jsx(De,{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 yTe({schedule:e}){return e.enabled?e.last_error?g.jsx(Q$,{children:g.jsxs(tte,{children:[g.jsx(nte,{children:g.jsx(_n,{variant:"destructive",children:"Error"})}),g.jsx(rte,{className:"max-w-xs",children:g.jsx("p",{className:"text-xs",children:e.last_error})})]})}):g.jsx(_n,{className:"bg-emerald-600 hover:bg-emerald-600",children:"Active"}):g.jsx(_n,{variant:"secondary",children:"Disabled"})}function bTe(){const{data:e,isLoading:t,error:n}=lTe(),[r,a]=b.useState(!1),[i,s]=b.useState(null),c=fTe(),u=dTe();if(t)return g.jsxs("div",{className:"space-y-6",children:[g.jsx(Xt,{className:"h-8 w-48"}),g.jsx(Xt,{className:"h-64 rounded-lg"})]});if(n)return g.jsxs("div",{className:"flex items-center gap-2 text-destructive",children:[g.jsx(Zs,{className:"h-4 w-4"}),g.jsxs("span",{children:["Error: ",n.message]})]});const f=e??[];return g.jsxs("div",{className:"space-y-6",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Scheduled Tasks"}),g.jsxs(De,{onClick:()=>{s(null),a(!0)},children:[g.jsx(IE,{className:"mr-2 h-4 w-4"}),"Create Schedule"]})]}),f.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed p-12 text-center",children:[g.jsx("p",{className:"text-muted-foreground",children:"No scheduled tasks yet."}),g.jsxs(De,{variant:"outline",className:"mt-4",onClick:()=>{s(null),a(!0)},children:[g.jsx(IE,{className:"mr-2 h-4 w-4"}),"Create your first schedule"]})]}):g.jsx("div",{className:"rounded-lg border",children:g.jsxs(Hc,{children:[g.jsx(Fc,{children:g.jsxs(Tr,{children:[g.jsx(nt,{children:"Name"}),g.jsx(nt,{children:"Project"}),g.jsx(nt,{children:"Cron"}),g.jsx(nt,{children:"Next Run"}),g.jsx(nt,{children:"Last Run"}),g.jsx(nt,{children:"Status"}),g.jsx(nt,{className:"w-[120px]",children:"Actions"})]})}),g.jsx(qc,{children:f.map(m=>g.jsxs(Tr,{children:[g.jsx(rt,{className:"font-medium",children:m.name}),g.jsx(rt,{className:"text-muted-foreground",children:m.project_name}),g.jsx(rt,{children:g.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:m.cron_expr})}),g.jsx(rt,{className:"text-sm text-muted-foreground",children:q3(m.next_run_at)}),g.jsx(rt,{className:"text-sm text-muted-foreground",children:q3(m.last_run_at)}),g.jsx(rt,{children:g.jsx(yTe,{schedule:m})}),g.jsx(rt,{children:g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(De,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{s(m),a(!0)},children:g.jsx(rne,{className:"h-3.5 w-3.5"})}),g.jsx(De,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>u.mutate({id:m.id,enable:!m.enabled}),children:m.enabled?g.jsx(tne,{className:"h-3.5 w-3.5"}):g.jsx(sj,{className:"h-3.5 w-3.5"})}),g.jsx(De,{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:g.jsx(lj,{className:"h-3.5 w-3.5"})})]})})]},m.id))})]})}),g.jsx(gTe,{open:r,onOpenChange:a,editing:i})]})}function xTe(){return Ln({queryKey:Ge.config.global,queryFn:()=>He.get("/config/global")})}function wTe(){const e=jt();return Gt({mutationFn:t=>He.put("/config/global",t),onSuccess:()=>{e.invalidateQueries({queryKey:Ge.config.global})}})}function STe(){const e=jt();return Gt({mutationFn:({projectId:t,data:n})=>He.put(`/projects/${t}/config`,n),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Ge.projects.config(n.projectId)})}})}function YS(e){const t=e.orchestrator??{},n=e.policy??{},r=e.session??{},a=e.trace??{};return{runtime:ha(e.runtime),isolation:ha(e.isolation),memory:ha(e.memory),orchestrator_role:ha(t.role),orchestrator_permission_mode:ha(t.permission_mode),policy_max_depth:ha(n.max_depth),policy_agent_timeout:ha(n.agent_timeout),policy_max_delegate_retries:ha(n.max_delegate_retries),session_merge_strategy:ha(r.merge_strategy),session_pull_before_session:ha(r.pull_before_session),session_pr_command:ha(r.pr_command),trace_enabled:ha(a.enabled)}}function ha(e){return e==null?"":String(e)}function ETe(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)),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"],OTe=["default","plan","bypassPermissions"],jTe=["auto","local","pr"],CTe=["prompt","always","never"],ATe=["true","false"],XS="__empty__";function K3({values:e,placeholders:t,onSave:n,saving:r}){const[a,i]=b.useState(YS(e)),{data:s}=Lh("agents"),{data:c}=Lh("roles"),u=t?YS(t):void 0;b.useEffect(()=>{i(YS(e))},[e]);const f=y=>w=>i(x=>({...x,[y]:w})),m=()=>{n(ETe(a))},h=(s??[]).map(y=>y.name),p=(c??[]).map(y=>y.name);return g.jsxs("div",{className:"flex flex-col gap-6",children:[g.jsxs("section",{className:"flex flex-col gap-3",children:[g.jsx("h3",{className:"text-sm font-semibold",children:"General"}),g.jsx(Ps,{}),g.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[g.jsxs(ma,{label:"Runtime",children:[g.jsx(ln,{list:"cfg-dl-runtime",value:a.runtime,onChange:y=>f("runtime")(y.target.value),placeholder:(u==null?void 0:u.runtime)||"strawpot-claude-code",className:"h-8 text-xs"}),h.length>0&&g.jsx("datalist",{id:"cfg-dl-runtime",children:h.map(y=>g.jsx("option",{value:y},y))})]}),g.jsx(ma,{label:"Isolation",children:g.jsx(gh,{value:a.isolation,onChange:f("isolation"),options:_Te,placeholder:(u==null?void 0:u.isolation)||"none",allowEmpty:!0})}),g.jsx(ma,{label:"Memory",children:g.jsx(ln,{value:a.memory,onChange:y=>f("memory")(y.target.value),placeholder:(u==null?void 0:u.memory)||"dial",className:"h-8 text-xs"})})]})]}),g.jsxs("section",{className:"flex flex-col gap-3",children:[g.jsx("h3",{className:"text-sm font-semibold",children:"Orchestrator"}),g.jsx(Ps,{}),g.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[g.jsxs(ma,{label:"Role",children:[g.jsx(ln,{list:"cfg-dl-role",value:a.orchestrator_role,onChange:y=>f("orchestrator_role")(y.target.value),placeholder:(u==null?void 0:u.orchestrator_role)||"ai-ceo",className:"h-8 text-xs"}),p.length>0&&g.jsx("datalist",{id:"cfg-dl-role",children:p.map(y=>g.jsx("option",{value:y},y))})]}),g.jsx(ma,{label:"Permission Mode",children:g.jsx(gh,{value:a.orchestrator_permission_mode,onChange:f("orchestrator_permission_mode"),options:OTe,placeholder:(u==null?void 0:u.orchestrator_permission_mode)||"default",allowEmpty:!0})})]})]}),g.jsxs("section",{className:"flex flex-col gap-3",children:[g.jsx("h3",{className:"text-sm font-semibold",children:"Policy"}),g.jsx(Ps,{}),g.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[g.jsx(ma,{label:"Max Depth",children:g.jsx(ln,{type:"number",value:a.policy_max_depth,onChange:y=>f("policy_max_depth")(y.target.value),placeholder:(u==null?void 0:u.policy_max_depth)||"3",className:"h-8 text-xs"})}),g.jsx(ma,{label:"Agent Timeout",children:g.jsx(ln,{type:"number",value:a.policy_agent_timeout,onChange:y=>f("policy_agent_timeout")(y.target.value),placeholder:(u==null?void 0:u.policy_agent_timeout)||"none",className:"h-8 text-xs"})}),g.jsx(ma,{label:"Max Delegate Retries",children:g.jsx(ln,{type:"number",value:a.policy_max_delegate_retries,onChange:y=>f("policy_max_delegate_retries")(y.target.value),placeholder:(u==null?void 0:u.policy_max_delegate_retries)||"0",className:"h-8 text-xs"})})]})]}),g.jsxs("section",{className:"flex flex-col gap-3",children:[g.jsx("h3",{className:"text-sm font-semibold",children:"Session"}),g.jsx(Ps,{}),g.jsxs("div",{className:"grid gap-4 sm:grid-cols-3",children:[g.jsx(ma,{label:"Merge Strategy",children:g.jsx(gh,{value:a.session_merge_strategy,onChange:f("session_merge_strategy"),options:jTe,placeholder:(u==null?void 0:u.session_merge_strategy)||"auto",allowEmpty:!0})}),g.jsx(ma,{label:"Pull Before Session",children:g.jsx(gh,{value:a.session_pull_before_session,onChange:f("session_pull_before_session"),options:CTe,placeholder:(u==null?void 0:u.session_pull_before_session)||"prompt",allowEmpty:!0})}),g.jsx(ma,{label:"PR Command",className:"sm:col-span-3",children:g.jsx(ln,{value:a.session_pr_command,onChange:y=>f("session_pr_command")(y.target.value),placeholder:(u==null?void 0:u.session_pr_command)||"gh pr create --base {base_branch} --head {session_branch}",className:"h-8 text-xs font-mono"})})]})]}),g.jsxs("section",{className:"flex flex-col gap-3",children:[g.jsx("h3",{className:"text-sm font-semibold",children:"Trace"}),g.jsx(Ps,{}),g.jsx("div",{className:"grid gap-4 sm:grid-cols-3",children:g.jsx(ma,{label:"Enabled",children:g.jsx(gh,{value:a.trace_enabled,onChange:f("trace_enabled"),options:ATe,placeholder:(u==null?void 0:u.trace_enabled)||"true",allowEmpty:!0})})})]}),g.jsxs(De,{size:"sm",onClick:m,disabled:r,className:"self-start",children:[g.jsx(oB,{className:"mr-2 h-3.5 w-3.5"}),r?"Saving...":"Save Configuration"]})]})}function ma({label:e,children:t,className:n}){return g.jsxs("div",{className:`flex flex-col gap-1 ${n??""}`,children:[g.jsx(en,{className:"text-xs",children:e}),t]})}function gh({value:e,onChange:t,options:n,placeholder:r,allowEmpty:a}){return g.jsxs(el,{value:e||(a?XS:""),onValueChange:i=>t(i===XS?"":i),children:[g.jsx(nl,{className:"h-8 text-xs",children:g.jsx(tl,{placeholder:r})}),g.jsxs(rl,{children:[a&&g.jsx(Kr,{value:XS,className:"text-muted-foreground",children:r?`Default (${r})`:"Default"}),n.map(i=>g.jsx(Kr,{value:i,children:i},i))]})]})}function NTe(){const[e,t]=b.useState(null),n=xTe(),r=Yf(),a=pB(e??0,{enabled:e!=null}),i=wTe(),s=STe(),c=f=>{i.mutate(f,{onSuccess:()=>Tt.success("Global configuration saved"),onError:()=>Tt.error("Failed to save global configuration")})},u=f=>{e!=null&&s.mutate({projectId:e,data:f},{onSuccess:()=>Tt.success("Project configuration saved"),onError:()=>Tt.error("Failed to save project configuration")})};return g.jsxs("div",{className:"space-y-6",children:[g.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Settings"}),g.jsxs(jA,{defaultValue:"global",children:[g.jsxs(CA,{children:[g.jsx(Ua,{value:"global",children:"Global"}),g.jsx(Ua,{value:"project",children:"Project"})]}),g.jsx(Ha,{value:"global",className:"mt-4",children:n.isLoading?g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):g.jsx(K3,{values:n.data??{},onSave:c,saving:i.isPending})}),g.jsx(Ha,{value:"project",className:"mt-4",children:g.jsxs("div",{className:"flex flex-col gap-4",children:[g.jsxs("div",{className:"flex flex-col gap-1 max-w-xs",children:[g.jsx(en,{className:"text-xs",children:"Project"}),g.jsxs(el,{value:e!=null?String(e):"",onValueChange:f=>t(Number(f)),children:[g.jsx(nl,{className:"h-8 text-xs",children:g.jsx(tl,{placeholder:"Select a project"})}),g.jsx(rl,{children:(r.data??[]).map(f=>g.jsx(Kr,{value:String(f.id),children:f.display_name},f.id))})]})]}),e!=null&&a.isLoading&&g.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}),e!=null&&a.data&&g.jsx(K3,{values:a.data.project,placeholders:a.data.merged,onSave:u,saving:s.isPending})]})})]})]})}function TTe(){return g.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20",children:[g.jsx("h1",{className:"text-2xl font-bold",children:"Page not found"}),g.jsx(De,{variant:"outline",asChild:!0,children:g.jsxs(Va,{to:"/",children:[g.jsx(Bte,{className:"mr-2 h-4 w-4"}),"Back to Dashboard"]})})]})}const PTe=3,MTe=1e4,RTe=2e3;function kTe(){const e=jt(),t=b.useRef(null),n=b.useRef(void 0),r=b.useRef(1e3),a=b.useRef(0),i=b.useRef({});b.useEffect(()=>{function s(u){const f=Date.now();if(f-a.current<RTe)return!1;const m=(i.current[u]??[]).filter(h=>f-h<MTe);return m.length>=PTe?!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=>{var h;try{const p=JSON.parse(m.data),y=(p.run_id??"unknown").slice(0,12);s(m.type)&&(m.type==="session_started"?Tt.info(`Session ${y} started`):m.type==="session_completed"?Tt.success(`Session ${y} completed`,{description:(h=p.summary)==null?void 0:h.slice(0,80)}):m.type==="session_failed"?Tt.error(`Session ${y} failed`):m.type==="session_stopped"&&Tt.warning(`Session ${y} stopped`)),e.invalidateQueries({queryKey:["sessions"]}),p.project_id&&e.invalidateQueries({queryKey:Ge.projects.sessions(p.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 DTe(){return kTe(),g.jsx(YV,{children:g.jsxs(pi,{element:g.jsx(Yre,{}),children:[g.jsx(pi,{index:!0,element:g.jsx(eae,{})}),g.jsx(pi,{path:"projects",element:g.jsx(sae,{})}),g.jsx(pi,{path:"projects/:projectId",element:g.jsx(fEe,{})}),g.jsx(pi,{path:"projects/:projectId/sessions/:runId",element:g.jsx(YNe,{})}),g.jsx(pi,{path:"schedules",element:g.jsx(bTe,{})}),g.jsx(pi,{path:"resources/:resourceType",element:g.jsx(sTe,{})}),g.jsx(pi,{path:"settings",element:g.jsx(NTe,{})}),g.jsx(pi,{path:"*",element:g.jsx(TTe,{})})]})})}YK.createRoot(document.getElementById("root")).render(g.jsx(b.StrictMode,{children:g.jsx(lX,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:g.jsx(JY,{client:Gne,children:g.jsxs(Q$,{children:[g.jsx(yY,{children:g.jsx(DTe,{})}),g.jsx(Xne,{})]})})})}));
